From 6fbaea61d241814b015fd7e022796e68d8ef3e8e Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Mon, 16 May 2011 16:35:58 +0100 Subject: Merge WebKit at r76408: Fix conflicts. Android.jscbindings.mk Conflict due to local addition of EntrySyncCustom.cpp and http://trac.webkit.org/changeset/76216 V8NPUtils.cpp Conflict due to local cherry pick of http://trac.webkit.org/changeset/78994 and merge of http://trac.webkit.org/changeset/76264 FrameView.h Conflict due to local addition of updatePositionedObjects() and http://trac.webkit.org/changeset/76278 RangeInputType.cpp SliderThumbElement.cpp Conflicts due to Android addition of touch handling code in slider code. See http://trac.webkit.org/changeset/76147 .gitignore - keep ours Change-Id: I38aeb361a37e7939f805c6689d7cc8fc720b3e52 --- Source/WebCore/rendering/RenderMedia.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'Source/WebCore/rendering') diff --git a/Source/WebCore/rendering/RenderMedia.cpp b/Source/WebCore/rendering/RenderMedia.cpp index f59a995..0b913ee 100644 --- a/Source/WebCore/rendering/RenderMedia.cpp +++ b/Source/WebCore/rendering/RenderMedia.cpp @@ -39,7 +39,8 @@ #include #include -#if PLATFORM(ANDROID) +#if PLATFORM(ANDROID) && ENABLE(TOUCH_EVENTS) +#include "TouchEvent.h" #define TOUCH_DELAY 4 #endif @@ -467,7 +468,7 @@ void RenderMedia::updateControlVisibility() if (style()->visibility() != VISIBLE) return; -#if PLATFORM(ANDROID) +#if PLATFORM(ANDROID) && ENABLE(TOUCH_EVENTS) if (WTF::currentTime() - m_lastTouch > TOUCH_DELAY) m_mouseOver = false; else @@ -631,6 +632,20 @@ void RenderMedia::forwardEvent(Event* event) updateControlVisibility(); } } +#if PLATFORM(ANDROID) && ENABLE(TOUCH_EVENTS) + // We want to process touch events landing on the timeline so that the user + // can drag the scrollbar thumb with their finger. + else if (event->isTouchEvent() && m_controlsShadowRoot) { + TouchEvent* touchEvent = static_cast(event); + if (touchEvent->touches() && touchEvent->touches()->item(0)) { + IntPoint point; + point.setX(touchEvent->touches()->item(0)->pageX()); + point.setY(touchEvent->touches()->item(0)->pageY()); + if (m_timeline && m_timeline->hitTest(point)) + m_timeline->defaultEventHandler(event); + } + } +#endif } // We want the timeline slider to be at least 100 pixels wide. -- cgit v1.1