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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 LayoutRect(m_context.oldLocation, oldBorderBoxSize) || | 118 LayoutRect(m_context.oldLocation, oldBorderBoxSize) || |
119 m_box.visualRect() != | 119 m_box.visualRect() != |
120 LayoutRect(m_context.newLocation, newBorderBoxSize)) { | 120 LayoutRect(m_context.newLocation, newBorderBoxSize)) { |
121 return borderBoxChanged ? PaintInvalidationBorderBoxChange | 121 return borderBoxChanged ? PaintInvalidationBorderBoxChange |
122 : PaintInvalidationBoundsChange; | 122 : PaintInvalidationBoundsChange; |
123 } | 123 } |
124 | 124 |
125 DCHECK(borderBoxChanged); | 125 DCHECK(borderBoxChanged); |
126 | 126 |
127 if (style.hasVisualOverflowingEffect() || style.hasAppearance() || | 127 if (style.hasVisualOverflowingEffect() || style.hasAppearance() || |
128 style.hasFilterInducingProperty() || style.hasMask()) | 128 style.hasFilterInducingProperty() || style.resize() != RESIZE_NONE || |
| 129 style.hasMask()) |
129 return PaintInvalidationBorderBoxChange; | 130 return PaintInvalidationBorderBoxChange; |
130 | 131 |
131 if (style.hasBorderRadius()) | 132 if (style.hasBorderRadius()) |
132 return PaintInvalidationBorderBoxChange; | 133 return PaintInvalidationBorderBoxChange; |
133 | 134 |
134 if (oldBorderBoxSize.width() != newBorderBoxSize.width() && | 135 if (oldBorderBoxSize.width() != newBorderBoxSize.width() && |
135 m_box.mustInvalidateBackgroundOrBorderPaintOnWidthChange()) | 136 m_box.mustInvalidateBackgroundOrBorderPaintOnWidthChange()) |
136 return PaintInvalidationBorderBoxChange; | 137 return PaintInvalidationBorderBoxChange; |
137 if (oldBorderBoxSize.height() != newBorderBoxSize.height() && | 138 if (oldBorderBoxSize.height() != newBorderBoxSize.height() && |
138 m_box.mustInvalidateBackgroundOrBorderPaintOnHeightChange()) | 139 m_box.mustInvalidateBackgroundOrBorderPaintOnHeightChange()) |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 if (needsToSavePreviousContentBoxSizeOrLayoutOverflowRect()) { | 320 if (needsToSavePreviousContentBoxSizeOrLayoutOverflowRect()) { |
320 m_box.getMutableForPainting() | 321 m_box.getMutableForPainting() |
321 .savePreviousContentBoxSizeAndLayoutOverflowRect(); | 322 .savePreviousContentBoxSizeAndLayoutOverflowRect(); |
322 } else { | 323 } else { |
323 m_box.getMutableForPainting() | 324 m_box.getMutableForPainting() |
324 .clearPreviousContentBoxSizeAndLayoutOverflowRect(); | 325 .clearPreviousContentBoxSizeAndLayoutOverflowRect(); |
325 } | 326 } |
326 } | 327 } |
327 | 328 |
328 } // namespace blink | 329 } // namespace blink |
OLD | NEW |