Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTable.cpp

Issue 2421133002: Disable row stretching for tables crossing fragmentainer boundaries. (Closed)
Patch Set: Use fixed line-height in test, so that it passes everywhere, not just Linux. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fragmentation/fragmented-table-with-fixed-height-expected.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fragmentation/fragmented-table-with-fixed-height-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698