<!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>[170773] 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/170773">170773</a></dd>
<dt>Author</dt> <dd>benjamin@webkit.org</dd>
<dt>Date</dt> <dd>2014-07-03 15:11:30 -0700 (Thu, 03 Jul 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[iOS][WK2] Fix small bugs of dynamicViewportSizeUpdate that were causing inaccuracies in the computed target
https://bugs.webkit.org/show_bug.cgi?id=134582

Patch by Benjamin Poulain &lt;bpoulain@apple.com&gt; on 2014-07-03
Reviewed by Tim Horton.


Source/WebCore: 
* WebCore.exp.in:
* platform/ScrollView.h:
(WebCore::ScrollView::unobscuredContentSize):
* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::unobscuredContentRect):
(WebCore::ScrollView::setUnobscuredContentSize):

Source/WebKit2: 
This patch fixes two small bugs that were causing &quot;jumpiness&quot; on animated resize:
1) The new scale was less accurate than the target scale, making the WebProcess force a worse scale on the content.
2) The code putting back the rects in view was ignoring the obscured insets, constraining the scroll position more
   than it should be.

The first problem was cause by a series of rounding issues accumulating to the fact that &quot;scale != targetScale&quot;
was almost never true.

The first issue is that the unobscured content size was stored in integer coordinates. Because of that, it was
impossible to determine accurately how much content is in the view.
The outcome was that visibleHorizontalFraction was very inaccurate compared to what the UIProcess computed.

Another issue affecting the scale is that scaleAfterViewportWidthChange was computing the widthToKeepInView
on floating point. Since ARM64 does all those computations on doubles in the UIProcess, the value would be quite
different from the received targetScale.

Finally, the code uses withinEpsilon() instead of a strict equality to reduce the effect of rounding errors.

For the second issue, the problem was that I was bounding the exposed rect to the page bounds. It is completely
valid to have an exposed rect outside the page bounds, that area is just under the obscured insets.

