diff -r 000000000000 -r 4f2f89ce4247 WebCore/generated/JSWebKitAnimationEvent.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WebCore/generated/JSWebKitAnimationEvent.cpp Fri Sep 17 09:02:29 2010 +0300 @@ -0,0 +1,202 @@ +/* + 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 "JSWebKitAnimationEvent.h" + +#include "KURL.h" +#include "WebKitAnimationEvent.h" +#include +#include +#include +#include + +using namespace JSC; + +namespace WebCore { + +ASSERT_CLASS_FITS_IN_CELL(JSWebKitAnimationEvent); + +/* Hash table */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSWebKitAnimationEventTableValues[4] = +{ + { "animationName", DontDelete | ReadOnly, (intptr_t)static_cast(jsWebKitAnimationEventAnimationName), (intptr_t)0 THUNK_GENERATOR(0) }, + { "elapsedTime", DontDelete | ReadOnly, (intptr_t)static_cast(jsWebKitAnimationEventElapsedTime), (intptr_t)0 THUNK_GENERATOR(0) }, + { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast(jsWebKitAnimationEventConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSWebKitAnimationEventTable = { 9, 7, JSWebKitAnimationEventTableValues, 0 }; +/* Hash table for constructor */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSWebKitAnimationEventConstructorTableValues[1] = +{ + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSWebKitAnimationEventConstructorTable = { 1, 0, JSWebKitAnimationEventConstructorTableValues, 0 }; +class JSWebKitAnimationEventConstructor : public DOMConstructorObject { +public: + JSWebKitAnimationEventConstructor(JSC::ExecState*, JSDOMGlobalObject*); + + virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); + virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); + virtual const JSC::ClassInfo* classInfo() const { return &s_info; } + static const JSC::ClassInfo s_info; + static PassRefPtr createStructure(JSC::JSValue prototype) + { + return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); + } +protected: + static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; +}; + +const ClassInfo JSWebKitAnimationEventConstructor::s_info = { "WebKitAnimationEventConstructor", 0, &JSWebKitAnimationEventConstructorTable, 0 }; + +JSWebKitAnimationEventConstructor::JSWebKitAnimationEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSWebKitAnimationEventConstructor::createStructure(globalObject->objectPrototype()), globalObject) +{ + putDirect(exec->propertyNames().prototype, JSWebKitAnimationEventPrototype::self(exec, globalObject), DontDelete | ReadOnly); +} + +bool JSWebKitAnimationEventConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot(exec, &JSWebKitAnimationEventConstructorTable, this, propertyName, slot); +} + +bool JSWebKitAnimationEventConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticValueDescriptor(exec, &JSWebKitAnimationEventConstructorTable, this, propertyName, descriptor); +} + +/* Hash table for prototype */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSWebKitAnimationEventPrototypeTableValues[2] = +{ + { "initWebKitAnimationEvent", DontDelete | Function, (intptr_t)static_cast(jsWebKitAnimationEventPrototypeFunctionInitWebKitAnimationEvent), (intptr_t)5 THUNK_GENERATOR(0) }, + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSWebKitAnimationEventPrototypeTable = { 2, 1, JSWebKitAnimationEventPrototypeTableValues, 0 }; +const ClassInfo JSWebKitAnimationEventPrototype::s_info = { "WebKitAnimationEventPrototype", 0, &JSWebKitAnimationEventPrototypeTable, 0 }; + +JSObject* JSWebKitAnimationEventPrototype::self(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMPrototype(exec, globalObject); +} + +bool JSWebKitAnimationEventPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticFunctionSlot(exec, &JSWebKitAnimationEventPrototypeTable, this, propertyName, slot); +} + +bool JSWebKitAnimationEventPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticFunctionDescriptor(exec, &JSWebKitAnimationEventPrototypeTable, this, propertyName, descriptor); +} + +const ClassInfo JSWebKitAnimationEvent::s_info = { "WebKitAnimationEvent", &JSEvent::s_info, &JSWebKitAnimationEventTable, 0 }; + +JSWebKitAnimationEvent::JSWebKitAnimationEvent(NonNullPassRefPtr structure, JSDOMGlobalObject* globalObject, PassRefPtr impl) + : JSEvent(structure, globalObject, impl) +{ +} + +JSObject* JSWebKitAnimationEvent::createPrototype(ExecState* exec, JSGlobalObject* globalObject) +{ + return new (exec) JSWebKitAnimationEventPrototype(globalObject, JSWebKitAnimationEventPrototype::createStructure(JSEventPrototype::self(exec, globalObject))); +} + +bool JSWebKitAnimationEvent::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot(exec, &JSWebKitAnimationEventTable, this, propertyName, slot); +} + +bool JSWebKitAnimationEvent::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticValueDescriptor(exec, &JSWebKitAnimationEventTable, this, propertyName, descriptor); +} + +JSValue jsWebKitAnimationEventAnimationName(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSWebKitAnimationEvent* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + WebKitAnimationEvent* imp = static_cast(castedThis->impl()); + JSValue result = jsString(exec, imp->animationName()); + return result; +} + +JSValue jsWebKitAnimationEventElapsedTime(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSWebKitAnimationEvent* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + WebKitAnimationEvent* imp = static_cast(castedThis->impl()); + JSValue result = jsNumber(exec, imp->elapsedTime()); + return result; +} + +JSValue jsWebKitAnimationEventConstructor(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSWebKitAnimationEvent* domObject = static_cast(asObject(slotBase)); + return JSWebKitAnimationEvent::getConstructor(exec, domObject->globalObject()); +} +JSValue JSWebKitAnimationEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMConstructor(exec, static_cast(globalObject)); +} + +EncodedJSValue JSC_HOST_CALL jsWebKitAnimationEventPrototypeFunctionInitWebKitAnimationEvent(ExecState* exec) +{ + JSValue thisValue = exec->hostThisValue(); + if (!thisValue.inherits(&JSWebKitAnimationEvent::s_info)) + return throwVMTypeError(exec); + JSWebKitAnimationEvent* castedThis = static_cast(asObject(thisValue)); + WebKitAnimationEvent* imp = static_cast(castedThis->impl()); + const String& typeArg = ustringToString(exec->argument(0).toString(exec)); + bool canBubbleArg = exec->argument(1).toBoolean(exec); + bool cancelableArg = exec->argument(2).toBoolean(exec); + const String& animationNameArg = ustringToString(exec->argument(3).toString(exec)); + double elapsedTimeArg = exec->argument(4).toNumber(exec); + + imp->initWebKitAnimationEvent(typeArg, canBubbleArg, cancelableArg, animationNameArg, elapsedTimeArg); + return JSValue::encode(jsUndefined()); +} + + +}