Index: Source/web/PageScaleConstraintsSet.cpp |
diff --git a/Source/web/PageScaleConstraintsSet.cpp b/Source/web/PageScaleConstraintsSet.cpp |
index d8963d243aeb0ca5a44ee735ee4a0ef8007136bf..ebb42ad6bf2d33161e95de6df182eb7cc6157da9 100644 |
--- a/Source/web/PageScaleConstraintsSet.cpp |
+++ b/Source/web/PageScaleConstraintsSet.cpp |
@@ -142,15 +142,17 @@ void PageScaleConstraintsSet::didChangeViewSize(const IntSize& size) |
m_constraintsDirty = true; |
} |
-IntSize PageScaleConstraintsSet::mainFrameSize(const IntSize& contentsSize) const |
+IntSize PageScaleConstraintsSet::mainFrameSize(int contentWidthIncludingScrollbar) const |
{ |
// If there's no explicit minimum scale factor set, size the frame so that its width == content width |
// so there's no horizontal scrolling at the minimum scale. |
if (m_pageDefinedConstraints.minimumScale < finalConstraints().minimumScale |
&& m_userAgentConstraints.minimumScale < finalConstraints().minimumScale |
- && contentsSize.width() |
+ && contentWidthIncludingScrollbar |
&& m_viewSize.width()) { |
- return expandedIntSize(FloatSize(contentsSize.width(), computeHeightByAspectRatio(contentsSize.width(), m_viewSize))); |
+ return expandedIntSize(FloatSize( |
+ contentWidthIncludingScrollbar, |
+ computeHeightByAspectRatio(contentWidthIncludingScrollbar, m_viewSize))); |
} |
// If there is a minimum scale (or there's no content size yet), the frame size should match the viewport |