/* 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) && ENABLE(FILTERS) #include "JSSVGFEFloodElement.h" #include "CSSMutableStyleDeclaration.h" #include "CSSStyleDeclaration.h" #include "CSSValue.h" #include "JSCSSStyleDeclaration.h" #include "JSCSSValue.h" #include "JSSVGAnimatedLength.h" #include "JSSVGAnimatedString.h" #include "SVGFEFloodElement.h" #include #include using namespace JSC; namespace WebCore { ASSERT_CLASS_FITS_IN_CELL(JSSVGFEFloodElement); /* Hash table */ static const HashTableValue JSSVGFEFloodElementTableValues[10] = { { "in1", DontDelete|ReadOnly, (intptr_t)jsSVGFEFloodElementIn1, (intptr_t)0 }, { "x", DontDelete|ReadOnly, (intptr_t)jsSVGFEFloodElementX, (intptr_t)0 }, { "y", DontDelete|ReadOnly, (intptr_t)jsSVGFEFloodElementY, (intptr_t)0 }, { "width", DontDelete|ReadOnly, (intptr_t)jsSVGFEFloodElementWidth, (intptr_t)0 }, { "height", DontDelete|ReadOnly, (intptr_t)jsSVGFEFloodElementHeight, (intptr_t)0 }, { "result", DontDelete|ReadOnly, (intptr_t)jsSVGFEFloodElementResult, (intptr_t)0 }, { "className", DontDelete|ReadOnly, (intptr_t)jsSVGFEFloodElementClassName, (intptr_t)0 }, { "style", DontDelete|ReadOnly, (intptr_t)jsSVGFEFloodElementStyle, (intptr_t)0 }, { "constructor", DontEnum|ReadOnly, (intptr_t)jsSVGFEFloodElementConstructor, (intptr_t)0 }, { 0, 0, 0, 0 } }; static JSC_CONST_HASHTABLE HashTable JSSVGFEFloodElementTable = #if ENABLE(PERFECT_HASH_SIZE) { 255, JSSVGFEFloodElementTableValues, 0 }; #else { 34, 31, JSSVGFEFloodElementTableValues, 0 }; #endif /* Hash table for constructor */ static const HashTableValue JSSVGFEFloodElementConstructorTableValues[1] = { { 0, 0, 0, 0 } }; static JSC_CONST_HASHTABLE HashTable JSSVGFEFloodElementConstructorTable = #if ENABLE(PERFECT_HASH_SIZE) { 0, JSSVGFEFloodElementConstructorTableValues, 0 }; #else { 1, 0, JSSVGFEFloodElementConstructorTableValues, 0 }; #endif class JSSVGFEFloodElementConstructor : public DOMConstructorObject { public: JSSVGFEFloodElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) : DOMConstructorObject(JSSVGFEFloodElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) { putDirect(exec->propertyNames().prototype, JSSVGFEFloodElementPrototype::self(exec, globalObject), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } static const ClassInfo s_info; static PassRefPtr createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance)); } }; const ClassInfo JSSVGFEFloodElementConstructor::s_info = { "SVGFEFloodElementConstructor", 0, &JSSVGFEFloodElementConstructorTable, 0 }; bool JSSVGFEFloodElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { return getStaticValueSlot(exec, &JSSVGFEFloodElementConstructorTable, this, propertyName, slot); } /* Hash table for prototype */ static const HashTableValue JSSVGFEFloodElementPrototypeTableValues[2] = { { "getPresentationAttribute", DontDelete|Function, (intptr_t)jsSVGFEFloodElementPrototypeFunctionGetPresentationAttribute, (intptr_t)1 }, { 0, 0, 0, 0 } }; static JSC_CONST_HASHTABLE HashTable JSSVGFEFloodElementPrototypeTable = #if ENABLE(PERFECT_HASH_SIZE) { 0, JSSVGFEFloodElementPrototypeTableValues, 0 }; #else { 2, 1, JSSVGFEFloodElementPrototypeTableValues, 0 }; #endif const ClassInfo JSSVGFEFloodElementPrototype::s_info = { "SVGFEFloodElementPrototype", 0, &JSSVGFEFloodElementPrototypeTable, 0 }; JSObject* JSSVGFEFloodElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) { return getDOMPrototype(exec, globalObject); } bool JSSVGFEFloodElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { return getStaticFunctionSlot(exec, &JSSVGFEFloodElementPrototypeTable, this, propertyName, slot); } const ClassInfo JSSVGFEFloodElement::s_info = { "SVGFEFloodElement", &JSSVGElement::s_info, &JSSVGFEFloodElementTable, 0 }; JSSVGFEFloodElement::JSSVGFEFloodElement(PassRefPtr structure, JSDOMGlobalObject* globalObject, PassRefPtr impl) : JSSVGElement(structure, globalObject, impl) { } JSObject* JSSVGFEFloodElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) { return new (exec) JSSVGFEFloodElementPrototype(JSSVGFEFloodElementPrototype::createStructure(JSSVGElementPrototype::self(exec, globalObject))); } bool JSSVGFEFloodElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { return getStaticValueSlot(exec, &JSSVGFEFloodElementTable, this, propertyName, slot); } JSValue jsSVGFEFloodElementIn1(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSSVGFEFloodElement* castedThis = static_cast(asObject(slot.slotBase())); UNUSED_PARAM(exec); SVGFEFloodElement* imp = static_cast(castedThis->impl()); RefPtr obj = imp->in1Animated(); return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEFloodElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSSVGFEFloodElement* castedThis = static_cast(asObject(slot.slotBase())); UNUSED_PARAM(exec); SVGFEFloodElement* imp = static_cast(castedThis->impl()); RefPtr obj = imp->xAnimated(); return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEFloodElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSSVGFEFloodElement* castedThis = static_cast(asObject(slot.slotBase())); UNUSED_PARAM(exec); SVGFEFloodElement* imp = static_cast(castedThis->impl()); RefPtr obj = imp->yAnimated(); return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEFloodElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSSVGFEFloodElement* castedThis = static_cast(asObject(slot.slotBase())); UNUSED_PARAM(exec); SVGFEFloodElement* imp = static_cast(castedThis->impl()); RefPtr obj = imp->widthAnimated(); return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEFloodElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSSVGFEFloodElement* castedThis = static_cast(asObject(slot.slotBase())); UNUSED_PARAM(exec); SVGFEFloodElement* imp = static_cast(castedThis->impl()); RefPtr obj = imp->heightAnimated(); return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEFloodElementResult(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSSVGFEFloodElement* castedThis = static_cast(asObject(slot.slotBase())); UNUSED_PARAM(exec); SVGFEFloodElement* imp = static_cast(castedThis->impl()); RefPtr obj = imp->resultAnimated(); return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEFloodElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSSVGFEFloodElement* castedThis = static_cast(asObject(slot.slotBase())); UNUSED_PARAM(exec); SVGFEFloodElement* imp = static_cast(castedThis->impl()); RefPtr obj = imp->classNameAnimated(); return toJS(exec, castedThis->globalObject(), obj.get(), imp); } JSValue jsSVGFEFloodElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSSVGFEFloodElement* castedThis = static_cast(asObject(slot.slotBase())); UNUSED_PARAM(exec); SVGFEFloodElement* imp = static_cast(castedThis->impl()); return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); } JSValue jsSVGFEFloodElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { JSSVGFEFloodElement* domObject = static_cast(asObject(slot.slotBase())); return JSSVGFEFloodElement::getConstructor(exec, domObject->globalObject()); } JSValue JSSVGFEFloodElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { return getDOMConstructor(exec, static_cast(globalObject)); } JSValue JSC_HOST_CALL jsSVGFEFloodElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); if (!thisValue.isObject(&JSSVGFEFloodElement::s_info)) return throwError(exec, TypeError); JSSVGFEFloodElement* castedThisObj = static_cast(asObject(thisValue)); SVGFEFloodElement* imp = static_cast(castedThisObj->impl()); const UString& name = args.at(0).toString(exec); JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return result; } } #endif // ENABLE(SVG) && ENABLE(FILTERS)