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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 448593002: Make Gesture Tap be aware of Shadow DOM. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update LinkHighlight Created 6 years, 4 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
« no previous file with comments | « 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 8a6d06f5136d659721de230a5aa6547202e5e9c6..cc9974a72d93484b894b01b8d9876c4faa83f5a2 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -1053,7 +1053,7 @@ WebRect WebViewImpl::computeBlockBounds(const WebRect& rect, bool ignoreClipping
// Find the block type node based on the hit node.
while (node && (!node->renderer() || node->renderer()->isInline()))
- node = node->parentNode();
+ node = NodeRenderingTraversal::parent(node);
// Return the bounding box in the window coordinate system.
if (node) {
@@ -1194,20 +1194,20 @@ Node* WebViewImpl::bestTapNode(const PlatformGestureEvent& tapEvent)
// 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();
+ bestTouchNode = NodeRenderingTraversal::parent(bestTouchNode);
esprehn 2014/08/06 17:05:44 What is updating the distribution before you call
hayato 2014/08/07 02:44:55 I assumed distributions would be updated at the ti
// 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, m_page->deprecatedLocalMainFrame()))
- bestTouchNode = bestTouchNode->parentNode();
+ bestTouchNode = NodeRenderingTraversal::parent(bestTouchNode);
if (!bestTouchNode)
return 0;
// We should pick the largest enclosing node with hand cursor set.
- while (bestTouchNode->parentNode() && invokesHandCursor(bestTouchNode->parentNode(), toLocalFrame(m_page->mainFrame())))
- bestTouchNode = bestTouchNode->parentNode();
-
+ Node* parentNode;
+ while ((parentNode = NodeRenderingTraversal::parent(bestTouchNode)) && invokesHandCursor(parentNode, toLocalFrame(m_page->mainFrame())))
esprehn 2014/08/06 17:05:44 This would be nicer as a for loop and a break stat
+ bestTouchNode = parentNode;
return bestTouchNode;
}
« no previous file with comments | « Source/web/LinkHighlight.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698