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

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

Issue 177243018: Prevent 'removetrack' events from firing when all inband text tracks are removed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move the inband track removal loop into TextTrackList. Created 6 years, 10 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/track/TextTrack.cpp
diff --git a/Source/core/html/track/TextTrack.cpp b/Source/core/html/track/TextTrack.cpp
index 85c90290d0a837b563cc128742b3846600521393..b195d3ac680e0019fcaa938f79f58500374f4558 100644
--- a/Source/core/html/track/TextTrack.cpp
+++ b/Source/core/html/track/TextTrack.cpp
@@ -146,6 +146,13 @@ bool TextTrack::isValidKindKeyword(const AtomicString& value)
return false;
}
+void TextTrack::setTrackList(TextTrackList* trackList)
+{
+ m_trackList = trackList;
+ if (!m_trackList && m_cues && m_client)
+ m_client->textTrackRemoveCues(this, m_cues.get());
+}
+
void TextTrack::setKind(const AtomicString& newKind)
{
AtomicString oldKind = kind();
@@ -423,4 +430,3 @@ ExecutionContext* TextTrack::executionContext() const
}
} // namespace WebCore
-

Powered by Google App Engine
This is Rietveld 408576698