static v8::Handle<v8::Value> initWebKitAnimationEventCallback(const v8::Arguments& args) { INC_STATS("DOM.WebKitAnimationEvent.initWebKitAnimationEvent"); WebKitAnimationEvent* imp = V8WebKitAnimationEvent::toNative(args.Holder()); V8Parameter<> typeArg = args[0]; bool canBubbleArg = args[1]->BooleanValue(); bool cancelableArg = args[2]->BooleanValue(); V8Parameter<> animationNameArg = args[3]; double elapsedTimeArg = static_cast<double>(args[4]->NumberValue()); imp->initWebKitAnimationEvent(typeArg, canBubbleArg, cancelableArg, animationNameArg, elapsedTimeArg); return v8::Handle<v8::Value>(); }
static v8::Handle<v8::Value> initWebKitAnimationEventCallback(const v8::Arguments& args) { INC_STATS("DOM.WebKitAnimationEvent.initWebKitAnimationEvent"); WebKitAnimationEvent* imp = V8WebKitAnimationEvent::toNative(args.Holder()); STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, typeArg, args[0]); EXCEPTION_BLOCK(bool, canBubbleArg, args[1]->BooleanValue()); EXCEPTION_BLOCK(bool, cancelableArg, args[2]->BooleanValue()); STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, animationNameArg, args[3]); EXCEPTION_BLOCK(double, elapsedTimeArg, static_cast<double>(args[4]->NumberValue())); imp->initWebKitAnimationEvent(typeArg, canBubbleArg, cancelableArg, animationNameArg, elapsedTimeArg); return v8::Handle<v8::Value>(); }
JSValue* JSWebKitAnimationEvent::getValueProperty(ExecState* exec, int token) const { switch (token) { case AnimationNameAttrNum: { WebKitAnimationEvent* imp = static_cast<WebKitAnimationEvent*>(impl()); return jsString(exec, imp->animationName()); } case ElapsedTimeAttrNum: { WebKitAnimationEvent* imp = static_cast<WebKitAnimationEvent*>(impl()); return jsNumber(exec, imp->elapsedTime()); } } return 0; }
JSValue* jsWebKitAnimationEventPrototypeFunctionInitWebKitAnimationEvent(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args) { if (!thisValue->isObject(&JSWebKitAnimationEvent::s_info)) return throwError(exec, TypeError); JSWebKitAnimationEvent* castedThisObj = static_cast<JSWebKitAnimationEvent*>(thisValue); WebKitAnimationEvent* imp = static_cast<WebKitAnimationEvent*>(castedThisObj->impl()); const UString& typeArg = args.at(exec, 0)->toString(exec); bool canBubbleArg = args.at(exec, 1)->toBoolean(exec); bool cancelableArg = args.at(exec, 2)->toBoolean(exec); const UString& animationNameArg = args.at(exec, 3)->toString(exec); double elapsedTimeArg = args.at(exec, 4)->toNumber(exec); imp->initWebKitAnimationEvent(typeArg, canBubbleArg, cancelableArg, animationNameArg, elapsedTimeArg); return jsUndefined(); }
static v8::Handle<v8::Value> elapsedTimeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { INC_STATS("DOM.WebKitAnimationEvent.elapsedTime._get"); WebKitAnimationEvent* imp = V8WebKitAnimationEvent::toNative(info.Holder()); return v8::Number::New(imp->elapsedTime()); }