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. All rights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved. |
8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
386 } | 386 } |
387 | 387 |
388 void RenderTable::simplifiedNormalFlowLayout() | 388 void RenderTable::simplifiedNormalFlowLayout() |
389 { | 389 { |
390 for (RenderTableSection* section = topSection(); section; section = sectionB elow(section)) { | 390 for (RenderTableSection* section = topSection(); section; section = sectionB elow(section)) { |
391 section->layoutIfNeeded(); | 391 section->layoutIfNeeded(); |
392 section->computeOverflowFromCells(); | 392 section->computeOverflowFromCells(); |
393 } | 393 } |
394 } | 394 } |
395 | 395 |
396 bool RenderTable::recalcChildOverflowAfterStyleChange() | |
397 { | |
398 ASSERT(childNeedsOverflowRecalcAfterStyleChange()); | |
399 clearChildNeedsOverflowRecalcAfterStyleChange(); | |
400 | |
401 bool childrenOverflowChanged = false; | |
402 for (RenderTableSection* section = topSection(); section; section = sectionB elow(section)) { | |
403 if (section->childNeedsOverflowRecalcAfterStyleChange() && section->reca lcChildOverflowAfterStyleChange()) | |
404 childrenOverflowChanged = true; | |
Julien - ping for review
2014/11/25 18:33:10
This is better written:
childrenOverflowChanged |
Xianzhu
2014/11/25 20:17:12
We still need to continue the loop to call recalcC
| |
405 } | |
406 return childrenOverflowChanged; | |
407 } | |
408 | |
396 void RenderTable::layout() | 409 void RenderTable::layout() |
397 { | 410 { |
398 ASSERT(needsLayout()); | 411 ASSERT(needsLayout()); |
399 | 412 |
400 if (simplifiedLayout()) | 413 if (simplifiedLayout()) |
401 return; | 414 return; |
402 | 415 |
403 // Note: RenderTable is handled differently than other RenderBlocks and the LayoutScope | 416 // Note: RenderTable is handled differently than other RenderBlocks and the LayoutScope |
404 // must be created before the table begins laying out. | 417 // must be created before the table begins laying out. |
405 TextAutosizer::LayoutScope textAutosizerLayoutScope(this); | 418 TextAutosizer::LayoutScope textAutosizerLayoutScope(this); |
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1337 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel l* cell) const | 1350 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel l* cell) const |
1338 { | 1351 { |
1339 ASSERT(cell->isFirstOrLastCellInRow()); | 1352 ASSERT(cell->isFirstOrLastCellInRow()); |
1340 if (hasSameDirectionAs(cell->row())) | 1353 if (hasSameDirectionAs(cell->row())) |
1341 return style()->borderEnd(); | 1354 return style()->borderEnd(); |
1342 | 1355 |
1343 return style()->borderStart(); | 1356 return style()->borderStart(); |
1344 } | 1357 } |
1345 | 1358 |
1346 } | 1359 } |
OLD | NEW |