Index: Source/core/frame/FrameView.cpp |
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp |
index 99b2e7368871438fa3af58c19e8cf1e0cb84e63c..68e005fe1d516a3a71ff5b3027234aa44a5ef7e6 100644 |
--- a/Source/core/frame/FrameView.cpp |
+++ b/Source/core/frame/FrameView.cpp |
@@ -2865,9 +2865,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); |
leviw_travelin_and_unemployed
2014/03/18 19:26:30
This is actually a change in behavior (we'd floor
|
pageLogicalWidth = horizontalWritingMode ? maxPageSize.width() : maxPageSize.height(); |
pageLogicalHeight = horizontalWritingMode ? maxPageSize.height() : maxPageSize.width(); |