| Index: Source/web/WebViewImpl.cpp
|
| diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
|
| index 9d314fb083d8c013b0979c995412fab2c297abae..deca8c20ba91eb6e109190fbf41d4b9f487d14cd 100644
|
| --- a/Source/web/WebViewImpl.cpp
|
| +++ b/Source/web/WebViewImpl.cpp
|
| @@ -1264,12 +1264,20 @@ 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().
|
| - while (bestTouchNode && !bestTouchNode->renderer())
|
| + while (!bestTouchNode->renderer()) {
|
| bestTouchNode = NodeRenderingTraversal::parent(*bestTouchNode);
|
| + if (!bestTouchNode)
|
| + return nullptr;
|
| + }
|
| +
|
| + // Editable nodes should not be highlighted (e.g., <input>)
|
| + if (bestTouchNode->hasEditableStyle())
|
| + return nullptr;
|
|
|
| Node* cursorDefiningAncestor =
|
| findCursorDefiningAncestor(bestTouchNode, m_page->deprecatedLocalMainFrame());
|
|
|