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

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

Issue 2366193002: Fix paint invalidation rects for repeating paginated table headers. (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 4296c815b4c87e1bd7a1ef41f91e6a1614a0f8d3..e1534bc61efca9ee9b6c9a575602ebd4994c4754 100644
--- a/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp
@@ -37,17 +37,12 @@ inline const LayoutTableCell* TableSectionPainter::primaryCellToPaint(unsigned r
void TableSectionPainter::paintRepeatingHeaderGroup(const PaintInfo& paintInfo, const LayoutPoint& paintOffset, const CollapsedBorderValue& currentBorderValue, ItemToPaint itemToPaint)
{
- if (m_layoutTableSection.getPaginationBreakability() == LayoutBox::AllowAnyBreaks)
- return;
- // TODO(rhogan): Should we paint a header repeatedly if it's self-painting?
- if (m_layoutTableSection.hasSelfPaintingLayer())
- return;
- LayoutTable* table = m_layoutTableSection.table();
- LayoutUnit pageHeight = table->pageLogicalHeightForOffset(LayoutUnit());
- if (!pageHeight)
+ if (!m_layoutTableSection.hasRepeatingHeaderGroup())
return;
+ 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());
// Now move paginationOffset to the top of the page the cull rect starts on.
« 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