Index: Source/web/WebViewImpl.cpp |
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
index 9d314fb083d8c013b0979c995412fab2c297abae..005a04d7083b42837f00745a94ea8f1955272168 100644 |
--- a/Source/web/WebViewImpl.cpp |
+++ b/Source/web/WebViewImpl.cpp |
@@ -1264,12 +1264,21 @@ Node* WebViewImpl::bestTapNode(const GestureEventWithHitTestResults& targetedTap |
return 0; |
Node* bestTouchNode = targetedTapEvent.hitTestResult().innerNode(); |
+ if (!bestTouchNode) |
+ return nullptr; |
// 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 |
// FIXME: This wants to walk composed tree with NodeRenderingTraversal::parent(). |
Rick Byers
2015/02/20 20:37:14
nit: mind removing this FIXME while you're here?
kojii
2015/02/23 03:44:18
Done.
|
- while (bestTouchNode && !bestTouchNode->renderer()) |
+ while (!bestTouchNode->renderer()) { |
bestTouchNode = NodeRenderingTraversal::parent(*bestTouchNode); |
+ if (!bestTouchNode) |
+ return nullptr; |
+ } |
+ |
+ // Editable nodes should not be highlighted (e.g., <input>) |
hayato
2015/02/17 10:34:56
Not sure this is always true.
I'm afraid that this
kojii
2015/02/17 13:08:02
Highlights are for links, so I suppose it's quite
Rick Byers
2015/02/20 20:37:14
Highlights are for more than "links", eg. a <div>
|
+ if (bestTouchNode->hasEditableStyle()) |
+ return nullptr; |
Node* cursorDefiningAncestor = |
findCursorDefiningAncestor(bestTouchNode, m_page->deprecatedLocalMainFrame()); |