Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutView.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutView.cpp b/third_party/WebKit/Source/core/layout/LayoutView.cpp |
| index 374293e898c154a038231f87d6e7e1010b63b406..12b49a4a86be2b0563b817d44bedd8e6c7f47b3d 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutView.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp |
| @@ -155,6 +155,18 @@ bool LayoutView::hitTestNoLifecycleUpdate(HitTestResult& result) { |
| frameView()->scrollbarAtFramePoint(framePoint)) |
| result.setScrollbar(frameScrollbar); |
| + // If hitTestResult include scrollbar, innerNode should be the parent of the |
| + // scrollbar. |
| + if (result.scrollbar()) { |
| + ScrollableArea* scrollableArea = result.scrollbar()->getScrollableArea(); |
|
bokan
2017/03/31 20:07:00
We should probably clear the innerNode first. That
|
| + if (scrollableArea && scrollableArea->layoutBox() && |
| + scrollableArea->layoutBox()->node()) { |
| + Node* node = scrollableArea->layoutBox()->node(); |
| + result.setInnerNode(node); |
| + result.setURLElement(node->enclosingLinkEventParentOrSelf()); |
|
mustaq
2017/03/31 16:57:48
Please add a comment for |HitTestResult.m_innerURL
|
| + } |
| + } |
| + |
| if (hitLayer) |
| m_hitTestCache->addCachedResult(result, domTreeVersion); |
| } |