| Index: Source/core/frame/FrameView.cpp
|
| diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
|
| index 9a97c1587c4718977f395f810cb98e89f1b5ebdf..c111f2c4bd18fec240b84fd55b0b9862c15f6f04 100644
|
| --- a/Source/core/frame/FrameView.cpp
|
| +++ b/Source/core/frame/FrameView.cpp
|
| @@ -2879,9 +2879,8 @@ void FrameView::forceLayoutForPagination(const FloatSize& pageSize, const FloatS
|
| const LayoutRect& documentRect = renderView->documentRect();
|
| LayoutUnit docLogicalWidth = horizontalWritingMode ? documentRect.width() : documentRect.height();
|
| if (docLogicalWidth > pageLogicalWidth) {
|
| - int expectedPageWidth = std::min<float>(documentRect.width(), pageSize.width() * maximumShrinkFactor);
|
| - int expectedPageHeight = std::min<float>(documentRect.height(), pageSize.height() * maximumShrinkFactor);
|
| - FloatSize maxPageSize = m_frame->resizePageRectsKeepingRatio(FloatSize(originalPageSize.width(), originalPageSize.height()), FloatSize(expectedPageWidth, expectedPageHeight));
|
| + FloatSize expectedPageSize(std::min<float>(documentRect.width().toFloat(), pageSize.width() * maximumShrinkFactor), std::min<float>(documentRect.height().toFloat(), pageSize.height() * maximumShrinkFactor));
|
| + FloatSize maxPageSize = m_frame->resizePageRectsKeepingRatio(FloatSize(originalPageSize.width(), originalPageSize.height()), expectedPageSize);
|
| pageLogicalWidth = horizontalWritingMode ? maxPageSize.width() : maxPageSize.height();
|
| pageLogicalHeight = horizontalWritingMode ? maxPageSize.height() : maxPageSize.width();
|
|
|
|
|