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

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

Issue 2219153002: Offset repeating theads correctly when two tables adjoin at a page border (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
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..8dc5abdd43a1dce4ca7dddfad55f1bd607f18b96 100644
--- a/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp
@@ -44,7 +44,9 @@ void TableSectionPainter::paintRepeatingHeaderGroup(const PaintInfo& paintInfo,
LayoutPoint paginationOffset = paintOffset;
LayoutUnit pageHeight = table->pageLogicalHeightForOffset(LayoutUnit());
mstensho (USE GERRIT) 2016/08/10 09:42:47 (not for this CL) Page height isn't necessarily un
// Move paginationOffset to the top of the second page.
- paginationOffset.move(0, pageHeight - table->pageLogicalOffset());
+ LayoutUnit headerGroupOffset = table->pageLogicalOffset() + m_layoutTableSection.paginationStrutForRow(m_layoutTableSection.firstRow(), table->pageLogicalOffset());
rhogan 2016/08/09 20:34:39 We need to account for any pagination strut on the
mstensho (USE GERRIT) 2016/08/10 09:42:47 Just an observation (probably not something to do
+ 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())
paginationOffset.move(0, pageHeight * static_cast<int>((paintInfo.cullRect().m_rect.y() - paginationOffset.y()) / pageHeight));

Powered by Google App Engine
This is Rietveld 408576698