summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2011-12-16 14:18:04 -0800
committerTeng-Hui Zhu <ztenghui@google.com>2011-12-16 15:04:59 -0800
commit9c3dbdd3eb7ea7e3f52878230326899ab7ef1dc5 (patch)
treecc694dfe04bf31fbb369e14beb6f5c0444601832
parentddea613344522ddb1e0b53d2a5bf6785f169d9a7 (diff)
downloadexternal_webkit-9c3dbdd3eb7ea7e3f52878230326899ab7ef1dc5.zip
external_webkit-9c3dbdd3eb7ea7e3f52878230326899ab7ef1dc5.tar.gz
external_webkit-9c3dbdd3eb7ea7e3f52878230326899ab7ef1dc5.tar.bz2
Tap to play/pause should avoid customized handler
This fix websites which is having their own touch handler to play/pause. E.g://www.nme.com/reviews/young-knives/11931 bug:4232704 Change-Id: I049ea943e14b82a84d7a55e4bd4ed88a34c984b1
-rw-r--r--Source/WebCore/html/HTMLMediaElement.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp
index 6407f9f..e1f4227 100644
--- a/Source/WebCore/html/HTMLMediaElement.cpp
+++ b/Source/WebCore/html/HTMLMediaElement.cpp
@@ -2405,7 +2405,8 @@ void HTMLMediaElement::defaultEventHandler(Event* event)
#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)
+ if (event->type() == eventNames().clickEvent
+ && !hasEventListeners(eventNames().clickEvent))
togglePlayState();
#endif
HTMLElement::defaultEventHandler(event);