tizen beta release
[framework/web/webkit-efl.git] / DerivedSources / WebCore / JSSVGFEFloodElement.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 "JSSVGFEFloodElement.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 "JSSVGAnimatedString.h"
36 #include "SVGFEFloodElement.h"
37 #include <runtime/Error.h>
38 #include <wtf/GetPtr.h>
39
40 using namespace JSC;
41
42 namespace WebCore {
43
44 ASSERT_CLASS_FITS_IN_CELL(JSSVGFEFloodElement);
45
46 /* Hash table */
47 #if ENABLE(JIT)
48 #define THUNK_GENERATOR(generator) , generator
49 #else
50 #define THUNK_GENERATOR(generator)
51 #endif
52 #if ENABLE(DFG_JIT)
53 #define INTRINSIC(intrinsic) , intrinsic
54 #else
55 #define INTRINSIC(intrinsic)
56 #endif
57
58 static const HashTableValue JSSVGFEFloodElementTableValues[] =
59 {
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) }
69 };
70
71 #undef THUNK_GENERATOR
72 static const HashTable JSSVGFEFloodElementTable = { 18, 15, JSSVGFEFloodElementTableValues, 0 };
73 /* Hash table for constructor */
74 #if ENABLE(JIT)
75 #define THUNK_GENERATOR(generator) , generator
76 #else
77 #define THUNK_GENERATOR(generator)
78 #endif
79 #if ENABLE(DFG_JIT)
80 #define INTRINSIC(intrinsic) , intrinsic
81 #else
82 #define INTRINSIC(intrinsic)
83 #endif
84
85 static const HashTableValue JSSVGFEFloodElementConstructorTableValues[] =
86 {
87     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
88 };
89
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) };
93
94 JSSVGFEFloodElementConstructor::JSSVGFEFloodElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
95     : DOMConstructorObject(structure, globalObject)
96 {
97 }
98
99 void JSSVGFEFloodElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
100 {
101     Base::finishCreation(exec->globalData());
102     ASSERT(inherits(&s_info));
103     putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGFEFloodElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
104 }
105
106 bool JSSVGFEFloodElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
107 {
108     return getStaticValueSlot<JSSVGFEFloodElementConstructor, JSDOMWrapper>(exec, &JSSVGFEFloodElementConstructorTable, static_cast<JSSVGFEFloodElementConstructor*>(cell), propertyName, slot);
109 }
110
111 bool JSSVGFEFloodElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
112 {
113     return getStaticValueDescriptor<JSSVGFEFloodElementConstructor, JSDOMWrapper>(exec, &JSSVGFEFloodElementConstructorTable, static_cast<JSSVGFEFloodElementConstructor*>(object), propertyName, descriptor);
114 }
115
116 /* Hash table for prototype */
117 #if ENABLE(JIT)
118 #define THUNK_GENERATOR(generator) , generator
119 #else
120 #define THUNK_GENERATOR(generator)
121 #endif
122 #if ENABLE(DFG_JIT)
123 #define INTRINSIC(intrinsic) , intrinsic
124 #else
125 #define INTRINSIC(intrinsic)
126 #endif
127
128 static const HashTableValue JSSVGFEFloodElementPrototypeTableValues[] =
129 {
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) }
132 };
133
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) };
137
138 JSObject* JSSVGFEFloodElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
139 {
140     return getDOMPrototype<JSSVGFEFloodElement>(exec, globalObject);
141 }
142
143 bool JSSVGFEFloodElementPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
144 {
145     JSSVGFEFloodElementPrototype* thisObject = jsCast<JSSVGFEFloodElementPrototype*>(cell);
146     return getStaticFunctionSlot<JSObject>(exec, &JSSVGFEFloodElementPrototypeTable, thisObject, propertyName, slot);
147 }
148
149 bool JSSVGFEFloodElementPrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
150 {
151     JSSVGFEFloodElementPrototype* thisObject = jsCast<JSSVGFEFloodElementPrototype*>(object);
152     return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGFEFloodElementPrototypeTable, thisObject, propertyName, descriptor);
153 }
154
155 const ClassInfo JSSVGFEFloodElement::s_info = { "SVGFEFloodElement", &JSSVGElement::s_info, &JSSVGFEFloodElementTable, 0 , CREATE_METHOD_TABLE(JSSVGFEFloodElement) };
156
157 JSSVGFEFloodElement::JSSVGFEFloodElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEFloodElement> impl)
158     : JSSVGElement(structure, globalObject, impl)
159 {
160 }
161
162 void JSSVGFEFloodElement::finishCreation(JSGlobalData& globalData)
163 {
164     Base::finishCreation(globalData);
165     ASSERT(inherits(&s_info));
166 }
167
168 JSObject* JSSVGFEFloodElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
169 {
170     return JSSVGFEFloodElementPrototype::create(exec->globalData(), globalObject, JSSVGFEFloodElementPrototype::createStructure(exec->globalData(), globalObject, JSSVGElementPrototype::self(exec, globalObject)));
171 }
172
173 bool JSSVGFEFloodElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
174 {
175     JSSVGFEFloodElement* thisObject = jsCast<JSSVGFEFloodElement*>(cell);
176     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
177     return getStaticValueSlot<JSSVGFEFloodElement, Base>(exec, &JSSVGFEFloodElementTable, thisObject, propertyName, slot);
178 }
179
180 bool JSSVGFEFloodElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
181 {
182     JSSVGFEFloodElement* thisObject = jsCast<JSSVGFEFloodElement*>(object);
183     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
184     return getStaticValueDescriptor<JSSVGFEFloodElement, Base>(exec, &JSSVGFEFloodElementTable, thisObject, propertyName, descriptor);
185 }
186
187 JSValue jsSVGFEFloodElementX(ExecState* exec, JSValue slotBase, const Identifier&)
188 {
189     JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slotBase));
190     UNUSED_PARAM(exec);
191     SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl());
192     RefPtr<SVGAnimatedLength> obj = imp->xAnimated();
193     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
194     return result;
195 }
196
197
198 JSValue jsSVGFEFloodElementY(ExecState* exec, JSValue slotBase, const Identifier&)
199 {
200     JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slotBase));
201     UNUSED_PARAM(exec);
202     SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl());
203     RefPtr<SVGAnimatedLength> obj = imp->yAnimated();
204     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
205     return result;
206 }
207
208
209 JSValue jsSVGFEFloodElementWidth(ExecState* exec, JSValue slotBase, const Identifier&)
210 {
211     JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slotBase));
212     UNUSED_PARAM(exec);
213     SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl());
214     RefPtr<SVGAnimatedLength> obj = imp->widthAnimated();
215     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
216     return result;
217 }
218
219
220 JSValue jsSVGFEFloodElementHeight(ExecState* exec, JSValue slotBase, const Identifier&)
221 {
222     JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slotBase));
223     UNUSED_PARAM(exec);
224     SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl());
225     RefPtr<SVGAnimatedLength> obj = imp->heightAnimated();
226     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
227     return result;
228 }
229
230
231 JSValue jsSVGFEFloodElementResult(ExecState* exec, JSValue slotBase, const Identifier&)
232 {
233     JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slotBase));
234     UNUSED_PARAM(exec);
235     SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl());
236     RefPtr<SVGAnimatedString> obj = imp->resultAnimated();
237     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
238     return result;
239 }
240
241
242 JSValue jsSVGFEFloodElementClassName(ExecState* exec, JSValue slotBase, const Identifier&)
243 {
244     JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slotBase));
245     UNUSED_PARAM(exec);
246     SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl());
247     RefPtr<SVGAnimatedString> obj = imp->classNameAnimated();
248     JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
249     return result;
250 }
251
252
253 JSValue jsSVGFEFloodElementStyle(ExecState* exec, JSValue slotBase, const Identifier&)
254 {
255     JSSVGFEFloodElement* castedThis = static_cast<JSSVGFEFloodElement*>(asObject(slotBase));
256     UNUSED_PARAM(exec);
257     SVGFEFloodElement* imp = static_cast<SVGFEFloodElement*>(castedThis->impl());
258     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style()));
259     return result;
260 }
261
262
263 JSValue jsSVGFEFloodElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
264 {
265     JSSVGFEFloodElement* domObject = static_cast<JSSVGFEFloodElement*>(asObject(slotBase));
266     return JSSVGFEFloodElement::getConstructor(exec, domObject->globalObject());
267 }
268
269 JSValue JSSVGFEFloodElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
270 {
271     return getDOMConstructor<JSSVGFEFloodElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
272 }
273
274 EncodedJSValue JSC_HOST_CALL jsSVGFEFloodElementPrototypeFunctionGetPresentationAttribute(ExecState* exec)
275 {
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());
285
286     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name)));
287     return JSValue::encode(result);
288 }
289
290
291 }
292
293 #endif // ENABLE(FILTERS) && ENABLE(SVG)