~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/generated/JSSVGMatrix.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
#include "config.h"
22
22
 
23
 
 
24
23
#if ENABLE(SVG)
25
24
 
26
 
#include "SVGElement.h"
27
 
#include "JSSVGMatrix.h"
28
 
 
29
 
#include <wtf/GetPtr.h>
30
 
 
31
 
 
 
25
#include "JSSVGMatrix.h"
 
26
 
 
27
#include "JSSVGMatrix.h"
32
28
#include <runtime/Error.h>
33
29
#include <runtime/JSNumberCell.h>
 
30
#include <wtf/GetPtr.h>
34
31
 
35
32
using namespace JSC;
36
33
 
37
34
namespace WebCore {
38
35
 
39
 
ASSERT_CLASS_FITS_IN_CELL(JSSVGMatrix)
 
36
ASSERT_CLASS_FITS_IN_CELL(JSSVGMatrix);
40
37
 
41
38
/* Hash table */
42
39
 
51
48
    { 0, 0, 0, 0 }
52
49
};
53
50
 
54
 
static const HashTable JSSVGMatrixTable =
 
51
static JSC_CONST_HASHTABLE HashTable JSSVGMatrixTable =
55
52
#if ENABLE(PERFECT_HASH_SIZE)
56
53
    { 15, JSSVGMatrixTableValues, 0 };
57
54
#else
76
73
    { 0, 0, 0, 0 }
77
74
};
78
75
 
79
 
static const HashTable JSSVGMatrixPrototypeTable =
 
76
static JSC_CONST_HASHTABLE HashTable JSSVGMatrixPrototypeTable =
80
77
#if ENABLE(PERFECT_HASH_SIZE)
81
78
    { 63, JSSVGMatrixPrototypeTableValues, 0 };
82
79
#else
95
92
    return getStaticFunctionSlot<JSObject>(exec, &JSSVGMatrixPrototypeTable, this, propertyName, slot);
96
93
}
97
94
 
 
95
bool JSSVGMatrixPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 
96
{
 
97
    return getStaticFunctionDescriptor<JSObject>(exec, &JSSVGMatrixPrototypeTable, this, propertyName, descriptor);
 
98
}
 
99
 
98
100
const ClassInfo JSSVGMatrix::s_info = { "SVGMatrix", 0, &JSSVGMatrixTable, 0 };
99
101
 
100
 
JSSVGMatrix::JSSVGMatrix(PassRefPtr<Structure> structure, PassRefPtr<JSSVGPODTypeWrapper<TransformationMatrix> > impl, SVGElement* context)
101
 
    : DOMObject(structure)
102
 
    , m_context(context)
 
102
JSSVGMatrix::JSSVGMatrix(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<JSSVGPODTypeWrapper<TransformationMatrix> > impl, SVGElement* context)
 
103
    : DOMObjectWithSVGContext(structure, globalObject, context)
103
104
    , m_impl(impl)
104
105
{
105
106
}
106
107
 
107
108
JSSVGMatrix::~JSSVGMatrix()
108
109
{
109
 
    forgetDOMObject(*Heap::heap(this)->globalData(), m_impl.get());
110
 
 
 
110
    forgetDOMObject(*Heap::heap(this)->globalData(), impl());
111
111
}
112
112
 
113
113
JSObject* JSSVGMatrix::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
120
120
    return getStaticValueSlot<JSSVGMatrix, Base>(exec, &JSSVGMatrixTable, this, propertyName, slot);
121
121
}
122
122
 
123
 
JSValuePtr jsSVGMatrixA(ExecState* exec, const Identifier&, const PropertySlot& slot)
124
 
