| 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/paint/ObjectPaintInvalidator.h" | 9 #include "core/paint/ObjectPaintInvalidator.h" |
| 10 #include "core/paint/PaintInvalidator.h" | 10 #include "core/paint/PaintInvalidator.h" |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 if (m_context.oldVisualRect != | 175 if (m_context.oldVisualRect != |
| 176 LayoutRect(m_context.oldLocation, oldBorderBoxSize) || | 176 LayoutRect(m_context.oldLocation, oldBorderBoxSize) || |
| 177 m_context.newVisualRect != | 177 m_context.newVisualRect != |
| 178 LayoutRect(m_context.newLocation, newBorderBoxSize)) { | 178 LayoutRect(m_context.newLocation, newBorderBoxSize)) { |
| 179 return borderBoxChanged ? PaintInvalidationBorderBoxChange | 179 return borderBoxChanged ? PaintInvalidationBorderBoxChange |
| 180 : PaintInvalidationBoundsChange; | 180 : PaintInvalidationBoundsChange; |
| 181 } | 181 } |
| 182 | 182 |
| 183 DCHECK(borderBoxChanged); | 183 DCHECK(borderBoxChanged); |
| 184 | 184 |
| 185 if (m_box.hasNonCompositedScrollbars()) | |
| 186 return PaintInvalidationBorderBoxChange; | |
| 187 | |
| 188 if (style.hasVisualOverflowingEffect() || style.hasAppearance() || | 185 if (style.hasVisualOverflowingEffect() || style.hasAppearance() || |
| 189 style.hasFilterInducingProperty() || style.resize() != RESIZE_NONE || | 186 style.hasFilterInducingProperty() || style.resize() != RESIZE_NONE || |
| 190 style.hasMask()) | 187 style.hasMask()) |
| 191 return PaintInvalidationBorderBoxChange; | 188 return PaintInvalidationBorderBoxChange; |
| 192 | 189 |
| 193 if (style.hasBorderRadius()) | 190 if (style.hasBorderRadius()) |
| 194 return PaintInvalidationBorderBoxChange; | 191 return PaintInvalidationBorderBoxChange; |
| 195 | 192 |
| 196 if (oldBorderBoxSize.width() != newBorderBoxSize.width() && | 193 if (oldBorderBoxSize.width() != newBorderBoxSize.width() && |
| 197 m_box.mustInvalidateBackgroundOrBorderPaintOnWidthChange()) | 194 m_box.mustInvalidateBackgroundOrBorderPaintOnWidthChange()) |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 | 301 |
| 305 LayoutRect BoxPaintInvalidator::previousLayoutOverflowRect() { | 302 LayoutRect BoxPaintInvalidator::previousLayoutOverflowRect() { |
| 306 DCHECK(m_box.hasPreviousBoxGeometries() == | 303 DCHECK(m_box.hasPreviousBoxGeometries() == |
| 307 previousBoxGeometriesMap().contains(&m_box)); | 304 previousBoxGeometriesMap().contains(&m_box)); |
| 308 return m_box.hasPreviousBoxGeometries() | 305 return m_box.hasPreviousBoxGeometries() |
| 309 ? previousBoxGeometriesMap().get(&m_box).layoutOverflowRect | 306 ? previousBoxGeometriesMap().get(&m_box).layoutOverflowRect |
| 310 : LayoutRect(); | 307 : LayoutRect(); |
| 311 } | 308 } |
| 312 | 309 |
| 313 } // namespace blink | 310 } // namespace blink |
| OLD | NEW |