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 Apple Inc. All r
ights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 for (RenderTableSection* section = topSection(); section; section = sectionB
elow(section)) { | 406 for (RenderTableSection* section = topSection(); section; section = sectionB
elow(section)) { |
407 section->layoutIfNeeded(); | 407 section->layoutIfNeeded(); |
408 section->computeOverflowFromCells(); | 408 section->computeOverflowFromCells(); |
409 } | 409 } |
410 } | 410 } |
411 | 411 |
412 void RenderTable::layout() | 412 void RenderTable::layout() |
413 { | 413 { |
414 ASSERT(needsLayout()); | 414 ASSERT(needsLayout()); |
415 | 415 |
| 416 setMayNeedInvalidation(true); |
| 417 |
416 if (simplifiedLayout()) | 418 if (simplifiedLayout()) |
417 return; | 419 return; |
418 | 420 |
419 // Note: RenderTable is handled differently than other RenderBlocks and the
LayoutScope | 421 // Note: RenderTable is handled differently than other RenderBlocks and the
LayoutScope |
420 // must be created before the table begins laying out. | 422 // must be created before the table begins laying out. |
421 FastTextAutosizer::LayoutScope fastTextAutosizerLayoutScope(this); | 423 FastTextAutosizer::LayoutScope fastTextAutosizerLayoutScope(this); |
422 | 424 |
423 recalcSectionsIfNeeded(); | 425 recalcSectionsIfNeeded(); |
424 // FIXME: We should do this recalc lazily in borderStart/borderEnd so that w
e don't have to make sure | 426 // FIXME: We should do this recalc lazily in borderStart/borderEnd so that w
e don't have to make sure |
425 // to call this before we call borderStart/borderEnd to avoid getting a stal
e value. | 427 // to call this before we call borderStart/borderEnd to avoid getting a stal
e value. |
426 recalcBordersInRowDirection(); | 428 recalcBordersInRowDirection(); |
427 | 429 |
428 LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); | 430 LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); |
429 SubtreeLayoutScope layouter(*this); | 431 SubtreeLayoutScope layouter(*this); |
430 | 432 |
431 | |
432 // If any table section moved vertically, we will just repaint everything fr
om that | 433 // If any table section moved vertically, we will just repaint everything fr
om that |
433 // section down (it is quite unlikely that any of the following sections | 434 // section down (it is quite unlikely that any of the following sections |
434 // did not shift). | 435 // did not shift). |
435 bool sectionMoved = false; | 436 bool sectionMoved = false; |
436 LayoutUnit movedSectionLogicalTop = 0; | 437 LayoutUnit movedSectionLogicalTop = 0; |
437 { | 438 { |
438 LayoutStateMaintainer statePusher(*this, locationOffset()); | 439 LayoutStateMaintainer statePusher(*this, locationOffset()); |
439 | 440 |
440 setLogicalHeight(0); | 441 setLogicalHeight(0); |
441 | 442 |
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1457 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel
l* cell) const | 1458 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel
l* cell) const |
1458 { | 1459 { |
1459 ASSERT(cell->isFirstOrLastCellInRow()); | 1460 ASSERT(cell->isFirstOrLastCellInRow()); |
1460 if (hasSameDirectionAs(cell->row())) | 1461 if (hasSameDirectionAs(cell->row())) |
1461 return style()->borderEnd(); | 1462 return style()->borderEnd(); |
1462 | 1463 |
1463 return style()->borderStart(); | 1464 return style()->borderStart(); |
1464 } | 1465 } |
1465 | 1466 |
1466 } | 1467 } |
OLD | NEW |