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

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: bug 634404 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 90aebb1aacbc75d845cc8b03c0f5959c377af307..923902c8e243b0af42263911eb9a9fb04005c896 100644
--- a/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp
@@ -45,7 +45,9 @@ 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() + m_layoutTableSection.paginationStrutForRow(m_layoutTableSection.firstRow(), table->pageLogicalOffset());
mstensho (USE GERRIT) 2016/08/10 09:42:48 m_layoutTableSection.firstRow() may be nullptr. W
rhogan 2016/08/10 18:05:14 We don't propagate the strut to the logical top of
+ 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())

Powered by Google App Engine
This is Rietveld 408576698