On the other hand, the unobscured rect needs to be within the bounds as we do not want to rotate to a rubberbanding
position. The fix is simply to put the right rect into bounds, and the horizontal/vertical adjustement applies on
both rects.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::scaleAfterViewportWidthChange):
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::updateVisibleContentRects):</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="#trunkSourceWebCoreplatformScrollViewh">trunk/Source/WebCore/platform/ScrollView.h</a></li>
<li><a href="#trunkSourceWebCoreplatformiosScrollViewIOSmm">trunk/Source/WebCore/platform/ios/ScrollViewIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</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 (170772 => 170773)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-07-03 21:52:32 UTC (rev 170772)
+++ trunk/Source/WebCore/ChangeLog        2014-07-03 22:11:30 UTC (rev 170773)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-07-03  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
+
+        [iOS][WK2] Fix small bugs of dynamicViewportSizeUpdate that were causing inaccuracies in the computed target
+        https://bugs.webkit.org/show_bug.cgi?id=134582
+
+        Reviewed by Tim Horton.
+
+        * WebCore.exp.in:
+        * platform/ScrollView.h:
+        (WebCore::ScrollView::unobscuredContentSize):
+        * platform/ios/ScrollViewIOS.mm:
+        (WebCore::ScrollView::unobscuredContentRect):
+        (WebCore::ScrollView::setUnobscuredContentSize):
+
</ins><span class="cx"> 2014-07-02  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Mac] WebKit1 WebView iframe not responding to scroll gestures
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (170772 => 170773)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-07-03 21:52:32 UTC (rev 170772)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-07-03 22:11:30 UTC (rev 170773)
</span><span class="lines">@@ -2519,7 +2519,7 @@
</span><span class="cx"> __ZN7WebCore10RenderView35resumePausedImageAnimationsIfNeededEv
</span><span class="cx"> __ZN7WebCore10ScrollView15setScrollOffsetERKNS_8IntPointE
</span><span class="cx"> __ZN7WebCore10ScrollView21setExposedContentRectERKNS_9FloatRectE
</span><del>-__ZN7WebCore10ScrollView24setUnobscuredContentSizeERKNS_7IntSizeE
</del><ins>+__ZN7WebCore10ScrollView24setUnobscuredContentSizeERKNS_9FloatSizeE
</ins><span class="cx"> __ZN7WebCore10XLinkNames4initEv
</span><span class="cx"> __ZN7WebCore10inSameLineERKNS_15VisiblePositionES2_
</span><span class="cx"> __ZN7WebCore11BidiContext41copyStackRemovingUnicodeEmbeddingContextsEv
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollView.h (170772 => 170773)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollView.h        2014-07-03 21:52:32 UTC (rev 170772)
+++ trunk/Source/WebCore/platform/ScrollView.h        2014-07-03 22:11:30 UTC (rev 170773)
</span><span class="lines">@@ -187,7 +187,8 @@
</span><span class="cx"> 
</span><span class="cx">     // The given rects are only used if there is no platform widget.
</span><span class="cx">     void setExposedContentRect(const FloatRect&amp;);
</span><del>-    void setUnobscuredContentSize(const IntSize&amp;);
</del><ins>+    const FloatSize&amp; unobscuredContentSize() const { return m_unobscuredContentSize; }
+    void setUnobscuredContentSize(const FloatSize&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void setActualScrollPosition(const IntPoint&amp;);
</span><span class="cx">     LegacyTileCache* legacyTileCache();
</span><span class="lines">@@ -431,7 +432,7 @@
</span><span class="cx">     // between exposed and unobscured areas. The two attributes should eventually be merged.
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     FloatRect m_exposedContentRect;
</span><del>-    IntSize m_unobscuredContentSize;
</del><ins>+    FloatSize m_unobscuredContentSize;
</ins><span class="cx"> #else
</span><span class="cx">     IntRect m_fixedVisibleContentRect;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformiosScrollViewIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/ScrollViewIOS.mm (170772 => 170773)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/ScrollViewIOS.mm        2014-07-03 21:52:32 UTC (rev 170772)
+++ trunk/Source/WebCore/platform/ios/ScrollViewIOS.mm        2014-07-03 22:11:30 UTC (rev 170773)
</span><span class="lines">@@ -108,12 +108,12 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!m_unobscuredContentSize.isEmpty())
</span><del>-        return IntRect(IntPoint(m_scrollOffset), m_unobscuredContentSize);
</del><ins>+        return IntRect(IntPoint(m_scrollOffset), roundedIntSize(m_unobscuredContentSize));
</ins><span class="cx"> 
</span><span class="cx">     return unobscuredContentRectInternal();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ScrollView::setUnobscuredContentSize(const IntSize&amp; size)
</del><ins>+void ScrollView::setUnobscuredContentSize(const FloatSize&amp; size)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!platformWidget());
</span><span class="cx">     m_unobscuredContentSize = size;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (170772 => 170773)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-07-03 21:52:32 UTC (rev 170772)
+++ trunk/Source/WebKit2/ChangeLog        2014-07-03 22:11:30 UTC (rev 170773)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2014-07-03  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
+
+        [iOS][WK2] Fix small bugs of dynamicViewportSizeUpdate that were causing inaccuracies in the computed target
+        https://bugs.webkit.org/show_bug.cgi?id=134582
+
+        Reviewed by Tim Horton.
+
+        This patch fixes two small bugs that were causing &quot;jumpiness&quot; on animated resize:
+        1) The new scale was less accurate than the target scale, making the WebProcess force a worse scale on the content.
+        2) The code putting back the rects in view was ignoring the obscured insets, constraining the scroll position more
+           than it should be.
+
+        The first problem was cause by a series of rounding issues accumulating to the fact that &quot;scale != targetScale&quot;
+        was almost never true.
+
+        The first issue is that the unobscured content size was stored in integer coordinates. Because of that, it was
+        impossible to determine accurately how much content is in the view.
+        The outcome was that visibleHorizontalFraction was very inaccurate compared to what the UIProcess computed.
+
+        Another issue affecting the scale is that scaleAfterViewportWidthChange was computing the widthToKeepInView
+        on floating point. Since ARM64 does all those computations on doubles in the UIProcess, the value would be quite
+        different from the received targetScale.
+
+        Finally, the code uses withinEpsilon() instead of a strict equality to reduce the effect of rounding errors.
+
+        For the second issue, the problem was that I was bounding the exposed rect to the page bounds. It is completely
+        valid to have an exposed rect outside the page bounds, that area is just under the obscured insets.
+
+        On the other hand, the unobscured rect needs to be within the bounds as we do not want to rotate to a rubberbanding
+        position. The fix is simply to put the right rect into bounds, and the horizontal/vertical adjustement applies on
+        both rects.
+
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::scaleAfterViewportWidthChange):
+        (WebKit::WebPage::dynamicViewportSizeUpdate):
+        (WebKit::WebPage::updateVisibleContentRects):
+
</ins><span class="cx"> 2014-07-03  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix build.
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (170772 => 170773)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2014-07-03 21:52:32 UTC (rev 170772)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2014-07-03 22:11:30 UTC (rev 170773)
</span><span class="lines">@@ -170,7 +170,7 @@
</span><span class="cx">     if (userHasChangedPageScaleFactor) {
</span><span class="cx">         // When the content size changes, we keep the same relative horizontal content width in view, otherwise we would
</span><span class="cx">         // end up zoomed too far in landscape-&gt;portrait, and too close in portrait-&gt;landscape.
</span><del>-        float widthToKeepInView = visibleHorizontalFraction * newContentSize.width();
</del><ins>+        double widthToKeepInView = visibleHorizontalFraction * newContentSize.width();
</ins><span class="cx">         double newScale = unobscuredWidthInScrollViewCoordinates / widthToKeepInView;
</span><span class="cx">         scale = std::max(std::min(newScale, viewportConfiguration.maximumScale()), viewportConfiguration.minimumScale());
</span><span class="cx">     }
</span><span class="lines">@@ -2161,9 +2161,8 @@
</span><span class="cx">     float relativeHorizontalPositionInNodeAtCenter = 0;
</span><span class="cx">     float relativeVerticalPositionInNodeAtCenter = 0;
</span><span class="cx">     {
</span><del>-        IntRect unobscuredContentRect = frameView.unobscuredContentRect();
-        visibleHorizontalFraction = static_cast&lt;float&gt;(unobscuredContentRect.width()) / oldContentSize.width();
-        IntPoint unobscuredContentRectCenter = unobscuredContentRect.center();
</del><ins>+        visibleHorizontalFraction = frameView.unobscuredContentSize().width() / oldContentSize.width();
+        IntPoint unobscuredContentRectCenter = frameView.unobscuredContentRect().center();
</ins><span class="cx"> 
</span><span class="cx">         HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::DisallowShadowContent);
</span><span class="cx">         HitTestResult hitTestResult = HitTestResult(unobscuredContentRectCenter);
</span><span class="lines">@@ -2199,7 +2198,8 @@
</span><span class="cx">     FloatRect newUnobscuredContentRect = targetUnobscuredRect;
</span><span class="cx">     FloatRect newExposedContentRect = targetExposedContentRect;
</span><span class="cx"> 
</span><del>-    if (scale != targetScale) {
</del><ins>+    bool scaleChanged = !withinEpsilon(scale, targetScale);
+    if (scaleChanged) {
</ins><span class="cx">         // The target scale the UI is using cannot be reached by the content. We need to compute new targets based
</span><span class="cx">         // on the viewport constraint and report everything back to the UIProcess.
</span><span class="cx"> 
</span><span class="lines">@@ -2222,7 +2222,7 @@
</span><span class="cx">                                           newUnobscuredRectHeight + obscuredTopMargin + obscuredBottomMargin);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (oldContentSize != newContentSize || scale != targetScale) {
</del><ins>+    if (oldContentSize != newContentSize || scaleChanged) {
</ins><span class="cx">         // Snap the new unobscured rect back into the content rect.
</span><span class="cx">         newUnobscuredContentRect.setWidth(std::min(static_cast&lt;float&gt;(newContentSize.width()), newUnobscuredContentRect.width()));
</span><span class="cx">         newUnobscuredContentRect.setHeight(std::min(static_cast&lt;float&gt;(newContentSize.height()), newUnobscuredContentRect.height()));
</span><span class="lines">@@ -2278,14 +2278,14 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         float horizontalAdjustment = 0;
</span><del>-        if (newExposedContentRect.maxX() &gt; newContentSize.width())
</del><ins>+        if (newUnobscuredContentRect.maxX() &gt; newContentSize.width())
</ins><span class="cx">             horizontalAdjustment -= newUnobscuredContentRect.maxX() - newContentSize.width();
</span><span class="cx">         float verticalAdjustment = 0;
</span><del>-        if (newExposedContentRect.maxY() &gt; newContentSize.height())
</del><ins>+        if (newUnobscuredContentRect.maxY() &gt; newContentSize.height())
</ins><span class="cx">             verticalAdjustment -= newUnobscuredContentRect.maxY() - newContentSize.height();
</span><del>-        if (newExposedContentRect.x() &lt; 0)
</del><ins>+        if (newUnobscuredContentRect.x() &lt; 0)
</ins><span class="cx">             horizontalAdjustment += - newUnobscuredContentRect.x();
</span><del>-        if (newExposedContentRect.y() &lt; 0)
</del><ins>+        if (newUnobscuredContentRect.y() &lt; 0)
</ins><span class="cx">             verticalAdjustment += - newUnobscuredContentRect.y();
</span><span class="cx"> 
</span><span class="cx">         FloatPoint adjustmentDelta(horizontalAdjustment, verticalAdjustment);
</span><span class="lines">@@ -2295,11 +2295,11 @@
</span><span class="cx"> 
</span><span class="cx">     frameView.setScrollVelocity(0, 0, 0, monotonicallyIncreasingTime());
</span><span class="cx"> 
</span><del>-    IntRect roundedUnobscuredContentRect = roundedIntRect(newUnobscuredContentRect);
-    frameView.setUnobscuredContentSize(roundedUnobscuredContentRect.size());
</del><ins>+    IntPoint roundedUnobscuredContentRectPosition = roundedIntPoint(newUnobscuredContentRect.location());
+    frameView.setUnobscuredContentSize(newUnobscuredContentRect.size());
</ins><span class="cx">     m_drawingArea-&gt;setExposedContentRect(newExposedContentRect);
</span><span class="cx"> 
</span><del>-    scalePage(scale, roundedUnobscuredContentRect.location());
</del><ins>+    scalePage(scale, roundedUnobscuredContentRectPosition);
</ins><span class="cx"> 
</span><span class="cx">     frameView.updateLayoutAndStyleIfNeededRecursive();
</span><span class="cx">     IntRect fixedPositionLayoutRect = enclosingIntRect(frameView.viewportConstrainedObjectsRect());
</span><span class="lines">@@ -2307,7 +2307,7 @@
</span><span class="cx"> 
</span><span class="cx">     frameView.setCustomSizeForResizeEvent(expandedIntSize(targetUnobscuredRectInScrollViewCoordinates.size()));
</span><span class="cx">     setDeviceOrientation(deviceOrientation);
</span><del>-    frameView.setScrollOffset(roundedUnobscuredContentRect.location());
</del><ins>+    frameView.setScrollOffset(roundedUnobscuredContentRectPosition);
</ins><span class="cx"> 
</span><span class="cx">     send(Messages::WebPageProxy::DynamicViewportUpdateChangedTarget(pageScaleFactor(), frameView.scrollPosition()));
</span><span class="cx"> }
</span><span class="lines">@@ -2445,8 +2445,7 @@
</span><span class="cx">     FloatRect adjustedExposedRect = adjustExposedRectForBoundedScale(exposedRect, visibleContentRectUpdateInfo.scale(), boundedScale);
</span><span class="cx">     m_drawingArea-&gt;setExposedContentRect(adjustedExposedRect);
</span><span class="cx"> 
</span><del>-    IntRect roundedUnobscuredRect = roundedIntRect(visibleContentRectUpdateInfo.unobscuredRect());
-    IntPoint scrollPosition = roundedUnobscuredRect.location();
</del><ins>+    IntPoint scrollPosition = roundedIntPoint(visibleContentRectUpdateInfo.unobscuredRect().location());
</ins><span class="cx"> 
</span><span class="cx">     float floatBoundedScale = boundedScale;
</span><span class="cx">     bool hasSetPageScale = false;
</span><span class="lines">@@ -2472,7 +2471,7 @@
</span><span class="cx">     if (scrollPosition != frameView.scrollPosition())
</span><span class="cx">         m_dynamicSizeUpdateHistory.clear();
</span><span class="cx"> 
</span><del>-    frameView.setUnobscuredContentSize(roundedUnobscuredRect.size());
</del><ins>+    frameView.setUnobscuredContentSize(visibleContentRectUpdateInfo.unobscuredRect().size());
</ins><span class="cx"> 
</span><span class="cx">     double horizontalVelocity = visibleContentRectUpdateInfo.horizontalVelocity();
</span><span class="cx">     double verticalVelocity = visibleContentRectUpdateInfo.verticalVelocity();
</span></span></pre>
</div>
</div>

</body>
</html>