Add a mechanism to opt-out of the automatic scaling applied to not-really-responsive...
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 May 2015 20:42:49 +0000 (20:42 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 May 2015 20:42:49 +0000 (20:42 +0000)
commit4a9f365aed7d22ff7f6812a09b443e6a529f7626
tree3ffee56b2ab19c8bbe530d4e3a183db923e1bf6b
parent0711d3f4e557ddb91780fcbc0f9a85d577b28883
Add a mechanism to opt-out of the automatic scaling applied to not-really-responsive sites
https://bugs.webkit.org/show_bug.cgi?id=144760

Reviewed by Darin Adler.

Add a new viewport property, shrink-to-fit, which can be used to disable
the automatic scaling introduced in r181400. This provides sites with a
way to tell WebKit that they're really sure they want to be laid out at
window-width/height, even if they fail to fit within that size.

* dom/ViewportArguments.cpp:
(WebCore::ViewportArguments::resolve):
(WebCore::findBooleanValue):
(WebCore::setViewportFeature):
* dom/ViewportArguments.h:
(WebCore::ViewportArguments::ViewportArguments):
(WebCore::ViewportArguments::operator==):
* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints):
(WebCore::ViewportConfiguration::shouldIgnoreVerticalScalingConstraints):
(WebCore::ViewportConfiguration::webpageParameters):
(WebCore::ViewportConfiguration::textDocumentParameters):
(WebCore::ViewportConfiguration::imageDocumentParameters):
(WebCore::ViewportConfiguration::testingParameters):
(WebCore::booleanViewportArgumentIsSet):
(WebCore::ViewportConfiguration::updateConfiguration):
(WebCore::ViewportConfigurationTextStream::operator<<):
(WebCore::viewportArgumentUserZoomIsSet): Deleted.
* page/ViewportConfiguration.h:
(WebCore::ViewportConfiguration::Parameters::Parameters):
Plumb the shrink-to-fit viewport property through.
If shrink-to-fit is set to yes, or not set, we behave as usual; if it is
set to no, we will bail from shouldIgnore[Horizontal|Vertical]ScalingConstraints,
effectively disabling the automatic scaling introduced in r181400.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/ViewportArguments.cpp
Source/WebCore/dom/ViewportArguments.h
Source/WebCore/page/ViewportConfiguration.cpp
Source/WebCore/page/ViewportConfiguration.h