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

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

Issue 2521613003: Add flag for tracking descendant paint property updates (Closed)
Patch Set: Address Xianzhu's comments 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
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 if (object.isLayoutMultiColumnSpannerPlaceholder()) { 111 if (object.isLayoutMultiColumnSpannerPlaceholder()) {
112 // Walk multi-column spanner as if it replaces the placeholder. 112 // Walk multi-column spanner as if it replaces the placeholder.
113 // Set the flag so that the tree builder can specially handle out-of-flow 113 // Set the flag so that the tree builder can specially handle out-of-flow
114 // positioned descendants if their containers are between the multi-column 114 // positioned descendants if their containers are between the multi-column
115 // container and the spanner. See PaintPropertyTreeBuilder for details. 115 // container and the spanner. See PaintPropertyTreeBuilder for details.
116 localContext.treeBuilderContext.isUnderMultiColumnSpanner = true; 116 localContext.treeBuilderContext.isUnderMultiColumnSpanner = true;
117 walk(*toLayoutMultiColumnSpannerPlaceholder(object) 117 walk(*toLayoutMultiColumnSpannerPlaceholder(object)
118 .layoutObjectInFlowThread(), 118 .layoutObjectInFlowThread(),
119 localContext); 119 localContext);
120 object.getMutableForPainting().clearPaintInvalidationFlags(); 120 object.getMutableForPainting().clearPaintInvalidationFlags();
121 object.getMutableForPainting().clearNeedsPaintPropertyUpdate();
122 object.getMutableForPainting().clearDescendantNeedsPaintPropertyUpdate();
121 return; 123 return;
122 } 124 }
123 125
124 m_propertyTreeBuilder.updatePropertiesForSelf( 126 m_propertyTreeBuilder.updatePropertiesForSelf(
125 object, localContext.treeBuilderContext); 127 object, localContext.treeBuilderContext);
126 m_paintInvalidator.invalidatePaintIfNeeded( 128 m_paintInvalidator.invalidatePaintIfNeeded(
127 object, localContext.paintInvalidatorContext); 129 object, localContext.paintInvalidatorContext);
128 m_propertyTreeBuilder.updatePropertiesForChildren( 130 m_propertyTreeBuilder.updatePropertiesForChildren(
129 object, localContext.treeBuilderContext); 131 object, localContext.treeBuilderContext);
130 132
(...skipping 14 matching lines...) Expand all
145 widget->frameRect().location(); 147 widget->frameRect().location();
146 localContext.treeBuilderContext.current.paintOffset = 148 localContext.treeBuilderContext.current.paintOffset =
147 roundedIntPoint(localContext.treeBuilderContext.current.paintOffset); 149 roundedIntPoint(localContext.treeBuilderContext.current.paintOffset);
148 walk(*toFrameView(widget), localContext); 150 walk(*toFrameView(widget), localContext);
149 } 151 }
150 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281). 152 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281).
151 } 153 }
152 154
153 object.getMutableForPainting().clearPaintInvalidationFlags(); 155 object.getMutableForPainting().clearPaintInvalidationFlags();
154 object.getMutableForPainting().clearNeedsPaintPropertyUpdate(); 156 object.getMutableForPainting().clearNeedsPaintPropertyUpdate();
157 object.getMutableForPainting().clearDescendantNeedsPaintPropertyUpdate();
155 } 158 }
156 159
157 } // namespace blink 160 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698