<!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>[168556] trunk/Source</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/168556">168556</a></dd>
<dt>Author</dt> <dd>benjamin@webkit.org</dd>
<dt>Date</dt> <dd>2014-05-09 16:08:31 -0700 (Fri, 09 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[iOS][WK2] Set up the resize events
https://bugs.webkit.org/show_bug.cgi?id=132726

Patch by Benjamin Poulain &lt;bpoulain@apple.com&gt; on 2014-05-09
Reviewed by Darin Adler and Simon Fraser.


Source/WebCore: 
Let the WebKit2 layer override the size used for resize events.

* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::sizeForResizeEvent):
(WebCore::FrameView::sendResizeEventIfNeeded):
(WebCore::FrameView::setCustomSizeForResizeEvent):
* page/FrameView.h:

Source/WebKit2: 
Wire the UI Process updates to FrameView to send the resize events appropriately.

* Shared/VisibleContentRectUpdateInfo.cpp:
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::isChangingObscuredInsetsInteractively):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateVisibleContentRects]):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:isChangingObscuredInsetsInteractively:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]): Deleted.
Pass down the status of the content insets with the view update to main frame's FrameView
when needed.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
On live resize, send the resize event, then the scroll events (if needed).

Since JavaScript now gets two chances to change the content (resize event + scroll event),
we query the actual scroll offset and scale for the DynamicViewportUpdateChangedTarget.

(WebKit::WebPage::viewportConfigurationChanged):
Define the custom size on load before the app gets a chance to send different rects.
If for some reason the app changes its mind about the insets, the content will be notified with a resize event.

