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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // Clear innerNode if we hit a scrollbar whose ScrollableArea isn't 157 // Clear innerNode if we hit a scrollbar whose ScrollableArea isn't
158 // associated with a LayoutBox so we aren't hitting some random element 158 // associated with a LayoutBox so we aren't hitting some random element
159 // below too. 159 // below too.
160 result.SetInnerNode(nullptr); 160 result.SetInnerNode(nullptr);
161 result.SetURLElement(nullptr); 161 result.SetURLElement(nullptr);
162 ScrollableArea* scrollable_area = 162 ScrollableArea* scrollable_area =
163 result.GetScrollbar()->GetScrollableArea(); 163 result.GetScrollbar()->GetScrollableArea();
164 if (scrollable_area && scrollable_area->GetLayoutBox() && 164 if (scrollable_area && scrollable_area->GetLayoutBox() &&
165 scrollable_area->GetLayoutBox()->GetNode()) { 165 scrollable_area->GetLayoutBox()->GetNode()) {
166 Node* node = scrollable_area->GetLayoutBox()->GetNode(); 166 Node* node = scrollable_area->GetLayoutBox()->GetNode();
167
168 // If scrollbar belongs to Document, we should set innerNode to the
169 // <html> element to match other browser.
170 if (node->IsDocumentNode())
171 node = node->GetDocument().documentElement();
172
167 result.SetInnerNode(node); 173 result.SetInnerNode(node);
168 result.SetURLElement(node->EnclosingLinkEventParentOrSelf()); 174 result.SetURLElement(node->EnclosingLinkEventParentOrSelf());
169 } 175 }
170 } 176 }
171 177
172 if (hit_layer) 178 if (hit_layer)
173 hit_test_cache_->AddCachedResult(result, dom_tree_version); 179 hit_test_cache_->AddCachedResult(result, dom_tree_version);
174 } 180 }
175 181
176 TRACE_EVENT_END1( 182 TRACE_EVENT_END1(
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 // Frame scroll corner is painted using LayoutView as the display item client. 921 // Frame scroll corner is painted using LayoutView as the display item client.
916 if (!RuntimeEnabledFeatures::RootLayerScrollingEnabled() && 922 if (!RuntimeEnabledFeatures::RootLayerScrollingEnabled() &&
917 (GetFrameView()->HorizontalScrollbar() || 923 (GetFrameView()->HorizontalScrollbar() ||
918 GetFrameView()->VerticalScrollbar())) 924 GetFrameView()->VerticalScrollbar()))
919 return false; 925 return false;
920 926
921 return LayoutBlockFlow::PaintedOutputOfObjectHasNoEffectRegardlessOfSize(); 927 return LayoutBlockFlow::PaintedOutputOfObjectHasNoEffectRegardlessOfSize();
922 } 928 }
923 929
924 } // namespace blink 930 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698