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

Unified Diff: Source/core/html/shadow/MediaControlElements.cpp

Issue 208483002: Implement the activation behavior of media elements (click to play/pause) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: cancel activation behavior in a failing fullscreen test Created 6 years, 9 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/shadow/MediaControlElements.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/shadow/MediaControlElements.cpp
diff --git a/Source/core/html/shadow/MediaControlElements.cpp b/Source/core/html/shadow/MediaControlElements.cpp
index e07cb3fc306fa7b98465236a05aa0fbe33b4f7de..80337bca6c90573670c4b7f91d4d5934fb3f285c 100644
--- a/Source/core/html/shadow/MediaControlElements.cpp
+++ b/Source/core/html/shadow/MediaControlElements.cpp
@@ -77,6 +77,17 @@ const AtomicString& MediaControlPanelElement::shadowPseudoId() const
return id;
}
+void MediaControlPanelElement::defaultEventHandler(Event* event)
+{
+ // Suppress the media element activation behavior (toggle play/pause) when
+ // any part of the control panel is clicked.
+ if (event->type() == EventTypeNames::click) {
+ event->setDefaultHandled();
+ return;
+ }
+ HTMLDivElement::defaultEventHandler(event);
+}
+
void MediaControlPanelElement::startTimer()
{
stopTimer();
« no previous file with comments | « Source/core/html/shadow/MediaControlElements.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698