| 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 e88fd38599e162a4fd98c01cee87e5ed16616fcb..11e4500ea66b34d19cae9fb0eea65218b768a2b6 100644
|
| --- a/third_party/WebKit/Source/core/page/PrintContext.cpp
|
| +++ b/third_party/WebKit/Source/core/page/PrintContext.cpp
|
| @@ -67,7 +67,10 @@ void PrintContext::computePageRects(const FloatRect& printRect,
|
| }
|
|
|
| LayoutViewItem view = m_frame->document()->layoutViewItem();
|
| - const IntRect& documentRect = view.documentRect();
|
| + const IntRect& documentRect0 = view.documentRect();
|
| + IntSize layout1Rect = view.layoutSize(IncludeScrollbars);
|
| + IntRect documentRect(documentRect0.location(), layout1Rect);
|
| +
|
| FloatSize pageSize = m_frame->resizePageRectsKeepingRatio(
|
| FloatSize(printRect.width(), printRect.height()),
|
| FloatSize(documentRect.width(), documentRect.height()));
|
| @@ -101,7 +104,11 @@ void PrintContext::computePageRectsWithPageSizeInternal(
|
|
|
| LayoutViewItem view = m_frame->document()->layoutViewItem();
|
|
|
| - IntRect docRect = view.documentRect();
|
| + IntRect docRect0 = view.documentRect();
|
| + IntRect viewRect(view.viewRect());
|
| + IntSize layoutRect = view.layoutSize();
|
| + IntSize layout1Rect = view.layoutSize(IncludeScrollbars);
|
| + IntRect docRect(docRect0.location(), layout1Rect);
|
|
|
| int pageWidth = pageSizeInPixels.width();
|
| // We scaled with floating point arithmetic and need to ensure results like
|
|
|