summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/html
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2011-08-22 11:27:10 -0700
committerTeng-Hui Zhu <ztenghui@google.com>2011-08-22 11:32:36 -0700
commitb96809187131720dd04bfca638ae069459878157 (patch)
tree18962015997a203c2e269e069262a8ccf439fcd2 /Source/WebCore/html
parent77e5b594dd717e27b1a8be2b521f738cf5941ae1 (diff)
downloadexternal_webkit-b96809187131720dd04bfca638ae069459878157.zip
external_webkit-b96809187131720dd04bfca638ae069459878157.tar.gz
external_webkit-b96809187131720dd04bfca638ae069459878157.tar.bz2
Fix the mouse handling for the video control
bug:5137664 Change-Id: I0f2b1a84beebe03d4282e728bb26ec70d05bf813
Diffstat (limited to 'Source/WebCore/html')
-rw-r--r--Source/WebCore/html/HTMLMediaElement.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp
index 93bd09e..f4f7002 100644
--- a/Source/WebCore/html/HTMLMediaElement.cpp
+++ b/Source/WebCore/html/HTMLMediaElement.cpp
@@ -1634,13 +1634,12 @@ void HTMLMediaElement::playbackProgressTimerFired(Timer<HTMLMediaElement>*)
scheduleTimeupdateEvent(true);
if (hasMediaControls()) {
-
- if (!m_mouseOver && controls() && hasVideo()) {
#if PLATFORM(ANDROID)
- if (WTF::currentTime() - m_lastTouch > TOUCH_DELAY)
+ m_mouseOver = WTF::currentTime() - m_lastTouch <= TOUCH_DELAY;
#endif
+ if (!m_mouseOver && controls() && hasVideo())
mediaControls()->makeTransparent();
- }
+
mediaControls()->playbackProgressed();
}
// FIXME: deal with cue ranges here
@@ -2374,6 +2373,9 @@ void HTMLMediaElement::defaultEventHandler(Event* event)
widget->handleEvent(event);
#else
if (event->isMouseEvent()) {
+#if PLATFORM(ANDROID)
+ m_lastTouch = WTF::currentTime();
+#endif
MouseEvent* mouseEvent = static_cast<MouseEvent*>(event);
if (mouseEvent->relatedTarget() != this) {
if (event->type() == eventNames().mouseoverEvent) {