Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutTableSection.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp |
| index f6145c595db79e71b0385dda2e2fbf366ab2e0c4..8c60d9443994a7407e794c635801b6f715c978ad 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp |
| @@ -1000,10 +1000,11 @@ void LayoutTableSection::layoutRows() |
| rowLayoutObject->updateLayerTransformAfterLayout(); |
| if (isPaginated) { |
| paginationStrutOnRow = paginationStrutForRow(rowLayoutObject, LayoutUnit(m_rowPos[r])); |
| + rowLayoutObject->setHasPaginationStrut(paginationStrutOnRow); |
| if (paginationStrutOnRow) { |
| // If there isn't room for at least one content row on a page with a header group, then |
| // we won't repeat the header on each page. |
| - if (!r && table()->header() && table()->sectionAbove(this) == table()->header()) |
| + if (!r && table()->header() && table()->sectionAbove(this) == table()->header() && table()->header()->getPaginationBreakability() != AllowAnyBreaks) |
| state.setHeightOffsetForTableHeaders(state.heightOffsetForTableHeaders() - table()->header()->logicalHeight()); |
| // If we have a header group we will paint it at the top of each page, move the rows |
| // down to accomodate it. |
| @@ -1716,7 +1717,7 @@ void LayoutTableSection::setLogicalPositionForCell(LayoutTableCell* cell, unsign |
| cell->setLogicalLocation(cellLocation); |
| } |
| -bool LayoutTableSection::hasRepeatingHeaderGroup() const |
| +bool LayoutTableSection::isRepeatingHeaderGroup() const |
| { |
| if (getPaginationBreakability() == LayoutBox::AllowAnyBreaks) |
| return false; |
| @@ -1733,7 +1734,7 @@ bool LayoutTableSection::hasRepeatingHeaderGroup() const |
| // If the first row of the section after the header group doesn't fit on the page, then |
| // don't repeat the header on each page. See https://drafts.csswg.org/css-tables-3/#repeated-headers |
| LayoutTableSection* sectionBelow = table()->sectionBelow(this); |
| - if (sectionBelow && sectionBelow->firstRow() && sectionBelow->paginationStrutForRow(sectionBelow->firstRow(), sectionBelow->logicalTop())) |
|
rhogan
2016/09/12 19:07:35
We don't get a valid result from paginationStrutFo
mstensho (USE GERRIT)
2016/09/13 06:51:36
Why is that?
|
| + if (sectionBelow && sectionBelow->firstRow() && sectionBelow->firstRow()->hasPaginationStrut()) |
| return false; |
| return true; |
| @@ -1746,7 +1747,7 @@ bool LayoutTableSection::mapToVisualRectInAncestorSpace(const LayoutBoxModelObje |
| // Repeating table headers are painted once per fragmentation page/column. This does not go through the regular fragmentation machinery, |
| // so we need special code to expand the invalidation rect to contain all positions of the header in all columns. |
| // Note that this is in flow thread coordinates, not visual coordinates. The enclosing LayoutFlowThread will convert to visual coordinates. |
| - if (table()->header() == this && hasRepeatingHeaderGroup()) |
| + if (table()->header() == this && isRepeatingHeaderGroup()) |
| rect.setHeight(table()->logicalHeight()); |
| return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rect, flags); |
| } |