AX: Force allow user zoom
authorn_wang@apple.com <n_wang@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Mar 2016 03:57:52 +0000 (03:57 +0000)
committern_wang@apple.com <n_wang@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Mar 2016 03:57:52 +0000 (03:57 +0000)
commitdbee1cc03f4cf3a6a1b98350818ad1525974c890
tree00896c89b2ec2c2020e3ed5ea2c62c7b90d2210c
parent65c547553cf73c8eb5b96729a51d9ded3331cbba
AX: Force allow user zoom
https://bugs.webkit.org/show_bug.cgi?id=155056

Reviewed by Simon Fraser.

Source/WebCore:

Override the maximum/minimum scale factor when forceAlwaysUserScalable is true.

Test: fast/viewport/ios/force-always-user-scalable.html

* Configurations/WebCoreTestSupport.xcconfig:
* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::minimumScale):
* page/ViewportConfiguration.h:
(WebCore::ViewportConfiguration::maximumScale):
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::Internals):
(WebCore::Internals::composedTreeAsText):
(WebCore::Internals::setViewportForceAlwaysUserScalable):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit2:

Linked libAccessibility library so that we can observe the accessibility
setting change for the force always user scalable feature.

* Configurations/WebKit.xcconfig:
* UIProcess/API/Cocoa/WKWebView.mm:
(shouldAllowPictureInPictureMediaPlayback):
(forceAlwaysUserScalableChangedCallback):
(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView dealloc]):
(-[WKWebView _navigationGestureDidEnd]):
(-[WKWebView _updateForceAlwaysUserScalable]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSize):
(WebKit::WebPageProxy::updateForceAlwaysUserScalable):
(WebKit::WebPageProxy::setMaximumUnobscuredSize):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::disableInspectorNodeSearch):
(WebKit::WebPage::updateForceAlwaysUserScalable):
(WebKit::innerFrameQuad):

LayoutTests:

* fast/viewport/ios/force-always-user-scalable-expected.txt: Added.
* fast/viewport/ios/force-always-user-scalable.html: Added.
* platform/ios-simulator-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@197986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/viewport/ios/force-always-user-scalable-expected.txt [new file with mode: 0644]
LayoutTests/fast/viewport/ios/force-always-user-scalable.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator-wk2/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/Configurations/WebCoreTestSupport.xcconfig
Source/WebCore/page/ViewportConfiguration.cpp
Source/WebCore/page/ViewportConfiguration.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit2/ChangeLog
Source/WebKit2/Configurations/WebKit.xcconfig
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm