<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[197766] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/197766">197766</a></dd>
<dt>Author</dt> <dd>n_wang@apple.com</dd>
<dt>Date</dt> <dd>2016-03-08 08:13:12 -0800 (Tue, 08 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>AX: Force allow user zoom
https://bugs.webkit.org/show_bug.cgi?id=155056

Reviewed by Chris Fleizach.

Source/WebCore:

Override the maximum scale factor when forceAlwaysUserScalable is true.

Test: accessibility/ios-simulator/force-user-scalable.html

* page/ViewportConfiguration.h:
(WebCore::ViewportConfiguration::maximumScale):
* testing/Internals.cpp:
(WebCore::Internals::composedTreeAsText):
(WebCore::Internals::setViewportForceAlwaysUserScalable):
(WebCore::Internals::viewportConfigurationMaximumScale):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit2:

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

* WebProcess/WebPage/WebPage.cpp:
(WebKit::forceAlwaysUserScalableChangedCallback):
(WebKit::WebPage::create):
(WebKit::m_shouldDispatchFakeMouseMoveEvents):
(WebKit::WebPage::~WebPage):
(WebKit::WebPage::preferencesDidChange):
(WebKit::WebPage::updateForceAlwaysUserScalable):
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/WebPage.h:

LayoutTests:

* accessibility/ios-simulator/force-user-scalable-expected.txt: Added.
* accessibility/ios-simulator/force-user-scalable.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageViewportConfigurationh">trunk/Source/WebCore/page/ViewportConfiguration.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsh">trunk/Source/WebCore/testing/Internals.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsidl">trunk/Source/WebCore/testing/Internals.idl</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsaccessibilityiossimulatorforceuserscalableexpectedtxt">trunk/LayoutTests/accessibility/ios-simulator/force-user-scalable-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilityiossimulatorforceuserscalablehtml">trunk/LayoutTests/accessibility/ios-simulator/force-user-scalable.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (197765 => 197766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-03-08 15:14:54 UTC (rev 197765)
+++ trunk/LayoutTests/ChangeLog        2016-03-08 16:13:12 UTC (rev 197766)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-03-08  Nan Wang  &lt;n_wang@apple.com&gt;
+
+        AX: Force allow user zoom
+        https://bugs.webkit.org/show_bug.cgi?id=155056
+
+        Reviewed by Chris Fleizach.
+
+        * accessibility/ios-simulator/force-user-scalable-expected.txt: Added.
+        * accessibility/ios-simulator/force-user-scalable.html: Added.
+
</ins><span class="cx"> 2016-03-08  Andreas Kling  &lt;akling@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         ImageDocuments leak their world.
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilityiossimulatorforceuserscalableexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/ios-simulator/force-user-scalable-expected.txt (0 => 197766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/ios-simulator/force-user-scalable-expected.txt                                (rev 0)
+++ trunk/LayoutTests/accessibility/ios-simulator/force-user-scalable-expected.txt        2016-03-08 16:13:12 UTC (rev 197766)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+This tests that when we set force always user scalable, the maximum scale will be changed too.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS window.internals.viewportConfigurationMaximumScale() is 10
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsaccessibilityiossimulatorforceuserscalablehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/ios-simulator/force-user-scalable.html (0 => 197766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/ios-simulator/force-user-scalable.html                                (rev 0)
+++ trunk/LayoutTests/accessibility/ios-simulator/force-user-scalable.html        2016-03-08 16:13:12 UTC (rev 197766)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+var successfullyParsed = false;
+&lt;/script&gt;
+&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, user-scalable=no, maximum-scale=3, minimum-scale=1&quot;&gt;
+&lt;/head&gt;
+&lt;body id=&quot;body&quot;&gt;
+
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+
+    description(&quot;This tests that when we set force always user scalable, the maximum scale will be changed too.&quot;);
+
+    if (window.accessibilityController) {
+        window.internals.setViewportForceAlwaysUserScalable(true);
+        shouldBe(&quot;window.internals.viewportConfigurationMaximumScale()&quot;, &quot;10&quot;);
+    }
+    
+    successfullyParsed = true;
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (197765 => 197766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-03-08 15:14:54 UTC (rev 197765)
+++ trunk/Source/WebCore/ChangeLog        2016-03-08 16:13:12 UTC (rev 197766)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2016-03-08  Nan Wang  &lt;n_wang@apple.com&gt;
+
+        AX: Force allow user zoom
+        https://bugs.webkit.org/show_bug.cgi?id=155056
+
+        Reviewed by Chris Fleizach.
+
+        Override the maximum scale factor when forceAlwaysUserScalable is true.
+
+        Test: accessibility/ios-simulator/force-user-scalable.html
+
+        * page/ViewportConfiguration.h:
+        (WebCore::ViewportConfiguration::maximumScale):
+        * testing/Internals.cpp:
+        (WebCore::Internals::composedTreeAsText):
+        (WebCore::Internals::setViewportForceAlwaysUserScalable):
+        (WebCore::Internals::viewportConfigurationMaximumScale):
+        * testing/Internals.h:
+        * testing/Internals.idl:
+
</ins><span class="cx"> 2016-03-08  Andreas Kling  &lt;akling@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         ImageDocuments leak their world.
</span></span></pre></div>
<a id="trunkSourceWebCorepageViewportConfigurationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ViewportConfiguration.h (197765 => 197766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ViewportConfiguration.h        2016-03-08 15:14:54 UTC (rev 197765)
+++ trunk/Source/WebCore/page/ViewportConfiguration.h        2016-03-08 16:13:12 UTC (rev 197766)
</span><span class="lines">@@ -33,6 +33,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+static const double forceAlwaysUserScalableMaximumScale = 10.0;
+
</ins><span class="cx"> class TextStream;
</span><span class="cx"> 
</span><span class="cx"> class ViewportConfiguration {
</span><span class="lines">@@ -88,7 +90,7 @@
</span><span class="cx">     WEBCORE_EXPORT double initialScale() const;
</span><span class="cx">     WEBCORE_EXPORT double initialScaleIgnoringContentSize() const;
</span><span class="cx">     WEBCORE_EXPORT double minimumScale() const;
</span><del>-    double maximumScale() const { return m_configuration.maximumScale; }
</del><ins>+    double maximumScale() const { return m_forceAlwaysUserScalable ? forceAlwaysUserScalableMaximumScale : m_configuration.maximumScale; }
</ins><span class="cx">     WEBCORE_EXPORT bool allowsUserScaling() const;
</span><span class="cx">     bool allowsShrinkToFit() const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (197765 => 197766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2016-03-08 15:14:54 UTC (rev 197765)
+++ trunk/Source/WebCore/testing/Internals.cpp        2016-03-08 16:13:12 UTC (rev 197766)
</span><span class="lines">@@ -3518,4 +3518,22 @@
</span><span class="cx">     return WebCore::composedTreeAsText(downcast&lt;ContainerNode&gt;(*node));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Internals::setViewportForceAlwaysUserScalable(bool forceAlwaysUserScalableEnabled)
+{
+#if PLATFORM(IOS) || PLATFORM(MAC)
+    m_viewportConfiguration.setForceAlwaysUserScalable(forceAlwaysUserScalableEnabled);
+#else
+    UNUSED_PARAM(forceAlwaysUserScalableEnabled);
+#endif
</ins><span class="cx"> }
</span><ins>+
+double Internals::viewportConfigurationMaximumScale()
+{
+#if PLATFORM(IOS) || PLATFORM(MAC)
+    return m_viewportConfiguration.maximumScale();
+#else
+    return 0;
+#endif
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.h (197765 => 197766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.h        2016-03-08 15:14:54 UTC (rev 197765)
+++ trunk/Source/WebCore/testing/Internals.h        2016-03-08 16:13:12 UTC (rev 197766)
</span><span class="lines">@@ -39,6 +39,10 @@
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS) || PLATFORM(MAC)
+#include &quot;ViewportConfiguration.h&quot;
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class AudioContext;
</span><span class="lines">@@ -476,6 +480,9 @@
</span><span class="cx"> 
</span><span class="cx">     String composedTreeAsText(Node*);
</span><span class="cx"> 
</span><ins>+    void setViewportForceAlwaysUserScalable(bool);
+    double viewportConfigurationMaximumScale();
+
</ins><span class="cx"> private:
</span><span class="cx">     explicit Internals(Document*);
</span><span class="cx">     Document* contextDocument() const;
</span><span class="lines">@@ -484,6 +491,9 @@
</span><span class="cx">     RenderedDocumentMarker* markerAt(Node*, const String&amp; markerType, unsigned index, ExceptionCode&amp;);
</span><span class="cx"> 
</span><span class="cx">     std::unique_ptr&lt;InspectorStubFrontend&gt; m_inspectorFrontend;
</span><ins>+#if PLATFORM(IOS) || PLATFORM(MAC)
+    ViewportConfiguration m_viewportConfiguration;
+#endif
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.idl (197765 => 197766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.idl        2016-03-08 15:14:54 UTC (rev 197765)
+++ trunk/Source/WebCore/testing/Internals.idl        2016-03-08 16:13:12 UTC (rev 197766)
</span><span class="lines">@@ -443,4 +443,7 @@
</span><span class="cx">     [RaisesException] void setCanShowModalDialogOverride(boolean allow);
</span><span class="cx"> 
</span><span class="cx">     DOMString composedTreeAsText(Node parent);
</span><ins>+
+    void setViewportForceAlwaysUserScalable(boolean enable);
+    double viewportConfigurationMaximumScale();
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (197765 => 197766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-03-08 15:14:54 UTC (rev 197765)
+++ trunk/Source/WebKit2/ChangeLog        2016-03-08 16:13:12 UTC (rev 197766)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2016-03-08  Nan Wang  &lt;n_wang@apple.com&gt;
+
+        AX: Force allow user zoom
+        https://bugs.webkit.org/show_bug.cgi?id=155056
+
+        Reviewed by Chris Fleizach.
+
+        Soft linked libAccessibility library so that we can observe the accessibility
+        setting change for the force always user scalable feature.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::forceAlwaysUserScalableChangedCallback):
+        (WebKit::WebPage::create):
+        (WebKit::m_shouldDispatchFakeMouseMoveEvents):
+        (WebKit::WebPage::~WebPage):
+        (WebKit::WebPage::preferencesDidChange):
+        (WebKit::WebPage::updateForceAlwaysUserScalable):
+        (WebKit::WebPage::updatePreferences):
+        * WebProcess/WebPage/WebPage.h:
+
</ins><span class="cx"> 2016-03-08  Csaba Osztrogonác  &lt;ossy@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         One more unreviewed speculative buildfix after r197728.
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (197765 => 197766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-03-08 15:14:54 UTC (rev 197765)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-03-08 16:13:12 UTC (rev 197766)
</span><span class="lines">@@ -210,8 +210,17 @@
</span><span class="cx"> #include &lt;CoreGraphics/CoreGraphics.h&gt;
</span><span class="cx"> #include &lt;WebCore/CoreTextSPI.h&gt;
</span><span class="cx"> #include &lt;WebCore/Icon.h&gt;
</span><ins>+
+#if __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 100000
+#include &lt;WebCore/SoftLinking.h&gt;
+SOFT_LINK_LIBRARY(libAccessibility)
+SOFT_LINK(libAccessibility, _AXSForceAllowWebScaling, Boolean, (), ())
+SOFT_LINK_CONSTANT(libAccessibility, kAXSAllowForceWebScalingEnabledNotification, CFStringRef)
+#define kAXSAllowForceWebScalingEnabledNotification getkAXSAllowForceWebScalingEnabledNotification()
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#endif
+
</ins><span class="cx"> #ifndef NDEBUG
</span><span class="cx"> #include &lt;wtf/RefCountedLeakCounter.h&gt;
</span><span class="cx"> #endif
</span><span class="lines">@@ -261,6 +270,15 @@
</span><span class="cx"> 
</span><span class="cx"> DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, webPageCounter, (&quot;WebPage&quot;));
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 100000
+static void forceAlwaysUserScalableChangedCallback(CFNotificationCenterRef, void* observer, CFStringRef, const void*, CFDictionaryRef)
+{
+    ASSERT(observer);
+    static_cast&lt;WebPage*&gt;(observer)-&gt;updateForceAlwaysUserScalable();
+}
+#endif
+
+    
</ins><span class="cx"> Ref&lt;WebPage&gt; WebPage::create(uint64_t pageID, const WebPageCreationParameters&amp; parameters)
</span><span class="cx"> {
</span><span class="cx">     Ref&lt;WebPage&gt; page = adoptRef(*new WebPage(pageID, parameters));
</span><span class="lines">@@ -546,7 +564,10 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     m_page-&gt;settings().setContentDispositionAttachmentSandboxEnabled(true);
</span><ins>+#if __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 100000
+    CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), this, forceAlwaysUserScalableChangedCallback, kAXSAllowForceWebScalingEnabledNotification, 0, CFNotificationSuspensionBehaviorDeliverImmediately);
</ins><span class="cx"> #endif
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPage::reinitializeWebPage(const WebPageCreationParameters&amp; parameters)
</span><span class="lines">@@ -578,6 +599,10 @@
</span><span class="cx"> 
</span><span class="cx"> WebPage::~WebPage()
</span><span class="cx"> {
</span><ins>+#if PLATFORM(IOS) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 100000
+    CFNotificationCenterRemoveObserver(CFNotificationCenterGetLocalCenter(), this, nullptr, nullptr);
+#endif
+    
</ins><span class="cx">     if (m_backForwardList)
</span><span class="cx">         m_backForwardList-&gt;detach();
</span><span class="cx"> 
</span><span class="lines">@@ -2798,6 +2823,17 @@
</span><span class="cx">     updatePreferences(store);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+void WebPage::updateForceAlwaysUserScalable()
+{
+    bool forceAlwaysUserScalableEnabled = m_forceAlwaysUserScalable;
+#if __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 100000
+    forceAlwaysUserScalableEnabled |= _AXSForceAllowWebScaling();
+#endif
+    m_viewportConfiguration.setForceAlwaysUserScalable(forceAlwaysUserScalableEnabled);
+}
+#endif
+
</ins><span class="cx"> void WebPage::updatePreferences(const WebPreferencesStore&amp; store)
</span><span class="cx"> {
</span><span class="cx">     Settings&amp; settings = m_page-&gt;settings();
</span><span class="lines">@@ -3071,7 +3107,8 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     m_ignoreViewportScalingConstraints = store.getBoolValueForKey(WebPreferencesKey::ignoreViewportScalingConstraintsKey());
</span><span class="cx">     m_viewportConfiguration.setCanIgnoreScalingConstraints(m_ignoreViewportScalingConstraints);
</span><del>-    m_viewportConfiguration.setForceAlwaysUserScalable(store.getBoolValueForKey(WebPreferencesKey::forceAlwaysUserScalableKey()));
</del><ins>+    m_forceAlwaysUserScalable = store.getBoolValueForKey(WebPreferencesKey::forceAlwaysUserScalableKey());
+    updateForceAlwaysUserScalable();
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (197765 => 197766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2016-03-08 15:14:54 UTC (rev 197765)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2016-03-08 16:13:12 UTC (rev 197766)
</span><span class="lines">@@ -931,6 +931,10 @@
</span><span class="cx"> 
</span><span class="cx">     bool isControlledByAutomation() const;
</span><span class="cx">     void setControlledByAutomation(bool);
</span><ins>+    
+#if PLATFORM(IOS)
+    void updateForceAlwaysUserScalable();
+#endif
</ins><span class="cx"> 
</span><span class="cx">     void insertNewlineInQuotedContent();
</span><span class="cx"> 
</span><span class="lines">@@ -1439,6 +1443,10 @@
</span><span class="cx">     bool m_inputMethodEnabled { false };
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    bool m_forceAlwaysUserScalable { false };
+#endif
+
</ins><span class="cx"> #if ENABLE(VIDEO) &amp;&amp; USE(GSTREAMER)
</span><span class="cx">     RefPtr&lt;WebCore::MediaPlayerRequestInstallMissingPluginsCallback&gt; m_installMediaPluginsCallback;
</span><span class="cx"> #endif
</span></span></pre>
</div>
</div>

</body>
</html>