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

Unified Diff: Source/core/html/track/TextTrack.cpp

Issue 994353003: Hide call to removeDisplayTree in CueTimeline (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/track/CueTimeline.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/TextTrack.cpp
diff --git a/Source/core/html/track/TextTrack.cpp b/Source/core/html/track/TextTrack.cpp
index 777ba64eda2e7f112c74044ebce1f89bca3c1f8a..3916eb7159ac8f3b29f831a64debde7c48ff5597 100644
--- a/Source/core/html/track/TextTrack.cpp
+++ b/Source/core/html/track/TextTrack.cpp
@@ -173,14 +173,14 @@ void TextTrack::setMode(const AtomicString& mode)
if (m_mode == mode)
return;
- // If mode changes to disabled, remove this track's cues from the client
- // because they will no longer be accessible from the cues() function.
- if (mode == disabledKeyword() && cueTimeline() && m_cues)
- cueTimeline()->removeCues(this, m_cues.get());
-
- if (mode != showingKeyword() && m_cues)
- for (size_t i = 0; i < m_cues->length(); ++i)
- m_cues->item(i)->removeDisplayTree();
+ if (m_cues && cueTimeline()) {
+ // If mode changes to disabled, remove this track's cues from the client
+ // because they will no longer be accessible from the cues() function.
+ if (mode == disabledKeyword())
+ cueTimeline()->removeCues(this, m_cues.get());
+ else if (mode != showingKeyword())
+ cueTimeline()->hideCues(this, m_cues.get());
+ }
m_mode = mode;
« no previous file with comments | « Source/core/html/track/CueTimeline.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698