|
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 "JSSVGTransform.h" |
|
26 |
|
27 #include "JSSVGMatrix.h" |
|
28 #include "SVGTransform.h" |
|
29 #include <runtime/Error.h> |
|
30 #include <runtime/JSNumberCell.h> |
|
31 #include <wtf/GetPtr.h> |
|
32 |
|
33 using namespace JSC; |
|
34 |
|
35 namespace WebCore { |
|
36 |
|
37 ASSERT_CLASS_FITS_IN_CELL(JSSVGTransform); |
|
38 |
|
39 /* Hash table */ |
|
40 #if ENABLE(JIT) |
|
41 #define THUNK_GENERATOR(generator) , generator |
|
42 #else |
|
43 #define THUNK_GENERATOR(generator) |
|
44 #endif |
|
45 |
|
46 static const HashTableValue JSSVGTransformTableValues[5] = |
|
47 { |
|
48 { "type", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTransformType), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
49 { "matrix", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTransformMatrix), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
50 { "angle", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTransformAngle), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
51 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTransformConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
52 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
53 }; |
|
54 |
|
55 #undef THUNK_GENERATOR |
|
56 static JSC_CONST_HASHTABLE HashTable JSSVGTransformTable = { 9, 7, JSSVGTransformTableValues, 0 }; |
|
57 /* Hash table for constructor */ |
|
58 #if ENABLE(JIT) |
|
59 #define THUNK_GENERATOR(generator) , generator |
|
60 #else |
|
61 #define THUNK_GENERATOR(generator) |
|
62 #endif |
|
63 |
|
64 static const HashTableValue JSSVGTransformConstructorTableValues[8] = |
|
65 { |
|
66 { "SVG_TRANSFORM_UNKNOWN", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTransformSVG_TRANSFORM_UNKNOWN), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
67 { "SVG_TRANSFORM_MATRIX", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTransformSVG_TRANSFORM_MATRIX), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
68 { "SVG_TRANSFORM_TRANSLATE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTransformSVG_TRANSFORM_TRANSLATE), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
69 { "SVG_TRANSFORM_SCALE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTransformSVG_TRANSFORM_SCALE), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
70 { "SVG_TRANSFORM_ROTATE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTransformSVG_TRANSFORM_ROTATE), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
71 { "SVG_TRANSFORM_SKEWX", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTransformSVG_TRANSFORM_SKEWX), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
72 { "SVG_TRANSFORM_SKEWY", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTransformSVG_TRANSFORM_SKEWY), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
73 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
74 }; |
|
75 |
|
76 #undef THUNK_GENERATOR |
|
77 static JSC_CONST_HASHTABLE HashTable JSSVGTransformConstructorTable = { 18, 15, JSSVGTransformConstructorTableValues, 0 }; |
|
78 |
|
79 COMPILE_ASSERT(0 == SVGTransform::SVG_TRANSFORM_UNKNOWN, SVGTransformEnumSVG_TRANSFORM_UNKNOWNIsWrongUseDontCheckEnums); |
|
80 COMPILE_ASSERT(1 == SVGTransform::SVG_TRANSFORM_MATRIX, SVGTransformEnumSVG_TRANSFORM_MATRIXIsWrongUseDontCheckEnums); |
|
81 COMPILE_ASSERT(2 == SVGTransform::SVG_TRANSFORM_TRANSLATE, SVGTransformEnumSVG_TRANSFORM_TRANSLATEIsWrongUseDontCheckEnums); |
|
82 COMPILE_ASSERT(3 == SVGTransform::SVG_TRANSFORM_SCALE, SVGTransformEnumSVG_TRANSFORM_SCALEIsWrongUseDontCheckEnums); |
|
83 COMPILE_ASSERT(4 == SVGTransform::SVG_TRANSFORM_ROTATE, SVGTransformEnumSVG_TRANSFORM_ROTATEIsWrongUseDontCheckEnums); |
|
84 COMPILE_ASSERT(5 == SVGTransform::SVG_TRANSFORM_SKEWX, SVGTransformEnumSVG_TRANSFORM_SKEWXIsWrongUseDontCheckEnums); |
|
85 COMPILE_ASSERT(6 == SVGTransform::SVG_TRANSFORM_SKEWY, SVGTransformEnumSVG_TRANSFORM_SKEWYIsWrongUseDontCheckEnums); |
|
86 |
|
87 class JSSVGTransformConstructor : public DOMConstructorObject { |
|
88 public: |
|
89 JSSVGTransformConstructor(JSC::ExecState*, JSDOMGlobalObject*); |
|
90 |
|
91 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
92 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
93 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
94 static const JSC::ClassInfo s_info; |
|
95 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
96 { |
|
97 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
98 } |
|
99 protected: |
|
100 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; |
|
101 }; |
|
102 |
|
103 const ClassInfo JSSVGTransformConstructor::s_info = { "SVGTransformConstructor", 0, &JSSVGTransformConstructorTable, 0 }; |
|
104 |
|
105 JSSVGTransformConstructor::JSSVGTransformConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) |
|
106 : DOMConstructorObject(JSSVGTransformConstructor::createStructure(globalObject->objectPrototype()), globalObject) |
|
107 { |
|
108 putDirect(exec->propertyNames().prototype, JSSVGTransformPrototype::self(exec, globalObject), DontDelete | ReadOnly); |
|
109 } |
|
110 |
|
111 bool JSSVGTransformConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
112 { |
|
113 return getStaticValueSlot<JSSVGTransformConstructor, DOMObject>(exec, &JSSVGTransformConstructorTable, this, propertyName, slot); |
|
114 } |
|
115 |
|
116 bool JSSVGTransformConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
117 { |
|
118 return getStaticValueDescriptor<JSSVGTransformConstructor, DOMObject>(exec, &JSSVGTransformConstructorTable, this, propertyName, descriptor); |
|
119 } |
|
120 |
|
121 /* Hash table for prototype */ |
|
122 #if ENABLE(JIT) |
|
123 #define THUNK_GENERATOR(generator) , generator |
|
124 #else |
|
125 #define THUNK_GENERATOR(generator) |
|
126 #endif |
|
127 |
|
128 static const HashTableValue JSSVGTransformPrototypeTableValues[14] = |
|
129 { |
|
130 { "SVG_TRANSFORM_UNKNOWN", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTransformSVG_TRANSFORM_UNKNOWN), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
131 { "SVG_TRANSFORM_MATRIX", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTransformSVG_TRANSFORM_MATRIX), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
132 { "SVG_TRANSFORM_TRANSLATE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTransformSVG_TRANSFORM_TRANSLATE), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
133 { "SVG_TRANSFORM_SCALE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTransformSVG_TRANSFORM_SCALE), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
134 { "SVG_TRANSFORM_ROTATE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTransformSVG_TRANSFORM_ROTATE), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
135 { "SVG_TRANSFORM_SKEWX", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTransformSVG_TRANSFORM_SKEWX), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
136 { "SVG_TRANSFORM_SKEWY", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGTransformSVG_TRANSFORM_SKEWY), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
137 { "setMatrix", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGTransformPrototypeFunctionSetMatrix), (intptr_t)1 THUNK_GENERATOR(0) }, |
|
138 { "setTranslate", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGTransformPrototypeFunctionSetTranslate), (intptr_t)2 THUNK_GENERATOR(0) }, |
|
139 { "setScale", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGTransformPrototypeFunctionSetScale), (intptr_t)2 THUNK_GENERATOR(0) }, |
|
140 { "setRotate", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGTransformPrototypeFunctionSetRotate), (intptr_t)3 THUNK_GENERATOR(0) }, |
|
141 { "setSkewX", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGTransformPrototypeFunctionSetSkewX), (intptr_t)1 THUNK_GENERATOR(0) }, |
|
142 { "setSkewY", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsSVGTransformPrototypeFunctionSetSkewY), (intptr_t)1 THUNK_GENERATOR(0) }, |
|
143 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
144 }; |
|
145 |
|
146 #undef THUNK_GENERATOR |
|
147 static JSC_CONST_HASHTABLE HashTable JSSVGTransformPrototypeTable = { 34, 31, JSSVGTransformPrototypeTableValues, 0 }; |
|
148 const ClassInfo JSSVGTransformPrototype::s_info = { "SVGTransformPrototype", 0, &JSSVGTransformPrototypeTable, 0 }; |
|
149 |
|
150 JSObject* JSSVGTransformPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
151 { |
|
152 return getDOMPrototype<JSSVGTransform>(exec, globalObject); |
|
153 } |
|
154 |
|
155 bool JSSVGTransformPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
156 { |
|
157 return getStaticPropertySlot<JSSVGTransformPrototype, JSObject>(exec, &JSSVGTransformPrototypeTable, this, propertyName, slot); |
|
158 } |
|
159 |
|
160 bool JSSVGTransformPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
161 { |
|
162 return getStaticPropertyDescriptor<JSSVGTransformPrototype, JSObject>(exec, &JSSVGTransformPrototypeTable, this, propertyName, descriptor); |
|
163 } |
|
164 |
|
165 const ClassInfo JSSVGTransform::s_info = { "SVGTransform", 0, &JSSVGTransformTable, 0 }; |
|
166 |
|
167 JSSVGTransform::JSSVGTransform(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<JSSVGPODTypeWrapper<SVGTransform> > impl) |
|
168 : DOMObjectWithGlobalPointer(structure, globalObject) |
|
169 , m_impl(impl) |
|
170 { |
|
171 } |
|
172 |
|
173 JSSVGTransform::~JSSVGTransform() |
|
174 { |
|
175 forgetDOMObject(this, impl()); |
|
176 JSSVGContextCache::forgetWrapper(this); |
|
177 } |
|
178 |
|
179 JSObject* JSSVGTransform::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
180 { |
|
181 return new (exec) JSSVGTransformPrototype(globalObject, JSSVGTransformPrototype::createStructure(globalObject->objectPrototype())); |
|
182 } |
|
183 |
|
184 bool JSSVGTransform::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
185 { |
|
186 return getStaticValueSlot<JSSVGTransform, Base>(exec, &JSSVGTransformTable, this, propertyName, slot); |
|
187 } |
|
188 |
|
189 bool JSSVGTransform::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
190 { |
|
191 return getStaticValueDescriptor<JSSVGTransform, Base>(exec, &JSSVGTransformTable, this, propertyName, descriptor); |
|
192 } |
|
193 |
|
194 JSValue jsSVGTransformType(ExecState* exec, JSValue slotBase, const Identifier&) |
|
195 { |
|
196 JSSVGTransform* castedThis = static_cast<JSSVGTransform*>(asObject(slotBase)); |
|
197 UNUSED_PARAM(exec); |
|
198 SVGTransform imp(*castedThis->impl()); |
|
199 JSValue result = jsNumber(exec, imp.type()); |
|
200 return result; |
|
201 } |
|
202 |
|
203 JSValue jsSVGTransformMatrix(ExecState* exec, JSValue slotBase, const Identifier&) |
|
204 { |
|
205 JSSVGTransform* castedThis = static_cast<JSSVGTransform*>(asObject(slotBase)); |
|
206 UNUSED_PARAM(exec); |
|
207 SVGTransform imp(*castedThis->impl()); |
|
208 JSValue result = toJS(exec, castedThis->globalObject(), JSSVGStaticPODTypeWrapperWithPODTypeParent<AffineTransform, SVGTransform>::create(imp.matrix(), castedThis->impl()).get(), JSSVGContextCache::svgContextForDOMObject(castedThis)); |
|
209 return result; |
|
210 } |
|
211 |
|
212 JSValue jsSVGTransformAngle(ExecState* exec, JSValue slotBase, const Identifier&) |
|
213 { |
|
214 JSSVGTransform* castedThis = static_cast<JSSVGTransform*>(asObject(slotBase)); |
|
215 UNUSED_PARAM(exec); |
|
216 SVGTransform imp(*castedThis->impl()); |
|
217 JSValue result = jsNumber(exec, imp.angle()); |
|
218 return result; |
|
219 } |
|
220 |
|
221 JSValue jsSVGTransformConstructor(ExecState* exec, JSValue slotBase, const Identifier&) |
|
222 { |
|
223 JSSVGTransform* domObject = static_cast<JSSVGTransform*>(asObject(slotBase)); |
|
224 return JSSVGTransform::getConstructor(exec, domObject->globalObject()); |
|
225 } |
|
226 JSValue JSSVGTransform::getConstructor(ExecState* exec, JSGlobalObject* globalObject) |
|
227 { |
|
228 return getDOMConstructor<JSSVGTransformConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); |
|
229 } |
|
230 |
|
231 EncodedJSValue JSC_HOST_CALL jsSVGTransformPrototypeFunctionSetMatrix(ExecState* exec) |
|
232 { |
|
233 JSValue thisValue = exec->hostThisValue(); |
|
234 if (!thisValue.inherits(&JSSVGTransform::s_info)) |
|
235 return throwVMTypeError(exec); |
|
236 JSSVGTransform* castedThis = static_cast<JSSVGTransform*>(asObject(thisValue)); |
|
237 JSSVGPODTypeWrapper<SVGTransform> * imp = static_cast<JSSVGPODTypeWrapper<SVGTransform> *>(castedThis->impl()); |
|
238 SVGTransform podImp(*imp); |
|
239 AffineTransform matrix = toSVGMatrix(exec->argument(0)); |
|
240 |
|
241 podImp.setMatrix(matrix); |
|
242 imp->commitChange(podImp, castedThis); |
|
243 return JSValue::encode(jsUndefined()); |
|
244 } |
|
245 |
|
246 EncodedJSValue JSC_HOST_CALL jsSVGTransformPrototypeFunctionSetTranslate(ExecState* exec) |
|
247 { |
|
248 JSValue thisValue = exec->hostThisValue(); |
|
249 if (!thisValue.inherits(&JSSVGTransform::s_info)) |
|
250 return throwVMTypeError(exec); |
|
251 JSSVGTransform* castedThis = static_cast<JSSVGTransform*>(asObject(thisValue)); |
|
252 JSSVGPODTypeWrapper<SVGTransform> * imp = static_cast<JSSVGPODTypeWrapper<SVGTransform> *>(castedThis->impl()); |
|
253 SVGTransform podImp(*imp); |
|
254 float tx = exec->argument(0).toFloat(exec); |
|
255 float ty = exec->argument(1).toFloat(exec); |
|
256 |
|
257 podImp.setTranslate(tx, ty); |
|
258 imp->commitChange(podImp, castedThis); |
|
259 return JSValue::encode(jsUndefined()); |
|
260 } |
|
261 |
|
262 EncodedJSValue JSC_HOST_CALL jsSVGTransformPrototypeFunctionSetScale(ExecState* exec) |
|
263 { |
|
264 JSValue thisValue = exec->hostThisValue(); |
|
265 if (!thisValue.inherits(&JSSVGTransform::s_info)) |
|
266 return throwVMTypeError(exec); |
|
267 JSSVGTransform* castedThis = static_cast<JSSVGTransform*>(asObject(thisValue)); |
|
268 JSSVGPODTypeWrapper<SVGTransform> * imp = static_cast<JSSVGPODTypeWrapper<SVGTransform> *>(castedThis->impl()); |
|
269 SVGTransform podImp(*imp); |
|
270 float sx = exec->argument(0).toFloat(exec); |
|
271 float sy = exec->argument(1).toFloat(exec); |
|
272 |
|
273 podImp.setScale(sx, sy); |
|
274 imp->commitChange(podImp, castedThis); |
|
275 return JSValue::encode(jsUndefined()); |
|
276 } |
|
277 |
|
278 EncodedJSValue JSC_HOST_CALL jsSVGTransformPrototypeFunctionSetRotate(ExecState* exec) |
|
279 { |
|
280 JSValue thisValue = exec->hostThisValue(); |
|
281 if (!thisValue.inherits(&JSSVGTransform::s_info)) |
|
282 return throwVMTypeError(exec); |
|
283 JSSVGTransform* castedThis = static_cast<JSSVGTransform*>(asObject(thisValue)); |
|
284 JSSVGPODTypeWrapper<SVGTransform> * imp = static_cast<JSSVGPODTypeWrapper<SVGTransform> *>(castedThis->impl()); |
|
285 SVGTransform podImp(*imp); |
|
286 float angle = exec->argument(0).toFloat(exec); |
|
287 float cx = exec->argument(1).toFloat(exec); |
|
288 float cy = exec->argument(2).toFloat(exec); |
|
289 |
|
290 podImp.setRotate(angle, cx, cy); |
|
291 imp->commitChange(podImp, castedThis); |
|
292 return JSValue::encode(jsUndefined()); |
|
293 } |
|
294 |
|
295 EncodedJSValue JSC_HOST_CALL jsSVGTransformPrototypeFunctionSetSkewX(ExecState* exec) |
|
296 { |
|
297 JSValue thisValue = exec->hostThisValue(); |
|
298 if (!thisValue.inherits(&JSSVGTransform::s_info)) |
|
299 return throwVMTypeError(exec); |
|
300 JSSVGTransform* castedThis = static_cast<JSSVGTransform*>(asObject(thisValue)); |
|
301 JSSVGPODTypeWrapper<SVGTransform> * imp = static_cast<JSSVGPODTypeWrapper<SVGTransform> *>(castedThis->impl()); |
|
302 SVGTransform podImp(*imp); |
|
303 float angle = exec->argument(0).toFloat(exec); |
|
304 |
|
305 podImp.setSkewX(angle); |
|
306 imp->commitChange(podImp, castedThis); |
|
307 return JSValue::encode(jsUndefined()); |
|
308 } |
|
309 |
|
310 EncodedJSValue JSC_HOST_CALL jsSVGTransformPrototypeFunctionSetSkewY(ExecState* exec) |
|
311 { |
|
312 JSValue thisValue = exec->hostThisValue(); |
|
313 if (!thisValue.inherits(&JSSVGTransform::s_info)) |
|
314 return throwVMTypeError(exec); |
|
315 JSSVGTransform* castedThis = static_cast<JSSVGTransform*>(asObject(thisValue)); |
|
316 JSSVGPODTypeWrapper<SVGTransform> * imp = static_cast<JSSVGPODTypeWrapper<SVGTransform> *>(castedThis->impl()); |
|
317 SVGTransform podImp(*imp); |
|
318 float angle = exec->argument(0).toFloat(exec); |
|
319 |
|
320 podImp.setSkewY(angle); |
|
321 imp->commitChange(podImp, castedThis); |
|
322 return JSValue::encode(jsUndefined()); |
|
323 } |
|
324 |
|
325 // Constant getters |
|
326 |
|
327 JSValue jsSVGTransformSVG_TRANSFORM_UNKNOWN(ExecState* exec, JSValue, const Identifier&) |
|
328 { |
|
329 return jsNumber(exec, static_cast<int>(0)); |
|
330 } |
|
331 |
|
332 JSValue jsSVGTransformSVG_TRANSFORM_MATRIX(ExecState* exec, JSValue, const Identifier&) |
|
333 { |
|
334 return jsNumber(exec, static_cast<int>(1)); |
|
335 } |
|
336 |
|
337 JSValue jsSVGTransformSVG_TRANSFORM_TRANSLATE(ExecState* exec, JSValue, const Identifier&) |
|
338 { |
|
339 return jsNumber(exec, static_cast<int>(2)); |
|
340 } |
|
341 |
|
342 JSValue jsSVGTransformSVG_TRANSFORM_SCALE(ExecState* exec, JSValue, const Identifier&) |
|
343 { |
|
344 return jsNumber(exec, static_cast<int>(3)); |
|
345 } |
|
346 |
|
347 JSValue jsSVGTransformSVG_TRANSFORM_ROTATE(ExecState* exec, JSValue, const Identifier&) |
|
348 { |
|
349 return jsNumber(exec, static_cast<int>(4)); |
|
350 } |
|
351 |
|
352 JSValue jsSVGTransformSVG_TRANSFORM_SKEWX(ExecState* exec, JSValue, const Identifier&) |
|
353 { |
|
354 return jsNumber(exec, static_cast<int>(5)); |
|
355 } |
|
356 |
|
357 JSValue jsSVGTransformSVG_TRANSFORM_SKEWY(ExecState* exec, JSValue, const Identifier&) |
|
358 { |
|
359 return jsNumber(exec, static_cast<int>(6)); |
|
360 } |
|
361 |
|
362 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, JSSVGPODTypeWrapper<SVGTransform>* object, SVGElement* context) |
|
363 { |
|
364 return getDOMObjectWrapper<JSSVGTransform, JSSVGPODTypeWrapper<SVGTransform> >(exec, globalObject, object, context); |
|
365 } |
|
366 SVGTransform toSVGTransform(JSC::JSValue value) |
|
367 { |
|
368 return value.inherits(&JSSVGTransform::s_info) ? (SVGTransform) *static_cast<JSSVGTransform*>(asObject(value))->impl() : SVGTransform(); |
|
369 } |
|
370 |
|
371 } |
|
372 |
|
373 #endif // ENABLE(SVG) |