|
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(SVG) && ENABLE(FILTERS) |
|
24 |
|
25 #include "JSSVGFESpecularLightingElement.h" |
|
26 |
|
27 #include "CSSMutableStyleDeclaration.h" |
|
28 #include "CSSStyleDeclaration.h" |
|
29 #include "CSSValue.h" |
|
30 #include "JSCSSStyleDeclaration.h" |
|
31 #include "JSCSSValue.h" |
|
32 #include "JSSVGAnimatedLength.h" |
|
33 #include "JSSVGAnimatedNumber.h" |
|
34 #include "JSSVGAnimatedString.h" |
|
35 #include "SVGFESpecularLightingElement.h" |
|
36 #include <runtime/Error.h> |
|
37 #include <wtf/GetPtr.h> |
|
38 |
|
39 using namespace JSC; |
|
40 |
|
41 namespace WebCore { |
|
42 |
|
43 ASSERT_CLASS_FITS_IN_CELL(JSSVGFESpecularLightingElement); |
|
44 |
|
45 /* Hash table */ |
|
46 #if ENABLE(JIT) |
|
47 #define THUNK_GENERATOR(generator) , generator |
|
48 #else |
|
49 #define THUNK_GENERATOR(generator) |
|
50 #endif |
|
51 |
|
52 static const HashTableValue JSSVGFESpecularLightingElementTableValues[13] = |
|
53 { |
|
54 { "in1", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementIn1), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
55 { "surfaceScale", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementSurfaceScale), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
56 { "specularConstant", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementSpecularConstant), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
57 { "specularExponent", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementSpecularExponent), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
58 { "x", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementX), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
59 { "y", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementY), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
60 { "width", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementWidth), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
61 { "height", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementHeight), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
62 { "result", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementResult), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
63 { "className", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementClassName), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
64 { "style", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementStyle), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
65 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFESpecularLightingElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
66 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
67 }; |
|
68 |
|
69 #undef THUNK_GENERATOR |
|
70 static JSC_CONST_HASHTABLE HashTable JSSVGFESpecularLightingElementTable = { 36, 31, JSSVGFESpecularLightingElementTableValues, 0 }; |
|
71 /* Hash table for constructor */ |
|
72 #if ENABLE(JIT) |
|
73 #define THUNK_GENERATOR(generator) , generator |
|
74 #else |
|
75 #define THUNK_GENERATOR(generator) |
|
76 #endif |
|
77 |
|
78 static const HashTableValue JSSVGFESpecularLightingElementConstructorTableValues[1] = |
|
79 { |
|
80 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
81 }; |
|
82 |
|
83 #undef THUNK_GENERATOR |
|
84 static JSC_CONST_HASHTABLE HashTable JSSVGFESpecularLightingElementConstructorTable = { 1, 0, JSSVGFESpecularLightingElementConstructorTableValues, 0 }; |
|
85 class JSSVGFESpecularLightingElementConstructor : public DOMConstructorObject { |
|
86 public: |
|
87 JSSVGFESpecularLightingElementConstructor(JSC::ExecState*, JSDOMGlobalObject*); |
|
88 |
|
89 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
90 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
91 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
92 static const JSC::ClassInfo s_info; |
|
93 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
94 { |
|
95 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
96 } |
|
97 protected: |
|
98 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; |
|
99 }; |
|
100 |
|
101 const ClassInfo JSSVGFESpecularLightingElementConstructor::s_info = { "SVGFESpecularLightingElementConstructor", 0, &JSSVGFESpecularLightingElementConstructorTable, 0 }; |
|
102 |
|
103 JSSVGFESpecularLightingElementConstructor::JSSVGFESpecularLightingElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) |
|
104 : DOMConstructorObject(JSSVGFESpecularLightingElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) |
|
105 { |
|
106 putDirect(exec->propertyNames().prototype, JSSVGFESpecularLightingElementPrototype::self(exec, globalObject), DontDelete | ReadOnly); |
|
107 } |
|
108 |
|
109 bool JSSVGFESpecularLightingElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
110 { |
|
111 return getStaticValueSlot<JSSVGFESpecularLightingElementConstructor, DOMObject>(exec, &JSSVGFESpecularLightingElementConstructorTable, this, propertyName, slot); |
|
112 } |
|
113 |
|
114 bool JSSVGFESpecularLightingElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
115 { |
|
116 return getStaticValueDescriptor<JSSVGFESpecularLightingElementConstructor, DOMObject>(exec, &JSSVGFESpecularLightingElementConstructorTable, this, propertyName, descriptor); |
|
117 } |
|
118 |
|
119 /* Hash table for prototype */ |
|
120 #if ENABLE(JIT) |
|
121 #define THUNK_GENERATOR(generator) , generator |
|
122 #else |
|
123 #define THUNK_GENERATOR(generator) |
|
124 #endif |
|
125 |
|
126 static const HashTableValue JSSVGFESpecularLightingElementPrototypeTableValues[2] = |
|
127 { |
|
128 { "getPresentationAttribute", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGFESpecularLightingElementPrototypeFunctionGetPresentationAttribute), (intptr_t)1 THUNK_GENERATOR(0) }, |
|
129 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
130 }; |
|
131 |
|
132 #undef THUNK_GENERATOR |
|
133 static JSC_CONST_HASHTABLE HashTable JSSVGFESpecularLightingElementPrototypeTable = { 2, 1, JSSVGFESpecularLightingElementPrototypeTableValues, 0 }; |
|
134 const ClassInfo JSSVGFESpecularLightingElementPrototype::s_info = { "SVGFESpecularLightingElementPrototype", 0, &JSSVGFESpecularLightingElementPrototypeTable, 0 }; |
|
135 |
|
136 JSObject* JSSVGFESpecularLightingElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
137 { |
|
138 return getDOMPrototype<JSSVGFESpecularLightingElement>(exec, globalObject); |
|
139 } |
|
140 |
|
141 bool JSSVGFESpecularLightingElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
142 { |
|
143 return getStaticFunctionSlot<JSObject>(exec, &JSSVGFESpecularLightingElementPrototypeTable, this, propertyName, slot); |
|
144 } |
|
145 |
|
146 bool JSSVGFESpecularLightingElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
147 { |
|
148 return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGFESpecularLightingElementPrototypeTable, this, propertyName, descriptor); |
|
149 } |
|
150 |
|
151 const ClassInfo JSSVGFESpecularLightingElement::s_info = { "SVGFESpecularLightingElement", &JSSVGElement::s_info, &JSSVGFESpecularLightingElementTable, 0 }; |
|
152 |
|
153 JSSVGFESpecularLightingElement::JSSVGFESpecularLightingElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFESpecularLightingElement> impl) |
|
154 : JSSVGElement(structure, globalObject, impl) |
|
155 { |
|
156 } |
|
157 |
|
158 JSObject* JSSVGFESpecularLightingElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
159 { |
|
160 return new (exec) JSSVGFESpecularLightingElementPrototype(globalObject, JSSVGFESpecularLightingElementPrototype::createStructure(JSSVGElementPrototype::self(exec, globalObject))); |
|
161 } |
|
162 |
|
163 bool JSSVGFESpecularLightingElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
164 { |
|
165 return getStaticValueSlot<JSSVGFESpecularLightingElement, Base>(exec, &JSSVGFESpecularLightingElementTable, this, propertyName, slot); |
|
166 } |
|
167 |
|
168 bool JSSVGFESpecularLightingElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
169 { |
|
170 return getStaticValueDescriptor<JSSVGFESpecularLightingElement, Base>(exec, &JSSVGFESpecularLightingElementTable, this, propertyName, descriptor); |
|
171 } |
|
172 |
|
173 JSValue jsSVGFESpecularLightingElementIn1(ExecState* exec, JSValue slotBase, const Identifier&) |
|
174 { |
|
175 JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slotBase)); |
|
176 UNUSED_PARAM(exec); |
|
177 SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); |
|
178 RefPtr<SVGAnimatedString> obj = imp->in1Animated(); |
|
179 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
180 return result; |
|
181 } |
|
182 |
|
183 JSValue jsSVGFESpecularLightingElementSurfaceScale(ExecState* exec, JSValue slotBase, const Identifier&) |
|
184 { |
|
185 JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slotBase)); |
|
186 UNUSED_PARAM(exec); |
|
187 SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); |
|
188 RefPtr<SVGAnimatedNumber> obj = imp->surfaceScaleAnimated(); |
|
189 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
190 return result; |
|
191 } |
|
192 |
|
193 JSValue jsSVGFESpecularLightingElementSpecularConstant(ExecState* exec, JSValue slotBase, const Identifier&) |
|
194 { |
|
195 JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slotBase)); |
|
196 UNUSED_PARAM(exec); |
|
197 SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); |
|
198 RefPtr<SVGAnimatedNumber> obj = imp->specularConstantAnimated(); |
|
199 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
200 return result; |
|
201 } |
|
202 |
|
203 JSValue jsSVGFESpecularLightingElementSpecularExponent(ExecState* exec, JSValue slotBase, const Identifier&) |
|
204 { |
|
205 JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slotBase)); |
|
206 UNUSED_PARAM(exec); |
|
207 SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); |
|
208 RefPtr<SVGAnimatedNumber> obj = imp->specularExponentAnimated(); |
|
209 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
210 return result; |
|
211 } |
|
212 |
|
213 JSValue jsSVGFESpecularLightingElementX(ExecState* exec, JSValue slotBase, const Identifier&) |
|
214 { |
|
215 JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slotBase)); |
|
216 UNUSED_PARAM(exec); |
|
217 SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); |
|
218 RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); |
|
219 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
220 return result; |
|
221 } |
|
222 |
|
223 JSValue jsSVGFESpecularLightingElementY(ExecState* exec, JSValue slotBase, const Identifier&) |
|
224 { |
|
225 JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slotBase)); |
|
226 UNUSED_PARAM(exec); |
|
227 SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); |
|
228 RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); |
|
229 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
230 return result; |
|
231 } |
|
232 |
|
233 JSValue jsSVGFESpecularLightingElementWidth(ExecState* exec, JSValue slotBase, const Identifier&) |
|
234 { |
|
235 JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slotBase)); |
|
236 UNUSED_PARAM(exec); |
|
237 SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); |
|
238 RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); |
|
239 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
240 return result; |
|
241 } |
|
242 |
|
243 JSValue jsSVGFESpecularLightingElementHeight(ExecState* exec, JSValue slotBase, const Identifier&) |
|
244 { |
|
245 JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slotBase)); |
|
246 UNUSED_PARAM(exec); |
|
247 SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); |
|
248 RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); |
|
249 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
250 return result; |
|
251 } |
|
252 |
|
253 JSValue jsSVGFESpecularLightingElementResult(ExecState* exec, JSValue slotBase, const Identifier&) |
|
254 { |
|
255 JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slotBase)); |
|
256 UNUSED_PARAM(exec); |
|
257 SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); |
|
258 RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); |
|
259 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
260 return result; |
|
261 } |
|
262 |
|
263 JSValue jsSVGFESpecularLightingElementClassName(ExecState* exec, JSValue slotBase, const Identifier&) |
|
264 { |
|
265 JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slotBase)); |
|
266 UNUSED_PARAM(exec); |
|
267 SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); |
|
268 RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); |
|
269 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
270 return result; |
|
271 } |
|
272 |
|
273 JSValue jsSVGFESpecularLightingElementStyle(ExecState* exec, JSValue slotBase, const Identifier&) |
|
274 { |
|
275 JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(slotBase)); |
|
276 UNUSED_PARAM(exec); |
|
277 SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); |
|
278 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); |
|
279 return result; |
|
280 } |
|
281 |
|
282 JSValue jsSVGFESpecularLightingElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) |
|
283 { |
|
284 JSSVGFESpecularLightingElement* domObject = static_cast<JSSVGFESpecularLightingElement*>(asObject(slotBase)); |
|
285 return JSSVGFESpecularLightingElement::getConstructor(exec, domObject->globalObject()); |
|
286 } |
|
287 JSValue JSSVGFESpecularLightingElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) |
|
288 { |
|
289 return getDOMConstructor<JSSVGFESpecularLightingElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); |
|
290 } |
|
291 |
|
292 EncodedJSValue JSC_HOST_CALL jsSVGFESpecularLightingElementPrototypeFunctionGetPresentationAttribute(ExecState* exec) |
|
293 { |
|
294 JSValue thisValue = exec->hostThisValue(); |
|
295 if (!thisValue.inherits(&JSSVGFESpecularLightingElement::s_info)) |
|
296 return throwVMTypeError(exec); |
|
297 JSSVGFESpecularLightingElement* castedThis = static_cast<JSSVGFESpecularLightingElement*>(asObject(thisValue)); |
|
298 SVGFESpecularLightingElement* imp = static_cast<SVGFESpecularLightingElement*>(castedThis->impl()); |
|
299 const String& name = ustringToString(exec->argument(0).toString(exec)); |
|
300 |
|
301 |
|
302 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); |
|
303 return JSValue::encode(result); |
|
304 } |
|
305 |
|
306 |
|
307 } |
|
308 |
|
309 #endif // ENABLE(SVG) && ENABLE(FILTERS) |