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

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

Issue 839293002: Revert of Re-enable the activation behavior of media elements (click to play/pause) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | « 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 967f8e3925e82adf9852c07addd24ae903f9f7e1..a9c1640aedebaf0e8fa83a3f951d0102f9a11d0d 100644
--- a/Source/core/html/shadow/MediaControlElements.cpp
+++ b/Source/core/html/shadow/MediaControlElements.cpp
@@ -311,6 +311,15 @@
return button.release();
}
+void MediaControlOverlayPlayButtonElement::defaultEventHandler(Event* event)
+{
+ if (event->type() == EventTypeNames::click && mediaElement().togglePlayStateWillPlay()) {
+ mediaElement().togglePlayState();
+ updateDisplayType();
+ event->setDefaultHandled();
+ }
+}
+
void MediaControlOverlayPlayButtonElement::updateDisplayType()
{
if (mediaElement().shouldShowControls() && mediaElement().togglePlayStateWillPlay())
« 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