Replace TextTrackCue "getCueAsSource" method with "text" attribute
https://bugs.webkit.org/show_bug.cgi?id=75646

Reviewed by Darin Adler.

Source/WebCore: 

Test: media/track/track-cue-mutable-text.html

* html/HTMLMediaElement.h: getCueAsSource() -> text().

* html/TextTrackCue.cpp:
(WebCore::TextTrackCue::setText): New. Set cue text and clear the document fragment.
(WebCore::TextTrackCue::getCueAsHTML): Allocate the document fragment if it doesn't exist.
* html/TextTrackCue.h:
(WebCore::TextTrackCue::text):
* html/TextTrackCue.idl: getCueAsSource() -> text().

* html/shadow/MediaControlRootElement.cpp:
(WebCore::MediaControlRootElement::updateTextTrackDisplay): getCueAsSource() -> text().
* html/shadow/MediaControlRootElementChromium.cpp:
(WebCore::MediaControlRootElementChromium::updateTextTrackDisplay): getCueAsSource() -> text().

* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::collectCueText): processCueText is dead, long live createNewCue.
(WebCore::WebVTTParser::createDocumentFragmentFromCueText): New, split out of processCueText.
    Create a document fragment from the String argument.
(WebCore::WebVTTParser::createNewCue): Split out of processCueText.
(WebCore::WebVTTParser::constructTreeFromToken): Add a comment pointing to the spec section
    with the rules for DOM construction.
* html/track/WebVTTParser.h:

LayoutTests: 

* media/track/track-cue-mutable-text-expected.txt: Added.
* media/track/track-cue-mutable-text.html: Added. New test for mutable cue text.
* media/track/track-cue-nothing-to-render-expected.txt: getCueAsSource() -> text.
* media/track/track-cue-nothing-to-render.html: Ditto.
* media/track/track-cue-rendering-expected.txt: Ditto.
* media/track/track-cue-rendering.html: Ditto.
* media/track/track-webvtt-tc001-utf8-expected.txt: Ditto.
* media/track/track-webvtt-tc001-utf8.html: Ditto.
* media/track/track-webvtt-tc002-bom-expected.txt: Ditto.
* media/track/track-webvtt-tc002-bom.html: Ditto.
* media/track/track-webvtt-tc003-newlines-expected.txt: Ditto.
* media/track/track-webvtt-tc003-newlines.html: Ditto.
* media/track/track-webvtt-tc004-magic-header-expected.txt: Ditto.
* media/track/track-webvtt-tc004-magic-header.html: Ditto.
* media/track/track-webvtt-tc005-header-comment-expected.txt: Ditto.
* media/track/track-webvtt-tc005-header-comment.html: Ditto.
* media/track/track-webvtt-tc006-cue-identifiers-expected.txt: Ditto.
* media/track/track-webvtt-tc006-cue-identifiers.html: Ditto.
* media/track/track-webvtt-tc007-cue-no-id-expected.txt: Ditto.
* media/track/track-webvtt-tc007-cue-no-id.html: Ditto.
* media/track/track-webvtt-tc008-timings-no-hours-expected.txt: Ditto.
* media/track/track-webvtt-tc008-timings-no-hours.html: Ditto.
* media/track/track-webvtt-tc009-timings-hour-expected.txt: Ditto.
* media/track/track-webvtt-tc009-timings-hour.html: Ditto.
* media/track/track-webvtt-tc011-blank-lines-expected.txt: Ditto.
* media/track/track-webvtt-tc011-blank-lines.html: Ditto.
* media/track/track-webvtt-tc028-unsupported-markup-expected.txt: Ditto.
* media/track/track-webvtt-tc028-unsupported-markup.html: Ditto.
* platform/mac/fast/dom/Window/window-properties-expected.txt: Remove getCueAsSource.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/media/track/track-webvtt-tc004-magic-header.html b/LayoutTests/media/track/track-webvtt-tc004-magic-header.html
index 465f18f..18998c5 100644
--- a/LayoutTests/media/track/track-webvtt-tc004-magic-header.html
+++ b/LayoutTests/media/track/track-webvtt-tc004-magic-header.html
@@ -40,7 +40,7 @@
                             values : [30.5, 1200.5],
                         },
                         {
-                            property : "getCueAsSource()",
+                            property : "text",
                             values : ["Bear is Coming!!!!!", "I said Bear is coming!!!!"],
                         },
                     ],