/* 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 "SVGElement.h" #include "JSSVGClipPathElement.h" #include #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 using namespace JSC; namespace WebCore { ASSERT_CLASS_FITS_IN_CELL(JSSVGClipPathElement) /* Hash table */ static const HashTableValue JSSVGClipPathElementTableValues[13] = { { "clipPathUnits", DontDelete|ReadOnly, (intptr_t)jsSVGClipPathElementClipPathUnits, (intptr_t)0 }, { "requiredFeatures", DontDelete|ReadOnly, (intptr_t)jsSVGClipPathElementRequiredFeatures, (intptr_t)0 }, { "requiredExtensions", DontDelete|ReadOnly, (intptr_t)jsSVGClipPathElementRequiredExtensions, (intptr_t)0 }, { "systemLanguage", DontDelete|ReadOnly, (intptr_t)jsSVGClipPathElementSystemLanguage, (intptr_t)0 }, { "xmllang", DontDelete, (intptr_t)jsSVGClipPathElementXmllang, (intptr_t)setJSSVGClipPathElementXmllang }, { "xmlspace", DontDelete, (intptr_t)jsSVGClipPathElementXmlspace, (intptr_t)setJSSVGClipPathElementXmlspace }, { "externalResourcesRequired", DontDelete|ReadOnly, (intptr_t)jsSVGClipPathElementExternalResourcesRequired, (intptr_t)0 }, { "className", DontDelete|ReadOnly, (intptr_t)jsSVGClipPathElementClassName, (intptr_t)0 }, { "style", DontDelete|ReadOnly, (intptr_t)jsSVGClipPathElementStyle, (intptr_t)0 }, { "transform", DontDelete|ReadOnly, (intptr_t)jsSVGClipPathElementTransform, (intptr_t)0 }, { "nearestViewportElement", DontDelete|ReadOnly, (intptr_t)jsSVGClipPathElementNearestViewportElement, (intptr_t)0 }, { "farthestViewportElement", DontDelete|ReadOnly, (intptr_t)jsSVGClipPathElementFarthestViewportElement, (intptr_t)0 }, { 0, 0, 0, 0 } }; static const HashTable JSSVGClipPathElementTable = #if ENABLE(PERFECT_HASH_SIZE) { 127, JSSVGClipPathElementTableValues, 0 }; #else { 34, 31, JSSVGClipPathElementTableValues, 0 }; #endif /* Hash table for prototype */ static const HashTableValue JSSVGClipPathElementPrototypeTableValues[7] = { { "hasExtension", DontDelete|Function, (intptr_t)jsSVGClipPathElementPrototypeFunctionHasExtension, (intptr_t)1 }, { "getPresentationAttribute", DontDelete|Function, (intptr_t)jsSVGClipPathElementPrototypeFunctionGetPresentationAttribute, (intptr_t)1 }, { "getBBox", DontDelete|Function, (intptr_t)jsSVGClipPathElementPrototypeFunctionGetBBox, (intptr_t)0 }, { "getCTM", DontDelete|Function, (intptr_t)jsSVGClipPathElementPrototypeFunctionGetCTM, (intptr_t)0 }, { "getScreenCTM", DontDelete|Function, (intptr_t)jsSVGClipPathElementPrototypeFunctionGetScreenCTM, (intptr_t)0 }, { "getTransformToElement", DontDelete|Function, (intptr_t)jsSVGClipPathElementPrototypeFunctionGetTransformToElement, (intptr_t)1 }, { 0, 0, 0, 0 } }; static const HashTable JSSVGClipPathElementPrototypeTable = #if ENABLE(PERFECT_HASH_SIZE) { 2047, JSSVGClipPathElementPrototypeTableValues, 0 }; #else { 17, 15, JSSVGClipPathElementPrototypeTableValues, 0 }; #endif const ClassInfo JSSVGClipPathElementPrototype::s_info = { "SVGClipPathElementPrototype", 0, &JSSVGClipPathElementPrototypeTable, 0 }; JSObject* JSSVGClipPathElementPrototype::self(ExecState* exec) { return getDOMPrototype(exec); } bool JSSVGClipPathElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { return getStaticFunctionSlot(exec, &JSSVGClipPathElementPrototypeTable, this, propertyName, slot); } const ClassInfo JSSVGClipPathElement::s_info = { "SVGClipPathElement", &JSSVGElement::s_info, &JSSVGClipPathElementTable, 0 }; JSSVGClipPathElement::JSSVGClipPathElement(PassRefPtr structure, PassRefPtr impl) : JSSVGElement(structure, impl) { } JSObject* JSSVGClipPathElement::createPrototype(ExecState* exec) { return new (exec) JSSVGClipPathElementPrototype(JSSVGClipPathElementPrototype::createStructure(JSSVGElementPrototype::self(exec))); } bool JSSVGClipPathElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { return getStaticValueSlot(exec, &JSSVGClipPathElementTable, this, propertyName, slot); } JSValuePtr jsSVGClipPathElementClipPathUnits(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGClipPathElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); RefPtr obj = imp->clipPathUnitsAnimated(); return toJS(exec, obj.get(), imp); } JSValuePtr jsSVGClipPathElementRequiredFeatures(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGClipPathElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); return toJS(exec, WTF::getPtr(imp->requiredFeatures()), imp); } JSValuePtr jsSVGClipPathElementRequiredExtensions(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGClipPathElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); return toJS(exec, WTF::getPtr(imp->requiredExtensions()), imp); } JSValuePtr jsSVGClipPathElementSystemLanguage(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGClipPathElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); return toJS(exec, WTF::getPtr(imp->systemLanguage()), imp); } JSValuePtr jsSVGClipPathElementXmllang(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGClipPathElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); return jsString(exec, imp->xmllang()); } JSValuePtr jsSVGClipPathElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGClipPathElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); return jsString(exec, imp->xmlspace()); } JSValuePtr jsSVGClipPathElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGClipPathElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); RefPtr obj = imp->externalResourcesRequiredAnimated(); return toJS(exec, obj.get(), imp); } JSValuePtr jsSVGClipPathElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGClipPathElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); RefPtr obj = imp->classNameAnimated(); return toJS(exec, obj.get(), imp); } JSValuePtr jsSVGClipPathElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGClipPathElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); return toJS(exec, WTF::getPtr(imp->style())); } JSValuePtr jsSVGClipPathElementTransform(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGClipPathElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); RefPtr obj = imp->transformAnimated(); return toJS(exec, obj.get(), imp); } JSValuePtr jsSVGClipPathElementNearestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGClipPathElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); return toJS(exec, WTF::getPtr(imp->nearestViewportElement())); } JSValuePtr jsSVGClipPathElementFarthestViewportElement(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGClipPathElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); return toJS(exec, WTF::getPtr(imp->farthestViewportElement())); } void JSSVGClipPathElement::put(ExecState* exec, const Identifier& propertyName, JSValuePtr value, PutPropertySlot& slot) { lookupPut(exec, propertyName, value, &JSSVGClipPathElementTable, this, slot); } void setJSSVGClipPathElementXmllang(ExecState* exec, JSObject* thisObject, JSValuePtr value) { SVGClipPathElement* imp = static_cast(static_cast(thisObject)->impl()); imp->setXmllang(value->toString(exec)); } void setJSSVGClipPathElementXmlspace(ExecState* exec, JSObject* thisObject, JSValuePtr value) { SVGClipPathElement* imp = static_cast(static_cast(thisObject)->impl()); imp->setXmlspace(value->toString(exec)); } JSValuePtr jsSVGClipPathElementPrototypeFunctionHasExtension(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args) { if (!thisValue->isObject(&JSSVGClipPathElement::s_info)) return throwError(exec, TypeError); JSSVGClipPathElement* castedThisObj = static_cast(asObject(thisValue)); SVGClipPathElement* imp = static_cast(castedThisObj->impl()); const UString& extension = args.at(exec, 0)->toString(exec); JSC::JSValuePtr result = jsBoolean(imp->hasExtension(extension)); return result; } JSValuePtr jsSVGClipPathElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args) { if (!thisValue->isObject(&JSSVGClipPathElement::s_info)) return throwError(exec, TypeError); JSSVGClipPathElement* castedThisObj = static_cast(asObject(thisValue)); SVGClipPathElement* imp = static_cast(castedThisObj->impl()); const UString& name = args.at(exec, 0)->toString(exec); JSC::JSValuePtr result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name))); return result; } JSValuePtr jsSVGClipPathElementPrototypeFunctionGetBBox(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args) { if (!thisValue->isObject(&JSSVGClipPathElement::s_info)) return throwError(exec, TypeError); JSSVGClipPathElement* castedThisObj = static_cast(asObject(thisValue)); SVGClipPathElement* imp = static_cast(castedThisObj->impl()); JSC::JSValuePtr result = toJS(exec, JSSVGStaticPODTypeWrapper::create(imp->getBBox()).get(), imp); return result; } JSValuePtr jsSVGClipPathElementPrototypeFunctionGetCTM(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args) { if (!thisValue->isObject(&JSSVGClipPathElement::s_info)) return throwError(exec, TypeError); JSSVGClipPathElement* castedThisObj = static_cast(asObject(thisValue)); SVGClipPathElement* imp = static_cast(castedThisObj->impl()); JSC::JSValuePtr result = toJS(exec, JSSVGStaticPODTypeWrapper::create(imp->getCTM()).get(), imp); return result; } JSValuePtr jsSVGClipPathElementPrototypeFunctionGetScreenCTM(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args) { if (!thisValue->isObject(&JSSVGClipPathElement::s_info)) return throwError(exec, TypeError); JSSVGClipPathElement* castedThisObj = static_cast(asObject(thisValue)); SVGClipPathElement* imp = static_cast(castedThisObj->impl()); JSC::JSValuePtr result = toJS(exec, JSSVGStaticPODTypeWrapper::create(imp->getScreenCTM()).get(), imp); return result; } JSValuePtr jsSVGClipPathElementPrototypeFunctionGetTransformToElement(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args) { if (!thisValue->isObject(&JSSVGClipPathElement::s_info)) return throwError(exec, TypeError); JSSVGClipPathElement* castedThisObj = static_cast(asObject(thisValue)); SVGClipPathElement* imp = static_cast(castedThisObj->impl()); ExceptionCode ec = 0; SVGElement* element = toSVGElement(args.at(exec, 0)); JSC::JSValuePtr result = toJS(exec, JSSVGStaticPODTypeWrapper::create(imp->getTransformToElement(element, ec)).get(), imp); setDOMException(exec, ec); return result; } } #endif // ENABLE(SVG)