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

Unified Diff: Source/WebCore/html/HTMLMediaElement.cpp

Issue 12087064: Merge 140834 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/html/HTMLMediaElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/HTMLMediaElement.cpp
===================================================================
--- Source/WebCore/html/HTMLMediaElement.cpp (revision 141160)
+++ Source/WebCore/html/HTMLMediaElement.cpp (working copy)
@@ -1072,16 +1072,15 @@
// media element (not the disabled ones) whose start times are less than or
// equal to the current playback position and whose end times are greater
// than the current playback position.
- Vector<CueIntervalTree::IntervalType> currentCues;
+ CueList currentCues;
// The user agent must synchronously unset [the text track cue active] flag
// whenever ... the media element's readyState is changed back to HAVE_NOTHING.
if (m_readyState != HAVE_NOTHING && m_player)
currentCues = m_cueTree.allOverlaps(m_cueTree.createInterval(movieTime, movieTime));
- Vector<CueIntervalTree::IntervalType> affectedCues;
- Vector<CueIntervalTree::IntervalType> previousCues;
- Vector<CueIntervalTree::IntervalType> missedCues;
+ CueList previousCues;
+ CueList missedCues;
// 2 - Let other cues be a list of cues, initialized to contain all the cues
// of hidden, showing, and showing by default text tracks of the media
@@ -1100,7 +1099,7 @@
// end times are less than or equal to the current playback position.
// Otherwise, let missed cues be an empty list.
if (lastTime >= 0 && m_lastSeekTime < movieTime) {
- Vector<CueIntervalTree::IntervalType> potentiallySkippedCues =
+ CueList potentiallySkippedCues =
m_cueTree.allOverlaps(m_cueTree.createInterval(lastTime, movieTime));
for (size_t i = 0; i < potentiallySkippedCues.size(); ++i) {
@@ -1376,7 +1375,7 @@
// zero-length cues.
double endTime = max(cue->startTime(), cue->endTime());
- CueIntervalTree::IntervalType interval = m_cueTree.createInterval(cue->startTime(), endTime, cue.get());
+ CueInterval interval = m_cueTree.createInterval(cue->startTime(), endTime, cue.get());
if (!m_cueTree.contains(interval))
m_cueTree.add(interval);
updateActiveTextTrackCues(currentTime());
@@ -1388,7 +1387,13 @@
// zero-length cues.
double endTime = max(cue->startTime(), cue->endTime());
- m_cueTree.remove(m_cueTree.createInterval(cue->startTime(), endTime, cue.get()));
+ CueInterval interval = m_cueTree.createInterval(cue->startTime(), endTime, cue.get());
+ m_cueTree.remove(interval);
+
+ size_t index = m_currentlyActiveCues.find(interval);
+ if (index != notFound)
+ m_currentlyActiveCues.remove(index);
+
updateActiveTextTrackCues(currentTime());
}
« no previous file with comments | « Source/WebCore/html/HTMLMediaElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698