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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 } | 212 } |
213 | 213 |
214 void PrePaintTreeWalk::walk(const LayoutObject& object, | 214 void PrePaintTreeWalk::walk(const LayoutObject& object, |
215 const PrePaintTreeWalkContext& parentContext) { | 215 const PrePaintTreeWalkContext& parentContext) { |
216 PrePaintTreeWalkContext context(parentContext); | 216 PrePaintTreeWalkContext context(parentContext); |
217 | 217 |
218 // This must happen before updateContextForBoxPosition, because the | 218 // This must happen before updateContextForBoxPosition, because the |
219 // latter reads some of the state computed uere. | 219 // latter reads some of the state computed uere. |
220 updateAuxiliaryObjectProperties(object, context); | 220 updateAuxiliaryObjectProperties(object, context); |
221 | 221 |
222 // Ensure the current context takes into account the box's position. This can | |
223 // force a subtree update due to paint offset changes and must precede any | |
224 // early out from the treewalk. | |
225 m_propertyTreeBuilder.updateContextForBoxPosition(object, | |
226 context.treeBuilderContext); | |
227 | |
228 // Early out from the treewalk if possible. | 222 // Early out from the treewalk if possible. |
229 if (!object.needsPaintPropertyUpdate() && | 223 if (!object.needsPaintPropertyUpdate() && |
230 !object.descendantNeedsPaintPropertyUpdate() && | 224 !object.descendantNeedsPaintPropertyUpdate() && |
231 !context.treeBuilderContext.forceSubtreeUpdate && | 225 !context.treeBuilderContext.forceSubtreeUpdate && |
232 !context.paintInvalidatorContext.forcedSubtreeInvalidationFlags && | 226 !context.paintInvalidatorContext.forcedSubtreeInvalidationFlags && |
233 !object | 227 !object |
234 .shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState())
{ | 228 .shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState())
{ |
235 return; | 229 return; |
236 } | 230 } |
237 | 231 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 roundedIntPoint(context.treeBuilderContext.current.paintOffset); | 268 roundedIntPoint(context.treeBuilderContext.current.paintOffset); |
275 walk(*toFrameView(widget), context); | 269 walk(*toFrameView(widget), context); |
276 } | 270 } |
277 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281). | 271 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281). |
278 } | 272 } |
279 | 273 |
280 object.getMutableForPainting().clearPaintFlags(); | 274 object.getMutableForPainting().clearPaintFlags(); |
281 } | 275 } |
282 | 276 |
283 } // namespace blink | 277 } // namespace blink |
OLD | NEW |