{
125
 
    TransformationMatrix imp(*static_cast<JSSVGMatrix*>(asObject(slot.slotBase()))->impl());
 
123
bool JSSVGMatrix::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 
124
{
 
125
    return getStaticValueDescriptor<JSSVGMatrix, Base>(exec, &JSSVGMatrixTable, this, propertyName, descriptor);
 
126
}
 
127
 
 
128
JSValue jsSVGMatrixA(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
129
{
 
130
    JSSVGMatrix* castedThis = static_cast<JSSVGMatrix*>(asObject(slot.slotBase()));
 
131
    UNUSED_PARAM(exec);
 
132
    TransformationMatrix imp(*castedThis->impl());
126
133
    return jsNumber(exec, imp.a());
127
134
}
128
135
 
129
 
JSValuePtr jsSVGMatrixB(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
136
JSValue jsSVGMatrixB(ExecState* exec, const Identifier&, const PropertySlot& slot)
130
137
{
131
 
    TransformationMatrix imp(*static_cast<JSSVGMatrix*>(asObject(slot.slotBase()))->impl());
 
138
    JSSVGMatrix* castedThis = static_cast<JSSVGMatrix*>(asObject(slot.slotBase()));
 
139
    UNUSED_PARAM(exec);
 
140
    TransformationMatrix imp(*castedThis->impl());
132
141
    return jsNumber(exec, imp.b());
133
142
}
134
143
 
135
 
JSValuePtr jsSVGMatrixC(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
144
JSValue jsSVGMatrixC(ExecState* exec, const Identifier&, const PropertySlot& slot)
136
145
{
137
 
    TransformationMatrix imp(*static_cast<JSSVGMatrix*>(asObject(slot.slotBase()))->impl());
 
146
    JSSVGMatrix* castedThis = static_cast<JSSVGMatrix*>(asObject(slot.slotBase()));
 
147
    UNUSED_PARAM(exec);
 
148
    TransformationMatrix imp(*castedThis->impl());
138
149
    return jsNumber(exec, imp.c());
139
150
}
140
151
 
141
 
JSValuePtr jsSVGMatrixD(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
152
JSValue jsSVGMatrixD(ExecState* exec, const Identifier&, const PropertySlot& slot)
142
153
{
143
 
    TransformationMatrix imp(*static_cast<JSSVGMatrix*>(asObject(slot.slotBase()))->impl());
 
154
    JSSVGMatrix* castedThis = static_cast<JSSVGMatrix*>(asObject(slot.slotBase()));
 
155
    UNUSED_PARAM(exec);
 
156
    TransformationMatrix imp(*castedThis->impl());
144
157
    return jsNumber(exec, imp.d());
145
158
}
146
159
 
147
 
JSValuePtr jsSVGMatrixE(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
160
JSValue jsSVGMatrixE(ExecState* exec, const Identifier&, const PropertySlot& slot)
148
161
{
149
 
    TransformationMatrix imp(*static_cast<JSSVGMatrix*>(asObject(slot.slotBase()))->impl());
 
162
    JSSVGMatrix* castedThis = static_cast<JSSVGMatrix*>(asObject(slot.slotBase()));
 
163
    UNUSED_PARAM(exec);
 
164
    TransformationMatrix imp(*castedThis->impl());
150
165
    return jsNumber(exec, imp.e());
151
166
}
152
167
 
153
 
JSValuePtr jsSVGMatrixF(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
168
JSValue jsSVGMatrixF(ExecState* exec, const Identifier&, const PropertySlot& slot)
154
169
{
155
 
    TransformationMatrix imp(*static_cast<JSSVGMatrix*>(asObject(slot.slotBase()))->impl());
 
170
    JSSVGMatrix* castedThis = static_cast<JSSVGMatrix*>(asObject(slot.slotBase()));
 
171
    UNUSED_PARAM(exec);
 
172
    TransformationMatrix imp(*castedThis->impl());
156
173
    return jsNumber(exec, imp.f());
157
174
}
158
175
 
159
 
void JSSVGMatrix::put(ExecState* exec, const Identifier& propertyName, JSValuePtr value, PutPropertySlot& slot)
 
176
void JSSVGMatrix::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
160
177
{
161
178
    lookupPut<JSSVGMatrix, Base>(exec, propertyName, value, &JSSVGMatrixTable, this, slot);
162
179
}
163
180
 
164
 
void setJSSVGMatrixA(ExecState* exec, JSObject* thisObject, JSValuePtr value)
165
 
{
166
 
    TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
167
 
    imp.setA(value->toNumber(exec));
168
 
        static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
169
 
}
170
 
 
171
 
void setJSSVGMatrixB(ExecState* exec, JSObject* thisObject, JSValuePtr value)
172
 
{
173
 
    TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
174
 
    imp.setB(value->toNumber(exec));
175
 
        static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
176
 
}
177
 
 
178
 
void setJSSVGMatrixC(ExecState* exec, JSObject* thisObject, JSValuePtr value)
179
 
{
180
 
    TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
181
 
    imp.setC(value->toNumber(exec));
182
 
        static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
183
 
}
184
 
 
185
 
void setJSSVGMatrixD(ExecState* exec, JSObject* thisObject, JSValuePtr value)
186
 
{
187
 
    TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
188
 
    imp.setD(value->toNumber(exec));
189
 
        static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
190
 
}
191
 
 
192
 
void setJSSVGMatrixE(ExecState* exec, JSObject* thisObject, JSValuePtr value)
193
 
{
194
 
    TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
195
 
    imp.setE(value->toNumber(exec));
196
 
        static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
197
 
}
198
 
 
199
 
void setJSSVGMatrixF(ExecState* exec, JSObject* thisObject, JSValuePtr value)
200
 
{
201
 
    TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
202
 
    imp.setF(value->toNumber(exec));
203
 
        static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
204
 
}
205
 
 
206
 
JSValuePtr jsSVGMatrixPrototypeFunctionMultiply(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
207
 
{
208
 
    if (!thisValue->isObject(&JSSVGMatrix::s_info))
 
181
void setJSSVGMatrixA(ExecState* exec, JSObject* thisObject, JSValue value)
 
182
{
 
183
    TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
 
184
    imp.setA(value.toNumber(exec));
 
185
        static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
 
186
}
 
187
 
 
188
void setJSSVGMatrixB(ExecState* exec, JSObject* thisObject, JSValue value)
 
189
{
 
190
    TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
 
191
    imp.setB(value.toNumber(exec));
 
192
        static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
 
193
}
 
194
 
 
195
void setJSSVGMatrixC(ExecState* exec, JSObject* thisObject, JSValue value)
 
196
{
 
197
    TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
 
198
    imp.setC(value.toNumber(exec));
 
199
        static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
 
200
}
 
201
 
 
202
void setJSSVGMatrixD(ExecState* exec, JSObject* thisObject, JSValue value)
 
203
{
 
204
    TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
 
205
    imp.setD(value.toNumber(exec));
 
206
        static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
 
207
}
 
208
 
 
209
void setJSSVGMatrixE(ExecState* exec, JSObject* thisObject, JSValue value)
 
210
{
 
211
    TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
 
212
    imp.setE(value.toNumber(exec));
 
213
        static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
 
214
}
 
215
 
 
216
void setJSSVGMatrixF(ExecState* exec, JSObject* thisObject, JSValue value)
 
217
{
 
218
    TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
 
219
    imp.setF(value.toNumber(exec));
 
220
        static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
 
221
}
 
222
 
 
223
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionMultiply(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
 
224
{
 
225
    UNUSED_PARAM(args);
 
226
    if (!thisValue.inherits(&JSSVGMatrix::s_info))
209
227
        return throwError(exec, TypeError);
210
228
    JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
211
 
    return castedThisObj->multiply(exec, args);
 
229
    JSSVGPODTypeWrapper<TransformationMatrix>* wrapper = castedThisObj->impl();
 
230
    TransformationMatrix imp(*wrapper);
 
231
    TransformationMatrix secondMatrix = toSVGMatrix(args.at(0));
 
232
 
 
233
 
 
234
    JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.multiply(secondMatrix)).get(), castedThisObj->context());
 
235
    return result;
212
236
}
213
237
 
214
 
JSValuePtr jsSVGMatrixPrototypeFunctionInverse(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
 
238
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionInverse(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
215
239
{
216
 
    if (!thisValue->isObject(&JSSVGMatrix::s_info))
 
240
    UNUSED_PARAM(args);
 
241
    if (!thisValue.inherits(&JSSVGMatrix::s_info))
217
242
        return throwError(exec, TypeError);
218
243
    JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
219
244
    return castedThisObj->inverse(exec, args);
220
245
}
221
246
 
222
 
JSValuePtr jsSVGMatrixPrototypeFunctionTranslate(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
223
 
{
224
 
    if (!thisValue->isObject(&JSSVGMatrix::s_info))
225
 
        return throwError(exec, TypeError);
226
 
    JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
227
 
    return castedThisObj->translate(exec, args);
228
 
}
229
 
 
230
 
JSValuePtr jsSVGMatrixPrototypeFunctionScale(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
231
 
{
232
 
    if (!thisValue->isObject(&JSSVGMatrix::s_info))
233
 
        return throwError(exec, TypeError);
234
 
    JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
235
 
    return castedThisObj->scale(exec, args);
236
 
}
237
 
 
238
 
JSValuePtr jsSVGMatrixPrototypeFunctionScaleNonUniform(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
239
 
{
240
 
    if (!thisValue->isObject(&JSSVGMatrix::s_info))
241
 
        return throwError(exec, TypeError);
242
 
    JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
243
 
    return castedThisObj->scaleNonUniform(exec, args);
244
 
}
245
 
 
246
 
JSValuePtr jsSVGMatrixPrototypeFunctionRotate(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
247
 
{
248
 
    if (!thisValue->isObject(&JSSVGMatrix::s_info))
249
 
        return throwError(exec, TypeError);
250
 
    JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
251
 
    return castedThisObj->rotate(exec, args);
252
 
}
253
 
 
254
 
JSValuePtr jsSVGMatrixPrototypeFunctionRotateFromVector(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
255
 
{
256
 
    if (!thisValue->isObject(&JSSVGMatrix::s_info))
 
247
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionTranslate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
 
248
{
 
249
    UNUSED_PARAM(args);
 
250
    if (!thisValue.inherits(&JSSVGMatrix::s_info))
 
251
        return throwError(exec, TypeError);
 
252
    JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
 
253
    JSSVGPODTypeWrapper<TransformationMatrix>* wrapper = castedThisObj->impl();
 
254
    TransformationMatrix imp(*wrapper);
 
255
    float x = args.at(0).toFloat(exec);
 
256
    float y = args.at(1).toFloat(exec);
 
257
 
 
258
 
 
259
    JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.translate(x, y)).get(), castedThisObj->context());
 
260
    return result;
 
261
}
 
262
 
 
263
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionScale(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
 
264
{
 
265
    UNUSED_PARAM(args);
 
266
    if (!thisValue.inherits(&JSSVGMatrix::s_info))
 
267
        return throwError(exec, TypeError);
 
268
    JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
 
269
    JSSVGPODTypeWrapper<TransformationMatrix>* wrapper = castedThisObj->impl();
 
270
    TransformationMatrix imp(*wrapper);
 
271
    float scaleFactor = args.at(0).toFloat(exec);
 
272
 
 
273
 
 
274
    JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.scale(scaleFactor)).get(), castedThisObj->context());
 
275
    return result;
 
276
}
 
277
 
 
278
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionScaleNonUniform(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
 
279
{
 
280
    UNUSED_PARAM(args);
 
281
    if (!thisValue.inherits(&JSSVGMatrix::s_info))
 
282
        return throwError(exec, TypeError);
 
283
    JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
 
284
    JSSVGPODTypeWrapper<TransformationMatrix>* wrapper = castedThisObj->impl();
 
285
    TransformationMatrix imp(*wrapper);
 
286
    float scaleFactorX = args.at(0).toFloat(exec);
 
287
    float scaleFactorY = args.at(1).toFloat(exec);
 
288
 
 
289
 
 
290
    JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.scaleNonUniform(scaleFactorX, scaleFactorY)).get(), castedThisObj->context());
 
291
    return result;
 
292
}
 
293
 
 
294
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionRotate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
 
295
{
 
296
    UNUSED_PARAM(args);
 
297
    if (!thisValue.inherits(&JSSVGMatrix::s_info))
 
298
        return throwError(exec, TypeError);
 
299
    JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
 
300
    JSSVGPODTypeWrapper<TransformationMatrix>* wrapper = castedThisObj->impl();
 
301
    TransformationMatrix imp(*wrapper);
 
302
    float angle = args.at(0).toFloat(exec);
 
303
 
 
304
 
 
305
    JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.rotate(angle)).get(), castedThisObj->context());
 
306
    return result;
 
307
}
 
308
 
 
309
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionRotateFromVector(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
 
310
{
 
311
    UNUSED_PARAM(args);
 
312
    if (!thisValue.inherits(&JSSVGMatrix::s_info))
257
313
        return throwError(exec, TypeError);
258
314
    JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
259
315
    return castedThisObj->rotateFromVector(exec, args);
260
316
}
261
317
 
262
 
JSValuePtr jsSVGMatrixPrototypeFunctionFlipX(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
263
 
{
264
 
    if (!thisValue->isObject(&JSSVGMatrix::s_info))
265
 
        return throwError(exec, TypeError);
266
 
    JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
267
 
    return castedThisObj->flipX(exec, args);
268
 
}
269
 
 
270
 
JSValuePtr jsSVGMatrixPrototypeFunctionFlipY(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
271
 
{
272
 
    if (!thisValue->isObject(&JSSVGMatrix::s_info))
273
 
        return throwError(exec, TypeError);
274
 
    JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
275
 
    return castedThisObj->flipY(exec, args);
276
 
}
277
 
 
278
 
JSValuePtr jsSVGMatrixPrototypeFunctionSkewX(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
279
 
{
280
 
    if (!thisValue->isObject(&JSSVGMatrix::s_info))
281
 
        return throwError(exec, TypeError);
282
 
    JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
283
 
    return castedThisObj->skewX(exec, args);
284
 
}
285
 
 
286
 
JSValuePtr jsSVGMatrixPrototypeFunctionSkewY(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
287
 
{
288
 
    if (!thisValue->isObject(&JSSVGMatrix::s_info))
289
 
        return throwError(exec, TypeError);
290
 
    JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
291
 
    return castedThisObj->skewY(exec, args);
292
 
}
293
 
 
294
 
JSC::JSValuePtr toJS(JSC::ExecState* exec, JSSVGPODTypeWrapper<TransformationMatrix>* object, SVGElement* context)
295
 
{
296
 
    return getDOMObjectWrapper<JSSVGMatrix, JSSVGPODTypeWrapper<TransformationMatrix> >(exec, object, context);
297
 
}
298
 
TransformationMatrix toSVGMatrix(JSC::JSValuePtr value)
299
 
{
300
 
    return value->isObject(&JSSVGMatrix::s_info) ? (TransformationMatrix) *static_cast<JSSVGMatrix*>(asObject(value))->impl() : TransformationMatrix();
 
318
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionFlipX(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
 
319
{
 
320
    UNUSED_PARAM(args);
 
321
    if (!thisValue.inherits(&JSSVGMatrix::s_info))
 
322
        return throwError(exec, TypeError);
 
323
    JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
 
324
    JSSVGPODTypeWrapper<TransformationMatrix>* wrapper = castedThisObj->impl();
 
325
    TransformationMatrix imp(*wrapper);
 
326
 
 
327
 
 
328
    JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.flipX()).get(), castedThisObj->context());
 
329
    return result;
 
330
}
 
331
 
 
332
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionFlipY(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
 
333
{
 
334
    UNUSED_PARAM(args);
 
335
    if (!thisValue.inherits(&JSSVGMatrix::s_info))
 
336
        return throwError(exec, TypeError);
 
337
    JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
 
338
    JSSVGPODTypeWrapper<TransformationMatrix>* wrapper = castedThisObj->impl();
 
339
    TransformationMatrix imp(*wrapper);
 
340
 
 
341
 
 
342
    JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.flipY()).get(), castedThisObj->context());
 
343
    return result;
 
344
}
 
345
 
 
346
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionSkewX(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
 
347
{
 
348
    UNUSED_PARAM(args);
 
349
    if (!thisValue.inherits(&JSSVGMatrix::s_info))
 
350
        return throwError(exec, TypeError);
 
351
    JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
 
352
    JSSVGPODTypeWrapper<TransformationMatrix>* wrapper = castedThisObj->impl();
 
353
    TransformationMatrix imp(*wrapper);
 
354
    float angle = args.at(0).toFloat(exec);
 
355
 
 
356
 
 
357
    JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.skewX(angle)).get(), castedThisObj->context());
 
358
    return result;
 
359
}
 
360
 
 
361
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionSkewY(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
 
362
{
 
363
    UNUSED_PARAM(args);
 
364
    if (!thisValue.inherits(&JSSVGMatrix::s_info))
 
365
        return throwError(exec, TypeError);
 
366
    JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
 
367
    JSSVGPODTypeWrapper<TransformationMatrix>* wrapper = castedThisObj->impl();
 
368
    TransformationMatrix imp(*wrapper);
 
369
    float angle = args.at(0).toFloat(exec);
 
370
 
 
371
 
 
372
    JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.skewY(angle)).get(), castedThisObj->context());
 
373
    return result;
 
374
}
 
375
 
 
376
JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, JSSVGPODTypeWrapper<TransformationMatrix>* object, SVGElement* context)
 
377
{
 
378
    return getDOMObjectWrapper<JSSVGMatrix, JSSVGPODTypeWrapper<TransformationMatrix> >(exec, globalObject, object, context);
 
379
}
 
380
TransformationMatrix toSVGMatrix(JSC::JSValue value)
 
381
{
 
382
    return value.inherits(&JSSVGMatrix::s_info) ? (TransformationMatrix) *static_cast<JSSVGMatrix*>(asObject(value))->impl() : TransformationMatrix();
301
383
}
302
384
 
303
385
}