Chromium Code Reviews| 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 374 caption->layoutIfNeeded(); | 374 caption->layoutIfNeeded(); |
| 375 } | 375 } |
| 376 // Apply the margins to the location now that they are definitely available from layout | 376 // Apply the margins to the location now that they are definitely available from layout |
| 377 LayoutUnit captionLogicalTop = collapsedMarginBeforeForChild(caption) + logi calHeight(); | 377 LayoutUnit captionLogicalTop = collapsedMarginBeforeForChild(caption) + logi calHeight(); |
| 378 if (view()->layoutState()->isPaginated()) { | 378 if (view()->layoutState()->isPaginated()) { |
| 379 captionLogicalTop += caption->paginationStrut(); | 379 captionLogicalTop += caption->paginationStrut(); |
| 380 caption->setPaginationStrut(0); | 380 caption->setPaginationStrut(0); |
| 381 } | 381 } |
| 382 caption->setLogicalLocation(LayoutPoint(caption->marginStart(), captionLogic alTop)); | 382 caption->setLogicalLocation(LayoutPoint(caption->marginStart(), captionLogic alTop)); |
| 383 | 383 |
| 384 if (!selfNeedsLayout() && caption->checkForPaintInvalidationDuringLayout()) | 384 if (!selfNeedsLayout()) { |
| 385 caption->repaintDuringLayoutIfMoved(captionRect); | 385 if (caption->checkForPaintInvalidationDuringLayout()) |
|
dsinclair
2014/06/25 12:51:16
This branch can go away as checkForPaintInvalidati
Julien - ping for review
2014/06/30 22:36:30
done!
| |
| 386 caption->repaintDuringLayoutIfMoved(captionRect); | |
| 387 else | |
| 388 caption->setMayNeedPaintInvalidation(true); | |
| 389 } | |
| 386 | 390 |
| 387 setLogicalHeight(logicalHeight() + caption->logicalHeight() + collapsedMargi nBeforeForChild(caption) + collapsedMarginAfterForChild(caption)); | 391 setLogicalHeight(logicalHeight() + caption->logicalHeight() + collapsedMargi nBeforeForChild(caption) + collapsedMarginAfterForChild(caption)); |
| 388 } | 392 } |
| 389 | 393 |
| 390 void RenderTable::distributeExtraLogicalHeight(int extraLogicalHeight) | 394 void RenderTable::distributeExtraLogicalHeight(int extraLogicalHeight) |
| 391 { | 395 { |
| 392 if (extraLogicalHeight <= 0) | 396 if (extraLogicalHeight <= 0) |
| 393 return; | 397 return; |
| 394 | 398 |
| 395 // FIXME: Distribute the extra logical height between all table sections ins tead of giving it all to the first one. | 399 // FIXME: Distribute the extra logical height between all table sections ins tead of giving it all to the first one. |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 537 | 541 |
| 538 // position the table sections | 542 // position the table sections |
| 539 RenderTableSection* section = topSection(); | 543 RenderTableSection* section = topSection(); |
| 540 while (section) { | 544 while (section) { |
| 541 if (!sectionMoved && section->logicalTop() != logicalHeight()) { | 545 if (!sectionMoved && section->logicalTop() != logicalHeight()) { |
| 542 sectionMoved = true; | 546 sectionMoved = true; |
| 543 movedSectionLogicalTop = min(logicalHeight(), section->logicalTo p()) + (style()->isHorizontalWritingMode() ? section->visualOverflowRect().y() : section->visualOverflowRect().x()); | 547 movedSectionLogicalTop = min(logicalHeight(), section->logicalTo p()) + (style()->isHorizontalWritingMode() ? section->visualOverflowRect().y() : section->visualOverflowRect().x()); |
| 544 } | 548 } |
| 545 section->setLogicalLocation(LayoutPoint(sectionLogicalLeft, logicalH eight())); | 549 section->setLogicalLocation(LayoutPoint(sectionLogicalLeft, logicalH eight())); |
| 546 | 550 |
| 551 // As we may skip invalidation on the table, we need to ensure that sections are invalidated when they moved. | |
| 552 if (sectionMoved && !section->selfNeedsLayout()) | |
| 553 section->setMayNeedPaintInvalidation(true); | |
| 554 | |
| 547 setLogicalHeight(logicalHeight() + section->logicalHeight()); | 555 setLogicalHeight(logicalHeight() + section->logicalHeight()); |
| 556 | |
| 548 section = sectionBelow(section); | 557 section = sectionBelow(section); |
| 549 } | 558 } |
| 550 | 559 |
| 551 setLogicalHeight(logicalHeight() + borderAndPaddingAfter); | 560 setLogicalHeight(logicalHeight() + borderAndPaddingAfter); |
| 552 | 561 |
| 553 for (unsigned i = 0; i < m_captions.size(); i++) { | 562 for (unsigned i = 0; i < m_captions.size(); i++) { |
| 554 if (m_captions[i]->style()->captionSide() != CAPBOTTOM) | 563 if (m_captions[i]->style()->captionSide() != CAPBOTTOM) |
| 555 continue; | 564 continue; |
| 556 layoutCaption(m_captions[i]); | 565 layoutCaption(m_captions[i]); |
| 557 } | 566 } |
| (...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1453 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel l* cell) const | 1462 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel l* cell) const |
| 1454 { | 1463 { |
| 1455 ASSERT(cell->isFirstOrLastCellInRow()); | 1464 ASSERT(cell->isFirstOrLastCellInRow()); |
| 1456 if (hasSameDirectionAs(cell->row())) | 1465 if (hasSameDirectionAs(cell->row())) |
| 1457 return style()->borderEnd(); | 1466 return style()->borderEnd(); |
| 1458 | 1467 |
| 1459 return style()->borderStart(); | 1468 return style()->borderStart(); |
| 1460 } | 1469 } |
| 1461 | 1470 |
| 1462 } | 1471 } |
| OLD | NEW |