Implement DataCue for metadata cues
https://bugs.webkit.org/show_bug.cgi?id=128402

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/track/track-datacue.html

* CMakeLists.txt: Add DataCue.
* DerivedSources.cpp: Add JSDataCue.
* DerivedSources.make: Same.
* GNUmakefile.list.am: Add DataCue and JSDataCue.
* WebCore.vcxproj/WebCore.vcxproj: Add DataCue.
* WebCore.vcxproj/WebCore.vcxproj.filters: Same.
* WebCore.xcodeproj/project.pbxproj: Add DataCue and JSDataCue.
* bindings/js/JSTextTrackCueCustom.cpp:
(WebCore::toJS): Add DataCue wrapper.
* html/track/DataCue.cpp: Copied from Source/WebCore/html/track/TextTrack.idl.
* html/track/DataCue.h: Copied from Source/WebCore/html/track/TextTrack.idl.
* html/track/DataCue.idl: Copied from Source/WebCore/html/track/TextTrack.idl.
* html/track/InbandGenericTextTrack.cpp:
(WebCore::InbandGenericTextTrack::addGenericCue): Pass ASSERT_NO_EXCEPTION to addCue().
* html/track/InbandWebVTTTextTrack.cpp:
(WebCore::InbandWebVTTTextTrack::newCuesParsed): Same.
* html/track/TextTrack.cpp:
(WebCore::TextTrack::addCue): Throw an exception if DataCue is added to a track that isn't kind="metadata".
* html/track/TextTrack.h: Add exception code parameter to addCue().
* html/track/TextTrack.idl: Add [RaisesException] to addCue().
* html/track/TextTrackCue.h: Add Data CueType.

LayoutTests:

* js/dom/global-constructors-attributes-expected.txt: Add DataCue.
* media/track/track-datacue-expected.txt: Added.
* media/track/track-datacue.html: Added.
* platform/efl/js/dom/global-constructors-attributes-expected.txt: Add DataCue.
* platform/gtk-wk2/js/dom/global-constructors-attributes-expected.txt: Same.
* platform/gtk/js/dom/global-constructors-attributes-expected.txt: Same.
* platform/mac/js/dom/global-constructors-attributes-expected.txt: Same.
* platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: Same.
* platform/win/js/dom/global-constructors-attributes-expected.txt: Same.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163974 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt
	LayoutTests/platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt
	LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt
	Source/WebCore/WebCore.xcodeproj/project.pbxproj
DataCue.data should be a copy of the input ArrayBuffer, not a pointer
https://bugs.webkit.org/show_bug.cgi?id=128886

Reviewed by Eric Carlson.

Source/WebCore:

No new tests, just updated existing track-datacue.html test.

* html/track/DataCue.cpp:
(WebCore::DataCue::DataCue): Add ExceptionCode and pass through to setData().
(WebCore::DataCue::data): Return a copy of m_data instead of a pointer.
(WebCore::DataCue::setData): Create a copy of the input data, or throw an exception if it's null.
* html/track/DataCue.h: Add ExceptionCode parameters to constructor and data setter.
* html/track/DataCue.idl: Same.

LayoutTests:

* media/track/track-datacue-expected.txt:
* media/track/track-datacue.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164227 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	Source/WebCore/html/track/DataCue.h
Implement VideoTrackList.selectedIndex
https://bugs.webkit.org/show_bug.cgi?id=129770

Reviewed by Eric Carlson.

Source/WebCore:

Tests: media/track/video/video-track-mkv-theora-selected.html

* html/track/VideoTrackList.idl:

LayoutTests:

* media/track/video/video-track-mkv-theora-selected-expected.txt:
* media/track/video/video-track-mkv-theora-selected.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165194 268f45cc-cd09-0410-ab3c-d52691b4dbfc