diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-09-20 14:01:09 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-09-20 14:01:09 +0200 |
commit | 6dbcd09121fe266c7704a524b5cbd7f2754659c0 (patch) | |
tree | 5ae0d16cec0cc61f576d51c57b3a4613c7e91e22 /Source/WebCore/page/EventHandler.cpp | |
parent | 6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2 (diff) | |
download | qtwebkit-6dbcd09121fe266c7704a524b5cbd7f2754659c0.tar.gz |
Imported WebKit commit 080af0beaa6f0ba8ff8f44cb8bd8b5dcf75ac0af (http://svn.webkit.org/repository/webkit/trunk@129119)
New snapshot with prospective build fix for incorrect QtWebKit master module header file creation
Diffstat (limited to 'Source/WebCore/page/EventHandler.cpp')
-rw-r--r-- | Source/WebCore/page/EventHandler.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp index 919f8e45c..32d238ce3 100644 --- a/Source/WebCore/page/EventHandler.cpp +++ b/Source/WebCore/page/EventHandler.cpp @@ -2414,10 +2414,15 @@ bool EventHandler::handleGestureEvent(const PlatformGestureEvent& gestureEvent) if (gestureEvent.type() == PlatformEvent::GestureScrollEnd || gestureEvent.type() == PlatformEvent::GestureScrollUpdate) eventTarget = m_scrollGestureHandlingNode.get(); + IntPoint adjustedPoint = gestureEvent.position(); HitTestRequest::HitTestRequestType hitType = HitTestRequest::TouchEvent; - if (gestureEvent.type() == PlatformEvent::GestureTapDown) + if (gestureEvent.type() == PlatformEvent::GestureTapDown) { +#if ENABLE(TOUCH_ADJUSTMENT) + if (!gestureEvent.area().isEmpty()) + adjustGesturePosition(gestureEvent, adjustedPoint); +#endif hitType |= HitTestRequest::Active; - else if (gestureEvent.type() == PlatformEvent::GestureTap || gestureEvent.type() == PlatformEvent::GestureTapDownCancel) + } else if (gestureEvent.type() == PlatformEvent::GestureTap || gestureEvent.type() == PlatformEvent::GestureTapDownCancel) hitType |= HitTestRequest::Release; else hitType |= HitTestRequest::Active | HitTestRequest::ReadOnly; @@ -2426,7 +2431,7 @@ bool EventHandler::handleGestureEvent(const PlatformGestureEvent& gestureEvent) hitType |= HitTestRequest::ReadOnly; if (!eventTarget || !(hitType & HitTestRequest::ReadOnly)) { - IntPoint hitTestPoint = m_frame->view()->windowToContents(gestureEvent.position()); + IntPoint hitTestPoint = m_frame->view()->windowToContents(adjustedPoint); HitTestResult result = hitTestResultAtPoint(hitTestPoint, false, false, DontHitTestScrollbars, hitType); eventTarget = result.targetNode(); } @@ -2574,6 +2579,7 @@ bool EventHandler::adjustGesturePosition(const PlatformGestureEvent& gestureEven Node* targetNode = 0; switch (gestureEvent.type()) { case PlatformEvent::GestureTap: + case PlatformEvent::GestureTapDown: bestClickableNodeForTouchPoint(gestureEvent.position(), IntSize(gestureEvent.area().width() / 2, gestureEvent.area().height() / 2), adjustedPoint, targetNode); break; case PlatformEvent::GestureLongPress: |