| 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/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.BorderEquals(table_part.StyleRef()) || |
| 21 !old_style.BorderColorEquals(table_part.StyleRef()) || | |
| 22 !old_style.RadiiEqual(table_part.StyleRef()) || | |
| 23 !old_style.BorderSizeEquals(table_part.StyleRef()) || | |
| 24 (diff.TextDecorationOrColorChanged() && | 21 (diff.TextDecorationOrColorChanged() && |
| 25 table_part.StyleRef().HasBorderColorReferencingCurrentColor())) | 22 table_part.StyleRef().HasBorderColorReferencingCurrentColor())) |
| 26 table.InvalidateCollapsedBorders(); | 23 table.InvalidateCollapsedBorders(); |
| 27 } | 24 } |
| 28 | 25 |
| 29 bool LayoutTableBoxComponent::DoCellsHaveDirtyWidth( | 26 bool LayoutTableBoxComponent::DoCellsHaveDirtyWidth( |
| 30 const LayoutObject& table_part, | 27 const LayoutObject& table_part, |
| 31 const LayoutTable& table, | 28 const LayoutTable& table, |
| 32 const StyleDifference& diff, | 29 const StyleDifference& diff, |
| 33 const ComputedStyle& old_style) { | 30 const ComputedStyle& old_style) { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 57 auto& box = static_cast<LayoutTableBoxComponent&>(layout_object_); | 54 auto& box = static_cast<LayoutTableBoxComponent&>(layout_object_); |
| 58 if (box.last_paint_result_ != kFullyPainted && | 55 if (box.last_paint_result_ != kFullyPainted && |
| 59 box.last_paint_rect_ != paint_rect) | 56 box.last_paint_rect_ != paint_rect) |
| 60 layout_object_.SetDisplayItemsUncached(); | 57 layout_object_.SetDisplayItemsUncached(); |
| 61 | 58 |
| 62 box.last_paint_result_ = paint_result; | 59 box.last_paint_result_ = paint_result; |
| 63 box.last_paint_rect_ = paint_rect; | 60 box.last_paint_rect_ = paint_rect; |
| 64 } | 61 } |
| 65 | 62 |
| 66 } // namespace blink | 63 } // namespace blink |
| OLD | NEW |