OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) | 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) |
3 * (C) 1997 Torben Weis (weis@kde.org) | 3 * (C) 1997 Torben Weis (weis@kde.org) |
4 * (C) 1998 Waldo Bastian (bastian@kde.org) | 4 * (C) 1998 Waldo Bastian (bastian@kde.org) |
5 * (C) 1999 Lars Knoll (knoll@kde.org) | 5 * (C) 1999 Lars Knoll (knoll@kde.org) |
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 6 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. |
8 * All rights reserved. | 8 * All rights reserved. |
9 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 9 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
10 * | 10 * |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 // According to the CSS2 spec, you only use fixed table layout if an | 93 // According to the CSS2 spec, you only use fixed table layout if an |
94 // explicit width is specified on the table. Auto width implies auto table | 94 // explicit width is specified on the table. Auto width implies auto table |
95 // layout. | 95 // layout. |
96 if (Style()->IsFixedTableLayout()) | 96 if (Style()->IsFixedTableLayout()) |
97 table_layout_ = WTF::MakeUnique<TableLayoutAlgorithmFixed>(this); | 97 table_layout_ = WTF::MakeUnique<TableLayoutAlgorithmFixed>(this); |
98 else | 98 else |
99 table_layout_ = WTF::MakeUnique<TableLayoutAlgorithmAuto>(this); | 99 table_layout_ = WTF::MakeUnique<TableLayoutAlgorithmAuto>(this); |
100 } | 100 } |
101 | 101 |
102 // If border was changed, invalidate collapsed borders cache. | 102 if (!old_style) |
103 if (!NeedsLayout() && old_style && old_style->Border() != Style()->Border()) | 103 return; |
104 InvalidateCollapsedBorders(); | 104 |
| 105 LayoutTableBoxComponent::InvalidateCollapsedBordersOnStyleChange( |
| 106 *this, *this, diff, *old_style); |
| 107 |
105 if (LayoutTableBoxComponent::DoCellsHaveDirtyWidth(*this, *this, diff, | 108 if (LayoutTableBoxComponent::DoCellsHaveDirtyWidth(*this, *this, diff, |
106 *old_style)) | 109 *old_style)) |
107 MarkAllCellsWidthsDirtyAndOrNeedsLayout(kMarkDirtyAndNeedsLayout); | 110 MarkAllCellsWidthsDirtyAndOrNeedsLayout(kMarkDirtyAndNeedsLayout); |
108 } | 111 } |
109 | 112 |
110 static inline void ResetSectionPointerIfNotBefore(LayoutTableSection*& ptr, | 113 static inline void ResetSectionPointerIfNotBefore(LayoutTableSection*& ptr, |
111 LayoutObject* before) { | 114 LayoutObject* before) { |
112 if (!before || !ptr) | 115 if (!before || !ptr) |
113 return; | 116 return; |
114 LayoutObject* o = before->PreviousSibling(); | 117 LayoutObject* o = before->PreviousSibling(); |
(...skipping 1622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1737 } | 1740 } |
1738 | 1741 |
1739 LayoutUnit LayoutTable::PaddingRight() const { | 1742 LayoutUnit LayoutTable::PaddingRight() const { |
1740 if (CollapseBorders()) | 1743 if (CollapseBorders()) |
1741 return LayoutUnit(); | 1744 return LayoutUnit(); |
1742 | 1745 |
1743 return LayoutBlock::PaddingRight(); | 1746 return LayoutBlock::PaddingRight(); |
1744 } | 1747 } |
1745 | 1748 |
1746 } // namespace blink | 1749 } // namespace blink |
OLD | NEW |