diff -r 000000000000 -r 4f2f89ce4247 WebCore/generated/JSSVGGradientElement.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WebCore/generated/JSSVGGradientElement.cpp Fri Sep 17 09:02:29 2010 +0300 @@ -0,0 +1,296 @@ +/* + 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" + +#if ENABLE(SVG) + +#include "JSSVGGradientElement.h" + +#include "CSSMutableStyleDeclaration.h" +#include "CSSStyleDeclaration.h" +#include "CSSValue.h" +#include "JSCSSStyleDeclaration.h" +#include "JSCSSValue.h" +#include "JSSVGAnimatedBoolean.h" +#include "JSSVGAnimatedEnumeration.h" +#include "JSSVGAnimatedString.h" +#include "JSSVGAnimatedTransformList.h" +#include "SVGGradientElement.h" +#include +#include + +using namespace JSC; + +namespace WebCore { + +ASSERT_CLASS_FITS_IN_CELL(JSSVGGradientElement); + +/* Hash table */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSSVGGradientElementTableValues[9] = +{ + { "gradientUnits", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGGradientElementGradientUnits), (intptr_t)0 THUNK_GENERATOR(0) }, + { "gradientTransform", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGGradientElementGradientTransform), (intptr_t)0 THUNK_GENERATOR(0) }, + { "spreadMethod", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGGradientElementSpreadMethod), (intptr_t)0 THUNK_GENERATOR(0) }, + { "href", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGGradientElementHref), (intptr_t)0 THUNK_GENERATOR(0) }, + { "externalResourcesRequired", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGGradientElementExternalResourcesRequired), (intptr_t)0 THUNK_GENERATOR(0) }, + { "className", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGGradientElementClassName), (intptr_t)0 THUNK_GENERATOR(0) }, + { "style", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGGradientElementStyle), (intptr_t)0 THUNK_GENERATOR(0) }, + { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast(jsSVGGradientElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSSVGGradientElementTable = { 16, 15, JSSVGGradientElementTableValues, 0 }; +/* Hash table for constructor */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSSVGGradientElementConstructorTableValues[5] = +{ + { "SVG_SPREADMETHOD_UNKNOWN", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGGradientElementSVG_SPREADMETHOD_UNKNOWN), (intptr_t)0 THUNK_GENERATOR(0) }, + { "SVG_SPREADMETHOD_PAD", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGGradientElementSVG_SPREADMETHOD_PAD), (intptr_t)0 THUNK_GENERATOR(0) }, + { "SVG_SPREADMETHOD_REFLECT", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGGradientElementSVG_SPREADMETHOD_REFLECT), (intptr_t)0 THUNK_GENERATOR(0) }, + { "SVG_SPREADMETHOD_REPEAT", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGGradientElementSVG_SPREADMETHOD_REPEAT), (intptr_t)0 THUNK_GENERATOR(0) }, + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSSVGGradientElementConstructorTable = { 8, 7, JSSVGGradientElementConstructorTableValues, 0 }; +class JSSVGGradientElementConstructor : public DOMConstructorObject { +public: + JSSVGGradientElementConstructor(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 JSSVGGradientElementConstructor::s_info = { "SVGGradientElementConstructor", 0, &JSSVGGradientElementConstructorTable, 0 }; + +JSSVGGradientElementConstructor::JSSVGGradientElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGGradientElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) +{ + putDirect(exec->propertyNames().prototype, JSSVGGradientElementPrototype::self(exec, globalObject), DontDelete | ReadOnly); +} + +bool JSSVGGradientElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot(exec, &JSSVGGradientElementConstructorTable, this, propertyName, slot); +} + +bool JSSVGGradientElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticValueDescriptor(exec, &JSSVGGradientElementConstructorTable, this, propertyName, descriptor); +} + +/* Hash table for prototype */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSSVGGradientElementPrototypeTableValues[6] = +{ + { "SVG_SPREADMETHOD_UNKNOWN", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGGradientElementSVG_SPREADMETHOD_UNKNOWN), (intptr_t)0 THUNK_GENERATOR(0) }, + { "SVG_SPREADMETHOD_PAD", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGGradientElementSVG_SPREADMETHOD_PAD), (intptr_t)0 THUNK_GENERATOR(0) }, + { "SVG_SPREADMETHOD_REFLECT", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGGradientElementSVG_SPREADMETHOD_REFLECT), (intptr_t)0 THUNK_GENERATOR(0) }, + { "SVG_SPREADMETHOD_REPEAT", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGGradientElementSVG_SPREADMETHOD_REPEAT), (intptr_t)0 THUNK_GENERATOR(0) }, + { "getPresentationAttribute", DontDelete | Function, (intptr_t)static_cast(jsSVGGradientElementPrototypeFunctionGetPresentationAttribute), (intptr_t)1 THUNK_GENERATOR(0) }, + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSSVGGradientElementPrototypeTable = { 17, 15, JSSVGGradientElementPrototypeTableValues, 0 }; +const ClassInfo JSSVGGradientElementPrototype::s_info = { "SVGGradientElementPrototype", 0, &JSSVGGradientElementPrototypeTable, 0 }; + +JSObject* JSSVGGradientElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMPrototype(exec, globalObject); +} + +bool JSSVGGradientElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticPropertySlot(exec, &JSSVGGradientElementPrototypeTable, this, propertyName, slot); +} + +bool JSSVGGradientElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticPropertyDescriptor(exec, &JSSVGGradientElementPrototypeTable, this, propertyName, descriptor); +} + +const ClassInfo JSSVGGradientElement::s_info = { "SVGGradientElement", &JSSVGElement::s_info, &JSSVGGradientElementTable, 0 }; + +JSSVGGradientElement::JSSVGGradientElement(NonNullPassRefPtr structure, JSDOMGlobalObject* globalObject, PassRefPtr impl) + : JSSVGElement(structure, globalObject, impl) +{ +} + +JSObject* JSSVGGradientElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) +{ + return new (exec) JSSVGGradientElementPrototype(globalObject, JSSVGGradientElementPrototype::createStructure(JSSVGElementPrototype::self(exec, globalObject))); +} + +bool JSSVGGradientElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot(exec, &JSSVGGradientElementTable, this, propertyName, slot); +} + +bool JSSVGGradientElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticValueDescriptor(exec, &JSSVGGradientElementTable, this, propertyName, descriptor); +} + +JSValue jsSVGGradientElementGradientUnits(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGGradientElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + SVGGradientElement* imp = static_cast(castedThis->impl()); + RefPtr obj = imp->gradientUnitsAnimated(); + JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); + return result; +} + +JSValue jsSVGGradientElementGradientTransform(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGGradientElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + SVGGradientElement* imp = static_cast(castedThis->impl()); + RefPtr obj = imp->gradientTransformAnimated(); + JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); + return result; +} + +JSValue jsSVGGradientElementSpreadMethod(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGGradientElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + SVGGradientElement* imp = static_cast(castedThis->impl()); + RefPtr obj = imp->spreadMethodAnimated(); + JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); + return result; +} + +JSValue jsSVGGradientElementHref(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGGradientElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + SVGGradientElement* imp = static_cast(castedThis->impl()); + RefPtr obj = imp->hrefAnimated(); + JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); + return result; +} + +JSValue jsSVGGradientElementExternalResourcesRequired(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGGradientElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + SVGGradientElement* imp = static_cast(castedThis->impl()); + RefPtr obj = imp->externalResourcesRequiredAnimated(); + JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); + return result; +} + +JSValue jsSVGGradientElementClassName(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGGradientElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + SVGGradientElement* imp = static_cast(castedThis->impl()); + RefPtr obj = imp->classNameAnimated(); + JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); + return result; +} + +JSValue jsSVGGradientElementStyle(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGGradientElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + SVGGradientElement* imp = static_cast(castedThis->impl()); + JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); + return result; +} + +JSValue jsSVGGradientElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGGradientElement* domObject = static_cast(asObject(slotBase)); + return JSSVGGradientElement::getConstructor(exec, domObject->globalObject()); +} +JSValue JSSVGGradientElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMConstructor(exec, static_cast(globalObject)); +} + +EncodedJSValue JSC_HOST_CALL jsSVGGradientElementPrototypeFunctionGetPresentationAttribute(ExecState* exec) +{ + JSValue thisValue = exec->hostThisValue(); + if (!thisValue.inherits(&JSSVGGradientElement::s_info)) + return throwVMTypeError(exec); + JSSVGGradientElement* castedThis = static_cast(asObject(thisValue)); + SVGGradientElement* imp = static_cast(castedThis->impl()); + const String& name = ustringToString(exec->argument(0).toString(exec)); + + + JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); + return JSValue::encode(result); +} + +// Constant getters + +JSValue jsSVGGradientElementSVG_SPREADMETHOD_UNKNOWN(ExecState* exec, JSValue, const Identifier&) +{ + return jsNumber(exec, static_cast(0)); +} + +JSValue jsSVGGradientElementSVG_SPREADMETHOD_PAD(ExecState* exec, JSValue, const Identifier&) +{ + return jsNumber(exec, static_cast(1)); +} + +JSValue jsSVGGradientElementSVG_SPREADMETHOD_REFLECT(ExecState* exec, JSValue, const Identifier&) +{ + return jsNumber(exec, static_cast(2)); +} + +JSValue jsSVGGradientElementSVG_SPREADMETHOD_REPEAT(ExecState* exec, JSValue, const Identifier&) +{ + return jsNumber(exec, static_cast(3)); +} + + +} + +#endif // ENABLE(SVG)