Chromium Code Reviews| 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/layout/LayoutTableBoxComponent.h" | 5 #include "core/layout/LayoutTableBoxComponent.h" |
| 6 | 6 |
| 7 #include "core/style/ComputedStyle.h" | 7 #include "core/style/ComputedStyle.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| 11 void LayoutTableBoxComponent::styleDidChange(StyleDifference diff, const Compute dStyle* oldStyle) | 11 void LayoutTableBoxComponent::styleDidChange(StyleDifference diff, const Compute dStyle* oldStyle) |
| 12 { | 12 { |
| 13 LayoutBox::styleDidChange(diff, oldStyle); | 13 LayoutBox::styleDidChange(diff, oldStyle); |
| 14 | 14 |
| 15 if (parent() && oldStyle) { | 15 if (parent() && oldStyle) { |
| 16 if (resolveColor(*oldStyle, CSSPropertyBackgroundColor) != resolveColor( CSSPropertyBackgroundColor) | 16 if (resolveColor(*oldStyle, CSSPropertyBackgroundColor) != resolveColor( CSSPropertyBackgroundColor) |
| 17 || oldStyle->backgroundLayers() != styleRef().backgroundLayers()) | 17 || oldStyle->backgroundLayers() != styleRef().backgroundLayers()) |
| 18 m_backgroundChangedSinceLastPaintInvalidation = true; | 18 m_backgroundChangedSinceLastPaintInvalidation = true; |
| 19 } | 19 } |
| 20 } | 20 } |
| 21 | 21 |
| 22 void LayoutTableBoxComponent::imageChanged(WrappedImagePtr, const IntRect*) | 22 void LayoutTableBoxComponent::imageChanged(WrappedImagePtr, const IntRect*) |
| 23 { | 23 { |
| 24 setShouldDoFullPaintInvalidation(); | 24 setShouldDoFullPaintInvalidation(); |
| 25 m_backgroundChangedSinceLastPaintInvalidation = true; | 25 m_backgroundChangedSinceLastPaintInvalidation = true; |
| 26 } | 26 } |
| 27 | 27 |
| 28 bool LayoutTableBoxComponent::borderWidthChanged(const ComputedStyle* oldStyle, const ComputedStyle* newStyle) | |
| 29 { | |
| 30 return oldStyle->borderLeftWidth() != newStyle->borderLeftWidth() | |
|
eae
2016/07/01 22:20:25
"return oldStyle->border() != newStyle->border()"
dgrogan
2016/07/06 23:10:29
I like this option... keep the logic about borders
| |
| 31 || oldStyle->borderTopWidth() != newStyle->borderTopWidth() | |
| 32 || oldStyle->borderRightWidth() != newStyle->borderRightWidth() | |
| 33 || oldStyle->borderBottomWidth() != newStyle->borderBottomWidth(); | |
| 34 } | |
| 35 | |
| 28 } // namespace blink | 36 } // namespace blink |
| OLD | NEW |