Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2749)

Unified Diff: Source/web/WebViewImpl.cpp

Issue 129643002: Fix link highlights on links that contain images. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« Source/web/LinkHighlight.cpp ('K') | « Source/web/LinkHighlight.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« Source/web/LinkHighlight.cpp ('K') | « Source/web/LinkHighlight.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698