OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/paint/PaintInvalidationCapableScrollableArea.h" | 5 #include "core/paint/PaintInvalidationCapableScrollableArea.h" |
6 | 6 |
7 #include "core/frame/Settings.h" | 7 #include "core/frame/Settings.h" |
8 #include "core/html/HTMLFrameOwnerElement.h" | 8 #include "core/html/HTMLFrameOwnerElement.h" |
9 #include "core/layout/LayoutBox.h" | 9 #include "core/layout/LayoutBox.h" |
10 #include "core/layout/LayoutScrollbar.h" | 10 #include "core/layout/LayoutScrollbar.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 fullBounds.unite(m_verticalScrollbarPreviousPaintInvalidationRect); | 128 fullBounds.unite(m_verticalScrollbarPreviousPaintInvalidationRect); |
129 fullBounds.unite(m_scrollCornerAndResizerPreviousPaintInvalidationRect); | 129 fullBounds.unite(m_scrollCornerAndResizerPreviousPaintInvalidationRect); |
130 return fullBounds; | 130 return fullBounds; |
131 } | 131 } |
132 | 132 |
133 void PaintInvalidationCapableScrollableArea::scrollControlWasSetNeedsPaintInvali
dation() | 133 void PaintInvalidationCapableScrollableArea::scrollControlWasSetNeedsPaintInvali
dation() |
134 { | 134 { |
135 layoutBox()->setMayNeedPaintInvalidation(); | 135 layoutBox()->setMayNeedPaintInvalidation(); |
136 } | 136 } |
137 | 137 |
138 bool PaintInvalidationCapableScrollableArea::shouldPerformScrollAnchoring() cons
t | |
139 { | |
140 return RuntimeEnabledFeatures::scrollAnchoringEnabled() | |
141 && layoutBox()->style()->overflowAnchor() != AnchorNone; | |
142 } | |
143 | |
144 } // namespace blink | 138 } // namespace blink |
OLD | NEW |