Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Side by Side Diff: Source/core/html/track/CueTimeline.cpp

Issue 1022743002: Document calls to the "rules for updating the text track rendering" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: leave comments only Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | Source/core/html/track/TextTrackContainer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/html/track/CueTimeline.h" 6 #include "core/html/track/CueTimeline.h"
7 7
8 #include "core/events/Event.h" 8 #include "core/events/Event.h"
9 #include "core/html/HTMLMediaElement.h" 9 #include "core/html/HTMLMediaElement.h"
10 #include "core/html/HTMLTrackElement.h" 10 #include "core/html/HTMLTrackElement.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // 4.8.10.8 Playing the media resource 125 // 4.8.10.8 Playing the media resource
126 126
127 // If the current playback position changes while the steps are running, 127 // If the current playback position changes while the steps are running,
128 // then the user agent must wait for the steps to complete, and then must 128 // then the user agent must wait for the steps to complete, and then must
129 // immediately rerun the steps. 129 // immediately rerun the steps.
130 if (ignoreUpdateRequests()) 130 if (ignoreUpdateRequests())
131 return; 131 return;
132 132
133 HTMLMediaElement& mediaElement = this->mediaElement(); 133 HTMLMediaElement& mediaElement = this->mediaElement();
134 134
135 // https://html.spec.whatwg.org/#time-marches-on
136
135 // 1 - Let current cues be a list of cues, initialized to contain all the 137 // 1 - Let current cues be a list of cues, initialized to contain all the
136 // cues of all the hidden, showing, or showing by default text tracks of the 138 // cues of all the hidden, showing, or showing by default text tracks of the
137 // media element (not the disabled ones) whose start times are less than or 139 // media element (not the disabled ones) whose start times are less than or
138 // equal to the current playback position and whose end times are greater 140 // equal to the current playback position and whose end times are greater
139 // than the current playback position. 141 // than the current playback position.
140 CueList currentCues; 142 CueList currentCues;
141 143
142 // The user agent must synchronously unset [the text track cue active] flag 144 // The user agent must synchronously unset [the text track cue active] flag
143 // whenever ... the media element's readyState is changed back to HAVE_NOTHI NG. 145 // whenever ... the media element's readyState is changed back to HAVE_NOTHI NG.
144 if (mediaElement.readyState() != HTMLMediaElement::HAVE_NOTHING && mediaElem ent.webMediaPlayer()) 146 if (mediaElement.readyState() != HTMLMediaElement::HAVE_NOTHING && mediaElem ent.webMediaPlayer())
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 if (!m_ignoreUpdate && mediaElement().inActiveDocument()) 347 if (!m_ignoreUpdate && mediaElement().inActiveDocument())
346 updateActiveCues(mediaElement().currentTime()); 348 updateActiveCues(mediaElement().currentTime());
347 } 349 }
348 350
349 DEFINE_TRACE(CueTimeline) 351 DEFINE_TRACE(CueTimeline)
350 { 352 {
351 visitor->trace(m_mediaElement); 353 visitor->trace(m_mediaElement);
352 } 354 }
353 355
354 } // namespace blink 356 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | Source/core/html/track/TextTrackContainer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698