| 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 caption->layoutIfNeeded(); | 359 caption->layoutIfNeeded(); |
| 360 } | 360 } |
| 361 // Apply the margins to the location now that they are definitely available
from layout | 361 // Apply the margins to the location now that they are definitely available
from layout |
| 362 LayoutUnit captionLogicalTop = collapsedMarginBeforeForChild(caption) + logi
calHeight(); | 362 LayoutUnit captionLogicalTop = collapsedMarginBeforeForChild(caption) + logi
calHeight(); |
| 363 if (view()->layoutState()->isPaginated()) { | 363 if (view()->layoutState()->isPaginated()) { |
| 364 captionLogicalTop += caption->paginationStrut(); | 364 captionLogicalTop += caption->paginationStrut(); |
| 365 caption->setPaginationStrut(0); | 365 caption->setPaginationStrut(0); |
| 366 } | 366 } |
| 367 caption->setLogicalLocation(LayoutPoint(caption->marginStart(), captionLogic
alTop)); | 367 caption->setLogicalLocation(LayoutPoint(caption->marginStart(), captionLogic
alTop)); |
| 368 | 368 |
| 369 if (!selfNeedsLayout()) |
| 370 caption->setMayNeedPaintInvalidation(true); |
| 371 |
| 369 setLogicalHeight(logicalHeight() + caption->logicalHeight() + collapsedMargi
nBeforeForChild(caption) + collapsedMarginAfterForChild(caption)); | 372 setLogicalHeight(logicalHeight() + caption->logicalHeight() + collapsedMargi
nBeforeForChild(caption) + collapsedMarginAfterForChild(caption)); |
| 370 } | 373 } |
| 371 | 374 |
| 372 void RenderTable::distributeExtraLogicalHeight(int extraLogicalHeight) | 375 void RenderTable::distributeExtraLogicalHeight(int extraLogicalHeight) |
| 373 { | 376 { |
| 374 if (extraLogicalHeight <= 0) | 377 if (extraLogicalHeight <= 0) |
| 375 return; | 378 return; |
| 376 | 379 |
| 377 // FIXME: Distribute the extra logical height between all table sections ins
tead of giving it all to the first one. | 380 // FIXME: Distribute the extra logical height between all table sections ins
tead of giving it all to the first one. |
| 378 if (RenderTableSection* section = firstBody()) | 381 if (RenderTableSection* section = firstBody()) |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 | 517 |
| 515 // position the table sections | 518 // position the table sections |
| 516 RenderTableSection* section = topSection(); | 519 RenderTableSection* section = topSection(); |
| 517 while (section) { | 520 while (section) { |
| 518 if (!sectionMoved && section->logicalTop() != logicalHeight()) { | 521 if (!sectionMoved && section->logicalTop() != logicalHeight()) { |
| 519 sectionMoved = true; | 522 sectionMoved = true; |
| 520 movedSectionLogicalTop = std::min(logicalHeight(), section->logi
calTop()) + (style()->isHorizontalWritingMode() ? section->visualOverflowRect().
y() : section->visualOverflowRect().x()); | 523 movedSectionLogicalTop = std::min(logicalHeight(), section->logi
calTop()) + (style()->isHorizontalWritingMode() ? section->visualOverflowRect().
y() : section->visualOverflowRect().x()); |
| 521 } | 524 } |
| 522 section->setLogicalLocation(LayoutPoint(sectionLogicalLeft, logicalH
eight())); | 525 section->setLogicalLocation(LayoutPoint(sectionLogicalLeft, logicalH
eight())); |
| 523 | 526 |
| 527 // As we may skip invalidation on the table, we need to ensure that
sections are invalidated when they moved. |
| 528 if (sectionMoved && !section->selfNeedsLayout()) |
| 529 section->setMayNeedPaintInvalidation(true); |
| 530 |
| 524 setLogicalHeight(logicalHeight() + section->logicalHeight()); | 531 setLogicalHeight(logicalHeight() + section->logicalHeight()); |
| 532 |
| 525 section = sectionBelow(section); | 533 section = sectionBelow(section); |
| 526 } | 534 } |
| 527 | 535 |
| 528 setLogicalHeight(logicalHeight() + borderAndPaddingAfter); | 536 setLogicalHeight(logicalHeight() + borderAndPaddingAfter); |
| 529 | 537 |
| 530 for (unsigned i = 0; i < m_captions.size(); i++) { | 538 for (unsigned i = 0; i < m_captions.size(); i++) { |
| 531 if (m_captions[i]->style()->captionSide() != CAPBOTTOM) | 539 if (m_captions[i]->style()->captionSide() != CAPBOTTOM) |
| 532 continue; | 540 continue; |
| 533 layoutCaption(m_captions[i]); | 541 layoutCaption(m_captions[i]); |
| 534 } | 542 } |
| (...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1419 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel
l* cell) const | 1427 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel
l* cell) const |
| 1420 { | 1428 { |
| 1421 ASSERT(cell->isFirstOrLastCellInRow()); | 1429 ASSERT(cell->isFirstOrLastCellInRow()); |
| 1422 if (hasSameDirectionAs(cell->row())) | 1430 if (hasSameDirectionAs(cell->row())) |
| 1423 return style()->borderEnd(); | 1431 return style()->borderEnd(); |
| 1424 | 1432 |
| 1425 return style()->borderStart(); | 1433 return style()->borderStart(); |
| 1426 } | 1434 } |
| 1427 | 1435 |
| 1428 } | 1436 } |
| OLD | NEW |