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

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

Issue 25516002: Remove npr.org quirk in HTMLMediaElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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/HTMLMediaElement.h ('k') | no next file » | 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 cfe442397c75afbbe97d8d06a79fd678961a8dea..32d0ad26885f47e8816ab7fac4d6e5fd8617cac9 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -283,7 +283,6 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum
, m_pausedInternal(false)
, m_sendProgressEvents(true)
, m_closedCaptionsVisible(false)
- , m_dispatchingCanPlayEvent(false)
, m_loadInitiatedByUserGesture(false)
, m_completelyLoaded(false)
, m_havePreparedToPlay(false)
@@ -2156,16 +2155,6 @@ void HTMLMediaElement::play()
if (UserGestureIndicator::processingUserGesture())
removeBehaviorsRestrictionsAfterFirstUserGesture();
- Settings* settings = document().settings();
- if (settings && settings->needsSiteSpecificQuirks() && m_dispatchingCanPlayEvent && !m_loadInitiatedByUserGesture) {
- // It should be impossible to be processing the canplay event while handling a user gesture
- // since it is dispatched asynchronously.
- ASSERT(!UserGestureIndicator::processingUserGesture());
- String host = document().baseURL().host();
- if (host.endsWith(".npr.org", false) || equalIgnoringCase(host, "npr.org"))
- return;
- }
-
playInternal();
}
@@ -3902,24 +3891,6 @@ void HTMLMediaElement::updateMediaController()
m_mediaController->reportControllerState();
}
-bool HTMLMediaElement::dispatchEvent(PassRefPtr<Event> event)
-{
- bool dispatchResult;
- bool isCanPlayEvent;
-
- isCanPlayEvent = (event->type() == eventNames().canplayEvent);
-
- if (isCanPlayEvent)
- m_dispatchingCanPlayEvent = true;
-
- dispatchResult = HTMLElement::dispatchEvent(event);
-
- if (isCanPlayEvent)
- m_dispatchingCanPlayEvent = false;
-
- return dispatchResult;
-}
-
bool HTMLMediaElement::isBlocked() const
{
// A media element is a blocked media element if its readyState attribute is in the
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698