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 | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 |
8 * Apple Inc. | 8 * Apple Inc. |
9 * All rights reserved. | 9 * All rights reserved. |
10 * | 10 * |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 DCHECK(!before_child || before_child->IsTableCell()); | 163 DCHECK(!before_child || before_child->IsTableCell()); |
164 LayoutTableBoxComponent::AddChild(cell, before_child); | 164 LayoutTableBoxComponent::AddChild(cell, before_child); |
165 | 165 |
166 // Generated content can result in us having a null section so make sure to | 166 // Generated content can result in us having a null section so make sure to |
167 // null check our parent. | 167 // null check our parent. |
168 if (Parent()) { | 168 if (Parent()) { |
169 Section()->AddCell(cell, this); | 169 Section()->AddCell(cell, this); |
170 // When borders collapse, adding a cell can affect the the width of | 170 // When borders collapse, adding a cell can affect the the width of |
171 // neighboring cells. | 171 // neighboring cells. |
172 LayoutTable* enclosing_table = Table(); | 172 LayoutTable* enclosing_table = Table(); |
173 if (enclosing_table && enclosing_table->CollapseBorders()) { | 173 if (enclosing_table && enclosing_table->ShouldCollapseBorders()) { |
174 enclosing_table->InvalidateCollapsedBorders(); | 174 enclosing_table->InvalidateCollapsedBorders(); |
175 if (LayoutTableCell* previous_cell = cell->PreviousCell()) | 175 if (LayoutTableCell* previous_cell = cell->PreviousCell()) |
176 previous_cell->SetNeedsLayoutAndPrefWidthsRecalc( | 176 previous_cell->SetNeedsLayoutAndPrefWidthsRecalc( |
177 LayoutInvalidationReason::kTableChanged); | 177 LayoutInvalidationReason::kTableChanged); |
178 if (LayoutTableCell* next_cell = cell->NextCell()) | 178 if (LayoutTableCell* next_cell = cell->NextCell()) |
179 next_cell->SetNeedsLayoutAndPrefWidthsRecalc( | 179 next_cell->SetNeedsLayoutAndPrefWidthsRecalc( |
180 LayoutInvalidationReason::kTableChanged); | 180 LayoutInvalidationReason::kTableChanged); |
181 } | 181 } |
182 } | 182 } |
183 | 183 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 // won't fit but we avoid the complexity of that reading until it | 326 // won't fit but we avoid the complexity of that reading until it |
327 // is clarified. Tracked by crbug.com/675904 | 327 // is clarified. Tracked by crbug.com/675904 |
328 if (RowIndex()) | 328 if (RowIndex()) |
329 return false; | 329 return false; |
330 LayoutTableSection* header = Table()->Header(); | 330 LayoutTableSection* header = Table()->Header(); |
331 return header && Table()->SectionAbove(Section()) == header && | 331 return header && Table()->SectionAbove(Section()) == header && |
332 header->GetPaginationBreakability() != kAllowAnyBreaks; | 332 header->GetPaginationBreakability() != kAllowAnyBreaks; |
333 } | 333 } |
334 | 334 |
335 } // namespace blink | 335 } // namespace blink |
OLD | NEW |