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

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

<h3>Log Message</h3>
<pre>Clarify that scrollPositionChangedViaPlatformWidget takes offsets
https://bugs.webkit.org/show_bug.cgi?id=152606

Reviewed by Zalan Bujtas.

scrollPositionChangedViaPlatformWidget actually gets scroll offsets, since the
values we get from AppKit are zero-based, so rename to scrollOffsetChangedViaPlatformWidget().

Change ScrollableArea's setScrollPosition() and requestScrollPositionUpdate() to take
ScrollPositions.

Add a FIXME noting that willRevealEdge events are probably broken in RTL documents.

Source/WebCore:

* dom/Document.cpp:
(WebCore::Document::sendWillRevealEdgeEventsIfNeeded):
* page/FrameView.cpp:
(WebCore::FrameView::setScrollPosition):
(WebCore::FrameView::scrollOffsetChangedViaPlatformWidgetImpl):
(WebCore::FrameView::scrollPositionChanged):
(WebCore::FrameView::requestScrollPositionUpdate):
(WebCore::FrameView::scrollPositionChangedViaPlatformWidgetImpl): Deleted.
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollOffsetChangedViaPlatformWidget):
(WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange):
(WebCore::ScrollView::scrollTo):
(WebCore::ScrollView::setScrollPosition):
(WebCore::ScrollView::scrollPositionChangedViaPlatformWidget): Deleted.
* platform/ScrollView.h:
(WebCore::ScrollView::scrollOffsetChangedViaPlatformWidgetImpl):
(WebCore::ScrollView::scrollPositionChangedViaPlatformWidgetImpl): Deleted.
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::notifyScrollPositionChanged):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::requestScrollPositionUpdate):

Source/WebKit/mac:

