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; |
} |