tizen beta release
[framework/web/webkit-efl.git] / DerivedSources / WebCore / JSSVGFEDiffuseLightingElement.cpp
1 /*
2     This file is part of the WebKit open source project.
3     This file has been generated by generate-bindings.pl. DO NOT MODIFY!
4
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.
9
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.
14
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.
19 */
20
21 #include "config.h"
22
23 #if ENABLE(FILTERS) && ENABLE(SVG)
24
25 #include "JSSVGFEDiffuseLightingElement.h"
26
27 #include "CSSMutableStyleDeclaration.h"
28 #include "CSSStyleDeclaration.h"
29 #include "CSSValue.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>
40
41 using namespace JSC;
42
43 namespace WebCore {
44
45 ASSERT_CLASS_FITS_IN_CELL(JSSVGFEDiffuseLightingElement);
46
47 /* Hash table */
48 #if ENABLE(JIT)
49 #define THUNK_GENERATOR(generator) , generator
50 #else
51 #define THUNK_GENERATOR(generator)
52 #endif
53 #if ENABLE(DFG_JIT)
54 #define INTRINSIC(intrinsic) , intrinsic
55 #else
56 #define INTRINSIC(intrinsic)
57 #endif
58
59 static const HashTableValue JSSVGFEDiffuseLightingElementTableValues[] =
60 {
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) }
75 };
76
77 #undef THUNK_GENERATOR
78 static const HashTable JSSVGFEDiffuseLightingElementTable = { 35, 31, JSSVGFEDiffuseLightingElementTableValues, 0 };
79 /* Hash table for constructor */
80 #if ENABLE(JIT)
81 #define THUNK_GENERATOR(generator) , generator
82 #else
83 #define THUNK_GENERATOR(generator)
84 #endif
85 #if ENABLE(DFG_JIT)
86 #define INTRINSIC(intrinsic) , intrinsic
87 #else
88 #define INTRINSIC(intrinsic)
89 #endif
90
91 static const HashTableValue JSSVGFEDiffuseLightingElementConstructorTableValues[] =
92 {
93     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
94 };
95
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) };
99
100 JSSVGFEDiffuseLightingElementConstructor::JSSVGFEDiffuseLightingElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
101     : DOMConstructorObject(structure, globalObject)
102 {
103 }
104
105 void JSSVGFEDiffuseLightingElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
106 {
107     Base::finishCreation(exec->globalData());
108     ASSERT(inherits(&s_info));
109     putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGFEDiffuseLightingElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
110 }
111
112 bool JSSVGFEDiffuseLightingElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
113 {
114     return getStaticValueSlot<JSSVGFEDiffuseLightingElementConstructor, JSDOMWrapper>(exec, &JSSVGFEDiffuseLightingElementConstructorTable, static_cast<JSSVGFEDiffuseLightingElementConstructor*>(cell), propertyName, slot);
115 }
116
117 bool JSSVGFEDiffuseLightingElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
118 {
119     return getStaticValueDescriptor<JSSVGFEDiffuseLightingElementConstructor, JSDOMWrapper>(exec, &JSSVGFEDiffuseLightingElementConstructorTable, static_cast<JSSVGFEDiffuseLightingElementConstructor*>(object), propertyName, descriptor);
120 }
121
122 /* Hash table for prototype */
123 #if ENABLE(JIT)
124 #define THUNK_GENERATOR(generator) , generator
125 #else
126 #define THUNK_GENERATOR(generator)
127 #endif
128 #if ENABLE(DFG_JIT)
129 #define INTRINSIC(intrinsic) , intrinsic
130 #else
131 #define INTRINSIC(intrinsic)
132 #endif
133
134 static const HashTableValue JSSVGFEDiffuseLightingElementPrototypeTableValues[] =
135 {
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) }
138 };
139
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) };
143
144 JSObject* JSSVGFEDiffuseLightingElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
145 {
146     return getDOMPrototype<JSSVGFEDiffuseLightingElement>(exec, globalObject);
147 }
148
149 bool JSSVGFEDiffuseLightingElementPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
150 {
151     JSSVGFEDiffuseLightingElementPrototype* thisObject = jsCast<JSSVGFEDiffuseLightingElementPrototype*>(cell);
152     return getStaticFunctionSlot<JSObject>(exec, &JSSVGFEDiffuseLightingElementPrototypeTable, thisObject, propertyName, slot);
153 }
154
155 bool JSSVGFEDiffuseLightingElementPrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
156 {
157     JSSVGFEDiffuseLightingElementPrototype* thisObject = jsCast<JSSVGFEDiffuseLightingElementPrototype*>(object);
158     return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGFEDiffuseLightingElementPrototypeTable, thisObject, propertyName, descriptor);
159 }
160
161 const ClassInfo JSSVGFEDiffuseLightingElement::s_info = { "SVGFEDiffuseLightingElement", &JSSVGElement::s_info, &JSSVGFEDiffuseLightingElementTable, 0 , CREATE_METHOD_TABLE(JSSVGFEDiffuseLightingElement) };
162
163 JSSVGFEDiffuseLightingElement::JSSVGFEDiffuseLightingElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEDiffuseLightingElement> impl)
164     : JSSVGElement(structure, globalObject, impl)
165 {
166 }
167
168 void JSSVGFEDiffuseLightingElement::finishCreation(JSGlobalData& globalData)
169 {
170     Base::finishCreation(globalData);
171     ASSERT(inherits(&s_info));
172 }
173
174 JSObject* JSSVGFEDiffuseLightingElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
175 {
176     return JSSVGFEDiffuseLightingElementPrototype::create(exec->globalData(), globalObject, JSSVGFEDiffuseLightingElementPrototype::createStructure(exec->globalData(), globalObject, JSSVGElementPrototype::self(exec, globalObject)));
177 }
178
179 bool JSSVGFEDiffuseLightingElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
180 {
181     JSSVGFEDiffuseLightingElement* thisObject = jsCast<JSSVGFEDiffuseLightingElement*>(cell);
182     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
183     return getStaticValueSlot<JSSVGFEDiffuseLightingElement, Base>(exec, &JSSVGFEDiffuseLightingElementTable, thisObject, propertyName, slot);
184 }
185
186 bool JSSVGFEDiffuseLightingElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
187 {
188     JSSVGFEDiffuseLightingElement* thisObject = jsCast<JSSVGFEDiffuseLightingElement*>(object);
189     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
190     return getStaticValueDescriptor<JSSVGFEDiffuseLightingElement, Base>(exec, &JSSVGFEDiffuseLightingElementTable, thisObject, propertyName, descriptor);
191 }
192
193 JSValue jsSVGFEDiffuseLightingElementIn1(ExecState* exec, JSValue slotBase, const Identifier&)
194 {
195     JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
196     UNUSED_PARAM(exec);
197     SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
198     RefPtr<SVGAnimatedString> obj = imp->in1Animated();
199     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
200     return result;
201 }
202
203
204 JSValue jsSVGFEDiffuseLightingElementSurfaceScale(ExecState* exec, JSValue slotBase, const Identifier&)
205 {
206     JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
207     UNUSED_PARAM(exec);
208     SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
209     RefPtr<SVGAnimatedNumber> obj = imp->surfaceScaleAnimated();
210     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
211     return result;
212 }
213
214
215 JSValue jsSVGFEDiffuseLightingElementDiffuseConstant(ExecState* exec, JSValue slotBase, const Identifier&)
216 {
217     JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
218     UNUSED_PARAM(exec);
219     SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
220     RefPtr<SVGAnimatedNumber> obj = imp->diffuseConstantAnimated();
221     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
222     return result;
223 }
224
225
226 JSValue jsSVGFEDiffuseLightingElementKernelUnitLengthX(ExecState* exec, JSValue slotBase, const Identifier&)
227 {
228     JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
229     UNUSED_PARAM(exec);
230     SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
231     RefPtr<SVGAnimatedNumber> obj = imp->kernelUnitLengthXAnimated();
232     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
233     return result;
234 }
235
236
237 JSValue jsSVGFEDiffuseLightingElementKernelUnitLengthY(ExecState* exec, JSValue slotBase, const Identifier&)
238 {
239     JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
240     UNUSED_PARAM(exec);
241     SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
242     RefPtr<SVGAnimatedNumber> obj = imp->kernelUnitLengthYAnimated();
243     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
244     return result;
245 }
246
247
248 JSValue jsSVGFEDiffuseLightingElementX(ExecState* exec, JSValue slotBase, const Identifier&)
249 {
250     JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
251     UNUSED_PARAM(exec);
252     SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
253     RefPtr<SVGAnimatedLength> obj = imp->xAnimated();
254     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
255     return result;
256 }
257
258
259 JSValue jsSVGFEDiffuseLightingElementY(ExecState* exec, JSValue slotBase, const Identifier&)
260 {
261     JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
262     UNUSED_PARAM(exec);
263     SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
264     RefPtr<SVGAnimatedLength> obj = imp->yAnimated();
265     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
266     return result;
267 }
268
269
270 JSValue jsSVGFEDiffuseLightingElementWidth(ExecState* exec, JSValue slotBase, const Identifier&)
271 {
272     JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
273     UNUSED_PARAM(exec);
274     SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
275     RefPtr<SVGAnimatedLength> obj = imp->widthAnimated();
276     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
277     return result;
278 }
279
280
281 JSValue jsSVGFEDiffuseLightingElementHeight(ExecState* exec, JSValue slotBase, const Identifier&)
282 {
283     JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
284     UNUSED_PARAM(exec);
285     SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
286     RefPtr<SVGAnimatedLength> obj = imp->heightAnimated();
287     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
288     return result;
289 }
290
291
292 JSValue jsSVGFEDiffuseLightingElementResult(ExecState* exec, JSValue slotBase, const Identifier&)
293 {
294     JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
295     UNUSED_PARAM(exec);
296     SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
297     RefPtr<SVGAnimatedString> obj = imp->resultAnimated();
298     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
299     return result;
300 }
301
302
303 JSValue jsSVGFEDiffuseLightingElementClassName(ExecState* exec, JSValue slotBase, const Identifier&)
304 {
305     JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
306     UNUSED_PARAM(exec);
307     SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
308     RefPtr<SVGAnimatedString> obj = imp->classNameAnimated();
309     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
310     return result;
311 }
312
313
314 JSValue jsSVGFEDiffuseLightingElementStyle(ExecState* exec, JSValue slotBase, const Identifier&)
315 {
316     JSSVGFEDiffuseLightingElement* castedThis = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
317     UNUSED_PARAM(exec);
318     SVGFEDiffuseLightingElement* imp = static_cast<SVGFEDiffuseLightingElement*>(castedThis->impl());
319     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style()));
320     return result;
321 }
322
323
324 JSValue jsSVGFEDiffuseLightingElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
325 {
326     JSSVGFEDiffuseLightingElement* domObject = static_cast<JSSVGFEDiffuseLightingElement*>(asObject(slotBase));
327     return JSSVGFEDiffuseLightingElement::getConstructor(exec, domObject->globalObject());
328 }
329
330 JSValue JSSVGFEDiffuseLightingElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
331 {
332     return getDOMConstructor<JSSVGFEDiffuseLightingElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
333 }
334
335 EncodedJSValue JSC_HOST_CALL jsSVGFEDiffuseLightingElementPrototypeFunctionGetPresentationAttribute(ExecState* exec)
336 {
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());
346
347     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name)));
348     return JSValue::encode(result);
349 }
350
351
352 }
353
354 #endif // ENABLE(FILTERS) && ENABLE(SVG)