| 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 407c56fca2ded2dd62a4a5a4a208d9a46a630fea..0ae4fb46923ad596b573577cd6a435dc06ebf617 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
|
| @@ -1690,4 +1690,30 @@ void LayoutTableSection::setLogicalPositionForCell(LayoutTableCell* cell, unsign
|
| cell->setLogicalLocation(cellLocation);
|
| }
|
|
|
| +bool LayoutTableSection::hasRepeatingHeaderGroup() const
|
| +{
|
| + if (getPaginationBreakability() == LayoutBox::AllowAnyBreaks)
|
| + return false;
|
| + // TODO(rhogan): Should we paint a header repeatedly if it's self-painting?
|
| + if (hasSelfPaintingLayer())
|
| + return false;
|
| + LayoutUnit pageHeight = table()->pageLogicalHeightForOffset(LayoutUnit());
|
| + if (!pageHeight)
|
| + return false;
|
| + return true;
|
| +}
|
| +
|
| +bool LayoutTableSection::mapToVisualRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect& rect, VisualRectFlags flags) const
|
| +{
|
| + if (ancestor == this)
|
| + return true;
|
| + // 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())
|
| + rect.setHeight(table()->logicalHeight());
|
| + return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rect, flags);
|
| +}
|
| +
|
| +
|
| } // namespace blink
|
|
|