Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp

Issue 2575653002: [SPInvalidation] Invalidate all paint and properties for printing (Closed)
Patch Set: Add a passing test in TestExpectations Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintInvalidator.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
46 46
47 bool PrePaintTreeWalk::walk(FrameView& frameView, 47 bool PrePaintTreeWalk::walk(FrameView& frameView,
48 const PrePaintTreeWalkContext& context) { 48 const PrePaintTreeWalkContext& context) {
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 localContext(context); 55 PrePaintTreeWalkContext localContext(context);
56
57 if (frameView.shouldInvalidateAllPaintAndPaintProperties()) {
58 localContext.treeBuilderContext.forceSubtreeUpdate = true;
59 localContext.paintInvalidatorContext.forcedSubtreeInvalidationFlags |=
60 PaintInvalidatorContext::ForcedWholeTreeFullInvalidation;
61 frameView.clearShouldInvalidateAllPaintAndPaintProperties();
62 }
63
56 m_propertyTreeBuilder.updateProperties(frameView, 64 m_propertyTreeBuilder.updateProperties(frameView,
57 localContext.treeBuilderContext); 65 localContext.treeBuilderContext);
58 m_paintInvalidator.invalidatePaintIfNeeded( 66 m_paintInvalidator.invalidatePaintIfNeeded(
59 frameView, localContext.paintInvalidatorContext); 67 frameView, localContext.paintInvalidatorContext);
60 68
61 LayoutView* view = frameView.layoutView(); 69 LayoutView* view = frameView.layoutView();
62 bool descendantsFullyUpdated = view ? walk(*view, localContext) : true; 70 bool descendantsFullyUpdated = view ? walk(*view, localContext) : true;
63 if (descendantsFullyUpdated) { 71 if (descendantsFullyUpdated) {
64 #if DCHECK_IS_ON() 72 #if DCHECK_IS_ON()
65 frameView.layoutView()->assertSubtreeClearedPaintInvalidationFlags(); 73 frameView.layoutView()->assertSubtreeClearedPaintInvalidationFlags();
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 196
189 if (descendantsFullyUpdated) { 197 if (descendantsFullyUpdated) {
190 // If descendants were not updated, do not clear flags. During the next 198 // If descendants were not updated, do not clear flags. During the next
191 // PrePaintTreeWalk, these flags will be used again. 199 // PrePaintTreeWalk, these flags will be used again.
192 object.getMutableForPainting().clearPaintFlags(); 200 object.getMutableForPainting().clearPaintFlags();
193 } 201 }
194 return descendantsFullyUpdated; 202 return descendantsFullyUpdated;
195 } 203 }
196 204
197 } // namespace blink 205 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintInvalidator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698