| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 m_box.mustInvalidateBackgroundOrBorderPaintOnWidthChange()) | 155 m_box.mustInvalidateBackgroundOrBorderPaintOnWidthChange()) |
| 156 return PaintInvalidationBorderBoxChange; | 156 return PaintInvalidationBorderBoxChange; |
| 157 if (oldBorderBoxSize.height() != newBorderBoxSize.height() && | 157 if (oldBorderBoxSize.height() != newBorderBoxSize.height() && |
| 158 m_box.mustInvalidateBackgroundOrBorderPaintOnHeightChange()) | 158 m_box.mustInvalidateBackgroundOrBorderPaintOnHeightChange()) |
| 159 return PaintInvalidationBorderBoxChange; | 159 return PaintInvalidationBorderBoxChange; |
| 160 | 160 |
| 161 // Needs to repaint frame boundaries. | 161 // Needs to repaint frame boundaries. |
| 162 if (m_box.isFrameSet()) | 162 if (m_box.isFrameSet()) |
| 163 return PaintInvalidationBorderBoxChange; | 163 return PaintInvalidationBorderBoxChange; |
| 164 | 164 |
| 165 // Needs to repaint column rules. |
| 166 if (m_box.isLayoutMultiColumnSet()) |
| 167 return PaintInvalidationBorderBoxChange; |
| 168 |
| 165 return PaintInvalidationIncremental; | 169 return PaintInvalidationIncremental; |
| 166 } | 170 } |
| 167 | 171 |
| 168 bool BoxPaintInvalidator::backgroundGeometryDependsOnLayoutOverflowRect() { | 172 bool BoxPaintInvalidator::backgroundGeometryDependsOnLayoutOverflowRect() { |
| 169 return !m_box.isDocumentElement() && !m_box.backgroundStolenForBeingBody() && | 173 return !m_box.isDocumentElement() && !m_box.backgroundStolenForBeingBody() && |
| 170 m_box.styleRef() | 174 m_box.styleRef() |
| 171 .backgroundLayers() | 175 .backgroundLayers() |
| 172 .thisOrNextLayersHaveLocalAttachment(); | 176 .thisOrNextLayersHaveLocalAttachment(); |
| 173 } | 177 } |
| 174 | 178 |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 | 379 |
| 376 LayoutRect BoxPaintInvalidator::previousLayoutOverflowRect() { | 380 LayoutRect BoxPaintInvalidator::previousLayoutOverflowRect() { |
| 377 DCHECK(m_box.hasPreviousBoxGeometries() == | 381 DCHECK(m_box.hasPreviousBoxGeometries() == |
| 378 previousBoxGeometriesMap().contains(&m_box)); | 382 previousBoxGeometriesMap().contains(&m_box)); |
| 379 return m_box.hasPreviousBoxGeometries() | 383 return m_box.hasPreviousBoxGeometries() |
| 380 ? previousBoxGeometriesMap().get(&m_box).layoutOverflowRect | 384 ? previousBoxGeometriesMap().get(&m_box).layoutOverflowRect |
| 381 : LayoutRect(); | 385 : LayoutRect(); |
| 382 } | 386 } |
| 383 | 387 |
| 384 } // namespace blink | 388 } // namespace blink |
| OLD | NEW |