<!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>[283524] 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/283524">283524</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2021-10-04 16:37:24 -0700 (Mon, 04 Oct 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use ScrollClamping in more places in scrolling code
https://bugs.webkit.org/show_bug.cgi?id=231140

Reviewed by Antti Koivisto.

Fold together two functions in ScrollingEffectsControllerClient with a ScrollClamping argument.
Also use ScrollClamping to replace bool constrainsScrollingToContentEdge() on ScrollableArea.

It's slightly annoying that ScrollClamping is a ScrollableArea state, but RenderMarquee has
no clamping by default.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
* page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
* page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
(WebCore::ScrollingTreeScrollingNodeDelegateMac::immediateScrollBy):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::immediateScrollByWithoutContentEdgeConstraints): Deleted.
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::adjustScrollPositionToBoundsIfNecessary):
(WebCore::ScrollAnimator::adjustScrollPositionIfNecessary const):
(WebCore::ScrollAnimator::immediateScrollBy):
(WebCore::ScrollAnimator::immediateScrollByWithoutContentEdgeConstraints): Deleted.
* platform/ScrollAnimator.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::adjustScrollPositionWithinRange const):
(WebCore::ScrollView::setScrollOffset):
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::ScrollableArea): Deleted.
* platform/ScrollableArea.h: Undo the use of bitfields here because the memory saving
is not worth the code complexity.
(WebCore::ScrollableArea::currentScrollBehaviorStatus):
(WebCore::ScrollableArea::setScrollBehaviorStatus):
(WebCore::ScrollableArea::scrollClamping const):
(WebCore::ScrollableArea::setScrollClamping):
(WebCore::ScrollableArea::verticalScrollElasticity const):
(WebCore::ScrollableArea::horizontalScrollElasticity const):
(WebCore::ScrollableArea::scrollbarOverlayStyle const):
(WebCore::ScrollableArea::currentScrollType const):
(WebCore::ScrollableArea::setCurrentScrollType):
(WebCore::ScrollableArea::constrainsScrollingToContentEdge const): Deleted.
(WebCore::ScrollableArea::setConstrainsScrollingToContentEdge): Deleted.
* platform/ScrollingEffectsController.cpp:
(WebCore::ScrollingEffectsController::scrollAnimationDidUpdate):
(WebCore::ScrollingEffectsController::scrollToOffsetForAnimation): Deleted.
* platform/ScrollingEffectsController.h:
* platform/mac/ScrollingEffectsController.mm:
(WebCore::ScrollingEffectsController::applyScrollDeltaWithStretching):
(WebCore::ScrollingEffectsController::updateRubberBandAnimatingState):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::RenderListBox):
* rendering/RenderListBox.h: Minor rearrangement to optimize padding now that ScrollableArea is a little larger.
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::RenderMarquee):
* testing/Internals.cpp:
(WebCore::Internals::setScrollViewPosition):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepagescrollingAsyncScrollingCoordinatorcpp">trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingmacScrollingTreeScrollingNodeDelegateMach">trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingmacScrollingTreeScrollingNodeDelegateMacmm">trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm</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="#trunkSourceWebCoreplatformScrollViewcpp">trunk/Source/WebCore/platform/ScrollView.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollableAreacpp">trunk/Source/WebCore/platform/ScrollableArea.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollableAreah">trunk/Source/WebCore/platform/ScrollableArea.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="#trunkSourceWebCoreplatformmacScrollingEffectsControllermm">trunk/Source/WebCore/platform/mac/ScrollingEffectsController.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderListBoxcpp">trunk/Source/WebCore/rendering/RenderListBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderListBoxh">trunk/Source/WebCore/rendering/RenderListBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMarqueecpp">trunk/Source/WebCore/rendering/RenderMarquee.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (283523 => 283524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-10-04 23:23:27 UTC (rev 283523)
+++ trunk/Source/WebCore/ChangeLog      2021-10-04 23:37:24 UTC (rev 283524)
</span><span class="lines">@@ -1,3 +1,61 @@
</span><ins>+2021-10-04  Simon Fraser  <simon.fraser@apple.com>
+
+        Use ScrollClamping in more places in scrolling code
+        https://bugs.webkit.org/show_bug.cgi?id=231140
+
+        Reviewed by Antti Koivisto.
+
+        Fold together two functions in ScrollingEffectsControllerClient with a ScrollClamping argument.
+        Also use ScrollClamping to replace bool constrainsScrollingToContentEdge() on ScrollableArea.
+
+        It's slightly annoying that ScrollClamping is a ScrollableArea state, but RenderMarquee has
+        no clamping by default.
+
+        * page/scrolling/AsyncScrollingCoordinator.cpp:
+        (WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
+        * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
+        * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
+        (WebCore::ScrollingTreeScrollingNodeDelegateMac::immediateScrollBy):
+        (WebCore::ScrollingTreeScrollingNodeDelegateMac::immediateScrollByWithoutContentEdgeConstraints): Deleted.
+        * platform/ScrollAnimator.cpp:
+        (WebCore::ScrollAnimator::adjustScrollPositionToBoundsIfNecessary):
+        (WebCore::ScrollAnimator::adjustScrollPositionIfNecessary const):
+        (WebCore::ScrollAnimator::immediateScrollBy):
+        (WebCore::ScrollAnimator::immediateScrollByWithoutContentEdgeConstraints): Deleted.
+        * platform/ScrollAnimator.h:
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::adjustScrollPositionWithinRange const):
+        (WebCore::ScrollView::setScrollOffset):
+        * platform/ScrollableArea.cpp:
+        (WebCore::ScrollableArea::ScrollableArea): Deleted.
+        * platform/ScrollableArea.h: Undo the use of bitfields here because the memory saving
+        is not worth the code complexity.
+        (WebCore::ScrollableArea::currentScrollBehaviorStatus):
+        (WebCore::ScrollableArea::setScrollBehaviorStatus):
+        (WebCore::ScrollableArea::scrollClamping const):
+        (WebCore::ScrollableArea::setScrollClamping):
+        (WebCore::ScrollableArea::verticalScrollElasticity const):
+        (WebCore::ScrollableArea::horizontalScrollElasticity const):
+        (WebCore::ScrollableArea::scrollbarOverlayStyle const):
+        (WebCore::ScrollableArea::currentScrollType const):
+        (WebCore::ScrollableArea::setCurrentScrollType):
+        (WebCore::ScrollableArea::constrainsScrollingToContentEdge const): Deleted.
+        (WebCore::ScrollableArea::setConstrainsScrollingToContentEdge): Deleted.
+        * platform/ScrollingEffectsController.cpp:
+        (WebCore::ScrollingEffectsController::scrollAnimationDidUpdate):
+        (WebCore::ScrollingEffectsController::scrollToOffsetForAnimation): Deleted.
+        * platform/ScrollingEffectsController.h:
+        * platform/mac/ScrollingEffectsController.mm:
+        (WebCore::ScrollingEffectsController::applyScrollDeltaWithStretching):
+        (WebCore::ScrollingEffectsController::updateRubberBandAnimatingState):
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::RenderListBox):
+        * rendering/RenderListBox.h: Minor rearrangement to optimize padding now that ScrollableArea is a little larger.
+        * rendering/RenderMarquee.cpp:
+        (WebCore::RenderMarquee::RenderMarquee):
+        * testing/Internals.cpp:
+        (WebCore::Internals::setScrollViewPosition):
+
</ins><span class="cx"> 2021-10-04  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Add SPI to launch a service service worker in a WKWebView and expose service worker to injected bundle
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingAsyncScrollingCoordinatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (283523 => 283524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp        2021-10-04 23:23:27 UTC (rev 283523)
+++ trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp   2021-10-04 23:37:24 UTC (rev 283524)
</span><span class="lines">@@ -411,9 +411,9 @@
</span><span class="cx">         }
</span><span class="cx">     );
</span><span class="cx"> 
</span><del>-    frameView.setConstrainsScrollingToContentEdge(false);
</del><ins>+    frameView.setScrollClamping(ScrollClamping::Unclamped);
</ins><span class="cx">     frameView.notifyScrollPositionChanged(roundedIntPoint(scrollPosition));
</span><del>-    frameView.setConstrainsScrollingToContentEdge(true);
</del><ins>+    frameView.setScrollClamping(ScrollClamping::Clamped);
</ins><span class="cx"> 
</span><span class="cx">     frameView.setCurrentScrollType(previousScrollType);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingmacScrollingTreeScrollingNodeDelegateMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h (283523 => 283524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h  2021-10-04 23:23:27 UTC (rev 283523)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h     2021-10-04 23:37:24 UTC (rev 283524)
</span><span class="lines">@@ -85,8 +85,7 @@
</span><span class="cx">     ScrollBehaviorStatus scrollBehaviorStatus() const final { return m_scrollBehaviorStatus; }
</span><span class="cx"> 
</span><span class="cx">     bool shouldRubberBandOnSide(BoxSide) const final;
</span><del>-    void immediateScrollBy(const FloatSize&) final;
-    void immediateScrollByWithoutContentEdgeConstraints(const FloatSize&) final;
</del><ins>+    void immediateScrollBy(const FloatSize&, ScrollClamping = ScrollClamping::Clamped) final;
</ins><span class="cx">     void didStopRubberbandSnapAnimation() final;
</span><span class="cx">     void rubberBandingStateChanged(bool) final;
</span><span class="cx">     void adjustScrollPositionToBoundsIfNecessary() final;
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingmacScrollingTreeScrollingNodeDelegateMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm (283523 => 283524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm 2021-10-04 23:23:27 UTC (rev 283523)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm    2021-10-04 23:37:24 UTC (rev 283524)
</span><span class="lines">@@ -320,16 +320,11 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ScrollingTreeScrollingNodeDelegateMac::immediateScrollBy(const FloatSize& delta)
</del><ins>+void ScrollingTreeScrollingNodeDelegateMac::immediateScrollBy(const FloatSize& delta, ScrollClamping clamping)
</ins><span class="cx"> {
</span><del>-    scrollingNode().scrollBy(delta);
</del><ins>+    scrollingNode().scrollBy(delta, clamping);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ScrollingTreeScrollingNodeDelegateMac::immediateScrollByWithoutContentEdgeConstraints(const FloatSize& offset)
-{
-    scrollingNode().scrollBy(offset, ScrollClamping::Unclamped);
-}
-
</del><span class="cx"> void ScrollingTreeScrollingNodeDelegateMac::didStopRubberbandSnapAnimation()
</span><span class="cx"> {
</span><span class="cx">     // Since the rubberband timer has stopped, totalContentsSizeForRubberBand can be synchronized with totalContentsSize.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollAnimatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollAnimator.cpp (283523 => 283524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollAnimator.cpp 2021-10-04 23:23:27 UTC (rev 283523)
+++ trunk/Source/WebCore/platform/ScrollAnimator.cpp    2021-10-04 23:37:24 UTC (rev 283524)
</span><span class="lines">@@ -317,39 +317,35 @@
</span><span class="cx"> 
</span><span class="cx"> void ScrollAnimator::adjustScrollPositionToBoundsIfNecessary()
</span><span class="cx"> {
</span><del>-    bool currentlyConstrainsToContentEdge = m_scrollableArea.constrainsScrollingToContentEdge();
-    m_scrollableArea.setConstrainsScrollingToContentEdge(true);
</del><ins>+    auto previousClamping = m_scrollableArea.scrollClamping();
+    m_scrollableArea.setScrollClamping(ScrollClamping::Clamped);
</ins><span class="cx"> 
</span><span class="cx">     auto currentScrollPosition = m_scrollableArea.scrollPosition();
</span><span class="cx">     auto constrainedPosition = m_scrollableArea.constrainScrollPosition(currentScrollPosition);
</span><span class="cx">     immediateScrollBy(constrainedPosition - currentScrollPosition);
</span><span class="cx"> 
</span><del>-    m_scrollableArea.setConstrainsScrollingToContentEdge(currentlyConstrainsToContentEdge);
</del><ins>+    m_scrollableArea.setScrollClamping(previousClamping);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> FloatPoint ScrollAnimator::adjustScrollPositionIfNecessary(const FloatPoint& position) const
</span><span class="cx"> {
</span><del>-    if (!m_scrollableArea.constrainsScrollingToContentEdge())
</del><ins>+    if (m_scrollableArea.scrollClamping() == ScrollClamping::Unclamped)
</ins><span class="cx">         return position;
</span><span class="cx"> 
</span><span class="cx">     return m_scrollableArea.constrainScrollPosition(ScrollPosition(position));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ScrollAnimator::immediateScrollByWithoutContentEdgeConstraints(const FloatSize& delta)
</del><ins>+void ScrollAnimator::immediateScrollBy(const FloatSize& delta, ScrollClamping clamping)
</ins><span class="cx"> {
</span><del>-    m_scrollableArea.setConstrainsScrollingToContentEdge(false);
-    immediateScrollBy(delta);
-    m_scrollableArea.setConstrainsScrollingToContentEdge(true);
-}
</del><ins>+    auto previousClamping = m_scrollableArea.scrollClamping();
+    m_scrollableArea.setScrollClamping(clamping);
</ins><span class="cx"> 
</span><del>-void ScrollAnimator::immediateScrollBy(const FloatSize& delta)
-{
-    FloatPoint currentPosition = this->currentPosition();
-    FloatPoint newPosition = adjustScrollPositionIfNecessary(currentPosition + delta);
-    if (newPosition == currentPosition)
-        return;
</del><ins>+    auto currentPosition = this->currentPosition();
+    auto newPosition = adjustScrollPositionIfNecessary(currentPosition + delta);
+    if (newPosition != currentPosition)
+        setCurrentPosition(newPosition, NotifyScrollableArea::Yes);
</ins><span class="cx"> 
</span><del>-    setCurrentPosition(newPosition, NotifyScrollableArea::Yes);
</del><ins>+    m_scrollableArea.setScrollClamping(previousClamping);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ScrollExtents ScrollAnimator::scrollExtents() const
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollAnimatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollAnimator.h (283523 => 283524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollAnimator.h   2021-10-04 23:23:27 UTC (rev 283523)
+++ trunk/Source/WebCore/platform/ScrollAnimator.h      2021-10-04 23:37:24 UTC (rev 283524)
</span><span class="lines">@@ -147,8 +147,7 @@
</span><span class="cx">     void setScrollBehaviorStatus(ScrollBehaviorStatus) final;
</span><span class="cx">     ScrollBehaviorStatus scrollBehaviorStatus() const final;
</span><span class="cx"> 
</span><del>-    void immediateScrollByWithoutContentEdgeConstraints(const FloatSize&) final;
-    void immediateScrollBy(const FloatSize&) final;
</del><ins>+    void immediateScrollBy(const FloatSize&, ScrollClamping = ScrollClamping::Clamped) final;
</ins><span class="cx">     void adjustScrollPositionToBoundsIfNecessary() final;
</span><span class="cx"> 
</span><span class="cx"> #if HAVE(RUBBER_BANDING)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollView.cpp (283523 => 283524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollView.cpp     2021-10-04 23:23:27 UTC (rev 283523)
+++ trunk/Source/WebCore/platform/ScrollView.cpp        2021-10-04 23:37:24 UTC (rev 283524)
</span><span class="lines">@@ -412,12 +412,12 @@
</span><span class="cx">     return maximumPosition;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ScrollPosition ScrollView::adjustScrollPositionWithinRange(const ScrollPosition& scrollPoint) const
</del><ins>+ScrollPosition ScrollView::adjustScrollPositionWithinRange(const ScrollPosition& scrollPosition) const
</ins><span class="cx"> {
</span><del>-    if (!constrainsScrollingToContentEdge() || m_allowsUnclampedScrollPosition)
-        return scrollPoint;
</del><ins>+    if (scrollClamping() == ScrollClamping::Unclamped || m_allowsUnclampedScrollPosition)
+        return scrollPosition;
</ins><span class="cx"> 
</span><del>-    return scrollPoint.constrainedBetween(minimumScrollPosition(), maximumScrollPosition());
</del><ins>+    return scrollPosition.constrainedBetween(minimumScrollPosition(), maximumScrollPosition());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ScrollPosition ScrollView::documentScrollPositionRelativeToViewOrigin() const
</span><span class="lines">@@ -434,10 +434,10 @@
</span><span class="cx"> 
</span><span class="cx"> void ScrollView::setScrollOffset(const ScrollOffset& offset)
</span><span class="cx"> {
</span><del>-    LOG_WITH_STREAM(Scrolling, stream << "\nScrollView::setScrollOffset " << offset << " constrains " << constrainsScrollingToContentEdge());
</del><ins>+    LOG_WITH_STREAM(Scrolling, stream << "\nScrollView::setScrollOffset " << offset << " clamping " << scrollClamping());
</ins><span class="cx"> 
</span><del>-    IntPoint constrainedOffset = offset;
-    if (constrainsScrollingToContentEdge())
</del><ins>+    auto constrainedOffset = offset;
+    if (scrollClamping() == ScrollClamping::Clamped)
</ins><span class="cx">         constrainedOffset = constrainedOffset.constrainedBetween(minimumScrollOffset(), maximumScrollOffset());
</span><span class="cx"> 
</span><span class="cx">     scrollTo(scrollPositionFromOffset(constrainedOffset));
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollableAreacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollableArea.cpp (283523 => 283524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollableArea.cpp 2021-10-04 23:23:27 UTC (rev 283523)
+++ trunk/Source/WebCore/platform/ScrollableArea.cpp    2021-10-04 23:37:24 UTC (rev 283524)
</span><span class="lines">@@ -52,24 +52,12 @@
</span><span class="cx"> #endif
</span><span class="cx">     void* pointer[3];
</span><span class="cx">     IntPoint origin;
</span><del>-    unsigned bitfields : 16;
</del><ins>+    bool bytes[9];
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> COMPILE_ASSERT(sizeof(ScrollableArea) == sizeof(SameSizeAsScrollableArea), ScrollableArea_should_stay_small);
</span><span class="cx"> 
</span><del>-ScrollableArea::ScrollableArea()
-    : m_constrainsScrollingToContentEdge(true)
-    , m_inLiveResize(false)
-    , m_verticalScrollElasticity(ScrollElasticityNone)
-    , m_horizontalScrollElasticity(ScrollElasticityNone)
-    , m_scrollbarOverlayStyle(ScrollbarOverlayStyleDefault)
-    , m_scrollOriginChanged(false)
-    , m_currentScrollType(static_cast<unsigned>(ScrollType::User))
-    , m_scrollShouldClearLatchedState(false)
-    , m_currentScrollBehaviorStatus(static_cast<unsigned>(ScrollBehaviorStatus::NotInAnimation))
-{
-}
-
</del><ins>+ScrollableArea::ScrollableArea() = default;
</ins><span class="cx"> ScrollableArea::~ScrollableArea() = default;
</span><span class="cx"> 
</span><span class="cx"> ScrollAnimator& ScrollableArea::scrollAnimator() const
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollableAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollableArea.h (283523 => 283524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollableArea.h   2021-10-04 23:23:27 UTC (rev 283523)
+++ trunk/Source/WebCore/platform/ScrollableArea.h      2021-10-04 23:37:24 UTC (rev 283524)
</span><span class="lines">@@ -68,8 +68,8 @@
</span><span class="cx">     virtual bool isListBox() const { return false; }
</span><span class="cx">     virtual bool isPDFPlugin() const { return false; }
</span><span class="cx"> 
</span><del>-    ScrollBehaviorStatus currentScrollBehaviorStatus() { return static_cast<ScrollBehaviorStatus>(m_currentScrollBehaviorStatus); }
-    void setScrollBehaviorStatus(ScrollBehaviorStatus status) { m_currentScrollBehaviorStatus = static_cast<unsigned>(status); }
</del><ins>+    ScrollBehaviorStatus currentScrollBehaviorStatus() { return m_currentScrollBehaviorStatus; }
+    void setScrollBehaviorStatus(ScrollBehaviorStatus status) { m_currentScrollBehaviorStatus = status; }
</ins><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1);
</span><span class="cx">     WEBCORE_EXPORT void scrollToPositionWithAnimation(const FloatPoint&, ScrollClamping = ScrollClamping::Clamped);
</span><span class="lines">@@ -111,15 +111,14 @@
</span><span class="cx">     virtual void didUpdateScroll() { }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    // Functions for controlling if you can scroll past the end of the document.
-    bool constrainsScrollingToContentEdge() const { return m_constrainsScrollingToContentEdge; }
-    void setConstrainsScrollingToContentEdge(bool constrainsScrollingToContentEdge) { m_constrainsScrollingToContentEdge = constrainsScrollingToContentEdge; }
</del><ins>+    ScrollClamping scrollClamping() const { return m_scrollClamping; }
+    void setScrollClamping(ScrollClamping clamping) { m_scrollClamping = clamping; }
</ins><span class="cx"> 
</span><span class="cx">     void setVerticalScrollElasticity(ScrollElasticity scrollElasticity) { m_verticalScrollElasticity = scrollElasticity; }
</span><del>-    ScrollElasticity verticalScrollElasticity() const { return static_cast<ScrollElasticity>(m_verticalScrollElasticity); }
</del><ins>+    ScrollElasticity verticalScrollElasticity() const { return m_verticalScrollElasticity; }
</ins><span class="cx"> 
</span><span class="cx">     void setHorizontalScrollElasticity(ScrollElasticity scrollElasticity) { m_horizontalScrollElasticity = scrollElasticity; }
</span><del>-    ScrollElasticity horizontalScrollElasticity() const { return static_cast<ScrollElasticity>(m_horizontalScrollElasticity); }
</del><ins>+    ScrollElasticity horizontalScrollElasticity() const { return m_horizontalScrollElasticity; }
</ins><span class="cx"> 
</span><span class="cx">     virtual ScrollbarMode horizontalScrollbarMode() const { return ScrollbarAuto; }
</span><span class="cx">     virtual ScrollbarMode verticalScrollbarMode() const { return ScrollbarAuto; }
</span><span class="lines">@@ -167,7 +166,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool hasOverlayScrollbars() const;
</span><span class="cx">     WEBCORE_EXPORT virtual void setScrollbarOverlayStyle(ScrollbarOverlayStyle);
</span><del>-    ScrollbarOverlayStyle scrollbarOverlayStyle() const { return static_cast<ScrollbarOverlayStyle>(m_scrollbarOverlayStyle); }
</del><ins>+    ScrollbarOverlayStyle scrollbarOverlayStyle() const { return m_scrollbarOverlayStyle; }
</ins><span class="cx">     void invalidateScrollbars();
</span><span class="cx">     bool useDarkAppearanceForScrollbars() const;
</span><span class="cx"> 
</span><span class="lines">@@ -250,8 +249,8 @@
</span><span class="cx">     WEBCORE_EXPORT virtual bool scrolledToLeft() const;
</span><span class="cx">     WEBCORE_EXPORT virtual bool scrolledToRight() const;
</span><span class="cx"> 
</span><del>-    ScrollType currentScrollType() const { return static_cast<ScrollType>(m_currentScrollType); }
-    void setCurrentScrollType(ScrollType scrollType) { m_currentScrollType = static_cast<unsigned>(scrollType); }
</del><ins>+    ScrollType currentScrollType() const { return m_currentScrollType; }
+    void setCurrentScrollType(ScrollType scrollType) { m_currentScrollType = scrollType; }
</ins><span class="cx"> 
</span><span class="cx">     bool scrollShouldClearLatchedState() const { return m_scrollShouldClearLatchedState; }
</span><span class="cx">     void setScrollShouldClearLatchedState(bool shouldClear) { m_scrollShouldClearLatchedState = shouldClear; }
</span><span class="lines">@@ -396,19 +395,19 @@
</span><span class="cx">     // vertical-rl / rtl            YES                     YES
</span><span class="cx">     IntPoint m_scrollOrigin;
</span><span class="cx"> 
</span><del>-    unsigned m_constrainsScrollingToContentEdge : 1;
</del><ins>+    ScrollClamping m_scrollClamping { ScrollClamping::Clamped };
</ins><span class="cx"> 
</span><del>-    unsigned m_inLiveResize : 1;
</del><ins>+    ScrollElasticity m_verticalScrollElasticity { ScrollElasticityNone };
+    ScrollElasticity m_horizontalScrollElasticity { ScrollElasticityNone };
</ins><span class="cx"> 
</span><del>-    unsigned m_verticalScrollElasticity : 2; // ScrollElasticity
-    unsigned m_horizontalScrollElasticity : 2; // ScrollElasticity
</del><ins>+    ScrollbarOverlayStyle m_scrollbarOverlayStyle { ScrollbarOverlayStyle::ScrollbarOverlayStyleDefault };
</ins><span class="cx"> 
</span><del>-    unsigned m_scrollbarOverlayStyle : 2; // ScrollbarOverlayStyle
</del><ins>+    ScrollType m_currentScrollType { ScrollType::User };
+    ScrollBehaviorStatus m_currentScrollBehaviorStatus { ScrollBehaviorStatus::NotInAnimation };
</ins><span class="cx"> 
</span><del>-    unsigned m_scrollOriginChanged : 1;
-    unsigned m_currentScrollType : 1; // ScrollType
-    unsigned m_scrollShouldClearLatchedState : 1;
-    unsigned m_currentScrollBehaviorStatus : 1;
</del><ins>+    bool m_inLiveResize { false };
+    bool m_scrollOriginChanged { false };
+    bool m_scrollShouldClearLatchedState { false };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> WTF::TextStream& operator<<(WTF::TextStream&, const ScrollableArea&);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollingEffectsControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollingEffectsController.cpp (283523 => 283524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollingEffectsController.cpp     2021-10-04 23:23:27 UTC (rev 283523)
+++ trunk/Source/WebCore/platform/ScrollingEffectsController.cpp        2021-10-04 23:37:24 UTC (rev 283524)
</span><span class="lines">@@ -307,19 +307,14 @@
</span><span class="cx">     m_client.keyboardScrollingAnimator()->updateKeyboardScrollPosition(currentTime);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ScrollingEffectsController::scrollToOffsetForAnimation(const FloatPoint& scrollOffset)
</del><ins>+void ScrollingEffectsController::scrollAnimationDidUpdate(ScrollAnimation& animation, const FloatPoint& currentOffset)
</ins><span class="cx"> {
</span><del>-    auto currentOffset = m_client.scrollOffset();
-    auto scrollDelta = scrollOffset - currentOffset;
-    m_client.immediateScrollBy(scrollDelta);
-}
</del><ins>+    auto scrollDelta = currentOffset - m_client.scrollOffset();
</ins><span class="cx"> 
</span><del>-void ScrollingEffectsController::scrollAnimationDidUpdate(ScrollAnimation& animation, const FloatPoint& currentOffset)
-{
-    LOG_WITH_STREAM(ScrollAnimations, stream << "ScrollingEffectsController " << this << " scrollAnimationDidUpdate " << animation << " (main thread " << isMainThread() << ")");
</del><ins>+    LOG_WITH_STREAM(ScrollAnimations, stream << "ScrollingEffectsController " << this << " scrollAnimationDidUpdate " << animation << " (main thread " << isMainThread() << ") scrolling by " << scrollDelta);
</ins><span class="cx">     UNUSED_PARAM(animation);
</span><span class="cx"> 
</span><del>-    scrollToOffsetForAnimation(currentOffset);
</del><ins>+    m_client.immediateScrollBy(scrollDelta);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ScrollingEffectsController::scrollAnimationWillStart(ScrollAnimation& animation)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollingEffectsControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollingEffectsController.h (283523 => 283524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollingEffectsController.h       2021-10-04 23:23:27 UTC (rev 283523)
+++ trunk/Source/WebCore/platform/ScrollingEffectsController.h  2021-10-04 23:37:24 UTC (rev 283524)
</span><span class="lines">@@ -85,9 +85,7 @@
</span><span class="cx">     virtual void setScrollBehaviorStatus(ScrollBehaviorStatus) = 0;
</span><span class="cx">     virtual ScrollBehaviorStatus scrollBehaviorStatus() const = 0;
</span><span class="cx"> 
</span><del>-    // FIXME: use ScrollClamping to collapse these to one.
-    virtual void immediateScrollBy(const FloatSize&) = 0;
-    virtual void immediateScrollByWithoutContentEdgeConstraints(const FloatSize&) = 0;
</del><ins>+    virtual void immediateScrollBy(const FloatSize&, ScrollClamping = ScrollClamping::Clamped) = 0;
</ins><span class="cx"> 
</span><span class="cx">     // If the current scroll position is within the overhang area, this function will cause
</span><span class="cx">     // the page to scroll to the nearest boundary point.
</span><span class="lines">@@ -212,7 +210,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void startOrStopAnimationCallbacks();
</span><del>-    void scrollToOffsetForAnimation(const FloatPoint& scrollOffset);
</del><span class="cx"> 
</span><span class="cx">     // ScrollAnimationClient
</span><span class="cx">     void scrollAnimationDidUpdate(ScrollAnimation&, const FloatPoint& /* currentOffset */) final;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacScrollingEffectsControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/ScrollingEffectsController.mm (283523 => 283524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/ScrollingEffectsController.mm  2021-10-04 23:23:27 UTC (rev 283523)
+++ trunk/Source/WebCore/platform/mac/ScrollingEffectsController.mm     2021-10-04 23:37:24 UTC (rev 283524)
</span><span class="lines">@@ -315,7 +315,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!deltaToScroll.isZero())
</span><del>-        m_client.immediateScrollByWithoutContentEdgeConstraints(deltaToScroll);
</del><ins>+        m_client.immediateScrollBy(deltaToScroll, ScrollClamping::Unclamped);
</ins><span class="cx"> 
</span><span class="cx">     bool canStartAnimation = false;
</span><span class="cx">     if (m_momentumScrollInProgress) {
</span><span class="lines">@@ -333,7 +333,7 @@
</span><span class="cx">     LOG_WITH_STREAM(ScrollAnimations, stream << "ScrollingEffectsController::applyScrollDeltaWithStretching() - stretchScrollForce " << m_stretchScrollForce << " move delta " << delta << " dampedDelta " << dampedDelta);
</span><span class="cx"> 
</span><span class="cx">     auto stretchAmount = m_client.stretchAmount();
</span><del>-    m_client.immediateScrollByWithoutContentEdgeConstraints(dampedDelta - stretchAmount);
</del><ins>+    m_client.immediateScrollBy(dampedDelta - stretchAmount, ScrollClamping::Unclamped);
</ins><span class="cx"> 
</span><span class="cx">     return canStartAnimation;
</span><span class="cx"> }
</span><span class="lines">@@ -402,7 +402,7 @@
</span><span class="cx"> 
</span><span class="cx">             LOG_WITH_STREAM(ScrollAnimations, stream << "ScrollingEffectsController::updateRubberBandAnimatingState() - rubberBandDelta " << rubberBandDelta << " stretched " << m_client.stretchAmount() << " moving by " << stretchDelta);
</span><span class="cx"> 
</span><del>-            m_client.immediateScrollByWithoutContentEdgeConstraints(stretchDelta);
</del><ins>+            m_client.immediateScrollBy(stretchDelta, ScrollClamping::Unclamped);
</ins><span class="cx"> 
</span><span class="cx">             FloatSize newStretch = m_client.stretchAmount();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderListBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderListBox.cpp (283523 => 283524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderListBox.cpp 2021-10-04 23:23:27 UTC (rev 283523)
+++ trunk/Source/WebCore/rendering/RenderListBox.cpp    2021-10-04 23:37:24 UTC (rev 283524)
</span><span class="lines">@@ -90,11 +90,6 @@
</span><span class="cx"> 
</span><span class="cx"> RenderListBox::RenderListBox(HTMLSelectElement& element, RenderStyle&& style)
</span><span class="cx">     : RenderBlockFlow(element, WTFMove(style))
</span><del>-    , m_optionsChanged(true)
-    , m_scrollToRevealSelectionAfterLayout(false)
-    , m_inAutoscroll(false)
-    , m_optionsWidth(0)
-    , m_indexOffset(0)
</del><span class="cx"> {
</span><span class="cx">     view().frameView().addScrollableArea(this);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderListBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderListBox.h (283523 => 283524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderListBox.h   2021-10-04 23:23:27 UTC (rev 283523)
+++ trunk/Source/WebCore/rendering/RenderListBox.h      2021-10-04 23:37:24 UTC (rev 283524)
</span><span class="lines">@@ -173,16 +173,18 @@
</span><span class="cx"> 
</span><span class="cx">     bool shouldPlaceVerticalScrollbarOnLeft() const final { return RenderBlockFlow::shouldPlaceVerticalScrollbarOnLeft(); }
</span><span class="cx"> 
</span><del>-    bool m_optionsChanged;
-    bool m_scrollToRevealSelectionAfterLayout;
-    bool m_inAutoscroll;
-    int m_optionsWidth;
-    int m_indexOffset;
</del><ins>+    bool m_optionsChanged { true };
+    bool m_scrollToRevealSelectionAfterLayout { false };
+    bool m_inAutoscroll { false };
+    int m_optionsWidth { 0 };
</ins><span class="cx"> 
</span><ins>+    RefPtr<Scrollbar> m_vBar;
+
+    int m_indexOffset { 0 };
+
</ins><span class="cx">     std::optional<int> m_indexOfFirstVisibleItemInsidePaddingTopArea;
</span><span class="cx">     std::optional<int> m_indexOfFirstVisibleItemInsidePaddingBottomArea;
</span><span class="cx"> 
</span><del>-    RefPtr<Scrollbar> m_vBar;
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namepace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMarqueecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMarquee.cpp (283523 => 283524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMarquee.cpp 2021-10-04 23:23:27 UTC (rev 283523)
+++ trunk/Source/WebCore/rendering/RenderMarquee.cpp    2021-10-04 23:37:24 UTC (rev 283524)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(layer);
</span><span class="cx">     ASSERT(layer->scrollableArea());
</span><del>-    layer->scrollableArea()->setConstrainsScrollingToContentEdge(false);
</del><ins>+    layer->scrollableArea()->setScrollClamping(ScrollClamping::Unclamped);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RenderMarquee::~RenderMarquee() = default;
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (283523 => 283524)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp       2021-10-04 23:23:27 UTC (rev 283523)
+++ trunk/Source/WebCore/testing/Internals.cpp  2021-10-04 23:37:24 UTC (rev 283524)
</span><span class="lines">@@ -1849,14 +1849,14 @@
</span><span class="cx">         return Exception { InvalidAccessError };
</span><span class="cx"> 
</span><span class="cx">     auto& frameView = *document->view();
</span><del>-    bool constrainsScrollingToContentEdgeOldValue = frameView.constrainsScrollingToContentEdge();
</del><ins>+    auto oldClamping = frameView.scrollClamping();
</ins><span class="cx">     bool scrollbarsSuppressedOldValue = frameView.scrollbarsSuppressed();
</span><span class="cx"> 
</span><del>-    frameView.setConstrainsScrollingToContentEdge(false);
</del><ins>+    frameView.setScrollClamping(ScrollClamping::Unclamped);
</ins><span class="cx">     frameView.setScrollbarsSuppressed(false);
</span><span class="cx">     frameView.setScrollOffsetFromInternals({ x, y });
</span><span class="cx">     frameView.setScrollbarsSuppressed(scrollbarsSuppressedOldValue);
</span><del>-    frameView.setConstrainsScrollingToContentEdge(constrainsScrollingToContentEdgeOldValue);
</del><ins>+    frameView.setScrollClamping(oldClamping);
</ins><span class="cx"> 
</span><span class="cx">     return { };
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>