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/PrePaintTreeWalk.h" | 5 #include "core/paint/PrePaintTreeWalk.h" |
6 | 6 |
7 #include "core/dom/DocumentLifecycle.h" | 7 #include "core/dom/DocumentLifecycle.h" |
8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
10 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" | 10 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) | 107 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
108 return; | 108 return; |
109 | 109 |
110 if (!object.HasLayer()) | 110 if (!object.HasLayer()) |
111 return; | 111 return; |
112 | 112 |
113 PaintLayer* paint_layer = object.EnclosingLayer(); | 113 PaintLayer* paint_layer = object.EnclosingLayer(); |
114 paint_layer->UpdateAncestorOverflowLayer( | 114 paint_layer->UpdateAncestorOverflowLayer( |
115 context.ancestor_overflow_paint_layer); | 115 context.ancestor_overflow_paint_layer); |
116 | 116 |
117 if (object.StyleRef().HasStickyConstrainedPosition()) { | 117 if (object.StyleRef().GetPosition() == EPosition::kSticky) { |
118 paint_layer->GetLayoutObject().UpdateStickyPositionConstraints(); | 118 paint_layer->GetLayoutObject().UpdateStickyPositionConstraints(); |
119 | 119 |
120 // Sticky position constraints and ancestor overflow scroller affect the | 120 // Sticky position constraints and ancestor overflow scroller affect the |
121 // sticky layer position, so we need to update it again here. | 121 // sticky layer position, so we need to update it again here. |
122 // TODO(flackr): This should be refactored in the future to be clearer (i.e. | 122 // TODO(flackr): This should be refactored in the future to be clearer (i.e. |
123 // update layer position and ancestor inputs updates in the same walk). | 123 // update layer position and ancestor inputs updates in the same walk). |
124 paint_layer->UpdateLayerPosition(); | 124 paint_layer->UpdateLayerPosition(); |
125 } | 125 } |
126 | 126 |
127 if (paint_layer->IsRootLayer() || object.HasOverflowClip()) | 127 if (paint_layer->IsRootLayer() || object.HasOverflowClip()) |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 } | 302 } |
303 Walk(*ToFrameView(frame_view_base), context); | 303 Walk(*ToFrameView(frame_view_base), context); |
304 } | 304 } |
305 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281). | 305 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281). |
306 } | 306 } |
307 | 307 |
308 object.GetMutableForPainting().ClearPaintFlags(); | 308 object.GetMutableForPainting().ClearPaintFlags(); |
309 } | 309 } |
310 | 310 |
311 } // namespace blink | 311 } // namespace blink |
OLD | NEW |