Bug 72552

Summary: Unset the active flag when TextTrackCues go away
Product: WebKit Reporter: Anna Cavender <annacc>
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, eric.carlson, vcarbune, webkit-bug-importer, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 43668    
Attachments:
Description Flags
Proposed patch
webkit.review.bot: commit-queue-
Updated patch. mjs: review+, webkit.review.bot: commit-queue-

Description Anna Cavender 2011-11-16 14:49:16 PST
4.8.10.12.1 Text track model
http://www.whatwg.org/specs/web-apps/current-work/#text-track-cue-active-flag
The active flag
… The user agent must synchronously unset this flag whenever the text track cue is removed from its text track's text track list of cues; whenever the text track itself is removed from its media element's list of text tracks or has its text track mode changed to disabled; and whenever the media element's readyState is changed back to HAVE_NOTHING. When the flag is unset in this way for one or more cues in text tracks that were showing or showing by default prior to the relevant incident, the user agent must, after having unset the flag for all the affected cues, apply the rules for updating the text track rendering of those text tracks. For example, for text tracks based on WebVTT, the rules for updating the display of WebVTT text tracks.
Comment 1 Radar WebKit Bug Importer 2011-11-17 12:39:09 PST
<rdar://problem/10464476>
Comment 2 Eric Carlson 2012-02-07 14:41:45 PST
Created attachment 125930 [details]
Proposed patch
Comment 3 Eric Carlson 2012-02-07 14:43:50 PST
We already clear a cue's active flag when it is removed from the track, and existing tests check that. 

We were not clearing active flags when the media element's readyState is set to HAVE_NOTHING, this patch does that.
Comment 4 WebKit Review Bot 2012-02-07 15:41:18 PST
Comment on attachment 125930 [details]
Proposed patch

Attachment 125930 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/11460118

New failing tests:
media/track/track-cue-mutable-text.html
media/track/track-active-cues.html
Comment 5 Eric Carlson 2012-02-09 13:18:10 PST
Created attachment 126357 [details]
Updated patch.
Comment 6 WebKit Review Bot 2012-02-09 13:55:41 PST
Comment on attachment 126357 [details]
Updated patch.

Attachment 126357 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/11480402

New failing tests:
media/track/track-cue-mutable-text.html
Comment 7 Maciej Stachowiak 2012-02-09 14:56:34 PST
Comment on attachment 126357 [details]
Updated patch.

Code change looks good to me, but please check why media/track/track-cue-mutable-text.html is failing on cr-linux. Maybe it just needs to be skipped. Conditional r+ assuming that test failure can be fixed.
Comment 8 Eric Carlson 2012-02-15 12:04:52 PST
http://trac.webkit.org/changeset/107831