(WebKit::WebPage::updateVisibleContentRects):
Send the resize event when the insets are stable.
Also move the scroll event after the resize event for consistency with live resize.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewh">trunk/Source/WebCore/page/FrameView.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedVisibleContentRectUpdateInfocpp">trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedVisibleContentRectUpdateInfoh">trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIiosWKViewIOSmm">trunk/Source/WebKit2/UIProcess/API/ios/WKViewIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewh">trunk/Source/WebKit2/UIProcess/ios/WKContentView.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewmm">trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWebPageProxyIOSmm">trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagemessagesin">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm">trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (168555 => 168556)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-05-09 21:25:39 UTC (rev 168555)
+++ trunk/Source/WebCore/ChangeLog        2014-05-09 23:08:31 UTC (rev 168556)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2014-05-09  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
+
+        [iOS][WK2] Set up the resize events
+        https://bugs.webkit.org/show_bug.cgi?id=132726
+
+        Reviewed by Darin Adler and Simon Fraser.
+
+        Let the WebKit2 layer override the size used for resize events.
+
+        * WebCore.exp.in:
+        * page/FrameView.cpp:
+        (WebCore::FrameView::layout):
+        (WebCore::FrameView::sizeForResizeEvent):
+        (WebCore::FrameView::sendResizeEventIfNeeded):
+        (WebCore::FrameView::setCustomSizeForResizeEvent):
+        * page/FrameView.h:
+
</ins><span class="cx"> 2014-05-09  Alexey Proskuryakov  &lt;ap@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r168518): Multiple tests for workers in blobs assert
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (168555 => 168556)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-05-09 21:25:39 UTC (rev 168555)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-05-09 23:08:31 UTC (rev 168556)
</span><span class="lines">@@ -2450,6 +2450,7 @@
</span><span class="cx"> _WebUIApplicationDidBecomeActiveNotification
</span><span class="cx"> _WebUIApplicationWillEnterForegroundNotification
</span><span class="cx"> _WebUIApplicationWillResignActiveNotification
</span><ins>+__ZN7WebCore9FrameView27setCustomSizeForResizeEventENS_7IntSizeE
</ins><span class="cx"> __ZN7WebCore10ScrollView15setScrollOffsetERKNS_8IntPointE
</span><span class="cx"> __ZN7WebCore10ScrollView21setExposedContentRectERKNS_7IntRectE
</span><span class="cx"> __ZN7WebCore10ScrollView24setUnobscuredContentRectERKNS_7IntRectE
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (168555 => 168556)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2014-05-09 21:25:39 UTC (rev 168555)
+++ trunk/Source/WebCore/page/FrameView.cpp        2014-05-09 23:08:31 UTC (rev 168556)
</span><span class="lines">@@ -177,6 +177,7 @@
</span><span class="cx">     , m_speculativeTilingEnableTimer(this, &amp;FrameView::speculativeTilingEnableTimerFired)
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     , m_useCustomFixedPositionLayoutRect(false)
</span><ins>+    , m_useCustomSizeForResizeEvent(false)
</ins><span class="cx"> #endif
</span><span class="cx">     , m_hasOverrideViewportSize(false)
</span><span class="cx">     , m_shouldAutoSize(false)
</span><span class="lines">@@ -1214,11 +1215,7 @@
</span><span class="cx"> 
</span><span class="cx">                     m_firstLayout = false;
</span><span class="cx">                     m_firstLayoutCallbackPending = true;
</span><del>-                    if (useFixedLayout() &amp;&amp; !fixedLayoutSize().isEmpty() &amp;&amp; delegatesScrolling())
-                        m_lastViewportSize = fixedLayoutSize();
-                    else
-                        m_lastViewportSize = visibleContentRectIncludingScrollbars().size();
-
</del><ins>+                    m_lastViewportSize = sizeForResizeEvent();
</ins><span class="cx">                     m_lastZoomFactor = root-&gt;style().zoom();
</span><span class="cx"> 
</span><span class="cx">                     // Set the initial vMode to AlwaysOn if we're auto.
</span><span class="lines">@@ -2797,6 +2794,17 @@
</span><span class="cx">     sendResizeEventIfNeeded();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IntSize FrameView::sizeForResizeEvent() const
+{
+#if PLATFORM(IOS)
+    if (m_useCustomSizeForResizeEvent)
+        return m_customSizeForResizeEvent;
+#endif
+    if (useFixedLayout() &amp;&amp; !fixedLayoutSize().isEmpty() &amp;&amp; delegatesScrolling())
+        return fixedLayoutSize();
+    return visibleContentRectIncludingScrollbars().size();
+}
+
</ins><span class="cx"> void FrameView::sendResizeEventIfNeeded()
</span><span class="cx"> {
</span><span class="cx">     RenderView* renderView = this-&gt;renderView();
</span><span class="lines">@@ -2805,12 +2813,7 @@
</span><span class="cx">     if (frame().page() &amp;&amp; frame().page()-&gt;chrome().client().isSVGImageChromeClient())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    IntSize currentSize;
-    if (useFixedLayout() &amp;&amp; !fixedLayoutSize().isEmpty() &amp;&amp; delegatesScrolling())
-        currentSize = fixedLayoutSize();
-    else
-        currentSize = visibleContentRectIncludingScrollbars().size();
-
</del><ins>+    IntSize currentSize = sizeForResizeEvent();
</ins><span class="cx">     float currentZoomFactor = renderView-&gt;style().zoom();
</span><span class="cx">     bool shouldSendResizeEvent = !m_firstLayout &amp;&amp; (currentSize != m_lastViewportSize || currentZoomFactor != m_lastZoomFactor);
</span><span class="cx"> 
</span><span class="lines">@@ -4159,6 +4162,13 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void FrameView::setCustomSizeForResizeEvent(IntSize customSize)
+{
+    m_useCustomSizeForResizeEvent = true;
+    m_customSizeForResizeEvent = customSize;
+    sendResizeEventIfNeeded();
+}
+
</ins><span class="cx"> void FrameView::setScrollVelocity(double horizontalVelocity, double verticalVelocity, double scaleChangeRate, double timestamp)
</span><span class="cx"> {
</span><span class="cx">     m_horizontalVelocity = horizontalVelocity;
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.h (168555 => 168556)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.h        2014-05-09 21:25:39 UTC (rev 168555)
+++ trunk/Source/WebCore/page/FrameView.h        2014-05-09 23:08:31 UTC (rev 168556)
</span><span class="lines">@@ -130,6 +130,8 @@
</span><span class="cx">     void setCustomFixedPositionLayoutRect(const IntRect&amp;);
</span><span class="cx">     bool updateFixedPositionLayoutRect();
</span><span class="cx"> 
</span><ins>+    void setCustomSizeForResizeEvent(IntSize);
+
</ins><span class="cx">     void setScrollVelocity(double horizontalVelocity, double verticalVelocity, double scaleChangeRate, double timestamp);
</span><span class="cx">     FloatRect computeCoverageRect(double horizontalMargin, double verticalMargin) const;
</span><span class="cx"> #else
</span><span class="lines">@@ -577,6 +579,7 @@
</span><span class="cx">     virtual void didAddScrollbar(Scrollbar*, ScrollbarOrientation) override;
</span><span class="cx">     virtual void willRemoveScrollbar(Scrollbar*, ScrollbarOrientation) override;
</span><span class="cx"> 
</span><ins>+    IntSize sizeForResizeEvent() const;
</ins><span class="cx">     void sendResizeEventIfNeeded();
</span><span class="cx"> 
</span><span class="cx">     void updateScrollableAreaSet();
</span><span class="lines">@@ -695,6 +698,9 @@
</span><span class="cx">     bool m_useCustomFixedPositionLayoutRect;
</span><span class="cx">     IntRect m_customFixedPositionLayoutRect;
</span><span class="cx"> 
</span><ins>+    bool m_useCustomSizeForResizeEvent;
+    IntSize m_customSizeForResizeEvent;
+
</ins><span class="cx">     double m_horizontalVelocity;
</span><span class="cx">     double m_verticalVelocity;
</span><span class="cx">     double m_scaleChangeRate;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (168555 => 168556)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-05-09 21:25:39 UTC (rev 168555)
+++ trunk/Source/WebKit2/ChangeLog        2014-05-09 23:08:31 UTC (rev 168556)
</span><span class="lines">@@ -1,3 +1,42 @@
</span><ins>+2014-05-09  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
+
+        [iOS][WK2] Set up the resize events
+        https://bugs.webkit.org/show_bug.cgi?id=132726
+
+        Reviewed by Darin Adler and Simon Fraser.
+
+        Wire the UI Process updates to FrameView to send the resize events appropriately.
+
+        * Shared/VisibleContentRectUpdateInfo.cpp:
+        (WebKit::VisibleContentRectUpdateInfo::encode):
+        (WebKit::VisibleContentRectUpdateInfo::decode):
+        * Shared/VisibleContentRectUpdateInfo.h:
+        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
+        (WebKit::VisibleContentRectUpdateInfo::isChangingObscuredInsetsInteractively):
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _updateVisibleContentRects]):
+        * UIProcess/ios/WKContentView.h:
+        * UIProcess/ios/WKContentView.mm:
+        (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:isChangingObscuredInsetsInteractively:]):
+        (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]): Deleted.
+        Pass down the status of the content insets with the view update to main frame's FrameView
+        when needed.
+
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::dynamicViewportSizeUpdate):
+        On live resize, send the resize event, then the scroll events (if needed).
+
+        Since JavaScript now gets two chances to change the content (resize event + scroll event),
+        we query the actual scroll offset and scale for the DynamicViewportUpdateChangedTarget.
+
+        (WebKit::WebPage::viewportConfigurationChanged):
+        Define the custom size on load before the app gets a chance to send different rects.
+        If for some reason the app changes its mind about the insets, the content will be notified with a resize event.
+
+        (WebKit::WebPage::updateVisibleContentRects):
+        Send the resize event when the insets are stable.
+        Also move the scroll event after the resize event for consistency with live resize.
+
</ins><span class="cx"> 2014-05-09  Benjamin Poulain  &lt;benjamin@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] Switch geolocation to an explicit authorization query model
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedVisibleContentRectUpdateInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp (168555 => 168556)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp        2014-05-09 21:25:39 UTC (rev 168555)
+++ trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp        2014-05-09 23:08:31 UTC (rev 168556)
</span><span class="lines">@@ -34,10 +34,12 @@
</span><span class="cx"> {
</span><span class="cx">     encoder &lt;&lt; m_exposedRect;
</span><span class="cx">     encoder &lt;&lt; m_unobscuredRect;
</span><ins>+    encoder &lt;&lt; m_unobscuredRectInScrollViewCoordinates;
</ins><span class="cx">     encoder &lt;&lt; m_customFixedPositionRect;
</span><span class="cx">     encoder &lt;&lt; m_scale;
</span><span class="cx">     encoder &lt;&lt; m_updateID;
</span><span class="cx">     encoder &lt;&lt; m_inStableState;
</span><ins>+    encoder &lt;&lt; m_isChangingObscuredInsetsInteractively;
</ins><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="lines">@@ -50,6 +52,8 @@
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(result.m_unobscuredRect))
</span><span class="cx">         return false;
</span><ins>+    if (!decoder.decode(result.m_unobscuredRectInScrollViewCoordinates))
+        return false;
</ins><span class="cx">     if (!decoder.decode(result.m_customFixedPositionRect))
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(result.m_scale))
</span><span class="lines">@@ -58,6 +62,8 @@
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(result.m_inStableState))
</span><span class="cx">         return false;
</span><ins>+    if (!decoder.decode(result.m_isChangingObscuredInsetsInteractively))
+        return false;
</ins><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></pre></div>
<a id="trunkSourceWebKit2SharedVisibleContentRectUpdateInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h (168555 => 168556)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h        2014-05-09 21:25:39 UTC (rev 168555)
+++ trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h        2014-05-09 23:08:31 UTC (rev 168556)
</span><span class="lines">@@ -41,16 +41,19 @@
</span><span class="cx">         : m_scale(-1)
</span><span class="cx">         , m_updateID(0)
</span><span class="cx">         , m_inStableState(false)
</span><ins>+        , m_isChangingObscuredInsetsInteractively(false)
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    VisibleContentRectUpdateInfo(uint64_t updateID, const WebCore::FloatRect&amp; exposedRect, const WebCore::FloatRect&amp; unobscuredRect, const WebCore::FloatRect&amp; customFixedPositionRect, double scale, bool inStableState, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate)
</del><ins>+    VisibleContentRectUpdateInfo(uint64_t updateID, 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)
</ins><span class="cx">         : m_exposedRect(exposedRect)
</span><span class="cx">         , m_unobscuredRect(unobscuredRect)
</span><ins>+        , m_unobscuredRectInScrollViewCoordinates(unobscuredRectInScrollViewCoordinates)
</ins><span class="cx">         , m_customFixedPositionRect(customFixedPositionRect)
</span><span class="cx">         , m_scale(scale)
</span><span class="cx">         , m_updateID(updateID)
</span><span class="cx">         , m_inStableState(inStableState)
</span><ins>+        , m_isChangingObscuredInsetsInteractively(isChangingObscuredInsetsInteractively)
</ins><span class="cx">         , m_timestamp(timestamp)
</span><span class="cx">         , m_horizontalVelocity(horizontalVelocity)
</span><span class="cx">         , m_verticalVelocity(verticalVelocity)
</span><span class="lines">@@ -60,10 +63,12 @@
</span><span class="cx"> 
</span><span class="cx">     const WebCore::FloatRect&amp; exposedRect() const { return m_exposedRect; }
</span><span class="cx">     const WebCore::FloatRect&amp; unobscuredRect() const { return m_unobscuredRect; }
</span><ins>+    const WebCore::FloatRect&amp; unobscuredRectInScrollViewCoordinates() const { return m_unobscuredRectInScrollViewCoordinates; }
</ins><span class="cx">     const WebCore::FloatRect&amp; customFixedPositionRect() const { return m_customFixedPositionRect; }
</span><span class="cx">     double scale() const { return m_scale; }
</span><span class="cx">     uint64_t updateID() const { return m_updateID; }
</span><span class="cx">     bool inStableState() const { return m_inStableState; }
</span><ins>+    bool isChangingObscuredInsetsInteractively() const { return m_isChangingObscuredInsetsInteractively; }
</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">@@ -76,10 +81,12 @@
</span><span class="cx"> private:
</span><span class="cx">     WebCore::FloatRect m_exposedRect;
</span><span class="cx">     WebCore::FloatRect m_unobscuredRect;
</span><ins>+    WebCore::FloatRect m_unobscuredRectInScrollViewCoordinates;
</ins><span class="cx">     WebCore::FloatRect m_customFixedPositionRect;
</span><span class="cx">     double m_scale;
</span><span class="cx">     uint64_t m_updateID;
</span><span class="cx">     bool m_inStableState;
</span><ins>+    bool m_isChangingObscuredInsetsInteractively;
</ins><span class="cx">     double m_timestamp;
</span><span class="cx">     double m_horizontalVelocity;
</span><span class="cx">     double m_verticalVelocity;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (168555 => 168556)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2014-05-09 21:25:39 UTC (rev 168555)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2014-05-09 23:08:31 UTC (rev 168556)
</span><span class="lines">@@ -779,7 +779,7 @@
</span><span class="cx">     CGFloat scaleFactor = contentZoomScale(self);
</span><span class="cx"> 
</span><span class="cx">     BOOL isStableState = !(_isChangingObscuredInsetsInteractively || [_scrollView isDragging] || [_scrollView isDecelerating] || [_scrollView isZooming] || [_scrollView isZoomBouncing] || [_scrollView _isAnimatingZoom]);
</span><del>-    [_contentView didUpdateVisibleRect:visibleRectInContentCoordinates unobscuredRect:unobscuredRectInContentCoordinates scale:scaleFactor inStableState:isStableState];
</del><ins>+    [_contentView didUpdateVisibleRect:visibleRectInContentCoordinates unobscuredRect:unobscuredRectInContentCoordinates unobscuredRectInScrollViewCoordinates:unobscuredRect scale:scaleFactor inStableState:isStableState isChangingObscuredInsetsInteractively:_isChangingObscuredInsetsInteractively];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_keyboardChangedWithInfo:(NSDictionary *)keyboardInfo adjustScrollView:(BOOL)adjustScrollView
</span><span class="lines">@@ -1487,7 +1487,7 @@
</span><span class="cx">     CGRect visibleRectInContentCoordinates = [self convertRect:newBounds toView:_contentView.get()];
</span><span class="cx">     CGRect unobscuredRectInContentCoordinates = [self convertRect:futureUnobscuredRectInSelfCoordinates toView:_contentView.get()];
</span><span class="cx"> 
</span><del>-    _page-&gt;dynamicViewportSizeUpdate(WebCore::FloatSize(newMinimumLayoutSize.width, newMinimumLayoutSize.height), visibleRectInContentCoordinates, unobscuredRectInContentCoordinates, targetScale);
</del><ins>+    _page-&gt;dynamicViewportSizeUpdate(WebCore::FloatSize(newMinimumLayoutSize.width, newMinimumLayoutSize.height), visibleRectInContentCoordinates, unobscuredRectInContentCoordinates, futureUnobscuredRectInSelfCoordinates, targetScale);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_endAnimatedResize
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosWKViewIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/ios/WKViewIOS.mm (168555 => 168556)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/WKViewIOS.mm        2014-05-09 21:25:39 UTC (rev 168555)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKViewIOS.mm        2014-05-09 23:08:31 UTC (rev 168556)
</span><span class="lines">@@ -263,7 +263,7 @@
</span><span class="cx"> 
</span><span class="cx">     CGFloat scaleFactor = [_scrollView zoomScale];
</span><span class="cx"> 
</span><del>-    [_contentView didUpdateVisibleRect:visibleRectInContentCoordinates unobscuredRect:unobscuredRectInContentCoordinates scale:scaleFactor inStableState:YES];
</del><ins>+    [_contentView didUpdateVisibleRect:visibleRectInContentCoordinates unobscuredRect:unobscuredRectInContentCoordinates unobscuredRectInScrollViewCoordinates:unobscuredRect scale:scaleFactor inStableState:YES isChangingObscuredInsetsInteractively:NO];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_keyboardChangedWithInfo:(NSDictionary *)keyboardInfo adjustScrollView:(BOOL)adjustScrollView
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (168555 => 168556)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-05-09 21:25:39 UTC (rev 168555)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-05-09 23:08:31 UTC (rev 168556)
</span><span class="lines">@@ -589,7 +589,7 @@
</span><span class="cx">     uint64_t nextVisibleContentRectUpdateID() const { return m_lastVisibleContentRectUpdate.updateID() + 1; }
</span><span class="cx">     uint64_t lastVisibleContentRectUpdateID() const { return m_lastVisibleContentRectUpdate.updateID(); }
</span><span class="cx"> 
</span><del>-    void dynamicViewportSizeUpdate(const WebCore::FloatSize&amp; minimumLayoutSize, const WebCore::FloatRect&amp; targetExposedContentRect, const WebCore::FloatRect&amp; targetUnobscuredRect, double targetScale);
</del><ins>+    void dynamicViewportSizeUpdate(const WebCore::FloatSize&amp; minimumLayoutSize, const WebCore::FloatRect&amp; targetExposedContentRect, const WebCore::FloatRect&amp; targetUnobscuredRect, const WebCore::FloatRect&amp; targetUnobscuredRectInScrollViewCoordinates, double targetScale);
</ins><span class="cx">     
</span><span class="cx">     void setViewportConfigurationMinimumLayoutSize(const WebCore::FloatSize&amp;);
</span><span class="cx">     void setMinimumLayoutSizeForMinimalUI(const WebCore::FloatSize&amp;);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentView.h (168555 => 168556)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentView.h        2014-05-09 21:25:39 UTC (rev 168555)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentView.h        2014-05-09 23:08:31 UTC (rev 168556)
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx"> - (instancetype)initWithFrame:(CGRect)frame context:(WebKit::WebContext&amp;)context configuration:(WebKit::WebPageConfiguration)webPageConfiguration webView:(WKWebView *)webView;
</span><span class="cx"> 
</span><span class="cx"> - (void)setMinimumSize:(CGSize)size;
</span><del>-- (void)didUpdateVisibleRect:(CGRect)visibleRect unobscuredRect:(CGRect)unobscuredRect scale:(CGFloat)scale inStableState:(BOOL)isStableState;
</del><ins>+- (void)didUpdateVisibleRect:(CGRect)visibleRect unobscuredRect:(CGRect)unobscuredRect unobscuredRectInScrollViewCoordinates:(CGRect)unobscuredRectInScrollViewCoordinates scale:(CGFloat)scale inStableState:(BOOL)isStableState isChangingObscuredInsetsInteractively:(BOOL)isChangingObscuredInsetsInteractively;
</ins><span class="cx"> 
</span><span class="cx"> - (void)didFinishScrolling;
</span><span class="cx"> - (void)didZoomToScale:(CGFloat)scale;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm (168555 => 168556)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm        2014-05-09 21:25:39 UTC (rev 168555)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm        2014-05-09 23:08:31 UTC (rev 168556)
</span><span class="lines">@@ -297,7 +297,7 @@
</span><span class="cx">     return FrameView::rectForViewportConstrainedObjects(enclosingLayoutRect(unobscuredRect), roundedLayoutSize(FloatSize(documentSize)), scale, false, StickToViewportBounds);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)didUpdateVisibleRect:(CGRect)visibleRect unobscuredRect:(CGRect)unobscuredRect scale:(CGFloat)zoomScale inStableState:(BOOL)isStableState
</del><ins>+- (void)didUpdateVisibleRect:(CGRect)visibleRect unobscuredRect:(CGRect)unobscuredRect unobscuredRectInScrollViewCoordinates:(CGRect)unobscuredRectInScrollViewCoordinates scale:(CGFloat)zoomScale inStableState:(BOOL)isStableState isChangingObscuredInsetsInteractively:(BOOL)isChangingObscuredInsetsInteractively
</ins><span class="cx"> {
</span><span class="cx">     double timestamp = monotonicallyIncreasingTime();
</span><span class="cx">     HistoricalVelocityData::VelocityData velocityData;
</span><span class="lines">@@ -315,7 +315,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     FloatRect customFixedPositionRect = fixedPositionRectFromExposedRect(unobscuredRect, [self bounds].size, zoomScale);
</span><del>-    _page-&gt;updateVisibleContentRects(VisibleContentRectUpdateInfo(_page-&gt;nextVisibleContentRectUpdateID(), visibleRect, unobscuredRect, customFixedPositionRect, filteredScale, isStableState, timestamp, velocityData.horizontalVelocity, velocityData.verticalVelocity, velocityData.scaleChangeRate));
</del><ins>+    _page-&gt;updateVisibleContentRects(VisibleContentRectUpdateInfo(_page-&gt;nextVisibleContentRectUpdateID(), visibleRect, unobscuredRect, unobscuredRectInScrollViewCoordinates, customFixedPositionRect, filteredScale, isStableState, isChangingObscuredInsetsInteractively, timestamp, velocityData.horizontalVelocity, velocityData.verticalVelocity, velocityData.scaleChangeRate));
</ins><span class="cx">     
</span><span class="cx">     RemoteScrollingCoordinatorProxy* scrollingCoordinator = _page-&gt;scrollingCoordinatorProxy();
</span><span class="cx">     scrollingCoordinator-&gt;viewportChangedViaDelegatedScrolling(scrollingCoordinator-&gt;rootScrollingNodeID(), unobscuredRect, zoomScale);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWebPageProxyIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (168555 => 168556)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2014-05-09 21:25:39 UTC (rev 168555)
+++ trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2014-05-09 23:08:31 UTC (rev 168556)
</span><span class="lines">@@ -194,9 +194,9 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::dynamicViewportSizeUpdate(const FloatSize&amp; minimumLayoutSize, const FloatRect&amp; targetExposedContentRect, const FloatRect&amp; targetUnobscuredRect, double targetScale)
</del><ins>+void WebPageProxy::dynamicViewportSizeUpdate(const FloatSize&amp; minimumLayoutSize, const FloatRect&amp; targetExposedContentRect, const FloatRect&amp; targetUnobscuredRect, const FloatRect&amp; targetUnobscuredRectInScrollViewCoordinates,  double targetScale)
</ins><span class="cx"> {
</span><del>-    m_process-&gt;send(Messages::WebPage::DynamicViewportSizeUpdate(minimumLayoutSize, targetExposedContentRect, targetUnobscuredRect, targetScale), m_pageID);
</del><ins>+    m_process-&gt;send(Messages::WebPage::DynamicViewportSizeUpdate(minimumLayoutSize, targetExposedContentRect, targetUnobscuredRect, targetUnobscuredRectInScrollViewCoordinates, targetScale), m_pageID);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::setViewportConfigurationMinimumLayoutSize(const WebCore::FloatSize&amp; size)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (168555 => 168556)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-05-09 21:25:39 UTC (rev 168555)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-05-09 23:08:31 UTC (rev 168556)
</span><span class="lines">@@ -706,7 +706,7 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     void setViewportConfigurationMinimumLayoutSize(const WebCore::FloatSize&amp;);
</span><span class="cx">     void setMinimumLayoutSizeForMinimalUI(const WebCore::FloatSize&amp;);
</span><del>-    void dynamicViewportSizeUpdate(const WebCore::FloatSize&amp; minimumLayoutSize, const WebCore::FloatRect&amp; targetExposedContentRect, const WebCore::FloatRect&amp; targetUnobscuredRect, double scale);
</del><ins>+    void dynamicViewportSizeUpdate(const WebCore::FloatSize&amp; minimumLayoutSize, const WebCore::FloatRect&amp; targetExposedContentRect, const WebCore::FloatRect&amp; targetUnobscuredRect, const WebCore::FloatRect&amp; targetUnobscuredRectInScrollViewCoordinates, double scale);
</ins><span class="cx">     void updateVisibleContentRects(const VisibleContentRectUpdateInfo&amp;);
</span><span class="cx">     bool scaleWasSetByUIProcess() const { return m_scaleWasSetByUIProcess; }
</span><span class="cx">     void willStartUserTriggeredZooming();
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (168555 => 168556)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2014-05-09 21:25:39 UTC (rev 168555)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2014-05-09 23:08:31 UTC (rev 168556)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     SetViewportConfigurationMinimumLayoutSize(WebCore::FloatSize size)
</span><span class="cx">     SetMinimumLayoutSizeForMinimalUI(WebCore::FloatSize size)
</span><del>-    DynamicViewportSizeUpdate(WebCore::FloatSize minimumLayoutSize, WebCore::FloatRect targetExposedContentRect, WebCore::FloatRect targetUnobscuredRect, double scale)
</del><ins>+    DynamicViewportSizeUpdate(WebCore::FloatSize minimumLayoutSize, WebCore::FloatRect targetExposedContentRect, WebCore::FloatRect targetUnobscuredRect, WebCore::FloatRect targetUnobscuredRectInScrollViewCoordinates, double scale)
</ins><span class="cx"> 
</span><span class="cx">     HandleTap(WebCore::IntPoint point)
</span><span class="cx">     PotentialTapAtPosition(uint64_t requestID, WebCore::FloatPoint point)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (168555 => 168556)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2014-05-09 21:25:39 UTC (rev 168555)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2014-05-09 23:08:31 UTC (rev 168556)
</span><span class="lines">@@ -1891,7 +1891,7 @@
</span><span class="cx">     viewportConfigurationChanged();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPage::dynamicViewportSizeUpdate(const FloatSize&amp; minimumLayoutSize, const FloatRect&amp; targetExposedContentRect, const FloatRect&amp; targetUnobscuredRect, double targetScale)
</del><ins>+void WebPage::dynamicViewportSizeUpdate(const FloatSize&amp; minimumLayoutSize, const FloatRect&amp; targetExposedContentRect, const FloatRect&amp; targetUnobscuredRect, const WebCore::FloatRect&amp; targetUnobscuredRectInScrollViewCoordinates, double targetScale)
</ins><span class="cx"> {
</span><span class="cx">     TemporaryChange&lt;bool&gt; dynamicSizeUpdateGuard(m_inDynamicSizeUpdate, true);
</span><span class="cx">     // FIXME: this does not handle the cases where the content would change the content size or scroll position from JavaScript.
</span><span class="lines">@@ -2028,15 +2028,19 @@
</span><span class="cx">     frameView.setScrollVelocity(0, 0, 0, monotonicallyIncreasingTime());
</span><span class="cx"> 
</span><span class="cx">     IntRect roundedUnobscuredContentRect = roundedIntRect(newUnobscuredContentRect);
</span><del>-    frameView.setScrollOffset(roundedUnobscuredContentRect.location());
</del><span class="cx">     frameView.setUnobscuredContentRect(roundedUnobscuredContentRect);
</span><span class="cx">     m_drawingArea-&gt;setExposedContentRect(newExposedContentRect);
</span><span class="cx"> 
</span><span class="cx">     if (scale == targetScale)
</span><span class="cx">         scalePage(scale, roundedUnobscuredContentRect.location());
</span><span class="cx"> 
</span><del>-    if (scale != targetScale || roundedIntPoint(targetUnobscuredRect.location()) != roundedUnobscuredContentRect.location())
-        send(Messages::WebPageProxy::DynamicViewportUpdateChangedTarget(scale, roundedUnobscuredContentRect.location()));
</del><ins>+    FloatSize unobscuredContentRectSizeInContentCoordinates = newUnobscuredContentRect.size();
+    unobscuredContentRectSizeInContentCoordinates.scale(scale);
+    frameView.setCustomSizeForResizeEvent(expandedIntSize(unobscuredContentRectSizeInContentCoordinates));
+    frameView.setScrollOffset(roundedUnobscuredContentRect.location());
+
+    if (pageScaleFactor() != targetScale || roundedIntPoint(targetUnobscuredRect.location()) != frameView.scrollPosition())
+        send(Messages::WebPageProxy::DynamicViewportUpdateChangedTarget(pageScaleFactor(), frameView.scrollPosition()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPage::resetViewportDefaultConfiguration(WebFrame* frame)
</span><span class="lines">@@ -2091,6 +2095,8 @@
</span><span class="cx">     if (!m_hasReceivedVisibleContentRectsAfterDidCommitLoad) {
</span><span class="cx">         // This takes scale into account, so do after the scale change.
</span><span class="cx">         frameView.setCustomFixedPositionLayoutRect(enclosingIntRect(frameView.viewportConstrainedObjectsRect()));
</span><ins>+
+        frameView.setCustomSizeForResizeEvent(expandedIntSize(m_viewportConfiguration.minimumLayoutSize()));
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2164,7 +2170,6 @@
</span><span class="cx">     if (scrollPosition != IntPoint(frameView.scrollOffset()))
</span><span class="cx">         m_dynamicSizeUpdateHistory.clear();
</span><span class="cx"> 
</span><del>-    frameView.setScrollOffset(scrollPosition);
</del><span class="cx">     frameView.setUnobscuredContentRect(roundedUnobscuredRect);
</span><span class="cx"> 
</span><span class="cx">     double horizontalVelocity = visibleContentRectUpdateInfo.horizontalVelocity();
</span><span class="lines">@@ -2176,6 +2181,11 @@
</span><span class="cx"> 
</span><span class="cx">     if (visibleContentRectUpdateInfo.inStableState())
</span><span class="cx">         m_page-&gt;mainFrame().view()-&gt;setCustomFixedPositionLayoutRect(enclosingIntRect(visibleContentRectUpdateInfo.customFixedPositionRect()));
</span><ins>+
+    if (!visibleContentRectUpdateInfo.isChangingObscuredInsetsInteractively())
+        frameView.setCustomSizeForResizeEvent(expandedIntSize(visibleContentRectUpdateInfo.unobscuredRectInScrollViewCoordinates().size()));
+
+    frameView.setScrollOffset(scrollPosition);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPage::willStartUserTriggeredZooming()
</span></span></pre>
</div>
</div>

</body>
</html>