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

Unified Diff: Source/core/html/HTMLMediaElement.cpp

Issue 594533002: Replace HTMLMediaElement::isActive() with Node::inActiveDocument() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 1 month 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/HTMLMediaElement.h ('k') | Source/core/rendering/RenderVideo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index d1bc1f789e1feab52dffecfdd34f22278776a4ab..e0f93c64d444976ef4af705c37d21aeffed7b774 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -357,7 +357,6 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum
, m_playing(false)
, m_shouldDelayLoadEvent(false)
, m_haveFiredLoadedData(false)
- , m_active(true)
, m_autoplaying(true)
, m_muted(false)
, m_paused(true)
@@ -603,8 +602,6 @@ Node::InsertionNotificationRequest HTMLMediaElement::insertedInto(ContainerNode*
HTMLElement::insertedInto(insertionPoint);
if (insertionPoint->inDocument()) {
- m_active = true;
-
if (!getAttribute(srcAttr).isEmpty() && m_networkState == NETWORK_EMPTY)
scheduleDelayedAction(LoadMediaResource);
}
@@ -621,8 +618,7 @@ void HTMLMediaElement::removedFrom(ContainerNode* insertionPoint)
{
WTF_LOG(Media, "HTMLMediaElement::removedFrom(%p, %p)", this, insertionPoint);
- m_active = false;
- if (insertionPoint->inDocument() && insertionPoint->document().isActive()) {
+ if (insertionPoint->inActiveDocument()) {
configureMediaControls();
if (m_networkState > NETWORK_EMPTY)
pause();
@@ -1476,7 +1472,7 @@ void HTMLMediaElement::endIgnoringTrackDisplayUpdateRequests()
{
ASSERT(m_ignoreTrackDisplayUpdate);
--m_ignoreTrackDisplayUpdate;
- if (!m_ignoreTrackDisplayUpdate && m_active)
+ if (!m_ignoreTrackDisplayUpdate && inActiveDocument())
updateActiveTextTrackCues(currentTime());
}
@@ -3560,7 +3556,6 @@ void HTMLMediaElement::stop()
if (m_playing && m_initialPlayWithoutUserGestures)
gesturelessInitialPlayHalted();
- m_active = false;
userCancelledLoad();
// Stop the playback without generating events
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/rendering/RenderVideo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698