Update TrackEvent to stop using legacy [ConstructorTemplate=Event]
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Oct 2016 17:13:53 +0000 (17:13 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Oct 2016 17:13:53 +0000 (17:13 +0000)
commit537bde2a5ecd7dbc5148385164554772116b5ed4
tree9840847f47f6901abac446e774fa064833b081cf
parent072996f4153d6fe37e65a9703b8efc3937164e44
Update TrackEvent to stop using legacy [ConstructorTemplate=Event]
https://bugs.webkit.org/show_bug.cgi?id=163580

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Incorporate https://github.com/w3c/web-platform-tests/pull/3999 as the
test was incorrect. Rebaseline now that we are passing the test.

* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TrackEvent/constructor-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TrackEvent/constructor.html:

Source/WebCore:

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

No new tests, updated existing tests.

* html/track/TrackEvent.cpp:
(WebCore::TrackEvent::TrackEvent):
* html/track/TrackEvent.h:
* html/track/TrackEvent.idl:

LayoutTests:

Update existing test to reflect behavior change. We now correctly throw a TypeError
when passing an unexpected track object type to the TrackEvent constructor.

* fast/events/constructors/track-event-constructor-expected.txt:
* fast/events/constructors/track-event-constructor.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207468 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/constructors/track-event-constructor-expected.txt
LayoutTests/fast/events/constructors/track-event-constructor.html
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TrackEvent/constructor-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TrackEvent/constructor.html
Source/WebCore/ChangeLog
Source/WebCore/html/track/TrackEvent.cpp
Source/WebCore/html/track/TrackEvent.h
Source/WebCore/html/track/TrackEvent.idl