|
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 "JSSVGFETileElement.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 "JSSVGAnimatedString.h" |
|
34 #include "SVGFETileElement.h" |
|
35 #include <runtime/Error.h> |
|
36 #include <wtf/GetPtr.h> |
|
37 |
|
38 using namespace JSC; |
|
39 |
|
40 namespace WebCore { |
|
41 |
|
42 ASSERT_CLASS_FITS_IN_CELL(JSSVGFETileElement); |
|
43 |
|
44 /* Hash table */ |
|
45 #if ENABLE(JIT) |
|
46 #define THUNK_GENERATOR(generator) , generator |
|
47 #else |
|
48 #define THUNK_GENERATOR(generator) |
|
49 #endif |
|
50 |
|
51 static const HashTableValue JSSVGFETileElementTableValues[10] = |
|
52 { |
|
53 { "in1", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFETileElementIn1), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
54 { "x", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFETileElementX), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
55 { "y", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFETileElementY), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
56 { "width", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFETileElementWidth), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
57 { "height", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFETileElementHeight), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
58 { "result", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFETileElementResult), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
59 { "className", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFETileElementClassName), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
60 { "style", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFETileElementStyle), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
61 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFETileElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
62 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
63 }; |
|
64 |
|
65 #undef THUNK_GENERATOR |
|
66 static JSC_CONST_HASHTABLE HashTable JSSVGFETileElementTable = { 34, 31, JSSVGFETileElementTableValues, 0 }; |
|
67 /* Hash table for constructor */ |
|
68 #if ENABLE(JIT) |
|
69 #define THUNK_GENERATOR(generator) , generator |
|
70 #else |
|
71 #define THUNK_GENERATOR(generator) |
|
72 #endif |
|
73 |
|
74 static const HashTableValue JSSVGFETileElementConstructorTableValues[1] = |
|
75 { |
|
76 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
77 }; |
|
78 |
|
79 #undef THUNK_GENERATOR |
|
80 static JSC_CONST_HASHTABLE HashTable JSSVGFETileElementConstructorTable = { 1, 0, JSSVGFETileElementConstructorTableValues, 0 }; |
|
81 class JSSVGFETileElementConstructor : public DOMConstructorObject { |
|
82 public: |
|
83 JSSVGFETileElementConstructor(JSC::ExecState*, JSDOMGlobalObject*); |
|
84 |
|
85 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
86 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
87 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
88 static const JSC::ClassInfo s_info; |
|
89 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
90 { |
|
91 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
92 } |
|
93 protected: |
|
94 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; |
|
95 }; |
|
96 |
|
97 const ClassInfo JSSVGFETileElementConstructor::s_info = { "SVGFETileElementConstructor", 0, &JSSVGFETileElementConstructorTable, 0 }; |
|
98 |
|
99 JSSVGFETileElementConstructor::JSSVGFETileElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) |
|
100 : DOMConstructorObject(JSSVGFETileElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) |
|
101 { |
|
102 putDirect(exec->propertyNames().prototype, JSSVGFETileElementPrototype::self(exec, globalObject), DontDelete | ReadOnly); |
|
103 } |
|
104 |
|
105 bool JSSVGFETileElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
106 { |
|
107 return getStaticValueSlot<JSSVGFETileElementConstructor, DOMObject>(exec, &JSSVGFETileElementConstructorTable, this, propertyName, slot); |
|
108 } |
|
109 |
|
110 bool JSSVGFETileElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
111 { |
|
112 return getStaticValueDescriptor<JSSVGFETileElementConstructor, DOMObject>(exec, &JSSVGFETileElementConstructorTable, this, propertyName, descriptor); |
|
113 } |
|
114 |
|
115 /* Hash table for prototype */ |
|
116 #if ENABLE(JIT) |
|
117 #define THUNK_GENERATOR(generator) , generator |
|
118 #else |
|
119 #define THUNK_GENERATOR(generator) |
|
120 #endif |
|
121 |
|
122 static const HashTableValue JSSVGFETileElementPrototypeTableValues[2] = |
|
123 { |
|
124 { "getPresentationAttribute", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGFETileElementPrototypeFunctionGetPresentationAttribute), (intptr_t)1 THUNK_GENERATOR(0) }, |
|
125 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
126 }; |
|
127 |
|
128 #undef THUNK_GENERATOR |
|
129 static JSC_CONST_HASHTABLE HashTable JSSVGFETileElementPrototypeTable = { 2, 1, JSSVGFETileElementPrototypeTableValues, 0 }; |
|
130 const ClassInfo JSSVGFETileElementPrototype::s_info = { "SVGFETileElementPrototype", 0, &JSSVGFETileElementPrototypeTable, 0 }; |
|
131 |
|
132 JSObject* JSSVGFETileElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
133 { |
|
134 return getDOMPrototype<JSSVGFETileElement>(exec, globalObject); |
|
135 } |
|
136 |
|
137 bool JSSVGFETileElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
138 { |
|
139 return getStaticFunctionSlot<JSObject>(exec, &JSSVGFETileElementPrototypeTable, this, propertyName, slot); |
|
140 } |
|
141 |
|
142 bool JSSVGFETileElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
143 { |
|
144 return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGFETileElementPrototypeTable, this, propertyName, descriptor); |
|
145 } |
|
146 |
|
147 const ClassInfo JSSVGFETileElement::s_info = { "SVGFETileElement", &JSSVGElement::s_info, &JSSVGFETileElementTable, 0 }; |
|
148 |
|
149 JSSVGFETileElement::JSSVGFETileElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFETileElement> impl) |
|
150 : JSSVGElement(structure, globalObject, impl) |
|
151 { |
|
152 } |
|
153 |
|
154 JSObject* JSSVGFETileElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
155 { |
|
156 return new (exec) JSSVGFETileElementPrototype(globalObject, JSSVGFETileElementPrototype::createStructure(JSSVGElementPrototype::self(exec, globalObject))); |
|
157 } |
|
158 |
|
159 bool JSSVGFETileElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
160 { |
|
161 return getStaticValueSlot<JSSVGFETileElement, Base>(exec, &JSSVGFETileElementTable, this, propertyName, slot); |
|
162 } |
|
163 |
|
164 bool JSSVGFETileElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
165 { |
|
166 return getStaticValueDescriptor<JSSVGFETileElement, Base>(exec, &JSSVGFETileElementTable, this, propertyName, descriptor); |
|
167 } |
|
168 |
|
169 JSValue jsSVGFETileElementIn1(ExecState* exec, JSValue slotBase, const Identifier&) |
|
170 { |
|
171 JSSVGFETileElement* castedThis = static_cast<JSSVGFETileElement*>(asObject(slotBase)); |
|
172 UNUSED_PARAM(exec); |
|
173 SVGFETileElement* imp = static_cast<SVGFETileElement*>(castedThis->impl()); |
|
174 RefPtr<SVGAnimatedString> obj = imp->in1Animated(); |
|
175 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
176 return result; |
|
177 } |
|
178 |
|
179 JSValue jsSVGFETileElementX(ExecState* exec, JSValue slotBase, const Identifier&) |
|
180 { |
|
181 JSSVGFETileElement* castedThis = static_cast<JSSVGFETileElement*>(asObject(slotBase)); |
|
182 UNUSED_PARAM(exec); |
|
183 SVGFETileElement* imp = static_cast<SVGFETileElement*>(castedThis->impl()); |
|
184 RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); |
|
185 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
186 return result; |
|
187 } |
|
188 |
|
189 JSValue jsSVGFETileElementY(ExecState* exec, JSValue slotBase, const Identifier&) |
|
190 { |
|
191 JSSVGFETileElement* castedThis = static_cast<JSSVGFETileElement*>(asObject(slotBase)); |
|
192 UNUSED_PARAM(exec); |
|
193 SVGFETileElement* imp = static_cast<SVGFETileElement*>(castedThis->impl()); |
|
194 RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); |
|
195 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
196 return result; |
|
197 } |
|
198 |
|
199 JSValue jsSVGFETileElementWidth(ExecState* exec, JSValue slotBase, const Identifier&) |
|
200 { |
|
201 JSSVGFETileElement* castedThis = static_cast<JSSVGFETileElement*>(asObject(slotBase)); |
|
202 UNUSED_PARAM(exec); |
|
203 SVGFETileElement* imp = static_cast<SVGFETileElement*>(castedThis->impl()); |
|
204 RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); |
|
205 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
206 return result; |
|
207 } |
|
208 |
|
209 JSValue jsSVGFETileElementHeight(ExecState* exec, JSValue slotBase, const Identifier&) |
|
210 { |
|
211 JSSVGFETileElement* castedThis = static_cast<JSSVGFETileElement*>(asObject(slotBase)); |
|
212 UNUSED_PARAM(exec); |
|
213 SVGFETileElement* imp = static_cast<SVGFETileElement*>(castedThis->impl()); |
|
214 RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); |
|
215 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
216 return result; |
|
217 } |
|
218 |
|
219 JSValue jsSVGFETileElementResult(ExecState* exec, JSValue slotBase, const Identifier&) |
|
220 { |
|
221 JSSVGFETileElement* castedThis = static_cast<JSSVGFETileElement*>(asObject(slotBase)); |
|
222 UNUSED_PARAM(exec); |
|
223 SVGFETileElement* imp = static_cast<SVGFETileElement*>(castedThis->impl()); |
|
224 RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); |
|
225 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
226 return result; |
|
227 } |
|
228 |
|
229 JSValue jsSVGFETileElementClassName(ExecState* exec, JSValue slotBase, const Identifier&) |
|
230 { |
|
231 JSSVGFETileElement* castedThis = static_cast<JSSVGFETileElement*>(asObject(slotBase)); |
|
232 UNUSED_PARAM(exec); |
|
233 SVGFETileElement* imp = static_cast<SVGFETileElement*>(castedThis->impl()); |
|
234 RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); |
|
235 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
236 return result; |
|
237 } |
|
238 |
|
239 JSValue jsSVGFETileElementStyle(ExecState* exec, JSValue slotBase, const Identifier&) |
|
240 { |
|
241 JSSVGFETileElement* castedThis = static_cast<JSSVGFETileElement*>(asObject(slotBase)); |
|
242 UNUSED_PARAM(exec); |
|
243 SVGFETileElement* imp = static_cast<SVGFETileElement*>(castedThis->impl()); |
|
244 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); |
|
245 return result; |
|
246 } |
|
247 |
|
248 JSValue jsSVGFETileElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) |
|
249 { |
|
250 JSSVGFETileElement* domObject = static_cast<JSSVGFETileElement*>(asObject(slotBase)); |
|
251 return JSSVGFETileElement::getConstructor(exec, domObject->globalObject()); |
|
252 } |
|
253 JSValue JSSVGFETileElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) |
|
254 { |
|
255 return getDOMConstructor<JSSVGFETileElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); |
|
256 } |
|
257 |
|
258 EncodedJSValue JSC_HOST_CALL jsSVGFETileElementPrototypeFunctionGetPresentationAttribute(ExecState* exec) |
|
259 { |
|
260 JSValue thisValue = exec->hostThisValue(); |
|
261 if (!thisValue.inherits(&JSSVGFETileElement::s_info)) |
|
262 return throwVMTypeError(exec); |
|
263 JSSVGFETileElement* castedThis = static_cast<JSSVGFETileElement*>(asObject(thisValue)); |
|
264 SVGFETileElement* imp = static_cast<SVGFETileElement*>(castedThis->impl()); |
|
265 const String& name = ustringToString(exec->argument(0).toString(exec)); |
|
266 |
|
267 |
|
268 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); |
|
269 return JSValue::encode(result); |
|
270 } |
|
271 |
|
272 |
|
273 } |
|
274 |
|
275 #endif // ENABLE(SVG) && ENABLE(FILTERS) |