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

Unified Diff: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp

Issue 2643723003: Media Controls: do not handle any event if no controls should be visible. (Closed)
Patch Set: Created 3 years, 11 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: third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
index c3c805ef5069513969b4fb89f76fa9a40cd2f99c..89f8b67ed7531bd47f8619d88d91b4e59aeef7df 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
@@ -570,6 +570,11 @@ void MediaControls::stoppedCasting() {
void MediaControls::defaultEventHandler(Event* event) {
HTMLDivElement::defaultEventHandler(event);
+ // Do not handle events to not interfere with the rest of the page if no
+ // controls should be visible.
+ if (!mediaElement().shouldShowControls())
+ return;
+
// Add IgnoreControlsHover to m_hideTimerBehaviorFlags when we see a touch
// event, to allow the hide-timer to do the right thing when it fires.
// FIXME: Preferably we would only do this when we're actually handling the

Powered by Google App Engine
This is Rietveld 408576698