<!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>[194297] branches/safari-601.1.46-branch</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/194297">194297</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2015-12-18 15:05:55 -0800 (Fri, 18 Dec 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/194246">r194246</a>. rdar://problem/23824469</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari601146branchLayoutTestsChangeLog">branches/safari-601.1.46-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2ChangeLog">branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2SharedVisibleContentRectUpdateInfocpp">branches/safari-601.1.46-branch/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2SharedVisibleContentRectUpdateInfoh">branches/safari-601.1.46-branch/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessAPICocoaWKWebViewmm">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessAPICocoaWKWebViewPrivateh">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessWebPageProxyh">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessiosWKContentViewmm">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentView.mm</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessiosWebPageProxyIOSmm">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2WebProcessWebPageWebPagecpp">branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2WebProcessWebPageWebPageh">branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2WebProcessWebPageiosWebPageIOSmm">branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari601146branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/LayoutTests/ChangeLog (194296 => 194297)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/ChangeLog        2015-12-18 23:05:50 UTC (rev 194296)
+++ branches/safari-601.1.46-branch/LayoutTests/ChangeLog        2015-12-18 23:05:55 UTC (rev 194297)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2015-12-18  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
+        Merge r194246. rdar://problem/23824469
+
+    2015-12-17  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+            Disable viewport &quot;shrink to fit&quot; outside of multitasking mode
+            https://bugs.webkit.org/show_bug.cgi?id=152403
+            rdar://problem/23818102
+
+            Reviewed by Tim Horton.
+
+            This test no longer does shrink-to-fit, so starts with a min and initial scale of 1.
+
+            * fast/viewport/ios/width-is-device-width-overflowing-expected.txt:
+
</ins><span class="cx"> 2015-12-17  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r191076. rdar://problem/23941411
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog (194296 => 194297)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog        2015-12-18 23:05:50 UTC (rev 194296)
+++ branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog        2015-12-18 23:05:55 UTC (rev 194297)
</span><span class="lines">@@ -1,5 +1,48 @@
</span><span class="cx"> 2015-12-18  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r194246. rdar://problem/23824469
+
+    2015-12-17  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+            Disable viewport &quot;shrink to fit&quot; outside of multitasking mode
+            https://bugs.webkit.org/show_bug.cgi?id=152403
+            rdar://problem/23818102
+
+            Reviewed by Tim Horton.
+
+            Plumb through a value that indicates whether the WKWebView is in split screen,
+            and use it to conditionally enable shrink-to-fit mode only in split screen.
+
+            * Shared/VisibleContentRectUpdateInfo.cpp: Added m_allowShrinkToFit, and sort
+            the member variables, and encoding order, to optimize packing, with some initializers.
+            (WebKit::VisibleContentRectUpdateInfo::encode):
+            (WebKit::VisibleContentRectUpdateInfo::decode):
+            * Shared/VisibleContentRectUpdateInfo.h:
+            (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
+            (WebKit::VisibleContentRectUpdateInfo::allowShrinkToFit):
+            (WebKit::operator==):
+            * UIProcess/API/Cocoa/WKWebView.mm: Add _allowsViewportShrinkToFit member variable,
+            with getter and setter.
+            (-[WKWebView _updateVisibleContentRects]): Unwrap the line.
+            (-[WKWebView _setAllowsViewportShrinkToFit:]):
+            (-[WKWebView _allowsViewportShrinkToFit]):
+            * UIProcess/API/Cocoa/WKWebViewPrivate.h: _allowsViewportShrinkToFit SPI.
+            * UIProcess/WebPageProxy.h: Pass allowShrinkToFit through.
+            * UIProcess/ios/WKContentView.mm: Ditto.
+            (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
+            * UIProcess/ios/WebPageProxyIOS.mm:
+            (WebKit::WebPageProxy::updateVisibleContentRects): Padd allowShrinkToFit to the web process via the VisibleContentRectUpdateInfo.
+            * WebProcess/WebPage/WebPage.cpp:
+            (WebKit::WebPage::updatePreferences): Store m_ignoreViewportScalingConstraints in a member variable since we can't
+            get back to the prefs later.
+            * WebProcess/WebPage/WebPage.h:
+            * WebProcess/WebPage/ios/WebPageIOS.mm:
+            (WebKit::WebPage::updateVisibleContentRects): This is the behavior change: call setCanIgnoreScalingConstraints()
+            on the viewport configuration, consulting the pref (via m_ignoreViewportScalingConstraints) and the new
+            visibleContentRectUpdateInfo.allowShrinkToFit().
+
+2015-12-18  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r194206. rdar://problem/23824469
</span><span class="cx"> 
</span><span class="cx">     2015-12-16  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2SharedVisibleContentRectUpdateInfocpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp (194296 => 194297)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp        2015-12-18 23:05:50 UTC (rev 194296)
+++ branches/safari-601.1.46-branch/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp        2015-12-18 23:05:55 UTC (rev 194297)
</span><span class="lines">@@ -36,14 +36,15 @@
</span><span class="cx">     encoder &lt;&lt; m_unobscuredRect;
</span><span class="cx">     encoder &lt;&lt; m_unobscuredRectInScrollViewCoordinates;
</span><span class="cx">     encoder &lt;&lt; m_customFixedPositionRect;
</span><ins>+    encoder &lt;&lt; m_lastLayerTreeTransactionID;
</ins><span class="cx">     encoder &lt;&lt; m_scale;
</span><del>-    encoder &lt;&lt; m_inStableState;
-    encoder &lt;&lt; m_isChangingObscuredInsetsInteractively;
</del><span class="cx">     encoder &lt;&lt; m_timestamp;
</span><span class="cx">     encoder &lt;&lt; m_horizontalVelocity;
</span><span class="cx">     encoder &lt;&lt; m_verticalVelocity;
</span><span class="cx">     encoder &lt;&lt; m_scaleChangeRate;
</span><del>-    encoder &lt;&lt; m_lastLayerTreeTransactionID;
</del><ins>+    encoder &lt;&lt; m_inStableState;
+    encoder &lt;&lt; m_isChangingObscuredInsetsInteractively;
+    encoder &lt;&lt; m_allowShrinkToFit;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool VisibleContentRectUpdateInfo::decode(IPC::ArgumentDecoder&amp; decoder, VisibleContentRectUpdateInfo&amp; result)
</span><span class="lines">@@ -56,12 +57,10 @@
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(result.m_customFixedPositionRect))
</span><span class="cx">         return false;
</span><ins>+    if (!decoder.decode(result.m_lastLayerTreeTransactionID))
+        return false;
</ins><span class="cx">     if (!decoder.decode(result.m_scale))
</span><span class="cx">         return false;
</span><del>-    if (!decoder.decode(result.m_inStableState))
-        return false;
-    if (!decoder.decode(result.m_isChangingObscuredInsetsInteractively))
-        return false;
</del><span class="cx">     if (!decoder.decode(result.m_timestamp))
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(result.m_horizontalVelocity))
</span><span class="lines">@@ -70,8 +69,12 @@
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(result.m_scaleChangeRate))
</span><span class="cx">         return false;
</span><del>-    if (!decoder.decode(result.m_lastLayerTreeTransactionID))
</del><ins>+    if (!decoder.decode(result.m_inStableState))
</ins><span class="cx">         return false;
</span><ins>+    if (!decoder.decode(result.m_isChangingObscuredInsetsInteractively))
+        return false;
+    if (!decoder.decode(result.m_allowShrinkToFit))
+        return false;
</ins><span class="cx"> 
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2SharedVisibleContentRectUpdateInfoh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h (194296 => 194297)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h        2015-12-18 23:05:50 UTC (rev 194296)
+++ branches/safari-601.1.46-branch/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h        2015-12-18 23:05:55 UTC (rev 194297)
</span><span class="lines">@@ -37,27 +37,22 @@
</span><span class="cx"> 
</span><span class="cx"> class VisibleContentRectUpdateInfo {
</span><span class="cx"> public:
</span><del>-    VisibleContentRectUpdateInfo()
-        : m_scale(-1)
-        , m_inStableState(false)
-        , m_isChangingObscuredInsetsInteractively(false)
-        , m_lastLayerTreeTransactionID(0)
-    {
-    }
</del><ins>+    VisibleContentRectUpdateInfo() = default;
</ins><span class="cx"> 
</span><del>-    VisibleContentRectUpdateInfo(const WebCore::FloatRect&amp; exposedRect, const WebCore::FloatRect&amp; unobscuredRect, const WebCore::FloatRect&amp; unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect&amp; customFixedPositionRect, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate, uint64_t lastLayerTreeTransactionId)
</del><ins>+    VisibleContentRectUpdateInfo(const WebCore::FloatRect&amp; exposedRect, const WebCore::FloatRect&amp; unobscuredRect, const WebCore::FloatRect&amp; unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect&amp; customFixedPositionRect, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate, uint64_t lastLayerTreeTransactionId)
</ins><span class="cx">         : m_exposedRect(exposedRect)
</span><span class="cx">         , m_unobscuredRect(unobscuredRect)
</span><span class="cx">         , m_unobscuredRectInScrollViewCoordinates(unobscuredRectInScrollViewCoordinates)
</span><span class="cx">         , m_customFixedPositionRect(customFixedPositionRect)
</span><ins>+        , m_lastLayerTreeTransactionID(lastLayerTreeTransactionId)
</ins><span class="cx">         , m_scale(scale)
</span><del>-        , m_inStableState(inStableState)
-        , m_isChangingObscuredInsetsInteractively(isChangingObscuredInsetsInteractively)
</del><span class="cx">         , m_timestamp(timestamp)
</span><span class="cx">         , m_horizontalVelocity(horizontalVelocity)
</span><span class="cx">         , m_verticalVelocity(verticalVelocity)
</span><span class="cx">         , m_scaleChangeRate(scaleChangeRate)
</span><del>-        , m_lastLayerTreeTransactionID(lastLayerTreeTransactionId)
</del><ins>+        , m_inStableState(inStableState)
+        , m_isChangingObscuredInsetsInteractively(isChangingObscuredInsetsInteractively)
+        , m_allowShrinkToFit(allowShrinkToFit)
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -68,6 +63,7 @@
</span><span class="cx">     double scale() const { return m_scale; }
</span><span class="cx">     bool inStableState() const { return m_inStableState; }
</span><span class="cx">     bool isChangingObscuredInsetsInteractively() const { return m_isChangingObscuredInsetsInteractively; }
</span><ins>+    bool allowShrinkToFit() const { return m_allowShrinkToFit; }
</ins><span class="cx"> 
</span><span class="cx">     double timestamp() const { return m_timestamp; }
</span><span class="cx">     double horizontalVelocity() const { return m_horizontalVelocity; }
</span><span class="lines">@@ -84,14 +80,15 @@
</span><span class="cx">     WebCore::FloatRect m_unobscuredRect;
</span><span class="cx">     WebCore::FloatRect m_unobscuredRectInScrollViewCoordinates;
</span><span class="cx">     WebCore::FloatRect m_customFixedPositionRect;
</span><del>-    double m_scale;
-    bool m_inStableState;
-    bool m_isChangingObscuredInsetsInteractively;
-    double m_timestamp;
-    double m_horizontalVelocity;
-    double m_verticalVelocity;
-    double m_scaleChangeRate;
-    uint64_t m_lastLayerTreeTransactionID;
</del><ins>+    uint64_t m_lastLayerTreeTransactionID { 0 };
+    double m_scale { -1 };
+    double m_timestamp { 0 };
+    double m_horizontalVelocity { 0 };
+    double m_verticalVelocity { 0 };
+    double m_scaleChangeRate { 0 };
+    bool m_inStableState { false };
+    bool m_isChangingObscuredInsetsInteractively { false };
+    bool m_allowShrinkToFit { false };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> inline bool operator==(const VisibleContentRectUpdateInfo&amp; a, const VisibleContentRectUpdateInfo&amp; b)
</span><span class="lines">@@ -104,7 +101,8 @@
</span><span class="cx">         &amp;&amp; a.horizontalVelocity() == b.horizontalVelocity()
</span><span class="cx">         &amp;&amp; a.verticalVelocity() == b.verticalVelocity()
</span><span class="cx">         &amp;&amp; a.scaleChangeRate() == b.scaleChangeRate()
</span><del>-        &amp;&amp; a.inStableState() == b.inStableState();
</del><ins>+        &amp;&amp; a.inStableState() == b.inStableState()
+        &amp;&amp; a.allowShrinkToFit() == b.allowShrinkToFit();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (194296 => 194297)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2015-12-18 23:05:50 UTC (rev 194296)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2015-12-18 23:05:55 UTC (rev 194297)
</span><span class="lines">@@ -182,6 +182,8 @@
</span><span class="cx"> 
</span><span class="cx">     UIInterfaceOrientation _interfaceOrientationOverride;
</span><span class="cx">     BOOL _overridesInterfaceOrientation;
</span><ins>+    
+    BOOL _allowsViewportShrinkToFit;
</ins><span class="cx"> 
</span><span class="cx">     BOOL _hasCommittedLoadForMainFrame;
</span><span class="cx">     BOOL _needsResetViewStateAfterCommitLoadForMainFrame;
</span><span class="lines">@@ -1711,7 +1713,8 @@
</span><span class="cx">         unobscuredRect:unobscuredRectInContentCoordinates
</span><span class="cx">         unobscuredRectInScrollViewCoordinates:unobscuredRect
</span><span class="cx">         scale:scaleFactor minimumScale:[_scrollView minimumZoomScale]
</span><del>-        inStableState:isStableState isChangingObscuredInsetsInteractively:_isChangingObscuredInsetsInteractively];
</del><ins>+        inStableState:isStableState
+        isChangingObscuredInsetsInteractively:_isChangingObscuredInsetsInteractively];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_didFinishLoadForMainFrame
</span><span class="lines">@@ -2792,6 +2795,16 @@
</span><span class="cx">     return _page-&gt;backgroundExtendsBeyondPage();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)_setAllowsViewportShrinkToFit:(BOOL)allowShrinkToFit
+{
+    _allowsViewportShrinkToFit = allowShrinkToFit;
+}
+
+- (BOOL)_allowsViewportShrinkToFit
+{
+    return _allowsViewportShrinkToFit;
+}
+
</ins><span class="cx"> - (void)_beginInteractiveObscuredInsetsChange
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!_isChangingObscuredInsetsInteractively);
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessAPICocoaWKWebViewPrivateh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h (194296 => 194297)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h        2015-12-18 23:05:50 UTC (rev 194296)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h        2015-12-18 23:05:55 UTC (rev 194297)
</span><span class="lines">@@ -118,6 +118,8 @@
</span><span class="cx"> // in the update block.
</span><span class="cx"> @property (nonatomic, setter=_setInterfaceOrientationOverride:) UIInterfaceOrientation _interfaceOrientationOverride;
</span><span class="cx"> 
</span><ins>+@property (nonatomic, setter=_setAllowsViewportShrinkToFit:) BOOL _allowsViewportShrinkToFit;
+
</ins><span class="cx"> @property (nonatomic, setter=_setBackgroundExtendsBeyondPage:) BOOL _backgroundExtendsBeyondPage;
</span><span class="cx"> 
</span><span class="cx"> // FIXME: Remove these three properties once we expose WKWebViewContentProvider as API.
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/WebPageProxy.h (194296 => 194297)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2015-12-18 23:05:50 UTC (rev 194296)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2015-12-18 23:05:55 UTC (rev 194297)
</span><span class="lines">@@ -459,7 +459,7 @@
</span><span class="cx">     const WebCore::FloatRect&amp; exposedContentRect() const { return m_lastVisibleContentRectUpdate.exposedRect(); }
</span><span class="cx">     const WebCore::FloatRect&amp; unobscuredContentRect() const { return m_lastVisibleContentRectUpdate.unobscuredRect(); }
</span><span class="cx"> 
</span><del>-    void updateVisibleContentRects(const WebCore::FloatRect&amp; exposedRect, const WebCore::FloatRect&amp; unobscuredRect, const WebCore::FloatRect&amp; unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect&amp; customFixedPositionRect, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate);
</del><ins>+    void updateVisibleContentRects(const WebCore::FloatRect&amp; exposedRect, const WebCore::FloatRect&amp; unobscuredRect, const WebCore::FloatRect&amp; unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect&amp; customFixedPositionRect, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate);
</ins><span class="cx">     void resendLastVisibleContentRects();
</span><span class="cx"> 
</span><span class="cx">     enum class UnobscuredRectConstraint { ConstrainedToDocumentRect, Unconstrained };
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessiosWKContentViewmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentView.mm (194296 => 194297)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentView.mm        2015-12-18 23:05:50 UTC (rev 194296)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentView.mm        2015-12-18 23:05:55 UTC (rev 194297)
</span><span class="lines">@@ -377,7 +377,7 @@
</span><span class="cx"> 
</span><span class="cx">     FloatRect fixedPositionRectForLayout = _page-&gt;computeCustomFixedPositionRect(unobscuredRect, zoomScale, WebPageProxy::UnobscuredRectConstraint::ConstrainedToDocumentRect);
</span><span class="cx">     _page-&gt;updateVisibleContentRects(visibleRect, unobscuredRect, unobscuredRectInScrollViewCoordinates, fixedPositionRectForLayout,
</span><del>-        zoomScale, isStableState, isChangingObscuredInsetsInteractively, timestamp, velocityData.horizontalVelocity, velocityData.verticalVelocity, velocityData.scaleChangeRate);
</del><ins>+        zoomScale, isStableState, isChangingObscuredInsetsInteractively, _webView._allowsViewportShrinkToFit, timestamp, velocityData.horizontalVelocity, velocityData.verticalVelocity, velocityData.scaleChangeRate);
</ins><span class="cx"> 
</span><span class="cx">     RemoteScrollingCoordinatorProxy* scrollingCoordinator = _page-&gt;scrollingCoordinatorProxy();
</span><span class="cx">     FloatRect fixedPositionRect = _page-&gt;computeCustomFixedPositionRect(_page-&gt;unobscuredContentRect(), zoomScale);
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessiosWebPageProxyIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (194296 => 194297)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2015-12-18 23:05:50 UTC (rev 194296)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2015-12-18 23:05:55 UTC (rev 194297)
</span><span class="lines">@@ -181,12 +181,12 @@
</span><span class="cx">     callback-&gt;performCallbackWithReturnValue(beforeText, markedText, selectedText, afterText, location, length);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::updateVisibleContentRects(const WebCore::FloatRect&amp; exposedRect, const WebCore::FloatRect&amp; unobscuredRect, const WebCore::FloatRect&amp; unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect&amp; customFixedPositionRect, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate)
</del><ins>+void WebPageProxy::updateVisibleContentRects(const WebCore::FloatRect&amp; exposedRect, const WebCore::FloatRect&amp; unobscuredRect, const WebCore::FloatRect&amp; unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect&amp; customFixedPositionRect, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate)
</ins><span class="cx"> {
</span><span class="cx">     if (!isValid())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    VisibleContentRectUpdateInfo visibleContentRectUpdateInfo(exposedRect, unobscuredRect, unobscuredRectInScrollViewCoordinates, customFixedPositionRect, scale, inStableState, isChangingObscuredInsetsInteractively, timestamp, horizontalVelocity, verticalVelocity, scaleChangeRate, downcast&lt;RemoteLayerTreeDrawingAreaProxy&gt;(*drawingArea()).lastCommittedLayerTreeTransactionID());
</del><ins>+    VisibleContentRectUpdateInfo visibleContentRectUpdateInfo(exposedRect, unobscuredRect, unobscuredRectInScrollViewCoordinates, customFixedPositionRect, scale, inStableState, isChangingObscuredInsetsInteractively, allowShrinkToFit, timestamp, horizontalVelocity, verticalVelocity, scaleChangeRate, downcast&lt;RemoteLayerTreeDrawingAreaProxy&gt;(*drawingArea()).lastCommittedLayerTreeTransactionID());
</ins><span class="cx"> 
</span><span class="cx">     if (visibleContentRectUpdateInfo == m_lastVisibleContentRectUpdate)
</span><span class="cx">         return;
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (194296 => 194297)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-12-18 23:05:50 UTC (rev 194296)
+++ branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-12-18 23:05:55 UTC (rev 194297)
</span><span class="lines">@@ -2934,7 +2934,8 @@
</span><span class="cx">         m_drawingArea-&gt;updatePreferences(store);
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-    m_viewportConfiguration.setCanIgnoreScalingConstraints(store.getBoolValueForKey(WebPreferencesKey::ignoreViewportScalingConstraintsKey()));
</del><ins>+    m_ignoreViewportScalingConstraints = store.getBoolValueForKey(WebPreferencesKey::ignoreViewportScalingConstraintsKey());
+    m_viewportConfiguration.setCanIgnoreScalingConstraints(m_ignoreViewportScalingConstraints);
</ins><span class="cx">     m_viewportConfiguration.setForceAlwaysUserScalable(store.getBoolValueForKey(WebPreferencesKey::forceAlwaysUserScalableKey()));
</span><span class="cx"> #endif
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h (194296 => 194297)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h        2015-12-18 23:05:50 UTC (rev 194296)
+++ branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h        2015-12-18 23:05:55 UTC (rev 194297)
</span><span class="lines">@@ -1186,6 +1186,10 @@
</span><span class="cx"> 
</span><span class="cx">     bool m_mainFrameIsScrollable;
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    bool m_ignoreViewportScalingConstraints { false };
+#endif
+
</ins><span class="cx"> #if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
</span><span class="cx">     bool m_readyToFindPrimarySnapshottedPlugin;
</span><span class="cx">     bool m_didFindPrimarySnapshottedPlugin;
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (194296 => 194297)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2015-12-18 23:05:50 UTC (rev 194296)
+++ branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2015-12-18 23:05:55 UTC (rev 194297)
</span><span class="lines">@@ -2948,6 +2948,9 @@
</span><span class="cx">     if (scrollPosition != frameView.scrollPosition())
</span><span class="cx">         m_dynamicSizeUpdateHistory.clear();
</span><span class="cx"> 
</span><ins>+    if (m_viewportConfiguration.setCanIgnoreScalingConstraints(m_ignoreViewportScalingConstraints &amp;&amp; visibleContentRectUpdateInfo.allowShrinkToFit()))
+        viewportConfigurationChanged();
+
</ins><span class="cx">     frameView.setUnobscuredContentSize(visibleContentRectUpdateInfo.unobscuredRect().size());
</span><span class="cx"> 
</span><span class="cx">     double horizontalVelocity = visibleContentRectUpdateInfo.horizontalVelocity();
</span></span></pre>
</div>
</div>

</body>
</html>