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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
74 LayoutTable::~LayoutTable() {} | 74 LayoutTable::~LayoutTable() {} |
75 | 75 |
76 void LayoutTable::StyleDidChange(StyleDifference diff, | 76 void LayoutTable::StyleDidChange(StyleDifference diff, |
77 const ComputedStyle* old_style) { | 77 const ComputedStyle* old_style) { |
78 LayoutBlock::StyleDidChange(diff, old_style); | 78 LayoutBlock::StyleDidChange(diff, old_style); |
79 | 79 |
80 bool old_fixed_table_layout = | 80 bool old_fixed_table_layout = |
81 old_style ? old_style->IsFixedTableLayout() : false; | 81 old_style ? old_style->IsFixedTableLayout() : false; |
82 | 82 |
83 // In the collapsed border model, there is no cell spacing. | 83 // In the collapsed border model, there is no cell spacing. |
84 h_spacing_ = ShouldCollapseBorders() ? 0 : Style()->HorizontalBorderSpacing(); | 84 h_spacing_ = ShouldCollapseBorders() ? 0 : Style()->HorizontalBorderSpacing(); |
mstensho (USE GERRIT)
2017/05/04 13:37:52
Furthermore, why are we updating h_spacing_ and v_
rune
2017/05/04 20:32:03
That sounds like a good idea, assuming LayoutTable
| |
85 v_spacing_ = ShouldCollapseBorders() ? 0 : Style()->VerticalBorderSpacing(); | 85 v_spacing_ = ShouldCollapseBorders() ? 0 : Style()->VerticalBorderSpacing(); |
86 effective_column_positions_[0] = h_spacing_; | |
87 | 86 |
88 if (!table_layout_ || | 87 if (!table_layout_ || |
89 Style()->IsFixedTableLayout() != old_fixed_table_layout) { | 88 Style()->IsFixedTableLayout() != old_fixed_table_layout) { |
90 if (table_layout_) | 89 if (table_layout_) |
91 table_layout_->WillChangeTableLayout(); | 90 table_layout_->WillChangeTableLayout(); |
92 | 91 |
93 // According to the CSS2 spec, you only use fixed table layout if an | 92 // 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 | 93 // explicit width is specified on the table. Auto width implies auto table |
95 // layout. | 94 // layout. |
96 if (Style()->IsFixedTableLayout()) | 95 if (Style()->IsFixedTableLayout()) |
(...skipping 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1761 } | 1760 } |
1762 | 1761 |
1763 LayoutUnit LayoutTable::PaddingRight() const { | 1762 LayoutUnit LayoutTable::PaddingRight() const { |
1764 if (ShouldCollapseBorders()) | 1763 if (ShouldCollapseBorders()) |
1765 return LayoutUnit(); | 1764 return LayoutUnit(); |
1766 | 1765 |
1767 return LayoutBlock::PaddingRight(); | 1766 return LayoutBlock::PaddingRight(); |
1768 } | 1767 } |
1769 | 1768 |
1770 } // namespace blink | 1769 } // namespace blink |
OLD | NEW |