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

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: Remove console messages 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
« no previous file with comments | « Source/core/html/track/TextTrack.h ('k') | Source/core/html/track/TextTrackList.h » ('j') | 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 85c90290d0a837b563cc128742b3846600521393..0017abfd3762e02dc922415b56fc0d310a600c4f 100644
--- a/Source/core/html/track/TextTrack.cpp
+++ b/Source/core/html/track/TextTrack.cpp
@@ -146,6 +146,17 @@ bool TextTrack::isValidKindKeyword(const AtomicString& value)
return false;
}
+void TextTrack::setTrackList(TextTrackList* trackList)
+{
+ // NOTE: We are using m_trackList->owner() instead of m_client here because
+ // when a HTMLTrackElement is reparented, HTMLTrackElement::textTrackRemoveCues()
+ // will forward the call to the new parent instead of the element the track is being
+ // removed from.
+ if (!trackList && m_trackList && m_trackList->owner() && m_cues)
+ m_trackList->owner()->textTrackRemoveCues(this, m_cues.get());
+ m_trackList = trackList;
+}
+
void TextTrack::setKind(const AtomicString& newKind)
{
AtomicString oldKind = kind();
@@ -423,4 +434,3 @@ ExecutionContext* TextTrack::executionContext() const
}
} // namespace WebCore
-
« no previous file with comments | « Source/core/html/track/TextTrack.h ('k') | Source/core/html/track/TextTrackList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698