| Index: third_party/WebKit/Source/core/input/EventHandlingUtil.cpp
|
| diff --git a/third_party/WebKit/Source/core/input/EventHandlingUtil.cpp b/third_party/WebKit/Source/core/input/EventHandlingUtil.cpp
|
| index 2ae4665c82a002a4953cdc4729abd10cddf36626..661b39342fa8e068b59417dc3d6fc0b513ab0791 100644
|
| --- a/third_party/WebKit/Source/core/input/EventHandlingUtil.cpp
|
| +++ b/third_party/WebKit/Source/core/input/EventHandlingUtil.cpp
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "core/frame/LocalFrame.h"
|
| #include "core/frame/LocalFrameView.h"
|
| +#include "core/layout/LayoutEmbeddedContent.h"
|
| #include "core/layout/api/LayoutViewItem.h"
|
| #include "core/paint/PaintLayer.h"
|
| #include "platform/scroll/ScrollableArea.h"
|
| @@ -128,5 +129,21 @@ MouseEventWithHitTestResults PerformMouseEventHitTest(
|
| mev);
|
| }
|
|
|
| +LocalFrame* SubframeForTargetNode(Node* node) {
|
| + if (!node)
|
| + return nullptr;
|
| +
|
| + LayoutObject* layout_object = node->GetLayoutObject();
|
| + if (!layout_object || !layout_object->IsLayoutEmbeddedContent())
|
| + return nullptr;
|
| +
|
| + LocalFrameView* frame_view =
|
| + ToLayoutEmbeddedContent(layout_object)->ChildFrameView();
|
| + if (!frame_view)
|
| + return nullptr;
|
| +
|
| + return &frame_view->GetFrame();
|
| +}
|
| +
|
| } // namespace EventHandlingUtil
|
| } // namespace blink
|
|
|