[Chromium] Add a setting to control scaling content to fit viewport
authormnaganov@chromium.org <mnaganov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2013 13:53:30 +0000 (13:53 +0000)
committermnaganov@chromium.org <mnaganov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2013 13:53:30 +0000 (13:53 +0000)
commit76238bf42d23cd55a997ff427292cdd067b28fcc
tree17e536883165d4a3de67c6398ffb1ed7b5bc45ae
parent09c77c93f3341a3b08508eb95044fcb77ffbee2d
[Chromium] Add a setting to control scaling content to fit viewport
https://bugs.webkit.org/show_bug.cgi?id=109584

Adds a setting called 'initializeAtMinimumPageScale'. By default,
it is set to 'true' which corresponds to Chrome on Android behavior--
adjust the page scale to make the content fit into the viewport
by width. When set to false, the setting instructs ChromeClientImpl to
set page scale to 1.0, unless the scale value is set by the page
in the viewport meta-tag.

Reviewed by Adam Barth.

* public/WebSettings.h:
* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::dispatchViewportPropertiesDidChange):
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::WebSettingsImpl):
(WebKit::WebSettingsImpl::setInitializeAtMinimumPageScale):
(WebKit):
* src/WebSettingsImpl.h:
(WebSettingsImpl):
(WebKit::WebSettingsImpl::initializeAtMinimumPageScale):
* tests/WebFrameTest.cpp:
* tests/data/viewport-2x-initial-scale.html: Added.
* tests/data/viewport-auto-initial-scale.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/WebSettings.h
Source/WebKit/chromium/src/ChromeClientImpl.cpp
Source/WebKit/chromium/src/WebSettingsImpl.cpp
Source/WebKit/chromium/src/WebSettingsImpl.h
Source/WebKit/chromium/tests/WebFrameTest.cpp
Source/WebKit/chromium/tests/data/viewport-2x-initial-scale.html [new file with mode: 0644]
Source/WebKit/chromium/tests/data/viewport-auto-initial-scale.html [new file with mode: 0644]