Bug 67825 - Implement a WebKitAnimationEvent constructor for JSC
Summary: Implement a WebKitAnimationEvent constructor for JSC
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 67824
  Show dependency treegraph
 
Reported: 2011-09-08 18:14 PDT by Kentaro Hara
Modified: 2011-09-09 10:40 PDT (History)
8 users (show)

See Also:


Attachments
Patch (21.48 KB, patch)
2011-09-08 18:38 PDT, Kentaro Hara
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kentaro Hara 2011-09-08 18:14:40 PDT
We have been working on implementing constructors of Events. WebKitAnimationEvent should have a constructor. 

There is no spec for the WebKitAnimationEvent constructor, since it is WebKit-specific. Based on the current IDL of initWebKitAnimationEvent(), the IDL of the WebKitAnimationEvent constructor should be as follows.                                                          

[Constructor(DOMString type, optional WebKitAnimationEvent eventInitDict)]     
dictionary WebKitAnimationEventInit : EventInit {
    DOMString animationName;
    double elapsedTime;
}
Comment 1 Kentaro Hara 2011-09-08 18:38:11 PDT
Created attachment 106825 [details]
Patch
Comment 2 Sam Weinig 2011-09-08 18:49:24 PDT
The Constructor would be on the WebKitAnimationEvent, not the WebKitAnimationEventInit.
Comment 3 Sam Weinig 2011-09-08 18:50:33 PDT
Comment on attachment 106825 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=106825&action=review

> Source/WebCore/ChangeLog:17
> +        [Constructor(DOMString type, optional WebKitAnimationEventInit eventInitDict)]
> +        dictionary WebKitAnimationEventInit : EventInit {
> +            DOMString animationName;
> +            double elapsedTime;
> +        }

This is not what the IDL would look like.  The constructor would be on the Event itself, not the Init.
Comment 4 Kentaro Hara 2011-09-08 18:52:32 PDT
(In reply to comment #2)
> The Constructor would be on the WebKitAnimationEvent, not the WebKitAnimationEventInit.

Sorry.

Correct IDL:

[Constructor(DOMString type, optional WebKitAnimationEventInit eventInitDict)]
dictionary WebKitAnimationEventInit : EventInit {
    DOMString animationName;
    double elapsedTime;
}
Comment 5 Kentaro Hara 2011-09-08 18:58:45 PDT
(In reply to comment #3)
> (From update of attachment 106825 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=106825&action=review
> 
> > Source/WebCore/ChangeLog:17
> > +        [Constructor(DOMString type, optional WebKitAnimationEventInit eventInitDict)]
> > +        dictionary WebKitAnimationEventInit : EventInit {
> > +            DOMString animationName;
> > +            double elapsedTime;
> > +        }
> 
> This is not what the IDL would look like.  The constructor would be on the Event itself, not the Init.

Sorry for the confusion. I omitted the interface part since this patch does not change it....

[Constructor(DOMString type, optional WebKitAnimationEventInit eventInitDict)]
interface WebKitAnimationEvent : Event {
    ...;
}

dictionary WebKitAnimationEventInit : EventInit {
    DOMString animationName;
    double elapsedTime;
}

I will correct Changelog as above. Thanks!
Comment 6 Roland Steiner 2011-09-09 10:26:50 PDT
Committed r94861: <http://trac.webkit.org/changeset/94861>
Comment 7 Simon Fraser (smfr) 2011-09-09 10:29:28 PDT
Why were no animation people cc'd on this?
Comment 8 Sam Weinig 2011-09-09 10:40:11 PDT
It's not really animation related, just progressing through all the events, adding constructors.