Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutView.cpp

Issue 2922193002: Change hover element to HTML element when over root scrollbar (Closed)
Patch Set: rebaseline layout test Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 a04a1d4839d142d50cb792e3fe18fef8fa689937..ded09863473484a8146c0e6f525cedf5f3706c1b 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
@@ -164,6 +164,12 @@ bool LayoutView::HitTestNoLifecycleUpdate(HitTestResult& result) {
if (scrollable_area && scrollable_area->GetLayoutBox() &&
scrollable_area->GetLayoutBox()->GetNode()) {
Node* node = scrollable_area->GetLayoutBox()->GetNode();
+
+ // If scrollbar belongs to Document, we should set innerNode to the
+ // <html> element to match other browser.
+ if (node->IsDocumentNode())
+ node = node->GetDocument().documentElement();
+
result.SetInnerNode(node);
result.SetURLElement(node->EnclosingLinkEventParentOrSelf());
}

Powered by Google App Engine
This is Rietveld 408576698