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

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

Issue 2648263004: 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
« no previous file with comments | « third_party/WebKit/LayoutTests/media/video-no-controls-events-not-absorbed.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bcd0d7c4fd5a72c48714ddd2ae41fb5732adb989..c081aaa0265152d81d3cacbef97d98bacd432925 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControls.cpp
@@ -590,6 +590,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
« no previous file with comments | « third_party/WebKit/LayoutTests/media/video-no-controls-events-not-absorbed.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698