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

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

Issue 242113012: Make text track and cue wrapper objects dependent on their media element. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Consistently use a Node-returning owner() Created 6 years, 8 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 5789476a8f848fd66ba5818692bb11e87bcb4c15..b12cce7ea8423da2b6452b636cc9ee076bf07997 100644
--- a/Source/core/html/track/TextTrack.cpp
+++ b/Source/core/html/track/TextTrack.cpp
@@ -428,7 +428,12 @@ ExecutionContext* TextTrack::executionContext() const
return m_document;
}
-HTMLMediaElement* TextTrack::mediaElement()
+HTMLMediaElement* TextTrack::mediaElement() const
+{
+ return m_trackList ? m_trackList->owner() : 0;
+}
+
+Node* TextTrack::owner() const
{
return m_trackList ? m_trackList->owner() : 0;
acolwell GONE FROM CHROMIUM 2014/04/21 16:51:16 nit: Any reason not to just forward to mediaElemen
sof 2014/04/21 18:35:01 None at all, done. Ideally [SetWrapperReferenceFro
}

Powered by Google App Engine
This is Rietveld 408576698