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

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

Issue 2867903002: Don't update column position in StyleDidChange. (Closed)
Patch Set: 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/table/relayout-out-of-flow-with-border-spacing.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_ = CollapseBorders() ? 0 : Style()->HorizontalBorderSpacing(); 84 h_spacing_ = CollapseBorders() ? 0 : Style()->HorizontalBorderSpacing();
85 v_spacing_ = CollapseBorders() ? 0 : Style()->VerticalBorderSpacing(); 85 v_spacing_ = CollapseBorders() ? 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 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1737 } 1736 }
1738 1737
1739 LayoutUnit LayoutTable::PaddingRight() const { 1738 LayoutUnit LayoutTable::PaddingRight() const {
1740 if (CollapseBorders()) 1739 if (CollapseBorders())
1741 return LayoutUnit(); 1740 return LayoutUnit();
1742 1741
1743 return LayoutBlock::PaddingRight(); 1742 return LayoutBlock::PaddingRight();
1744 } 1743 }
1745 1744
1746 } // namespace blink 1745 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/table/relayout-out-of-flow-with-border-spacing.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698