summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/html
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2011-12-12 14:39:04 -0800
committerTeng-Hui Zhu <ztenghui@google.com>2011-12-13 11:12:40 -0800
commitd649883ce629c0de432e075254b517a50685792e (patch)
tree4fcce956db39661a16d5e002715b8ef3ad772feb /Source/WebCore/html
parentd07292c75082db457ad498747c0b05d38a14e8d7 (diff)
downloadexternal_webkit-d649883ce629c0de432e075254b517a50685792e.zip
external_webkit-d649883ce629c0de432e075254b517a50685792e.tar.gz
external_webkit-d649883ce629c0de432e075254b517a50685792e.tar.bz2
Tap to play/pause for html5 video with UI
bug:4232704 Change-Id: Ice99bc0fa19de93627fe8ffb91085838fa682315
Diffstat (limited to 'Source/WebCore/html')
-rw-r--r--Source/WebCore/html/HTMLMediaElement.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp
index 023e8d2..6407f9f 100644
--- a/Source/WebCore/html/HTMLMediaElement.cpp
+++ b/Source/WebCore/html/HTMLMediaElement.cpp
@@ -2402,6 +2402,12 @@ void HTMLMediaElement::defaultEventHandler(Event* event)
}
#endif
+#if PLATFORM(ANDROID)
+ // It is really hard to hit the play/pause button on mobile devices.
+ // This allows user to click the video area to toggle play/pause state.
+ if (event->type() == eventNames().clickEvent)
+ togglePlayState();
+#endif
HTMLElement::defaultEventHandler(event);
#endif
}