Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutTable.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutTable.cpp b/third_party/WebKit/Source/core/layout/LayoutTable.cpp |
| index 3e64f7298ab2b4bdaaceb428a285793cb3c289cd..5bb9ab68d2ca68bd67fdfa2d1e692f8b8ed3f440 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp |
| @@ -470,8 +470,10 @@ void LayoutTable::LayoutSection( |
| bool needed_layout = section.NeedsLayout(); |
| if (needed_layout) |
| section.UpdateLayout(); |
| - if (needed_layout || table_height_changing == kTableHeightChanging) |
| + if (needed_layout || table_height_changing == kTableHeightChanging) { |
| section.SetLogicalHeight(LayoutUnit(section.CalcRowLogicalHeight())); |
| + section.SetHeaderGroupShouldRepeat(); |
| + } |
| if (View()->GetLayoutState()->IsPaginated()) |
| UpdateFragmentationInfoForChild(section); |
| @@ -661,15 +663,15 @@ void LayoutTable::UpdateLayout() { |
| // If the repeating header group allows at least one row of content, |
| // then store the offset for other sections to offset their rows |
| // against. |
| - LayoutUnit section_logical_height = section->LogicalHeight(); |
| - if (section_logical_height < |
| - section->PageLogicalHeightForOffset(section->LogicalTop()) && |
| - section->GetPaginationBreakability() != kAllowAnyBreaks) { |
| + if (section->IsRepeatingHeaderGroup()) { |
| + LayoutUnit offset_for_table_headers = |
| + state.HeightOffsetForTableHeaders(); |
| + offset_for_table_headers += section->LogicalHeight(); |
|
mstensho (USE GERRIT)
2017/05/22 10:40:44
So here we are re-introducing support for nested r
rhogan
2017/05/22 18:06:04
I think the spec implies it now (by allowing you t
mstensho (USE GERRIT)
2017/05/22 19:17:34
Thanks for the clarification. I agree that support
|
| // Don't include any strut in the header group - we only want the |
| // height from its content. |
| - LayoutUnit offset_for_table_headers = section_logical_height; |
| if (LayoutTableRow* row = section->FirstRow()) |
| offset_for_table_headers -= row->PaginationStrut(); |
| + state.SetHeightOffsetForTableHeaders(offset_for_table_headers); |
| SetRowOffsetFromRepeatingHeader(offset_for_table_headers); |
| } |
| } |