WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
UNCONFIRMED
103422
Optional second argument to TrackEvent constructor is not respected
https://bugs.webkit.org/show_bug.cgi?id=103422
Summary
Optional second argument to TrackEvent constructor is not respected
Antoine Quint
Reported
2012-11-27 08:42:29 PST
We're failing the Opera-submitted test at
http://w3c-test.org/html/tests/submission/Opera/media/interfaces/TrackEvent/constructor.html
. The second test fails because it looks like we don't support the optional second argument to the TrackEvent constructor. It looks like this is a newer feature of the Event interface, and we may not support that in WebCore at all.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2012-11-27 08:42:51 PST
<
rdar://problem/12758216
>
Eric Carlson
Comment 2
2012-11-27 09:48:05 PST
WebKit does support the new Event interface generally and TrackEvent supports the 'track' property, see LayoutTests/fast/events/constructors/track-event-constructor.html.
Eric Carlson
Comment 3
2012-11-27 10:15:44 PST
The Opera test fails because we only allow a valid Track object as the 'track' property, see JSDictionary::convertValue(ExecState*, JSValue, RefPtr<TrackBase>&). track-event-constructor.html tests that non-track objects are not allowed in the initializer. If this is not the right thing to do we probably have the same problem with other event types that take an initializer.
Antoine Quint
Comment 4
2012-11-28 02:39:58 PST
The IDL (per
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#trackevent
) is as follows: [Constructor(DOMString type, optional TrackEventInit eventInitDict)] interface TrackEvent : Event { readonly attribute object? track; }; dictionary TrackEventInit : EventInit { object? track; }; … so it looks like the optional TrackEventInit parameter allows any object to be the value of the "track" property. So it looks like providing just a vanilla JS object as the track by calling the following should work: var event = new TrackEvent('foo', {track: {}});
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug