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); |