<!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>[169501] trunk/Source/WebKit2</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/169501">169501</a></dd>
<dt>Author</dt> <dd>benjamin@webkit.org</dd>
<dt>Date</dt> <dd>2014-05-30 17:56:51 -0700 (Fri, 30 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[iOS][WK2] When a page does not finish rotation before the end of the animation, synchronize explicitely
https://bugs.webkit.org/show_bug.cgi?id=133364
&lt;rdar://problem/17026333&gt;

Patch by Benjamin Poulain &lt;bpoulain@apple.com&gt; on 2014-05-30
Reviewed by Sam Weinig.

When a page that does layout on rotation does not respond before the end of the animation, we end up with
a completely inconsistent state on the UIProcess (because it is unware of the new states).

The perfect way to fix this would be to make animated resize transactional and have the WebProcess resolve
conflicts. That is very complicated and the issue is uncommon, so this patch does not do that.

This patch force the synchronization whenever we finish the animation before we heard back
from the WebProcess.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _endAnimatedResize]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::resetState):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
(WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
(WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::synchronizeDynamicViewportUpdate):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</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="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (169500 => 169501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-05-31 00:12:53 UTC (rev 169500)
+++ trunk/Source/WebKit2/ChangeLog        2014-05-31 00:56:51 UTC (rev 169501)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2014-05-30  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
+
+        [iOS][WK2] When a page does not finish rotation before the end of the animation, synchronize explicitely
+        https://bugs.webkit.org/show_bug.cgi?id=133364
+        &lt;rdar://problem/17026333&gt;
+
+        Reviewed by Sam Weinig.
+
+        When a page that does layout on rotation does not respond before the end of the animation, we end up with
+        a completely inconsistent state on the UIProcess (because it is unware of the new states).
+
+        The perfect way to fix this would be to make animated resize transactional and have the WebProcess resolve
+        conflicts. That is very complicated and the issue is uncommon, so this patch does not do that.
+
+        This patch force the synchronization whenever we finish the animation before we heard back
+        from the WebProcess.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _endAnimatedResize]):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::WebPageProxy):
+        (WebKit::WebPageProxy::resetState):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/ios/WebPageProxyIOS.mm:
+        (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
+        (WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
+        (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::dynamicViewportSizeUpdate):
+        (WebKit::WebPage::synchronizeDynamicViewportUpdate):
+
</ins><span class="cx"> 2014-05-30  Enrica Casucci  &lt;enrica@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (WebKit2): space space to insert period doesn't work in web forms.
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (169500 => 169501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2014-05-31 00:12:53 UTC (rev 169500)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2014-05-31 00:56:51 UTC (rev 169501)
</span><span class="lines">@@ -1780,6 +1780,8 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_endAnimatedResize
</span><span class="cx"> {
</span><ins>+    _page-&gt;synchronizeDynamicViewportUpdate();
+
</ins><span class="cx">     if (!_customContentView &amp;&amp; _isAnimatingResize) {
</span><span class="cx">         NSUInteger indexOfResizeAnimationView = [[_scrollView subviews] indexOfObject:_resizeAnimationView.get()];
</span><span class="cx">         [_scrollView insertSubview:_contentView.get() atIndex:indexOfResizeAnimationView];
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (169500 => 169501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-05-31 00:12:53 UTC (rev 169500)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-05-31 00:56:51 UTC (rev 169501)
</span><span class="lines">@@ -272,6 +272,9 @@
</span><span class="cx">     , m_visitedLinkProvider(*configuration.visitedLinkProvider)
</span><span class="cx">     , m_mainFrame(nullptr)
</span><span class="cx">     , m_userAgent(standardUserAgent())
</span><ins>+#if PLATFORM(IOS)
+    , m_dynamicViewportSizeUpdateInProgress(false)
+#endif
</ins><span class="cx">     , m_geolocationPermissionRequestManager(*this)
</span><span class="cx">     , m_notificationPermissionRequestManager(*this)
</span><span class="cx">     , m_viewState(ViewState::NoFlags)
</span><span class="lines">@@ -4204,6 +4207,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_lastVisibleContentRectUpdate = VisibleContentRectUpdateInfo();
</span><ins>+    m_dynamicViewportSizeUpdateInProgress = false;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     invalidateCallbackMap(m_voidCallbacks);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (169500 => 169501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-05-31 00:12:53 UTC (rev 169500)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-05-31 00:56:51 UTC (rev 169501)
</span><span class="lines">@@ -596,7 +596,8 @@
</span><span class="cx">     WebCore::FloatRect computeCustomFixedPositionRect(const WebCore::FloatRect&amp; unobscuredContentRect, double displayedContentScale, UnobscuredRectConstraint = UnobscuredRectConstraint::Unconstrained) const;
</span><span class="cx"> 
</span><span class="cx">     void dynamicViewportSizeUpdate(const WebCore::FloatSize&amp; minimumLayoutSize, const WebCore::FloatSize&amp; minimumLayoutSizeForMinimalUI, const WebCore::FloatSize&amp; maximumUnobscuredSize, const WebCore::FloatRect&amp; targetExposedContentRect, const WebCore::FloatRect&amp; targetUnobscuredRect, const WebCore::FloatRect&amp; targetUnobscuredRectInScrollViewCoordinates, double targetScale);
</span><del>-    
</del><ins>+    void synchronizeDynamicViewportUpdate();
+
</ins><span class="cx">     void setViewportConfigurationMinimumLayoutSize(const WebCore::FloatSize&amp;);
</span><span class="cx">     void setViewportConfigurationMinimumLayoutSizeForMinimalUI(const WebCore::FloatSize&amp;);
</span><span class="cx">     void setMaximumUnobscuredSize(const WebCore::FloatSize&amp;);
</span><span class="lines">@@ -1489,6 +1490,7 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     RefPtr&lt;WebVideoFullscreenManagerProxy&gt; m_videoFullscreenManager;
</span><span class="cx">     VisibleContentRectUpdateInfo m_lastVisibleContentRectUpdate;
</span><ins>+    bool m_dynamicViewportSizeUpdateInProgress;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIBRATION)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWebPageProxyIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (169500 => 169501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2014-05-31 00:12:53 UTC (rev 169500)
+++ trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2014-05-31 00:56:51 UTC (rev 169501)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #import &quot;EditingRange.h&quot;
</span><span class="cx"> #import &quot;NativeWebKeyboardEvent.h&quot;
</span><span class="cx"> #import &quot;PageClient.h&quot;
</span><ins>+#import &quot;RemoteLayerTreeDrawingAreaProxyMessages.h&quot;
</ins><span class="cx"> #import &quot;RemoteLayerTreeTransaction.h&quot;
</span><span class="cx"> #import &quot;ViewUpdateDispatcherMessages.h&quot;
</span><span class="cx"> #import &quot;WKBrowsingContextControllerInternal.h&quot;
</span><span class="lines">@@ -237,9 +238,35 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::dynamicViewportSizeUpdate(const FloatSize&amp; minimumLayoutSize, const WebCore::FloatSize&amp; minimumLayoutSizeForMinimalUI, const WebCore::FloatSize&amp; maximumUnobscuredSize, const FloatRect&amp; targetExposedContentRect, const FloatRect&amp; targetUnobscuredRect, const FloatRect&amp; targetUnobscuredRectInScrollViewCoordinates,  double targetScale)
</span><span class="cx"> {
</span><ins>+    m_dynamicViewportSizeUpdateInProgress = true;
</ins><span class="cx">     m_process-&gt;send(Messages::WebPage::DynamicViewportSizeUpdate(minimumLayoutSize, minimumLayoutSizeForMinimalUI, maximumUnobscuredSize, targetExposedContentRect, targetUnobscuredRect, targetUnobscuredRectInScrollViewCoordinates, targetScale), m_pageID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebPageProxy::synchronizeDynamicViewportUpdate()
+{
+    if (m_dynamicViewportSizeUpdateInProgress) {
+        // We do not want the UIProcess to finish animated resize with the old content size, scale, etc.
+        // If that happens, the UIProcess would start pushing new VisibleContentRectUpdateInfo to the WebProcess with
+        // invalid informations.
+        //
+        // Ideally, the animated resize should just be transactional, and the UIProcess would remain in the &quot;resize&quot; state
+        // until both DynamicViewportUpdateChangedTarget and the associated commitLayerTree are finished.
+        // The tricky part with such implementation is if a second animated resize starts before the end of the previous one.
+        // In that case, the values used for the target state needs to be computed from the output of the previous animated resize.
+        //
+        // The following is a workaround to have the UIProcess in a consistent state.
+        // Instead of handling nested resize, we block the UIProcess until the animated resize finishes.
+        m_dynamicViewportSizeUpdateInProgress = false;
+        double newScale;
+        FloatPoint newScrollPosition;
+        if (m_process-&gt;sendSync(Messages::WebPage::SynchronizeDynamicViewportUpdate(), Messages::WebPage::SynchronizeDynamicViewportUpdate::Reply(newScale, newScrollPosition), m_pageID, std::chrono::seconds(2))) {
+            m_pageClient.dynamicViewportUpdateChangedTarget(newScale, newScrollPosition);
+
+            m_process-&gt;connection()-&gt;waitForAndDispatchImmediately&lt;Messages::RemoteLayerTreeDrawingAreaProxy::CommitLayerTree&gt;(m_pageID, std::chrono::seconds(1));
+        }
+    }
+}
+
</ins><span class="cx"> void WebPageProxy::setViewportConfigurationMinimumLayoutSize(const WebCore::FloatSize&amp; size)
</span><span class="cx"> {
</span><span class="cx">     m_process-&gt;send(Messages::WebPage::SetViewportConfigurationMinimumLayoutSize(size), m_pageID);
</span><span class="lines">@@ -546,10 +573,13 @@
</span><span class="cx"> {
</span><span class="cx">     return WKGetScreenSize().width;
</span><span class="cx"> }
</span><del>-    
</del><ins>+
</ins><span class="cx"> void WebPageProxy::dynamicViewportUpdateChangedTarget(double newScale, const WebCore::FloatPoint&amp; newScrollPosition)
</span><span class="cx"> {
</span><del>-    m_pageClient.dynamicViewportUpdateChangedTarget(newScale, newScrollPosition);
</del><ins>+    if (m_dynamicViewportSizeUpdateInProgress) {
+        m_dynamicViewportSizeUpdateInProgress = false;
+        m_pageClient.dynamicViewportUpdateChangedTarget(newScale, newScrollPosition);
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color&amp; color, const Vector&lt;WebCore::FloatQuad&gt;&amp; highlightedQuads, const WebCore::IntSize&amp; topLeftRadius, const WebCore::IntSize&amp; topRightRadius, const WebCore::IntSize&amp; bottomLeftRadius, const WebCore::IntSize&amp; bottomRightRadius)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (169500 => 169501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-05-31 00:12:53 UTC (rev 169500)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-05-31 00:56:51 UTC (rev 169501)
</span><span class="lines">@@ -724,6 +724,7 @@
</span><span class="cx">     void setViewportConfigurationMinimumLayoutSizeForMinimalUI(const WebCore::FloatSize&amp;);
</span><span class="cx">     void setMaximumUnobscuredSize(const WebCore::FloatSize&amp;);
</span><span class="cx">     void dynamicViewportSizeUpdate(const WebCore::FloatSize&amp; minimumLayoutSize, const WebCore::FloatSize&amp; minimumLayoutSizeForMinimalUI, const WebCore::FloatSize&amp; maximumUnobscuredSize, const WebCore::FloatRect&amp; targetExposedContentRect, const WebCore::FloatRect&amp; targetUnobscuredRect, const WebCore::FloatRect&amp; targetUnobscuredRectInScrollViewCoordinates, double scale);
</span><ins>+    void synchronizeDynamicViewportUpdate(double&amp; newTargetScale, WebCore::FloatPoint&amp; newScrollPosition);
</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 (169500 => 169501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2014-05-31 00:12:53 UTC (rev 169500)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2014-05-31 00:56:51 UTC (rev 169501)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx">     SetViewportConfigurationMinimumLayoutSizeForMinimalUI(WebCore::FloatSize size)
</span><span class="cx">     SetMaximumUnobscuredSize(WebCore::FloatSize size)
</span><span class="cx">     DynamicViewportSizeUpdate(WebCore::FloatSize minimumLayoutSize, WebCore::FloatSize minimumLayoutSizeForMinimalUI,  WebCore::FloatSize maximumUnobscuredSize, WebCore::FloatRect targetExposedContentRect, WebCore::FloatRect targetUnobscuredRect, WebCore::FloatRect targetUnobscuredRectInScrollViewCoordinates, double scale)
</span><ins>+    SynchronizeDynamicViewportUpdate() -&gt; (double newTargetScale, WebCore::FloatPoint newScrollPosition)
</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 (169500 => 169501)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2014-05-31 00:12:53 UTC (rev 169500)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2014-05-31 00:56:51 UTC (rev 169501)
</span><span class="lines">@@ -2151,10 +2151,15 @@
</span><span class="cx">     frameView.setCustomSizeForResizeEvent(expandedIntSize(unobscuredContentRectSizeInContentCoordinates));
</span><span class="cx">     frameView.setScrollOffset(roundedUnobscuredContentRect.location());
</span><span class="cx"> 
</span><del>-    if (!withinEpsilon(pageScaleFactor(), targetScale) || roundedIntPoint(targetUnobscuredRect.location()) != frameView.scrollPosition())
-        send(Messages::WebPageProxy::DynamicViewportUpdateChangedTarget(pageScaleFactor(), frameView.scrollPosition()));
</del><ins>+    send(Messages::WebPageProxy::DynamicViewportUpdateChangedTarget(pageScaleFactor(), frameView.scrollPosition()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebPage::synchronizeDynamicViewportUpdate(double&amp; newTargetScale, FloatPoint&amp; newScrollPosition)
+{
+    newTargetScale = pageScaleFactor();
+    newScrollPosition = m_page-&gt;mainFrame().view()-&gt;scrollPosition();
+}
+
</ins><span class="cx"> void WebPage::resetViewportDefaultConfiguration(WebFrame* frame)
</span><span class="cx"> {
</span><span class="cx">     if (!frame) {
</span></span></pre>
</div>
</div>

</body>
</html>