Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(580)

Unified Diff: Source/web/PageScaleConstraintsSet.cpp

Issue 686293003: FrameView's size should be calculated based on contentWidth+scrollbarWidth (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/PageScaleConstraintsSet.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/web/PageScaleConstraintsSet.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698