Index: Source/web/WebViewImpl.cpp |
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
index b686b28c994fe73948a9d92b54dc9dd6dcf8c3a3..f30cd86ec18a4df2a92b78269832ff99fa187fdc 100644 |
--- a/Source/web/WebViewImpl.cpp |
+++ b/Source/web/WebViewImpl.cpp |
@@ -1114,35 +1114,21 @@ Node* WebViewImpl::bestTapNode(const PlatformGestureEvent& tapEvent) |
HitTestResult result = m_page->mainFrame()->eventHandler().hitTestResultAtPoint(hitTestPoint, HitTestRequest::TouchEvent | HitTestRequest::ConfusingAndOftenMisusedDisallowShadowContent); |
bestTouchNode = result.targetNode(); |
- Node* firstUncontainedNode = 0; |
- |
// We might hit something like an image map that has no renderer on it |
// Walk up the tree until we have a node with an attached renderer |
while (bestTouchNode && !bestTouchNode->renderer()) |
bestTouchNode = bestTouchNode->parentNode(); |
- // FIXME: http://crbug.com/289764 - Instead of stopping early on isContainedInParentBoundingBox, LinkHighlight |
- // should calculate the appropriate rects (currently it just uses the linebox) |
- |
// Check if we're in the subtree of a node with a hand cursor |
// this is the heuristic we use to determine if we show a highlight on tap |
- while (bestTouchNode && !invokesHandCursor(bestTouchNode, false, m_page->mainFrame())) { |
- if (!firstUncontainedNode && !bestTouchNode->renderer()->isContainedInParentBoundingBox()) |
- firstUncontainedNode = bestTouchNode; |
- |
+ while (bestTouchNode && !invokesHandCursor(bestTouchNode, false, m_page->mainFrame())) |
bestTouchNode = bestTouchNode->parentNode(); |
- } |
if (!bestTouchNode) |
return 0; |
- if (firstUncontainedNode) |
- return firstUncontainedNode; |
- |
// We should pick the largest enclosing node with hand cursor set. |
- while (bestTouchNode->parentNode() |
- && invokesHandCursor(bestTouchNode->parentNode(), false, m_page->mainFrame()) |
- && bestTouchNode->renderer()->isContainedInParentBoundingBox()) |
+ while (bestTouchNode->parentNode() && invokesHandCursor(bestTouchNode->parentNode(), false, m_page->mainFrame())) |
bestTouchNode = bestTouchNode->parentNode(); |
return bestTouchNode; |