/* 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(SVG_FILTERS) #include "SVGElement.h" #include "JSSVGFEBlendElement.h" #include #include "CSSMutableStyleDeclaration.h" #include "CSSStyleDeclaration.h" #include "CSSValue.h" #include "JSCSSStyleDeclaration.h" #include "JSCSSValue.h" #include "JSSVGAnimatedEnumeration.h" #include "JSSVGAnimatedLength.h" #include "JSSVGAnimatedString.h" #include "SVGFEBlendElement.h" #include #include using namespace JSC; namespace WebCore { ASSERT_CLASS_FITS_IN_CELL(JSSVGFEBlendElement) /* Hash table */ static const HashTableValue JSSVGFEBlendElementTableValues[12] = { { "in1", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementIn1, (intptr_t)0 }, { "in2", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementIn2, (intptr_t)0 }, { "mode", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementMode, (intptr_t)0 }, { "x", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementX, (intptr_t)0 }, { "y", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementY, (intptr_t)0 }, { "width", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementWidth, (intptr_t)0 }, { "height", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementHeight, (intptr_t)0 }, { "result", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementResult, (intptr_t)0 }, { "className", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementClassName, (intptr_t)0 }, { "style", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementStyle, (intptr_t)0 }, { "constructor", DontEnum|ReadOnly, (intptr_t)jsSVGFEBlendElementConstructor, (intptr_t)0 }, { 0, 0, 0, 0 } }; static const HashTable JSSVGFEBlendElementTable = #if ENABLE(PERFECT_HASH_SIZE) { 255, JSSVGFEBlendElementTableValues, 0 }; #else { 35, 31, JSSVGFEBlendElementTableValues, 0 }; #endif /* Hash table for constructor */ static const HashTableValue JSSVGFEBlendElementConstructorTableValues[7] = { { "SVG_FEBLEND_MODE_UNKNOWN", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementSVG_FEBLEND_MODE_UNKNOWN, (intptr_t)0 }, { "SVG_FEBLEND_MODE_NORMAL", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementSVG_FEBLEND_MODE_NORMAL, (intptr_t)0 }, { "SVG_FEBLEND_MODE_MULTIPLY", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementSVG_FEBLEND_MODE_MULTIPLY, (intptr_t)0 }, { "SVG_FEBLEND_MODE_SCREEN", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementSVG_FEBLEND_MODE_SCREEN, (intptr_t)0 }, { "SVG_FEBLEND_MODE_DARKEN", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementSVG_FEBLEND_MODE_DARKEN, (intptr_t)0 }, { "SVG_FEBLEND_MODE_LIGHTEN", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementSVG_FEBLEND_MODE_LIGHTEN, (intptr_t)0 }, { 0, 0, 0, 0 } }; static const HashTable JSSVGFEBlendElementConstructorTable = #if ENABLE(PERFECT_HASH_SIZE) { 15, JSSVGFEBlendElementConstructorTableValues, 0 }; #else { 16, 15, JSSVGFEBlendElementConstructorTableValues, 0 }; #endif class JSSVGFEBlendElementConstructor : public DOMObject { public: JSSVGFEBlendElementConstructor(ExecState* exec) : DOMObject(JSSVGFEBlendElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) { putDirect(exec->propertyNames().prototype, JSSVGFEBlendElementPrototype::self(exec, exec->lexicalGlobalObject()), None); } virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual const ClassInfo* classInfo() const { return &s_info; } static const ClassInfo s_info; static PassRefPtr createStructure(JSValuePtr proto) { return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance)); } }; const ClassInfo JSSVGFEBlendElementConstructor::s_info = { "SVGFEBlendElementConstructor", 0, &JSSVGFEBlendElementConstructorTable, 0 }; bool JSSVGFEBlendElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { return getStaticValueSlot(exec, &JSSVGFEBlendElementConstructorTable, this, propertyName, slot); } /* Hash table for prototype */ static const HashTableValue JSSVGFEBlendElementPrototypeTableValues[8] = { { "SVG_FEBLEND_MODE_UNKNOWN", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementSVG_FEBLEND_MODE_UNKNOWN, (intptr_t)0 }, { "SVG_FEBLEND_MODE_NORMAL", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementSVG_FEBLEND_MODE_NORMAL, (intptr_t)0 }, { "SVG_FEBLEND_MODE_MULTIPLY", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementSVG_FEBLEND_MODE_MULTIPLY, (intptr_t)0 }, { "SVG_FEBLEND_MODE_SCREEN", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementSVG_FEBLEND_MODE_SCREEN, (intptr_t)0 }, { "SVG_FEBLEND_MODE_DARKEN", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementSVG_FEBLEND_MODE_DARKEN, (intptr_t)0 }, { "SVG_FEBLEND_MODE_LIGHTEN", DontDelete|ReadOnly, (intptr_t)jsSVGFEBlendElementSVG_FEBLEND_MODE_LIGHTEN, (intptr_t)0 }, { "getPresentationAttribute", DontDelete|Function, (intptr_t)jsSVGFEBlendElementPrototypeFunctionGetPresentationAttribute, (intptr_t)1 }, { 0, 0, 0, 0 } }; static const HashTable JSSVGFEBlendElementPrototypeTable = #if ENABLE(PERFECT_HASH_SIZE) { 15, JSSVGFEBlendElementPrototypeTableValues, 0 }; #else { 16, 15, JSSVGFEBlendElementPrototypeTableValues, 0 }; #endif const ClassInfo JSSVGFEBlendElementPrototype::s_info = { "SVGFEBlendElementPrototype", 0, &JSSVGFEBlendElementPrototypeTable, 0 }; JSObject* JSSVGFEBlendElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) { return getDOMPrototype(exec, globalObject); } bool JSSVGFEBlendElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { return getStaticPropertySlot(exec, &JSSVGFEBlendElementPrototypeTable, this, propertyName, slot); } const ClassInfo JSSVGFEBlendElement::s_info = { "SVGFEBlendElement", &JSSVGElement::s_info, &JSSVGFEBlendElementTable, 0 }; JSSVGFEBlendElement::JSSVGFEBlendElement(PassRefPtr structure, PassRefPtr impl) : JSSVGElement(structure, impl) { } JSObject* JSSVGFEBlendElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) { return new (exec) JSSVGFEBlendElementPrototype(JSSVGFEBlendElementPrototype::createStructure(JSSVGElementPrototype::self(exec, globalObject))); } bool JSSVGFEBlendElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { return getStaticValueSlot(exec, &JSSVGFEBlendElementTable, this, propertyName, slot); } JSValuePtr jsSVGFEBlendElementIn1(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGFEBlendElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); RefPtr obj = imp->in1Animated(); return toJS(exec, obj.get(), imp); } JSValuePtr jsSVGFEBlendElementIn2(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGFEBlendElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); RefPtr obj = imp->in2Animated(); return toJS(exec, obj.get(), imp); } JSValuePtr jsSVGFEBlendElementMode(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGFEBlendElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); RefPtr obj = imp->modeAnimated(); return toJS(exec, obj.get(), imp); } JSValuePtr jsSVGFEBlendElementX(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGFEBlendElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); RefPtr obj = imp->xAnimated(); return toJS(exec, obj.get(), imp); } JSValuePtr jsSVGFEBlendElementY(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGFEBlendElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); RefPtr obj = imp->yAnimated(); return toJS(exec, obj.get(), imp); } JSValuePtr jsSVGFEBlendElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGFEBlendElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); RefPtr obj = imp->widthAnimated(); return toJS(exec, obj.get(), imp); } JSValuePtr jsSVGFEBlendElementHeight(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGFEBlendElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); RefPtr obj = imp->heightAnimated(); return toJS(exec, obj.get(), imp); } JSValuePtr jsSVGFEBlendElementResult(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGFEBlendElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); RefPtr obj = imp->resultAnimated(); return toJS(exec, obj.get(), imp); } JSValuePtr jsSVGFEBlendElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGFEBlendElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); RefPtr obj = imp->classNameAnimated(); return toJS(exec, obj.get(), imp); } JSValuePtr jsSVGFEBlendElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot) { SVGFEBlendElement* imp = static_cast(static_cast(asObject(slot.slotBase()))->impl()); return toJS(exec, WTF::getPtr(imp->style())); } JSValuePtr jsSVGFEBlendElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) { return static_cast(asObject(slot.slotBase()))->getConstructor(exec); } JSValuePtr JSSVGFEBlendElement::getConstructor(ExecState* exec) { return getDOMConstructor(exec); } JSValuePtr jsSVGFEBlendElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args) { if (!thisValue->isObject(&JSSVGFEBlendElement::s_info)) return throwError(exec, TypeError); JSSVGFEBlendElement* castedThisObj = static_cast(asObject(thisValue)); SVGFEBlendElement* 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; } // Constant getters JSValuePtr jsSVGFEBlendElementSVG_FEBLEND_MODE_UNKNOWN(ExecState* exec, const Identifier&, const PropertySlot&) { return jsNumber(exec, static_cast(0)); } JSValuePtr jsSVGFEBlendElementSVG_FEBLEND_MODE_NORMAL(ExecState* exec, const Identifier&, const PropertySlot&) { return jsNumber(exec, static_cast(1)); } JSValuePtr jsSVGFEBlendElementSVG_FEBLEND_MODE_MULTIPLY(ExecState* exec, const Identifier&, const PropertySlot&) { return jsNumber(exec, static_cast(2)); } JSValuePtr jsSVGFEBlendElementSVG_FEBLEND_MODE_SCREEN(ExecState* exec, const Identifier&, const PropertySlot&) { return jsNumber(exec, static_cast(3)); } JSValuePtr jsSVGFEBlendElementSVG_FEBLEND_MODE_DARKEN(ExecState* exec, const Identifier&, const PropertySlot&) { return jsNumber(exec, static_cast(4)); } JSValuePtr jsSVGFEBlendElementSVG_FEBLEND_MODE_LIGHTEN(ExecState* exec, const Identifier&, const PropertySlot&) { return jsNumber(exec, static_cast(5)); } } #endif // ENABLE(SVG) && ENABLE(SVG_FILTERS)