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

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

Issue 2823963002: Fix background-attachment:local <li> crash during PrePaintTreeWalk (Closed)
Patch Set: - Created 3 years, 8 months 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/LayoutTests/paint/invalidation/local-attachment-background-li-crash.html ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/BoxPaintInvalidator.h" 5 #include "core/paint/BoxPaintInvalidator.h"
6 6
7 #include "core/frame/Settings.h" 7 #include "core/frame/Settings.h"
8 #include "core/layout/LayoutView.h" 8 #include "core/layout/LayoutView.h"
9 #include "core/layout/compositing/CompositedLayerMapping.h" 9 #include "core/layout/compositing/CompositedLayerMapping.h"
10 #include "core/paint/ObjectPaintInvalidator.h" 10 #include "core/paint/ObjectPaintInvalidator.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 should_fully_invalidate_on_scrolling_contents_layer = true; 210 should_fully_invalidate_on_scrolling_contents_layer = true;
211 } else { 211 } else {
212 // Check change of layout overflow for full or incremental invalidation. 212 // Check change of layout overflow for full or incremental invalidation.
213 if (new_layout_overflow == old_layout_overflow) 213 if (new_layout_overflow == old_layout_overflow)
214 return; 214 return;
215 bool should_fully_invalidate = 215 bool should_fully_invalidate =
216 ShouldFullyInvalidateBackgroundOnLayoutOverflowChange( 216 ShouldFullyInvalidateBackgroundOnLayoutOverflowChange(
217 old_layout_overflow, new_layout_overflow); 217 old_layout_overflow, new_layout_overflow);
218 if (!paints_onto_scrolling_contents_layer) { 218 if (!paints_onto_scrolling_contents_layer) {
219 if (should_fully_invalidate) { 219 if (should_fully_invalidate) {
220 box_.GetMutableForPainting().SetShouldDoFullPaintInvalidation( 220 box_.GetMutableForPainting()
221 kPaintInvalidationLayoutOverflowBoxChange); 221 .SetShouldDoFullPaintInvalidationWithoutGeometryChange(
222 kPaintInvalidationLayoutOverflowBoxChange);
222 } 223 }
223 return; 224 return;
224 } 225 }
225 should_fully_invalidate_on_scrolling_contents_layer = 226 should_fully_invalidate_on_scrolling_contents_layer =
226 should_fully_invalidate; 227 should_fully_invalidate;
227 } 228 }
228 229
229 if (should_fully_invalidate_on_scrolling_contents_layer) { 230 if (should_fully_invalidate_on_scrolling_contents_layer) {
230 ObjectPaintInvalidatorWithContext(box_, context_) 231 ObjectPaintInvalidatorWithContext(box_, context_)
231 .FullyInvalidatePaint( 232 .FullyInvalidatePaint(
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 if (NeedsToSavePreviousContentBoxSizeOrLayoutOverflowRect()) { 320 if (NeedsToSavePreviousContentBoxSizeOrLayoutOverflowRect()) {
320 box_.GetMutableForPainting() 321 box_.GetMutableForPainting()
321 .SavePreviousContentBoxSizeAndLayoutOverflowRect(); 322 .SavePreviousContentBoxSizeAndLayoutOverflowRect();
322 } else { 323 } else {
323 box_.GetMutableForPainting() 324 box_.GetMutableForPainting()
324 .ClearPreviousContentBoxSizeAndLayoutOverflowRect(); 325 .ClearPreviousContentBoxSizeAndLayoutOverflowRect();
325 } 326 }
326 } 327 }
327 328
328 } // namespace blink 329 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/local-attachment-background-li-crash.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698