| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |