|
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 "JSSVGFEComponentTransferElement.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 "SVGFEComponentTransferElement.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(JSSVGFEComponentTransferElement); |
|
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 JSSVGFEComponentTransferElementTableValues[10] = |
|
52 { |
|
53 { "in1", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEComponentTransferElementIn1), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
54 { "x", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEComponentTransferElementX), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
55 { "y", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEComponentTransferElementY), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
56 { "width", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEComponentTransferElementWidth), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
57 { "height", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEComponentTransferElementHeight), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
58 { "result", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEComponentTransferElementResult), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
59 { "className", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEComponentTransferElementClassName), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
60 { "style", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEComponentTransferElementStyle), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
61 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFEComponentTransferElementConstructor), (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 JSSVGFEComponentTransferElementTable = { 34, 31, JSSVGFEComponentTransferElementTableValues, 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 JSSVGFEComponentTransferElementConstructorTableValues[1] = |
|
75 { |
|
76 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
77 }; |
|
78 |
|
79 #undef THUNK_GENERATOR |
|
80 static JSC_CONST_HASHTABLE HashTable JSSVGFEComponentTransferElementConstructorTable = { 1, 0, JSSVGFEComponentTransferElementConstructorTableValues, 0 }; |
|
81 class JSSVGFEComponentTransferElementConstructor : public DOMConstructorObject { |
|
82 public: |
|
83 JSSVGFEComponentTransferElementConstructor(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 JSSVGFEComponentTransferElementConstructor::s_info = { "SVGFEComponentTransferElementConstructor", 0, &JSSVGFEComponentTransferElementConstructorTable, 0 }; |
|
98 |
|
99 JSSVGFEComponentTransferElementConstructor::JSSVGFEComponentTransferElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) |
|
100 : DOMConstructorObject(JSSVGFEComponentTransferElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) |
|
101 { |
|
102 putDirect(exec->propertyNames().prototype, JSSVGFEComponentTransferElementPrototype::self(exec, globalObject), DontDelete | ReadOnly); |
|
103 } |
|
104 |
|
105 bool JSSVGFEComponentTransferElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
106 { |
|
107 return getStaticValueSlot<JSSVGFEComponentTransferElementConstructor, DOMObject>(exec, &JSSVGFEComponentTransferElementConstructorTable, this, propertyName, slot); |
|
108 } |
|
109 |
|
110 bool JSSVGFEComponentTransferElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
111 { |
|
112 return getStaticValueDescriptor<JSSVGFEComponentTransferElementConstructor, DOMObject>(exec, &JSSVGFEComponentTransferElementConstructorTable, 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 JSSVGFEComponentTransferElementPrototypeTableValues[2] = |
|
123 { |
|
124 { "getPresentationAttribute", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGFEComponentTransferElementPrototypeFunctionGetPresentationAttribute), (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 JSSVGFEComponentTransferElementPrototypeTable = { 2, 1, JSSVGFEComponentTransferElementPrototypeTableValues, 0 }; |
|
130 const ClassInfo JSSVGFEComponentTransferElementPrototype::s_info = { "SVGFEComponentTransferElementPrototype", 0, &JSSVGFEComponentTransferElementPrototypeTable, 0 }; |
|
131 |
|
132 JSObject* JSSVGFEComponentTransferElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
133 { |
|
134 return getDOMPrototype<JSSVGFEComponentTransferElement>(exec, globalObject); |
|
135 } |
|
136 |
|
137 bool JSSVGFEComponentTransferElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
138 { |
|
139 return getStaticFunctionSlot<JSObject>(exec, &JSSVGFEComponentTransferElementPrototypeTable, this, propertyName, slot); |
|
140 } |
|
141 |
|
142 bool JSSVGFEComponentTransferElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
143 { |
|
144 return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGFEComponentTransferElementPrototypeTable, this, propertyName, descriptor); |
|
145 } |
|
146 |
|
147 const ClassInfo JSSVGFEComponentTransferElement::s_info = { "SVGFEComponentTransferElement", &JSSVGElement::s_info, &JSSVGFEComponentTransferElementTable, 0 }; |
|
148 |
|
149 JSSVGFEComponentTransferElement::JSSVGFEComponentTransferElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFEComponentTransferElement> impl) |
|
150 : JSSVGElement(structure, globalObject, impl) |
|
151 { |
|
152 } |
|
153 |
|
154 JSObject* JSSVGFEComponentTransferElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
155 { |
|
156 return new (exec) JSSVGFEComponentTransferElementPrototype(globalObject, JSSVGFEComponentTransferElementPrototype::createStructure(JSSVGElementPrototype::self(exec, globalObject))); |
|
157 } |
|
158 |
|
159 bool JSSVGFEComponentTransferElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
160 { |
|
161 return getStaticValueSlot<JSSVGFEComponentTransferElement, Base>(exec, &JSSVGFEComponentTransferElementTable, this, propertyName, slot); |
|
162 } |
|
163 |
|
164 bool JSSVGFEComponentTransferElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
165 { |
|
166 return getStaticValueDescriptor<JSSVGFEComponentTransferElement, Base>(exec, &JSSVGFEComponentTransferElementTable, this, propertyName, descriptor); |
|
167 } |
|
168 |
|
169 JSValue jsSVGFEComponentTransferElementIn1(ExecState* exec, JSValue slotBase, const Identifier&) |
|
170 { |
|
171 JSSVGFEComponentTransferElement* castedThis = static_cast<JSSVGFEComponentTransferElement*>(asObject(slotBase)); |
|
172 UNUSED_PARAM(exec); |
|
173 SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(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 jsSVGFEComponentTransferElementX(ExecState* exec, JSValue slotBase, const Identifier&) |
|
180 { |
|
181 JSSVGFEComponentTransferElement* castedThis = static_cast<JSSVGFEComponentTransferElement*>(asObject(slotBase)); |
|
182 UNUSED_PARAM(exec); |
|
183 SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(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 jsSVGFEComponentTransferElementY(ExecState* exec, JSValue slotBase, const Identifier&) |
|
190 { |
|
191 JSSVGFEComponentTransferElement* castedThis = static_cast<JSSVGFEComponentTransferElement*>(asObject(slotBase)); |
|
192 UNUSED_PARAM(exec); |
|
193 SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(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 jsSVGFEComponentTransferElementWidth(ExecState* exec, JSValue slotBase, const Identifier&) |
|
200 { |
|
201 JSSVGFEComponentTransferElement* castedThis = static_cast<JSSVGFEComponentTransferElement*>(asObject(slotBase)); |
|
202 UNUSED_PARAM(exec); |
|
203 SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(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 jsSVGFEComponentTransferElementHeight(ExecState* exec, JSValue slotBase, const Identifier&) |
|
210 { |
|
211 JSSVGFEComponentTransferElement* castedThis = static_cast<JSSVGFEComponentTransferElement*>(asObject(slotBase)); |
|
212 UNUSED_PARAM(exec); |
|
213 SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(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 jsSVGFEComponentTransferElementResult(ExecState* exec, JSValue slotBase, const Identifier&) |
|
220 { |
|
221 JSSVGFEComponentTransferElement* castedThis = static_cast<JSSVGFEComponentTransferElement*>(asObject(slotBase)); |
|
222 UNUSED_PARAM(exec); |
|
223 SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(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 jsSVGFEComponentTransferElementClassName(ExecState* exec, JSValue slotBase, const Identifier&) |
|
230 { |
|
231 JSSVGFEComponentTransferElement* castedThis = static_cast<JSSVGFEComponentTransferElement*>(asObject(slotBase)); |
|
232 UNUSED_PARAM(exec); |
|
233 SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(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 jsSVGFEComponentTransferElementStyle(ExecState* exec, JSValue slotBase, const Identifier&) |
|
240 { |
|
241 JSSVGFEComponentTransferElement* castedThis = static_cast<JSSVGFEComponentTransferElement*>(asObject(slotBase)); |
|
242 UNUSED_PARAM(exec); |
|
243 SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(castedThis->impl()); |
|
244 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); |
|
245 return result; |
|
246 } |
|
247 |
|
248 JSValue jsSVGFEComponentTransferElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) |
|
249 { |
|
250 JSSVGFEComponentTransferElement* domObject = static_cast<JSSVGFEComponentTransferElement*>(asObject(slotBase)); |
|
251 return JSSVGFEComponentTransferElement::getConstructor(exec, domObject->globalObject()); |
|
252 } |
|
253 JSValue JSSVGFEComponentTransferElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) |
|
254 { |
|
255 return getDOMConstructor<JSSVGFEComponentTransferElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); |
|
256 } |
|
257 |
|
258 EncodedJSValue JSC_HOST_CALL jsSVGFEComponentTransferElementPrototypeFunctionGetPresentationAttribute(ExecState* exec) |
|
259 { |
|
260 JSValue thisValue = exec->hostThisValue(); |
|
261 if (!thisValue.inherits(&JSSVGFEComponentTransferElement::s_info)) |
|
262 return throwVMTypeError(exec); |
|
263 JSSVGFEComponentTransferElement* castedThis = static_cast<JSSVGFEComponentTransferElement*>(asObject(thisValue)); |
|
264 SVGFEComponentTransferElement* imp = static_cast<SVGFEComponentTransferElement*>(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) |