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

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

Issue 2587673003: Content of cell should avoid repeating headers when it straddles multiple pages (Closed)
Patch Set: bug 675453 Created 3 years, 12 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/Source/core/layout/LayoutTableRow.cpp ('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, 2008, 2009, 2010, 2013 Apple Inc. 7 * Copyright (C) 2003, 2004, 2005, 2006, 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 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after
2005 } 2005 }
2006 2006
2007 if (!rowIsAtTopOfColumn) 2007 if (!rowIsAtTopOfColumn)
2008 return; 2008 return;
2009 } 2009 }
2010 // We need to push this row to the next fragmentainer. If there are repeated 2010 // We need to push this row to the next fragmentainer. If there are repeated
2011 // table headers, we need to make room for those at the top of the next 2011 // table headers, we need to make room for those at the top of the next
2012 // fragmentainer, above this row. Otherwise, this row will just go at the top 2012 // fragmentainer, above this row. Otherwise, this row will just go at the top
2013 // of the next fragmentainer. 2013 // of the next fragmentainer.
2014 2014
2015 // If there isn't room for at least one content row on a page with a
2016 // header group, then we won't repeat the header on each page.
2017 LayoutTableSection* header = table()->header(); 2015 LayoutTableSection* header = table()->header();
2018 if (!rowObject.rowIndex() && header && 2016 if (rowObject.isFirstRowInSectionAfterHeader())
2019 table()->sectionAbove(this) == header &&
2020 header->getPaginationBreakability() != AllowAnyBreaks) {
2021 table()->setRowOffsetFromRepeatingHeader(LayoutUnit()); 2017 table()->setRowOffsetFromRepeatingHeader(LayoutUnit());
2022 }
2023 // Border spacing from the previous row has pushed this row just past the top 2018 // Border spacing from the previous row has pushed this row just past the top
2024 // of the page, so we must reposition it to the top of the page and avoid any 2019 // of the page, so we must reposition it to the top of the page and avoid any
2025 // repeating header. 2020 // repeating header.
2026 if (rowIsAtTopOfColumn && offsetFromTopOfPage) 2021 if (rowIsAtTopOfColumn && offsetFromTopOfPage)
2027 paginationStrut -= offsetFromTopOfPage.toInt(); 2022 paginationStrut -= offsetFromTopOfPage.toInt();
2028 2023
2029 // If we have a header group we will paint it at the top of each page, 2024 // If we have a header group we will paint it at the top of each page,
2030 // move the rows down to accomodate it. 2025 // move the rows down to accomodate it.
2031 if (header) 2026 if (header)
2032 paginationStrut += table()->rowOffsetFromRepeatingHeader().toInt(); 2027 paginationStrut += table()->rowOffsetFromRepeatingHeader().toInt();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
2084 // the header in all columns. 2079 // the header in all columns.
2085 // Note that this is in flow thread coordinates, not visual coordinates. The 2080 // Note that this is in flow thread coordinates, not visual coordinates. The
2086 // enclosing LayoutFlowThread will convert to visual coordinates. 2081 // enclosing LayoutFlowThread will convert to visual coordinates.
2087 if (table()->header() == this && isRepeatingHeaderGroup()) 2082 if (table()->header() == this && isRepeatingHeaderGroup())
2088 rect.setHeight(table()->logicalHeight()); 2083 rect.setHeight(table()->logicalHeight());
2089 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rect, 2084 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rect,
2090 flags); 2085 flags);
2091 } 2086 }
2092 2087
2093 } // namespace blink 2088 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableRow.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698