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

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: Rebased 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 21942520fe4aeb31033a9899b054d37660d7f3c3..34014322d49057249becb2fdea2134c6d50a601d 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -1316,14 +1316,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);
}
« no previous file with comments | « LayoutTests/webexposed/global-constructors-listing-expected.txt ('k') | Source/core/html/shadow/MediaControlElements.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698