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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 PrePaintTreeWalkContext& context) { | 91 PrePaintTreeWalkContext& context) { |
92 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) | 92 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
93 return; | 93 return; |
94 | 94 |
95 if (!object.hasLayer()) | 95 if (!object.hasLayer()) |
96 return; | 96 return; |
97 | 97 |
98 PaintLayer* paintLayer = object.enclosingLayer(); | 98 PaintLayer* paintLayer = object.enclosingLayer(); |
99 paintLayer->updateAncestorOverflowLayer(context.ancestorOverflowPaintLayer); | 99 paintLayer->updateAncestorOverflowLayer(context.ancestorOverflowPaintLayer); |
100 | 100 |
101 if (object.styleRef().position() == EPosition::kSticky) { | 101 if (object.styleRef().hasStickyConstrainedPosition()) { |
102 paintLayer->layoutObject().updateStickyPositionConstraints(); | 102 paintLayer->layoutObject().updateStickyPositionConstraints(); |
103 | 103 |
104 // Sticky position constraints and ancestor overflow scroller affect the | 104 // Sticky position constraints and ancestor overflow scroller affect the |
105 // sticky layer position, so we need to update it again here. | 105 // sticky layer position, so we need to update it again here. |
106 // TODO(flackr): This should be refactored in the future to be clearer (i.e. | 106 // TODO(flackr): This should be refactored in the future to be clearer (i.e. |
107 // update layer position and ancestor inputs updates in the same walk). | 107 // update layer position and ancestor inputs updates in the same walk). |
108 paintLayer->updateLayerPosition(); | 108 paintLayer->updateLayerPosition(); |
109 } | 109 } |
110 | 110 |
111 if (paintLayer->isRootLayer() || object.hasOverflowClip()) | 111 if (paintLayer->isRootLayer() || object.hasOverflowClip()) |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 roundedIntPoint(context.treeBuilderContext->current.paintOffset); | 281 roundedIntPoint(context.treeBuilderContext->current.paintOffset); |
282 walk(*toFrameView(frameViewBase), context); | 282 walk(*toFrameView(frameViewBase), context); |
283 } | 283 } |
284 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281). | 284 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281). |
285 } | 285 } |
286 | 286 |
287 object.getMutableForPainting().clearPaintFlags(); | 287 object.getMutableForPainting().clearPaintFlags(); |
288 } | 288 } |
289 | 289 |
290 } // namespace blink | 290 } // namespace blink |
OLD | NEW |