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

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

Issue 2368093002: Handle repeated headers when more than one table in paged context (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/LayoutTests/printing/thead-repeats-at-top-of-each-page-multiple-tables-expected.txt ('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 e1534bc61efca9ee9b6c9a575602ebd4994c4754..de99b1a78074181c0e748c1dce1a7146830b5ec2 100644
--- a/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp
@@ -43,8 +43,10 @@ void TableSectionPainter::paintRepeatingHeaderGroup(const PaintInfo& paintInfo,
LayoutTable* table = m_layoutTableSection.table();
LayoutPoint paginationOffset = paintOffset;
LayoutUnit pageHeight = table->pageLogicalHeightForOffset(LayoutUnit());
- // Move paginationOffset to the top of the second page.
- paginationOffset.move(0, pageHeight - table->pageLogicalOffset());
+
+ // Move paginationOffset to the top of the next page.
+ LayoutUnit offsetToNextPage = pageHeight - intMod(table->pageLogicalOffset(), 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())
paginationOffset.move(0, pageHeight * static_cast<int>((paintInfo.cullRect().m_rect.y() - paginationOffset.y()) / pageHeight));
« no previous file with comments | « third_party/WebKit/LayoutTests/printing/thead-repeats-at-top-of-each-page-multiple-tables-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698