[Qt] Implement fit-to-width behaviour
authorkenneth@webkit.org <kenneth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 May 2012 12:20:04 +0000 (12:20 +0000)
committerkenneth@webkit.org <kenneth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 May 2012 12:20:04 +0000 (12:20 +0000)
commitbd3a61301c2e9eef9ddc41b3a7d1c26b1ac28d57
tree26d53a77b78643eb7543f6a0b8c30692ecf8171d
parent8c941694108adbe48c1b9fef976893baf3084dda
[Qt] Implement fit-to-width behaviour
https://bugs.webkit.org/show_bug.cgi?id=86085

Reviewed by Simon Hausmann.

Source/WebCore:

Add a method to get the minimum scale factor that contains the content
without showing any chrome background.

* dom/ViewportArguments.cpp:
(WebCore::computeMinimumScaleFactorForContentContained):
(WebCore):
* dom/ViewportArguments.h:
(WebCore):

Source/WebKit2:

We don't restrict the minimum scale to the layout viewport anymore,
but instead update the minimum scale when the content size changes.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::didChangeViewportProperties):
(QQuickWebViewFlickablePrivate::didChangeContentsSize):
* UIProcess/API/qt/qwebviewportinfo.cpp:
(QWebViewportInfo::minimumScale):
(QWebViewportInfo::maximumScale):
* UIProcess/qt/QtViewportInteractionEngine.h:
(QtViewportInteractionEngine):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@116632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/ViewportArguments.cpp
Source/WebCore/dom/ViewportArguments.h
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
Source/WebKit2/UIProcess/API/qt/qwebviewportinfo.cpp
Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.h