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

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

Issue 2869043002: Store border-*-color on SurroundData in ComputedStyle not BorderColorAndStyle (Closed)
Patch Set: Always return VisitedDependantColor(CSSPropertyID) Created 3 years, 7 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/layout/LayoutTable.h" 7 #include "core/layout/LayoutTable.h"
8 #include "core/paint/ObjectPaintInvalidator.h" 8 #include "core/paint/ObjectPaintInvalidator.h"
9 #include "core/style/ComputedStyle.h" 9 #include "core/style/ComputedStyle.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 void LayoutTableBoxComponent::InvalidateCollapsedBordersOnStyleChange( 13 void LayoutTableBoxComponent::InvalidateCollapsedBordersOnStyleChange(
14 const LayoutObject& table_part, 14 const LayoutObject& table_part,
15 LayoutTable& table, 15 LayoutTable& table,
16 const StyleDifference& diff, 16 const StyleDifference& diff,
17 const ComputedStyle& old_style) { 17 const ComputedStyle& old_style) {
18 if (!table.ShouldCollapseBorders()) 18 if (!table.ShouldCollapseBorders())
19 return; 19 return;
20 if (old_style.Border() != table_part.StyleRef().Border() || 20 if (old_style.Border() != table_part.StyleRef().Border() ||
21 (old_style.VisitedDependentColor(CSSPropertyBorderLeftColor) !=
22 table_part.StyleRef().VisitedDependentColor(
23 CSSPropertyBorderLeftColor) ||
24 old_style.VisitedDependentColor(CSSPropertyBorderRightColor) !=
25 table_part.StyleRef().VisitedDependentColor(
26 CSSPropertyBorderRightColor) ||
27 old_style.VisitedDependentColor(CSSPropertyBorderTopColor) !=
28 table_part.StyleRef().VisitedDependentColor(
29 CSSPropertyBorderTopColor) ||
30 old_style.VisitedDependentColor(CSSPropertyBorderBottomColor) !=
31 table_part.StyleRef().VisitedDependentColor(
32 CSSPropertyBorderBottomColor)) ||
33 (old_style.BorderLeftColorIsCurrentColor() !=
34 table_part.StyleRef().BorderLeftColorIsCurrentColor() ||
35 old_style.BorderRightColorIsCurrentColor() !=
36 table_part.StyleRef().BorderRightColorIsCurrentColor() ||
37 old_style.BorderTopColorIsCurrentColor() !=
38 table_part.StyleRef().BorderTopColorIsCurrentColor() ||
39 old_style.BorderBottomColorIsCurrentColor() !=
40 table_part.StyleRef().BorderBottomColorIsCurrentColor()) ||
21 !old_style.RadiiEqual(table_part.StyleRef()) || 41 !old_style.RadiiEqual(table_part.StyleRef()) ||
22 !old_style.BorderSizeEquals(table_part.StyleRef()) || 42 !old_style.BorderSizeEquals(table_part.StyleRef()) ||
23 (diff.TextDecorationOrColorChanged() && 43 (diff.TextDecorationOrColorChanged() &&
24 table_part.StyleRef().HasBorderColorReferencingCurrentColor())) 44 table_part.StyleRef().HasBorderColorReferencingCurrentColor()))
25 table.InvalidateCollapsedBorders(); 45 table.InvalidateCollapsedBorders();
26 } 46 }
27 47
28 bool LayoutTableBoxComponent::DoCellsHaveDirtyWidth( 48 bool LayoutTableBoxComponent::DoCellsHaveDirtyWidth(
29 const LayoutObject& table_part, 49 const LayoutObject& table_part,
30 const LayoutTable& table, 50 const LayoutTable& table,
(...skipping 25 matching lines...) Expand all
56 auto& box = static_cast<LayoutTableBoxComponent&>(layout_object_); 76 auto& box = static_cast<LayoutTableBoxComponent&>(layout_object_);
57 if (box.last_paint_result_ != kFullyPainted && 77 if (box.last_paint_result_ != kFullyPainted &&
58 box.last_paint_rect_ != paint_rect) 78 box.last_paint_rect_ != paint_rect)
59 layout_object_.SetDisplayItemsUncached(); 79 layout_object_.SetDisplayItemsUncached();
60 80
61 box.last_paint_result_ = paint_result; 81 box.last_paint_result_ = paint_result;
62 box.last_paint_rect_ = paint_rect; 82 box.last_paint_rect_ = paint_rect;
63 } 83 }
64 84
65 } // namespace blink 85 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698