|
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) |
|
24 |
|
25 #include "JSSVGDefsElement.h" |
|
26 |
|
27 #include "CSSMutableStyleDeclaration.h" |
|
28 #include "CSSStyleDeclaration.h" |
|
29 #include "CSSValue.h" |
|
30 #include "JSCSSStyleDeclaration.h" |
|
31 #include "JSCSSValue.h" |
|
32 #include "JSSVGAnimatedBoolean.h" |
|
33 #include "JSSVGAnimatedString.h" |
|
34 #include "JSSVGAnimatedTransformList.h" |
|
35 #include "JSSVGElement.h" |
|
36 #include "JSSVGMatrix.h" |
|
37 #include "JSSVGRect.h" |
|
38 #include "JSSVGStringList.h" |
|
39 #include "KURL.h" |
|
40 #include "SVGDefsElement.h" |
|
41 #include "SVGElement.h" |
|
42 #include "SVGStringList.h" |
|
43 #include <runtime/Error.h> |
|
44 #include <runtime/JSString.h> |
|
45 #include <wtf/GetPtr.h> |
|
46 |
|
47 using namespace JSC; |
|
48 |
|
49 namespace WebCore { |
|
50 |
|
51 ASSERT_CLASS_FITS_IN_CELL(JSSVGDefsElement); |
|
52 |
|
53 /* Hash table */ |
|
54 #if ENABLE(JIT) |
|
55 #define THUNK_GENERATOR(generator) , generator |
|
56 #else |
|
57 #define THUNK_GENERATOR(generator) |
|
58 #endif |
|
59 |
|
60 static const HashTableValue JSSVGDefsElementTableValues[13] = |
|
61 { |
|
62 { "requiredFeatures", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGDefsElementRequiredFeatures), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
63 { "requiredExtensions", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGDefsElementRequiredExtensions), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
64 { "systemLanguage", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGDefsElementSystemLanguage), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
65 { "xmllang", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGDefsElementXmllang), (intptr_t)setJSSVGDefsElementXmllang THUNK_GENERATOR(0) }, |
|
66 { "xmlspace", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGDefsElementXmlspace), (intptr_t)setJSSVGDefsElementXmlspace THUNK_GENERATOR(0) }, |
|
67 { "externalResourcesRequired", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGDefsElementExternalResourcesRequired), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
68 { "className", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGDefsElementClassName), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
69 { "style", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGDefsElementStyle), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
70 { "transform", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGDefsElementTransform), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
71 { "nearestViewportElement", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGDefsElementNearestViewportElement), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
72 { "farthestViewportElement", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGDefsElementFarthestViewportElement), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
73 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGDefsElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
74 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
75 }; |
|
76 |
|
77 #undef THUNK_GENERATOR |
|
78 static JSC_CONST_HASHTABLE HashTable JSSVGDefsElementTable = { 34, 31, JSSVGDefsElementTableValues, 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 |
|
86 static const HashTableValue JSSVGDefsElementConstructorTableValues[1] = |
|
87 { |
|
88 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
89 }; |
|
90 |
|
91 #undef THUNK_GENERATOR |
|
92 static JSC_CONST_HASHTABLE HashTable JSSVGDefsElementConstructorTable = { 1, 0, JSSVGDefsElementConstructorTableValues, 0 }; |
|
93 class JSSVGDefsElementConstructor : public DOMConstructorObject { |
|
94 public: |
|
95 JSSVGDefsElementConstructor(JSC::ExecState*, JSDOMGlobalObject*); |
|
96 |
|
97 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
98 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
99 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
100 static const JSC::ClassInfo s_info; |
|
101 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
102 { |
|
103 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
104 } |
|
105 protected: |
|
106 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; |
|
107 }; |
|
108 |
|
109 const ClassInfo JSSVGDefsElementConstructor::s_info = { "SVGDefsElementConstructor", 0, &JSSVGDefsElementConstructorTable, 0 }; |
|
110 |
|
111 JSSVGDefsElementConstructor::JSSVGDefsElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) |
|
112 : DOMConstructorObject(JSSVGDefsElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) |
|
113 { |
|
114 putDirect(exec->propertyNames().prototype, JSSVGDefsElementPrototype::self(exec, globalObject), DontDelete | ReadOnly); |
|
115 } |
|
116 |
|
117 bool JSSVGDefsElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
118 { |
|
119 return getStaticValueSlot<JSSVGDefsElementConstructor, DOMObject>(exec, &JSSVGDefsElementConstructorTable, this, propertyName, slot); |
|
120 } |
|
121 |
|
122 bool JSSVGDefsElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
123 { |
|
124 return getStaticValueDescriptor<JSSVGDefsElementConstructor, DOMObject>(exec, &JSSVGDefsElementConstructorTable, this, propertyName, descriptor); |
|
125 } |
|
126 |
|
127 /* Hash table for prototype */ |
|
128 #if ENABLE(JIT) |
|
129 #define THUNK_GENERATOR(generator) , generator |
|
130 #else |
|
131 #define THUNK_GENERATOR(generator) |
|
132 #endif |
|
133 |
|
134 static const HashTableValue JSSVGDefsElementPrototypeTableValues[7] = |
|
135 { |
|
136 { "hasExtension", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGDefsElementPrototypeFunctionHasExtension), (intptr_t)1 THUNK_GENERATOR(0) }, |
|
137 { "getPresentationAttribute", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGDefsElementPrototypeFunctionGetPresentationAttribute), (intptr_t)1 THUNK_GENERATOR(0) }, |
|
138 { "getBBox", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGDefsElementPrototypeFunctionGetBBox), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
139 { "getCTM", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGDefsElementPrototypeFunctionGetCTM), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
140 { "getScreenCTM", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGDefsElementPrototypeFunctionGetScreenCTM), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
141 { "getTransformToElement", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGDefsElementPrototypeFunctionGetTransformToElement), (intptr_t)1 THUNK_GENERATOR(0) }, |
|
142 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
143 }; |
|
144 |
|
145 #undef THUNK_GENERATOR |
|
146 static JSC_CONST_HASHTABLE HashTable JSSVGDefsElementPrototypeTable = { 17, 15, JSSVGDefsElementPrototypeTableValues, 0 }; |
|
147 const ClassInfo JSSVGDefsElementPrototype::s_info = { "SVGDefsElementPrototype", 0, &JSSVGDefsElementPrototypeTable, 0 }; |
|
148 |
|
149 JSObject* JSSVGDefsElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
150 { |
|
151 return getDOMPrototype<JSSVGDefsElement>(exec, globalObject); |
|
152 } |
|
153 |
|
154 bool JSSVGDefsElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
155 { |
|
156 return getStaticFunctionSlot<JSObject>(exec, &JSSVGDefsElementPrototypeTable, this, propertyName, slot); |
|
157 } |
|
158 |
|
159 bool JSSVGDefsElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
160 { |
|
161 return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGDefsElementPrototypeTable, this, propertyName, descriptor); |
|
162 } |
|
163 |
|
164 const ClassInfo JSSVGDefsElement::s_info = { "SVGDefsElement", &JSSVGElement::s_info, &JSSVGDefsElementTable, 0 }; |
|
165 |
|
166 JSSVGDefsElement::JSSVGDefsElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGDefsElement> impl) |
|
167 : JSSVGElement(structure, globalObject, impl) |
|
168 { |
|
169 } |
|
170 |
|
171 JSObject* JSSVGDefsElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
172 { |
|
173 return new (exec) JSSVGDefsElementPrototype(globalObject, JSSVGDefsElementPrototype::createStructure(JSSVGElementPrototype::self(exec, globalObject))); |
|
174 } |
|
175 |
|
176 bool JSSVGDefsElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
177 { |
|
178 return getStaticValueSlot<JSSVGDefsElement, Base>(exec, &JSSVGDefsElementTable, this, propertyName, slot); |
|
179 } |
|
180 |
|
181 bool JSSVGDefsElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
182 { |
|
183 return getStaticValueDescriptor<JSSVGDefsElement, Base>(exec, &JSSVGDefsElementTable, this, propertyName, descriptor); |
|
184 } |
|
185 |
|
186 JSValue jsSVGDefsElementRequiredFeatures(ExecState* exec, JSValue slotBase, const Identifier&) |
|
187 { |
|
188 JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slotBase)); |
|
189 UNUSED_PARAM(exec); |
|
190 SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); |
|
191 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); |
|
192 return result; |
|
193 } |
|
194 |
|
195 JSValue jsSVGDefsElementRequiredExtensions(ExecState* exec, JSValue slotBase, const Identifier&) |
|
196 { |
|
197 JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slotBase)); |
|
198 UNUSED_PARAM(exec); |
|
199 SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); |
|
200 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); |
|
201 return result; |
|
202 } |
|
203 |
|
204 JSValue jsSVGDefsElementSystemLanguage(ExecState* exec, JSValue slotBase, const Identifier&) |
|
205 { |
|
206 JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slotBase)); |
|
207 UNUSED_PARAM(exec); |
|
208 SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); |
|
209 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); |
|
210 return result; |
|
211 } |
|
212 |
|
213 JSValue jsSVGDefsElementXmllang(ExecState* exec, JSValue slotBase, const Identifier&) |
|
214 { |
|
215 JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slotBase)); |
|
216 UNUSED_PARAM(exec); |
|
217 SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); |
|
218 JSValue result = jsString(exec, imp->xmllang()); |
|
219 return result; |
|
220 } |
|
221 |
|
222 JSValue jsSVGDefsElementXmlspace(ExecState* exec, JSValue slotBase, const Identifier&) |
|
223 { |
|
224 JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slotBase)); |
|
225 UNUSED_PARAM(exec); |
|
226 SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); |
|
227 JSValue result = jsString(exec, imp->xmlspace()); |
|
228 return result; |
|
229 } |
|
230 |
|
231 JSValue jsSVGDefsElementExternalResourcesRequired(ExecState* exec, JSValue slotBase, const Identifier&) |
|
232 { |
|
233 JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slotBase)); |
|
234 UNUSED_PARAM(exec); |
|
235 SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); |
|
236 RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); |
|
237 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
238 return result; |
|
239 } |
|
240 |
|
241 JSValue jsSVGDefsElementClassName(ExecState* exec, JSValue slotBase, const Identifier&) |
|
242 { |
|
243 JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slotBase)); |
|
244 UNUSED_PARAM(exec); |
|
245 SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); |
|
246 RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); |
|
247 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
248 return result; |
|
249 } |
|
250 |
|
251 JSValue jsSVGDefsElementStyle(ExecState* exec, JSValue slotBase, const Identifier&) |
|
252 { |
|
253 JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slotBase)); |
|
254 UNUSED_PARAM(exec); |
|
255 SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); |
|
256 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); |
|
257 return result; |
|
258 } |
|
259 |
|
260 JSValue jsSVGDefsElementTransform(ExecState* exec, JSValue slotBase, const Identifier&) |
|
261 { |
|
262 JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slotBase)); |
|
263 UNUSED_PARAM(exec); |
|
264 SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); |
|
265 RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); |
|
266 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
267 return result; |
|
268 } |
|
269 |
|
270 JSValue jsSVGDefsElementNearestViewportElement(ExecState* exec, JSValue slotBase, const Identifier&) |
|
271 { |
|
272 JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slotBase)); |
|
273 UNUSED_PARAM(exec); |
|
274 SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); |
|
275 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); |
|
276 return result; |
|
277 } |
|
278 |
|
279 JSValue jsSVGDefsElementFarthestViewportElement(ExecState* exec, JSValue slotBase, const Identifier&) |
|
280 { |
|
281 JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(slotBase)); |
|
282 UNUSED_PARAM(exec); |
|
283 SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); |
|
284 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); |
|
285 return result; |
|
286 } |
|
287 |
|
288 JSValue jsSVGDefsElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) |
|
289 { |
|
290 JSSVGDefsElement* domObject = static_cast<JSSVGDefsElement*>(asObject(slotBase)); |
|
291 return JSSVGDefsElement::getConstructor(exec, domObject->globalObject()); |
|
292 } |
|
293 void JSSVGDefsElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) |
|
294 { |
|
295 lookupPut<JSSVGDefsElement, Base>(exec, propertyName, value, &JSSVGDefsElementTable, this, slot); |
|
296 } |
|
297 |
|
298 void setJSSVGDefsElementXmllang(ExecState* exec, JSObject* thisObject, JSValue value) |
|
299 { |
|
300 JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(thisObject); |
|
301 SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); |
|
302 imp->setXmllang(ustringToString(value.toString(exec))); |
|
303 } |
|
304 |
|
305 void setJSSVGDefsElementXmlspace(ExecState* exec, JSObject* thisObject, JSValue value) |
|
306 { |
|
307 JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(thisObject); |
|
308 SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); |
|
309 imp->setXmlspace(ustringToString(value.toString(exec))); |
|
310 } |
|
311 |
|
312 JSValue JSSVGDefsElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) |
|
313 { |
|
314 return getDOMConstructor<JSSVGDefsElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); |
|
315 } |
|
316 |
|
317 EncodedJSValue JSC_HOST_CALL jsSVGDefsElementPrototypeFunctionHasExtension(ExecState* exec) |
|
318 { |
|
319 JSValue thisValue = exec->hostThisValue(); |
|
320 if (!thisValue.inherits(&JSSVGDefsElement::s_info)) |
|
321 return throwVMTypeError(exec); |
|
322 JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(thisValue)); |
|
323 SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); |
|
324 const String& extension = ustringToString(exec->argument(0).toString(exec)); |
|
325 |
|
326 |
|
327 JSC::JSValue result = jsBoolean(imp->hasExtension(extension)); |
|
328 return JSValue::encode(result); |
|
329 } |
|
330 |
|
331 EncodedJSValue JSC_HOST_CALL jsSVGDefsElementPrototypeFunctionGetPresentationAttribute(ExecState* exec) |
|
332 { |
|
333 JSValue thisValue = exec->hostThisValue(); |
|
334 if (!thisValue.inherits(&JSSVGDefsElement::s_info)) |
|
335 return throwVMTypeError(exec); |
|
336 JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(thisValue)); |
|
337 SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); |
|
338 const String& name = ustringToString(exec->argument(0).toString(exec)); |
|
339 |
|
340 |
|
341 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); |
|
342 return JSValue::encode(result); |
|
343 } |
|
344 |
|
345 EncodedJSValue JSC_HOST_CALL jsSVGDefsElementPrototypeFunctionGetBBox(ExecState* exec) |
|
346 { |
|
347 JSValue thisValue = exec->hostThisValue(); |
|
348 if (!thisValue.inherits(&JSSVGDefsElement::s_info)) |
|
349 return throwVMTypeError(exec); |
|
350 JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(thisValue)); |
|
351 SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); |
|
352 |
|
353 |
|
354 JSC::JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), 0 /* no context on purpose */); |
|
355 return JSValue::encode(result); |
|
356 } |
|
357 |
|
358 EncodedJSValue JSC_HOST_CALL jsSVGDefsElementPrototypeFunctionGetCTM(ExecState* exec) |
|
359 { |
|
360 JSValue thisValue = exec->hostThisValue(); |
|
361 if (!thisValue.inherits(&JSSVGDefsElement::s_info)) |
|
362 return throwVMTypeError(exec); |
|
363 JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(thisValue)); |
|
364 SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); |
|
365 |
|
366 |
|
367 JSC::JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getCTM()).get(), 0 /* no context on purpose */); |
|
368 return JSValue::encode(result); |
|
369 } |
|
370 |
|
371 EncodedJSValue JSC_HOST_CALL jsSVGDefsElementPrototypeFunctionGetScreenCTM(ExecState* exec) |
|
372 { |
|
373 JSValue thisValue = exec->hostThisValue(); |
|
374 if (!thisValue.inherits(&JSSVGDefsElement::s_info)) |
|
375 return throwVMTypeError(exec); |
|
376 JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(thisValue)); |
|
377 SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); |
|
378 |
|
379 |
|
380 JSC::JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getScreenCTM()).get(), 0 /* no context on purpose */); |
|
381 return JSValue::encode(result); |
|
382 } |
|
383 |
|
384 EncodedJSValue JSC_HOST_CALL jsSVGDefsElementPrototypeFunctionGetTransformToElement(ExecState* exec) |
|
385 { |
|
386 JSValue thisValue = exec->hostThisValue(); |
|
387 if (!thisValue.inherits(&JSSVGDefsElement::s_info)) |
|
388 return throwVMTypeError(exec); |
|
389 JSSVGDefsElement* castedThis = static_cast<JSSVGDefsElement*>(asObject(thisValue)); |
|
390 SVGDefsElement* imp = static_cast<SVGDefsElement*>(castedThis->impl()); |
|
391 ExceptionCode ec = 0; |
|
392 SVGElement* element = toSVGElement(exec->argument(0)); |
|
393 |
|
394 |
|
395 JSC::JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getTransformToElement(element, ec)).get(), 0 /* no context on purpose */); |
|
396 setDOMException(exec, ec); |
|
397 return JSValue::encode(result); |
|
398 } |
|
399 |
|
400 |
|
401 } |
|
402 |
|
403 #endif // ENABLE(SVG) |