Update HTMLMediaElement's index of cues when TextTrack.mode changes to
authorannacc@chromium.org <annacc@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Apr 2012 20:29:50 +0000 (20:29 +0000)
committerannacc@chromium.org <annacc@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Apr 2012 20:29:50 +0000 (20:29 +0000)
commit729c40ec2ac6ab2f58f3851df8047f8c7954a5a6
tree376e9970bee7a71ccc43ff32b4c9e7480365144a
parent1d6517d8188b308260658260feb58a065b388441
Update HTMLMediaElement's index of cues when TextTrack.mode changes to
and from TextTrack::DISABLED.
https://bugs.webkit.org/show_bug.cgi?id=83377

Reviewed by Eric Carlson.

Source/WebCore:

No new tests. Instead updated media/track/track-mode.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::textTrackModeChanged):
    Add the track's cues to the index when the mode changes to HIDDEN or SHOWING.

* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::textTrackRemoveCues):
    Fix a copy pasta error.

* html/track/TextTrack.cpp:
(WebCore::TextTrack::setMode):
    Remove the track's cues from the index when the mode changes to DISABLED.

LayoutTests:

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114026 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/media/track/captions-webvtt/captions-fast.vtt [new file with mode: 0644]
LayoutTests/media/track/track-mode-expected.txt
LayoutTests/media/track/track-mode.html
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLTrackElement.cpp
Source/WebCore/html/track/TextTrack.cpp