Add TrackEvent
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Nov 2011 04:18:05 +0000 (04:18 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Nov 2011 04:18:05 +0000 (04:18 +0000)
commit9729a399fc0441578f3c5c5e8e0860d7619e7ed4
tree1bea182b6367b606a0b70408ce38d2a2df2cd766
parentef3c56f822c6557e26890167d422b577da432d01
Add TrackEvent
https://bugs.webkit.org/show_bug.cgi?id=71178

Reviewed by Sam Weinig.

Source/WebCore:

Test: fast/events/constructors/track-event-constructor.html

* CMakeLists.txt: Add new files for TrackEvent.
* CodeGenerators.pri: Ditto.
* DerivedSources.cpp: Ditto.
* DerivedSources.make: Ditto.
* GNUmakefile.am: Ditto.
* GNUmakefile.list.am: Ditto.
* WebCore.gypi: Ditto.
* WebCore.pro: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/generic/EventConstructors.h: Ditto.
* bindings/gobject/GNUmakefile.am: Ditto.
* bindings/gobject/WebKitHTMLElementWrapperFactory.cpp: Ditto.
* bindings/js/JSBindingsAllInOne.cpp: Ditto.

* bindings/js/JSDictionary.cpp:
(WebCore::JSDictionary::convertValue): Add method to convert to a Track.
* bindings/js/JSDictionary.h:

* bindings/js/JSEventConstructors.cpp:  Add new files for TrackEvent.

* bindings/js/JSTrackCustom.cpp: Added.
(WebCore::toTrack): New, convert from a JSValue to a Track.
(WebCore::toJS): New, return a JS wrapper for a Track.
* bindings/js/JSTrackCustom.h: Added.

* bindings/js/JSTrackEventCustom.cpp: Added.
(WebCore::JSTrackEvent::track): New, returns a TextEvent's 'track' attribute.

* bindings/v8/OptionsObject.cpp:
(WebCore::OptionsObject::get): Returns RefPtr<TrackBase>.

* bindings/v8/custom/V8EventConstructors.cpp: Add Track initializing constructor.

* bindings/v8/custom/V8TrackEventCustom.cpp: Added.
(WebCore::V8TrackEvent::trackAccessorGetter): New, returns a TextEvent's 'track' attribute.

* dom/EventFactory.in: Add TrackEvent.

* dom/EventNames.h: Add 'addtrack' event.

* html/TextTrack.cpp:
(WebCore::TextTrack::TextTrack): Call new base class constructor.
* html/TextTrack.h: Now derive from BaseTrack for the day we implement VideoTrack and AudioTrack.

* html/track/TrackBase.cpp: Added.
(WebCore::TrackBase::TrackBase):
(WebCore::TrackBase::~TrackBase):
* html/track/TrackBase.h: Added.
(WebCore::TrackBase::type): Return the track type.

* html/track/TrackEvent.cpp: Added.
(WebCore::TrackEventInit::TrackEventInit):
(WebCore::TrackEvent::TrackEvent):
(WebCore::TrackEvent::~TrackEvent):
(WebCore::TrackEvent::interfaceName):
* html/track/TrackEvent.h: Added.
(WebCore::TrackEvent::create):
(WebCore::TrackEvent::isTrackEvent):
(WebCore::TrackEvent::track):
* html/track/TrackEvent.idl: Added.

* page/DOMWindow.idl: Add TrackEvent.

LayoutTests:

* fast/events/constructors/track-event-constructor-expected.txt: Added.
* fast/events/constructors/track-event-constructor.html: Added.
* platform/chromium/test_expectations.txt:
* platform/gtk/fast/dom/Window/window-properties-expected.txt:
* platform/gtk/fast/js/global-constructors-expected.txt:
* platform/mac/Skipped:
* platform/win/Skipped:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99261 268f45cc-cd09-0410-ab3c-d52691b4dbfc
41 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/events/constructors/track-event-constructor-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/constructors/track-event-constructor.html [new file with mode: 0644]
LayoutTests/platform/gtk/fast/dom/Window/window-properties-expected.txt
LayoutTests/platform/gtk/fast/js/global-constructors-expected.txt
LayoutTests/platform/mac/Skipped
LayoutTests/platform/win/Skipped
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/CodeGenerators.pri
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/GNUmakefile.am
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.pro
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/generic/EventConstructors.h
Source/WebCore/bindings/gobject/GNUmakefile.am
Source/WebCore/bindings/gobject/WebKitHTMLElementWrapperFactory.cpp
Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
Source/WebCore/bindings/js/JSDictionary.cpp
Source/WebCore/bindings/js/JSDictionary.h
Source/WebCore/bindings/js/JSEventConstructors.cpp
Source/WebCore/bindings/js/JSTrackCustom.cpp [new file with mode: 0644]
Source/WebCore/bindings/js/JSTrackCustom.h [new file with mode: 0644]
Source/WebCore/bindings/js/JSTrackEventCustom.cpp [new file with mode: 0644]
Source/WebCore/bindings/v8/OptionsObject.cpp
Source/WebCore/bindings/v8/OptionsObject.h
Source/WebCore/bindings/v8/custom/V8EventConstructors.cpp
Source/WebCore/bindings/v8/custom/V8TrackEventCustom.cpp [new file with mode: 0644]
Source/WebCore/dom/EventFactory.in
Source/WebCore/dom/EventNames.h
Source/WebCore/html/TextTrack.cpp
Source/WebCore/html/TextTrack.h
Source/WebCore/html/track/TrackBase.cpp [new file with mode: 0644]
Source/WebCore/html/track/TrackBase.h [new file with mode: 0644]
Source/WebCore/html/track/TrackEvent.cpp [new file with mode: 0644]
Source/WebCore/html/track/TrackEvent.h [new file with mode: 0644]
Source/WebCore/html/track/TrackEvent.idl [new file with mode: 0644]
Source/WebCore/page/DOMWindow.idl