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

Unified Diff: third_party/WebKit/Source/core/page/PrintContext.cpp

Issue 2051703002: Implement closed shadow adjustment for Element.offsetParent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-revert the previous and check position:fixed in layout code. 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
Index: third_party/WebKit/Source/core/page/PrintContext.cpp
diff --git a/third_party/WebKit/Source/core/page/PrintContext.cpp b/third_party/WebKit/Source/core/page/PrintContext.cpp
index ccddc2e8c7c8162c884d2c7664d02d29841fab11..d86243482f4168c79b2683b6af7c6276596c52d0 100644
--- a/third_party/WebKit/Source/core/page/PrintContext.cpp
+++ b/third_party/WebKit/Source/core/page/PrintContext.cpp
@@ -203,8 +203,8 @@ int PrintContext::pageNumberForElement(Element* element, const FloatSize& pageSi
scaledPageSize.scale(frame->view()->contentsSize().width() / pageRect.width());
printContext.computePageRectsWithPageSize(scaledPageSize);
- int top = box->pixelSnappedOffsetTop();
- int left = box->pixelSnappedOffsetLeft();
+ int top = box->pixelSnappedOffsetTop(box->offsetParent());
+ int left = box->pixelSnappedOffsetLeft(box->offsetParent());
size_t pageNumber = 0;
for (; pageNumber < printContext.pageCount(); pageNumber++) {
const IntRect& page = printContext.pageRect(pageNumber);

Powered by Google App Engine
This is Rietveld 408576698