Bug 163580

Summary: Update TrackEvent to stop using legacy [ConstructorTemplate=Event]
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: BindingsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, darin, sam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Chris Dumez 2016-10-17 19:24:48 PDT
Update TrackEvent to stop using legacy [ConstructorTemplate=Event] and use a regular constructor as in the specification:
- https://html.spec.whatwg.org/#the-trackevent-interface
Comment 1 Chris Dumez 2016-10-17 19:28:52 PDT
Created attachment 291911 [details]
Patch
Comment 2 Sam Weinig 2016-10-18 10:14:25 PDT
Comment on attachment 291911 [details]
Patch

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

> Source/WebCore/html/track/TrackEvent.idl:30
> +    [CustomGetter] readonly attribute (VideoTrack or AudioTrack or TextTrack)? track;

It would be nice to work towards getting rid of this CustomGetter by storing the track as a variant, but let's come back to that later.
Comment 3 WebKit Commit Bot 2016-10-18 10:16:36 PDT
Comment on attachment 291911 [details]
Patch

Clearing flags on attachment: 291911

Committed r207468: <http://trac.webkit.org/changeset/207468>
Comment 4 WebKit Commit Bot 2016-10-18 10:16:40 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Darin Adler 2016-10-18 17:03:21 PDT
Comment on attachment 291911 [details]
Patch

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

>> Source/WebCore/html/track/TrackEvent.idl:30
>> +    [CustomGetter] readonly attribute (VideoTrack or AudioTrack or TextTrack)? track;
> 
> It would be nice to work towards getting rid of this CustomGetter by storing the track as a variant, but let's come back to that later.

All we’d need is a track() function that returns a variant. Don’t necessarily need to store it as a variant!
Comment 6 Chris Dumez 2016-10-18 17:04:40 PDT
Comment on attachment 291911 [details]
Patch

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

>>> Source/WebCore/html/track/TrackEvent.idl:30
>>> +    [CustomGetter] readonly attribute (VideoTrack or AudioTrack or TextTrack)? track;
>> 
>> It would be nice to work towards getting rid of this CustomGetter by storing the track as a variant, but let's come back to that later.
> 
> All we’d need is a track() function that returns a variant. Don’t necessarily need to store it as a variant!

We'd need a toJS() implementation that properly deals with std::variant as well.