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

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

<h3>Log Message</h3>
<pre>Some cleanup in ScrollAnimator
https://bugs.webkit.org/show_bug.cgi?id=152649

Reviewed by Zalan Bujtas.
Source/WebCore:

Change ScrollAnimatorMac::adjustScrollPositionIfNecessary() and similar code in
ScrollingTreeFrameScrollingNodeMac::adjustScrollPositionToBoundsIfNecessary() to
constrain between minimumScrollPosition() and maximumScrollPosition(), rather than
rolling their own code.

This revealed several issues. First, RenderLayer::maximumScrollPosition() is
wrong when the layer has borders, because RenderLayer::visibleContentRectInternal()
seems to have incorrect logic. However, we can just remove it, and use the ScrollableArea
implementation.

Second, ScrollAnimatorMac::scrollToOffsetWithoutAnimation() was failing to do a
position/offset conversion, so do one. We're converting too much, and should probably
just change ScrollAnimator to do everything in terms of positions.

Third, ScrollAnimator::scroll() was clamping a scroll position as an offset
(detected by scrollbars/scroll-rtl-or-bt-layer.html), so fix that.

Remove ScrollController::absoluteScrollPosition() and overrides, since this was
confusingly named, and could just be removed.

Remove ScrollController::m_origOrigin which was assigned to, but never read.

Test: fast/scrolling/arrow-key-scroll-in-rtl-document.html: new
      fast/dom/horizontal-scrollbar-in-rtl.html: progressed with these changes.

* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::adjustScrollPositionToBoundsIfNecessary):
(WebCore::ScrollingTreeFrameScrollingNodeMac::absoluteScrollPosition): Deleted.
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::scroll):
(WebCore::ScrollAnimator::notifyPositionChanged):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::constrainScrollPosition):
* platform/cocoa/ScrollController.h:
* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::snapRubberBandTimerFired): Deleted.
(WebCore::ScrollController::snapRubberBand): Deleted.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollAnimationHelperDelegate _immediateScrollToPoint:]):
(WebCore::ScrollAnimatorMac::scroll):
(WebCore::ScrollAnimatorMac::scrollToOffsetWithoutAnimation):
(WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
(WebCore::ScrollAnimatorMac::adjustScrollPositionToBoundsIfNecessary):
(WebCore::ScrollAnimatorMac::immediateScrollToPosition):
(WebCore::ScrollAnimatorMac::immediateScrollToPositionForScrollAnimation):
(WebCore::ScrollAnimatorMac::immediateScrollTo): Deleted.
(WebCore::ScrollAnimatorMac::immediateScrollToPointForScrollAnimation): Deleted.
(WebCore::ScrollAnimatorMac::absoluteScrollPosition): Deleted.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::visibleContentRectInternal):
(WebCore::RenderLayer::overhangAmount):
(WebCore::RenderLayer::maximumScrollPosition): Deleted.
* rendering/RenderLayer.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::minimumScrollPosition):
(WebCore::RenderListBox::maximumScrollPosition): RenderListBox scrolls by lines,
so it needs a custom implementation of this.
* rendering/RenderListBox.h:

LayoutTests:

Added fast/scrolling/arrow-key-scroll-in-rtl-document.html to test for arrow
key scrolling in an RTL document, which an earlier version of the patch
regressed without detection.

