tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / WebCore / JSWebKitAnimation.cpp
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 #include "JSWebKitAnimation.h"
23
24 #include "ExceptionCode.h"
25 #include "JSDOMBinding.h"
26 #include "KURL.h"
27 #include "WebKitAnimation.h"
28 #include <runtime/Error.h>
29 #include <runtime/JSString.h>
30 #include <wtf/GetPtr.h>
31
32 using namespace JSC;
33
34 namespace WebCore {
35
36 ASSERT_CLASS_FITS_IN_CELL(JSWebKitAnimation);
37
38 /* Hash table */
39 #if ENABLE(JIT)
40 #define THUNK_GENERATOR(generator) , generator
41 #else
42 #define THUNK_GENERATOR(generator)
43 #endif
44 #if ENABLE(DFG_JIT)
45 #define INTRINSIC(intrinsic) , intrinsic
46 #else
47 #define INTRINSIC(intrinsic)
48 #endif
49
50 static const HashTableValue JSWebKitAnimationTableValues[] =
51 {
52     { "name", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationName), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
53     { "duration", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationDuration), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
54     { "elapsedTime", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationElapsedTime), (intptr_t)setJSWebKitAnimationElapsedTime THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
55     { "delay", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationDelay), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
56     { "iterationCount", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationIterationCount), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
57     { "paused", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationPaused), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
58     { "ended", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationEnded), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
59     { "direction", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationDirection), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
60     { "fillMode", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationFillMode), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
61     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationConstructor), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
62     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
63 };
64
65 #undef THUNK_GENERATOR
66 static const HashTable JSWebKitAnimationTable = { 33, 31, JSWebKitAnimationTableValues, 0 };
67 /* Hash table for constructor */
68 #if ENABLE(JIT)
69 #define THUNK_GENERATOR(generator) , generator
70 #else
71 #define THUNK_GENERATOR(generator)
72 #endif
73 #if ENABLE(DFG_JIT)
74 #define INTRINSIC(intrinsic) , intrinsic
75 #else
76 #define INTRINSIC(intrinsic)
77 #endif
78
79 static const HashTableValue JSWebKitAnimationConstructorTableValues[] =
80 {
81     { "DIRECTION_NORMAL", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationDIRECTION_NORMAL), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
82     { "DIRECTION_ALTERNATE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationDIRECTION_ALTERNATE), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
83     { "FILL_NONE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationFILL_NONE), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
84     { "FILL_BACKWARDS", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationFILL_BACKWARDS), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
85     { "FILL_FORWARDS", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationFILL_FORWARDS), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
86     { "FILL_BOTH", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationFILL_BOTH), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
87     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
88 };
89
90 #undef THUNK_GENERATOR
91 static const HashTable JSWebKitAnimationConstructorTable = { 16, 15, JSWebKitAnimationConstructorTableValues, 0 };
92
93 COMPILE_ASSERT(0 == WebKitAnimation::DIRECTION_NORMAL, WebKitAnimationEnumDIRECTION_NORMALIsWrongUseDontCheckEnums);
94 COMPILE_ASSERT(1 == WebKitAnimation::DIRECTION_ALTERNATE, WebKitAnimationEnumDIRECTION_ALTERNATEIsWrongUseDontCheckEnums);
95 COMPILE_ASSERT(0 == WebKitAnimation::FILL_NONE, WebKitAnimationEnumFILL_NONEIsWrongUseDontCheckEnums);
96 COMPILE_ASSERT(1 == WebKitAnimation::FILL_BACKWARDS, WebKitAnimationEnumFILL_BACKWARDSIsWrongUseDontCheckEnums);
97 COMPILE_ASSERT(2 == WebKitAnimation::FILL_FORWARDS, WebKitAnimationEnumFILL_FORWARDSIsWrongUseDontCheckEnums);
98 COMPILE_ASSERT(3 == WebKitAnimation::FILL_BOTH, WebKitAnimationEnumFILL_BOTHIsWrongUseDontCheckEnums);
99
100 const ClassInfo JSWebKitAnimationConstructor::s_info = { "WebKitAnimationConstructor", &DOMConstructorObject::s_info, &JSWebKitAnimationConstructorTable, 0, CREATE_METHOD_TABLE(JSWebKitAnimationConstructor) };
101
102 JSWebKitAnimationConstructor::JSWebKitAnimationConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
103     : DOMConstructorObject(structure, globalObject)
104 {
105 }
106
107 void JSWebKitAnimationConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
108 {
109     Base::finishCreation(exec->globalData());
110     ASSERT(inherits(&s_info));
111     putDirect(exec->globalData(), exec->propertyNames().prototype, JSWebKitAnimationPrototype::self(exec, globalObject), DontDelete | ReadOnly);
112 }
113
114 bool JSWebKitAnimationConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
115 {
116     return getStaticValueSlot<JSWebKitAnimationConstructor, JSDOMWrapper>(exec, &JSWebKitAnimationConstructorTable, static_cast<JSWebKitAnimationConstructor*>(cell), propertyName, slot);
117 }
118
119 bool JSWebKitAnimationConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
120 {
121     return getStaticValueDescriptor<JSWebKitAnimationConstructor, JSDOMWrapper>(exec, &JSWebKitAnimationConstructorTable, static_cast<JSWebKitAnimationConstructor*>(object), propertyName, descriptor);
122 }
123
124 /* Hash table for prototype */
125 #if ENABLE(JIT)
126 #define THUNK_GENERATOR(generator) , generator
127 #else
128 #define THUNK_GENERATOR(generator)
129 #endif
130 #if ENABLE(DFG_JIT)
131 #define INTRINSIC(intrinsic) , intrinsic
132 #else
133 #define INTRINSIC(intrinsic)
134 #endif
135
136 static const HashTableValue JSWebKitAnimationPrototypeTableValues[] =
137 {
138     { "DIRECTION_NORMAL", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationDIRECTION_NORMAL), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
139     { "DIRECTION_ALTERNATE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationDIRECTION_ALTERNATE), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
140     { "FILL_NONE", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationFILL_NONE), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
141     { "FILL_BACKWARDS", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationFILL_BACKWARDS), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
142     { "FILL_FORWARDS", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationFILL_FORWARDS), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
143     { "FILL_BOTH", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsWebKitAnimationFILL_BOTH), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
144     { "play", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsWebKitAnimationPrototypeFunctionPlay), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
145     { "pause", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsWebKitAnimationPrototypeFunctionPause), (intptr_t)0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) },
146     { 0, 0, 0, 0 THUNK_GENERATOR(0) INTRINSIC(DFG::NoIntrinsic) }
147 };
148
149 #undef THUNK_GENERATOR
150 static const HashTable JSWebKitAnimationPrototypeTable = { 17, 15, JSWebKitAnimationPrototypeTableValues, 0 };
151 const ClassInfo JSWebKitAnimationPrototype::s_info = { "WebKitAnimationPrototype", &JSC::JSNonFinalObject::s_info, &JSWebKitAnimationPrototypeTable, 0, CREATE_METHOD_TABLE(JSWebKitAnimationPrototype) };
152
153 JSObject* JSWebKitAnimationPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
154 {
155     return getDOMPrototype<JSWebKitAnimation>(exec, globalObject);
156 }
157
158 bool JSWebKitAnimationPrototype::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
159 {
160     JSWebKitAnimationPrototype* thisObject = jsCast<JSWebKitAnimationPrototype*>(cell);
161     return getStaticPropertySlot<JSWebKitAnimationPrototype, JSObject>(exec, &JSWebKitAnimationPrototypeTable, thisObject, propertyName, slot);
162 }
163
164 bool JSWebKitAnimationPrototype::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
165 {
166     JSWebKitAnimationPrototype* thisObject = jsCast<JSWebKitAnimationPrototype*>(object);
167     return getStaticPropertyDescriptor<JSWebKitAnimationPrototype, JSObject>(exec, &JSWebKitAnimationPrototypeTable, thisObject, propertyName, descriptor);
168 }
169
170 const ClassInfo JSWebKitAnimation::s_info = { "WebKitAnimation", &JSDOMWrapper::s_info, &JSWebKitAnimationTable, 0 , CREATE_METHOD_TABLE(JSWebKitAnimation) };
171
172 JSWebKitAnimation::JSWebKitAnimation(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<WebKitAnimation> impl)
173     : JSDOMWrapper(structure, globalObject)
174     , m_impl(impl.leakRef())
175 {
176 }
177
178 void JSWebKitAnimation::finishCreation(JSGlobalData& globalData)
179 {
180     Base::finishCreation(globalData);
181     ASSERT(inherits(&s_info));
182 }
183
184 JSObject* JSWebKitAnimation::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
185 {
186     return JSWebKitAnimationPrototype::create(exec->globalData(), globalObject, JSWebKitAnimationPrototype::createStructure(globalObject->globalData(), globalObject, globalObject->objectPrototype()));
187 }
188
189 bool JSWebKitAnimation::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
190 {
191     JSWebKitAnimation* thisObject = jsCast<JSWebKitAnimation*>(cell);
192     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
193     return getStaticValueSlot<JSWebKitAnimation, Base>(exec, &JSWebKitAnimationTable, thisObject, propertyName, slot);
194 }
195
196 bool JSWebKitAnimation::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
197 {
198     JSWebKitAnimation* thisObject = jsCast<JSWebKitAnimation*>(object);
199     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
200     return getStaticValueDescriptor<JSWebKitAnimation, Base>(exec, &JSWebKitAnimationTable, thisObject, propertyName, descriptor);
201 }
202
203 JSValue jsWebKitAnimationName(ExecState* exec, JSValue slotBase, const Identifier&)
204 {
205     JSWebKitAnimation* castedThis = static_cast<JSWebKitAnimation*>(asObject(slotBase));
206     UNUSED_PARAM(exec);
207     WebKitAnimation* imp = static_cast<WebKitAnimation*>(castedThis->impl());
208     JSValue result = jsString(exec, imp->name());
209     return result;
210 }
211
212
213 JSValue jsWebKitAnimationDuration(ExecState* exec, JSValue slotBase, const Identifier&)
214 {
215     JSWebKitAnimation* castedThis = static_cast<JSWebKitAnimation*>(asObject(slotBase));
216     UNUSED_PARAM(exec);
217     WebKitAnimation* imp = static_cast<WebKitAnimation*>(castedThis->impl());
218     JSValue result = jsNumber(imp->duration());
219     return result;
220 }
221
222
223 JSValue jsWebKitAnimationElapsedTime(ExecState* exec, JSValue slotBase, const Identifier&)
224 {
225     JSWebKitAnimation* castedThis = static_cast<JSWebKitAnimation*>(asObject(slotBase));
226     UNUSED_PARAM(exec);
227     WebKitAnimation* imp = static_cast<WebKitAnimation*>(castedThis->impl());
228     JSValue result = jsNumber(imp->elapsedTime());
229     return result;
230 }
231
232
233 JSValue jsWebKitAnimationDelay(ExecState* exec, JSValue slotBase, const Identifier&)
234 {
235     JSWebKitAnimation* castedThis = static_cast<JSWebKitAnimation*>(asObject(slotBase));
236     UNUSED_PARAM(exec);
237     WebKitAnimation* imp = static_cast<WebKitAnimation*>(castedThis->impl());
238     JSValue result = jsNumber(imp->delay());
239     return result;
240 }
241
242
243 JSValue jsWebKitAnimationIterationCount(ExecState* exec, JSValue slotBase, const Identifier&)
244 {
245     JSWebKitAnimation* castedThis = static_cast<JSWebKitAnimation*>(asObject(slotBase));
246     return castedThis->iterationCount(exec);
247 }
248
249
250 JSValue jsWebKitAnimationPaused(ExecState* exec, JSValue slotBase, const Identifier&)
251 {
252     JSWebKitAnimation* castedThis = static_cast<JSWebKitAnimation*>(asObject(slotBase));
253     UNUSED_PARAM(exec);
254     WebKitAnimation* imp = static_cast<WebKitAnimation*>(castedThis->impl());
255     JSValue result = jsBoolean(imp->paused());
256     return result;
257 }
258
259
260 JSValue jsWebKitAnimationEnded(ExecState* exec, JSValue slotBase, const Identifier&)
261 {
262     JSWebKitAnimation* castedThis = static_cast<JSWebKitAnimation*>(asObject(slotBase));
263     UNUSED_PARAM(exec);
264     WebKitAnimation* imp = static_cast<WebKitAnimation*>(castedThis->impl());
265     JSValue result = jsBoolean(imp->ended());
266     return result;
267 }
268
269
270 JSValue jsWebKitAnimationDirection(ExecState* exec, JSValue slotBase, const Identifier&)
271 {
272     JSWebKitAnimation* castedThis = static_cast<JSWebKitAnimation*>(asObject(slotBase));
273     UNUSED_PARAM(exec);
274     WebKitAnimation* imp = static_cast<WebKitAnimation*>(castedThis->impl());
275     JSValue result = jsNumber(imp->direction());
276     return result;
277 }
278
279
280 JSValue jsWebKitAnimationFillMode(ExecState* exec, JSValue slotBase, const Identifier&)
281 {
282     JSWebKitAnimation* castedThis = static_cast<JSWebKitAnimation*>(asObject(slotBase));
283     UNUSED_PARAM(exec);
284     WebKitAnimation* imp = static_cast<WebKitAnimation*>(castedThis->impl());
285     JSValue result = jsNumber(imp->fillMode());
286     return result;
287 }
288
289
290 JSValue jsWebKitAnimationConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
291 {
292     JSWebKitAnimation* domObject = static_cast<JSWebKitAnimation*>(asObject(slotBase));
293     return JSWebKitAnimation::getConstructor(exec, domObject->globalObject());
294 }
295
296 void JSWebKitAnimation::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
297 {
298     JSWebKitAnimation* thisObject = jsCast<JSWebKitAnimation*>(cell);
299     ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
300     lookupPut<JSWebKitAnimation, Base>(exec, propertyName, value, &JSWebKitAnimationTable, thisObject, slot);
301 }
302
303 void setJSWebKitAnimationElapsedTime(ExecState* exec, JSObject* thisObject, JSValue value)
304 {
305     JSWebKitAnimation* castedThis = static_cast<JSWebKitAnimation*>(thisObject);
306     WebKitAnimation* imp = static_cast<WebKitAnimation*>(castedThis->impl());
307     imp->setElapsedTime(value.toNumber(exec));
308 }
309
310
311 JSValue JSWebKitAnimation::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
312 {
313     return getDOMConstructor<JSWebKitAnimationConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
314 }
315
316 EncodedJSValue JSC_HOST_CALL jsWebKitAnimationPrototypeFunctionPlay(ExecState* exec)
317 {
318     JSValue thisValue = exec->hostThisValue();
319     if (!thisValue.inherits(&JSWebKitAnimation::s_info))
320         return throwVMTypeError(exec);
321     JSWebKitAnimation* castedThis = static_cast<JSWebKitAnimation*>(asObject(thisValue));
322     ASSERT_GC_OBJECT_INHERITS(castedThis, &JSWebKitAnimation::s_info);
323     WebKitAnimation* imp = static_cast<WebKitAnimation*>(castedThis->impl());
324     imp->play();
325     return JSValue::encode(jsUndefined());
326 }
327
328 EncodedJSValue JSC_HOST_CALL jsWebKitAnimationPrototypeFunctionPause(ExecState* exec)
329 {
330     JSValue thisValue = exec->hostThisValue();
331     if (!thisValue.inherits(&JSWebKitAnimation::s_info))
332         return throwVMTypeError(exec);
333     JSWebKitAnimation* castedThis = static_cast<JSWebKitAnimation*>(asObject(thisValue));
334     ASSERT_GC_OBJECT_INHERITS(castedThis, &JSWebKitAnimation::s_info);
335     WebKitAnimation* imp = static_cast<WebKitAnimation*>(castedThis->impl());
336     imp->pause();
337     return JSValue::encode(jsUndefined());
338 }
339
340 // Constant getters
341
342 JSValue jsWebKitAnimationDIRECTION_NORMAL(ExecState* exec, JSValue, const Identifier&)
343 {
344     UNUSED_PARAM(exec);
345     return jsNumber(static_cast<int>(0));
346 }
347
348 JSValue jsWebKitAnimationDIRECTION_ALTERNATE(ExecState* exec, JSValue, const Identifier&)
349 {
350     UNUSED_PARAM(exec);
351     return jsNumber(static_cast<int>(1));
352 }
353
354 JSValue jsWebKitAnimationFILL_NONE(ExecState* exec, JSValue, const Identifier&)
355 {
356     UNUSED_PARAM(exec);
357     return jsNumber(static_cast<int>(0));
358 }
359
360 JSValue jsWebKitAnimationFILL_BACKWARDS(ExecState* exec, JSValue, const Identifier&)
361 {
362     UNUSED_PARAM(exec);
363     return jsNumber(static_cast<int>(1));
364 }
365
366 JSValue jsWebKitAnimationFILL_FORWARDS(ExecState* exec, JSValue, const Identifier&)
367 {
368     UNUSED_PARAM(exec);
369     return jsNumber(static_cast<int>(2));
370 }
371
372 JSValue jsWebKitAnimationFILL_BOTH(ExecState* exec, JSValue, const Identifier&)
373 {
374     UNUSED_PARAM(exec);
375     return jsNumber(static_cast<int>(3));
376 }
377
378 static inline bool isObservable(JSWebKitAnimation* jsWebKitAnimation)
379 {
380     if (jsWebKitAnimation->hasCustomProperties())
381         return true;
382     return false;
383 }
384
385 bool JSWebKitAnimationOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
386 {
387     JSWebKitAnimation* jsWebKitAnimation = static_cast<JSWebKitAnimation*>(handle.get().asCell());
388     if (!isObservable(jsWebKitAnimation))
389         return false;
390     UNUSED_PARAM(visitor);
391     return false;
392 }
393
394 void JSWebKitAnimationOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
395 {
396     JSWebKitAnimation* jsWebKitAnimation = static_cast<JSWebKitAnimation*>(handle.get().asCell());
397     DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context);
398     uncacheWrapper(world, jsWebKitAnimation->impl(), jsWebKitAnimation);
399     jsWebKitAnimation->releaseImpl();
400 }
401
402 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, WebKitAnimation* impl)
403 {
404     return wrap<JSWebKitAnimation>(exec, globalObject, impl);
405 }
406
407 WebKitAnimation* toWebKitAnimation(JSC::JSValue value)
408 {
409     return value.inherits(&JSWebKitAnimation::s_info) ? static_cast<JSWebKitAnimation*>(asObject(value))->impl() : 0;
410 }
411
412 }