| Index: Source/core/page/EventHandler.cpp
|
| diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
|
| index f02bbce05b9e47279bc664e816faf680e84d7f20..eaf6c3e995f8a101c4454f47b87e7216812d1ebb 100644
|
| --- a/Source/core/page/EventHandler.cpp
|
| +++ b/Source/core/page/EventHandler.cpp
|
| @@ -2499,8 +2499,10 @@ bool EventHandler::bestClickableNodeForHitTestResult(const HitTestResult& result
|
| // FIXME: targetNode and success are only used by Internals functions. We should
|
| // instead have dedicated test methods so we only do this work in tests.
|
| bool success = findBestClickableCandidate(targetNode, targetPoint, touchCenter, touchRect, WillBeHeapVector<RefPtrWillBeMember<Node> > (nodes));
|
| - if (success && targetNode)
|
| - targetNode = targetNode->deprecatedShadowAncestorNode();
|
| + if (success && targetNode) {
|
| + if (targetNode->isInShadowTree())
|
| + targetNode = targetNode->shadowHost();
|
| + }
|
| return success;
|
| }
|
|
|
|
|