* fast/dom/horizontal-scrollbar-in-rtl-expected.txt:
* fast/scrolling/arrow-key-scroll-in-rtl-document-expected.txt: Added.
* fast/scrolling/arrow-key-scroll-in-rtl-document.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastdomhorizontalscrollbarinrtlexpectedtxt">trunk/LayoutTests/fast/dom/horizontal-scrollbar-in-rtl-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepagescrollingmacScrollingTreeFrameScrollingNodeMach">trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingmacScrollingTreeFrameScrollingNodeMacmm">trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollAnimatorcpp">trunk/Source/WebCore/platform/ScrollAnimator.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollableAreah">trunk/Source/WebCore/platform/ScrollableArea.h</a></li>
<li><a href="#trunkSourceWebCoreplatformcocoaScrollControllerh">trunk/Source/WebCore/platform/cocoa/ScrollController.h</a></li>
<li><a href="#trunkSourceWebCoreplatformcocoaScrollControllermm">trunk/Source/WebCore/platform/cocoa/ScrollController.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmacScrollAnimatorMach">trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacScrollAnimatorMacmm">trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayercpp">trunk/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerh">trunk/Source/WebCore/rendering/RenderLayer.h</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>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastscrollingarrowkeyscrollinrtldocumentexpectedtxt">trunk/LayoutTests/fast/scrolling/arrow-key-scroll-in-rtl-document-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastscrollingarrowkeyscrollinrtldocumenthtml">trunk/LayoutTests/fast/scrolling/arrow-key-scroll-in-rtl-document.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (194501 => 194502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-01-02 20:08:38 UTC (rev 194501)
+++ trunk/LayoutTests/ChangeLog        2016-01-02 21:58:48 UTC (rev 194502)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2016-01-02  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Some cleanup in ScrollAnimator
+        https://bugs.webkit.org/show_bug.cgi?id=152649
+
+        Reviewed by Zalan Bujtas.
+        
+        Added fast/scrolling/arrow-key-scroll-in-rtl-document.html to test for arrow
+        key scrolling in an RTL document, which an earlier version of the patch
+        regressed without detection.
+
+        * fast/dom/horizontal-scrollbar-in-rtl-expected.txt:
+        * fast/scrolling/arrow-key-scroll-in-rtl-document-expected.txt: Added.
+        * fast/scrolling/arrow-key-scroll-in-rtl-document.html: Added.
+
</ins><span class="cx"> 2016-01-02  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Simple line layout:: Add text-decoration support.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomhorizontalscrollbarinrtlexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/horizontal-scrollbar-in-rtl-expected.txt (194501 => 194502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/horizontal-scrollbar-in-rtl-expected.txt        2016-01-02 20:08:38 UTC (rev 194501)
+++ trunk/LayoutTests/fast/dom/horizontal-scrollbar-in-rtl-expected.txt        2016-01-02 21:58:48 UTC (rev 194502)
</span><span class="lines">@@ -3,6 +3,6 @@
</span><span class="cx"> continuously call window.scrollX : Success
</span><span class="cx"> zoom in and out preserve scroll position: Success
</span><span class="cx"> resize preserves scroll position: Success
</span><del>-KeyDown HOME move x-scroll position to right for RTL page: -1000
-KeyDown END move x-scroll position to right for RTL page: -1000
</del><ins>+KeyDown HOME move x-scroll position to right for RTL page: 0
+KeyDown END move x-scroll position to right for RTL page: 0
</ins><span class="cx"> selectAll selects all document: Success
</span></span></pre></div>
<a id="trunkLayoutTestsfastscrollingarrowkeyscrollinrtldocumentexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/scrolling/arrow-key-scroll-in-rtl-document-expected.txt (0 => 194502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/arrow-key-scroll-in-rtl-document-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/scrolling/arrow-key-scroll-in-rtl-document-expected.txt        2016-01-02 21:58:48 UTC (rev 194502)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+PASS: scrollLeft is -120
</ins></span></pre></div>
<a id="trunkLayoutTestsfastscrollingarrowkeyscrollinrtldocumenthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/scrolling/arrow-key-scroll-in-rtl-document.html (0 => 194502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/scrolling/arrow-key-scroll-in-rtl-document.html                                (rev 0)
+++ trunk/LayoutTests/fast/scrolling/arrow-key-scroll-in-rtl-document.html        2016-01-02 21:58:48 UTC (rev 194502)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;html dir=&quot;rtl&quot;&gt;
+&lt;head&gt;
+    &lt;style&gt;
+        .wide {
+            width: 2000px;
+            height: 10px;
+            background-color: silver;
+        }
+        .origin {
+            position: absolute;
+            top: 0;
+            left: 0;
+            width: 10px;
+            height: 10px;
+            background-color: blue;
+        }
+    &lt;/style&gt;
+    &lt;script&gt;
+        if (window.testRunner) {
+            testRunner.dumpAsText();
+            testRunner.waitUntilDone();
+        }
+
+        function checkForScroll()
+        {
+            var expectedScrollLeft = -120;
+            var scrollLeft = document.scrollingElement.scrollLeft;
+            if (scrollLeft != expectedScrollLeft)
+                document.getElementById('result').textContent = &quot;FAIL: scrollLeft is &quot; + scrollLeft +  &quot;, expected &quot; + expectedScrollLeft;
+            else
+                document.getElementById('result').textContent = &quot;PASS: scrollLeft is &quot; + scrollLeft;
+
+            if (window.testRunner)
+                testRunner.notifyDone();
+        }
+
+        function doTest()
+        {
+            if (window.eventSender) {
+                eventSender.monitorWheelEvents();
+                eventSender.keyDown(&quot;leftArrow&quot;);
+                eventSender.keyDown(&quot;leftArrow&quot;);
+                eventSender.keyDown(&quot;leftArrow&quot;);
+                eventSender.callAfterScrollingCompletes(checkForScroll);
+            }
+        }
+        
+        window.addEventListener('load', doTest, false);
+    &lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div class=&quot;wide&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;origin&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;result&quot;&gt;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (194501 => 194502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-01-02 20:08:38 UTC (rev 194501)
+++ trunk/Source/WebCore/ChangeLog        2016-01-02 21:58:48 UTC (rev 194502)
</span><span class="lines">@@ -1,3 +1,71 @@
</span><ins>+2016-01-02  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Some cleanup in ScrollAnimator
+        https://bugs.webkit.org/show_bug.cgi?id=152649
+
+        Reviewed by Zalan Bujtas.
+
+        Change ScrollAnimatorMac::adjustScrollPositionIfNecessary() and similar code in
+        ScrollingTreeFrameScrollingNodeMac::adjustScrollPositionToBoundsIfNecessary() to
+        constrain between minimumScrollPosition() and maximumScrollPosition(), rather than
+        rolling their own code.
+        
+        This revealed several issues. First, RenderLayer::maximumScrollPosition() is
+        wrong when the layer has borders, because RenderLayer::visibleContentRectInternal()
+        seems to have incorrect logic. However, we can just remove it, and use the ScrollableArea
+        implementation.
+        
+        Second, ScrollAnimatorMac::scrollToOffsetWithoutAnimation() was failing to do a
+        position/offset conversion, so do one. We're converting too much, and should probably
+        just change ScrollAnimator to do everything in terms of positions.
+        
+        Third, ScrollAnimator::scroll() was clamping a scroll position as an offset
+        (detected by scrollbars/scroll-rtl-or-bt-layer.html), so fix that.
+        
+        Remove ScrollController::absoluteScrollPosition() and overrides, since this was
+        confusingly named, and could just be removed.
+        
+        Remove ScrollController::m_origOrigin which was assigned to, but never read.
+
+        Test: fast/scrolling/arrow-key-scroll-in-rtl-document.html: new
+              fast/dom/horizontal-scrollbar-in-rtl.html: progressed with these changes.
+
+        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
+        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
+        (WebCore::ScrollingTreeFrameScrollingNodeMac::adjustScrollPositionToBoundsIfNecessary):
+        (WebCore::ScrollingTreeFrameScrollingNodeMac::absoluteScrollPosition): Deleted.
+        * platform/ScrollAnimator.cpp:
+        (WebCore::ScrollAnimator::scroll):
+        (WebCore::ScrollAnimator::notifyPositionChanged):
+        * platform/ScrollableArea.h:
+        (WebCore::ScrollableArea::constrainScrollPosition):
+        * platform/cocoa/ScrollController.h:
+        * platform/cocoa/ScrollController.mm:
+        (WebCore::ScrollController::snapRubberBandTimerFired): Deleted.
+        (WebCore::ScrollController::snapRubberBand): Deleted.
+        * platform/mac/ScrollAnimatorMac.h:
+        * platform/mac/ScrollAnimatorMac.mm:
+        (-[WebScrollAnimationHelperDelegate _immediateScrollToPoint:]):
+        (WebCore::ScrollAnimatorMac::scroll):
+        (WebCore::ScrollAnimatorMac::scrollToOffsetWithoutAnimation):
+        (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
+        (WebCore::ScrollAnimatorMac::adjustScrollPositionToBoundsIfNecessary):
+        (WebCore::ScrollAnimatorMac::immediateScrollToPosition):
+        (WebCore::ScrollAnimatorMac::immediateScrollToPositionForScrollAnimation):
+        (WebCore::ScrollAnimatorMac::immediateScrollTo): Deleted.
+        (WebCore::ScrollAnimatorMac::immediateScrollToPointForScrollAnimation): Deleted.
+        (WebCore::ScrollAnimatorMac::absoluteScrollPosition): Deleted.
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::visibleContentRectInternal):
+        (WebCore::RenderLayer::overhangAmount):
+        (WebCore::RenderLayer::maximumScrollPosition): Deleted.
+        * rendering/RenderLayer.h:
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::minimumScrollPosition):
+        (WebCore::RenderListBox::maximumScrollPosition): RenderListBox scrolls by lines,
+        so it needs a custom implementation of this.
+        * rendering/RenderListBox.h:
+
</ins><span class="cx"> 2016-01-02  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Simple line layout:: Add text-decoration support.
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingmacScrollingTreeFrameScrollingNodeMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h (194501 => 194502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h        2016-01-02 20:08:38 UTC (rev 194501)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h        2016-01-02 21:58:48 UTC (rev 194502)
</span><span class="lines">@@ -58,7 +58,6 @@
</span><span class="cx">     bool canScrollHorizontally() override;
</span><span class="cx">     bool canScrollVertically() override;
</span><span class="cx">     bool shouldRubberBandInDirection(ScrollDirection) override;
</span><del>-    IntPoint absoluteScrollPosition() override;
</del><span class="cx">     void immediateScrollBy(const FloatSize&amp;) override;
</span><span class="cx">     void immediateScrollByWithoutContentEdgeConstraints(const FloatSize&amp;) override;
</span><span class="cx">     void stopSnapRubberbandTimer() override;
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingmacScrollingTreeFrameScrollingNodeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm (194501 => 194502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm        2016-01-02 20:08:38 UTC (rev 194501)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm        2016-01-02 21:58:48 UTC (rev 194502)
</span><span class="lines">@@ -325,11 +325,6 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IntPoint ScrollingTreeFrameScrollingNodeMac::absoluteScrollPosition()
-{
-    return roundedIntPoint(scrollPosition());
-}
-
</del><span class="cx"> void ScrollingTreeFrameScrollingNodeMac::immediateScrollBy(const FloatSize&amp; delta)
</span><span class="cx"> {
</span><span class="cx">     scrollBy(delta);
</span><span class="lines">@@ -350,15 +345,9 @@
</span><span class="cx"> 
</span><span class="cx"> void ScrollingTreeFrameScrollingNodeMac::adjustScrollPositionToBoundsIfNecessary()
</span><span class="cx"> {
</span><del>-    FloatPoint currentScrollPosition = absoluteScrollPosition();
-    FloatPoint minPosition = minimumScrollPosition();
-    FloatPoint maxPosition = maximumScrollPosition();
-
-    float nearestXWithinBounds = std::max(std::min(currentScrollPosition.x(), maxPosition.x()), minPosition.x());
-    float nearestYWithinBounds = std::max(std::min(currentScrollPosition.y(), maxPosition.y()), minPosition.y());
-
-    FloatPoint nearestPointWithinBounds(nearestXWithinBounds, nearestYWithinBounds);
-    immediateScrollBy(nearestPointWithinBounds - currentScrollPosition);
</del><ins>+    FloatPoint currentScrollPosition = scrollPosition();
+    FloatPoint constainedPosition = currentScrollPosition.constrainedBetween(minimumScrollPosition(), maximumScrollPosition());
+    immediateScrollBy(constainedPosition - currentScrollPosition);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> FloatPoint ScrollingTreeFrameScrollingNodeMac::scrollPosition() const
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollAnimatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollAnimator.cpp (194501 => 194502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollAnimator.cpp        2016-01-02 20:08:38 UTC (rev 194501)
+++ trunk/Source/WebCore/platform/ScrollAnimator.cpp        2016-01-02 21:58:48 UTC (rev 194502)
</span><span class="lines">@@ -63,15 +63,22 @@
</span><span class="cx"> 
</span><span class="cx"> bool ScrollAnimator::scroll(ScrollbarOrientation orientation, ScrollGranularity, float step, float multiplier)
</span><span class="cx"> {
</span><del>-    float* currentPos = (orientation == HorizontalScrollbar) ? &amp;m_currentPosX : &amp;m_currentPosY;
-    float newPos = std::max(std::min(*currentPos + (step * multiplier), static_cast&lt;float&gt;(m_scrollableArea.scrollSize(orientation))), 0.0f);
-    float delta = *currentPos - newPos;
-    if (*currentPos == newPos)
</del><ins>+    FloatPoint currentPosition(m_currentPosX, m_currentPosY);
+    FloatSize delta;
+    if (orientation == HorizontalScrollbar)
+        delta.setWidth(step * multiplier);
+    else
+        delta.setHeight(step * multiplier);
+
+    FloatPoint newPosition = FloatPoint(currentPosition + delta).constrainedBetween(m_scrollableArea.minimumScrollPosition(), m_scrollableArea.maximumScrollPosition());
+    if (currentPosition == newPosition)
</ins><span class="cx">         return false;
</span><del>-    *currentPos = newPos;
</del><span class="cx"> 
</span><del>-    notifyPositionChanged(orientation == HorizontalScrollbar ? FloatSize(delta, 0) : FloatSize(0, delta));
</del><ins>+    // FIXME: m_currentPosX/Y should just be a FloatPoint.
+    m_currentPosX = newPosition.x();
+    m_currentPosY = newPosition.y();
</ins><span class="cx"> 
</span><ins>+    notifyPositionChanged(newPosition - currentPosition);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -194,7 +201,8 @@
</span><span class="cx"> void ScrollAnimator::notifyPositionChanged(const FloatSize&amp; delta)
</span><span class="cx"> {
</span><span class="cx">     UNUSED_PARAM(delta);
</span><del>-    m_scrollableArea.setScrollOffsetFromAnimation(IntPoint(m_currentPosX, m_currentPosY));
</del><ins>+    // FIXME: need to not map back and forth all the time.
+    m_scrollableArea.setScrollOffsetFromAnimation(m_scrollableArea.scrollOffsetFromPosition(IntPoint(m_currentPosX, m_currentPosY)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollableAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollableArea.h (194501 => 194502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollableArea.h        2016-01-02 20:08:38 UTC (rev 194501)
+++ trunk/Source/WebCore/platform/ScrollableArea.h        2016-01-02 21:58:48 UTC (rev 194502)
</span><span class="lines">@@ -188,6 +188,11 @@
</span><span class="cx">     virtual ScrollPosition minimumScrollPosition() const;
</span><span class="cx">     virtual ScrollPosition maximumScrollPosition() const;
</span><span class="cx"> 
</span><ins>+    ScrollPosition constrainScrollPosition(const ScrollPosition&amp; position) const
+    {
+        return position.constrainedBetween(minimumScrollPosition(), maximumScrollPosition());
+    }
+
</ins><span class="cx">     ScrollOffset maximumScrollOffset() const;
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT ScrollPosition scrollPositionFromOffset(ScrollOffset) const;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformcocoaScrollControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/cocoa/ScrollController.h (194501 => 194502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/cocoa/ScrollController.h        2016-01-02 20:08:38 UTC (rev 194501)
+++ trunk/Source/WebCore/platform/cocoa/ScrollController.h        2016-01-02 21:58:48 UTC (rev 194502)
</span><span class="lines">@@ -60,9 +60,6 @@
</span><span class="cx">     virtual bool canScrollVertically() = 0;
</span><span class="cx">     virtual bool shouldRubberBandInDirection(ScrollDirection) = 0;
</span><span class="cx"> 
</span><del>-    // Return the absolute scroll position, not relative to the scroll origin.
-    virtual WebCore::IntPoint absoluteScrollPosition() = 0;
-
</del><span class="cx">     virtual void immediateScrollBy(const FloatSize&amp;) = 0;
</span><span class="cx">     virtual void immediateScrollByWithoutContentEdgeConstraints(const FloatSize&amp;) = 0;
</span><span class="cx">     virtual void startSnapRubberbandTimer()
</span><span class="lines">@@ -179,7 +176,6 @@
</span><span class="cx">     // Rubber band state.
</span><span class="cx">     CFTimeInterval m_startTime { 0 };
</span><span class="cx">     FloatSize m_startStretch;
</span><del>-    FloatPoint m_origOrigin;
</del><span class="cx">     FloatSize m_origVelocity;
</span><span class="cx">     RunLoop::Timer&lt;ScrollController&gt; m_snapRubberbandTimer;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformcocoaScrollControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/cocoa/ScrollController.mm (194501 => 194502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/cocoa/ScrollController.mm        2016-01-02 20:08:38 UTC (rev 194501)
+++ trunk/Source/WebCore/platform/cocoa/ScrollController.mm        2016-01-02 21:58:48 UTC (rev 194502)
</span><span class="lines">@@ -349,12 +349,10 @@
</span><span class="cx">                 m_stretchScrollForce = FloatSize();
</span><span class="cx">                 m_startTime = 0;
</span><span class="cx">                 m_startStretch = FloatSize();
</span><del>-                m_origOrigin = FloatPoint();
</del><span class="cx">                 m_origVelocity = FloatSize();
</span><span class="cx">                 return;
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            m_origOrigin = m_client.absoluteScrollPosition() - m_startStretch;
</del><span class="cx">             m_origVelocity = m_momentumVelocity;
</span><span class="cx"> 
</span><span class="cx">             // Just like normal scrolling, prefer vertical rubberbanding
</span><span class="lines">@@ -387,7 +385,6 @@
</span><span class="cx">             m_stretchScrollForce = FloatSize();
</span><span class="cx">             m_startTime = 0;
</span><span class="cx">             m_startStretch = FloatSize();
</span><del>-            m_origOrigin = FloatPoint();
</del><span class="cx">             m_origVelocity = FloatSize();
</span><span class="cx">         }
</span><span class="cx">     } else {
</span><span class="lines">@@ -451,7 +448,6 @@
</span><span class="cx"> 
</span><span class="cx">     m_startTime = [NSDate timeIntervalSinceReferenceDate];
</span><span class="cx">     m_startStretch = FloatSize();
</span><del>-    m_origOrigin = FloatPoint();
</del><span class="cx">     m_origVelocity = FloatSize();
</span><span class="cx"> 
</span><span class="cx">     startSnapRubberbandTimer();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacScrollAnimatorMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h (194501 => 194502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h        2016-01-02 20:08:38 UTC (rev 194501)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h        2016-01-02 21:58:48 UTC (rev 194502)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx">     ScrollAnimatorMac(ScrollableArea&amp;);
</span><span class="cx">     virtual ~ScrollAnimatorMac();
</span><span class="cx"> 
</span><del>-    void immediateScrollToPointForScrollAnimation(const FloatPoint&amp; newPosition);
</del><ins>+    void immediateScrollToPositionForScrollAnimation(const FloatPoint&amp; newPosition);
</ins><span class="cx">     bool haveScrolledSincePageLoad() const { return m_haveScrolledSincePageLoad; }
</span><span class="cx"> 
</span><span class="cx">     void updateScrollerStyle();
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx"> 
</span><span class="cx">     FloatPoint adjustScrollPositionIfNecessary(const FloatPoint&amp;) const;
</span><span class="cx"> 
</span><del>-    void immediateScrollTo(const FloatPoint&amp;);
</del><ins>+    void immediateScrollToPosition(const FloatPoint&amp;);
</ins><span class="cx"> 
</span><span class="cx">     bool isRubberBandInProgress() const override;
</span><span class="cx">     bool isScrollSnapInProgress() const override;
</span><span class="lines">@@ -148,7 +148,6 @@
</span><span class="cx">     virtual bool canScrollHorizontally() override;
</span><span class="cx">     virtual bool canScrollVertically() override;
</span><span class="cx">     virtual bool shouldRubberBandInDirection(ScrollDirection) override;
</span><del>-    virtual WebCore::IntPoint absoluteScrollPosition() override;
</del><span class="cx">     virtual void immediateScrollByWithoutContentEdgeConstraints(const FloatSize&amp;) override;
</span><span class="cx">     virtual void immediateScrollBy(const FloatSize&amp;) override;
</span><span class="cx">     virtual void adjustScrollPositionToBoundsIfNecessary() override;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacScrollAnimatorMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (194501 => 194502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm        2016-01-02 20:08:38 UTC (rev 194501)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm        2016-01-02 21:58:48 UTC (rev 194502)
</span><span class="lines">@@ -32,12 +32,14 @@
</span><span class="cx"> #include &quot;BlockExceptions.h&quot;
</span><span class="cx"> #include &quot;FloatPoint.h&quot;
</span><span class="cx"> #include &quot;GraphicsLayer.h&quot;
</span><ins>+#include &quot;Logging.h&quot;
</ins><span class="cx"> #include &quot;NSScrollerImpDetails.h&quot;
</span><span class="cx"> #include &quot;PlatformWheelEvent.h&quot;
</span><span class="cx"> #include &quot;ScrollView.h&quot;
</span><span class="cx"> #include &quot;ScrollableArea.h&quot;
</span><span class="cx"> #include &quot;ScrollbarTheme.h&quot;
</span><span class="cx"> #include &quot;ScrollbarThemeMac.h&quot;
</span><ins>+#include &quot;TextStream.h&quot;
</ins><span class="cx"> #include &quot;WebCoreSystemInterface.h&quot;
</span><span class="cx"> 
</span><span class="cx"> using namespace WebCore;
</span><span class="lines">@@ -130,7 +132,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (!_animator)
</span><span class="cx">         return;
</span><del>-    _animator-&gt;immediateScrollToPointForScrollAnimation(newPosition);
</del><ins>+    _animator-&gt;immediateScrollToPositionForScrollAnimation(newPosition);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (NSPoint)_pixelAlignProposedScrollPosition:(NSPoint)newOrigin
</span><span class="lines">@@ -700,26 +702,35 @@
</span><span class="cx">     if (granularity == ScrollByPixel)
</span><span class="cx">         return ScrollAnimator::scroll(orientation, granularity, step, multiplier);
</span><span class="cx"> 
</span><del>-    float currentPos = orientation == HorizontalScrollbar ? m_currentPosX : m_currentPosY;
-    float newPos = std::max&lt;float&gt;(std::min&lt;float&gt;(currentPos + (step * multiplier), static_cast&lt;float&gt;(m_scrollableArea.scrollSize(orientation))), 0);
-    if (currentPos == newPos)
</del><ins>+    FloatPoint currentPosition(m_currentPosX, m_currentPosY);
+    FloatSize delta;
+    if (orientation == HorizontalScrollbar)
+        delta.setWidth(step * multiplier);
+    else
+        delta.setHeight(step * multiplier);
+
+    FloatPoint newPosition = FloatPoint(currentPosition + delta).constrainedBetween(m_scrollableArea.minimumScrollPosition(), m_scrollableArea.maximumScrollPosition());
+    if (currentPosition == newPosition)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    NSPoint newPoint;
</del><span class="cx">     if ([m_scrollAnimationHelper _isAnimating]) {
</span><span class="cx">         NSPoint targetOrigin = [m_scrollAnimationHelper targetOrigin];
</span><del>-        newPoint = orientation == HorizontalScrollbar ? NSMakePoint(newPos, targetOrigin.y) : NSMakePoint(targetOrigin.x, newPos);
-    } else
-        newPoint = orientation == HorizontalScrollbar ? NSMakePoint(newPos, m_currentPosY) : NSMakePoint(m_currentPosX, newPos);
</del><ins>+        if (orientation == HorizontalScrollbar)
+            newPosition.setY(targetOrigin.y);
+        else
+            newPosition.setX(targetOrigin.x);
+    }
</ins><span class="cx"> 
</span><del>-    [m_scrollAnimationHelper scrollToPoint:newPoint];
</del><ins>+    LOG_WITH_STREAM(Scrolling, stream &lt;&lt; &quot;ScrollAnimatorMac::scroll &quot; &lt;&lt; &quot; from &quot; &lt;&lt; FloatPoint(m_currentPosX, m_currentPosY) &lt;&lt; &quot; to &quot; &lt;&lt; newPosition);
+    [m_scrollAnimationHelper scrollToPoint:newPosition];
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+// FIXME: Maybe this should take a position.
</ins><span class="cx"> void ScrollAnimatorMac::scrollToOffsetWithoutAnimation(const FloatPoint&amp; offset)
</span><span class="cx"> {
</span><span class="cx">     [m_scrollAnimationHelper _stopRun];
</span><del>-    immediateScrollTo(offset);
</del><ins>+    immediateScrollToPosition(ScrollableArea::scrollPositionFromOffset(offset, toFloatSize(m_scrollableArea.scrollOrigin())));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> FloatPoint ScrollAnimatorMac::adjustScrollPositionIfNecessary(const FloatPoint&amp; position) const
</span><span class="lines">@@ -727,10 +738,7 @@
</span><span class="cx">     if (!m_scrollableArea.constrainsScrollingToContentEdge())
</span><span class="cx">         return position;
</span><span class="cx"> 
</span><del>-    float newX = std::max&lt;float&gt;(std::min&lt;float&gt;(position.x(), m_scrollableArea.totalContentsSize().width() - m_scrollableArea.visibleWidth()), 0);
-    float newY = std::max&lt;float&gt;(std::min&lt;float&gt;(position.y(), m_scrollableArea.totalContentsSize().height() - m_scrollableArea.visibleHeight()), 0);
-
-    return FloatPoint(newX, newY);
</del><ins>+    return m_scrollableArea.constrainScrollPosition(ScrollPosition(position));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ScrollAnimatorMac::adjustScrollPositionToBoundsIfNecessary()
</span><span class="lines">@@ -738,14 +746,14 @@
</span><span class="cx">     bool currentlyConstrainsToContentEdge = m_scrollableArea.constrainsScrollingToContentEdge();
</span><span class="cx">     m_scrollableArea.setConstrainsScrollingToContentEdge(true);
</span><span class="cx"> 
</span><del>-    IntPoint currentScrollPosition = absoluteScrollPosition();
-    FloatPoint nearestPointWithinBounds = adjustScrollPositionIfNecessary(absoluteScrollPosition());
-    immediateScrollBy(nearestPointWithinBounds - currentScrollPosition);
</del><ins>+    ScrollPosition currentScrollPosition = m_scrollableArea.scrollPosition();
+    ScrollPosition constainedPosition = m_scrollableArea.constrainScrollPosition(currentScrollPosition);
+    immediateScrollBy(constainedPosition - currentScrollPosition);
</ins><span class="cx"> 
</span><span class="cx">     m_scrollableArea.setConstrainsScrollingToContentEdge(currentlyConstrainsToContentEdge);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ScrollAnimatorMac::immediateScrollTo(const FloatPoint&amp; newPosition)
</del><ins>+void ScrollAnimatorMac::immediateScrollToPosition(const FloatPoint&amp; newPosition)
</ins><span class="cx"> {
</span><span class="cx">     FloatPoint adjustedPosition = adjustScrollPositionIfNecessary(newPosition);
</span><span class="cx">  
</span><span class="lines">@@ -779,10 +787,10 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ScrollAnimatorMac::immediateScrollToPointForScrollAnimation(const FloatPoint&amp; newPosition)
</del><ins>+void ScrollAnimatorMac::immediateScrollToPositionForScrollAnimation(const FloatPoint&amp; newPosition)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_scrollAnimationHelper);
</span><del>-    immediateScrollTo(newPosition);
</del><ins>+    immediateScrollToPosition(newPosition);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ScrollAnimatorMac::notifyPositionChanged(const FloatSize&amp; delta)
</span><span class="lines">@@ -1282,12 +1290,6 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IntPoint ScrollAnimatorMac::absoluteScrollPosition()
-{
-    // FIXME: can this use m_scrollableArea.scrollPosition()?
-    return m_scrollableArea.scrollOffsetFromPosition(m_scrollableArea.visibleContentRect().location());
-}
-
</del><span class="cx"> void ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints(const FloatSize&amp; delta)
</span><span class="cx"> {
</span><span class="cx">     m_scrollableArea.setConstrainsScrollingToContentEdge(false);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (194501 => 194502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.cpp        2016-01-02 20:08:38 UTC (rev 194501)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp        2016-01-02 21:58:48 UTC (rev 194502)
</span><span class="lines">@@ -2732,19 +2732,13 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ScrollPosition RenderLayer::maximumScrollPosition() const
-{
-    // FIXME: m_scrollSize may not be up-to-date if m_scrollDimensionsDirty is true.
-    // FIXME: should be able to use the ScrollableArea implementation.
-    return scrollPositionFromOffset(roundedIntPoint(m_scrollSize) - visibleContentRectIncludingScrollbars(ContentsVisibleRect).size());
-}
-
</del><span class="cx"> IntRect RenderLayer::visibleContentRectInternal(VisibleContentRectIncludesScrollbars scrollbarInclusion, VisibleContentRectBehavior) const
</span><span class="cx"> {
</span><span class="cx">     IntSize scrollbarSpace;
</span><span class="cx">     if (showsOverflowControls() &amp;&amp; scrollbarInclusion == IncludeScrollbars)
</span><span class="cx">         scrollbarSpace = scrollbarIntrusion();
</span><span class="cx">     
</span><ins>+    // FIXME: This seems wrong: m_layerSize includes borders. Can we just use the ScrollableArea implementation?
</ins><span class="cx">     return IntRect(scrollPosition(), IntSize(std::max(0, m_layerSize.width() - scrollbarSpace.width()), std::max(0, m_layerSize.height() - scrollbarSpace.height())));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2756,7 +2750,7 @@
</span><span class="cx"> 
</span><span class="cx">     IntSize stretch;
</span><span class="cx"> 
</span><del>-    // FIXME: use maximumScrollOffset()
</del><ins>+    // FIXME: use maximumScrollOffset(), or just move this to ScrollableArea.
</ins><span class="cx">     ScrollOffset scrollOffset = scrollOffsetFromPosition(scrollPosition());
</span><span class="cx">     if (scrollOffset.y() &lt; 0)
</span><span class="cx">         stretch.setHeight(scrollOffset.y());
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.h (194501 => 194502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.h        2016-01-02 20:08:38 UTC (rev 194501)
+++ trunk/Source/WebCore/rendering/RenderLayer.h        2016-01-02 21:58:48 UTC (rev 194502)
</span><span class="lines">@@ -866,7 +866,6 @@
</span><span class="cx">     virtual void setScrollOffset(const ScrollOffset&amp;) override;
</span><span class="cx"> 
</span><span class="cx">     virtual ScrollPosition scrollPosition() const override { return m_scrollPosition; }
</span><del>-    virtual ScrollPosition maximumScrollPosition() const override;
</del><span class="cx"> 
</span><span class="cx">     virtual IntRect visibleContentRectInternal(VisibleContentRectIncludesScrollbars, VisibleContentRectBehavior) const override;
</span><span class="cx">     virtual IntSize visibleSize() const override;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderListBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderListBox.cpp (194501 => 194502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderListBox.cpp        2016-01-02 20:08:38 UTC (rev 194501)
+++ trunk/Source/WebCore/rendering/RenderListBox.cpp        2016-01-02 21:58:48 UTC (rev 194502)
</span><span class="lines">@@ -608,6 +608,16 @@
</span><span class="cx">     return m_indexOffset;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+ScrollPosition RenderListBox::minimumScrollPosition() const
+{
+    return { 0, 0 };
+}
+
+ScrollPosition RenderListBox::maximumScrollPosition() const
+{
+    return { 0, numItems() - numVisibleItems() };
+}
+
</ins><span class="cx"> void RenderListBox::setScrollOffset(const ScrollOffset&amp; offset)
</span><span class="cx"> {
</span><span class="cx">     scrollTo(offset.y());
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderListBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderListBox.h (194501 => 194502)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderListBox.h        2016-01-02 20:08:38 UTC (rev 194501)
+++ trunk/Source/WebCore/rendering/RenderListBox.h        2016-01-02 21:58:48 UTC (rev 194502)
</span><span class="lines">@@ -112,6 +112,8 @@
</span><span class="cx">     virtual int scrollSize(ScrollbarOrientation) const override;
</span><span class="cx">     virtual int scrollPosition(Scrollbar*) const override;
</span><span class="cx">     virtual void setScrollOffset(const ScrollOffset&amp;) override;
</span><ins>+    virtual ScrollPosition minimumScrollPosition() const override;
+    virtual ScrollPosition maximumScrollPosition() const override;
</ins><span class="cx">     virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&amp;) override;
</span><span class="cx">     virtual bool isActive() const override;
</span><span class="cx">     virtual bool isScrollCornerVisible() const override { return false; } // We don't support resize on list boxes yet. If we did these would have to change.
</span></span></pre>
</div>
</div>

</body>
</html>