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 "JSSVGFEDiffuseLightingElement.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 "JSSVGAnimatedNumber.h"
36 #include "JSSVGAnimatedString.h"
37 #include "SVGFEDiffuseLightingElement.h"
38 #include <runtime/Error.h>
39 #include <wtf/GetPtr.h>
45 ASSERT_CLASS_FITS_IN_CELL(JSSVGFEDiffuseLightingElement);
49 #define THUNK_GENERATOR(generator) , generator
51 #define THUNK_GENERATOR(generator)
54 #define INTRINSIC(intrinsic) , intrinsic
56 #define INTRINSIC(intrinsic)
59 static const HashTableValue JSSVGFEDiffuseLightingElementTableValues[] =
61 { "in1", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEDiffuseLightingElementIn1), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
62 { "surfaceScale", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEDiffuseLightingElementSurfaceScale), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
63 { "diffuseConstant", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEDiffuseLightingElementDiffuseConstant), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
64 { "kernelUnitLengthX", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEDiffuseLightingElementKernelUnitLengthX), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
65 { "kernelUnitLengthY", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEDiffuseLightingElementKernelUnitLengthY), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
66 { "x", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEDiffuseLightingElementX), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
67 { "y", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEDiffuseLightingElementY), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
68 { "width", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEDiffuseLightingElementWidth), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
69 { "height", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEDiffuseLightingElementHeight), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
70 { "result", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEDiffuseLightingElementResult), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
71 { "className", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEDiffuseLightingElementClassName), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
72 { "style", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEDiffuseLightingElementStyle), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
73 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEDiffuseLightingElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
74 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
77 #undef THUNK_GENERATOR
78 static const HashTable JSSVGFEDiffuseLightingElementTable = { 35, 31, JSSVGFEDiffuseLightingElementTableValues, 0 };
79 /* Hash table for constructor */
81 #define THUNK_GENERATOR(generator) , generator
83 #define THUNK_GENERATOR(generator)
86 #define INTRINSIC(intrinsic) , intrinsic
88 #define INTRINSIC(intrinsic)
91 static const HashTableValue JSSVGFEDiffuseLightingElementConstructorTableValues[] =
93 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
96 #undef THUNK_GENERATOR
97 static const HashTable JSSVGFEDiffuseLightingElementConstructorTable = { 1, 0, JSSVGFEDiffuseLightingElementConstructorTableValues, 0 };
98 const ClassInfo JSSVGFEDiffuseLightingElementConstructor::s_info = { "SVGFEDiffuseLightingElementConstructor", &DOMConstructorObject::s_info, &JSSVGFEDiffuseLightingElementConstructorTable, 0, CREATE_METHOD_TABLE(JSSVGFEDiffuseLightingElementConstructor) };
100 JSSVGFEDiffuseLightingElementConstructor::JSSVGFEDiffuseLightingElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
101 : DOMConstructorObject(structure, globalObject)
105 void JSSVGFEDiffuseLightingElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
107 Base::finishCreation(exec->globalData());
108 ASSERT(inherits(&s_info));
109 putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGFEDiffuseLightingElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
112 bool JSSVGFEDiffuseLightingElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
114 return getStaticValueSlot<JSSVGFEDiffuseLightingElementConstructor, JSDOMWrapper>(exec, &JSSVGFEDiffuseLightingElementConstructorTable, static_cast<JSSVGFEDiffuseLightingElementConstructor*>(cell), propertyName, slot);
117 bool JSSVGFEDiffuseLightingElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
119 return getStaticValueDescriptor<JSSVGFEDiffuseLightingElementConstructor, JSDOMWrapper>(exec, &JSSVGFEDiffuseLightingElementConstructorTable, static_cast<JSSVGFEDiffuseLightingElementConstructor*>(object), propertyName, descriptor);
122 /* Hash table for prototype */
124 #define THUNK_GENERATOR(generator) , generator
126 #define THUNK_GENERATOR(generator)
129 #define INTRINSIC(intrinsic) , intrinsic
131 #define INTRINSIC(intrinsic)
134 static const HashTableValue JSSVGFEDiffuseLightingElementPrototypeTableValues[] =
136 { "getPresentationAttribute", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGFEDiffuseLightingElementPrototypeFunctionGetPresentationAttribute), (intptr_t)1 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
137 { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
140 #undef THUNK_GENERATOR
141 static const HashTable JSSVGFEDiffuseLightingElementPrototypeTable = { 2, 1, JSSVGFEDiffuseLightingElementPrototypeTableValues, 0 };
142 const ClassInfo JSSVGFEDiffuseLightingElementPrototype::s_info = { "SVGFEDiffuseLightingElementPrototype", &JSC::JSNonFinalObject::s_info, &JSSVGFEDiffuseLightingElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSSVGFEDiffuseLightingElementPrototype) };
144 JSObject* JSSVGFEDiffuseLightingElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
146 return getDOMPrototype<JSSVGFEDiffuseLightingElement>(exec, globalObject);
149 bool JSSVGFEDiffuseLightingElementPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
151 JSSVGFEDiffuseLightingElementPrototype* thisObject = jsCast<JSSVGFEDiffuseLightingElementPrototype*>(cell);
152 return getStaticFunctionSlot<JSObject>(exec, &JSSVGFEDiffuseLightingElementPrototypeTable, thisObject, propertyName, slot);
155 bool JSSVGFEDiffuseLightingElementPrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
157 JSSVGFEDiffuseLightingElementPrototype* thisObject = jsCast<JSSVGFEDiffuseLightingElementPrototype*>(object);
158 return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGFEDiffuseLightingElementPrototypeTable, thisObject, propertyName, descriptor);
161 const ClassInfo JSSVGFEDiffuseLightingElement::s_info = { "SVGFEDiffuseLightingElement", &JSSVGElement::s_info, &JSSVGFEDiffuseLightingElementTable, 0 , CREATE_METHOD_TABLE(JSSVGFEDiffuseLightingElement) };
163 JSSVGFEDiffuseLightingElement::JSSVGFEDiffuseLightingElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEDiffuseLightingElement> impl)
164 : JSSVGElement(structure, globalObject, impl)
168 void JSSVGFEDiffuseLightingElement::finishCreation(JSGlobalData& globalData)
170 Base::finishCreation(globalData);
171 ASSERT(inherits(&s_info));
174 JSObject* JSSVGFEDiffuseLightingElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
176 return JSSVGFEDiffuseLightingElementPrototype::create(exec->globalData(), globalObject, JSSVGFEDiffuseLightingElementPrototype::createStructure(exec->globalData(), globalObject, JSSVGElementPrototype::self(exec, globalObject)));
179 bool JSSVGFEDiffuseLightingElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
181 JSSVGFEDiffuseLightingElement* thisObject = jsCast<JSSVGFEDiffuseLightingElement*>(cell);
182 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
183 return getStaticValueSlot<JSSVGFEDiffuseLightingElement, Base>(exec, &JSSVGFEDiffuseLightingElementTable, thisObject, propertyName, slot);
186 bool JSSVGFEDiffuseLightingElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
188 JSSVGFEDiffuseLightingElement* thisObject = jsCast<JSSVGFEDiffuseLightingElement*>(object);
189 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
190 return getStaticValueDescriptor<JSSVGFEDiffuseLightingElement, Base>(exec, &JSSVGFEDiffuseLightingElementTable, thisObject, propertyName, descriptor);
193 JSValue jsSVGFEDiffuseLightingElementIn1(ExecState* exec, JSValue slotBase, const Identifier&)
195 JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
197 SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
198 RefPtr<SVGAnimatedString> obj = imp->in1Animated();
199 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
204 JSValue jsSVGFEDiffuseLightingElementSurfaceScale(ExecState* exec, JSValue slotBase, const Identifier&)
206 JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
208 SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
209 RefPtr<SVGAnimatedNumber> obj = imp->surfaceScaleAnimated();
210 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
215 JSValue jsSVGFEDiffuseLightingElementDiffuseConstant(ExecState* exec, JSValue slotBase, const Identifier&)
217 JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
219 SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
220 RefPtr<SVGAnimatedNumber> obj = imp->diffuseConstantAnimated();
221 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
226 JSValue jsSVGFEDiffuseLightingElementKernelUnitLengthX(ExecState* exec, JSValue slotBase, const Identifier&)
228 JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
230 SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
231 RefPtr<SVGAnimatedNumber> obj = imp->kernelUnitLengthXAnimated();
232 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
237 JSValue jsSVGFEDiffuseLightingElementKernelUnitLengthY(ExecState* exec, JSValue slotBase, const Identifier&)
239 JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
241 SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
242 RefPtr<SVGAnimatedNumber> obj = imp->kernelUnitLengthYAnimated();
243 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
248 JSValue jsSVGFEDiffuseLightingElementX(ExecState* exec, JSValue slotBase, const Identifier&)
250 JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
252 SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
253 RefPtr<SVGAnimatedLength> obj = imp->xAnimated();
254 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
259 JSValue jsSVGFEDiffuseLightingElementY(ExecState* exec, JSValue slotBase, const Identifier&)
261 JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
263 SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
264 RefPtr<SVGAnimatedLength> obj = imp->yAnimated();
265 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
270 JSValue jsSVGFEDiffuseLightingElementWidth(ExecState* exec, JSValue slotBase, const Identifier&)
272 JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
274 SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
275 RefPtr<SVGAnimatedLength> obj = imp->widthAnimated();
276 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
281 JSValue jsSVGFEDiffuseLightingElementHeight(ExecState* exec, JSValue slotBase, const Identifier&)
283 JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
285 SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
286 RefPtr<SVGAnimatedLength> obj = imp->heightAnimated();
287 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
292 JSValue jsSVGFEDiffuseLightingElementResult(ExecState* exec, JSValue slotBase, const Identifier&)
294 JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
296 SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
297 RefPtr<SVGAnimatedString> obj = imp->resultAnimated();
298 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
303 JSValue jsSVGFEDiffuseLightingElementClassName(ExecState* exec, JSValue slotBase, const Identifier&)
305 JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
307 SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
308 RefPtr<SVGAnimatedString> obj = imp->classNameAnimated();
309 JSValue result = toJS(exec, castedThis->globalObject(), obj.get());
314 JSValue jsSVGFEDiffuseLightingElementStyle(ExecState* exec, JSValue slotBase, const Identifier&)
316 JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
318 SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
319 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style()));
324 JSValue jsSVGFEDiffuseLightingElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
326 JSSVGFEDiffuseLightingElement* domObject = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
327 return JSSVGFEDiffuseLightingElement::getConstructor(exec, domObject->globalObject());
330 JSValue JSSVGFEDiffuseLightingElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
332 return getDOMConstructor<JSSVGFEDiffuseLightingElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
335 EncodedJSValue JSC_HOST_CALL jsSVGFEDiffuseLightingElementPrototypeFunctionGetPresentationAttribute(ExecState* exec)
337 JSValue thisValue = exec->hostThisValue();
338 if (!thisValue.inherits(&JSSVGFEDiffuseLightingElement::s_info))
339 return throwVMTypeError(exec);
340 JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(thisValue));
341 ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGFEDiffuseLightingElement::s_info);
342 SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
343 const String& name(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)));
344 if (exec->hadException())
345 return JSValue::encode(jsUndefined());
347 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name)));
348 return JSValue::encode(result);
354 #endif // ENABLE(FILTERS) && ENABLE(SVG)