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

Unified Diff: third_party/WebKit/Source/core/paint/TableSectionPainter.cpp

Issue 2363313002: Offset repeating theads correctly when two tables adjoin at a page border (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableSection.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/TableSectionPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp b/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp
index de99b1a78074181c0e748c1dce1a7146830b5ec2..877edf918a788bba14c3adf8266f24c98d5b3855 100644
--- a/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp
@@ -45,7 +45,11 @@ void TableSectionPainter::paintRepeatingHeaderGroup(const PaintInfo& paintInfo,
LayoutUnit pageHeight = table->pageLogicalHeightForOffset(LayoutUnit());
// Move paginationOffset to the top of the next page.
- LayoutUnit offsetToNextPage = pageHeight - intMod(table->pageLogicalOffset(), pageHeight);
+ // The header may have a pagination strut before it so we need to account for that when establishing its position.
+ LayoutUnit headerGroupOffset = table->pageLogicalOffset();
+ if (LayoutTableRow* row = m_layoutTableSection.firstRow())
+ headerGroupOffset += m_layoutTableSection.paginationStrutForRow(row, table->pageLogicalOffset());
+ LayoutUnit offsetToNextPage = pageHeight - intMod(headerGroupOffset, pageHeight);
paginationOffset.move(0, offsetToNextPage);
// Now move paginationOffset to the top of the page the cull rect starts on.
if (paintInfo.cullRect().m_rect.y() > paginationOffset.y())
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableSection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698