diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-18 14:03:11 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-18 14:03:11 +0200 |
| commit | 8d473cf9743f1d30a16a27114e93bd5af5648d23 (patch) | |
| tree | cdca40d0353886b3ca52f33a2d7b8f1c0011aafc /Source/WebCore/page/EventHandler.cpp | |
| parent | 1b914638db989aaa98631a1c1e02c7b2d44805d8 (diff) | |
| download | qtwebkit-8d473cf9743f1d30a16a27114e93bd5af5648d23.tar.gz | |
Imported WebKit commit 1350e72f7345ced9da2bd9980deeeb5a8d62fab4 (http://svn.webkit.org/repository/webkit/trunk@117578)
Weekly snapshot
Diffstat (limited to 'Source/WebCore/page/EventHandler.cpp')
| -rw-r--r-- | Source/WebCore/page/EventHandler.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Source/WebCore/page/EventHandler.cpp b/Source/WebCore/page/EventHandler.cpp index 5cf991f96..b4221b0b4 100644 --- a/Source/WebCore/page/EventHandler.cpp +++ b/Source/WebCore/page/EventHandler.cpp @@ -72,6 +72,7 @@ #include "ScrollAnimator.h" #include "Scrollbar.h" #include "Settings.h" +#include "ShadowRoot.h" #include "SpatialNavigation.h" #include "StaticHashSetNodeList.h" #include "StyleCachedImage.h" @@ -2091,7 +2092,7 @@ static inline SVGElementInstance* instanceAssociatedWithShadowTreeElement(Node* if (!referenceNode || !referenceNode->isSVGElement()) return 0; - Node* shadowTreeElement = referenceNode->shadowTreeRootNode(); + Node* shadowTreeElement = referenceNode->shadowRoot(); if (!shadowTreeElement) return 0; @@ -2429,11 +2430,12 @@ bool EventHandler::handleGestureEvent(const PlatformGestureEvent& gestureEvent) return false; } -bool EventHandler::handleGestureTap(const PlatformGestureEvent& gestureEvent, Node* preTargetedNode) +bool EventHandler::handleGestureTap(const PlatformGestureEvent& gestureEvent) { + // FIXME: Refactor this code to not hit test multiple times. IntPoint adjustedPoint = gestureEvent.position(); #if ENABLE(TOUCH_ADJUSTMENT) - if (!gestureEvent.area().isEmpty() && !preTargetedNode) { + if (!gestureEvent.area().isEmpty()) { Node* targetNode = 0; // For now we use the adjusted position to ensure the later redundant hit-tests hits the right node. bestClickableNodeForTouchPoint(gestureEvent.position(), IntSize(gestureEvent.area().width() / 2, gestureEvent.area().height() / 2), adjustedPoint, targetNode); @@ -2441,9 +2443,6 @@ bool EventHandler::handleGestureTap(const PlatformGestureEvent& gestureEvent, No return false; } #endif - // FIXME: Refactor to avoid hit testing multiple times (this is only an interim step). - if (preTargetedNode) - adjustedPoint = preTargetedNode->getPixelSnappedRect().center(); bool defaultPrevented = false; PlatformMouseEvent fakeMouseMove(adjustedPoint, gestureEvent.globalPosition(), NoButton, PlatformEvent::MouseMoved, /* clickCount */ 1, gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey(), gestureEvent.timestamp()); |
