From ce6b85c51d254b2e1b7ed025fe86f23a20e2ef12 Mon Sep 17 00:00:00 2001 From: Changhyup Jwa Date: Wed, 4 Sep 2013 11:34:11 +0900 Subject: [PATCH] Fitting by contents' width only [Title] Fitting by contents' width only [Issue#] WGL-269 [Problem] Horizontal scroll on landscape contents [Cause] Minimum scale factor is calculated by both horizontal and vertical contents' size [Solution] Calculate minimum scale factor with horizontal contents' size only Change-Id: Iffc1901445f49469a9478fb7b35ae12aab6202d1 --- Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp b/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp index 16e49cf..10e367a 100755 --- a/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp +++ b/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp @@ -262,13 +262,7 @@ double PageClientImpl::availableMinimumScale() // minimum scale factor shouldn't be smaller than 0.25(minimum zoom level) IntSize contentsSize = m_viewImpl->page()->contentsSize(); double horizontalMinScale = max(((double)viewSize().width() / contentsSize.width()), 0.25); - double verticalMinScale = max(((double)viewSize().height() / contentsSize.height()), 0.25); - // If there's only a bit ignorable difference between horizontalMinScale and verticalMinScale, - // ignore verticalMinScale to fit content's width to view - const double ignorableThreshold = 0.01; - if (fabs(horizontalMinScale - verticalMinScale) < ignorableThreshold) - verticalMinScale = horizontalMinScale; - return min(max(horizontalMinScale, verticalMinScale), m_viewportConstraints.maximumScale); + return horizontalMinScale; } void PageClientImpl::fitViewportToContent() -- 2.7.4