Commit 1c81ee4b authored by robhogan's avatar robhogan Committed by Commit bot

Use paginationStrut() instead of paginationStrutForRow()

There's no change in behaviour. Now that we setPaginationStrut() on the row,
we don't need to call paginationStrutForRow() outside of layout anymore.

BUG=642814
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2389913002
Cr-Commit-Position: refs/heads/master@{#422858}
parent 4dd7585b
...@@ -619,8 +619,7 @@ void LayoutTable::layout() { ...@@ -619,8 +619,7 @@ void LayoutTable::layout() {
// Don't include any strut in the header group - we only want the height from its content. // Don't include any strut in the header group - we only want the height from its content.
offsetForTableHeaders += section->logicalHeight(); offsetForTableHeaders += section->logicalHeight();
if (LayoutTableRow* row = section->firstRow()) if (LayoutTableRow* row = section->firstRow())
offsetForTableHeaders -= offsetForTableHeaders -= row->paginationStrut();
section->paginationStrutForRow(row, section->logicalTop());
state.setHeightOffsetForTableHeaders(offsetForTableHeaders); state.setHeightOffsetForTableHeaders(offsetForTableHeaders);
} }
} }
......
...@@ -56,8 +56,7 @@ void TableSectionPainter::paintRepeatingHeaderGroup( ...@@ -56,8 +56,7 @@ void TableSectionPainter::paintRepeatingHeaderGroup(
// The header may have a pagination strut before it so we need to account for that when establishing its position. // The header may have a pagination strut before it so we need to account for that when establishing its position.
LayoutUnit headerGroupOffset = table->pageLogicalOffset(); LayoutUnit headerGroupOffset = table->pageLogicalOffset();
if (LayoutTableRow* row = m_layoutTableSection.firstRow()) if (LayoutTableRow* row = m_layoutTableSection.firstRow())
headerGroupOffset += m_layoutTableSection.paginationStrutForRow( headerGroupOffset += row->paginationStrut();
row, table->pageLogicalOffset());
LayoutUnit offsetToNextPage = LayoutUnit offsetToNextPage =
pageHeight - intMod(headerGroupOffset, pageHeight); pageHeight - intMod(headerGroupOffset, pageHeight);
paginationOffset.move(0, offsetToNextPage.toInt()); paginationOffset.move(0, offsetToNextPage.toInt());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment