Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 belong's to Document, we should set innerNode to | |
|
bokan
2017/06/06 21:02:30
nit: belong's -> belongs
| |
| 169 // HTMLElement to match other browser. | |
|
bokan
2017/06/06 21:02:30
HTMLElement is a class, to prevent confusion I'd r
| |
| 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 Loading... | |
| 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 |
| OLD | NEW |