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/layout/LayoutTable.h" | |
7 #include "core/style/ComputedStyle.h" | 8 #include "core/style/ComputedStyle.h" |
8 | 9 |
9 namespace blink { | 10 namespace blink { |
10 | 11 |
11 void LayoutTableBoxComponent::styleDidChange(StyleDifference diff, const Compute dStyle* oldStyle) | 12 void LayoutTableBoxComponent::styleDidChange(StyleDifference diff, const Compute dStyle* oldStyle) |
12 { | 13 { |
13 LayoutBox::styleDidChange(diff, oldStyle); | 14 LayoutBox::styleDidChange(diff, oldStyle); |
14 | 15 |
15 if (parent() && oldStyle) { | 16 if (parent() && oldStyle) { |
16 if (resolveColor(*oldStyle, CSSPropertyBackgroundColor) != resolveColor( CSSPropertyBackgroundColor) | 17 if (resolveColor(*oldStyle, CSSPropertyBackgroundColor) != resolveColor( CSSPropertyBackgroundColor) |
17 || oldStyle->backgroundLayers() != styleRef().backgroundLayers()) | 18 || oldStyle->backgroundLayers() != styleRef().backgroundLayers()) |
18 m_backgroundChangedSinceLastPaintInvalidation = true; | 19 m_backgroundChangedSinceLastPaintInvalidation = true; |
19 } | 20 } |
20 } | 21 } |
21 | 22 |
22 void LayoutTableBoxComponent::imageChanged(WrappedImagePtr, const IntRect*) | 23 void LayoutTableBoxComponent::imageChanged(WrappedImagePtr, const IntRect*) |
23 { | 24 { |
24 setShouldDoFullPaintInvalidation(); | 25 setShouldDoFullPaintInvalidation(); |
25 m_backgroundChangedSinceLastPaintInvalidation = true; | 26 m_backgroundChangedSinceLastPaintInvalidation = true; |
26 } | 27 } |
27 | 28 |
29 /*static*/ bool LayoutTableBoxComponent::doCellsHaveDirtyWidth(const LayoutObjec t& tablePart, const LayoutTable& table, const StyleDifference& diff, const Compu tedStyle& oldStyle) | |
eae
2016/07/18 16:21:53
Uncomment or remove static modifier.
dgrogan
2016/07/18 17:24:27
I removed it... it's only allowed to be specified
| |
30 { | |
31 // ComputedStyle::diffNeedsFullLayoutAndPaintInvalidation sets needsFullLayo ut when border sizes | |
32 // change: checking diff.needsFullLayout() is an optimization, not required for correctness. | |
33 // TODO(dgrogan): Remove tablePart.needsLayout()? Perhaps it was an old opti mization but now it | |
34 // seems that diff.needsFullLayout() implies tablePart.needsLayout(). | |
35 return diff.needsFullLayout() && tablePart.needsLayout() && table.collapseBo rders() && !oldStyle.border().sizeEquals(tablePart.style()->border()); | |
36 } | |
37 | |
28 } // namespace blink | 38 } // namespace blink |
OLD | NEW |