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