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

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

Issue 25798003: Enable WebVTT regions for runtime testing, updated tests and minor fixes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revert Logging Created 7 years, 2 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
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 4d22096f951810c15135982ae1558a9c438185a2..9c65dc05637971d5e2afa0ae1cc4b72fd9de5714 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -1308,14 +1308,20 @@ void HTMLMediaElement::textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue> c
CueInterval interval = m_cueTree.createInterval(cue->startTime(), endTime, cue.get());
m_cueTree.remove(interval);
+ // Since the cue will be removed from the media element and likely the
+ // TextTrack might also be destructed, notifying the region of the cue
+ // removal shouldn't be done.
+ cue->notifyRegionWhenRemovingDisplayTree(false);
+
size_t index = m_currentlyActiveCues.find(interval);
if (index != kNotFound) {
m_currentlyActiveCues.remove(index);
cue->setIsActive(false);
}
-
cue->removeDisplayTree();
updateActiveTextTrackCues(currentTime());
+
+ cue->notifyRegionWhenRemovingDisplayTree(true);
}

Powered by Google App Engine
This is Rietveld 408576698