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

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

Issue 2439463002: Clean up use of LayoutPoint::move() in paintRepeatingHeaderGroup() (Closed)
Patch Set: bug 652792 follow up Created 4 years, 2 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 | « no previous file | 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 234a2acccb25d6770620acca4ad06afb9ae118e1..e07bd4f4213f3659efd265d69e60812713044b32 100644
--- a/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp
@@ -60,21 +60,23 @@ void TableSectionPainter::paintRepeatingHeaderGroup(
headerGroupOffset += row->paginationStrut();
LayoutUnit offsetToNextPage =
pageHeight - intMod(headerGroupOffset, pageHeight);
- paginationOffset.move(0, offsetToNextPage.toInt());
+ paginationOffset.move(LayoutUnit(), 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.toInt() *
- ((paintInfo.cullRect().m_rect.y() - paginationOffset.y()) /
- pageHeight)
- .toInt());
+ if (paintInfo.cullRect().m_rect.y() > paginationOffset.y()) {
+ paginationOffset.move(LayoutUnit(), pageHeight *
+ ((paintInfo.cullRect().m_rect.y() -
+ paginationOffset.y()) /
+ pageHeight)
+ .toInt());
+ }
LayoutUnit bottomBound =
std::min(LayoutUnit(paintInfo.cullRect().m_rect.maxY()),
paintOffset.y() + table->logicalHeight());
while (paginationOffset.y() < bottomBound) {
LayoutPoint nestedOffset =
paginationOffset +
- LayoutPoint(0, m_layoutTableSection.offsetForRepeatingHeader().toInt());
+ LayoutPoint(LayoutUnit(),
+ m_layoutTableSection.offsetForRepeatingHeader());
if (itemToPaint == PaintCollapsedBorders)
paintCollapsedSectionBorders(paintInfo, nestedOffset, currentBorderValue);
else
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698