<!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>[163092] 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/163092">163092</a></dd>
<dt>Author</dt> <dd>bdakin@apple.com</dd>
<dt>Date</dt> <dd>2014-01-30 11:25:25 -0800 (Thu, 30 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>https://bugs.webkit.org/show_bug.cgi?id=127371
Explore new API that could be used to help build infinitely scrolling websites
-and corresponding-
&lt;rdar://problem/15244768&gt;

Reviewed by Sam Weinig.

Source/WebCore: 

This patch adds 4 new events called webkitwillrevealbottom, webkitwillrevealtop, 
webkitwillrevealleft, and webkitwillrevealright. These events will fire when the 
user has scrolled close to corresponding edge of the document. Right now that is 
defined to be one viewport away from the corresponding edge. 

FrameView::scrollPositionChanged() and 
FrameView::scrollPositionChangedViaPlatformWidget() now take two parameters 
representing the old scroll position and the new position.
* WebCore.exp.in:

New events.
* dom/Document.h:
* dom/Document.idl:
* dom/Element.h:
* dom/Element.idl:
* dom/EventNames.h:
* html/HTMLAttributeNames.in:
* html/HTMLElement.cpp:
(WebCore::populateEventNameForAttributeLocalNameMap):
* page/DOMWindow.h:
* page/DOMWindow.idl:

Send oldPosition and newPosition to scrollPositionChanged().
* page/FrameView.cpp:
(WebCore::FrameView::setFixedVisibleContentRect):
(WebCore::FrameView::scrollPositionChangedViaPlatformWidget):

After sending scroll events, also call sendWillRevealEdgeEventsIfNeeded() to send 
the see if we should send the new will-reveal events.
(WebCore::FrameView::scrollPositionChanged):

Use the old position and the new position to determine if the events should be 
sent.
(WebCore::FrameView::sendWillRevealEdgeEventsIfNeeded):

Send new parameters to scrollPositionChanged().
(WebCore::FrameView::scrollTo):
(WebCore::FrameView::wheelEvent):
* page/FrameView.h:

Source/WebKit/mac: 

FrameView::scrollPositionChangedViaPlatformWidget() now take two parameters 
representing the old scroll position and the new position.
* WebView/WebHTMLView.mm:
(-[WebHTMLView _frameOrBoundsChanged]):

LayoutTests: 

* fast/events/will-reveal-edges-body-attributes-expected.txt: Added.
* fast/events/will-reveal-edges-body-attributes.html: Added.
* fast/events/will-reveal-edges-event-listeners-expected.txt: Added.
* fast/events/will-reveal-edges-event-listeners.html: Added.
* fast/events/will-reveal-edges-window-attributes-expected.txt: Added.
* fast/events/will-reveal-edges-window-attributes.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoredomDocumenth">trunk/Source/WebCore/dom/Document.h</a></li>
<li><a href="#trunkSourceWebCoredomDocumentidl">trunk/Source/WebCore/dom/Document.idl</a></li>
<li><a href="#trunkSourceWebCoredomElementh">trunk/Source/WebCore/dom/Element.h</a></li>
<li><a href="#trunkSourceWebCoredomElementidl">trunk/Source/WebCore/dom/Element.idl</a></li>
<li><a href="#trunkSourceWebCoredomEventNamesh">trunk/Source/WebCore/dom/EventNames.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAttributeNamesin">trunk/Source/WebCore/html/HTMLAttributeNames.in</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLBodyElementcpp">trunk/Source/WebCore/html/HTMLBodyElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLElementcpp">trunk/Source/WebCore/html/HTMLElement.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowh">trunk/Source/WebCore/page/DOMWindow.h</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowidl">trunk/Source/WebCore/page/DOMWindow.idl</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="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebHTMLViewmm">trunk/Source/WebKit/mac/WebView/WebHTMLView.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasteventswillrevealedgesbodyattributesexpectedtxt">trunk/LayoutTests/fast/events/will-reveal-edges-body-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasteventswillrevealedgesbodyattributeshtml">trunk/LayoutTests/fast/events/will-reveal-edges-body-attributes.html</a></li>
<li><a href="#trunkLayoutTestsfasteventswillrevealedgeseventlistenersexpectedtxt">trunk/LayoutTests/fast/events/will-reveal-edges-event-listeners-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasteventswillrevealedgeseventlistenershtml">trunk/LayoutTests/fast/events/will-reveal-edges-event-listeners.html</a></li>
<li><a href="#trunkLayoutTestsfasteventswillrevealedgeswindowattributesexpectedtxt">trunk/LayoutTests/fast/events/will-reveal-edges-window-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasteventswillrevealedgeswindowattributeshtml">trunk/LayoutTests/fast/events/will-reveal-edges-window-attributes.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (163091 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-01-30 19:02:26 UTC (rev 163091)
+++ trunk/LayoutTests/ChangeLog        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2014-01-30  Beth Dakin  &lt;bdakin@apple.com&gt;
+
+        https://bugs.webkit.org/show_bug.cgi?id=127371
+        Explore new API that could be used to help build infinitely scrolling websites
+        -and corresponding-
+        &lt;rdar://problem/15244768&gt;
+
+        Reviewed by Sam Weinig.
+
+        * fast/events/will-reveal-edges-body-attributes-expected.txt: Added.
+        * fast/events/will-reveal-edges-body-attributes.html: Added.
+        * fast/events/will-reveal-edges-event-listeners-expected.txt: Added.
+        * fast/events/will-reveal-edges-event-listeners.html: Added.
+        * fast/events/will-reveal-edges-window-attributes-expected.txt: Added.
+        * fast/events/will-reveal-edges-window-attributes.html: Added.
+
</ins><span class="cx"> 2014-01-30  Krzysztof Wolanski  &lt;k.wolanski@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [EFL] Update test expectations for WK1 and WK2 after r162947
</span></span></pre></div>
<a id="trunkLayoutTestsfasteventswillrevealedgesbodyattributesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/will-reveal-edges-body-attributes-expected.txt (0 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/will-reveal-edges-body-attributes-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/events/will-reveal-edges-body-attributes-expected.txt        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+This tests that onwebkitwillrevealbottom, onwebkitwillrevealtop, onwebkitwillrevealleft, and onwebkitwillrevealright work as body attributes
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+All edges were revealed!
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfasteventswillrevealedgesbodyattributeshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/will-reveal-edges-body-attributes.html (0 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/will-reveal-edges-body-attributes.html                                (rev 0)
+++ trunk/LayoutTests/fast/events/will-reveal-edges-body-attributes.html        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+&lt;html&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+
+&lt;script type=&quot;text/javascript&quot;&gt;
+description('This tests that onwebkitwillrevealbottom, onwebkitwillrevealtop, onwebkitwillrevealleft, and onwebkitwillrevealright work as body attributes');
+
+var triggeredWillRevealBottom = false;
+var triggeredWillRevealTop = false;
+var triggeredWillRevealRight = false;
+var triggeredWillRevealLeft = false;
+
+function willRevealBottom() {
+    triggeredWillRevealBottom = true;
+    window.scrollTo(0,0);
+    checkComplete();
+}
+
+function willRevealTop() {
+    triggeredWillRevealTop = true;
+    window.scrollTo(2000, 0);
+    checkComplete();
+}
+
+function willRevealRight() {
+    triggeredWillRevealRight = true;
+    window.scrollTo(0, 0);
+    checkComplete();
+}
+
+function willRevealLeft() {
+    triggeredWillRevealLeft = true;
+    checkComplete();
+}
+
+function checkComplete()
+{
+    if (triggeredWillRevealBottom &amp;&amp; triggeredWillRevealTop &amp;&amp; triggeredWillRevealRight &amp;&amp; triggeredWillRevealLeft) {
+        debug('All edges were revealed!');
+        finishJSTest();
+    }
+}
+
+var jsTestIsAsync = true;
+
+function runTest() {
+    window.scrollTo(0, 2000);
+}
+&lt;/script&gt;
+
+&lt;body style=&quot;height:2000px; width:2000px;&quot; onload=&quot;runTest()&quot; onwebkitwillrevealbottom=&quot;willRevealBottom()&quot;
+    onwebkitwillrevealtop=&quot;willRevealTop()&quot; onwebkitwillrevealright=&quot;willRevealRight()&quot; onwebkitwillrevealleft=&quot;willRevealLeft()&quot;&gt;
+    &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfasteventswillrevealedgeseventlistenersexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/will-reveal-edges-event-listeners-expected.txt (0 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/will-reveal-edges-event-listeners-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/events/will-reveal-edges-event-listeners-expected.txt        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+This tests that we can listen for webkitwillrevealbottom, webkitwillrevealtop, webkitwillrevealleft, and webkitwillrevealright
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+All edges were revealed!
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfasteventswillrevealedgeseventlistenershtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/will-reveal-edges-event-listeners.html (0 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/will-reveal-edges-event-listeners.html                                (rev 0)
+++ trunk/LayoutTests/fast/events/will-reveal-edges-event-listeners.html        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -0,0 +1,65 @@
</span><ins>+&lt;html&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+
+&lt;script type=&quot;text/javascript&quot;&gt;
+description('This tests that we can listen for webkitwillrevealbottom, webkitwillrevealtop, webkitwillrevealleft, and webkitwillrevealright');
+
+var triggeredWillRevealBottom = false;
+var triggeredWillRevealTop = false;
+var triggeredWillRevealRight = false;
+var triggeredWillRevealLeft = false;
+
+window.addEventListener(
+    'webkitwillrevealbottom',
+    function() {
+        triggeredWillRevealBottom = true;
+        window.scrollTo(0,0);
+        checkComplete();
+    },
+    false);
+
+window.addEventListener(
+    'webkitwillrevealtop',
+    function(event) {
+        triggeredWillRevealTop = true;
+        window.scrollTo(2000, 0);
+        checkComplete();
+    },
+    false);
+
+window.addEventListener(
+    'webkitwillrevealright',
+    function(event) {
+        triggeredWillRevealRight = true;
+        window.scrollTo(0, 0);
+        checkComplete();
+    },
+    false);
+
+window.addEventListener(
+    'webkitwillrevealleft',
+    function(event) {
+        triggeredWillRevealLeft = true;
+        checkComplete();
+    },
+    false);
+
+function checkComplete()
+{
+    if (triggeredWillRevealBottom &amp;&amp; triggeredWillRevealTop &amp;&amp; triggeredWillRevealRight &amp;&amp; triggeredWillRevealLeft) {
+        debug('All edges were revealed!');
+        finishJSTest();
+    }
+}
+
+var jsTestIsAsync = true;
+
+function runTest() {
+    window.scrollTo(0, 2000);
+}
+&lt;/script&gt;
+
+&lt;body style=&quot;height:2000px; width:2000px;&quot; onload=&quot;runTest()&quot;&gt;
+    &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfasteventswillrevealedgeswindowattributesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/will-reveal-edges-window-attributes-expected.txt (0 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/will-reveal-edges-window-attributes-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/events/will-reveal-edges-window-attributes-expected.txt        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+This tests that onwebkitwillrevealbottom, onwebkitwillrevealtop, onwebkitwillrevealleft, and onwebkitwillrevealright work as window attributes.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+All edges were revealed!
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfasteventswillrevealedgeswindowattributeshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/will-reveal-edges-window-attributes.html (0 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/will-reveal-edges-window-attributes.html                                (rev 0)
+++ trunk/LayoutTests/fast/events/will-reveal-edges-window-attributes.html        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+&lt;html&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+
+&lt;script type=&quot;text/javascript&quot;&gt;
+description('This tests that onwebkitwillrevealbottom, onwebkitwillrevealtop, onwebkitwillrevealleft, and onwebkitwillrevealright work as window attributes.');
+
+var triggeredWillRevealBottom = false;
+var triggeredWillRevealTop = false;
+var triggeredWillRevealRight = false;
+var triggeredWillRevealLeft = false;
+
+window.onwebkitwillrevealbottom =
+    function() {
+        triggeredWillRevealBottom = true;
+        window.scrollTo(0,0);
+        checkComplete();
+    }
+
+window.onwebkitwillrevealtop =
+    function() {
+        triggeredWillRevealTop = true;
+        window.scrollTo(2000, 0);
+        checkComplete();
+    }
+
+window.onwebkitwillrevealright =
+    function() {
+        triggeredWillRevealRight = true;
+        window.scrollTo(0, 0);
+        checkComplete();
+    }
+
+window.onwebkitwillrevealleft =
+    function() {
+        triggeredWillRevealLeft = true;
+        checkComplete();
+    }
+
+function checkComplete()
+{
+    if (triggeredWillRevealBottom &amp;&amp; triggeredWillRevealTop &amp;&amp; triggeredWillRevealRight &amp;&amp; triggeredWillRevealLeft) {
+        debug('All edges were revealed!');
+        finishJSTest();
+    }
+}
+
+var jsTestIsAsync = true;
+
+function runTest() {
+    window.scrollTo(0, 2000);
+}
+&lt;/script&gt;
+
+&lt;body style=&quot;height:2000px; width:2000px;&quot; onload=&quot;runTest()&quot;&gt;
+    &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (163091 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-30 19:02:26 UTC (rev 163091)
+++ trunk/Source/WebCore/ChangeLog        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -1,3 +1,52 @@
</span><ins>+2014-01-30  Beth Dakin  &lt;bdakin@apple.com&gt;
+
+        https://bugs.webkit.org/show_bug.cgi?id=127371
+        Explore new API that could be used to help build infinitely scrolling websites
+        -and corresponding-
+        &lt;rdar://problem/15244768&gt;
+
+        Reviewed by Sam Weinig.
+
+        This patch adds 4 new events called webkitwillrevealbottom, webkitwillrevealtop, 
+        webkitwillrevealleft, and webkitwillrevealright. These events will fire when the 
+        user has scrolled close to corresponding edge of the document. Right now that is 
+        defined to be one viewport away from the corresponding edge. 
+
+        FrameView::scrollPositionChanged() and 
+        FrameView::scrollPositionChangedViaPlatformWidget() now take two parameters 
+        representing the old scroll position and the new position.
+        * WebCore.exp.in:
+
+        New events.
+        * dom/Document.h:
+        * dom/Document.idl:
+        * dom/Element.h:
+        * dom/Element.idl:
+        * dom/EventNames.h:
+        * html/HTMLAttributeNames.in:
+        * html/HTMLElement.cpp:
+        (WebCore::populateEventNameForAttributeLocalNameMap):
+        * page/DOMWindow.h:
+        * page/DOMWindow.idl:
+
+        Send oldPosition and newPosition to scrollPositionChanged().
+        * page/FrameView.cpp:
+        (WebCore::FrameView::setFixedVisibleContentRect):
+        (WebCore::FrameView::scrollPositionChangedViaPlatformWidget):
+
+        After sending scroll events, also call sendWillRevealEdgeEventsIfNeeded() to send 
+        the see if we should send the new will-reveal events.
+        (WebCore::FrameView::scrollPositionChanged):
+
+        Use the old position and the new position to determine if the events should be 
+        sent.
+        (WebCore::FrameView::sendWillRevealEdgeEventsIfNeeded):
+
+        Send new parameters to scrollPositionChanged().
+        (WebCore::FrameView::scrollTo):
+        (WebCore::FrameView::wheelEvent):
+        * page/FrameView.h:
+
</ins><span class="cx"> 2014-01-30  Szabolcs David  &lt;davidsz@inf.u-szeged.hu&gt;
</span><span class="cx"> 
</span><span class="cx">         [curl] Improve realm string parsing in WWW-Authenticate headers
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (163091 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-01-30 19:02:26 UTC (rev 163091)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -1294,7 +1294,7 @@
</span><span class="cx"> __ZN7WebCore9FrameView31setVisualUpdatesAllowedByClientEb
</span><span class="cx"> __ZN7WebCore9FrameView37setScrollingPerformanceLoggingEnabledEb
</span><span class="cx"> __ZN7WebCore9FrameView37updateLayoutAndStyleIfNeededRecursiveEv
</span><del>-__ZN7WebCore9FrameView38scrollPositionChangedViaPlatformWidgetEv
</del><ins>+__ZN7WebCore9FrameView38scrollPositionChangedViaPlatformWidgetERKNS_8IntPointES3_
</ins><span class="cx"> __ZN7WebCore9FrameView39flushCompositingStateIncludingSubframesEv
</span><span class="cx"> __ZN7WebCore9FrameView52disableLayerFlushThrottlingTemporarilyForInteractionEv
</span><span class="cx"> __ZN7WebCore9FrameView6createERNS_5FrameE
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.h (163091 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.h        2014-01-30 19:02:26 UTC (rev 163091)
+++ trunk/Source/WebCore/dom/Document.h        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -305,6 +305,12 @@
</span><span class="cx">     DEFINE_ATTRIBUTE_EVENT_LISTENER(scroll);
</span><span class="cx">     DEFINE_ATTRIBUTE_EVENT_LISTENER(select);
</span><span class="cx">     DEFINE_ATTRIBUTE_EVENT_LISTENER(submit);
</span><ins>+#if ENABLE(WILL_REVEAL_EDGE_EVENTS)
+    DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitwillrevealbottom);
+    DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitwillrevealleft);
+    DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitwillrevealright);
+    DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitwillrevealtop);
+#endif
</ins><span class="cx">     DEFINE_ATTRIBUTE_EVENT_LISTENER(wheel);
</span><span class="cx"> 
</span><span class="cx">     DEFINE_ATTRIBUTE_EVENT_LISTENER(blur);
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.idl (163091 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.idl        2014-01-30 19:02:26 UTC (rev 163091)
+++ trunk/Source/WebCore/dom/Document.idl        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -317,6 +317,10 @@
</span><span class="cx">     [NotEnumerable, Conditional=POINTER_LOCK] attribute EventListener onwebkitpointerlockchange;
</span><span class="cx">     [NotEnumerable, Conditional=POINTER_LOCK] attribute EventListener onwebkitpointerlockerror;
</span><span class="cx">     [NotEnumerable, Conditional=CSP_NEXT] attribute EventListener onsecuritypolicyviolation;
</span><ins>+    [NotEnumerable, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventListener onwebkitwillrevealbottom;
+    [NotEnumerable, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventListener onwebkitwillrevealleft;
+    [NotEnumerable, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventListener onwebkitwillrevealright;
+    [NotEnumerable, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventListener onwebkitwillrevealtop;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if defined(ENABLE_TOUCH_EVENTS) &amp;&amp; ENABLE_TOUCH_EVENTS
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.h (163091 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.h        2014-01-30 19:02:26 UTC (rev 163091)
+++ trunk/Source/WebCore/dom/Element.h        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -100,6 +100,12 @@
</span><span class="cx">     DEFINE_ATTRIBUTE_EVENT_LISTENER(scroll);
</span><span class="cx">     DEFINE_ATTRIBUTE_EVENT_LISTENER(select);
</span><span class="cx">     DEFINE_ATTRIBUTE_EVENT_LISTENER(submit);
</span><ins>+#if ENABLE(WILL_REVEAL_EDGE_EVENTS)
+    DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitwillrevealbottom);
+    DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitwillrevealleft);
+    DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitwillrevealright);
+    DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitwillrevealtop);
+#endif
</ins><span class="cx">     DEFINE_ATTRIBUTE_EVENT_LISTENER(wheel);
</span><span class="cx"> 
</span><span class="cx">     // These four attribute event handler attributes are overridden by HTMLBodyElement
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.idl (163091 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.idl        2014-01-30 19:02:26 UTC (rev 163091)
+++ trunk/Source/WebCore/dom/Element.idl        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -229,6 +229,10 @@
</span><span class="cx">     [NotEnumerable,Conditional=TOUCH_EVENTS] attribute EventListener ontouchcancel;
</span><span class="cx">     [NotEnumerable, Conditional=FULLSCREEN_API] attribute EventListener onwebkitfullscreenchange;
</span><span class="cx">     [NotEnumerable, Conditional=FULLSCREEN_API] attribute EventListener onwebkitfullscreenerror;
</span><ins>+    [NotEnumerable, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventListener onwebkitwillrevealbottom;
+    [NotEnumerable, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventListener onwebkitwillrevealleft;
+    [NotEnumerable, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventListener onwebkitwillrevealright;
+    [NotEnumerable, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventListener onwebkitwillrevealtop;
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventNamesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventNames.h (163091 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventNames.h        2014-01-30 19:02:26 UTC (rev 163091)
+++ trunk/Source/WebCore/dom/EventNames.h        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -120,6 +120,12 @@
</span><span class="cx">     macro(upgradeneeded) \
</span><span class="cx">     macro(versionchange) \
</span><span class="cx">     macro(visibilitychange) \
</span><ins>+    /* ENABLE(WILL_REVEAL_EDGE_EVENT) */ \
+    macro(webkitwillrevealbottom) \
+    macro(webkitwillrevealleft) \
+    macro(webkitwillrevealright) \
+    macro(webkitwillrevealtop) \
+    /* End of ENABLE(WILL_REVEAL_EDGE_EVENT) */ \
</ins><span class="cx">     macro(wheel) \
</span><span class="cx">     macro(write) \
</span><span class="cx">     macro(writeend) \
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAttributeNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAttributeNames.in (163091 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAttributeNames.in        2014-01-30 19:02:26 UTC (rev 163091)
+++ trunk/Source/WebCore/html/HTMLAttributeNames.in        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -269,6 +269,10 @@
</span><span class="cx"> onwebkitsourceended
</span><span class="cx"> onwebkitsourceopen
</span><span class="cx"> onwebkittransitionend
</span><ins>+onwebkitwillrevealbottom
+onwebkitwillrevealleft
+onwebkitwillrevealright
+onwebkitwillrevealtop
</ins><span class="cx"> open
</span><span class="cx"> optimum
</span><span class="cx"> pattern
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLBodyElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLBodyElement.cpp (163091 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLBodyElement.cpp        2014-01-30 19:02:26 UTC (rev 163091)
+++ trunk/Source/WebCore/html/HTMLBodyElement.cpp        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -151,6 +151,16 @@
</span><span class="cx">         document().setWindowAttributeEventListener(eventNames().onlineEvent, name, value);
</span><span class="cx">     else if (name == onofflineAttr)
</span><span class="cx">         document().setWindowAttributeEventListener(eventNames().offlineEvent, name, value);
</span><ins>+#if ENABLE(WILL_REVEAL_EDGE_EVENTS)
+    else if (name == onwebkitwillrevealbottomAttr)
+        document().setWindowAttributeEventListener(eventNames().webkitwillrevealbottomEvent, name, value);
+    else if (name == onwebkitwillrevealleftAttr)
+        document().setWindowAttributeEventListener(eventNames().webkitwillrevealleftEvent, name, value);
+    else if (name == onwebkitwillrevealrightAttr)
+        document().setWindowAttributeEventListener(eventNames().webkitwillrevealrightEvent, name, value);
+    else if (name == onwebkitwillrevealtopAttr)
+        document().setWindowAttributeEventListener(eventNames().webkitwillrevealtopEvent, name, value);
+#endif
</ins><span class="cx">     else
</span><span class="cx">         HTMLElement::parseAttribute(name, value);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLElement.cpp (163091 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLElement.cpp        2014-01-30 19:02:26 UTC (rev 163091)
+++ trunk/Source/WebCore/html/HTMLElement.cpp        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -290,6 +290,12 @@
</span><span class="cx">         &amp;ontouchstartAttr,
</span><span class="cx">         &amp;onvolumechangeAttr,
</span><span class="cx">         &amp;onwaitingAttr,
</span><ins>+#if ENABLE(WILL_REVEAL_EDGE_EVENTS)
+        &amp;onwebkitwillrevealbottomAttr,
+        &amp;onwebkitwillrevealleftAttr,
+        &amp;onwebkitwillrevealrightAttr,
+        &amp;onwebkitwillrevealtopAttr,
+#endif
</ins><span class="cx">         &amp;onwheelAttr,
</span><span class="cx"> #if ENABLE(IOS_GESTURE_EVENTS)
</span><span class="cx">         &amp;ongesturechangeAttr,
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.h (163091 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.h        2014-01-30 19:02:26 UTC (rev 163091)
+++ trunk/Source/WebCore/page/DOMWindow.h        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -346,6 +346,12 @@
</span><span class="cx">         DEFINE_ATTRIBUTE_EVENT_LISTENER(waiting);
</span><span class="cx">         DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitbeginfullscreen);
</span><span class="cx">         DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitendfullscreen);
</span><ins>+#if ENABLE(WILL_REVEAL_EDGE_EVENTS)
+        DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitwillrevealbottom);
+        DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitwillrevealleft);
+        DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitwillrevealright);
+        DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitwillrevealtop);
+#endif
</ins><span class="cx">         DEFINE_ATTRIBUTE_EVENT_LISTENER(wheel);
</span><span class="cx"> 
</span><span class="cx">         DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(webkitanimationstart, webkitAnimationStart);
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.idl (163091 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.idl        2014-01-30 19:02:26 UTC (rev 163091)
+++ trunk/Source/WebCore/page/DOMWindow.idl        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -294,6 +294,11 @@
</span><span class="cx"> 
</span><span class="cx">     [Conditional=PROXIMITY_EVENTS] attribute EventListener onwebkitdeviceproximity;
</span><span class="cx"> 
</span><ins>+    [Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventListener onwebkitwillrevealbottom;
+    [Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventListener onwebkitwillrevealleft;
+    [Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventListener onwebkitwillrevealright;
+    [Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventListener onwebkitwillrevealtop;
+
</ins><span class="cx">     // EventTarget interface
</span><span class="cx">     [Custom] void addEventListener(DOMString type,
</span><span class="cx">                                   EventListener listener,
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (163091 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2014-01-30 19:02:26 UTC (rev 163091)
+++ trunk/Source/WebCore/page/FrameView.cpp        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -1913,13 +1913,15 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     IntSize offset = scrollOffset();
</span><ins>+    IntPoint oldPosition = scrollPosition();
</ins><span class="cx">     ScrollView::setFixedVisibleContentRect(visibleContentRect);
</span><span class="cx">     if (offset != scrollOffset()) {
</span><span class="cx">         updateLayerPositionsAfterScrolling();
</span><span class="cx">         if (frame().page()-&gt;settings().acceleratedCompositingForFixedPositionEnabled())
</span><span class="cx">             updateCompositingLayersAfterScrolling();
</span><ins>+        IntPoint newPosition = scrollPosition();
</ins><span class="cx">         scrollAnimator()-&gt;setCurrentPosition(scrollPosition());
</span><del>-        scrollPositionChanged();
</del><ins>+        scrollPositionChanged(oldPosition, newPosition);
</ins><span class="cx">     }
</span><span class="cx">     if (visibleContentSizeDidChange) {
</span><span class="cx">         // Update the scroll-bars to calculate new page-step size.
</span><span class="lines">@@ -1938,19 +1940,21 @@
</span><span class="cx">         renderer-&gt;setNeedsLayout();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void FrameView::scrollPositionChangedViaPlatformWidget()
</del><ins>+void FrameView::scrollPositionChangedViaPlatformWidget(const IntPoint&amp; oldPosition, const IntPoint&amp; newPosition)
</ins><span class="cx"> {
</span><span class="cx">     updateLayerPositionsAfterScrolling();
</span><span class="cx">     updateCompositingLayersAfterScrolling();
</span><span class="cx">     repaintSlowRepaintObjects();
</span><del>-    scrollPositionChanged();
</del><ins>+    scrollPositionChanged(oldPosition, newPosition);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void FrameView::scrollPositionChanged()
</del><ins>+void FrameView::scrollPositionChanged(const IntPoint&amp; oldPosition, const IntPoint&amp; newPosition)
</ins><span class="cx"> {
</span><span class="cx">     frame().eventHandler().sendScrollEvent();
</span><span class="cx">     frame().eventHandler().dispatchFakeMouseMoveEventSoon();
</span><span class="cx"> 
</span><ins>+    sendWillRevealEdgeEventsIfNeeded(oldPosition, newPosition);
+
</ins><span class="cx">     if (RenderView* renderView = this-&gt;renderView()) {
</span><span class="cx">         if (renderView-&gt;usesCompositing())
</span><span class="cx">             renderView-&gt;compositor().frameViewDidScroll();
</span><span class="lines">@@ -2710,6 +2714,59 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void FrameView::sendWillRevealEdgeEventsIfNeeded(const IntPoint&amp; oldPosition, const IntPoint&amp; newPosition)
+{
+    // For each edge (top, bottom, left and right), send the will reveal edge event for that direction
+    // if newPosition is at or beyond the notification point, if the scroll direction is heading in the
+    // direction of that edge point, and if oldPosition is before the notification point (which indicates
+    // that this is the first moment that we know we crossed the magic line).
+
+#if ENABLE(WILL_REVEAL_EDGE_EVENTS)
+    Document* document = frame().document();
+    if (!document)
+        return;
+
+    IntRect visibleRect = visibleContentRect();
+
+    int willRevealBottomNotificationPoint = std::max(0, contentsHeight() - 2 *  visibleRect.height());
+    int willRevealTopNotificationPoint = visibleRect.height();
+
+    // Bottom edge.
+    if (newPosition.y() &gt;= willRevealBottomNotificationPoint &amp;&amp; newPosition.y() &gt; oldPosition.y()
+        &amp;&amp; willRevealBottomNotificationPoint &gt;= oldPosition.y()) {
+        RefPtr&lt;Event&gt; willRevealEvent = Event::create(eventNames().webkitwillrevealbottomEvent, false, false);
+        document-&gt;enqueueWindowEvent(willRevealEvent.release());
+    }
+
+    // Top edge.
+    if (newPosition.y() &lt;= willRevealTopNotificationPoint &amp;&amp; newPosition.y() &lt; oldPosition.y()
+        &amp;&amp; willRevealTopNotificationPoint &lt;= oldPosition.y()) {
+        RefPtr&lt;Event&gt; willRevealEvent = Event::create(eventNames().webkitwillrevealtopEvent, false, false);
+        document-&gt;enqueueWindowEvent(willRevealEvent.release());
+    }
+
+    int willRevealRightNotificationPoint = std::max(0, contentsWidth() - 2 * visibleRect.width());
+    int willRevealLeftNotificationPoint = visibleRect.width();
+
+    // Right edge.
+    if (newPosition.x() &gt;= willRevealRightNotificationPoint &amp;&amp; newPosition.x() &gt; oldPosition.x()
+        &amp;&amp; willRevealRightNotificationPoint &gt;= oldPosition.x()) {
+        RefPtr&lt;Event&gt; willRevealEvent = Event::create(eventNames().webkitwillrevealrightEvent, false, false);
+        document-&gt;enqueueWindowEvent(willRevealEvent.release());
+    }
+
+    // Left edge.
+    if (newPosition.x() &lt;= willRevealLeftNotificationPoint &amp;&amp; newPosition.x() &lt; oldPosition.x()
+        &amp;&amp; willRevealLeftNotificationPoint &lt;= oldPosition.x()) {
+        RefPtr&lt;Event&gt; willRevealEvent = Event::create(eventNames().webkitwillrevealleftEvent, false, false);
+        document-&gt;enqueueWindowEvent(willRevealEvent.release());
+    }
+#else
+    UNUSED_PARAM(oldPosition);
+    UNUSED_PARAM(newPosition);
+#endif
+}
+
</ins><span class="cx"> void FrameView::willStartLiveResize()
</span><span class="cx"> {
</span><span class="cx">     ScrollView::willStartLiveResize();
</span><span class="lines">@@ -2949,9 +3006,10 @@
</span><span class="cx"> void FrameView::scrollTo(const IntSize&amp; newOffset)
</span><span class="cx"> {
</span><span class="cx">     LayoutSize offset = scrollOffset();
</span><ins>+    IntPoint oldPosition = scrollPosition();
</ins><span class="cx">     ScrollView::scrollTo(newOffset);
</span><span class="cx">     if (offset != scrollOffset())
</span><del>-        scrollPositionChanged();
</del><ins>+        scrollPositionChanged(oldPosition, scrollPosition());
</ins><span class="cx">     frame().loader().client().didChangeScrollOffset();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3922,10 +3980,11 @@
</span><span class="cx"> 
</span><span class="cx">     if (delegatesScrolling()) {
</span><span class="cx">         IntSize offset = scrollOffset();
</span><ins>+        IntPoint oldPosition = scrollPosition();
</ins><span class="cx">         IntSize newOffset = IntSize(offset.width() - wheelEvent.deltaX(), offset.height() - wheelEvent.deltaY());
</span><span class="cx">         if (offset != newOffset) {
</span><span class="cx">             ScrollView::scrollTo(newOffset);
</span><del>-            scrollPositionChanged();
</del><ins>+            scrollPositionChanged(oldPosition, scrollPosition());
</ins><span class="cx">             frame().loader().client().didChangeScrollOffset();
</span><span class="cx">         }
</span><span class="cx">         return true;
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.h (163091 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.h        2014-01-30 19:02:26 UTC (rev 163091)
+++ trunk/Source/WebCore/page/FrameView.h        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -214,7 +214,7 @@
</span><span class="cx">     virtual void setFixedVisibleContentRect(const IntRect&amp;) override;
</span><span class="cx"> #endif
</span><span class="cx">     virtual void setScrollPosition(const IntPoint&amp;) override;
</span><del>-    void scrollPositionChangedViaPlatformWidget();
</del><ins>+    void scrollPositionChangedViaPlatformWidget(const IntPoint&amp; oldPosition, const IntPoint&amp; newPosition);
</ins><span class="cx">     virtual void updateLayerPositionsAfterScrolling() override;
</span><span class="cx">     virtual void updateCompositingLayersAfterScrolling() override;
</span><span class="cx">     virtual bool requestScrollPositionUpdate(const IntPoint&amp;) override;
</span><span class="lines">@@ -521,6 +521,8 @@
</span><span class="cx">     virtual GraphicsLayer* layerForOverhangAreas() const override;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    void sendWillRevealEdgeEventsIfNeeded(const IntPoint&amp; oldPosition, const IntPoint&amp; newPosition);
+
</ins><span class="cx">     // Override scrollbar notifications to update the AXObject cache.
</span><span class="cx">     virtual void didAddScrollbar(Scrollbar*, ScrollbarOrientation) override;
</span><span class="cx">     virtual void willRemoveScrollbar(Scrollbar*, ScrollbarOrientation) override;
</span><span class="lines">@@ -537,7 +539,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();
</del><ins>+    void scrollPositionChanged(const IntPoint&amp; oldPosition, const IntPoint&amp; newPosition);
</ins><span class="cx"> 
</span><span class="cx">     bool hasCustomScrollbars() const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (163091 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-01-30 19:02:26 UTC (rev 163091)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-01-30  Beth Dakin  &lt;bdakin@apple.com&gt;
+
+        https://bugs.webkit.org/show_bug.cgi?id=127371
+        Explore new API that could be used to help build infinitely scrolling websites
+        -and corresponding-
+        &lt;rdar://problem/15244768&gt;
+
+        Reviewed by Sam Weinig.
+
+        FrameView::scrollPositionChangedViaPlatformWidget() now take two parameters 
+        representing the old scroll position and the new position.
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView _frameOrBoundsChanged]):
+
</ins><span class="cx"> 2014-01-30  Andrei Bucur  &lt;abucur@adobe.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove the ACCELERATED_COMPOSITING flag
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebHTMLViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (163091 => 163092)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm        2014-01-30 19:02:26 UTC (rev 163091)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm        2014-01-30 19:25:25 UTC (rev 163092)
</span><span class="lines">@@ -1337,7 +1337,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();
</del><ins>+                coreView-&gt;scrollPositionChangedViaPlatformWidget(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>