|
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(SVG_FOREIGN_OBJECT) |
|
24 |
|
25 #include "JSSVGForeignObjectElement.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 "JSSVGAnimatedLength.h" |
|
34 #include "JSSVGAnimatedString.h" |
|
35 #include "JSSVGAnimatedTransformList.h" |
|
36 #include "JSSVGElement.h" |
|
37 #include "JSSVGMatrix.h" |
|
38 #include "JSSVGRect.h" |
|
39 #include "JSSVGStringList.h" |
|
40 #include "KURL.h" |
|
41 #include "SVGElement.h" |
|
42 #include "SVGForeignObjectElement.h" |
|
43 #include "SVGStringList.h" |
|
44 #include <runtime/Error.h> |
|
45 #include <runtime/JSString.h> |
|
46 #include <wtf/GetPtr.h> |
|
47 |
|
48 using namespace JSC; |
|
49 |
|
50 namespace WebCore { |
|
51 |
|
52 ASSERT_CLASS_FITS_IN_CELL(JSSVGForeignObjectElement); |
|
53 |
|
54 /* Hash table */ |
|
55 #if ENABLE(JIT) |
|
56 #define THUNK_GENERATOR(generator) , generator |
|
57 #else |
|
58 #define THUNK_GENERATOR(generator) |
|
59 #endif |
|
60 |
|
61 static const HashTableValue JSSVGForeignObjectElementTableValues[17] = |
|
62 { |
|
63 { "x", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGForeignObjectElementX), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
64 { "y", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGForeignObjectElementY), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
65 { "width", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGForeignObjectElementWidth), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
66 { "height", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGForeignObjectElementHeight), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
67 { "requiredFeatures", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGForeignObjectElementRequiredFeatures), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
68 { "requiredExtensions", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGForeignObjectElementRequiredExtensions), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
69 { "systemLanguage", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGForeignObjectElementSystemLanguage), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
70 { "xmllang", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGForeignObjectElementXmllang), (intptr_t)setJSSVGForeignObjectElementXmllang THUNK_GENERATOR(0) }, |
|
71 { "xmlspace", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGForeignObjectElementXmlspace), (intptr_t)setJSSVGForeignObjectElementXmlspace THUNK_GENERATOR(0) }, |
|
72 { "externalResourcesRequired", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGForeignObjectElementExternalResourcesRequired), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
73 { "className", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGForeignObjectElementClassName), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
74 { "style", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGForeignObjectElementStyle), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
75 { "transform", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGForeignObjectElementTransform), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
76 { "nearestViewportElement", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGForeignObjectElementNearestViewportElement), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
77 { "farthestViewportElement", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGForeignObjectElementFarthestViewportElement), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
78 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGForeignObjectElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
79 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
80 }; |
|
81 |
|
82 #undef THUNK_GENERATOR |
|
83 static JSC_CONST_HASHTABLE HashTable JSSVGForeignObjectElementTable = { 37, 31, JSSVGForeignObjectElementTableValues, 0 }; |
|
84 /* Hash table for constructor */ |
|
85 #if ENABLE(JIT) |
|
86 #define THUNK_GENERATOR(generator) , generator |
|
87 #else |
|
88 #define THUNK_GENERATOR(generator) |
|
89 #endif |
|
90 |
|
91 static const HashTableValue JSSVGForeignObjectElementConstructorTableValues[1] = |
|
92 { |
|
93 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
94 }; |
|
95 |
|
96 #undef THUNK_GENERATOR |
|
97 static JSC_CONST_HASHTABLE HashTable JSSVGForeignObjectElementConstructorTable = { 1, 0, JSSVGForeignObjectElementConstructorTableValues, 0 }; |
|
98 class JSSVGForeignObjectElementConstructor : public DOMConstructorObject { |
|
99 public: |
|
100 JSSVGForeignObjectElementConstructor(JSC::ExecState*, JSDOMGlobalObject*); |
|
101 |
|
102 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
103 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
104 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
105 static const JSC::ClassInfo s_info; |
|
106 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
107 { |
|
108 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
109 } |
|
110 protected: |
|
111 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; |
|
112 }; |
|
113 |
|
114 const ClassInfo JSSVGForeignObjectElementConstructor::s_info = { "SVGForeignObjectElementConstructor", 0, &JSSVGForeignObjectElementConstructorTable, 0 }; |
|
115 |
|
116 JSSVGForeignObjectElementConstructor::JSSVGForeignObjectElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) |
|
117 : DOMConstructorObject(JSSVGForeignObjectElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) |
|
118 { |
|
119 putDirect(exec->propertyNames().prototype, JSSVGForeignObjectElementPrototype::self(exec, globalObject), DontDelete | ReadOnly); |
|
120 } |
|
121 |
|
122 bool JSSVGForeignObjectElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
123 { |
|
124 return getStaticValueSlot<JSSVGForeignObjectElementConstructor, DOMObject>(exec, &JSSVGForeignObjectElementConstructorTable, this, propertyName, slot); |
|
125 } |
|
126 |
|
127 bool JSSVGForeignObjectElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
128 { |
|
129 return getStaticValueDescriptor<JSSVGForeignObjectElementConstructor, DOMObject>(exec, &JSSVGForeignObjectElementConstructorTable, this, propertyName, descriptor); |
|
130 } |
|
131 |
|
132 /* Hash table for prototype */ |
|
133 #if ENABLE(JIT) |
|
134 #define THUNK_GENERATOR(generator) , generator |
|
135 #else |
|
136 #define THUNK_GENERATOR(generator) |
|
137 #endif |
|
138 |
|
139 static const HashTableValue JSSVGForeignObjectElementPrototypeTableValues[7] = |
|
140 { |
|
141 { "hasExtension", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGForeignObjectElementPrototypeFunctionHasExtension), (intptr_t)1 THUNK_GENERATOR(0) }, |
|
142 { "getPresentationAttribute", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGForeignObjectElementPrototypeFunctionGetPresentationAttribute), (intptr_t)1 THUNK_GENERATOR(0) }, |
|
143 { "getBBox", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGForeignObjectElementPrototypeFunctionGetBBox), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
144 { "getCTM", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGForeignObjectElementPrototypeFunctionGetCTM), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
145 { "getScreenCTM", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGForeignObjectElementPrototypeFunctionGetScreenCTM), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
146 { "getTransformToElement", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGForeignObjectElementPrototypeFunctionGetTransformToElement), (intptr_t)1 THUNK_GENERATOR(0) }, |
|
147 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
148 }; |
|
149 |
|
150 #undef THUNK_GENERATOR |
|
151 static JSC_CONST_HASHTABLE HashTable JSSVGForeignObjectElementPrototypeTable = { 17, 15, JSSVGForeignObjectElementPrototypeTableValues, 0 }; |
|
152 const ClassInfo JSSVGForeignObjectElementPrototype::s_info = { "SVGForeignObjectElementPrototype", 0, &JSSVGForeignObjectElementPrototypeTable, 0 }; |
|
153 |
|
154 JSObject* JSSVGForeignObjectElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
155 { |
|
156 return getDOMPrototype<JSSVGForeignObjectElement>(exec, globalObject); |
|
157 } |
|
158 |
|
159 bool JSSVGForeignObjectElementPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
160 { |
|
161 return getStaticFunctionSlot<JSObject>(exec, &JSSVGForeignObjectElementPrototypeTable, this, propertyName, slot); |
|
162 } |
|
163 |
|
164 bool JSSVGForeignObjectElementPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
165 { |
|
166 return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGForeignObjectElementPrototypeTable, this, propertyName, descriptor); |
|
167 } |
|
168 |
|
169 const ClassInfo JSSVGForeignObjectElement::s_info = { "SVGForeignObjectElement", &JSSVGElement::s_info, &JSSVGForeignObjectElementTable, 0 }; |
|
170 |
|
171 JSSVGForeignObjectElement::JSSVGForeignObjectElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGForeignObjectElement> impl) |
|
172 : JSSVGElement(structure, globalObject, impl) |
|
173 { |
|
174 } |
|
175 |
|
176 JSObject* JSSVGForeignObjectElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
177 { |
|
178 return new (exec) JSSVGForeignObjectElementPrototype(globalObject, JSSVGForeignObjectElementPrototype::createStructure(JSSVGElementPrototype::self(exec, globalObject))); |
|
179 } |
|
180 |
|
181 bool JSSVGForeignObjectElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
182 { |
|
183 return getStaticValueSlot<JSSVGForeignObjectElement, Base>(exec, &JSSVGForeignObjectElementTable, this, propertyName, slot); |
|
184 } |
|
185 |
|
186 bool JSSVGForeignObjectElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
187 { |
|
188 return getStaticValueDescriptor<JSSVGForeignObjectElement, Base>(exec, &JSSVGForeignObjectElementTable, this, propertyName, descriptor); |
|
189 } |
|
190 |
|
191 JSValue jsSVGForeignObjectElementX(ExecState* exec, JSValue slotBase, const Identifier&) |
|
192 { |
|
193 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slotBase)); |
|
194 UNUSED_PARAM(exec); |
|
195 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
196 RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); |
|
197 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
198 return result; |
|
199 } |
|
200 |
|
201 JSValue jsSVGForeignObjectElementY(ExecState* exec, JSValue slotBase, const Identifier&) |
|
202 { |
|
203 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slotBase)); |
|
204 UNUSED_PARAM(exec); |
|
205 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
206 RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); |
|
207 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
208 return result; |
|
209 } |
|
210 |
|
211 JSValue jsSVGForeignObjectElementWidth(ExecState* exec, JSValue slotBase, const Identifier&) |
|
212 { |
|
213 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slotBase)); |
|
214 UNUSED_PARAM(exec); |
|
215 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
216 RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); |
|
217 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
218 return result; |
|
219 } |
|
220 |
|
221 JSValue jsSVGForeignObjectElementHeight(ExecState* exec, JSValue slotBase, const Identifier&) |
|
222 { |
|
223 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slotBase)); |
|
224 UNUSED_PARAM(exec); |
|
225 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
226 RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); |
|
227 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
228 return result; |
|
229 } |
|
230 |
|
231 JSValue jsSVGForeignObjectElementRequiredFeatures(ExecState* exec, JSValue slotBase, const Identifier&) |
|
232 { |
|
233 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slotBase)); |
|
234 UNUSED_PARAM(exec); |
|
235 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
236 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredFeatures()), imp); |
|
237 return result; |
|
238 } |
|
239 |
|
240 JSValue jsSVGForeignObjectElementRequiredExtensions(ExecState* exec, JSValue slotBase, const Identifier&) |
|
241 { |
|
242 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slotBase)); |
|
243 UNUSED_PARAM(exec); |
|
244 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
245 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->requiredExtensions()), imp); |
|
246 return result; |
|
247 } |
|
248 |
|
249 JSValue jsSVGForeignObjectElementSystemLanguage(ExecState* exec, JSValue slotBase, const Identifier&) |
|
250 { |
|
251 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slotBase)); |
|
252 UNUSED_PARAM(exec); |
|
253 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
254 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->systemLanguage()), imp); |
|
255 return result; |
|
256 } |
|
257 |
|
258 JSValue jsSVGForeignObjectElementXmllang(ExecState* exec, JSValue slotBase, const Identifier&) |
|
259 { |
|
260 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slotBase)); |
|
261 UNUSED_PARAM(exec); |
|
262 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
263 JSValue result = jsString(exec, imp->xmllang()); |
|
264 return result; |
|
265 } |
|
266 |
|
267 JSValue jsSVGForeignObjectElementXmlspace(ExecState* exec, JSValue slotBase, const Identifier&) |
|
268 { |
|
269 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slotBase)); |
|
270 UNUSED_PARAM(exec); |
|
271 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
272 JSValue result = jsString(exec, imp->xmlspace()); |
|
273 return result; |
|
274 } |
|
275 |
|
276 JSValue jsSVGForeignObjectElementExternalResourcesRequired(ExecState* exec, JSValue slotBase, const Identifier&) |
|
277 { |
|
278 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slotBase)); |
|
279 UNUSED_PARAM(exec); |
|
280 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
281 RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated(); |
|
282 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
283 return result; |
|
284 } |
|
285 |
|
286 JSValue jsSVGForeignObjectElementClassName(ExecState* exec, JSValue slotBase, const Identifier&) |
|
287 { |
|
288 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slotBase)); |
|
289 UNUSED_PARAM(exec); |
|
290 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
291 RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); |
|
292 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
293 return result; |
|
294 } |
|
295 |
|
296 JSValue jsSVGForeignObjectElementStyle(ExecState* exec, JSValue slotBase, const Identifier&) |
|
297 { |
|
298 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slotBase)); |
|
299 UNUSED_PARAM(exec); |
|
300 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
301 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style())); |
|
302 return result; |
|
303 } |
|
304 |
|
305 JSValue jsSVGForeignObjectElementTransform(ExecState* exec, JSValue slotBase, const Identifier&) |
|
306 { |
|
307 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slotBase)); |
|
308 UNUSED_PARAM(exec); |
|
309 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
310 RefPtr<SVGAnimatedTransformList> obj = imp->transformAnimated(); |
|
311 JSValue result = toJS(exec, castedThis->globalObject(), obj.get(), imp); |
|
312 return result; |
|
313 } |
|
314 |
|
315 JSValue jsSVGForeignObjectElementNearestViewportElement(ExecState* exec, JSValue slotBase, const Identifier&) |
|
316 { |
|
317 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slotBase)); |
|
318 UNUSED_PARAM(exec); |
|
319 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
320 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nearestViewportElement())); |
|
321 return result; |
|
322 } |
|
323 |
|
324 JSValue jsSVGForeignObjectElementFarthestViewportElement(ExecState* exec, JSValue slotBase, const Identifier&) |
|
325 { |
|
326 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(slotBase)); |
|
327 UNUSED_PARAM(exec); |
|
328 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
329 JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->farthestViewportElement())); |
|
330 return result; |
|
331 } |
|
332 |
|
333 JSValue jsSVGForeignObjectElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) |
|
334 { |
|
335 JSSVGForeignObjectElement* domObject = static_cast<JSSVGForeignObjectElement*>(asObject(slotBase)); |
|
336 return JSSVGForeignObjectElement::getConstructor(exec, domObject->globalObject()); |
|
337 } |
|
338 void JSSVGForeignObjectElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) |
|
339 { |
|
340 lookupPut<JSSVGForeignObjectElement, Base>(exec, propertyName, value, &JSSVGForeignObjectElementTable, this, slot); |
|
341 } |
|
342 |
|
343 void setJSSVGForeignObjectElementXmllang(ExecState* exec, JSObject* thisObject, JSValue value) |
|
344 { |
|
345 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(thisObject); |
|
346 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
347 imp->setXmllang(ustringToString(value.toString(exec))); |
|
348 } |
|
349 |
|
350 void setJSSVGForeignObjectElementXmlspace(ExecState* exec, JSObject* thisObject, JSValue value) |
|
351 { |
|
352 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(thisObject); |
|
353 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
354 imp->setXmlspace(ustringToString(value.toString(exec))); |
|
355 } |
|
356 |
|
357 JSValue JSSVGForeignObjectElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) |
|
358 { |
|
359 return getDOMConstructor<JSSVGForeignObjectElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); |
|
360 } |
|
361 |
|
362 EncodedJSValue JSC_HOST_CALL jsSVGForeignObjectElementPrototypeFunctionHasExtension(ExecState* exec) |
|
363 { |
|
364 JSValue thisValue = exec->hostThisValue(); |
|
365 if (!thisValue.inherits(&JSSVGForeignObjectElement::s_info)) |
|
366 return throwVMTypeError(exec); |
|
367 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(thisValue)); |
|
368 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
369 const String& extension = ustringToString(exec->argument(0).toString(exec)); |
|
370 |
|
371 |
|
372 JSC::JSValue result = jsBoolean(imp->hasExtension(extension)); |
|
373 return JSValue::encode(result); |
|
374 } |
|
375 |
|
376 EncodedJSValue JSC_HOST_CALL jsSVGForeignObjectElementPrototypeFunctionGetPresentationAttribute(ExecState* exec) |
|
377 { |
|
378 JSValue thisValue = exec->hostThisValue(); |
|
379 if (!thisValue.inherits(&JSSVGForeignObjectElement::s_info)) |
|
380 return throwVMTypeError(exec); |
|
381 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(thisValue)); |
|
382 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
383 const String& name = ustringToString(exec->argument(0).toString(exec)); |
|
384 |
|
385 |
|
386 JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name))); |
|
387 return JSValue::encode(result); |
|
388 } |
|
389 |
|
390 EncodedJSValue JSC_HOST_CALL jsSVGForeignObjectElementPrototypeFunctionGetBBox(ExecState* exec) |
|
391 { |
|
392 JSValue thisValue = exec->hostThisValue(); |
|
393 if (!thisValue.inherits(&JSSVGForeignObjectElement::s_info)) |
|
394 return throwVMTypeError(exec); |
|
395 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(thisValue)); |
|
396 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
397 |
|
398 |
|
399 JSC::JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<FloatRect>::create(imp->getBBox()).get(), 0 /* no context on purpose */); |
|
400 return JSValue::encode(result); |
|
401 } |
|
402 |
|
403 EncodedJSValue JSC_HOST_CALL jsSVGForeignObjectElementPrototypeFunctionGetCTM(ExecState* exec) |
|
404 { |
|
405 JSValue thisValue = exec->hostThisValue(); |
|
406 if (!thisValue.inherits(&JSSVGForeignObjectElement::s_info)) |
|
407 return throwVMTypeError(exec); |
|
408 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(thisValue)); |
|
409 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
410 |
|
411 |
|
412 JSC::JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getCTM()).get(), 0 /* no context on purpose */); |
|
413 return JSValue::encode(result); |
|
414 } |
|
415 |
|
416 EncodedJSValue JSC_HOST_CALL jsSVGForeignObjectElementPrototypeFunctionGetScreenCTM(ExecState* exec) |
|
417 { |
|
418 JSValue thisValue = exec->hostThisValue(); |
|
419 if (!thisValue.inherits(&JSSVGForeignObjectElement::s_info)) |
|
420 return throwVMTypeError(exec); |
|
421 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(thisValue)); |
|
422 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
423 |
|
424 |
|
425 JSC::JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getScreenCTM()).get(), 0 /* no context on purpose */); |
|
426 return JSValue::encode(result); |
|
427 } |
|
428 |
|
429 EncodedJSValue JSC_HOST_CALL jsSVGForeignObjectElementPrototypeFunctionGetTransformToElement(ExecState* exec) |
|
430 { |
|
431 JSValue thisValue = exec->hostThisValue(); |
|
432 if (!thisValue.inherits(&JSSVGForeignObjectElement::s_info)) |
|
433 return throwVMTypeError(exec); |
|
434 JSSVGForeignObjectElement* castedThis = static_cast<JSSVGForeignObjectElement*>(asObject(thisValue)); |
|
435 SVGForeignObjectElement* imp = static_cast<SVGForeignObjectElement*>(castedThis->impl()); |
|
436 ExceptionCode ec = 0; |
|
437 SVGElement* element = toSVGElement(exec->argument(0)); |
|
438 |
|
439 |
|
440 JSC::JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getTransformToElement(element, ec)).get(), 0 /* no context on purpose */); |
|
441 setDOMException(exec, ec); |
|
442 return JSValue::encode(result); |
|
443 } |
|
444 |
|
445 |
|
446 } |
|
447 |
|
448 #endif // ENABLE(SVG) && ENABLE(SVG_FOREIGN_OBJECT) |