Index: Source/core/html/HTMLMediaElement.cpp |
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp |
index 530c97c2c91858b93f3b6e76648aaf43813b7a56..e0f53c735d7921f20f546b27f3f73c744dbaed7e 100644 |
--- a/Source/core/html/HTMLMediaElement.cpp |
+++ b/Source/core/html/HTMLMediaElement.cpp |
@@ -3491,6 +3491,19 @@ bool HTMLMediaElement::hasPendingActivity() const |
return (hasAudio() && isPlaying()) || m_asyncEventQueue->hasPendingEvents(); |
} |
+void HTMLMediaElement::defaultEventHandler(Event* event) |
+{ |
+ if (isVideo() && event->type() == eventNames().clickEvent && document()->settings() |
+ && document()->settings()->clickToPlayPauseVideo()) { |
+ if (paused()) |
+ play(); |
+ else |
+ pause(); |
+ return; |
+ } |
+ HTMLElement::defaultEventHandler(event); |
+} |
+ |
bool HTMLMediaElement::isFullscreen() const |
{ |
return FullscreenController::isActiveFullScreenElement(this); |