Update TextTrack API to current spec
https://bugs.webkit.org/show_bug.cgi?id=122218

Refactoring VTTCue out of TextTrackCue.

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/track/track-vttcue.html

* CMakeLists.txt: Add VTTCue and rename RenderTextTrackCue to RenderVTTCue.
* DerivedSources.cpp: Same.
* DerivedSources.make: Same.
* GNUmakefile.list.am: Same.
* PlatformGTK.cmake:  Same.
* WebCore.vcxproj/WebCore.vcxproj: Same.
* WebCore.vcxproj/WebCore.vcxproj.filters: Same.
* WebCore.xcodeproj/project.pbxproj: Same.
* bindings/js/JSTextTrackCueCustom.cpp:
(WebCore::toJS): Use VTTCue DOM wrapper for VTTCue and its subclasses.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateActiveTextTrackCues): Convert to VTTCue as needed.
(WebCore::HTMLMediaElement::textTrackRemoveCue): Same.
* html/HTMLMediaElement.h: Only print cue.text in debug output if the cue type has a .text attribute
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay): Convert to VTTCue as needed, and fix TextTrackCueBox to VTTCueBox.
(WebCore::MediaControlTextTrackContainerElement::updateTimerFired): Convert to VTTCue as needed.
* html/track/InbandGenericTextTrack.cpp:
(WebCore::InbandGenericTextTrack::addGenericCue): Use refactored VTTCue attributes.
* html/track/InbandWebVTTTextTrack.cpp:
(WebCore::InbandWebVTTTextTrack::newCuesParsed): Use VTTCue's constructor instead of deprecated TextTrackCue constructor.
* html/track/TextTrack.cpp:
(WebCore::TextTrack::setMode): Convert to VTTCue as needed.
(WebCore::TextTrack::hasCue): Make this function only accept VTTCues, since it's only used for them anyway, and convert existing cues to VTTCues as needed.
* html/track/TextTrack.h: Same as hasCue above.
* html/track/TextTrackCue.cpp: Refactor a lot of code out. Everything that was removed went to VTTCue.cpp.
(WebCore::TextTrackCue::create): For backwards compatibility, just call VTTCue::create().
(WebCore::TextTrackCue::TextTrackCue): Refactor a lot of code out.
(WebCore::TextTrackCue::~TextTrackCue): Same.
(WebCore::TextTrackCue::didChange): Same.
(WebCore::TextTrackCue::setIsActive): Same.
* html/track/TextTrackCue.h: Same.
* html/track/TextTrackCue.idl: Remove VTTCue attributes and add custom toJS function.
* html/track/TextTrackCueGeneric.cpp: Use VTTCue instead of TextTrackCue.
* html/track/TextTrackCueGeneric.h: Same.
* html/track/VTTCue.cpp: Copied from Source/WebCore/html/track/TextTrackCue.cpp.
* html/track/VTTCue.h: Copied from Source/WebCore/html/track/TextTrackCue.h.
* html/track/VTTCue.idl: Copied from Source/WebCore/html/track/TextTrackCue.idl.
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::getNewCues): Use VTTCue instead of TextTrackCue.
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride): Use VTTCueBox instead of TextTrackCueBox.
* rendering/RenderVTTCue.cpp: Renamed from Source/WebCore/rendering/RenderTextTrackCue.cpp. Changed to use VTTCue instead of TextTrackCue.
* rendering/RenderVTTCue.h: Renamed from Source/WebCore/rendering/RenderTextTrackCue.h. Changed to use VTTCue instead of TextTrackCue.
* rendering/RenderingAllInOne.cpp: Rename RenderTextTrackCue to RenderVTTCue.

LayoutTests:

* js/dom/constructor-length.html: Add VTTCue constructor.
* platform/efl/js/dom/global-constructors-attributes-expected.txt: Same.
* platform/efl/js/dom/constructor-length-expected.txt: Same.
* js/dom/global-constructors-attributes-expected.txt: Same.
* platform/gtk-wk2/js/dom/constructor-length-expected.txt:  Same.
* platform/gtk-wk2/js/dom/global-constructors-attributes-expected.txt: Same.
* platform/gtk/js/dom/constructor-length-expected.txt: Same.
* platform/gtk/js/dom/global-constructors-attributes-expected.txt: Same.
* platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: Same.
* platform/mac/js/dom/constructor-length-expected.txt: Same.
* platform/mac/js/dom/global-constructors-attributes-expected.txt: Same.
* platform/win/js/dom/global-constructors-attributes-expected.txt: Same.
* media/track/track-cues-cuechange-expected.txt: Cues are of type VTTCue now.
* media/track/track-cues-enter-exit-expected.txt: Same.
* media/track/track-vttcue-expected.txt: Test VTTCue interface.
* media/track/track-vttcue.html: Same.
* media/video-test.js:
(testExpected): Add "instanceof" as a valid operator.

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

Conflicts:
	LayoutTests/platform/efl/js/dom/constructor-length-expected.txt
	LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt
	LayoutTests/platform/gtk-wk2/js/dom/global-constructors-attributes-expected.txt
	LayoutTests/platform/gtk/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/CMakeLists.txt
	Source/WebCore/DerivedSources.make
	Source/WebCore/GNUmakefile.list.am
	Source/WebCore/PlatformGTK.cmake
	Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
	Source/WebCore/WebCore.xcodeproj/project.pbxproj
	Source/WebCore/html/track/InbandWebVTTTextTrack.cpp
	Source/WebCore/html/track/TextTrackCue.cpp
	Source/WebCore/html/track/TextTrackCue.h
	Source/WebCore/html/track/TextTrackCue.idl
	Source/WebCore/html/track/TextTrackCueGeneric.cpp
	Source/WebCore/html/track/TextTrackCueGeneric.h
	Source/WebCore/loader/TextTrackLoader.cpp
	Source/WebCore/rendering/RenderVTTCue.cpp
	Source/WebCore/rendering/RenderVTTCue.h
	Source/WebCore/rendering/RenderingAllInOne.cpp