* WebView/WebHTMLView.mm:
(-[WebHTMLView _frameOrBoundsChanged]):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewh">trunk/Source/WebCore/page/FrameView.h</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollViewcpp">trunk/Source/WebCore/platform/ScrollView.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollViewh">trunk/Source/WebCore/platform/ScrollView.h</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="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebHTMLViewmm">trunk/Source/WebKit/mac/WebView/WebHTMLView.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (194462 => 194463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-12-31 19:33:56 UTC (rev 194462)
+++ trunk/Source/WebCore/ChangeLog        2015-12-31 19:35:18 UTC (rev 194463)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2015-12-31  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Clarify that scrollPositionChangedViaPlatformWidget takes offsets
+        https://bugs.webkit.org/show_bug.cgi?id=152606
+
+        Reviewed by Zalan Bujtas.
+
+        scrollPositionChangedViaPlatformWidget actually gets scroll offsets, since the
+        values we get from AppKit are zero-based, so rename to scrollOffsetChangedViaPlatformWidget().
+        
+        Change ScrollableArea's setScrollPosition() and requestScrollPositionUpdate() to take
+        ScrollPositions.
+        
+        Add a FIXME noting that willRevealEdge events are probably broken in RTL documents.
+
+        * dom/Document.cpp:
+        (WebCore::Document::sendWillRevealEdgeEventsIfNeeded):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::setScrollPosition):
+        (WebCore::FrameView::scrollOffsetChangedViaPlatformWidgetImpl):
+        (WebCore::FrameView::scrollPositionChanged):
+        (WebCore::FrameView::requestScrollPositionUpdate):
+        (WebCore::FrameView::scrollPositionChangedViaPlatformWidgetImpl): Deleted.
+        * page/FrameView.h:
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::scrollOffsetChangedViaPlatformWidget):
+        (WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange):
+        (WebCore::ScrollView::scrollTo):
+        (WebCore::ScrollView::setScrollPosition):
+        (WebCore::ScrollView::scrollPositionChangedViaPlatformWidget): Deleted.
+        * platform/ScrollView.h:
+        (WebCore::ScrollView::scrollOffsetChangedViaPlatformWidgetImpl):
+        (WebCore::ScrollView::scrollPositionChangedViaPlatformWidgetImpl): Deleted.
+        * platform/ScrollableArea.cpp:
+        (WebCore::ScrollableArea::notifyScrollPositionChanged):
+        * platform/ScrollableArea.h:
+        (WebCore::ScrollableArea::requestScrollPositionUpdate):
+
</ins><span class="cx"> 2015-12-31  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Simple line layout: Text with stroke width is not positioned correctly.
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (194462 => 194463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2015-12-31 19:33:56 UTC (rev 194462)
+++ trunk/Source/WebCore/dom/Document.cpp        2015-12-31 19:35:18 UTC (rev 194463)
</span><span class="lines">@@ -6098,7 +6098,7 @@
</span><span class="cx">     // that this is the first moment that we know we crossed the magic line).
</span><span class="cx">     
</span><span class="cx"> #if ENABLE(WILL_REVEAL_EDGE_EVENTS)
</span><del>-    
</del><ins>+    // FIXME: broken in RTL documents.
</ins><span class="cx">     int willRevealBottomNotificationPoint = std::max(0, contentsSize.height() - 2 *  visibleRect.height());
</span><span class="cx">     int willRevealTopNotificationPoint = visibleRect.height();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (194462 => 194463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2015-12-31 19:33:56 UTC (rev 194462)
+++ trunk/Source/WebCore/page/FrameView.cpp        2015-12-31 19:35:18 UTC (rev 194463)
</span><span class="lines">@@ -2130,14 +2130,14 @@
</span><span class="cx">     setScrollPosition(IntPoint(bounds.x() - centeringOffsetX - rect.x(), bounds.y() - centeringOffsetY - rect.y()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void FrameView::setScrollPosition(const IntPoint&amp; scrollPoint)
</del><ins>+void FrameView::setScrollPosition(const ScrollPosition&amp; scrollPosition)
</ins><span class="cx"> {
</span><span class="cx">     TemporaryChange&lt;bool&gt; changeInProgrammaticScroll(m_inProgrammaticScroll, true);
</span><span class="cx">     m_maintainScrollPositionAnchor = nullptr;
</span><span class="cx">     Page* page = frame().page();
</span><span class="cx">     if (page &amp;&amp; page-&gt;expectsWheelEventTriggers())
</span><span class="cx">         scrollAnimator().setWheelEventTestTrigger(page-&gt;testTrigger());
</span><del>-    ScrollView::setScrollPosition(scrollPoint);
</del><ins>+    ScrollView::setScrollPosition(scrollPosition);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void FrameView::delegatesScrollingDidChange()
</span><span class="lines">@@ -2191,15 +2191,15 @@
</span><span class="cx">     frame().loader().client().didChangeScrollOffset();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void FrameView::scrollPositionChangedViaPlatformWidgetImpl(const IntPoint&amp; oldPosition, const IntPoint&amp; newPosition)
</del><ins>+void FrameView::scrollOffsetChangedViaPlatformWidgetImpl(const ScrollOffset&amp; oldOffset, const ScrollOffset&amp; newOffset)
</ins><span class="cx"> {
</span><span class="cx">     updateLayerPositionsAfterScrolling();
</span><span class="cx">     updateCompositingLayersAfterScrolling();
</span><span class="cx">     repaintSlowRepaintObjects();
</span><del>-    scrollPositionChanged(oldPosition, newPosition);
</del><ins>+    scrollPositionChanged(scrollPositionFromOffset(oldOffset), scrollPositionFromOffset(newOffset));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void FrameView::scrollPositionChanged(const IntPoint&amp; oldPosition, const IntPoint&amp; newPosition)
</del><ins>+void FrameView::scrollPositionChanged(const ScrollPosition&amp; oldPosition, const ScrollPosition&amp; newPosition)
</ins><span class="cx"> {
</span><span class="cx">     Page* page = frame().page();
</span><span class="cx">     auto throttlingDelay = page ? page-&gt;chrome().client().eventThrottlingDelay() : std::chrono::milliseconds::zero();
</span><span class="lines">@@ -2351,7 +2351,7 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool FrameView::requestScrollPositionUpdate(const IntPoint&amp; position)
</del><ins>+bool FrameView::requestScrollPositionUpdate(const ScrollPosition&amp; position)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(ASYNC_SCROLLING)
</span><span class="cx">     if (TiledBacking* tiledBacking = this-&gt;tiledBacking())
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.h (194462 => 194463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.h        2015-12-31 19:33:56 UTC (rev 194462)
+++ trunk/Source/WebCore/page/FrameView.h        2015-12-31 19:35:18 UTC (rev 194463)
</span><span class="lines">@@ -237,10 +237,10 @@
</span><span class="cx"> #if USE(COORDINATED_GRAPHICS)
</span><span class="cx">     virtual void setFixedVisibleContentRect(const IntRect&amp;) override;
</span><span class="cx"> #endif
</span><del>-    WEBCORE_EXPORT virtual void setScrollPosition(const IntPoint&amp;) override;
</del><ins>+    WEBCORE_EXPORT virtual void setScrollPosition(const ScrollPosition&amp;) override;
</ins><span class="cx">     virtual void updateLayerPositionsAfterScrolling() override;
</span><span class="cx">     virtual void updateCompositingLayersAfterScrolling() override;
</span><del>-    virtual bool requestScrollPositionUpdate(const IntPoint&amp;) override;
</del><ins>+    virtual bool requestScrollPositionUpdate(const ScrollPosition&amp;) override;
</ins><span class="cx">     virtual bool isRubberBandInProgress() const override;
</span><span class="cx">     WEBCORE_EXPORT virtual ScrollPosition minimumScrollPosition() const override;
</span><span class="cx">     WEBCORE_EXPORT virtual ScrollPosition maximumScrollPosition() const override;
</span><span class="lines">@@ -597,7 +597,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool shouldDeferScrollUpdateAfterContentSizeChange() override;
</span><span class="cx"> 
</span><del>-    virtual void scrollPositionChangedViaPlatformWidgetImpl(const IntPoint&amp; oldPosition, const IntPoint&amp; newPosition) override;
</del><ins>+    virtual void scrollOffsetChangedViaPlatformWidgetImpl(const ScrollOffset&amp; oldOffset, const ScrollOffset&amp; newOffset) override;
</ins><span class="cx"> 
</span><span class="cx">     void applyOverflowToViewport(const RenderElement&amp;, ScrollbarMode&amp; hMode, ScrollbarMode&amp; vMode);
</span><span class="cx">     void applyPaginationToViewport();
</span><span class="lines">@@ -658,7 +658,7 @@
</span><span class="cx">     bool updateEmbeddedObjects();
</span><span class="cx">     void updateEmbeddedObject(RenderEmbeddedObject&amp;);
</span><span class="cx">     void scrollToAnchor();
</span><del>-    void scrollPositionChanged(const IntPoint&amp; oldPosition, const IntPoint&amp; newPosition);
</del><ins>+    void scrollPositionChanged(const ScrollPosition&amp; oldPosition, const ScrollPosition&amp; newPosition);
</ins><span class="cx">     void scrollableAreaSetChanged();
</span><span class="cx">     void sendScrollEvent();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollView.cpp (194462 => 194463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollView.cpp        2015-12-31 19:33:56 UTC (rev 194462)
+++ trunk/Source/WebCore/platform/ScrollView.cpp        2015-12-31 19:35:18 UTC (rev 194463)
</span><span class="lines">@@ -444,35 +444,35 @@
</span><span class="cx">     scrollTo(scrollPositionFromOffset(constrainedOffset));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ScrollView::scrollPositionChangedViaPlatformWidget(const IntPoint&amp; oldPosition, const IntPoint&amp; newPosition)
</del><ins>+void ScrollView::scrollOffsetChangedViaPlatformWidget(const ScrollOffset&amp; oldOffset, const ScrollOffset&amp; newOffset)
</ins><span class="cx"> {
</span><span class="cx">     // We should not attempt to actually modify (paint) platform widgets if the layout phase
</span><span class="cx">     // is not complete. Instead, defer the scroll event until the layout finishes.
</span><span class="cx">     if (shouldDeferScrollUpdateAfterContentSizeChange()) {
</span><span class="cx">         // We only care about the most recent scroll position change request
</span><del>-        m_deferredScrollPositions = std::make_unique&lt;std::pair&lt;IntPoint, IntPoint&gt;&gt;(std::make_pair(oldPosition, newPosition));
</del><ins>+        m_deferredScrollOffsets = std::make_unique&lt;std::pair&lt;ScrollOffset, ScrollOffset&gt;&gt;(std::make_pair(oldOffset, newOffset));
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    scrollPositionChangedViaPlatformWidgetImpl(oldPosition, newPosition);
</del><ins>+    scrollOffsetChangedViaPlatformWidgetImpl(oldOffset, newOffset);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ScrollView::handleDeferredScrollUpdateAfterContentSizeChange()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!shouldDeferScrollUpdateAfterContentSizeChange());
</span><span class="cx"> 
</span><del>-    if (!m_deferredScrollDelta &amp;&amp; !m_deferredScrollPositions)
</del><ins>+    if (!m_deferredScrollDelta &amp;&amp; !m_deferredScrollOffsets)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    ASSERT(static_cast&lt;bool&gt;(m_deferredScrollDelta) != static_cast&lt;bool&gt;(m_deferredScrollPositions));
</del><ins>+    ASSERT(static_cast&lt;bool&gt;(m_deferredScrollDelta) != static_cast&lt;bool&gt;(m_deferredScrollOffsets));
</ins><span class="cx"> 
</span><span class="cx">     if (m_deferredScrollDelta)
</span><span class="cx">         completeUpdatesAfterScrollTo(*m_deferredScrollDelta);
</span><del>-    else if (m_deferredScrollPositions)
-        scrollPositionChangedViaPlatformWidgetImpl(m_deferredScrollPositions-&gt;first, m_deferredScrollPositions-&gt;second);
</del><ins>+    else if (m_deferredScrollOffsets)
+        scrollOffsetChangedViaPlatformWidgetImpl(m_deferredScrollOffsets-&gt;first, m_deferredScrollOffsets-&gt;second);
</ins><span class="cx">     
</span><span class="cx">     m_deferredScrollDelta = nullptr;
</span><del>-    m_deferredScrollPositions = nullptr;
</del><ins>+    m_deferredScrollOffsets = nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ScrollView::scrollTo(const ScrollPosition&amp; newPosition)
</span><span class="lines">@@ -529,7 +529,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    IntPoint newScrollPosition = !delegatesScrolling() ? adjustScrollPositionWithinRange(scrollPosition) : scrollPosition;
</del><ins>+    ScrollPosition newScrollPosition = !delegatesScrolling() ? adjustScrollPositionWithinRange(scrollPosition) : scrollPosition;
</ins><span class="cx"> 
</span><span class="cx">     if ((!delegatesScrolling() || !inProgrammaticScroll()) &amp;&amp; newScrollPosition == this-&gt;scrollPosition())
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollView.h (194462 => 194463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollView.h        2015-12-31 19:33:56 UTC (rev 194462)
+++ trunk/Source/WebCore/platform/ScrollView.h        2015-12-31 19:35:18 UTC (rev 194463)
</span><span class="lines">@@ -375,7 +375,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool isScrollView() const override { return true; }
</span><span class="cx"> 
</span><del>-    WEBCORE_EXPORT void scrollPositionChangedViaPlatformWidget(const IntPoint&amp; oldPosition, const IntPoint&amp; newPosition);
</del><ins>+    WEBCORE_EXPORT void scrollOffsetChangedViaPlatformWidget(const ScrollOffset&amp; oldOffset, const ScrollOffset&amp; newOffset);
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     ScrollView();
</span><span class="lines">@@ -418,7 +418,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool shouldDeferScrollUpdateAfterContentSizeChange() { return false; }
</span><span class="cx"> 
</span><del>-    virtual void scrollPositionChangedViaPlatformWidgetImpl(const IntPoint&amp;, const IntPoint&amp;) { }
</del><ins>+    virtual void scrollOffsetChangedViaPlatformWidgetImpl(const ScrollOffset&amp;, const ScrollOffset&amp;) { }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     virtual IntRect visibleContentRectInternal(VisibleContentRectIncludesScrollbars, VisibleContentRectBehavior) const override;
</span><span class="lines">@@ -456,7 +456,7 @@
</span><span class="cx">     IntSize m_contentsSize;
</span><span class="cx"> 
</span><span class="cx">     std::unique_ptr&lt;IntSize&gt; m_deferredScrollDelta; // Needed for WebKit scrolling
</span><del>-    std::unique_ptr&lt;std::pair&lt;IntPoint, IntPoint&gt;&gt; m_deferredScrollPositions; // Needed for platform widget scrolling
</del><ins>+    std::unique_ptr&lt;std::pair&lt;ScrollOffset, ScrollOffset&gt;&gt; m_deferredScrollOffsets; // Needed for platform widget scrolling
</ins><span class="cx"> 
</span><span class="cx">     bool m_scrollbarsSuppressed;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollableAreacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollableArea.cpp (194462 => 194463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollableArea.cpp        2015-12-31 19:33:56 UTC (rev 194462)
+++ trunk/Source/WebCore/platform/ScrollableArea.cpp        2015-12-31 19:35:18 UTC (rev 194463)
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx">         scrollToOffsetWithoutAnimation(FloatPoint(scrollAnimator().currentPosition().x(), offset));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ScrollableArea::notifyScrollPositionChanged(const IntPoint&amp; position)
</del><ins>+void ScrollableArea::notifyScrollPositionChanged(const ScrollPosition&amp; position)
</ins><span class="cx"> {
</span><span class="cx">     scrollPositionChanged(position);
</span><span class="cx">     scrollAnimator().setCurrentPosition(position);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollableAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollableArea.h (194462 => 194463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollableArea.h        2015-12-31 19:33:56 UTC (rev 194462)
+++ trunk/Source/WebCore/platform/ScrollableArea.h        2015-12-31 19:35:18 UTC (rev 194463)
</span><span class="lines">@@ -54,12 +54,12 @@
</span><span class="cx"> 
</span><span class="cx">     // Should be called when the scroll position changes externally, for example if the scroll layer position
</span><span class="cx">     // is updated on the scrolling thread and we need to notify the main thread.
</span><del>-    WEBCORE_EXPORT void notifyScrollPositionChanged(const IntPoint&amp;);
</del><ins>+    WEBCORE_EXPORT void notifyScrollPositionChanged(const ScrollPosition&amp;);
</ins><span class="cx"> 
</span><span class="cx">     // Allows subclasses to handle scroll position updates themselves. If this member function
</span><span class="cx">     // returns true, the scrollable area won't actually update the scroll position and instead
</span><span class="cx">     // expect it to happen sometime in the future.
</span><del>-    virtual bool requestScrollPositionUpdate(const IntPoint&amp;) { return false; }
</del><ins>+    virtual bool requestScrollPositionUpdate(const ScrollPosition&amp;) { return false; }
</ins><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT bool handleWheelEvent(const PlatformWheelEvent&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (194462 => 194463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2015-12-31 19:33:56 UTC (rev 194462)
+++ trunk/Source/WebKit/mac/ChangeLog        2015-12-31 19:35:18 UTC (rev 194463)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2015-12-31  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Clarify that scrollPositionChangedViaPlatformWidget takes offsets
+        https://bugs.webkit.org/show_bug.cgi?id=152606
+
+        Reviewed by Zalan Bujtas.
+
+        scrollPositionChangedViaPlatformWidget actually gets scroll offsets, since the
+        values we get from AppKit are zero-based, so rename to scrollOffsetChangedViaPlatformWidget().
+        
+        Change ScrollableArea's setScrollPosition() and requestScrollPositionUpdate() to take
+        ScrollPositions.
+        
+        Add a FIXME noting that willRevealEdge events are probably broken in RTL documents.
+
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView _frameOrBoundsChanged]):
+
</ins><span class="cx"> 2015-12-22  Andy Estes  &lt;aestes@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [CF] Replace CFNetwork-related WebKitSystemInterface calls with SPI
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebHTMLViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (194462 => 194463)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm        2015-12-31 19:33:56 UTC (rev 194462)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm        2015-12-31 19:35:18 UTC (rev 194463)
</span><span class="lines">@@ -1675,7 +1675,7 @@
</span><span class="cx">         if (Frame* coreFrame = core([self _frame])) {
</span><span class="cx">             if (FrameView* coreView = coreFrame-&gt;view()) {
</span><span class="cx">                 _private-&gt;inScrollPositionChanged = YES;
</span><del>-                coreView-&gt;scrollPositionChangedViaPlatformWidget(IntPoint(_private-&gt;lastScrollPosition), IntPoint(origin));
</del><ins>+                coreView-&gt;scrollOffsetChangedViaPlatformWidget(IntPoint(_private-&gt;lastScrollPosition), IntPoint(origin));
</ins><span class="cx">                 _private-&gt;inScrollPositionChanged = NO;
</span><span class="cx">             }
</span><span class="cx">         }
</span></span></pre>
</div>
</div>

</body>
</html>