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 "JSSVGFEImageElement.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 "JSSVGAnimatedBoolean.h"
35 #include "JSSVGAnimatedLength.h"
36 #include "JSSVGAnimatedPreserveAspectRatio.h"
37 #include "JSSVGAnimatedString.h"
39 #include "SVGFEImageElement.h"
40 #include <runtime/Error.h>
41 #include <runtime/JSString.h>
42 #include <wtf/GetPtr.h>
48 ASSERT_CLASS_FITS_IN_CELL(JSSVGFEImageElement);
52 #define THUNK_GENERATOR(generator) , generator
54 #define THUNK_GENERATOR(generator)
57 #define INTRINSIC(intrinsic) , intrinsic
59 #define INTRINSIC(intrinsic)
62 static const HashTableValue JSSVGFEImageElementTableValues[] =
64 { "preserveAspectRatio", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEImageElementPreserveAspectRatio), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
65 { "href", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEImageElementHref), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
66 { "xmllang", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEImageElementXmllang), (intptr_t)setJSSVGFEImageElementXmllang THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
67 { "xmlspace", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEImageElementXmlspace), (intptr_t)setJSSVGFEImageElementXmlspace THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
68 { "externalResourcesRequired", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEImageElementExternalResourcesRequired), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
69 { "x", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEImageElementX), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
70 { "y", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEImageElementY), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
71 { "width", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEImageElementWidth), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
72 { "height", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEImageElementHeight), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
73 { "result", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEImageElementResult), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
74 { "className", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEImageElementClassName), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
75 { "style", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEImageElementStyle), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
76 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEImageElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
77 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
80 #undef THUNK_GENERATOR
81 static const HashTable JSSVGFEImageElementTable = { 33, 31, JSSVGFEImageElementTableValues, 0 };
82 /* Hash table for constructor */
84 #define THUNK_GENERATOR(generator) , generator
86 #define THUNK_GENERATOR(generator)
89 #define INTRINSIC(intrinsic) , intrinsic
91 #define INTRINSIC(intrinsic)
94 static const HashTableValue JSSVGFEImageElementConstructorTableValues[] =
96 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
99 #undef THUNK_GENERATOR
100 static const HashTable JSSVGFEImageElementConstructorTable = { 1, 0, JSSVGFEImageElementConstructorTableValues, 0 };
101 const ClassInfo JSSVGFEImageElementConstructor::s_info = { "SVGFEImageElementConstructor", &DOMConstructorObject::s_info, &JSSVGFEImageElementConstructorTable, 0, CREATE_METHOD_TABLE(JSSVGFEImageElementConstructor) };
103 JSSVGFEImageElementConstructor::JSSVGFEImageElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
104 : DOMConstructorObject(structure, globalObject)
108 void JSSVGFEImageElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
110 Base::finishCreation(exec->globalData());
111 ASSERT(inherits(&s_info));
112 putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGFEImageElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
115 bool JSSVGFEImageElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
117 return getStaticValueSlot<JSSVGFEImageElementConstructor, JSDOMWrapper>(exec, &JSSVGFEImageElementConstructorTable, static_cast<JSSVGFEImageElementConstructor*>(cell), propertyName, slot);
120 bool JSSVGFEImageElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
122 return getStaticValueDescriptor<JSSVGFEImageElementConstructor, JSDOMWrapper>(exec, &JSSVGFEImageElementConstructorTable, static_cast<JSSVGFEImageElementConstructor*>(object), propertyName, descriptor);
125 /* Hash table for prototype */
127 #define THUNK_GENERATOR(generator) , generator
129 #define THUNK_GENERATOR(generator)
132 #define INTRINSIC(intrinsic) , intrinsic
134 #define INTRINSIC(intrinsic)
137 static const HashTableValue JSSVGFEImageElementPrototypeTableValues[] =
139 { "getPresentationAttribute", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGFEImageElementPrototypeFunctionGetPresentationAttribute), (intptr_t)1 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
140 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
143 #undef THUNK_GENERATOR
144 static const HashTable JSSVGFEImageElementPrototypeTable = { 2, 1, JSSVGFEImageElementPrototypeTableValues, 0 };
145 const ClassInfo JSSVGFEImageElementPrototype::s_info = { "SVGFEImageElementPrototype", &JSC::JSNonFinalObject::s_info, &JSSVGFEImageElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSSVGFEImageElementPrototype) };
147 JSObject* JSSVGFEImageElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
149 return getDOMPrototype<JSSVGFEImageElement>(exec, globalObject);
152 bool JSSVGFEImageElementPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
154 JSSVGFEImageElementPrototype* thisObject = jsCast<JSSVGFEImageElementPrototype*>(cell);
155 return getStaticFunctionSlot<JSObject>(exec, &JSSVGFEImageElementPrototypeTable, thisObject, propertyName, slot);
158 bool JSSVGFEImageElementPrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
160 JSSVGFEImageElementPrototype* thisObject = jsCast<JSSVGFEImageElementPrototype*>(object);
161 return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGFEImageElementPrototypeTable, thisObject, propertyName, descriptor);
164 const ClassInfo JSSVGFEImageElement::s_info = { "SVGFEImageElement", &JSSVGElement::s_info, &JSSVGFEImageElementTable, 0 , CREATE_METHOD_TABLE(JSSVGFEImageElement) };
166 JSSVGFEImageElement::JSSVGFEImageElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEImageElement> impl)
167 : JSSVGElement(structure, globalObject, impl)
171 void JSSVGFEImageElement::finishCreation(JSGlobalData& globalData)
173 Base::finishCreation(globalData);
174 ASSERT(inherits(&s_info));
177 JSObject* JSSVGFEImageElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
179 return JSSVGFEImageElementPrototype::create(exec->globalData(), globalObject, JSSVGFEImageElementPrototype::createStructure(exec->globalData(), globalObject, JSSVGElementPrototype::self(exec, globalObject)));
182 bool JSSVGFEImageElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
184 JSSVGFEImageElement* thisObject = jsCast<JSSVGFEImageElement*>(cell);
185 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
186 return getStaticValueSlot<JSSVGFEImageElement, Base>(exec, &JSSVGFEImageElementTable, thisObject, propertyName, slot);
189 bool JSSVGFEImageElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
191 JSSVGFEImageElement* thisObject = jsCast<JSSVGFEImageElement*>(object);
192 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
193 return getStaticValueDescriptor<JSSVGFEImageElement, Base>(exec, &JSSVGFEImageElementTable, thisObject, propertyName, descriptor);
196 JSValue jsSVGFEImageElementPreserveAspectRatio(ExecState* exec, JSValue slotBase, const Identifier&)
198 JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slotBase));
200 SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl());
201 RefPtr<SVGAnimatedPreserveAspectRatio> obj = imp->preserveAspectRatioAnimated();
202 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
207 JSValue jsSVGFEImageElementHref(ExecState* exec, JSValue slotBase, const Identifier&)
209 JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slotBase));
211 SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl());
212 RefPtr<SVGAnimatedString> obj = imp->hrefAnimated();
213 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
218 JSValue jsSVGFEImageElementXmllang(ExecState* exec, JSValue slotBase, const Identifier&)
220 JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slotBase));
222 SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl());
223 JSValue result = jsString(exec, imp->xmllang());
228 JSValue jsSVGFEImageElementXmlspace(ExecState* exec, JSValue slotBase, const Identifier&)
230 JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slotBase));
232 SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl());
233 JSValue result = jsString(exec, imp->xmlspace());
238 JSValue jsSVGFEImageElementExternalResourcesRequired(ExecState* exec, JSValue slotBase, const Identifier&)
240 JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slotBase));
242 SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl());
243 RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated();
244 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
249 JSValue jsSVGFEImageElementX(ExecState* exec, JSValue slotBase, const Identifier&)
251 JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slotBase));
253 SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl());
254 RefPtr<SVGAnimatedLength> obj = imp->xAnimated();
255 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
260 JSValue jsSVGFEImageElementY(ExecState* exec, JSValue slotBase, const Identifier&)
262 JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slotBase));
264 SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl());
265 RefPtr<SVGAnimatedLength> obj = imp->yAnimated();
266 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
271 JSValue jsSVGFEImageElementWidth(ExecState* exec, JSValue slotBase, const Identifier&)
273 JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slotBase));
275 SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl());
276 RefPtr<SVGAnimatedLength> obj = imp->widthAnimated();
277 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
282 JSValue jsSVGFEImageElementHeight(ExecState* exec, JSValue slotBase, const Identifier&)
284 JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slotBase));
286 SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl());
287 RefPtr<SVGAnimatedLength> obj = imp->heightAnimated();
288 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
293 JSValue jsSVGFEImageElementResult(ExecState* exec, JSValue slotBase, const Identifier&)
295 JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slotBase));
297 SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl());
298 RefPtr<SVGAnimatedString> obj = imp->resultAnimated();
299 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
304 JSValue jsSVGFEImageElementClassName(ExecState* exec, JSValue slotBase, const Identifier&)
306 JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slotBase));
308 SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl());
309 RefPtr<SVGAnimatedString> obj = imp->classNameAnimated();
310 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
315 JSValue jsSVGFEImageElementStyle(ExecState* exec, JSValue slotBase, const Identifier&)
317 JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(slotBase));
319 SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl());
320 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style()));
325 JSValue jsSVGFEImageElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
327 JSSVGFEImageElement* domObject = static_cast<JSSVGFEImageElement*>(asObject(slotBase));
328 return JSSVGFEImageElement::getConstructor(exec, domObject->globalObject());
331 void JSSVGFEImageElement::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
333 JSSVGFEImageElement* thisObject = jsCast<JSSVGFEImageElement*>(cell);
334 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
335 lookupPut<JSSVGFEImageElement, Base>(exec, propertyName, value, &JSSVGFEImageElementTable, thisObject, slot);
338 void setJSSVGFEImageElementXmllang(ExecState* exec, JSObject* thisObject, JSValue value)
340 JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(thisObject);
341 SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl());
342 imp->setXmllang(ustringToString(value.isEmpty() ? UString() : value.toString(exec)));
346 void setJSSVGFEImageElementXmlspace(ExecState* exec, JSObject* thisObject, JSValue value)
348 JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(thisObject);
349 SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl());
350 imp->setXmlspace(ustringToString(value.isEmpty() ? UString() : value.toString(exec)));
354 JSValue JSSVGFEImageElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
356 return getDOMConstructor<JSSVGFEImageElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
359 EncodedJSValue JSC_HOST_CALL jsSVGFEImageElementPrototypeFunctionGetPresentationAttribute(ExecState* exec)
361 JSValue thisValue = exec->hostThisValue();
362 if (!thisValue.inherits(&JSSVGFEImageElement::s_info))
363 return throwVMTypeError(exec);
364 JSSVGFEImageElement* castedThis = static_cast<JSSVGFEImageElement*>(asObject(thisValue));
365 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGFEImageElement::s_info);
366 SVGFEImageElement* imp = static_cast<SVGFEImageElement*>(castedThis->impl());
367 const String& name(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)));
368 if (exec->hadException())
369 return JSValue::encode(jsUndefined());
371 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name)));
372 return JSValue::encode(result);
378 #endif // ENABLE(FILTERS) && ENABLE(SVG)