| 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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 | 536 |
| 537 distributeExtraLogicalHeight(floorToInt(computedLogicalHeight - totalSec
tionLogicalHeight)); | 537 distributeExtraLogicalHeight(floorToInt(computedLogicalHeight - totalSec
tionLogicalHeight)); |
| 538 | 538 |
| 539 bool isPaginated = view()->layoutState()->isPaginated(); | 539 bool isPaginated = view()->layoutState()->isPaginated(); |
| 540 LayoutTableSection* topSection = this->topSection(); | 540 LayoutTableSection* topSection = this->topSection(); |
| 541 LayoutUnit logicalOffset = topSection ? topSection->logicalTop() : Layou
tUnit(); | 541 LayoutUnit logicalOffset = topSection ? topSection->logicalTop() : Layou
tUnit(); |
| 542 for (LayoutTableSection* section = topSection; section; section = sectio
nBelow(section)) { | 542 for (LayoutTableSection* section = topSection; section; section = sectio
nBelow(section)) { |
| 543 section->setLogicalTop(logicalOffset); | 543 section->setLogicalTop(logicalOffset); |
| 544 section->layoutRows(); | 544 section->layoutRows(); |
| 545 logicalOffset += section->logicalHeight(); | 545 logicalOffset += section->logicalHeight(); |
| 546 if (isPaginated && m_head && m_head == section && section->logicalHe
ight() < section->pageLogicalHeightForOffset(logicalOffset)) { | 546 // If the section is a repeating header group that allows at least o
ne row of content then store the |
| 547 // offset for other sections to offset their rows against. |
| 548 if (isPaginated && m_head && m_head == section && section->logicalHe
ight() < section->pageLogicalHeightForOffset(logicalOffset) |
| 549 && section->getPaginationBreakability() != LayoutBox::AllowAnyBr
eaks) { |
| 547 LayoutUnit offsetForTableHeaders = state.heightOffsetForTableHea
ders(); | 550 LayoutUnit offsetForTableHeaders = state.heightOffsetForTableHea
ders(); |
| 551 // Don't include any strut in the header group - we only want th
e height from its content. |
| 548 offsetForTableHeaders += section->logicalHeight(); | 552 offsetForTableHeaders += section->logicalHeight(); |
| 553 if (LayoutTableRow* row = section->firstRow()) |
| 554 offsetForTableHeaders -= section->paginationStrutForRow(row,
section->logicalTop()); |
| 549 state.setHeightOffsetForTableHeaders(offsetForTableHeaders); | 555 state.setHeightOffsetForTableHeaders(offsetForTableHeaders); |
| 550 } | 556 } |
| 551 } | 557 } |
| 552 | 558 |
| 553 if (!topSection && computedLogicalHeight > totalSectionLogicalHeight &&
!document().inQuirksMode()) { | 559 if (!topSection && computedLogicalHeight > totalSectionLogicalHeight &&
!document().inQuirksMode()) { |
| 554 // Completely empty tables (with no sections or anything) should at
least honor specified height | 560 // Completely empty tables (with no sections or anything) should at
least honor specified height |
| 555 // in strict mode. | 561 // in strict mode. |
| 556 setLogicalHeight(logicalHeight() + computedLogicalHeight); | 562 setLogicalHeight(logicalHeight() + computedLogicalHeight); |
| 557 } | 563 } |
| 558 | 564 |
| (...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1507 | 1513 |
| 1508 LayoutUnit LayoutTable::paddingRight() const | 1514 LayoutUnit LayoutTable::paddingRight() const |
| 1509 { | 1515 { |
| 1510 if (collapseBorders()) | 1516 if (collapseBorders()) |
| 1511 return LayoutUnit(); | 1517 return LayoutUnit(); |
| 1512 | 1518 |
| 1513 return LayoutBlock::paddingRight(); | 1519 return LayoutBlock::paddingRight(); |
| 1514 } | 1520 } |
| 1515 | 1521 |
| 1516 } // namespace blink | 1522 } // namespace blink |
| OLD | NEW |