Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(380)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTableBoxComponent.cpp

Issue 2013693002: [css-tables] Set table and cell widths dirty when section border changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add optional param and remove new layout test Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698