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

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

Issue 2040963002: Get the correct number of pages to paint a fixed object on. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated Created 4 years, 6 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/fixed-positioned-child-shouldnt-print-expected.html ('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/PaintLayerPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
index 3dbc5a07f64fe080a0fd337c8bc36876c89ee14e..fd8d01590aaed0b1bff70647fbcf87ff17be4011 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -486,9 +486,9 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintLayerWithTransform(Graphi
// "For paged media, boxes with fixed positions are repeated on every page."
// - https://www.w3.org/TR/2011/REC-CSS2-20110607/visuren.html#fixed-positioning
ASSERT(view->firstChild() && view->firstChild()->isLayoutBlock());
- int pages = toLayoutBlock(view->firstChild())->logicalHeight() / view->pageLogicalHeight();
+ int pages = static_cast<int>(ceilf(toLayoutBlock(view->firstChild())->logicalHeight() / view->pageLogicalHeight()));
LayoutPoint paginationOffset;
- for (int i = 0; i <= pages; i++) {
+ for (int i = 0; i < pages; i++) {
PaintLayerFragment fragment;
fragment.backgroundRect = paintingInfo.paintDirtyRect;
fragment.paginationOffset = paginationOffset;
« no previous file with comments | « third_party/WebKit/LayoutTests/printing/fixed-positioned-child-shouldnt-print-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698