<!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>[288336] trunk</title>
</head>
<body>

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

<h3>Log Message</h3>
<pre>REGRESSION (<a href="http://trac.webkit.org/projects/webkit/changeset/284136">r284136</a>): A slight horizontal rubberband kills scroll momentum
https://bugs.webkit.org/show_bug.cgi?id=234384

Reviewed by Tim Horton.

Source/WebCore:

ScrollAnimationRubberBand subtly changed the behavior of the rubberband animation on the
axis that is not the rubberbanding axis. Because it converged on m_targetOffset, it always
resulted in no offset on that axis.

Fix by restoring the behavior from before <a href="http://trac.webkit.org/projects/webkit/changeset/284136">r284136</a>, which applies the rubberbanding as a
delta from the current offset and no longer uses m_targetOffset, which is removed. It's a
bit surprising that this rubberband animation drives a vertical scroll when the gesture is
primarily horizontal (normally we'd clamp these deltas to be purely horizontal), but people
are used to this behavior so restore it.

Test: fast/scrolling/mac/j-shaped-scroll-rubberband.html

* platform/ScrollAnimation.h:
* platform/ScrollingEffectsController.cpp:
(WebCore::ScrollingEffectsController::overscrollAmount):
(WebCore::ScrollingEffectsController::scrollOffset):
* platform/ScrollingEffectsController.h:
* platform/mac/ScrollAnimationRubberBand.h:
* platform/mac/ScrollAnimationRubberBand.mm:
(WebCore::ScrollAnimationRubberBand::startRubberBandAnimation):
(WebCore::ScrollAnimationRubberBand::serviceAnimation):
(WebCore::ScrollAnimationRubberBand::debugDescription const):
* platform/mac/ScrollingEffectsController.mm:
(WebCore::ScrollingEffectsController::startRubberBandAnimation):
(WebCore::ScrollingEffectsController::startRubberBandAnimationIfNecessary):

LayoutTests:

* fast/scrolling/mac/j-shaped-scroll-rubberband-expected.txt: Added.
* fast/scrolling/mac/j-shaped-scroll-rubberband.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollAnimationh">trunk/Source/WebCore/platform/ScrollAnimation.h</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollingEffectsControllercpp">trunk/Source/WebCore/platform/ScrollingEffectsController.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollingEffectsControllerh">trunk/Source/WebCore/platform/ScrollingEffectsController.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacScrollAnimationRubberBandh">trunk/Source/WebCore/platform/mac/ScrollAnimationRubberBand.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacScrollAnimationRubberBandmm">trunk/Source/WebCore/platform/mac/ScrollAnimationRubberBand.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmacScrollingEffectsControllermm">trunk/Source/WebCore/platform/mac/ScrollingEffectsController.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastscrollingmacjshapedscrollrubberbandexpectedtxt">trunk/LayoutTests/fast/scrolling/mac/j-shaped-scroll-rubberband-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastscrollingmacjshapedscrollrubberbandhtml">trunk/LayoutTests/fast/scrolling/mac/j-shaped-scroll-rubberband.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (288335 => 288336)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2022-01-21 01:13:00 UTC (rev 288335)
+++ trunk/LayoutTests/ChangeLog 2022-01-21 01:23:53 UTC (rev 288336)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2022-01-20  Simon Fraser  <simon.fraser@apple.com>
+
+        REGRESSION (r284136): A slight horizontal rubberband kills scroll momentum
+        https://bugs.webkit.org/show_bug.cgi?id=234384
+
+        Reviewed by Tim Horton.
+
+        * fast/scrolling/mac/j-shaped-scroll-rubberband-expected.txt: Added.
+        * fast/scrolling/mac/j-shaped-scroll-rubberband.html: Added.
+
</ins><span class="cx"> 2022-01-20  Rob Buis  <rbuis@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         Mark range boundary point containers
</span></span></pre></div>
<a id="trunkLayoutTestsfastscrollingmacjshapedscrollrubberbandexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/scrolling/mac/j-shaped-scroll-rubberband-expected.txt (0 => 288336)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/mac/j-shaped-scroll-rubberband-expected.txt                             (rev 0)
+++ trunk/LayoutTests/fast/scrolling/mac/j-shaped-scroll-rubberband-expected.txt        2022-01-21 01:23:53 UTC (rev 288336)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+PASS window.scrollY > 0 is true
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingmacjshapedscrollrubberbandhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/scrolling/mac/j-shaped-scroll-rubberband.html (0 => 288336)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/mac/j-shaped-scroll-rubberband.html                             (rev 0)
+++ trunk/LayoutTests/fast/scrolling/mac/j-shaped-scroll-rubberband.html        2022-01-21 01:23:53 UTC (rev 288336)
</span><span class="lines">@@ -0,0 +1,126 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+    <style>
+        body {
+            height: 5000px;
+        }
+    </style>
+    <script src="../../../resources/js-test-pre.js"></script>
+    <script src="../../../resources/ui-helper.js"></script>
+    <script>
+        var jsTestIsAsync = true;
+
+        function checkForScroll()
+        {
+            shouldBeTrue('window.scrollY > 0');
+            testRunner.notifyDone();
+        }
+
+        async function scrollTest()
+        {
+            // Gesture that starts horizontal then has some upward trajectory at the end.
+            const events = [
+                {
+                    type : "wheel",
+                    viewX : 100,
+                    viewY : 100,
+                    deltaX : 1,
+                    phase : "began"
+                },
+                {
+                    type : "wheel",
+                    deltaX : 4,
+                    deltaY : -1,
+                    phase : "changed"
+                },
+                {
+                    type : "wheel",
+                    viewX : 101, // defeat coalescing
+                    deltaX : 6,
+                    deltaY : -2,
+                    phase : "changed"
+                },
+                {
+                    type : "wheel",
+                    viewX : 100, // defeat coalescing
+                    deltaX : 10,
+                    deltaY : -4,
+                    phase : "changed"
+                },
+                {
+                    type : "wheel",
+                    viewX : 101, // defeat coalescing
+                    deltaX : 8,
+                    deltaY : -6,
+                    phase : "changed"
+                },
+                {
+                    type : "wheel",
+                    phase : "ended"
+                },
+                {
+                    type : "wheel",
+                    viewX : 100, // defeat coalescing
+                    deltaX : 10,
+                    deltaY : -6,
+                    momentumPhase : "began"
+                },
+                {
+                    type : "wheel",
+                    viewX : 101, // defeat coalescing
+                    deltaX : 12,
+                    deltaY : -5,
+                    momentumPhase : "changed"
+                },
+                {
+                    type : "wheel",
+                    viewX : 100, // defeat coalescing
+                    deltaX : 8,
+                    deltaY : -4,
+                    momentumPhase : "changed"
+                },
+                {
+                    type : "wheel",
+                    viewX : 101, // defeat coalescing
+                    deltaX : 6,
+                    deltaY : -2,
+                    momentumPhase : "changed"
+                },
+                {
+                    type : "wheel",
+                    viewX : 100, // defeat coalescing
+                    deltaX : 4,
+                    deltaY : -1,
+                    momentumPhase : "changed"
+                },
+                {
+                    type : "wheel",
+                    momentumPhase : "ended"
+                }
+            ];
+            
+            await UIHelper.mouseWheelSequence({ events });
+            checkForScroll();
+        }
+
+        function startTest()
+        {
+            if (!window.eventSender) {
+                setTimeout(scrollTest, 0);
+                return;
+            }
+
+            testRunner.dumpAsText();
+            testRunner.waitUntilDone();
+
+            setTimeout(scrollTest, 0);
+        }
+        
+        window.addEventListener('load', startTest, false);
+    </script>
+</head>
+<body>
+    <script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (288335 => 288336)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2022-01-21 01:13:00 UTC (rev 288335)
+++ trunk/Source/WebCore/ChangeLog      2022-01-21 01:23:53 UTC (rev 288336)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2022-01-20  Simon Fraser  <simon.fraser@apple.com>
+
+        REGRESSION (r284136): A slight horizontal rubberband kills scroll momentum
+        https://bugs.webkit.org/show_bug.cgi?id=234384
+
+        Reviewed by Tim Horton.
+
+        ScrollAnimationRubberBand subtly changed the behavior of the rubberband animation on the
+        axis that is not the rubberbanding axis. Because it converged on m_targetOffset, it always
+        resulted in no offset on that axis.
+        
+        Fix by restoring the behavior from before r284136, which applies the rubberbanding as a
+        delta from the current offset and no longer uses m_targetOffset, which is removed. It's a
+        bit surprising that this rubberband animation drives a vertical scroll when the gesture is
+        primarily horizontal (normally we'd clamp these deltas to be purely horizontal), but people
+        are used to this behavior so restore it.
+
+        Test: fast/scrolling/mac/j-shaped-scroll-rubberband.html
+
+        * platform/ScrollAnimation.h:
+        * platform/ScrollingEffectsController.cpp:
+        (WebCore::ScrollingEffectsController::overscrollAmount):
+        (WebCore::ScrollingEffectsController::scrollOffset):
+        * platform/ScrollingEffectsController.h:
+        * platform/mac/ScrollAnimationRubberBand.h:
+        * platform/mac/ScrollAnimationRubberBand.mm:
+        (WebCore::ScrollAnimationRubberBand::startRubberBandAnimation):
+        (WebCore::ScrollAnimationRubberBand::serviceAnimation):
+        (WebCore::ScrollAnimationRubberBand::debugDescription const):
+        * platform/mac/ScrollingEffectsController.mm:
+        (WebCore::ScrollingEffectsController::startRubberBandAnimation):
+        (WebCore::ScrollingEffectsController::startRubberBandAnimationIfNecessary):
+
</ins><span class="cx"> 2022-01-20  Tyler Wilcock  <tyler_w@apple.com>
</span><span class="cx"> 
</span><span class="cx">         AXCoreObject::childrenIDs can be simplified and more efficient by using map
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollAnimationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollAnimation.h (288335 => 288336)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollAnimation.h  2022-01-21 01:13:00 UTC (rev 288335)
+++ trunk/Source/WebCore/platform/ScrollAnimation.h     2022-01-21 01:23:53 UTC (rev 288336)
</span><span class="lines">@@ -45,6 +45,8 @@
</span><span class="cx">     virtual void scrollAnimationWillStart(ScrollAnimation&) { }
</span><span class="cx">     virtual void scrollAnimationDidEnd(ScrollAnimation&) { }
</span><span class="cx">     virtual ScrollExtents scrollExtentsForAnimation(ScrollAnimation&) = 0;
</span><ins>+    virtual FloatSize overscrollAmount(ScrollAnimation&) = 0;
+    virtual FloatPoint scrollOffset(ScrollAnimation&) = 0;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class ScrollAnimation {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollingEffectsControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollingEffectsController.cpp (288335 => 288336)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollingEffectsController.cpp     2022-01-21 01:13:00 UTC (rev 288335)
+++ trunk/Source/WebCore/platform/ScrollingEffectsController.cpp        2022-01-21 01:23:53 UTC (rev 288336)
</span><span class="lines">@@ -522,6 +522,20 @@
</span><span class="cx">     return m_client.scrollExtents();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+FloatSize ScrollingEffectsController::overscrollAmount(ScrollAnimation&)
+{
+#if HAVE(RUBBER_BANDING)
+    return m_client.stretchAmount();
+#else
+    return { };
+#endif
+}
+
+FloatPoint ScrollingEffectsController::scrollOffset(ScrollAnimation&)
+{
+    return m_client.scrollOffset();
+}
+
</ins><span class="cx"> void ScrollingEffectsController::startDeferringWheelEventTestCompletion(WheelEventTestMonitor::DeferReason reason)
</span><span class="cx"> {
</span><span class="cx">     m_client.deferWheelEventTestCompletionForReason(reinterpret_cast<WheelEventTestMonitor::ScrollableAreaIdentifier>(this), reason);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollingEffectsControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollingEffectsController.h (288335 => 288336)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollingEffectsController.h       2022-01-21 01:13:00 UTC (rev 288335)
+++ trunk/Source/WebCore/platform/ScrollingEffectsController.h  2022-01-21 01:23:53 UTC (rev 288336)
</span><span class="lines">@@ -205,7 +205,7 @@
</span><span class="cx"> 
</span><span class="cx">     void startRubberBandAnimationIfNecessary();
</span><span class="cx"> 
</span><del>-    bool startRubberBandAnimation(const FloatPoint& targetOffset, const FloatSize& initialVelocity, const FloatSize& initialOverscroll);
</del><ins>+    bool startRubberBandAnimation(const FloatSize& initialVelocity, const FloatSize& initialOverscroll);
</ins><span class="cx">     void stopRubberBandAnimation();
</span><span class="cx"> 
</span><span class="cx">     void willStartRubberBandAnimation();
</span><span class="lines">@@ -227,6 +227,8 @@
</span><span class="cx">     void scrollAnimationWillStart(ScrollAnimation&) final;
</span><span class="cx">     void scrollAnimationDidEnd(ScrollAnimation&) final;
</span><span class="cx">     ScrollExtents scrollExtentsForAnimation(ScrollAnimation&) final;
</span><ins>+    FloatSize overscrollAmount(ScrollAnimation&) final;
+    FloatPoint scrollOffset(ScrollAnimation&) final;
</ins><span class="cx"> 
</span><span class="cx">     void adjustDeltaForSnappingIfNeeded(float& deltaX, float& deltaY);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacScrollAnimationRubberBandh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/ScrollAnimationRubberBand.h (288335 => 288336)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/ScrollAnimationRubberBand.h    2022-01-21 01:13:00 UTC (rev 288335)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimationRubberBand.h       2022-01-21 01:23:53 UTC (rev 288336)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">     virtual ~ScrollAnimationRubberBand();
</span><span class="cx"> 
</span><span class="cx">     // targetOffset is the scroll offset when the animation has finished (i.e. scrolled to an edge).
</span><del>-    bool startRubberBandAnimation(const FloatPoint& targetOffset, const FloatSize& initialVelocity, const FloatSize& initialOverscroll);
</del><ins>+    bool startRubberBandAnimation(const FloatSize& initialVelocity, const FloatSize& initialOverscroll);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     void updateScrollExtents() final;
</span><span class="lines">@@ -47,7 +47,6 @@
</span><span class="cx"> 
</span><span class="cx">     bool animateScroll(MonotonicTime);
</span><span class="cx"> 
</span><del>-    FloatPoint m_targetOffset;
</del><span class="cx">     FloatSize m_initialVelocity;
</span><span class="cx">     FloatSize m_initialOverscroll;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacScrollAnimationRubberBandmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/ScrollAnimationRubberBand.mm (288335 => 288336)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/ScrollAnimationRubberBand.mm   2022-01-21 01:13:00 UTC (rev 288335)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimationRubberBand.mm      2022-01-21 01:23:53 UTC (rev 288336)
</span><span class="lines">@@ -59,9 +59,8 @@
</span><span class="cx"> 
</span><span class="cx"> ScrollAnimationRubberBand::~ScrollAnimationRubberBand() = default;
</span><span class="cx"> 
</span><del>-bool ScrollAnimationRubberBand::startRubberBandAnimation(const FloatPoint& targetOffset, const FloatSize& initialVelocity, const FloatSize& initialOverscroll)
</del><ins>+bool ScrollAnimationRubberBand::startRubberBandAnimation(const FloatSize& initialVelocity, const FloatSize& initialOverscroll)
</ins><span class="cx"> {
</span><del>-    m_targetOffset = targetOffset;
</del><span class="cx">     m_initialVelocity = initialVelocity;
</span><span class="cx">     m_initialOverscroll = initialOverscroll;
</span><span class="cx"> 
</span><span class="lines">@@ -93,7 +92,9 @@
</span><span class="cx"> 
</span><span class="cx">     // We might be rubberbanding away from an edge and back, so wait a frame or two before checking for completion.
</span><span class="cx">     bool animationComplete = rubberBandOffset.isZero() && elapsedTime > 24_ms;
</span><del>-    m_currentOffset = m_targetOffset + rubberBandOffset;
</del><ins>+    
+    auto scrollDelta = rubberBandOffset - m_client.overscrollAmount(*this);
+    m_currentOffset = m_client.scrollOffset(*this) + scrollDelta;
</ins><span class="cx"> 
</span><span class="cx">     m_client.scrollAnimationDidUpdate(*this, m_currentOffset);
</span><span class="cx"> 
</span><span class="lines">@@ -104,7 +105,7 @@
</span><span class="cx"> String ScrollAnimationRubberBand::debugDescription() const
</span><span class="cx"> {
</span><span class="cx">     TextStream textStream;
</span><del>-    textStream << "ScrollAnimationRubberBand " << this << " active " << isActive() << " target " << m_targetOffset << " current offset " << currentOffset();
</del><ins>+    textStream << "ScrollAnimationRubberBand " << this << " active " << isActive() << " initial velocity " << m_initialVelocity << " initial overscroll " << m_initialOverscroll;
</ins><span class="cx">     return textStream.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacScrollingEffectsControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/ScrollingEffectsController.mm (288335 => 288336)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/ScrollingEffectsController.mm  2022-01-21 01:13:00 UTC (rev 288335)
+++ trunk/Source/WebCore/platform/mac/ScrollingEffectsController.mm     2022-01-21 01:23:53 UTC (rev 288336)
</span><span class="lines">@@ -399,13 +399,13 @@
</span><span class="cx">     updateRubberBandingState();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool ScrollingEffectsController::startRubberBandAnimation(const FloatPoint& targetOffset, const FloatSize& initialVelocity, const FloatSize& initialOverscroll)
</del><ins>+bool ScrollingEffectsController::startRubberBandAnimation(const FloatSize& initialVelocity, const FloatSize& initialOverscroll)
</ins><span class="cx"> {
</span><span class="cx">     if (m_currentAnimation)
</span><span class="cx">         m_currentAnimation->stop();
</span><span class="cx"> 
</span><span class="cx">     m_currentAnimation = makeUnique<ScrollAnimationRubberBand>(*this);
</span><del>-    bool started = downcast<ScrollAnimationRubberBand>(*m_currentAnimation).startRubberBandAnimation(targetOffset, initialVelocity, initialOverscroll);
</del><ins>+    bool started = downcast<ScrollAnimationRubberBand>(*m_currentAnimation).startRubberBandAnimation(initialVelocity, initialOverscroll);
</ins><span class="cx">     LOG_WITH_STREAM(ScrollAnimations, stream << "ScrollingEffectsController::startRubberBandAnimation() - animation " << *m_currentAnimation << " started " << started);
</span><span class="cx">     return started;
</span><span class="cx"> }
</span><span class="lines">@@ -464,8 +464,8 @@
</span><span class="cx">     if (!m_client.allowsVerticalScrolling())
</span><span class="cx">         initialVelocity.setHeight(0);
</span><span class="cx"> 
</span><del>-    LOG_WITH_STREAM(ScrollAnimations, stream << "ScrollingEffectsController::startRubberBandAnimationIfNecessary() - rubberBandAnimationRunning " << m_isAnimatingRubberBand << " stretchAmount " << stretchAmount << " contrainedOffset " << contrainedOffset << " initialVelocity " << initialVelocity);
-    startRubberBandAnimation(contrainedOffset, initialVelocity, stretchAmount);
</del><ins>+    LOG_WITH_STREAM(ScrollAnimations, stream << "ScrollingEffectsController::startRubberBandAnimationIfNecessary() - rubberBandAnimationRunning " << m_isAnimatingRubberBand << " stretchAmount " << stretchAmount << " initialVelocity " << initialVelocity);
+    startRubberBandAnimation(initialVelocity, stretchAmount);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool ScrollingEffectsController::shouldRubberBandOnSide(BoxSide side) const
</span></span></pre>
</div>
</div>

</body>
</html>