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. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. |
8 * All rights reserved. | 8 * All rights reserved. |
9 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 9 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
10 * | 10 * |
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 computedLogicalHeight = | 640 computedLogicalHeight = |
641 std::max(computedLogicalHeight, computedMinLogicalHeight); | 641 std::max(computedLogicalHeight, computedMinLogicalHeight); |
642 } | 642 } |
643 | 643 |
644 LayoutUnit totalSectionLogicalHeight; | 644 LayoutUnit totalSectionLogicalHeight; |
645 if (topSection) { | 645 if (topSection) { |
646 totalSectionLogicalHeight = | 646 totalSectionLogicalHeight = |
647 bottomSection->logicalBottom() - topSection->logicalTop(); | 647 bottomSection->logicalBottom() - topSection->logicalTop(); |
648 } | 648 } |
649 | 649 |
650 distributeExtraLogicalHeight( | 650 if (!state.isPaginated() || |
651 floorToInt(computedLogicalHeight - totalSectionLogicalHeight)); | 651 !crossesPageBoundary(tableBoxLogicalTop, computedLogicalHeight)) { |
| 652 distributeExtraLogicalHeight( |
| 653 floorToInt(computedLogicalHeight - totalSectionLogicalHeight)); |
| 654 } |
652 | 655 |
653 bool isPaginated = view()->layoutState()->isPaginated(); | 656 bool isPaginated = view()->layoutState()->isPaginated(); |
654 LayoutUnit logicalOffset = | 657 LayoutUnit logicalOffset = |
655 topSection ? topSection->logicalTop() : LayoutUnit(); | 658 topSection ? topSection->logicalTop() : LayoutUnit(); |
656 for (LayoutTableSection* section = topSection; section; | 659 for (LayoutTableSection* section = topSection; section; |
657 section = sectionBelow(section)) { | 660 section = sectionBelow(section)) { |
658 section->setLogicalTop(logicalOffset); | 661 section->setLogicalTop(logicalOffset); |
659 section->layoutRows(); | 662 section->layoutRows(); |
660 logicalOffset += section->logicalHeight(); | 663 logicalOffset += section->logicalHeight(); |
661 // If the section is a repeating header group that allows at least one row | 664 // If the section is a repeating header group that allows at least one row |
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1678 } | 1681 } |
1679 | 1682 |
1680 LayoutUnit LayoutTable::paddingRight() const { | 1683 LayoutUnit LayoutTable::paddingRight() const { |
1681 if (collapseBorders()) | 1684 if (collapseBorders()) |
1682 return LayoutUnit(); | 1685 return LayoutUnit(); |
1683 | 1686 |
1684 return LayoutBlock::paddingRight(); | 1687 return LayoutBlock::paddingRight(); |
1685 } | 1688 } |
1686 | 1689 |
1687 } // namespace blink | 1690 } // namespace blink |
OLD | NEW |