| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/ViewPaintInvalidator.h" | 5 #include "core/paint/ViewPaintInvalidator.h" |
| 6 | 6 |
| 7 #include "core/layout/LayoutView.h" | 7 #include "core/layout/LayoutView.h" |
| 8 #include "core/paint/BoxPaintInvalidator.h" | 8 #include "core/paint/BoxPaintInvalidator.h" |
| 9 #include "platform/geometry/LayoutSize.h" | 9 #include "platform/geometry/LayoutSize.h" |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 LayoutSize old_size = background_box.PreviousSize(); | 36 LayoutSize old_size = background_box.PreviousSize(); |
| 37 LayoutSize new_size = background_box.Size(); | 37 LayoutSize new_size = background_box.Size(); |
| 38 const auto& background_layers = view_.StyleRef().BackgroundLayers(); | 38 const auto& background_layers = view_.StyleRef().BackgroundLayers(); |
| 39 if ((old_size.Width() != new_size.Width() && | 39 if ((old_size.Width() != new_size.Width() && |
| 40 LayoutBox::MustInvalidateFillLayersPaintOnWidthChange( | 40 LayoutBox::MustInvalidateFillLayersPaintOnWidthChange( |
| 41 background_layers)) || | 41 background_layers)) || |
| 42 (old_size.Height() != new_size.Height() && | 42 (old_size.Height() != new_size.Height() && |
| 43 LayoutBox::MustInvalidateFillLayersPaintOnHeightChange( | 43 LayoutBox::MustInvalidateFillLayersPaintOnHeightChange( |
| 44 background_layers))) { | 44 background_layers))) { |
| 45 view_.GetMutableForPainting().SetShouldDoFullPaintInvalidation( | 45 view_.GetMutableForPainting().SetShouldDoFullPaintInvalidation( |
| 46 kPaintInvalidationViewBackground); | 46 PaintInvalidationReason::kBackground); |
| 47 } | 47 } |
| 48 } | 48 } |
| 49 | 49 |
| 50 } // namespace blink | 50 } // namespace blink |
| OLD | NEW |