/* 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 "JSSVGFEDisplacementMapElement.h" #include "CSSMutableStyleDeclaration.h" #include "CSSStyleDeclaration.h" #include "CSSValue.h" #include "ExceptionCode.h" #include "JSCSSStyleDeclaration.h" #include "JSCSSValue.h" #include "JSDOMBinding.h" #include "JSSVGAnimatedEnumeration.h" #include "JSSVGAnimatedLength.h" #include "JSSVGAnimatedNumber.h" #include "JSSVGAnimatedString.h" #include "SVGFEDisplacementMapElement.h" #include #include using namespace JSC; namespace WebCore { ASSERT_CLASS_FITS_IN_CELL(JSSVGFEDisplacementMapElement); /* Hash table */ #if ENABLE(JIT) #define THUNK_GENERATOR(generator) , generator #else #define THUNK_GENERATOR(generator) #endif static const HashTableValue JSSVGFEDisplacementMapElementTableValues[14] = { { "in1", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementIn1), (intptr_t)0 THUNK_GENERATOR(0) }, { "in2", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementIn2), (intptr_t)0 THUNK_GENERATOR(0) }, { "scale", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementScale), (intptr_t)0 THUNK_GENERATOR(0) }, { "xChannelSelector", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementXChannelSelector), (intptr_t)0 THUNK_GENERATOR(0) }, { "yChannelSelector", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementYChannelSelector), (intptr_t)0 THUNK_GENERATOR(0) }, { "x", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementX), (intptr_t)0 THUNK_GENERATOR(0) }, { "y", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementY), (intptr_t)0 THUNK_GENERATOR(0) }, { "width", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementWidth), (intptr_t)0 THUNK_GENERATOR(0) }, { "height", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementHeight), (intptr_t)0 THUNK_GENERATOR(0) }, { "result", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementResult), (intptr_t)0 THUNK_GENERATOR(0) }, { "className", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementClassName), (intptr_t)0 THUNK_GENERATOR(0) }, { "style", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementStyle), (intptr_t)0 THUNK_GENERATOR(0) }, { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, { 0, 0, 0, 0 THUNK_GENERATOR(0) } }; #undef THUNK_GENERATOR static JSC_CONST_HASHTABLE HashTable JSSVGFEDisplacementMapElementTable = { 36, 31, JSSVGFEDisplacementMapElementTableValues, 0 }; /* Hash table for constructor */ #if ENABLE(JIT) #define THUNK_GENERATOR(generator) , generator #else #define THUNK_GENERATOR(generator) #endif static const HashTableValue JSSVGFEDisplacementMapElementConstructorTableValues[6] = { { "SVG_CHANNEL_UNKNOWN", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementSVG_CHANNEL_UNKNOWN), (intptr_t)0 THUNK_GENERATOR(0) }, { "SVG_CHANNEL_R", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementSVG_CHANNEL_R), (intptr_t)0 THUNK_GENERATOR(0) }, { "SVG_CHANNEL_G", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementSVG_CHANNEL_G), (intptr_t)0 THUNK_GENERATOR(0) }, { "SVG_CHANNEL_B", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementSVG_CHANNEL_B), (intptr_t)0 THUNK_GENERATOR(0) }, { "SVG_CHANNEL_A", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementSVG_CHANNEL_A), (intptr_t)0 THUNK_GENERATOR(0) }, { 0, 0, 0, 0 THUNK_GENERATOR(0) } }; #undef THUNK_GENERATOR static JSC_CONST_HASHTABLE HashTable JSSVGFEDisplacementMapElementConstructorTable = { 16, 15, JSSVGFEDisplacementMapElementConstructorTableValues, 0 }; class JSSVGFEDisplacementMapElementConstructor : public DOMConstructorObject { public: JSSVGFEDisplacementMapElementConstructor(JSC::ExecState*, JSC::Structure*, JSDOMGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); static const JSC::ClassInfo s_info; static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype) { return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info); } protected: static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; }; const ClassInfo JSSVGFEDisplacementMapElementConstructor::s_info = { "SVGFEDisplacementMapElementConstructor", &DOMConstructorObject::s_info, &JSSVGFEDisplacementMapElementConstructorTable, 0 }; JSSVGFEDisplacementMapElementConstructor::JSSVGFEDisplacementMapElementConstructor(ExecState* exec, Structure* structure, JSDOMGlobalObject* globalObject) : DOMConstructorObject(structure, globalObject) { ASSERT(inherits(&s_info)); putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGFEDisplacementMapElementPrototype::self(exec, globalObject), DontDelete | ReadOnly); } bool JSSVGFEDisplacementMapElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { return getStaticValueSlot(exec, &JSSVGFEDisplacementMapElementConstructorTable, this, propertyName, slot); } bool JSSVGFEDisplacementMapElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) { return getStaticValueDescriptor(exec, &JSSVGFEDisplacementMapElementConstructorTable, this, propertyName, descriptor); } /* Hash table for prototype */ #if ENABLE(JIT) #define THUNK_GENERATOR(generator) , generator #else #define THUNK_GENERATOR(generator) #endif static const HashTableValue JSSVGFEDisplacementMapElementPrototypeTableValues[7] = { { "SVG_CHANNEL_UNKNOWN", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementSVG_CHANNEL_UNKNOWN), (intptr_t)0 THUNK_GENERATOR(0) }, { "SVG_CHANNEL_R", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementSVG_CHANNEL_R), (intptr_t)0 THUNK_GENERATOR(0) }, { "SVG_CHANNEL_G", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementSVG_CHANNEL_G), (intptr_t)0 THUNK_GENERATOR(0) }, { "SVG_CHANNEL_B", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementSVG_CHANNEL_B), (intptr_t)0 THUNK_GENERATOR(0) }, { "SVG_CHANNEL_A", DontDelete | ReadOnly, (intptr_t)static_cast(jsSVGFEDisplacementMapElementSVG_CHANNEL_A), (intptr_t)0 THUNK_GENERATOR(0) }, { "getPresentationAttribute", DontDelete | Function, (intptr_t)static_cast(jsSVGFEDisplacementMapElementPrototypeFunctionGetPresentationAttribute), (intptr_t)1 THUNK_GENERATOR(0) }, { 0, 0, 0, 0 THUNK_GENERATOR(0) } }; #undef THUNK_GENERATOR static JSC_CONST_HASHTABLE HashTable JSSVGFEDisplacementMapElementPrototypeTable = { 16, 15, JSSVGFEDisplacementMapElementPrototypeTableValues, 0 }; const ClassInfo JSSVGFEDisplacementMapElementPrototype::s_info = { "SVGFEDisplacementMapElementPrototype", &JSC::JSObjectWithGlobalObject::s_info, &JSSVGFEDisplacementMapElementPrototypeTable, 0 }; JSObject* JSSVGFEDisplacementMapElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) { return getDOMPrototype(exec, globalObject); } bool JSSVGFEDisplacementMapElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { return getStaticPropertySlot(exec, &JSSVGFEDisplacementMapElementPrototypeTable, this, propertyName, slot); } bool JSSVGFEDisplacementMapElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) { return getStaticPropertyDescriptor(exec, &JSSVGFEDisplacementMapElementPrototypeTable, this, propertyName, descriptor); } const ClassInfo JSSVGFEDisplacementMapElement::s_info = { "SVGFEDisplacementMapElement", &JSSVGElement::s_info, &JSSVGFEDisplacementMapElementTable, 0 }; JSSVGFEDisplacementMapElement::JSSVGFEDisplacementMapElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr impl) : JSSVGElement(structure, globalObject, impl) { ASSERT(inherits(&s_info)); } JSObject* JSSVGFEDisplacementMapElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) { return new (exec) JSSVGFEDisplacementMapElementPrototype(exec->globalData(), globalObject, JSSVGFEDisplacementMapElementPrototype::createStructure(exec->globalData(), JSSVGElementPrototype::self(exec, globalObject))); } bool JSSVGFEDisplacementMapElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { return getStaticValueSlot(exec, &JSSVGFEDisplacementMapElementTable, this, propertyName, slot); } bool JSSVGFEDisplacementMapElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) { return getStaticValueDescriptor(exec, &JSSVGFEDisplacementMapElementTable, this, propertyName, descriptor); } JSValue jsSVGFEDisplacementMapElementIn1(ExecState* exec, JSValue slotBase, const Identifier&) { JSSVGFEDisplacementMapElement* castedThis = static_cast(asObject(slotBase)); UNUSED_PARAM(exec); SVGFEDisplacementMapElement* imp = static_cast(castedThis->impl()); RefPtr obj = imp->in1Animated(); JSValue result = toJS(exec, castedThis->globalObject(), obj.get()); return result; } JSValue jsSVGFEDisplacementMapElementIn2(ExecState* exec, JSValue slotBase, const Identifier&) { JSSVGFEDisplacementMapElement* castedThis = static_cast(asObject(slotBase)); UNUSED_PARAM(exec); SVGFEDisplacementMapElement* imp = static_cast(castedThis->impl()); RefPtr obj = imp->in2Animated(); JSValue result = toJS(exec, castedThis->globalObject(), obj.get()); return result; } JSValue jsSVGFEDisplacementMapElementScale(ExecState* exec, JSValue slotBase, const Identifier&) { JSSVGFEDisplacementMapElement* castedThis = static_cast(asObject(slotBase)); UNUSED_PARAM(exec); SVGFEDisplacementMapElement* imp = static_cast(castedThis->impl()); RefPtr obj = imp->scaleAnimated(); JSValue result = toJS(exec, castedThis->globalObject(), obj.get()); return result; } JSValue jsSVGFEDisplacementMapElementXChannelSelector(ExecState* exec, JSValue slotBase, const Identifier&) { JSSVGFEDisplacementMapElement* castedThis = static_cast(asObject(slotBase)); UNUSED_PARAM(exec); SVGFEDisplacementMapElement* imp = static_cast(castedThis->impl()); RefPtr obj = imp->xChannelSelectorAnimated(); JSValue result = toJS(exec, castedThis->globalObject(), obj.get()); return result; } JSValue jsSVGFEDisplacementMapElementYChannelSelector(ExecState* exec, JSValue slotBase, const Identifier&) { JSSVGFEDisplacementMapElement* castedThis = static_cast(asObject(slotBase)); UNUSED_PARAM(exec); SVGFEDisplacementMapElement* imp = static_cast(castedThis->impl()); RefPtr obj = imp->yChannelSelectorAnimated(); JSValue result = toJS(exec, castedThis->globalObject(), obj.get()); return result; } JSValue jsSVGFEDisplacementMapElementX(ExecState* exec, JSValue slotBase, const Identifier&) { JSSVGFEDisplacementMapElement* castedThis = static_cast(asObject(slotBase)); UNUSED_PARAM(exec); SVGFEDisplacementMapElement* imp = static_cast(castedThis->impl()); RefPtr obj = imp->xAnimated(); JSValue result = toJS(exec, castedThis->globalObject(), obj.get()); return result; } JSValue jsSVGFEDisplacementMapElementY(ExecState* exec, JSValue slotBase, const Identifier&) { JSSVGFEDisplacementMapElement* castedThis = static_cast(asObject(slotBase)); UNUSED_PARAM(exec); SVGFEDisplacementMapElement* imp = static_cast(castedThis->impl()); RefPtr obj = imp->yAnimated(); JSValue result = toJS(exec, castedThis->globalObject(), obj.get()); return result; } JSValue jsSVGFEDisplacementMapElementWidth(ExecState* exec, JSValue slotBase, const Identifier&) { JSSVGFEDisplacementMapElement* castedThis = static_cast(asObject(slotBase)); UNUSED_PARAM(exec); SVGFEDisplacementMapElement* imp = static_cast(castedThis->impl()); RefPtr obj = imp->widthAnimated(); JSValue result = toJS(exec, castedThis->globalObject(), obj.get()); return result; } JSValue jsSVGFEDisplacementMapElementHeight(ExecState* exec, JSValue slotBase, const Identifier&) { JSSVGFEDisplacementMapElement* castedThis = static_cast(asObject(slotBase)); UNUSED_PARAM(exec); SVGFEDisplacementMapElement* imp = static_cast(castedThis->impl()); RefPtr obj = imp->heightAnimated(); JSValue result = toJS(exec, castedThis->globalObject(), obj.get()); return result; } JSValue jsSVGFEDisplacementMapElementResult(ExecState* exec, JSValue slotBase, const Identifier&) { JSSVGFEDisplacementMapElement* castedThis = static_cast(asObject(slotBase)); UNUSED_PARAM(exec); SVGFEDisplacementMapElement* imp = static_cast(castedThis->impl()); RefPtr obj = imp->resultAnimated(); JSValue result = toJS(exec, castedThis->globalObject(), obj.get()); return result; } JSValue jsSVGFEDisplacementMapElementClassName(ExecState* exec, JSValue slotBase, const Identifier&) { JSSVGFEDisplacementMapElement* castedThis = static_cast(asObject(slotBase)); UNUSED_PARAM(exec); SVGFEDisplacementMapElement* imp = static_cast(castedThis->impl()); RefPtr obj = imp->classNameAnimated(); JSValue result = toJS(exec, castedThis->globalObject(), obj.get()); return result; } JSValue jsSVGFEDisplacementMapElementStyle(ExecState* exec, JSValue slotBase, const Identifier&) { JSSVGFEDisplacementMapElement* castedThis = static_cast(asObject(slotBase)); UNUSED_PARAM(exec); SVGFEDisplacementMapElement* imp = static_cast(castedThis->impl()); JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); return result; } JSValue jsSVGFEDisplacementMapElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) { JSSVGFEDisplacementMapElement* domObject = static_cast(asObject(slotBase)); return JSSVGFEDisplacementMapElement::getConstructor(exec, domObject->globalObject()); } JSValue JSSVGFEDisplacementMapElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) { return getDOMConstructor(exec, static_cast(globalObject)); } EncodedJSValue JSC_HOST_CALL jsSVGFEDisplacementMapElementPrototypeFunctionGetPresentationAttribute(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSSVGFEDisplacementMapElement::s_info)) return throwVMTypeError(exec); JSSVGFEDisplacementMapElement* castedThis = static_cast(asObject(thisValue)); SVGFEDisplacementMapElement* imp = static_cast(castedThis->impl()); const String& name(ustringToString(exec->argument(0).toString(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); return JSValue::encode(result); } // Constant getters JSValue jsSVGFEDisplacementMapElementSVG_CHANNEL_UNKNOWN(ExecState* exec, JSValue, const Identifier&) { UNUSED_PARAM(exec); return jsNumber(static_cast(0)); } JSValue jsSVGFEDisplacementMapElementSVG_CHANNEL_R(ExecState* exec, JSValue, const Identifier&) { UNUSED_PARAM(exec); return jsNumber(static_cast(1)); } JSValue jsSVGFEDisplacementMapElementSVG_CHANNEL_G(ExecState* exec, JSValue, const Identifier&) { UNUSED_PARAM(exec); return jsNumber(static_cast(2)); } JSValue jsSVGFEDisplacementMapElementSVG_CHANNEL_B(ExecState* exec, JSValue, const Identifier&) { UNUSED_PARAM(exec); return jsNumber(static_cast(3)); } JSValue jsSVGFEDisplacementMapElementSVG_CHANNEL_A(ExecState* exec, JSValue, const Identifier&) { UNUSED_PARAM(exec); return jsNumber(static_cast(4)); } } #endif // ENABLE(SVG) && ENABLE(FILTERS)