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 |