<!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>[195661] trunk/Source/WebCore</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/195661">195661</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2016-01-27 02:32:59 -0800 (Wed, 27 Jan 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[GTK][EFL] Rename ScrollAnimationNone as ScrollAnimationSmooth
https://bugs.webkit.org/show_bug.cgi?id=153481

Reviewed by Simon Fraser.

ScrollAnimationNone has always been used by EFL and GTK ports to
implement smooth scrolling. I think it should be possible for
other scroll animators to implement smooth scrolling or even
implement other kind of scroll animations. For example, in the
future I would like to have kinetic scrolling implemented for the
GTK+ port to match all other GTK+ application and decide at
runtime between different animations without having to use a
different scroll animator class. So, this patch also moves the
smooth scrolling animation implementation to its own class
ScrollAnimationSmooth that impements an interface ScrollAnimation
that could be used to implement other animations. This will allow
the GTK+ port to add its own scroll animator class and still
support smooth scrolling sharing the code with the
ScrollAnimationSmooth.

* PlatformEfl.cmake: Add new files to compilation and remove ScrollAnimationNone.
* PlatformGTK.cmake: Ditto.
* platform/ScrollAnimation.h: Added.
(WebCore::ScrollAnimation::serviceAnimation):
(WebCore::ScrollAnimation::ScrollAnimation):
* platform/ScrollAnimationSmooth.cpp: Added.
(WebCore::ScrollAnimationSmooth::ScrollAnimationSmooth):
(WebCore::ScrollAnimationSmooth::scroll):
(WebCore::ScrollAnimationSmooth::stop):
(WebCore::ScrollAnimationSmooth::updateVisibleLengths):
(WebCore::ScrollAnimationSmooth::setCurrentPosition):
(WebCore::ScrollAnimationSmooth::serviceAnimation):
(WebCore::ScrollAnimationSmooth::~ScrollAnimationSmooth):
(WebCore::curveAt):
(WebCore::attackCurve):
(WebCore::releaseCurve):
(WebCore::coastCurve):
(WebCore::curveIntegralAt):
(WebCore::attackArea):
(WebCore::releaseArea):
(WebCore::getAnimationParametersForGranularity):
(WebCore::ScrollAnimationSmooth::updatePerAxisData):
(WebCore::ScrollAnimationSmooth::animateScroll):
(WebCore::ScrollAnimationSmooth::animationTimerFired):
(WebCore::ScrollAnimationSmooth::startNextTimer):
(WebCore::ScrollAnimationSmooth::animationTimerActive):
* platform/ScrollAnimationSmooth.h: Added.
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::scroll):
(WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation):
(WebCore::ScrollAnimator::setCurrentPosition):
(WebCore::ScrollAnimator::updateActiveScrollSnapIndexForOffset):
(WebCore::ScrollAnimator::notifyPositionChanged):
(WebCore::ScrollAnimator::scrollOffsetOnAxis):
* platform/ScrollAnimator.h:
(WebCore::ScrollAnimator::ScrollAnimator::currentPosition):
* platform/ScrollAnimatorNone.cpp: Removed.
* platform/ScrollAnimatorNone.h: Removed.
* platform/ScrollAnimatorSmooth.cpp: Added.
(WebCore::ScrollAnimator::create):
(WebCore::ScrollAnimatorSmooth::ScrollAnimatorSmooth):
(WebCore::ScrollAnimatorSmooth::~ScrollAnimatorSmooth):
(WebCore::ScrollAnimatorSmooth::scroll):
(WebCore::ScrollAnimatorSmooth::scrollToOffsetWithoutAnimation):
(WebCore::ScrollAnimatorSmooth::cancelAnimations):
(WebCore::ScrollAnimatorSmooth::serviceScrollAnimations):
(WebCore::ScrollAnimatorSmooth::willEndLiveResize):
(WebCore::ScrollAnimatorSmooth::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorSmooth::didAddHorizontalScrollbar):
* platform/ScrollAnimatorSmooth.h: Added.
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::immediateScrollToPosition):
(WebCore::ScrollAnimatorMac::immediateScrollBy):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorePlatformEflcmake">trunk/Source/WebCore/PlatformEfl.cmake</a></li>
<li><a href="#trunkSourceWebCorePlatformGTKcmake">trunk/Source/WebCore/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollAnimatorcpp">trunk/Source/WebCore/platform/ScrollAnimator.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollAnimatorh">trunk/Source/WebCore/platform/ScrollAnimator.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacScrollAnimatorMacmm">trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformScrollAnimationh">trunk/Source/WebCore/platform/ScrollAnimation.h</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollAnimationSmoothcpp">trunk/Source/WebCore/platform/ScrollAnimationSmooth.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollAnimationSmoothh">trunk/Source/WebCore/platform/ScrollAnimationSmooth.h</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollAnimatorSmoothcpp">trunk/Source/WebCore/platform/ScrollAnimatorSmooth.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollAnimatorSmoothh">trunk/Source/WebCore/platform/ScrollAnimatorSmooth.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformScrollAnimatorNonecpp">trunk/Source/WebCore/platform/ScrollAnimatorNone.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollAnimatorNoneh">trunk/Source/WebCore/platform/ScrollAnimatorNone.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (195660 => 195661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-01-27 10:28:49 UTC (rev 195660)
+++ trunk/Source/WebCore/ChangeLog        2016-01-27 10:32:59 UTC (rev 195661)
</span><span class="lines">@@ -1,5 +1,81 @@
</span><span class="cx"> 2016-01-27  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><ins>+        [GTK][EFL] Rename ScrollAnimationNone as ScrollAnimationSmooth
+        https://bugs.webkit.org/show_bug.cgi?id=153481
+
+        Reviewed by Simon Fraser.
+
+        ScrollAnimationNone has always been used by EFL and GTK ports to
+        implement smooth scrolling. I think it should be possible for
+        other scroll animators to implement smooth scrolling or even
+        implement other kind of scroll animations. For example, in the
+        future I would like to have kinetic scrolling implemented for the
+        GTK+ port to match all other GTK+ application and decide at
+        runtime between different animations without having to use a
+        different scroll animator class. So, this patch also moves the
+        smooth scrolling animation implementation to its own class
+        ScrollAnimationSmooth that impements an interface ScrollAnimation
+        that could be used to implement other animations. This will allow
+        the GTK+ port to add its own scroll animator class and still
+        support smooth scrolling sharing the code with the
+        ScrollAnimationSmooth.
+
+        * PlatformEfl.cmake: Add new files to compilation and remove ScrollAnimationNone.
+        * PlatformGTK.cmake: Ditto.
+        * platform/ScrollAnimation.h: Added.
+        (WebCore::ScrollAnimation::serviceAnimation):
+        (WebCore::ScrollAnimation::ScrollAnimation):
+        * platform/ScrollAnimationSmooth.cpp: Added.
+        (WebCore::ScrollAnimationSmooth::ScrollAnimationSmooth):
+        (WebCore::ScrollAnimationSmooth::scroll):
+        (WebCore::ScrollAnimationSmooth::stop):
+        (WebCore::ScrollAnimationSmooth::updateVisibleLengths):
+        (WebCore::ScrollAnimationSmooth::setCurrentPosition):
+        (WebCore::ScrollAnimationSmooth::serviceAnimation):
+        (WebCore::ScrollAnimationSmooth::~ScrollAnimationSmooth):
+        (WebCore::curveAt):
+        (WebCore::attackCurve):
+        (WebCore::releaseCurve):
+        (WebCore::coastCurve):
+        (WebCore::curveIntegralAt):
+        (WebCore::attackArea):
+        (WebCore::releaseArea):
+        (WebCore::getAnimationParametersForGranularity):
+        (WebCore::ScrollAnimationSmooth::updatePerAxisData):
+        (WebCore::ScrollAnimationSmooth::animateScroll):
+        (WebCore::ScrollAnimationSmooth::animationTimerFired):
+        (WebCore::ScrollAnimationSmooth::startNextTimer):
+        (WebCore::ScrollAnimationSmooth::animationTimerActive):
+        * platform/ScrollAnimationSmooth.h: Added.
+        * platform/ScrollAnimator.cpp:
+        (WebCore::ScrollAnimator::scroll):
+        (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation):
+        (WebCore::ScrollAnimator::setCurrentPosition):
+        (WebCore::ScrollAnimator::updateActiveScrollSnapIndexForOffset):
+        (WebCore::ScrollAnimator::notifyPositionChanged):
+        (WebCore::ScrollAnimator::scrollOffsetOnAxis):
+        * platform/ScrollAnimator.h:
+        (WebCore::ScrollAnimator::ScrollAnimator::currentPosition):
+        * platform/ScrollAnimatorNone.cpp: Removed.
+        * platform/ScrollAnimatorNone.h: Removed.
+        * platform/ScrollAnimatorSmooth.cpp: Added.
+        (WebCore::ScrollAnimator::create):
+        (WebCore::ScrollAnimatorSmooth::ScrollAnimatorSmooth):
+        (WebCore::ScrollAnimatorSmooth::~ScrollAnimatorSmooth):
+        (WebCore::ScrollAnimatorSmooth::scroll):
+        (WebCore::ScrollAnimatorSmooth::scrollToOffsetWithoutAnimation):
+        (WebCore::ScrollAnimatorSmooth::cancelAnimations):
+        (WebCore::ScrollAnimatorSmooth::serviceScrollAnimations):
+        (WebCore::ScrollAnimatorSmooth::willEndLiveResize):
+        (WebCore::ScrollAnimatorSmooth::didAddVerticalScrollbar):
+        (WebCore::ScrollAnimatorSmooth::didAddHorizontalScrollbar):
+        * platform/ScrollAnimatorSmooth.h: Added.
+        * platform/mac/ScrollAnimatorMac.mm:
+        (WebCore::ScrollAnimatorMac::immediateScrollToPosition):
+        (WebCore::ScrollAnimatorMac::immediateScrollBy):
+
+2016-01-27  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
</ins><span class="cx">         Overlay scrollbars should always use the whole contents
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=153352
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorePlatformEflcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformEfl.cmake (195660 => 195661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformEfl.cmake        2016-01-27 10:28:49 UTC (rev 195660)
+++ trunk/Source/WebCore/PlatformEfl.cmake        2016-01-27 10:32:59 UTC (rev 195661)
</span><span class="lines">@@ -517,7 +517,8 @@
</span><span class="cx"> 
</span><span class="cx"> if (ENABLE_SMOOTH_SCROLLING)
</span><span class="cx">     list(APPEND WebCore_SOURCES
</span><del>-        platform/ScrollAnimatorNone.cpp
</del><ins>+        platform/ScrollAnimationSmooth.cpp
+        platform/ScrollAnimatorSmooth.cpp
</ins><span class="cx">     )
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorePlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformGTK.cmake (195660 => 195661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformGTK.cmake        2016-01-27 10:28:49 UTC (rev 195660)
+++ trunk/Source/WebCore/PlatformGTK.cmake        2016-01-27 10:32:59 UTC (rev 195661)
</span><span class="lines">@@ -935,7 +935,8 @@
</span><span class="cx"> 
</span><span class="cx"> if (ENABLE_SMOOTH_SCROLLING)
</span><span class="cx">     list(APPEND WebCore_SOURCES
</span><del>-        platform/ScrollAnimatorNone.cpp
</del><ins>+        platform/ScrollAnimationSmooth.cpp
+        platform/ScrollAnimatorSmooth.cpp
</ins><span class="cx">     )
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollAnimationh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/ScrollAnimation.h (0 => 195661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollAnimation.h                                (rev 0)
+++ trunk/Source/WebCore/platform/ScrollAnimation.h        2016-01-27 10:32:59 UTC (rev 195661)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+/*
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ScrollAnimation_h
+#define ScrollAnimation_h
+
+#include &quot;ScrollTypes.h&quot;
+
+namespace WebCore {
+
+class FloatPoint;
+class ScrollableArea;
+
+class ScrollAnimation {
+public:
+    virtual bool scroll(ScrollbarOrientation, ScrollGranularity, float step, float multiplier) = 0;
+    virtual void stop() = 0;
+    virtual void updateVisibleLengths() = 0;
+    virtual void setCurrentPosition(const FloatPoint&amp;) = 0;
+    virtual void serviceAnimation() { };
+
+protected:
+    ScrollAnimation(ScrollableArea&amp; scrollableArea)
+        : m_scrollableArea(scrollableArea)
+    {
+    }
+
+    ScrollableArea&amp; m_scrollableArea;
+};
+
+} // namespace WebCore
+
+#endif // ScrollAnimation_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollAnimationSmoothcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/ScrollAnimationSmooth.cpp (0 => 195661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollAnimationSmooth.cpp                                (rev 0)
+++ trunk/Source/WebCore/platform/ScrollAnimationSmooth.cpp        2016-01-27 10:32:59 UTC (rev 195661)
</span><span class="lines">@@ -0,0 +1,453 @@
</span><ins>+/*
+ * Copyright (C) 2016 Igalia S.L.
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (c) 2011, Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;ScrollAnimationSmooth.h&quot;
+
+#if ENABLE(SMOOTH_SCROLLING)
+
+#include &quot;FloatPoint.h&quot;
+#include &quot;ScrollableArea.h&quot;
+#include &lt;wtf/CurrentTime.h&gt;
+
+namespace WebCore {
+
+static const double frameRate = 60;
+static const double tickTime = 1 / frameRate;
+static const double minimumTimerInterval = .001;
+
+ScrollAnimationSmooth::ScrollAnimationSmooth(ScrollableArea&amp; scrollableArea, std::function&lt;void (FloatPoint&amp;&amp;)&gt;&amp;&amp; notifyPositionChangedFunction)
+    : ScrollAnimation(scrollableArea)
+    , m_notifyPositionChangedFunction(WTFMove(notifyPositionChangedFunction))
+#if USE(REQUEST_ANIMATION_FRAME_TIMER)
+    , m_animationTimer(*this, &amp;ScrollAnimationSmooth::animationTimerFired)
+#else
+    , m_animationActive(false)
+#endif
+{
+}
+
+bool ScrollAnimationSmooth::scroll(ScrollbarOrientation orientation, ScrollGranularity granularity, float step, float multiplier)
+{
+    float minScrollPosition;
+    float maxScrollPosition;
+    if (orientation == HorizontalScrollbar) {
+        minScrollPosition = m_scrollableArea.minimumScrollPosition().x();
+        maxScrollPosition = m_scrollableArea.maximumScrollPosition().x();
+    } else {
+        minScrollPosition = m_scrollableArea.minimumScrollPosition().y();
+        maxScrollPosition = m_scrollableArea.maximumScrollPosition().y();
+    }
+    bool needToScroll = updatePerAxisData(orientation == HorizontalScrollbar ? m_horizontalData : m_verticalData, granularity, step * multiplier, minScrollPosition, maxScrollPosition);
+    if (needToScroll &amp;&amp; !animationTimerActive()) {
+        m_startTime = orientation == HorizontalScrollbar ? m_horizontalData.startTime : m_verticalData.startTime;
+        animationTimerFired();
+    }
+    return needToScroll;
+}
+
+void ScrollAnimationSmooth::stop()
+{
+#if USE(REQUEST_ANIMATION_FRAME_TIMER)
+    m_animationTimer.stop();
+#else
+    m_animationActive = false;
+#endif
+}
+
+void ScrollAnimationSmooth::updateVisibleLengths()
+{
+    m_horizontalData.visibleLength = m_scrollableArea.visibleWidth();
+    m_verticalData.visibleLength = m_scrollableArea.visibleHeight();
+}
+
+void ScrollAnimationSmooth::setCurrentPosition(const FloatPoint&amp; position)
+{
+    stop();
+    m_horizontalData = PerAxisData();
+    m_horizontalData.currentPosition = position.x();
+    m_horizontalData.desiredPosition = m_horizontalData.currentPosition;
+
+    m_verticalData = PerAxisData();
+    m_verticalData.currentPosition = position.y();
+    m_verticalData.desiredPosition = m_verticalData.currentPosition;
+}
+
+#if !USE(REQUEST_ANIMATION_FRAME_TIMER)
+void ScrollAnimationSmooth::serviceAnimation()
+{
+    if (m_animationActive)
+        animationTimerFired();
+}
+#endif
+
+ScrollAnimationSmooth::~ScrollAnimationSmooth()
+{
+}
+
+static inline double curveAt(ScrollAnimationSmooth::Curve curve, double t)
+{
+    switch (curve) {
+    case ScrollAnimationSmooth::Curve::Linear:
+        return t;
+    case ScrollAnimationSmooth::Curve::Quadratic:
+        return t * t;
+    case ScrollAnimationSmooth::Curve::Cubic:
+        return t * t * t;
+    case ScrollAnimationSmooth::Curve::Quartic:
+        return t * t * t * t;
+    case ScrollAnimationSmooth::Curve::Bounce:
+        // Time base is chosen to keep the bounce points simpler:
+        // 1 (half bounce coming in) + 1 + .5 + .25
+        static const double timeBase = 2.75;
+        static const double timeBaseSquared = timeBase * timeBase;
+        if (t &lt; 1 / timeBase)
+            return timeBaseSquared * t * t;
+        if (t &lt; 2 / timeBase) {
+            // Invert a [-.5,.5] quadratic parabola, center it in [1,2].
+            double t1 = t - 1.5 / timeBase;
+            const double parabolaAtEdge = 1 - .5 * .5;
+            return timeBaseSquared * t1 * t1 + parabolaAtEdge;
+        }
+        if (t &lt; 2.5 / timeBase) {
+            // Invert a [-.25,.25] quadratic parabola, center it in [2,2.5].
+            double t2 = t - 2.25 / timeBase;
+            const double parabolaAtEdge = 1 - .25 * .25;
+            return timeBaseSquared * t2 * t2 + parabolaAtEdge;
+        }
+        // Invert a [-.125,.125] quadratic parabola, center it in [2.5,2.75].
+        const double parabolaAtEdge = 1 - .125 * .125;
+        t -= 2.625 / timeBase;
+        return timeBaseSquared * t * t + parabolaAtEdge;
+    }
+    ASSERT_NOT_REACHED();
+    return 0;
+}
+
+static inline double attackCurve(ScrollAnimationSmooth::Curve curve, double deltaTime, double curveT, double startPosition, double attackPosition)
+{
+    double t = deltaTime / curveT;
+    double positionFactor = curveAt(curve, t);
+    return startPosition + positionFactor * (attackPosition - startPosition);
+}
+
+static inline double releaseCurve(ScrollAnimationSmooth::Curve curve, double deltaTime, double curveT, double releasePosition, double desiredPosition)
+{
+    double t = deltaTime / curveT;
+    double positionFactor = 1 - curveAt(curve, 1 - t);
+    return releasePosition + (positionFactor * (desiredPosition - releasePosition));
+}
+
+static inline double coastCurve(ScrollAnimationSmooth::Curve curve, double factor)
+{
+    return 1 - curveAt(curve, 1 - factor);
+}
+
+static inline double curveIntegralAt(ScrollAnimationSmooth::Curve curve, double t)
+{
+    switch (curve) {
+    case ScrollAnimationSmooth::Curve::Linear:
+        return t * t / 2;
+    case ScrollAnimationSmooth::Curve::Quadratic:
+        return t * t * t / 3;
+    case ScrollAnimationSmooth::Curve::Cubic:
+        return t * t * t * t / 4;
+    case ScrollAnimationSmooth::Curve::Quartic:
+        return t * t * t * t * t / 5;
+    case ScrollAnimationSmooth::Curve::Bounce:
+        static const double timeBase = 2.75;
+        static const double timeBaseSquared = timeBase * timeBase;
+        static const double timeBaseSquaredOverThree = timeBaseSquared / 3;
+        double area;
+        double t1 = std::min(t, 1 / timeBase);
+        area = timeBaseSquaredOverThree * t1 * t1 * t1;
+        if (t &lt; 1 / timeBase)
+            return area;
+
+        t1 = std::min(t - 1 / timeBase, 1 / timeBase);
+        // The integral of timeBaseSquared * (t1 - .5 / timeBase) * (t1 - .5 / timeBase) + parabolaAtEdge
+        static const double secondInnerOffset = timeBaseSquared * .5 / timeBase;
+        double bounceArea = t1 * (t1 * (timeBaseSquaredOverThree * t1 - secondInnerOffset) + 1);
+        area += bounceArea;
+        if (t &lt; 2 / timeBase)
+            return area;
+
+        t1 = std::min(t - 2 / timeBase, 0.5 / timeBase);
+        // The integral of timeBaseSquared * (t1 - .25 / timeBase) * (t1 - .25 / timeBase) + parabolaAtEdge
+        static const double thirdInnerOffset = timeBaseSquared * .25 / timeBase;
+        bounceArea =  t1 * (t1 * (timeBaseSquaredOverThree * t1 - thirdInnerOffset) + 1);
+        area += bounceArea;
+        if (t &lt; 2.5 / timeBase)
+            return area;
+
+        t1 = t - 2.5 / timeBase;
+        // The integral of timeBaseSquared * (t1 - .125 / timeBase) * (t1 - .125 / timeBase) + parabolaAtEdge
+        static const double fourthInnerOffset = timeBaseSquared * .125 / timeBase;
+        bounceArea = t1 * (t1 * (timeBaseSquaredOverThree * t1 - fourthInnerOffset) + 1);
+        area += bounceArea;
+        return area;
+    }
+    ASSERT_NOT_REACHED();
+    return 0;
+}
+
+static inline double attackArea(ScrollAnimationSmooth::Curve curve, double startT, double endT)
+{
+    double startValue = curveIntegralAt(curve, startT);
+    double endValue = curveIntegralAt(curve, endT);
+    return endValue - startValue;
+}
+
+static inline double releaseArea(ScrollAnimationSmooth::Curve curve, double startT, double endT)
+{
+    double startValue = curveIntegralAt(curve, 1 - endT);
+    double endValue = curveIntegralAt(curve, 1 - startT);
+    return endValue - startValue;
+}
+
+static inline void getAnimationParametersForGranularity(ScrollGranularity granularity, double&amp; animationTime, double&amp; repeatMinimumSustainTime, double&amp; attackTime, double&amp; releaseTime, ScrollAnimationSmooth::Curve&amp; coastTimeCurve, double&amp; maximumCoastTime)
+{
+    switch (granularity) {
+    case ScrollByDocument:
+        animationTime = 20 * tickTime;
+        repeatMinimumSustainTime = 10 * tickTime;
+        attackTime = 10 * tickTime;
+        releaseTime = 10 * tickTime;
+        coastTimeCurve = ScrollAnimationSmooth::Curve::Linear;
+        maximumCoastTime = 1;
+        break;
+    case ScrollByLine:
+        animationTime = 10 * tickTime;
+        repeatMinimumSustainTime = 7 * tickTime;
+        attackTime = 3 * tickTime;
+        releaseTime = 3 * tickTime;
+        coastTimeCurve = ScrollAnimationSmooth::Curve::Linear;
+        maximumCoastTime = 1;
+        break;
+    case ScrollByPage:
+        animationTime = 15 * tickTime;
+        repeatMinimumSustainTime = 10 * tickTime;
+        attackTime = 5 * tickTime;
+        releaseTime = 5 * tickTime;
+        coastTimeCurve = ScrollAnimationSmooth::Curve::Linear;
+        maximumCoastTime = 1;
+        break;
+    case ScrollByPixel:
+        animationTime = 1 * tickTime;
+        repeatMinimumSustainTime = 2 * tickTime;
+        attackTime = 3 * tickTime;
+        releaseTime = 3 * tickTime;
+        coastTimeCurve = ScrollAnimationSmooth::Curve::Quadratic;
+        maximumCoastTime = 1.25;
+        break;
+    default:
+        ASSERT_NOT_REACHED();
+    }
+}
+
+bool ScrollAnimationSmooth::updatePerAxisData(PerAxisData&amp; data, ScrollGranularity granularity, float delta, float minScrollPosition, float maxScrollPosition)
+{
+    if (!data.startTime || !delta || (delta &lt; 0) != (data.desiredPosition - data.currentPosition &lt; 0)) {
+        data.desiredPosition = data.currentPosition;
+        data.startTime = 0;
+    }
+    float newPosition = data.desiredPosition + delta;
+
+    newPosition = std::max(std::min(newPosition, maxScrollPosition), minScrollPosition);
+
+    if (newPosition == data.desiredPosition)
+        return false;
+
+    double animationTime, repeatMinimumSustainTime, attackTime, releaseTime, maximumCoastTime;
+    Curve coastTimeCurve;
+    getAnimationParametersForGranularity(granularity, animationTime, repeatMinimumSustainTime, attackTime, releaseTime, coastTimeCurve, maximumCoastTime);
+
+    data.desiredPosition = newPosition;
+    if (!data.startTime)
+        data.attackTime = attackTime;
+    data.animationTime = animationTime;
+    data.releaseTime = releaseTime;
+
+    // Prioritize our way out of over constraint.
+    if (data.attackTime + data.releaseTime &gt; data.animationTime) {
+        if (data.releaseTime &gt; data.animationTime)
+            data.releaseTime = data.animationTime;
+        data.attackTime = data.animationTime - data.releaseTime;
+    }
+
+    if (!data.startTime) {
+        // FIXME: This should be the time from the event that got us here.
+        data.startTime = monotonicallyIncreasingTime() - tickTime / 2;
+        data.startPosition = data.currentPosition;
+        data.lastAnimationTime = data.startTime;
+    }
+    data.startVelocity = data.currentVelocity;
+
+    double remainingDelta = data.desiredPosition - data.currentPosition;
+    double attackAreaLeft = 0;
+    double deltaTime = data.lastAnimationTime - data.startTime;
+    double attackTimeLeft = std::max(0., data.attackTime - deltaTime);
+    double timeLeft = data.animationTime - deltaTime;
+    double minTimeLeft = data.releaseTime + std::min(repeatMinimumSustainTime, data.animationTime - data.releaseTime - attackTimeLeft);
+    if (timeLeft &lt; minTimeLeft) {
+        data.animationTime = deltaTime + minTimeLeft;
+        timeLeft = minTimeLeft;
+    }
+
+    if (maximumCoastTime &gt; (repeatMinimumSustainTime + releaseTime)) {
+        double targetMaxCoastVelocity = data.visibleLength * .25 * frameRate;
+        // This needs to be as minimal as possible while not being intrusive to page up/down.
+        double minCoastDelta = data.visibleLength;
+
+        if (fabs(remainingDelta) &gt; minCoastDelta) {
+            double maxCoastDelta = maximumCoastTime * targetMaxCoastVelocity;
+            double coastFactor = std::min(1., (fabs(remainingDelta) - minCoastDelta) / (maxCoastDelta - minCoastDelta));
+
+            // We could play with the curve here - linear seems a little soft. Initial testing makes me want to feed into the sustain time more aggressively.
+            double coastMinTimeLeft = std::min(maximumCoastTime, minTimeLeft + coastCurve(coastTimeCurve, coastFactor) * (maximumCoastTime - minTimeLeft));
+
+            if (double additionalTime = std::max(0., coastMinTimeLeft - minTimeLeft)) {
+                double additionalReleaseTime = std::min(additionalTime, releaseTime / (releaseTime + repeatMinimumSustainTime) * additionalTime);
+                data.releaseTime = releaseTime + additionalReleaseTime;
+                data.animationTime = deltaTime + coastMinTimeLeft;
+                timeLeft = coastMinTimeLeft;
+            }
+        }
+    }
+
+    double releaseTimeLeft = std::min(timeLeft, data.releaseTime);
+    double sustainTimeLeft = std::max(0., timeLeft - releaseTimeLeft - attackTimeLeft);
+    if (attackTimeLeft) {
+        double attackSpot = deltaTime / data.attackTime;
+        attackAreaLeft = attackArea(Curve::Cubic, attackSpot, 1) * data.attackTime;
+    }
+
+    double releaseSpot = (data.releaseTime - releaseTimeLeft) / data.releaseTime;
+    double releaseAreaLeft = releaseArea(Curve::Cubic, releaseSpot, 1) * data.releaseTime;
+
+    data.desiredVelocity = remainingDelta / (attackAreaLeft + sustainTimeLeft + releaseAreaLeft);
+    data.releasePosition = data.desiredPosition - data.desiredVelocity * releaseAreaLeft;
+    if (attackAreaLeft)
+        data.attackPosition = data.startPosition + data.desiredVelocity * attackAreaLeft;
+    else
+        data.attackPosition = data.releasePosition - (data.animationTime - data.releaseTime - data.attackTime) * data.desiredVelocity;
+
+    if (sustainTimeLeft) {
+        double roundOff = data.releasePosition - ((attackAreaLeft ? data.attackPosition : data.currentPosition) + data.desiredVelocity * sustainTimeLeft);
+        data.desiredVelocity += roundOff / sustainTimeLeft;
+    }
+
+    return true;
+}
+
+bool ScrollAnimationSmooth::animateScroll(PerAxisData&amp; data, double currentTime)
+{
+    if (!data.startTime)
+        return false;
+
+    double lastScrollInterval = currentTime - data.lastAnimationTime;
+    if (lastScrollInterval &lt; minimumTimerInterval)
+        return true;
+
+    data.lastAnimationTime = currentTime;
+
+    double deltaTime = currentTime - data.startTime;
+    double newPosition = data.currentPosition;
+
+    if (deltaTime &gt; data.animationTime) {
+        double desiredPosition = data.desiredPosition;
+        data = PerAxisData();
+        data.currentPosition = desiredPosition;
+        return false;
+    }
+    if (deltaTime &lt; data.attackTime)
+        newPosition = attackCurve(Curve::Cubic, deltaTime, data.attackTime, data.startPosition, data.attackPosition);
+    else if (deltaTime &lt; (data.animationTime - data.releaseTime))
+        newPosition = data.attackPosition + (deltaTime - data.attackTime) * data.desiredVelocity;
+    else {
+        // release is based on targeting the exact final position.
+        double releaseDeltaT = deltaTime - (data.animationTime - data.releaseTime);
+        newPosition = releaseCurve(Curve::Cubic, releaseDeltaT, data.releaseTime, data.releasePosition, data.desiredPosition);
+    }
+
+    // Normalize velocity to a per second amount. Could be used to check for jank.
+    if (lastScrollInterval &gt; 0)
+        data.currentVelocity = (newPosition - data.currentPosition) / lastScrollInterval;
+    data.currentPosition = newPosition;
+
+    return true;
+}
+
+void ScrollAnimationSmooth::animationTimerFired()
+{
+    double currentTime = monotonicallyIncreasingTime();
+    double deltaToNextFrame = ceil((currentTime - m_startTime) * frameRate) / frameRate - (currentTime - m_startTime);
+    currentTime += deltaToNextFrame;
+
+    bool continueAnimation = false;
+    if (animateScroll(m_horizontalData, currentTime))
+        continueAnimation = true;
+    if (animateScroll(m_verticalData, currentTime))
+        continueAnimation = true;
+
+    if (continueAnimation)
+#if USE(REQUEST_ANIMATION_FRAME_TIMER)
+        startNextTimer(std::max(minimumTimerInterval, deltaToNextFrame));
+#else
+        startNextTimer();
+    else
+        m_animationActive = false;
+#endif
+
+    m_notifyPositionChangedFunction(FloatPoint(m_horizontalData.currentPosition, m_verticalData.currentPosition));
+}
+
+#if USE(REQUEST_ANIMATION_FRAME_TIMER)
+void ScrollAnimationSmooth::startNextTimer(double delay)
+{
+    m_animationTimer.startOneShot(delay);
+}
+#else
+void ScrollAnimationSmooth::startNextTimer()
+{
+    if (m_scrollableArea.scheduleAnimation())
+        m_animationActive = true;
+}
+#endif
+
+bool ScrollAnimationSmooth::animationTimerActive() const
+{
+#if USE(REQUEST_ANIMATION_FRAME_TIMER)
+    return m_animationTimer.isActive();
+#else
+    return m_animationActive;
+#endif
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(SMOOTH_SCROLLING)
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollAnimationSmoothh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/ScrollAnimationSmooth.h (0 => 195661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollAnimationSmooth.h                                (rev 0)
+++ trunk/Source/WebCore/platform/ScrollAnimationSmooth.h        2016-01-27 10:32:59 UTC (rev 195661)
</span><span class="lines">@@ -0,0 +1,120 @@
</span><ins>+/*
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ScrollAnimationSmooth_h
+#define ScrollAnimationSmooth_h
+
+#include &quot;ScrollAnimation.h&quot;
+
+#if ENABLE(SMOOTH_SCROLLING)
+
+#if !ENABLE(REQUEST_ANIMATION_FRAME)
+#error &quot;SMOOTH_SCROLLING requires REQUEST_ANIMATION_FRAME to be enabled.&quot;
+#endif
+
+#include &quot;Timer.h&quot;
+
+namespace WebCore {
+
+class FloatPoint;
+class ScrollableArea;
+
+class ScrollAnimationSmooth final: public ScrollAnimation {
+public:
+    ScrollAnimationSmooth(ScrollableArea&amp;, std::function&lt;void (FloatPoint&amp;&amp;)&gt;&amp;&amp; notifyPositionChangedFunction);
+    virtual ~ScrollAnimationSmooth();
+
+    enum class Curve {
+        Linear,
+        Quadratic,
+        Cubic,
+        Quartic,
+        Bounce
+    };
+
+private:
+    virtual bool scroll(ScrollbarOrientation, ScrollGranularity, float step, float multiplier) override;
+    virtual void stop() override;
+    virtual void updateVisibleLengths() override;
+    virtual void setCurrentPosition(const FloatPoint&amp;) override;
+#if !USE(REQUEST_ANIMATION_FRAME_TIMER)
+    virtual void serviceAnimation() override;
+#endif
+
+    struct PerAxisData {
+        float currentPosition { 0 };
+        double currentVelocity { 0 };
+
+        double desiredPosition { 0 };
+        double desiredVelocity { 0 };
+
+        double startPosition { 0 };
+        double startTime { 0 };
+        double startVelocity { 0 };
+
+        double animationTime { 0 };
+        double lastAnimationTime { 0 };
+
+        double attackPosition { 0 };
+        double attackTime { 0 };
+        Curve attackCurve { Curve::Quadratic };
+
+        double releasePosition { 0 };
+        double releaseTime { 0 };
+        Curve releaseCurve { Curve::Quadratic };
+
+        int visibleLength { 0 };
+    };
+
+    bool updatePerAxisData(PerAxisData&amp;, ScrollGranularity, float delta, float minScrollPosition, float maxScrollPosition);
+    bool animateScroll(PerAxisData&amp;, double currentTime);
+
+#if USE(REQUEST_ANIMATION_FRAME_TIMER)
+    void requestAnimationTimerFired();
+    void startNextTimer(double delay);
+#else
+    void startNextTimer();
+#endif
+    void animationTimerFired();
+    bool animationTimerActive() const;
+
+    std::function&lt;void (FloatPoint&amp;&amp;)&gt; m_notifyPositionChangedFunction;
+
+    PerAxisData m_horizontalData;
+    PerAxisData m_verticalData;
+
+    double m_startTime { 0 };
+#if USE(REQUEST_ANIMATION_FRAME_TIMER)
+    Timer m_animationTimer;
+#else
+    bool m_animationActive { false };
+#endif
+
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(SMOOTH_SCROLLING)
+#endif // ScrollAnimationSmooth_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollAnimatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollAnimator.cpp (195660 => 195661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollAnimator.cpp        2016-01-27 10:28:49 UTC (rev 195660)
+++ trunk/Source/WebCore/platform/ScrollAnimator.cpp        2016-01-27 10:32:59 UTC (rev 195661)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">     if (currentPosition == newPosition)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    setCurrentPositionInternal(newPosition);
</del><ins>+    m_currentPosition = newPosition;
</ins><span class="cx">     notifyPositionChanged(newPosition - currentPosition);
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx"> {
</span><span class="cx">     FloatPoint newPositon = ScrollableArea::scrollPositionFromOffset(offset, toFloatSize(m_scrollableArea.scrollOrigin()));
</span><span class="cx">     FloatSize delta = newPositon - currentPosition();
</span><del>-    setCurrentPositionInternal(newPositon);
</del><ins>+    m_currentPosition = newPositon;
</ins><span class="cx">     notifyPositionChanged(delta);
</span><span class="cx">     updateActiveScrollSnapIndexForOffset();
</span><span class="cx"> }
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx"> 
</span><span class="cx"> void ScrollAnimator::setCurrentPosition(const FloatPoint&amp; position)
</span><span class="cx"> {
</span><del>-    setCurrentPositionInternal(position);
</del><ins>+    m_currentPosition = position;
</ins><span class="cx">     updateActiveScrollSnapIndexForOffset();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -180,7 +180,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><span class="cx">     // FIXME: Needs offset/position disambiguation.
</span><del>-    m_scrollController.setActiveScrollSnapIndicesForOffset(m_currentPosX, m_currentPosY);
</del><ins>+    m_scrollController.setActiveScrollSnapIndicesForOffset(m_currentPosition.x(), m_currentPosition.y());
</ins><span class="cx">     if (m_scrollController.activeScrollSnapIndexDidChange()) {
</span><span class="cx">         m_scrollableArea.setCurrentHorizontalSnapPointIndex(m_scrollController.activeScrollSnapIndexForAxis(ScrollEventAxis::Horizontal));
</span><span class="cx">         m_scrollableArea.setCurrentVerticalSnapPointIndex(m_scrollController.activeScrollSnapIndexForAxis(ScrollEventAxis::Vertical));
</span><span class="lines">@@ -203,7 +203,7 @@
</span><span class="cx"> 
</span><span class="cx"> LayoutUnit ScrollAnimator::scrollOffsetOnAxis(ScrollEventAxis axis) const
</span><span class="cx"> {
</span><del>-    return axis == ScrollEventAxis::Horizontal ? m_currentPosX : m_currentPosY;
</del><ins>+    return axis == ScrollEventAxis::Horizontal ? m_currentPosition.x() : m_currentPosition.y();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ScrollAnimator::immediateScrollOnAxis(ScrollEventAxis axis, float delta)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollAnimatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollAnimator.h (195660 => 195661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollAnimator.h        2016-01-27 10:28:49 UTC (rev 195660)
+++ trunk/Source/WebCore/platform/ScrollAnimator.h        2016-01-27 10:32:59 UTC (rev 195661)
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void setCurrentPosition(const FloatPoint&amp;);
</span><del>-    FloatPoint currentPosition() const { return FloatPoint(m_currentPosX, m_currentPosY); }
</del><ins>+    const FloatPoint&amp; currentPosition() const { return m_currentPosition; }
</ins><span class="cx"> 
</span><span class="cx">     virtual void cancelAnimations() { }
</span><span class="cx">     virtual void serviceScrollAnimations() { }
</span><span class="lines">@@ -145,19 +145,12 @@
</span><span class="cx">     virtual void notifyPositionChanged(const FloatSize&amp; delta);
</span><span class="cx">     void updateActiveScrollSnapIndexForOffset();
</span><span class="cx"> 
</span><del>-    void setCurrentPositionInternal(const FloatPoint&amp; p)
-    {
-        m_currentPosX = p.x();
-        m_currentPosY = p.y();
-    }
-
</del><span class="cx">     ScrollableArea&amp; m_scrollableArea;
</span><span class="cx">     RefPtr&lt;WheelEventTestTrigger&gt; m_wheelEventTestTrigger;
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP) || ENABLE(RUBBER_BANDING)
</span><span class="cx">     ScrollController m_scrollController;
</span><span class="cx"> #endif
</span><del>-    float m_currentPosX { 0 }; // ScrollAnimatorNone takes addresses of these, so can't use a FloatPoint.
-    float m_currentPosY { 0 };
</del><ins>+    FloatPoint m_currentPosition;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollAnimatorNonecpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/ScrollAnimatorNone.cpp (195660 => 195661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollAnimatorNone.cpp        2016-01-27 10:28:49 UTC (rev 195660)
+++ trunk/Source/WebCore/platform/ScrollAnimatorNone.cpp        2016-01-27 10:32:59 UTC (rev 195661)
</span><span class="lines">@@ -1,568 +0,0 @@
</span><del>-/*
- * Copyright (c) 2011, Google Inc. All rights reserved.
- * Copyright (C) 2015 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-
-#if ENABLE(SMOOTH_SCROLLING)
-
-#include &quot;ScrollAnimatorNone.h&quot;
-
-#include &quot;FloatPoint.h&quot;
-#include &quot;NotImplemented.h&quot;
-#include &quot;ScrollableArea.h&quot;
-#include &quot;ScrollbarTheme.h&quot;
-#include &lt;algorithm&gt;
-#include &lt;wtf/CurrentTime.h&gt;
-
-using namespace std;
-
-namespace WebCore {
-
-const double kFrameRate = 60;
-const double kTickTime = 1 / kFrameRate;
-const double kMinimumTimerInterval = .001;
-
-std::unique_ptr&lt;ScrollAnimator&gt; ScrollAnimator::create(ScrollableArea&amp; scrollableArea)
-{
-    if (scrollableArea.scrollAnimatorEnabled())
-        return std::make_unique&lt;ScrollAnimatorNone&gt;(scrollableArea);
-    return std::make_unique&lt;ScrollAnimator&gt;(scrollableArea);
-}
-
-ScrollAnimatorNone::Parameters::Parameters()
-    : m_isEnabled(false)
-{
-}
-
-ScrollAnimatorNone::Parameters::Parameters(bool isEnabled, double animationTime, double repeatMinimumSustainTime, Curve attackCurve, double attackTime, Curve releaseCurve, double releaseTime, Curve coastTimeCurve, double maximumCoastTime)
-    : m_isEnabled(isEnabled)
-    , m_animationTime(animationTime)
-    , m_repeatMinimumSustainTime(repeatMinimumSustainTime)
-    , m_attackCurve(attackCurve)
-    , m_attackTime(attackTime)
-    , m_releaseCurve(releaseCurve)
-    , m_releaseTime(releaseTime)
-    , m_coastTimeCurve(coastTimeCurve)
-    , m_maximumCoastTime(maximumCoastTime)
-{
-}
-
-double ScrollAnimatorNone::PerAxisData::curveAt(Curve curve, double t)
-{
-    switch (curve) {
-    case Linear:
-        return t;
-    case Quadratic:
-        return t * t;
-    case Cubic:
-        return t * t * t;
-    case Quartic:
-        return t * t * t * t;
-    case Bounce:
-        // Time base is chosen to keep the bounce points simpler:
-        // 1 (half bounce coming in) + 1 + .5 + .25
-        const double kTimeBase = 2.75;
-        const double kTimeBaseSquared = kTimeBase * kTimeBase;
-        if (t &lt; 1 / kTimeBase)
-            return kTimeBaseSquared * t * t;
-        if (t &lt; 2 / kTimeBase) {
-            // Invert a [-.5,.5] quadratic parabola, center it in [1,2].
-            double t1 = t - 1.5 / kTimeBase;
-            const double kParabolaAtEdge = 1 - .5 * .5;
-            return kTimeBaseSquared * t1 * t1 + kParabolaAtEdge;
-        }
-        if (t &lt; 2.5 / kTimeBase) {
-            // Invert a [-.25,.25] quadratic parabola, center it in [2,2.5].
-            double t2 = t - 2.25 / kTimeBase;
-            const double kParabolaAtEdge = 1 - .25 * .25;
-            return kTimeBaseSquared * t2 * t2 + kParabolaAtEdge;
-        }
-            // Invert a [-.125,.125] quadratic parabola, center it in [2.5,2.75].
-        const double kParabolaAtEdge = 1 - .125 * .125;
-        t -= 2.625 / kTimeBase;
-        return kTimeBaseSquared * t * t + kParabolaAtEdge;
-    }
-    ASSERT_NOT_REACHED();
-    return 0;
-}
-
-double ScrollAnimatorNone::PerAxisData::attackCurve(Curve curve, double deltaTime, double curveT, double startPosition, double attackPosition)
-{
-    double t = deltaTime / curveT;
-    double positionFactor = curveAt(curve, t);
-    return startPosition + positionFactor * (attackPosition - startPosition);
-}
-
-double ScrollAnimatorNone::PerAxisData::releaseCurve(Curve curve, double deltaTime, double curveT, double releasePosition, double desiredPosition)
-{
-    double t = deltaTime / curveT;
-    double positionFactor = 1 - curveAt(curve, 1 - t);
-    return releasePosition + (positionFactor * (desiredPosition - releasePosition));
-}
-
-double ScrollAnimatorNone::PerAxisData::coastCurve(Curve curve, double factor)
-{
-    return 1 - curveAt(curve, 1 - factor);
-}
-
-double ScrollAnimatorNone::PerAxisData::curveIntegralAt(Curve curve, double t)
-{
-    switch (curve) {
-    case Linear:
-        return t * t / 2;
-    case Quadratic:
-        return t * t * t / 3;
-    case Cubic:
-        return t * t * t * t / 4;
-    case Quartic:
-        return t * t * t * t * t / 5;
-    case Bounce:
-        const double kTimeBase = 2.75;
-        const double kTimeBaseSquared = kTimeBase * kTimeBase;
-        const double kTimeBaseSquaredOverThree = kTimeBaseSquared / 3;
-        double area;
-        double t1 = min(t, 1 / kTimeBase);
-        area = kTimeBaseSquaredOverThree * t1 * t1 * t1;
-        if (t &lt; 1 / kTimeBase)
-            return area;
-
-        t1 = min(t - 1 / kTimeBase, 1 / kTimeBase);
-        // The integral of kTimeBaseSquared * (t1 - .5 / kTimeBase) * (t1 - .5 / kTimeBase) + kParabolaAtEdge
-        const double kSecondInnerOffset = kTimeBaseSquared * .5 / kTimeBase;
-        double bounceArea = t1 * (t1 * (kTimeBaseSquaredOverThree * t1 - kSecondInnerOffset) + 1);
-        area += bounceArea;
-        if (t &lt; 2 / kTimeBase)
-            return area;
-
-        t1 = min(t - 2 / kTimeBase, 0.5 / kTimeBase);
-        // The integral of kTimeBaseSquared * (t1 - .25 / kTimeBase) * (t1 - .25 / kTimeBase) + kParabolaAtEdge
-        const double kThirdInnerOffset = kTimeBaseSquared * .25 / kTimeBase;
-        bounceArea =  t1 * (t1 * (kTimeBaseSquaredOverThree * t1 - kThirdInnerOffset) + 1);
-        area += bounceArea;
-        if (t &lt; 2.5 / kTimeBase)
-            return area;
-
-        t1 = t - 2.5 / kTimeBase;
-        // The integral of kTimeBaseSquared * (t1 - .125 / kTimeBase) * (t1 - .125 / kTimeBase) + kParabolaAtEdge
-        const double kFourthInnerOffset = kTimeBaseSquared * .125 / kTimeBase;
-        bounceArea = t1 * (t1 * (kTimeBaseSquaredOverThree * t1 - kFourthInnerOffset) + 1);
-        area += bounceArea;
-        return area;
-    }
-    ASSERT_NOT_REACHED();
-    return 0;
-}
-
-double ScrollAnimatorNone::PerAxisData::attackArea(Curve curve, double startT, double endT)
-{
-    double startValue = curveIntegralAt(curve, startT);
-    double endValue = curveIntegralAt(curve, endT);
-    return endValue - startValue;
-}
-
-double ScrollAnimatorNone::PerAxisData::releaseArea(Curve curve, double startT, double endT)
-{
-    double startValue = curveIntegralAt(curve, 1 - endT);
-    double endValue = curveIntegralAt(curve, 1 - startT);
-    return endValue - startValue;
-}
-
-ScrollAnimatorNone::PerAxisData::PerAxisData(ScrollAnimatorNone*, float* currentPosition, int visibleLength)
-    : m_currentPosition(currentPosition)
-    , m_visibleLength(visibleLength)
-{
-    reset();
-}
-
-void ScrollAnimatorNone::PerAxisData::reset()
-{
-    m_currentVelocity = 0;
-
-    m_desiredPosition = 0;
-    m_desiredVelocity = 0;
-
-    m_startPosition = 0;
-    m_startTime = 0;
-    m_startVelocity = 0;
-
-    m_animationTime = 0;
-    m_lastAnimationTime = 0;
-
-    m_attackPosition = 0;
-    m_attackTime = 0;
-    m_attackCurve = Quadratic;
-
-    m_releasePosition = 0;
-    m_releaseTime = 0;
-    m_releaseCurve = Quadratic;
-}
-
-
-bool ScrollAnimatorNone::PerAxisData::updateDataFromParameters(float step, float multiplier, float minScrollPosition, float maxScrollPosition, double currentTime, Parameters* parameters)
-{
-    float delta = step * multiplier;
-    if (!m_startTime || !delta || (delta &lt; 0) != (m_desiredPosition - *m_currentPosition &lt; 0)) {
-        m_desiredPosition = *m_currentPosition;
-        m_startTime = 0;
-    }
-    float newPosition = m_desiredPosition + delta;
-
-    newPosition = max(min(newPosition, maxScrollPosition), minScrollPosition);
-
-    if (newPosition == m_desiredPosition)
-        return false;
-
-    m_desiredPosition = newPosition;
-
-    if (!m_startTime) {
-        m_attackTime = parameters-&gt;m_attackTime;
-        m_attackCurve = parameters-&gt;m_attackCurve;
-    }
-    m_animationTime = parameters-&gt;m_animationTime;
-    m_releaseTime = parameters-&gt;m_releaseTime;
-    m_releaseCurve = parameters-&gt;m_releaseCurve;
-
-    // Prioritize our way out of over constraint.
-    if (m_attackTime + m_releaseTime &gt; m_animationTime) {
-        if (m_releaseTime &gt; m_animationTime)
-            m_releaseTime = m_animationTime;
-        m_attackTime = m_animationTime - m_releaseTime;
-    }
-
-    if (!m_startTime) {
-        // FIXME: This should be the time from the event that got us here.
-        m_startTime = currentTime - kTickTime / 2;
-        m_startPosition = *m_currentPosition;
-        m_lastAnimationTime = m_startTime;
-    }
-    m_startVelocity = m_currentVelocity;
-
-    double remainingDelta = m_desiredPosition - *m_currentPosition;
-
-    double attackAreaLeft = 0;
-
-    double deltaTime = m_lastAnimationTime - m_startTime;
-    double attackTimeLeft = max(0., m_attackTime - deltaTime);
-    double timeLeft = m_animationTime - deltaTime;
-    double minTimeLeft = m_releaseTime + min(parameters-&gt;m_repeatMinimumSustainTime, m_animationTime - m_releaseTime - attackTimeLeft);
-    if (timeLeft &lt; minTimeLeft) {
-        m_animationTime = deltaTime + minTimeLeft;
-        timeLeft = minTimeLeft;
-    }
-
-    if (parameters-&gt;m_maximumCoastTime &gt; (parameters-&gt;m_repeatMinimumSustainTime + parameters-&gt;m_releaseTime)) {
-        double targetMaxCoastVelocity = m_visibleLength * .25 * kFrameRate;
-        // This needs to be as minimal as possible while not being intrusive to page up/down.
-        double minCoastDelta = m_visibleLength;
-
-        if (fabs(remainingDelta) &gt; minCoastDelta) {
-            double maxCoastDelta = parameters-&gt;m_maximumCoastTime * targetMaxCoastVelocity;
-            double coastFactor = min(1., (fabs(remainingDelta) - minCoastDelta) / (maxCoastDelta - minCoastDelta));
-
-            // We could play with the curve here - linear seems a little soft. Initial testing makes me want to feed into the sustain time more aggressively.
-            double coastMinTimeLeft = min(parameters-&gt;m_maximumCoastTime, minTimeLeft + coastCurve(parameters-&gt;m_coastTimeCurve, coastFactor) * (parameters-&gt;m_maximumCoastTime - minTimeLeft));
-
-            double additionalTime = max(0., coastMinTimeLeft - minTimeLeft);
-            if (additionalTime) {
-                double additionalReleaseTime = min(additionalTime, parameters-&gt;m_releaseTime / (parameters-&gt;m_releaseTime + parameters-&gt;m_repeatMinimumSustainTime) * additionalTime);
-                m_releaseTime = parameters-&gt;m_releaseTime + additionalReleaseTime;
-                m_animationTime = deltaTime + coastMinTimeLeft;
-                timeLeft = coastMinTimeLeft;
-            }
-        }
-    }
-
-    double releaseTimeLeft = min(timeLeft, m_releaseTime);
-    double sustainTimeLeft = max(0., timeLeft - releaseTimeLeft - attackTimeLeft);
-
-    if (attackTimeLeft) {
-        double attackSpot = deltaTime / m_attackTime;
-        attackAreaLeft = attackArea(m_attackCurve, attackSpot, 1) * m_attackTime;
-    }
-
-    double releaseSpot = (m_releaseTime - releaseTimeLeft) / m_releaseTime;
-    double releaseAreaLeft  = releaseArea(m_releaseCurve, releaseSpot, 1) * m_releaseTime;
-
-    m_desiredVelocity = remainingDelta / (attackAreaLeft + sustainTimeLeft + releaseAreaLeft);
-    m_releasePosition = m_desiredPosition - m_desiredVelocity * releaseAreaLeft;
-    if (attackAreaLeft)
-        m_attackPosition = m_startPosition + m_desiredVelocity * attackAreaLeft;
-    else
-        m_attackPosition = m_releasePosition - (m_animationTime - m_releaseTime - m_attackTime) * m_desiredVelocity;
-
-    if (sustainTimeLeft) {
-        double roundOff = m_releasePosition - ((attackAreaLeft ? m_attackPosition : *m_currentPosition) + m_desiredVelocity * sustainTimeLeft);
-        m_desiredVelocity += roundOff / sustainTimeLeft;
-    }
-
-    return true;
-}
-
-// FIXME: Add in jank detection trace events into this function.
-bool ScrollAnimatorNone::PerAxisData::animateScroll(double currentTime)
-{
-    double lastScrollInterval = currentTime - m_lastAnimationTime;
-    if (lastScrollInterval &lt; kMinimumTimerInterval)
-        return true;
-
-    m_lastAnimationTime = currentTime;
-
-    double deltaTime = currentTime - m_startTime;
-    double newPosition = *m_currentPosition;
-
-    if (deltaTime &gt; m_animationTime) {
-        *m_currentPosition = m_desiredPosition;
-        reset();
-        return false;
-    }
-    if (deltaTime &lt; m_attackTime)
-        newPosition = attackCurve(m_attackCurve, deltaTime, m_attackTime, m_startPosition, m_attackPosition);
-    else if (deltaTime &lt; (m_animationTime - m_releaseTime))
-        newPosition = m_attackPosition + (deltaTime - m_attackTime) * m_desiredVelocity;
-    else {
-        // release is based on targeting the exact final position.
-        double releaseDeltaT = deltaTime - (m_animationTime - m_releaseTime);
-        newPosition = releaseCurve(m_releaseCurve, releaseDeltaT, m_releaseTime, m_releasePosition, m_desiredPosition);
-    }
-
-    // Normalize velocity to a per second amount. Could be used to check for jank.
-    if (lastScrollInterval &gt; 0)
-        m_currentVelocity = (newPosition - *m_currentPosition) / lastScrollInterval;
-    *m_currentPosition = newPosition;
-
-    return true;
-}
-
-void ScrollAnimatorNone::PerAxisData::updateVisibleLength(int visibleLength)
-{
-    m_visibleLength = visibleLength;
-}
-
-ScrollAnimatorNone::ScrollAnimatorNone(ScrollableArea&amp; scrollableArea)
-    : ScrollAnimator(scrollableArea)
-    , m_horizontalData(this, &amp;m_currentPosX, scrollableArea.visibleWidth())
-    , m_verticalData(this, &amp;m_currentPosY, scrollableArea.visibleHeight())
-    , m_startTime(0)
-#if USE(REQUEST_ANIMATION_FRAME_TIMER)
-    , m_animationTimer(*this, &amp;ScrollAnimatorNone::requestAnimationTimerFired)
-#else
-    , m_animationActive(false)
-#endif
-{
-}
-
-ScrollAnimatorNone::~ScrollAnimatorNone()
-{
-    stopAnimationTimerIfNeeded();
-}
-
-ScrollAnimatorNone::Parameters ScrollAnimatorNone::parametersForScrollGranularity(ScrollGranularity granularity) const
-{
-    switch (granularity) {
-    case ScrollByDocument:
-        return Parameters(true, 20 * kTickTime, 10 * kTickTime, Cubic, 10 * kTickTime, Cubic, 10 * kTickTime, Linear, 1);
-    case ScrollByLine:
-        return Parameters(true, 10 * kTickTime, 7 * kTickTime, Cubic, 3 * kTickTime, Cubic, 3 * kTickTime, Linear, 1);
-    case ScrollByPage:
-        return Parameters(true, 15 * kTickTime, 10 * kTickTime, Cubic, 5 * kTickTime, Cubic, 5 * kTickTime, Linear, 1);
-    case ScrollByPixel:
-        return Parameters(true, 11 * kTickTime, 2 * kTickTime, Cubic, 3 * kTickTime, Cubic, 3 * kTickTime, Quadratic, 1.25);
-    default:
-        ASSERT_NOT_REACHED();
-    }
-    return Parameters();
-}
-
-bool ScrollAnimatorNone::scroll(ScrollbarOrientation orientation, ScrollGranularity granularity, float step, float multiplier)
-{
-    if (!m_scrollableArea.scrollAnimatorEnabled())
-        return ScrollAnimator::scroll(orientation, granularity, step, multiplier);
-
-    // FIXME: get the type passed in. MouseWheel could also be by line, but should still have different
-    // animation parameters than the keyboard.
-    Parameters parameters;
-    switch (granularity) {
-    case ScrollByDocument:
-    case ScrollByLine:
-    case ScrollByPage:
-    case ScrollByPixel:
-        parameters = parametersForScrollGranularity(granularity);
-        break;
-    case ScrollByPrecisePixel:
-        return ScrollAnimator::scroll(orientation, granularity, step, multiplier);
-    }
-
-    // If the individual input setting is disabled, bail.
-    if (!parameters.m_isEnabled)
-        return ScrollAnimator::scroll(orientation, granularity, step, multiplier);
-
-    // This is an animatable scroll. Set the animation in motion using the appropriate parameters.
-    float minScrollPosition;
-    float maxScrollPosition;
-    if (orientation == HorizontalScrollbar) {
-        minScrollPosition = m_scrollableArea.minimumScrollPosition().x();
-        maxScrollPosition = m_scrollableArea.maximumScrollPosition().x();
-    } else {
-        minScrollPosition = m_scrollableArea.minimumScrollPosition().y();
-        maxScrollPosition = m_scrollableArea.maximumScrollPosition().y();
-    }
-
-    PerAxisData&amp; data = (orientation == VerticalScrollbar) ? m_verticalData : m_horizontalData;
-    bool needToScroll = data.updateDataFromParameters(step, multiplier, minScrollPosition, maxScrollPosition, monotonicallyIncreasingTime(), &amp;parameters);
-    if (needToScroll &amp;&amp; !animationTimerActive()) {
-        m_startTime = data.m_startTime;
-        animationWillStart();
-        animationTimerFired();
-    }
-    return needToScroll;
-}
-
-void ScrollAnimatorNone::scrollToOffsetWithoutAnimation(const FloatPoint&amp; offset)
-{
-    stopAnimationTimerIfNeeded();
-    
-    FloatPoint position = ScrollableArea::scrollPositionFromOffset(offset, toFloatSize(m_scrollableArea.scrollOrigin()));
-    FloatSize delta = position - FloatPoint(*m_horizontalData.m_currentPosition, *m_verticalData.m_currentPosition);
-
-    m_horizontalData.reset();
-    *m_horizontalData.m_currentPosition = position.x();
-    m_horizontalData.m_desiredPosition = position.x();
-
-    m_verticalData.reset();
-    *m_verticalData.m_currentPosition = position.y();
-    m_verticalData.m_desiredPosition = position.y();
-
-    notifyPositionChanged(delta);
-}
-
-#if !USE(REQUEST_ANIMATION_FRAME_TIMER)
-void ScrollAnimatorNone::cancelAnimations()
-{
-    m_animationActive = false;
-}
-
-void ScrollAnimatorNone::serviceScrollAnimations()
-{
-    if (m_animationActive)
-        animationTimerFired();
-}
-#endif
-
-void ScrollAnimatorNone::willEndLiveResize()
-{
-    updateVisibleLengths();
-}
-
-void ScrollAnimatorNone::didAddVerticalScrollbar(Scrollbar*)
-{
-    updateVisibleLengths();
-}
-
-void ScrollAnimatorNone::didAddHorizontalScrollbar(Scrollbar*)
-{
-    updateVisibleLengths();
-}
-
-void ScrollAnimatorNone::updateVisibleLengths()
-{
-    m_horizontalData.updateVisibleLength(scrollableArea().visibleWidth());
-    m_verticalData.updateVisibleLength(scrollableArea().visibleHeight());
-}
-
-#if USE(REQUEST_ANIMATION_FRAME_TIMER)
-void ScrollAnimatorNone::requestAnimationTimerFired()
-{
-    animationTimerFired();
-}
-#endif
-
-void ScrollAnimatorNone::animationTimerFired()
-{
-    double currentTime = monotonicallyIncreasingTime();
-    double deltaToNextFrame = ceil((currentTime - m_startTime) * kFrameRate) / kFrameRate - (currentTime - m_startTime);
-    currentTime += deltaToNextFrame;
-
-    bool continueAnimation = false;
-    if (m_horizontalData.m_startTime &amp;&amp; m_horizontalData.animateScroll(currentTime))
-        continueAnimation = true;
-    if (m_verticalData.m_startTime &amp;&amp; m_verticalData.animateScroll(currentTime))
-        continueAnimation = true;
-
-    if (continueAnimation)
-#if USE(REQUEST_ANIMATION_FRAME_TIMER)
-        startNextTimer(max(kMinimumTimerInterval, deltaToNextFrame));
-#else
-        startNextTimer();
-    else
-        m_animationActive = false;
-#endif
-
-    notifyPositionChanged(FloatSize());
-
-    if (!continueAnimation)
-        animationDidFinish();
-}
-
-#if USE(REQUEST_ANIMATION_FRAME_TIMER)
-void ScrollAnimatorNone::startNextTimer(double delay)
-{
-    m_animationTimer.startOneShot(delay);
-}
-#else
-void ScrollAnimatorNone::startNextTimer()
-{
-    if (scrollableArea().scheduleAnimation())
-        m_animationActive = true;
-}
-#endif
-
-bool ScrollAnimatorNone::animationTimerActive()
-{
-#if USE(REQUEST_ANIMATION_FRAME_TIMER)
-    return m_animationTimer.isActive();
-#else
-    return m_animationActive;
-#endif
-}
-
-void ScrollAnimatorNone::stopAnimationTimerIfNeeded()
-{
-    if (animationTimerActive())
-#if USE(REQUEST_ANIMATION_FRAME_TIMER)
-        m_animationTimer.stop();
-#else
-        m_animationActive = false;
-#endif
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(SMOOTH_SCROLLING)
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollAnimatorNoneh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/ScrollAnimatorNone.h (195660 => 195661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollAnimatorNone.h        2016-01-27 10:28:49 UTC (rev 195660)
+++ trunk/Source/WebCore/platform/ScrollAnimatorNone.h        2016-01-27 10:32:59 UTC (rev 195661)
</span><span class="lines">@@ -1,174 +0,0 @@
</span><del>-/*
- * Copyright (c) 2011, Google Inc. All rights reserved.
- * Copyright (C) 2015 Apple Inc.  All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * 
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ScrollAnimatorNone_h
-#define ScrollAnimatorNone_h
-
-#if ENABLE(SMOOTH_SCROLLING)
-
-#if !ENABLE(REQUEST_ANIMATION_FRAME)
-#error &quot;SMOOTH_SCROLLING requires REQUEST_ANIMATION_FRAME to be enabled.&quot;
-#endif
-
-#include &quot;FloatPoint.h&quot;
-#include &quot;ScrollAnimator.h&quot;
-#include &quot;Timer.h&quot;
-
-class ScrollAnimatorNoneTest;
-
-namespace WebCore {
-
-class IntPoint;
-class ActivePlatformGestureAnimation;
-struct ScrollAnimatorParameters;
-
-class ScrollAnimatorNone : public ScrollAnimator {
-public:
-    explicit ScrollAnimatorNone(ScrollableArea&amp;);
-    virtual ~ScrollAnimatorNone();
-
-    virtual bool scroll(ScrollbarOrientation, ScrollGranularity, float step, float multiplier);
-    virtual void scrollToOffsetWithoutAnimation(const FloatPoint&amp;);
-
-#if !USE(REQUEST_ANIMATION_FRAME_TIMER)
-    virtual void cancelAnimations();
-    virtual void serviceScrollAnimations();
-#endif
-
-    virtual void willEndLiveResize();
-    virtual void didAddVerticalScrollbar(Scrollbar*);
-    virtual void didAddHorizontalScrollbar(Scrollbar*);
-
-    enum Curve {
-        Linear,
-        Quadratic,
-        Cubic,
-        Quartic,
-        Bounce
-    };
-
-    struct Parameters {
-        Parameters();
-        Parameters(bool isEnabled, double animationTime, double repeatMinimumSustainTime, Curve attackCurve, double attackTime, Curve releaseCurve, double releaseTime, Curve coastTimeCurve, double maximumCoastTime);
-
-        // Note that the times can be overspecified such that releaseTime or releaseTime and attackTime are greater
-        // than animationTime. animationTime takes priority over releaseTime, capping it. attackTime is capped at
-        // whatever time remains, or zero if none.
-        bool m_isEnabled;
-        double m_animationTime;
-        double m_repeatMinimumSustainTime;
-
-        Curve m_attackCurve;
-        double m_attackTime;
-
-        Curve m_releaseCurve;
-        double m_releaseTime;
-
-        Curve m_coastTimeCurve;
-        double m_maximumCoastTime;
-    };
-
-protected:
-    virtual void animationWillStart() { }
-    virtual void animationDidFinish() { }
-
-    Parameters parametersForScrollGranularity(ScrollGranularity) const;
-
-    friend class ::ScrollAnimatorNoneTest;
-
-    struct PerAxisData {
-        PerAxisData(ScrollAnimatorNone* parent, float* currentPos, int visibleLength);
-        void reset();
-        bool updateDataFromParameters(float step, float multiplier, float minScrollPosition, float maxScrollPosition, double currentTime, Parameters*);
-        bool animateScroll(double currentTime);
-        void updateVisibleLength(int visibleLength);
-
-        static double curveAt(Curve, double t);
-        static double attackCurve(Curve, double deltaT, double curveT, double startPos, double attackPos);
-        static double releaseCurve(Curve, double deltaT, double curveT, double releasePos, double desiredPos);
-        static double coastCurve(Curve, double factor);
-
-        static double curveIntegralAt(Curve, double t);
-        static double attackArea(Curve, double startT, double endT);
-        static double releaseArea(Curve, double startT, double endT);
-
-        float* m_currentPosition;
-        double m_currentVelocity;
-
-        double m_desiredPosition;
-        double m_desiredVelocity;
-
-        double m_startPosition;
-        double m_startTime;
-        double m_startVelocity;
-
-        double m_animationTime;
-        double m_lastAnimationTime;
-
-        double m_attackPosition;
-        double m_attackTime;
-        Curve m_attackCurve;
-
-        double m_releasePosition;
-        double m_releaseTime;
-        Curve m_releaseCurve;
-
-        int m_visibleLength;
-    };
-
-#if USE(REQUEST_ANIMATION_FRAME_TIMER)
-    void requestAnimationTimerFired();
-    void startNextTimer(double delay);
-#else
-    void startNextTimer();
-#endif
-    void animationTimerFired();
-
-    void stopAnimationTimerIfNeeded();
-    bool animationTimerActive();
-    void updateVisibleLengths();
-
-    PerAxisData m_horizontalData;
-    PerAxisData m_verticalData;
-
-    double m_startTime;
-#if USE(REQUEST_ANIMATION_FRAME_TIMER)
-    Timer m_animationTimer;
-#else
-    bool m_animationActive;
-#endif
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(SMOOTH_SCROLLING)
-
-#endif // ScrollAnimatorNone_h
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollAnimatorSmoothcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/ScrollAnimatorSmooth.cpp (0 => 195661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollAnimatorSmooth.cpp                                (rev 0)
+++ trunk/Source/WebCore/platform/ScrollAnimatorSmooth.cpp        2016-01-27 10:32:59 UTC (rev 195661)
</span><span class="lines">@@ -0,0 +1,110 @@
</span><ins>+/*
+ * Copyright (c) 2011, Google Inc. All rights reserved.
+ * Copyright (C) 2015 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;ScrollAnimatorSmooth.h&quot;
+
+#if ENABLE(SMOOTH_SCROLLING)
+
+#include &quot;ScrollAnimationSmooth.h&quot;
+#include &quot;ScrollableArea.h&quot;
+
+namespace WebCore {
+
+std::unique_ptr&lt;ScrollAnimator&gt; ScrollAnimator::create(ScrollableArea&amp; scrollableArea)
+{
+    if (scrollableArea.scrollAnimatorEnabled())
+        return std::make_unique&lt;ScrollAnimatorSmooth&gt;(scrollableArea);
+    return std::make_unique&lt;ScrollAnimator&gt;(scrollableArea);
+}
+
+ScrollAnimatorSmooth::ScrollAnimatorSmooth(ScrollableArea&amp; scrollableArea)
+    : ScrollAnimator(scrollableArea)
+    , m_animation(std::make_unique&lt;ScrollAnimationSmooth&gt;(scrollableArea, [this](FloatPoint&amp;&amp; position) {
+        FloatSize delta = position - m_currentPosition;
+        m_currentPosition = WTFMove(position);
+        notifyPositionChanged(delta);
+    }))
+{
+}
+
+ScrollAnimatorSmooth::~ScrollAnimatorSmooth()
+{
+}
+
+bool ScrollAnimatorSmooth::scroll(ScrollbarOrientation orientation, ScrollGranularity granularity, float step, float multiplier)
+{
+    if (!m_scrollableArea.scrollAnimatorEnabled() || granularity == ScrollByPrecisePixel)
+        return ScrollAnimator::scroll(orientation, granularity, step, multiplier);
+
+    return m_animation-&gt;scroll(orientation, granularity, step, multiplier);
+}
+
+void ScrollAnimatorSmooth::scrollToOffsetWithoutAnimation(const FloatPoint&amp; offset)
+{
+    FloatPoint position = ScrollableArea::scrollPositionFromOffset(offset, toFloatSize(m_scrollableArea.scrollOrigin()));
+    m_animation-&gt;setCurrentPosition(position);
+
+    FloatSize delta = position - m_currentPosition;
+    m_currentPosition = position;
+    notifyPositionChanged(delta);
+}
+
+#if !USE(REQUEST_ANIMATION_FRAME_TIMER)
+void ScrollAnimatorSmooth::cancelAnimations()
+{
+    m_animation-&gt;stop();
+}
+
+void ScrollAnimatorSmooth::serviceScrollAnimations()
+{
+    m_animation-&gt;serviceAnimation();
+}
+#endif
+
+void ScrollAnimatorSmooth::willEndLiveResize()
+{
+    m_animation-&gt;updateVisibleLengths();
+}
+
+void ScrollAnimatorSmooth::didAddVerticalScrollbar(Scrollbar*)
+{
+    m_animation-&gt;updateVisibleLengths();
+}
+
+void ScrollAnimatorSmooth::didAddHorizontalScrollbar(Scrollbar*)
+{
+    m_animation-&gt;updateVisibleLengths();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(SMOOTH_SCROLLING)
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollAnimatorSmoothh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/ScrollAnimatorSmooth.h (0 => 195661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollAnimatorSmooth.h                                (rev 0)
+++ trunk/Source/WebCore/platform/ScrollAnimatorSmooth.h        2016-01-27 10:32:59 UTC (rev 195661)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+/*
+ * Copyright (c) 2011, Google Inc. All rights reserved.
+ * Copyright (C) 2015 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ScrollAnimatorSmooth_h
+#define ScrollAnimatorSmooth_h
+
+#include &quot;ScrollAnimator.h&quot;
+
+#if ENABLE(SMOOTH_SCROLLING)
+
+namespace WebCore {
+
+class ScrollAnimation;
+
+class ScrollAnimatorSmooth final : public ScrollAnimator {
+public:
+    explicit ScrollAnimatorSmooth(ScrollableArea&amp;);
+    virtual ~ScrollAnimatorSmooth();
+
+    virtual bool scroll(ScrollbarOrientation, ScrollGranularity, float step, float multiplier) override;
+    virtual void scrollToOffsetWithoutAnimation(const FloatPoint&amp;) override;
+
+#if !USE(REQUEST_ANIMATION_FRAME_TIMER)
+    virtual void cancelAnimations() override;
+    virtual void serviceScrollAnimations() override;
+#endif
+
+    virtual void willEndLiveResize() override;
+    virtual void didAddVerticalScrollbar(Scrollbar*) override;
+    virtual void didAddHorizontalScrollbar(Scrollbar*) override;
+
+private:
+
+    std::unique_ptr&lt;ScrollAnimation&gt; m_animation;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(SMOOTH_SCROLLING)
+
+#endif // ScrollAnimatorSmooth_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformmacScrollAnimatorMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (195660 => 195661)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm        2016-01-27 10:28:49 UTC (rev 195660)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm        2016-01-27 10:32:59 UTC (rev 195661)
</span><span class="lines">@@ -763,7 +763,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     FloatSize delta = adjustedPosition - currentPosition;
</span><del>-    setCurrentPositionInternal(adjustedPosition);
</del><ins>+    m_currentPosition = adjustedPosition;
</ins><span class="cx">     notifyPositionChanged(delta);
</span><span class="cx">     updateActiveScrollSnapIndexForOffset();
</span><span class="cx"> }
</span><span class="lines">@@ -1304,7 +1304,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     FloatSize adjustedDelta = newPosition - currentPosition;
</span><del>-    setCurrentPositionInternal(newPosition);
</del><ins>+    m_currentPosition = newPosition;
</ins><span class="cx">     notifyPositionChanged(adjustedDelta);
</span><span class="cx">     updateActiveScrollSnapIndexForOffset();
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>