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

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

Issue 2199553002: Don't repeat header groups when one row of content doesn't fit on the first page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bug 621258 Created 4 years, 4 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
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. 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
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) { 546 if (isPaginated && m_head && m_head == section && section->logicalHe ight() < section->pageLogicalHeightForOffset(logicalOffset)) {
547 LayoutUnit offsetForTableHeaders = state.heightOffsetForTableHea ders(); 547 LayoutUnit offsetForTableHeaders = state.heightOffsetForTableHea ders();
548 offsetForTableHeaders += section->logicalHeight(); 548 offsetForTableHeaders += section->logicalHeight();
549 state.setHeightOffsetForTableHeaders(offsetForTableHeaders); 549 state.setHeightOffsetForTableHeaders(offsetForTableHeaders);
550 } 550 }
551 } 551 }
552 552
553 if (!topSection && computedLogicalHeight > totalSectionLogicalHeight && !document().inQuirksMode()) { 553 if (!topSection && computedLogicalHeight > totalSectionLogicalHeight && !document().inQuirksMode()) {
554 // Completely empty tables (with no sections or anything) should at least honor specified height 554 // Completely empty tables (with no sections or anything) should at least honor specified height
555 // in strict mode. 555 // in strict mode.
556 setLogicalHeight(logicalHeight() + computedLogicalHeight); 556 setLogicalHeight(logicalHeight() + computedLogicalHeight);
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 1507
1508 LayoutUnit LayoutTable::paddingRight() const 1508 LayoutUnit LayoutTable::paddingRight() const
1509 { 1509 {
1510 if (collapseBorders()) 1510 if (collapseBorders())
1511 return LayoutUnit(); 1511 return LayoutUnit();
1512 1512
1513 return LayoutBlock::paddingRight(); 1513 return LayoutBlock::paddingRight();
1514 } 1514 }
1515 1515
1516 } // namespace blink 1516 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698