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

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

Issue 249483002: Disable the activation behavior of media elements (click to play/pause) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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') | Source/core/html/shadow/MediaControlElements.h » ('j') | 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 a1b315ee13a62c73184a708751cb011486d4e3e4..0797ebd9c0d780386fd7ca006c16fd7d43ea377a 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -2207,7 +2207,6 @@ bool HTMLMediaElement::togglePlayStateWillPlay() const
void HTMLMediaElement::togglePlayState()
{
- // The activation behavior of a media element that is exposing a user interface to the user
if (m_mediaController) {
if (m_mediaController->isRestrained())
m_mediaController->play();
@@ -3403,11 +3402,6 @@ void HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured()
configureTextTracks();
}
-bool HTMLMediaElement::willRespondToMouseClickEvents()
-{
- return controls();
-}
-
void* HTMLMediaElement::preDispatchEventHandler(Event* event)
{
if (event && event->type() == EventTypeNames::webkitfullscreenchange)
@@ -3416,16 +3410,6 @@ void* HTMLMediaElement::preDispatchEventHandler(Event* event)
return 0;
}
-void HTMLMediaElement::defaultEventHandler(Event* event)
-{
- if (event->type() == EventTypeNames::click && willRespondToMouseClickEvents()) {
- togglePlayState();
- event->setDefaultHandled();
- return;
- }
- HTMLElement::defaultEventHandler(event);
-}
-
void HTMLMediaElement::createMediaPlayer()
{
#if ENABLE(WEB_AUDIO)
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/html/shadow/MediaControlElements.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698