| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 bool PrePaintTreeWalk::walk(FrameView& frameView, | 47 bool PrePaintTreeWalk::walk(FrameView& frameView, |
| 48 const PrePaintTreeWalkContext& parentContext) { | 48 const PrePaintTreeWalkContext& parentContext) { |
| 49 if (frameView.shouldThrottleRendering()) { | 49 if (frameView.shouldThrottleRendering()) { |
| 50 // The walk was interrupted by throttled rendering so this subtree was not | 50 // The walk was interrupted by throttled rendering so this subtree was not |
| 51 // fully updated. | 51 // fully updated. |
| 52 return false; | 52 return false; |
| 53 } | 53 } |
| 54 | 54 |
| 55 PrePaintTreeWalkContext context(parentContext); | 55 PrePaintTreeWalkContext context(parentContext); |
| 56 // ancestorOverflowLayer does not cross frame boundaries. |
| 57 context.ancestorOverflowPaintLayer = nullptr; |
| 56 m_propertyTreeBuilder.updateProperties(frameView, context.treeBuilderContext); | 58 m_propertyTreeBuilder.updateProperties(frameView, context.treeBuilderContext); |
| 57 m_paintInvalidator.invalidatePaintIfNeeded(frameView, | 59 m_paintInvalidator.invalidatePaintIfNeeded(frameView, |
| 58 context.paintInvalidatorContext); | 60 context.paintInvalidatorContext); |
| 59 | 61 |
| 60 LayoutView* view = frameView.layoutView(); | 62 LayoutView* view = frameView.layoutView(); |
| 61 bool descendantsFullyUpdated = view ? walk(*view, context) : true; | 63 bool descendantsFullyUpdated = view ? walk(*view, context) : true; |
| 62 if (descendantsFullyUpdated) { | 64 if (descendantsFullyUpdated) { |
| 63 #if DCHECK_IS_ON() | 65 #if DCHECK_IS_ON() |
| 64 frameView.layoutView()->assertSubtreeClearedPaintInvalidationFlags(); | 66 frameView.layoutView()->assertSubtreeClearedPaintInvalidationFlags(); |
| 65 #endif | 67 #endif |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 | 164 |
| 163 if (descendantsFullyUpdated) { | 165 if (descendantsFullyUpdated) { |
| 164 // If descendants were not updated, do not clear flags. During the next | 166 // If descendants were not updated, do not clear flags. During the next |
| 165 // PrePaintTreeWalk, these flags will be used again. | 167 // PrePaintTreeWalk, these flags will be used again. |
| 166 object.getMutableForPainting().clearPaintFlags(); | 168 object.getMutableForPainting().clearPaintFlags(); |
| 167 } | 169 } |
| 168 return descendantsFullyUpdated; | 170 return descendantsFullyUpdated; |
| 169 } | 171 } |
| 170 | 172 |
| 171 } // namespace blink | 173 } // namespace blink |
| OLD | NEW |