2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
23 #if ENABLE(FILTERS) && ENABLE(SVG)
25 #include "JSSVGFEFloodElement.h"
27 #include "CSSMutableStyleDeclaration.h"
28 #include "CSSStyleDeclaration.h"
30 #include "ExceptionCode.h"
31 #include "JSCSSStyleDeclaration.h"
32 #include "JSCSSValue.h"
33 #include "JSDOMBinding.h"
34 #include "JSSVGAnimatedLength.h"
35 #include "JSSVGAnimatedString.h"
36 #include "SVGFEFloodElement.h"
37 #include <runtime/Error.h>
38 #include <wtf/GetPtr.h>
44 ASSERT_CLASS_FITS_IN_CELL(JSSVGFEFloodElement);
48 #define THUNK_GENERATOR(generator) , generator
50 #define THUNK_GENERATOR(generator)
53 #define INTRINSIC(intrinsic) , intrinsic
55 #define INTRINSIC(intrinsic)
58 static const HashTableValue JSSVGFEFloodElementTableValues[] =
60 { "x", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEFloodElementX), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
61 { "y", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEFloodElementY), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
62 { "width", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEFloodElementWidth), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
63 { "height", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEFloodElementHeight), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
64 { "result", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEFloodElementResult), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
65 { "className", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEFloodElementClassName), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
66 { "style", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEFloodElementStyle), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
67 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEFloodElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
68 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
71 #undef THUNK_GENERATOR
72 static const HashTable JSSVGFEFloodElementTable = { 18, 15, JSSVGFEFloodElementTableValues, 0 };
73 /* Hash table for constructor */
75 #define THUNK_GENERATOR(generator) , generator
77 #define THUNK_GENERATOR(generator)
80 #define INTRINSIC(intrinsic) , intrinsic
82 #define INTRINSIC(intrinsic)
85 static const HashTableValue JSSVGFEFloodElementConstructorTableValues[] =
87 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
90 #undef THUNK_GENERATOR
91 static const HashTable JSSVGFEFloodElementConstructorTable = { 1, 0, JSSVGFEFloodElementConstructorTableValues, 0 };
92 const ClassInfo JSSVGFEFloodElementConstructor::s_info = { "SVGFEFloodElementConstructor", &DOMConstructorObject::s_info, &JSSVGFEFloodElementConstructorTable, 0, CREATE_METHOD_TABLE(JSSVGFEFloodElementConstructor) };
94 JSSVGFEFloodElementConstructor::JSSVGFEFloodElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
95 : DOMConstructorObject(structure, globalObject)
99 void JSSVGFEFloodElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
101 Base::finishCreation(exec->globalData());
102 ASSERT(inherits(&s_info));
103 putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGFEFloodElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
106 bool JSSVGFEFloodElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
108 return getStaticValueSlot<JSSVGFEFloodElementConstructor, JSDOMWrapper>(exec, &JSSVGFEFloodElementConstructorTable, static_cast<JSSVGFEFloodElementConstructor*>(cell), propertyName, slot);
111 bool JSSVGFEFloodElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
113 return getStaticValueDescriptor<JSSVGFEFloodElementConstructor, JSDOMWrapper>(exec, &JSSVGFEFloodElementConstructorTable, static_cast<JSSVGFEFloodElementConstructor*>(object), propertyName, descriptor);
116 /* Hash table for prototype */
118 #define THUNK_GENERATOR(generator) , generator
120 #define THUNK_GENERATOR(generator)
123 #define INTRINSIC(intrinsic) , intrinsic
125 #define INTRINSIC(intrinsic)
128 static const HashTableValue JSSVGFEFloodElementPrototypeTableValues[] =
130 { "getPresentationAttribute", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGFEFloodElementPrototypeFunctionGetPresentationAttribute), (intptr_t)1 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
131 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
134 #undef THUNK_GENERATOR
135 static const HashTable JSSVGFEFloodElementPrototypeTable = { 2, 1, JSSVGFEFloodElementPrototypeTableValues, 0 };
136 const ClassInfo JSSVGFEFloodElementPrototype::s_info = { "SVGFEFloodElementPrototype", &JSC::JSNonFinalObject::s_info, &JSSVGFEFloodElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSSVGFEFloodElementPrototype) };
138 JSObject* JSSVGFEFloodElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
140 return getDOMPrototype<JSSVGFEFloodElement>(exec, globalObject);
143 bool JSSVGFEFloodElementPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
145 JSSVGFEFloodElementPrototype* thisObject = jsCast<JSSVGFEFloodElementPrototype*>(cell);
146 return getStaticFunctionSlot<JSObject>(exec, &JSSVGFEFloodElementPrototypeTable, thisObject, propertyName, slot);
149 bool JSSVGFEFloodElementPrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
151 JSSVGFEFloodElementPrototype* thisObject = jsCast<JSSVGFEFloodElementPrototype*>(object);
152 return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGFEFloodElementPrototypeTable, thisObject, propertyName, descriptor);
155 const ClassInfo JSSVGFEFloodElement::s_info = { "SVGFEFloodElement", &JSSVGElement::s_info, &JSSVGFEFloodElementTable, 0 , CREATE_METHOD_TABLE(JSSVGFEFloodElement) };
157 JSSVGFEFloodElement::JSSVGFEFloodElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEFloodElement> impl)
158 : JSSVGElement(structure, globalObject, impl)
162 void JSSVGFEFloodElement::finishCreation(JSGlobalData& globalData)
164 Base::finishCreation(globalData);
165 ASSERT(inherits(&s_info));
168 JSObject* JSSVGFEFloodElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
170 return JSSVGFEFloodElementPrototype::create(exec->globalData(), globalObject, JSSVGFEFloodElementPrototype::createStructure(exec->globalData(), globalObject, JSSVGElementPrototype::self(exec, globalObject)));
173 bool JSSVGFEFloodElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
175 JSSVGFEFloodElement* thisObject = jsCast<JSSVGFEFloodElement*>(cell);
176 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
177 return getStaticValueSlot<JSSVGFEFloodElement, Base>(exec, &JSSVGFEFloodElementTable, thisObject, propertyName, slot);
180 bool JSSVGFEFloodElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
182 JSSVGFEFloodElement* thisObject = jsCast<JSSVGFEFloodElement*>(object);
183 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
184 return getStaticValueDescriptor<JSSVGFEFloodElement, Base>(exec, &JSSVGFEFloodElementTable, thisObject, propertyName, descriptor);
187 JSValue jsSVGFEFloodElementX(ExecState* exec, JSValue slotBase, const Identifier&)
189 JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slotBase));
191 SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl());
192 RefPtr<SVGAnimatedLength> obj = imp->xAnimated();
193 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
198 JSValue jsSVGFEFloodElementY(ExecState* exec, JSValue slotBase, const Identifier&)
200 JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slotBase));
202 SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl());
203 RefPtr<SVGAnimatedLength> obj = imp->yAnimated();
204 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
209 JSValue jsSVGFEFloodElementWidth(ExecState* exec, JSValue slotBase, const Identifier&)
211 JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slotBase));
213 SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl());
214 RefPtr<SVGAnimatedLength> obj = imp->widthAnimated();
215 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
220 JSValue jsSVGFEFloodElementHeight(ExecState* exec, JSValue slotBase, const Identifier&)
222 JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slotBase));
224 SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl());
225 RefPtr<SVGAnimatedLength> obj = imp->heightAnimated();
226 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
231 JSValue jsSVGFEFloodElementResult(ExecState* exec, JSValue slotBase, const Identifier&)
233 JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slotBase));
235 SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl());
236 RefPtr<SVGAnimatedString> obj = imp->resultAnimated();
237 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
242 JSValue jsSVGFEFloodElementClassName(ExecState* exec, JSValue slotBase, const Identifier&)
244 JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slotBase));
246 SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl());
247 RefPtr<SVGAnimatedString> obj = imp->classNameAnimated();
248 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
253 JSValue jsSVGFEFloodElementStyle(ExecState* exec, JSValue slotBase, const Identifier&)
255 JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slotBase));
257 SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl());
258 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style()));
263 JSValue jsSVGFEFloodElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
265 JSSVGFEFloodElement* domObject = static_cast<JSSVGFEFloodElement*>(asObject(slotBase));
266 return JSSVGFEFloodElement::getConstructor(exec, domObject->globalObject());
269 JSValue JSSVGFEFloodElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
271 return getDOMConstructor<JSSVGFEFloodElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
274 EncodedJSValue JSC_HOST_CALL jsSVGFEFloodElementPrototypeFunctionGetPresentationAttribute(ExecState* exec)
276 JSValue thisValue = exec->hostThisValue();
277 if (!thisValue.inherits(&JSSVGFEFloodElement::s_info))
278 return throwVMTypeError(exec);
279 JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(thisValue));
280 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGFEFloodElement::s_info);
281 SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl());
282 const String& name(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)));
283 if (exec->hadException())
284 return JSValue::encode(jsUndefined());
286 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name)));
287 return JSValue::encode(result);
293 #endif // ENABLE(FILTERS) && ENABLE(SVG)