/* This file is part of the WebKit open source project. This file has been generated by generate-bindings.pl. DO NOT MODIFY! This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "config.h" #include "JSWebKitCSSTransformValue.h" #include "WebKitCSSTransformValue.h" #include #include #include using namespace JSC; namespace WebCore { ASSERT_CLASS_FITS_IN_CELL(JSWebKitCSSTransformValue); /* Hash table */ static const HashTableValue JSWebKitCSSTransformValueTableValues[3] = { { "operationType", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueOperationType), (intptr_t)0 }, { "constructor", DontEnum|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueConstructor), (intptr_t)0 }, { 0, 0, 0, 0 } }; static JSC_CONST_HASHTABLE HashTable JSWebKitCSSTransformValueTable = #if ENABLE(PERFECT_HASH_SIZE) { 15, JSWebKitCSSTransformValueTableValues, 0 }; #else { 5, 3, JSWebKitCSSTransformValueTableValues, 0 }; #endif /* Hash table for constructor */ static const HashTableValue JSWebKitCSSTransformValueConstructorTableValues[22] = { { "CSS_TRANSLATE", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_TRANSLATE), (intptr_t)0 }, { "CSS_TRANSLATEX", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_TRANSLATEX), (intptr_t)0 }, { "CSS_TRANSLATEY", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_TRANSLATEY), (intptr_t)0 }, { "CSS_ROTATE", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_ROTATE), (intptr_t)0 }, { "CSS_SCALE", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_SCALE), (intptr_t)0 }, { "CSS_SCALEX", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_SCALEX), (intptr_t)0 }, { "CSS_SCALEY", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_SCALEY), (intptr_t)0 }, { "CSS_SKEW", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_SKEW), (intptr_t)0 }, { "CSS_SKEWX", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_SKEWX), (intptr_t)0 }, { "CSS_SKEWY", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_SKEWY), (intptr_t)0 }, { "CSS_MATRIX", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_MATRIX), (intptr_t)0 }, { "CSS_TRANSLATEZ", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_TRANSLATEZ), (intptr_t)0 }, { "CSS_TRANSLATE3D", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_TRANSLATE3D), (intptr_t)0 }, { "CSS_ROTATEX", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_ROTATEX), (intptr_t)0 }, { "CSS_ROTATEY", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_ROTATEY), (intptr_t)0 }, { "CSS_ROTATEZ", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_ROTATEZ), (intptr_t)0 }, { "CSS_ROTATE3D", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_ROTATE3D), (intptr_t)0 }, { "CSS_SCALEZ", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_SCALEZ), (intptr_t)0 }, { "CSS_SCALE3D", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_SCALE3D), (intptr_t)0 }, { "CSS_PERSPECTIVE", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_PERSPECTIVE), (intptr_t)0 }, { "CSS_MATRIX3D", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_MATRIX3D), (intptr_t)0 }, { 0, 0, 0, 0 } }; static JSC_CONST_HASHTABLE HashTable JSWebKitCSSTransformValueConstructorTable = #if ENABLE(PERFECT_HASH_SIZE) { 1023, JSWebKitCSSTransformValueConstructorTableValues, 0 }; #else { 68, 63, JSWebKitCSSTransformValueConstructorTableValues, 0 }; #endif class JSWebKitCSSTransformValueConstructor : public DOMConstructorObject { public: JSWebKitCSSTransformValueConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) : DOMConstructorObject(JSWebKitCSSTransformValueConstructor::createStructure(globalObject->objectPrototype()), globalObject) { putDirect(exec->propertyNames().prototype, JSWebKitCSSTransformValuePrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); virtual const ClassInfo* classInfo() const { return &s_info; } static const ClassInfo s_info; static PassRefPtr createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); } protected: static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | DOMConstructorObject::StructureFlags; }; const ClassInfo JSWebKitCSSTransformValueConstructor::s_info = { "WebKitCSSTransformValueConstructor", 0, &JSWebKitCSSTransformValueConstructorTable, 0 }; bool JSWebKitCSSTransformValueConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { return getStaticValueSlot(exec, &JSWebKitCSSTransformValueConstructorTable, this, propertyName, slot); } bool JSWebKitCSSTransformValueConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) { return getStaticValueDescriptor(exec, &JSWebKitCSSTransformValueConstructorTable, this, propertyName, descriptor); } /* Hash table for prototype */ static const HashTableValue JSWebKitCSSTransformValuePrototypeTableValues[22] = { { "CSS_TRANSLATE", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_TRANSLATE), (intptr_t)0 }, { "CSS_TRANSLATEX", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_TRANSLATEX), (intptr_t)0 }, { "CSS_TRANSLATEY", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_TRANSLATEY), (intptr_t)0 }, { "CSS_ROTATE", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_ROTATE), (intptr_t)0 }, { "CSS_SCALE", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_SCALE), (intptr_t)0 }, { "CSS_SCALEX", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_SCALEX), (intptr_t)0 }, { "CSS_SCALEY", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_SCALEY), (intptr_t)0 }, { "CSS_SKEW", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_SKEW), (intptr_t)0 }, { "CSS_SKEWX", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_SKEWX), (intptr_t)0 }, { "CSS_SKEWY", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_SKEWY), (intptr_t)0 }, { "CSS_MATRIX", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_MATRIX), (intptr_t)0 }, { "CSS_TRANSLATEZ", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_TRANSLATEZ), (intptr_t)0 }, { "CSS_TRANSLATE3D", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_TRANSLATE3D), (intptr_t)0 }, { "CSS_ROTATEX", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_ROTATEX), (intptr_t)0 }, { "CSS_ROTATEY", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_ROTATEY), (intptr_t)0 }, { "CSS_ROTATEZ", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_ROTATEZ), (intptr_t)0 }, { "CSS_ROTATE3D", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_ROTATE3D), (intptr_t)0 }, { "CSS_SCALEZ", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_SCALEZ), (intptr_t)0 }, { "CSS_SCALE3D", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_SCALE3D), (intptr_t)0 }, { "CSS_PERSPECTIVE", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_PERSPECTIVE), (intptr_t)0 }, { "CSS_MATRIX3D", DontDelete|ReadOnly, (intptr_t)static_cast(jsWebKitCSSTransformValueCSS_MATRIX3D), (intptr_t)0 }, { 0, 0, 0, 0 } }; static JSC_CONST_HASHTABLE HashTable JSWebKitCSSTransformValuePrototypeTable = #if ENABLE(PERFECT_HASH_SIZE) { 1023, JSWebKitCSSTransformValuePrototypeTableValues, 0 }; #else { 68, 63, JSWebKitCSSTransformValuePrototypeTableValues, 0 }; #endif const ClassInfo JSWebKitCSSTransformValuePrototype::s_info = { "WebKitCSSTransformValuePrototype", 0, &JSWebKitCSSTransformValuePrototypeTable, 0 }; JSObject* JSWebKitCSSTransformValuePrototype::self(ExecState* exec, JSGlobalObject* globalObject) { return getDOMPrototype(exec, globalObject); } bool JSWebKitCSSTransformValuePrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { return getStaticValueSlot(exec, &JSWebKitCSSTransformValuePrototypeTable, this, propertyName, slot); } bool JSWebKitCSSTransformValuePrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) { return getStaticValueDescriptor(exec, &JSWebKitCSSTransformValuePrototypeTable, this, propertyName, descriptor); } const ClassInfo JSWebKitCSSTransformValue::s_info = { "WebKitCSSTransformValue", &JSCSSValueList::s_info, &JSWebKitCSSTransformValueTable, 0 }; JSWebKitCSSTransformValue::JSWebKitCSSTransformValue(NonNullPassRefPtr structure, JSDOMGlobalObject* globalObject, PassRefPtr impl) : JSCSSValueList(structure, globalObject, impl) { } JSObject* JSWebKitCSSTransformValue::createPrototype(ExecState* exec, JSGlobalObject* globalObject) { return new (exec) JSWebKitCSSTransformValuePrototype(JSWebKitCSSTransformValuePrototype::createStructure(JSCSSValueListPrototype::self(exec, globalObject))); } bool JSWebKitCSSTransformValue::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { const HashEntry* entry = JSWebKitCSSTransformValueTable.entry(exec, propertyName); if (entry) { slot.setCustom(this, entry->propertyGetter()); return true; } bool ok; unsigned index = propertyName.toUInt32(&ok, false); if (ok && index < static_cast(impl())->length()) { slot.setCustomIndex(this, index, indexGetter); return true; } return getStaticValueSlot(exec, &JSWebKitCSSTransformValueTable, this, propertyName, slot); } bool JSWebKitCSSTransformValue::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) { const HashEntry* entry = JSWebKitCSSTransformValueTable.entry(exec, propertyName); if (entry) { PropertySlot slot; slot.setCustom(this, entry->propertyGetter()); descriptor.setDescriptor(slot.getValue(exec, propertyName), entry->attributes()); return true; } bool ok; unsigned index = propertyName.toUInt32(&ok, false); if (ok && index < static_cast(impl())->length()) { PropertySlot slot; slot.setCustomIndex(this, index, indexGetter); descriptor.setDescriptor(slot.getValue(exec, propertyName), DontDelete | ReadOnly); return true; } return getStaticValueDescriptor(exec, &JSWebKitCSSTransformValueTable, this, propertyName, descriptor); } bool JSWebKitCSSTransformValue::getOwnPropertySlot(ExecState* exec, unsigned propertyName, PropertySlot& slot) { if (propertyName < static_cast(impl())->length()) { slot.setCustomIndex(this, propertyName, indexGetter); return true; } return getOwnPropertySlot(exec, Identifier::from(exec, propertyName), slot); } JSValue jsWebKitCSSTransformValueOperationType(ExecState* exec, JSValue slotBase, const Identifier&) { JSWebKitCSSTransformValue* castedThis = static_cast(asObject(slotBase)); UNUSED_PARAM(exec); WebKitCSSTransformValue* imp = static_cast(castedThis->impl()); JSValue result = jsNumber(exec, imp->operationType()); return result; } JSValue jsWebKitCSSTransformValueConstructor(ExecState* exec, JSValue slotBase, const Identifier&) { JSWebKitCSSTransformValue* domObject = static_cast(asObject(slotBase)); return JSWebKitCSSTransformValue::getConstructor(exec, domObject->globalObject()); } void JSWebKitCSSTransformValue::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode) { for (unsigned i = 0; i < static_cast(impl())->length(); ++i) propertyNames.add(Identifier::from(exec, i)); Base::getOwnPropertyNames(exec, propertyNames, mode); } JSValue JSWebKitCSSTransformValue::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { return getDOMConstructor(exec, static_cast(globalObject)); } // Constant getters JSValue jsWebKitCSSTransformValueCSS_TRANSLATE(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(1)); } JSValue jsWebKitCSSTransformValueCSS_TRANSLATEX(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(2)); } JSValue jsWebKitCSSTransformValueCSS_TRANSLATEY(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(3)); } JSValue jsWebKitCSSTransformValueCSS_ROTATE(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(4)); } JSValue jsWebKitCSSTransformValueCSS_SCALE(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(5)); } JSValue jsWebKitCSSTransformValueCSS_SCALEX(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(6)); } JSValue jsWebKitCSSTransformValueCSS_SCALEY(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(7)); } JSValue jsWebKitCSSTransformValueCSS_SKEW(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(8)); } JSValue jsWebKitCSSTransformValueCSS_SKEWX(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(9)); } JSValue jsWebKitCSSTransformValueCSS_SKEWY(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(10)); } JSValue jsWebKitCSSTransformValueCSS_MATRIX(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(11)); } JSValue jsWebKitCSSTransformValueCSS_TRANSLATEZ(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(12)); } JSValue jsWebKitCSSTransformValueCSS_TRANSLATE3D(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(13)); } JSValue jsWebKitCSSTransformValueCSS_ROTATEX(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(14)); } JSValue jsWebKitCSSTransformValueCSS_ROTATEY(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(15)); } JSValue jsWebKitCSSTransformValueCSS_ROTATEZ(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(16)); } JSValue jsWebKitCSSTransformValueCSS_ROTATE3D(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(17)); } JSValue jsWebKitCSSTransformValueCSS_SCALEZ(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(18)); } JSValue jsWebKitCSSTransformValueCSS_SCALE3D(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(19)); } JSValue jsWebKitCSSTransformValueCSS_PERSPECTIVE(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(20)); } JSValue jsWebKitCSSTransformValueCSS_MATRIX3D(ExecState* exec, JSValue, const Identifier&) { return jsNumber(exec, static_cast(21)); } JSValue JSWebKitCSSTransformValue::indexGetter(ExecState* exec, JSValue slotBase, unsigned index) { JSWebKitCSSTransformValue* thisObj = static_cast(asObject(slotBase)); return toJS(exec, thisObj->globalObject(), static_cast(thisObj->impl())->item(index)); } }