diff -r 000000000000 -r 4f2f89ce4247 WebCore/generated/JSSVGClipPathElement.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WebCore/generated/JSSVGClipPathElement.cpp Fri Sep 17 09:02:29 2010 +0300 @@ -0,0 +1,415 @@ +/* + 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 "JSSVGClipPathElement.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 "JSSVGElement.h" +#include "JSSVGMatrix.h" +#include "JSSVGRect.h" +#include "JSSVGStringList.h" +#include "KURL.h" +#include "SVGClipPathElement.h" +#include "SVGElement.h" +#include "SVGStringList.h" +#include +#include +#include + +using namespace JSC; + +namespace WebCore { + +ASSERT_CLASS_FITS_IN_CELL(JSSVGClipPathElement); + +/* Hash table */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSSVGClipPathElementTableValues[14] = +{ + { "clipPathUnits", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGClipPathElementClipPathUnits), (intptr_t)0 THUNK_GENERATOR(0) }, + { "requiredFeatures", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGClipPathElementRequiredFeatures), (intptr_t)0 THUNK_GENERATOR(0) }, + { "requiredExtensions", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGClipPathElementRequiredExtensions), (intptr_t)0 THUNK_GENERATOR(0) }, + { "systemLanguage", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGClipPathElementSystemLanguage), (intptr_t)0 THUNK_GENERATOR(0) }, + { "xmllang", DontDelete, (intptr_t)static_cast(jsSVGClipPathElementXmllang), (intptr_t)setJSSVGClipPathElementXmllang THUNK_GENERATOR(0) }, + { "xmlspace", DontDelete, (intptr_t)static_cast(jsSVGClipPathElementXmlspace), (intptr_t)setJSSVGClipPathElementXmlspace THUNK_GENERATOR(0) }, + { "externalResourcesRequired", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGClipPathElementExternalResourcesRequired), (intptr_t)0 THUNK_GENERATOR(0) }, + { "className", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGClipPathElementClassName), (intptr_t)0 THUNK_GENERATOR(0) }, + { "style", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGClipPathElementStyle), (intptr_t)0 THUNK_GENERATOR(0) }, + { "transform", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGClipPathElementTransform), (intptr_t)0 THUNK_GENERATOR(0) }, + { "nearestViewportElement", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGClipPathElementNearestViewportElement), (intptr_t)0 THUNK_GENERATOR(0) }, + { "farthestViewportElement", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGClipPathElementFarthestViewportElement), (intptr_t)0 THUNK_GENERATOR(0) }, + { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast(jsSVGClipPathElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSSVGClipPathElementTable = { 35, 31, JSSVGClipPathElementTableValues, 0 }; +/* Hash table for constructor */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSSVGClipPathElementConstructorTableValues[1] = +{ + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSSVGClipPathElementConstructorTable = { 1, 0, JSSVGClipPathElementConstructorTableValues, 0 }; +class JSSVGClipPathElementConstructor : public DOMConstructorObject { +public: + JSSVGClipPathElementConstructor(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 JSSVGClipPathElementConstructor::s_info = { "SVGClipPathElementConstructor", 0, &JSSVGClipPathElementConstructorTable, 0 }; + +JSSVGClipPathElementConstructor::JSSVGClipPathElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) + : DOMConstructorObject(JSSVGClipPathElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) +{ + putDirect(exec->propertyNames().prototype, JSSVGClipPathElementPrototype::self(exec, globalObject), DontDelete | ReadOnly); +} + +bool JSSVGClipPathElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot(exec, &JSSVGClipPathElementConstructorTable, this, propertyName, slot); +} + +bool JSSVGClipPathElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticValueDescriptor(exec, &JSSVGClipPathElementConstructorTable, this, propertyName, descriptor); +} + +/* Hash table for prototype */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSSVGClipPathElementPrototypeTableValues[7] = +{ + { "hasExtension", DontDelete | Function, (intptr_t)static_cast(jsSVGClipPathElementPrototypeFunctionHasExtension), (intptr_t)1 THUNK_GENERATOR(0) }, + { "getPresentationAttribute", DontDelete | Function, (intptr_t)static_cast(jsSVGClipPathElementPrototypeFunctionGetPresentationAttribute), (intptr_t)1 THUNK_GENERATOR(0) }, + { "getBBox", DontDelete | Function, (intptr_t)static_cast(jsSVGClipPathElementPrototypeFunctionGetBBox), (intptr_t)0 THUNK_GENERATOR(0) }, + { "getCTM", DontDelete | Function, (intptr_t)static_cast(jsSVGClipPathElementPrototypeFunctionGetCTM), (intptr_t)0 THUNK_GENERATOR(0) }, + { "getScreenCTM", DontDelete | Function, (intptr_t)static_cast(jsSVGClipPathElementPrototypeFunctionGetScreenCTM), (intptr_t)0 THUNK_GENERATOR(0) }, + { "getTransformToElement", DontDelete | Function, (intptr_t)static_cast(jsSVGClipPathElementPrototypeFunctionGetTransformToElement), (intptr_t)1 THUNK_GENERATOR(0) }, + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSSVGClipPathElementPrototypeTable = { 17, 15, JSSVGClipPathElementPrototypeTableValues, 0 }; +const ClassInfo JSSVGClipPathElementPrototype::s_info = { "SVGClipPathElementPrototype", 0, &JSSVGClipPathElementPrototypeTable, 0 }; + +JSObject* JSSVGClipPathElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMPrototype(exec, globalObject); +} + +bool JSSVGClipPathElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticFunctionSlot(exec, &JSSVGClipPathElementPrototypeTable, this, propertyName, slot); +} + +bool JSSVGClipPathElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticFunctionDescriptor(exec, &JSSVGClipPathElementPrototypeTable, this, propertyName, descriptor); +} + +const ClassInfo JSSVGClipPathElement::s_info = { "SVGClipPathElement", &JSSVGElement::s_info, &JSSVGClipPathElementTable, 0 }; + +JSSVGClipPathElement::JSSVGClipPathElement(NonNullPassRefPtr structure, JSDOMGlobalObject* globalObject, PassRefPtr impl) + : JSSVGElement(structure, globalObject, impl) +{ +} + +JSObject* JSSVGClipPathElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) +{ + return new (exec) JSSVGClipPathElementPrototype(globalObject, JSSVGClipPathElementPrototype::createStructure(JSSVGElementPrototype::self(exec, globalObject))); +} + +bool JSSVGClipPathElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot(exec, &JSSVGClipPathElementTable, this, propertyName, slot); +} + +bool JSSVGClipPathElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticValueDescriptor(exec, &JSSVGClipPathElementTable, this, propertyName, descriptor); +} + +JSValue jsSVGClipPathElementClipPathUnits(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGClipPathElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + SVGClipPathElement* imp = static_cast(castedThis->impl()); + RefPtr obj = imp->clipPathUnitsAnimated(); + JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); + return result; +} + +JSValue jsSVGClipPathElementRequiredFeatures(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGClipPathElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + SVGClipPathElement* imp = static_cast(castedThis->impl()); + JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); + return result; +} + +JSValue jsSVGClipPathElementRequiredExtensions(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGClipPathElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + SVGClipPathElement* imp = static_cast(castedThis->impl()); + JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); + return result; +} + +JSValue jsSVGClipPathElementSystemLanguage(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGClipPathElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + SVGClipPathElement* imp = static_cast(castedThis->impl()); + JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); + return result; +} + +JSValue jsSVGClipPathElementXmllang(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGClipPathElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + SVGClipPathElement* imp = static_cast(castedThis->impl()); + JSValue result = jsString(exec, imp->xmllang()); + return result; +} + +JSValue jsSVGClipPathElementXmlspace(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGClipPathElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + SVGClipPathElement* imp = static_cast(castedThis->impl()); + JSValue result = jsString(exec, imp->xmlspace()); + return result; +} + +JSValue jsSVGClipPathElementExternalResourcesRequired(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGClipPathElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + SVGClipPathElement* imp = static_cast(castedThis->impl()); + RefPtr obj = imp->externalResourcesRequiredAnimated(); + JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); + return result; +} + +JSValue jsSVGClipPathElementClassName(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGClipPathElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + SVGClipPathElement* imp = static_cast(castedThis->impl()); + RefPtr obj = imp->classNameAnimated(); + JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); + return result; +} + +JSValue jsSVGClipPathElementStyle(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGClipPathElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + SVGClipPathElement* imp = static_cast(castedThis->impl()); + JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); + return result; +} + +JSValue jsSVGClipPathElementTransform(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGClipPathElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + SVGClipPathElement* imp = static_cast(castedThis->impl()); + RefPtr obj = imp->transformAnimated(); + JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); + return result; +} + +JSValue jsSVGClipPathElementNearestViewportElement(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGClipPathElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + SVGClipPathElement* imp = static_cast(castedThis->impl()); + JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); + return result; +} + +JSValue jsSVGClipPathElementFarthestViewportElement(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGClipPathElement* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + SVGClipPathElement* imp = static_cast(castedThis->impl()); + JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); + return result; +} + +JSValue jsSVGClipPathElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSSVGClipPathElement* domObject = static_cast(asObject(slotBase)); + return JSSVGClipPathElement::getConstructor(exec, domObject->globalObject()); +} +void JSSVGClipPathElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) +{ + lookupPut(exec, propertyName, value, &JSSVGClipPathElementTable, this, slot); +} + +void setJSSVGClipPathElementXmllang(ExecState* exec, JSObject* thisObject, JSValue value) +{ + JSSVGClipPathElement* castedThis = static_cast(thisObject); + SVGClipPathElement* imp = static_cast(castedThis->impl()); + imp->setXmllang(ustringToString(value.toString(exec))); +} + +void setJSSVGClipPathElementXmlspace(ExecState* exec, JSObject* thisObject, JSValue value) +{ + JSSVGClipPathElement* castedThis = static_cast(thisObject); + SVGClipPathElement* imp = static_cast(castedThis->impl()); + imp->setXmlspace(ustringToString(value.toString(exec))); +} + +JSValue JSSVGClipPathElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMConstructor(exec, static_cast(globalObject)); +} + +EncodedJSValue JSC_HOST_CALL jsSVGClipPathElementPrototypeFunctionHasExtension(ExecState* exec) +{ + JSValue thisValue = exec->hostThisValue(); + if (!thisValue.inherits(&JSSVGClipPathElement::s_info)) + return throwVMTypeError(exec); + JSSVGClipPathElement* castedThis = static_cast(asObject(thisValue)); + SVGClipPathElement* imp = static_cast(castedThis->impl()); + const String& extension = ustringToString(exec->argument(0).toString(exec)); + + + JSC::JSValue result = jsBoolean(imp->hasExtension(extension)); + return JSValue::encode(result); +} + +EncodedJSValue JSC_HOST_CALL jsSVGClipPathElementPrototypeFunctionGetPresentationAttribute(ExecState* exec) +{ + JSValue thisValue = exec->hostThisValue(); + if (!thisValue.inherits(&JSSVGClipPathElement::s_info)) + return throwVMTypeError(exec); + JSSVGClipPathElement* castedThis = static_cast(asObject(thisValue)); + SVGClipPathElement* 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); +} + +EncodedJSValue JSC_HOST_CALL jsSVGClipPathElementPrototypeFunctionGetBBox(ExecState* exec) +{ + JSValue thisValue = exec->hostThisValue(); + if (!thisValue.inherits(&JSSVGClipPathElement::s_info)) + return throwVMTypeError(exec); + JSSVGClipPathElement* castedThis = static_cast(asObject(thisValue)); + SVGClipPathElement* imp = static_cast(castedThis->impl()); + + + JSC::JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper::create(imp->getBBox()).get(), 0 /* no context on purpose */); + return JSValue::encode(result); +} + +EncodedJSValue JSC_HOST_CALL jsSVGClipPathElementPrototypeFunctionGetCTM(ExecState* exec) +{ + JSValue thisValue = exec->hostThisValue(); + if (!thisValue.inherits(&JSSVGClipPathElement::s_info)) + return throwVMTypeError(exec); + JSSVGClipPathElement* castedThis = static_cast(asObject(thisValue)); + SVGClipPathElement* imp = static_cast(castedThis->impl()); + + + JSC::JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper::create(imp->getCTM()).get(), 0 /* no context on purpose */); + return JSValue::encode(result); +} + +EncodedJSValue JSC_HOST_CALL jsSVGClipPathElementPrototypeFunctionGetScreenCTM(ExecState* exec) +{ + JSValue thisValue = exec->hostThisValue(); + if (!thisValue.inherits(&JSSVGClipPathElement::s_info)) + return throwVMTypeError(exec); + JSSVGClipPathElement* castedThis = static_cast(asObject(thisValue)); + SVGClipPathElement* imp = static_cast(castedThis->impl()); + + + JSC::JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper::create(imp->getScreenCTM()).get(), 0 /* no context on purpose */); + return JSValue::encode(result); +} + +EncodedJSValue JSC_HOST_CALL jsSVGClipPathElementPrototypeFunctionGetTransformToElement(ExecState* exec) +{ + JSValue thisValue = exec->hostThisValue(); + if (!thisValue.inherits(&JSSVGClipPathElement::s_info)) + return throwVMTypeError(exec); + JSSVGClipPathElement* castedThis = static_cast(asObject(thisValue)); + SVGClipPathElement* imp = static_cast(castedThis->impl()); + ExceptionCode ec = 0; + SVGElement* element = toSVGElement(exec->argument(0)); + + + JSC::JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper::create(imp->getTransformToElement(element, ec)).get(), 0 /* no context on purpose */); + setDOMException(exec, ec); + return JSValue::encode(result); +} + + +} + +#endif // ENABLE(SVG)