<!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>[161373] 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/161373">161373</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2014-01-06 14:19:42 -0800 (Mon, 06 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add new files for UI-side scrolling
https://bugs.webkit.org/show_bug.cgi?id=126532

Source/WebCore:

Reviewed by Anders Carlson.

* WebCore.xcodeproj/project.pbxproj: Make lots of scrolling-related headers Private
so WebKit2 can include them.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::scheduleUpdateScrollPositionForNode): Callback that
indicates that the given node has been scrolled asynchronously. Currently only
handles the main frame.
* page/scrolling/ScrollingCoordinator.h: Add support for type-casts of a remote subclass
in another namespace.
(WebCore::ScrollingCoordinator::isRemoteScrollingCoordinator):
* page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::isRemoteScrollingTree):

Source/WebKit2:

Reviewed by Anders Carlson.

Add RemoteScrollingCoordinator, RemoteScrollingCoordinatorProxy,
RemoteScrollingCoordinatorTransaction, RemoteScrollingTree.

These allow the scrolling tree to be used in the UI process.
RemoteScrollingCoordinator builds a ScrollingStateTree, which is
encoded by RemoteScrollingCoordinatorTransaction. Decoding the
transaction recreates that ScrollingStateTree in the UI process,
and RemoteScrollingCoordinatorProxy &quot;commits&quot; that to update
the RemoteScrollingTree.

New classes are not hooked up to anything yet.

* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp: Added.
(ArgumentCoder&lt;ScrollingStateNode&gt;::encode):
(ArgumentCoder&lt;ScrollingStateNode&gt;::decode):
(ArgumentCoder&lt;ScrollingStateScrollingNode&gt;::encode):
(ArgumentCoder&lt;ScrollingStateScrollingNode&gt;::decode):
(ArgumentCoder&lt;ScrollingStateFixedNode&gt;::encode):
(ArgumentCoder&lt;ScrollingStateFixedNode&gt;::decode):
(ArgumentCoder&lt;ScrollingStateStickyNode&gt;::encode):
(ArgumentCoder&lt;ScrollingStateStickyNode&gt;::decode):
(WebKit::encodeNodeAndDescendants):
(WebKit::RemoteScrollingCoordinatorTransaction::encode):
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h: Added.
(WebKit::RemoteScrollingCoordinatorTransaction::setStateTreeToEncode):
(WebKit::RemoteScrollingCoordinatorTransaction::scrollingStateTree):
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: Added.
(WebKit::RemoteScrollingCoordinatorProxy::RemoteScrollingCoordinatorProxy):
(WebKit::RemoteScrollingCoordinatorProxy::~RemoteScrollingCoordinatorProxy):
(WebKit::RemoteScrollingCoordinatorProxy::layerTreeHost):
(WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
(WebKit::RemoteScrollingCoordinatorProxy::handleWheelEvent):
(WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChanged):
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h: Added.
* UIProcess/Scrolling/RemoteScrollingTree.cpp: Added.
(WebKit::RemoteScrollingTree::create):
(WebKit::RemoteScrollingTree::RemoteScrollingTree):
(WebKit::RemoteScrollingTree::~RemoteScrollingTree):
(WebKit::RemoteScrollingTree::tryToHandleWheelEvent):
(WebKit::RemoteScrollingTree::handleWheelEventPhase):
(WebKit::RemoteScrollingTree::updateMainFrameScrollPosition):
(WebKit::RemoteScrollingTree::createNode):
* UIProcess/Scrolling/RemoteScrollingTree.h: Added.
(WebKit::RemoteScrollingTree::scrollingCoordinatorProxy):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Scrolling/RemoteScrollingCoordinator.h: Added.
(WebKit::RemoteScrollingCoordinator::create):
* WebProcess/Scrolling/RemoteScrollingCoordinator.messages.in: Added.
* WebProcess/Scrolling/RemoteScrollingCoordinator.mm: Added.
(WebKit::RemoteScrollingCoordinator::RemoteScrollingCoordinator):
(WebKit::RemoteScrollingCoordinator::~RemoteScrollingCoordinator):
(WebKit::RemoteScrollingCoordinator::scheduleTreeStateCommit):
(WebKit::RemoteScrollingCoordinator::createScrollingTreeNode):
(WebKit::RemoteScrollingCoordinator::isRubberBandInProgress):
(WebKit::RemoteScrollingCoordinator::setScrollPinningBehavior):
(WebKit::RemoteScrollingCoordinator::buildTransaction):
(WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingCoordinatorcpp">trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingCoordinatorh">trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingTreeh">trunk/Source/WebCore/page/scrolling/ScrollingTree.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxyh">trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/Source/WebKit2/Shared/Scrolling/</li>
<li><a href="#trunkSourceWebKit2SharedScrollingRemoteScrollingCoordinatorTransactioncpp">trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedScrollingRemoteScrollingCoordinatorTransactionh">trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h</a></li>
<li>trunk/Source/WebKit2/UIProcess/Scrolling/</li>
<li><a href="#trunkSourceWebKit2UIProcessScrollingRemoteScrollingCoordinatorProxycpp">trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessScrollingRemoteScrollingCoordinatorProxyh">trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessScrollingRemoteScrollingTreecpp">trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessScrollingRemoteScrollingTreeh">trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h</a></li>
<li>trunk/Source/WebKit2/WebProcess/Scrolling/</li>
<li><a href="#trunkSourceWebKit2WebProcessScrollingRemoteScrollingCoordinatorh">trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessScrollingRemoteScrollingCoordinatormessagesin">trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessScrollingRemoteScrollingCoordinatormm">trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (161372 => 161373)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-06 22:18:07 UTC (rev 161372)
+++ trunk/Source/WebCore/ChangeLog        2014-01-06 22:19:42 UTC (rev 161373)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2014-01-06  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Add new files for UI-side scrolling
+        https://bugs.webkit.org/show_bug.cgi?id=126532
+
+        Reviewed by Anders Carlson.
+
+        * WebCore.xcodeproj/project.pbxproj: Make lots of scrolling-related headers Private
+        so WebKit2 can include them.
+        * page/scrolling/ScrollingCoordinator.cpp:
+        (WebCore::ScrollingCoordinator::scheduleUpdateScrollPositionForNode): Callback that
+        indicates that the given node has been scrolled asynchronously. Currently only
+        handles the main frame.
+        * page/scrolling/ScrollingCoordinator.h: Add support for type-casts of a remote subclass
+        in another namespace.
+        (WebCore::ScrollingCoordinator::isRemoteScrollingCoordinator):
+        * page/scrolling/ScrollingTree.h:
+        (WebCore::ScrollingTree::isRemoteScrollingTree):
+
</ins><span class="cx"> 2014-01-06  Gavin Barraclough  &lt;barraclough@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Move ViewState to WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (161372 => 161373)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-01-06 22:18:07 UTC (rev 161372)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-01-06 22:19:42 UTC (rev 161373)
</span><span class="lines">@@ -476,10 +476,10 @@
</span><span class="cx">                 0FA24D79162DF91900A3F4C0 /* GraphicsLayerUpdater.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FA24D77162DF91900A3F4C0 /* GraphicsLayerUpdater.cpp */; };
</span><span class="cx">                 0FA24D7A162DF91900A3F4C0 /* GraphicsLayerUpdater.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FA24D78162DF91900A3F4C0 /* GraphicsLayerUpdater.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0FA88EBD16A8D1BD00F99984 /* ScrollingStateScrollingNodeMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FA88EBC16A8D1BD00F99984 /* ScrollingStateScrollingNodeMac.mm */; };
</span><del>-                0FB8890A167D2FA10010CDA5 /* ScrollingTreeStickyNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB88908167D2FA10010CDA5 /* ScrollingTreeStickyNode.h */; };
</del><ins>+                0FB8890A167D2FA10010CDA5 /* ScrollingTreeStickyNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB88908167D2FA10010CDA5 /* ScrollingTreeStickyNode.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 0FB8890B167D2FA10010CDA5 /* ScrollingTreeStickyNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FB88909167D2FA10010CDA5 /* ScrollingTreeStickyNode.mm */; };
</span><span class="cx">                 0FB8890E167D30160010CDA5 /* ScrollingStateStickyNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FB8890C167D30160010CDA5 /* ScrollingStateStickyNode.cpp */; };
</span><del>-                0FB8890F167D30160010CDA5 /* ScrollingStateStickyNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB8890D167D30160010CDA5 /* ScrollingStateStickyNode.h */; };
</del><ins>+                0FB8890F167D30160010CDA5 /* ScrollingStateStickyNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB8890D167D30160010CDA5 /* ScrollingStateStickyNode.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 0FCF33240F2B9715004B6795 /* ColorCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FCF33230F2B9715004B6795 /* ColorCG.cpp */; };
</span><span class="cx">                 0FCF332E0F2B9A25004B6795 /* WebLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FCF332A0F2B9A25004B6795 /* WebLayer.mm */; };
</span><span class="cx">                 0FCF332F0F2B9A25004B6795 /* WebLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCF332B0F2B9A25004B6795 /* WebLayer.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -709,12 +709,12 @@
</span><span class="cx">                 1AA7160A149BC4DB0016EC19 /* TileController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AA71608149BC4DA0016EC19 /* TileController.mm */; };
</span><span class="cx">                 1AA7160B149BC4DB0016EC19 /* TileController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA71609149BC4DB0016EC19 /* TileController.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1AA84F04143BA7BD0051D153 /* ScrollElasticityController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AA84F02143BA7BD0051D153 /* ScrollElasticityController.mm */; };
</span><del>-                1AA84F05143BA7BD0051D153 /* ScrollElasticityController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA84F03143BA7BD0051D153 /* ScrollElasticityController.h */; };
</del><ins>+                1AA84F05143BA7BD0051D153 /* ScrollElasticityController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA84F03143BA7BD0051D153 /* ScrollElasticityController.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 1AA8799011CBE846003C664F /* PluginStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA8798F11CBE846003C664F /* PluginStrategy.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1AAADDA314DB409F00AF64B3 /* ScrollingTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAADDA114DB409F00AF64B3 /* ScrollingTree.cpp */; };
</span><span class="cx">                 1AAADDA414DB409F00AF64B3 /* ScrollingTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAADDA214DB409F00AF64B3 /* ScrollingTree.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1AAADDE314DC8C8F00AF64B3 /* ScrollingTreeNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAADDE114DC8C8F00AF64B3 /* ScrollingTreeNode.cpp */; };
</span><del>-                1AAADDE414DC8C8F00AF64B3 /* ScrollingTreeNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAADDE214DC8C8F00AF64B3 /* ScrollingTreeNode.h */; };
</del><ins>+                1AAADDE414DC8C8F00AF64B3 /* ScrollingTreeNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAADDE214DC8C8F00AF64B3 /* ScrollingTreeNode.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 1AB09DB416AF5F6C008538E7 /* StorageStrategy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AB09DB216AF5F6C008538E7 /* StorageStrategy.cpp */; };
</span><span class="cx">                 1AB09DB516AF5F6C008538E7 /* StorageStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AB09DB316AF5F6C008538E7 /* StorageStrategy.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1AB1AE7A0C051FDE00139F4F /* zoomInCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AB1AE780C051FDE00139F4F /* zoomInCursor.png */; };
</span><span class="lines">@@ -3074,7 +3074,7 @@
</span><span class="cx">                 938E666209F09B87008A48EC /* JSHTMLCanvasElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 938E666109F09B87008A48EC /* JSHTMLCanvasElement.h */; };
</span><span class="cx">                 9391A991162746CB00297330 /* ScrollingCoordinatorMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 9391A990162746CB00297330 /* ScrollingCoordinatorMac.h */; };
</span><span class="cx">                 9391A99C1629D70000297330 /* ScrollingTreeScrollingNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9391A99A1629D6FF00297330 /* ScrollingTreeScrollingNode.cpp */; };
</span><del>-                9391A99D1629D70000297330 /* ScrollingTreeScrollingNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 9391A99B1629D70000297330 /* ScrollingTreeScrollingNode.h */; };
</del><ins>+                9391A99D1629D70000297330 /* ScrollingTreeScrollingNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 9391A99B1629D70000297330 /* ScrollingTreeScrollingNode.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 9392262D1032107B006E7D5D /* JSHTMLCanvasElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9392262C1032107B006E7D5D /* JSHTMLCanvasElementCustom.cpp */; };
</span><span class="cx">                 9392262F10321084006E7D5D /* JSCSSRuleListCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9392262E10321084006E7D5D /* JSCSSRuleListCustom.cpp */; };
</span><span class="cx">                 9392F1420AD185F400691BD4 /* RenderCounter.h in Headers */ = {isa = PBXBuildFile; fileRef = 9392F1410AD185F400691BD4 /* RenderCounter.h */; };
</span><span class="lines">@@ -3109,11 +3109,11 @@
</span><span class="cx">                 93C09A810B064F00005ABD4D /* EventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93C09A800B064F00005ABD4D /* EventHandler.cpp */; };
</span><span class="cx">                 93C09C860B0657AA005ABD4D /* ScrollTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C09C850B0657AA005ABD4D /* ScrollTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 93C38BFE164473C700091EB2 /* ScrollingStateFixedNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93C38BFC164473C700091EB2 /* ScrollingStateFixedNode.cpp */; };
</span><del>-                93C38BFF164473C700091EB2 /* ScrollingStateFixedNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C38BFD164473C700091EB2 /* ScrollingStateFixedNode.h */; };
-                93C38C03164473DD00091EB2 /* ScrollingTreeFixedNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C38C01164473DD00091EB2 /* ScrollingTreeFixedNode.h */; };
</del><ins>+                93C38BFF164473C700091EB2 /* ScrollingStateFixedNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C38BFD164473C700091EB2 /* ScrollingStateFixedNode.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                93C38C03164473DD00091EB2 /* ScrollingTreeFixedNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C38C01164473DD00091EB2 /* ScrollingTreeFixedNode.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 93C38C04164473DD00091EB2 /* ScrollingTreeFixedNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93C38C02164473DD00091EB2 /* ScrollingTreeFixedNode.mm */; };
</span><span class="cx">                 93C442000F813AE100C1A634 /* CollectionType.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C441FF0F813AE100C1A634 /* CollectionType.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                93C4A4151629DF5A00C3EB6E /* ScrollingTreeScrollingNodeMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C4A4131629DF5A00C3EB6E /* ScrollingTreeScrollingNodeMac.h */; };
</del><ins>+                93C4A4151629DF5A00C3EB6E /* ScrollingTreeScrollingNodeMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C4A4131629DF5A00C3EB6E /* ScrollingTreeScrollingNodeMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 93C4A4161629DF5A00C3EB6E /* ScrollingTreeScrollingNodeMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93C4A4141629DF5A00C3EB6E /* ScrollingTreeScrollingNodeMac.mm */; };
</span><span class="cx">                 93C4F6EB1108F9A50099D0DB /* AccessibilityScrollbar.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C4F6E91108F9A50099D0DB /* AccessibilityScrollbar.h */; };
</span><span class="cx">                 93C841F809CE855C00DFF5E5 /* DOMImplementationFront.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C841F709CE855C00DFF5E5 /* DOMImplementationFront.h */; };
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingCoordinatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (161372 => 161373)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp        2014-01-06 22:18:07 UTC (rev 161372)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp        2014-01-06 22:19:42 UTC (rev 161373)
</span><span class="lines">@@ -274,6 +274,12 @@
</span><span class="cx">     updateSynchronousScrollingReasons();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void ScrollingCoordinator::scheduleUpdateScrollPositionForNode(ScrollingNodeID, const IntPoint&amp; scrollPosition, bool programmaticScroll, SetOrSyncScrollingLayerPosition scrollingLayerPositionAction)
+{
+    // FIXME: need to handle non-main nodes.
+    scheduleUpdateMainFrameScrollPosition(scrollPosition, programmaticScroll, scrollingLayerPositionAction);
+}
+
</ins><span class="cx"> void ScrollingCoordinator::scheduleUpdateMainFrameScrollPosition(const IntPoint&amp; scrollPosition, bool programmaticScroll, SetOrSyncScrollingLayerPosition scrollingLayerPositionAction)
</span><span class="cx"> {
</span><span class="cx">     if (m_updateMainFrameScrollPositionTimer.isActive()) {
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingCoordinatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h (161372 => 161373)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h        2014-01-06 22:18:07 UTC (rev 161372)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h        2014-01-06 22:19:42 UTC (rev 161373)
</span><span class="lines">@@ -108,6 +108,7 @@
</span><span class="cx">     virtual void pageDestroyed();
</span><span class="cx">     
</span><span class="cx">     virtual bool isAsyncScrollingCoordinator() const { return false; }
</span><ins>+    virtual bool isRemoteScrollingCoordinator() const { return false; }
</ins><span class="cx"> 
</span><span class="cx">     // Return whether this scrolling coordinator handles scrolling for the given frame view.
</span><span class="cx">     bool coordinatesScrollingForFrameView(FrameView*) const;
</span><span class="lines">@@ -158,6 +159,8 @@
</span><span class="cx">     // Generated a unique id for scroll layers.
</span><span class="cx">     ScrollingNodeID uniqueScrollLayerID();
</span><span class="cx"> 
</span><ins>+    void scheduleUpdateScrollPositionForNode(ScrollingNodeID, const IntPoint&amp;, bool programmaticScroll, SetOrSyncScrollingLayerPosition);
+
</ins><span class="cx">     // Dispatched by the scrolling tree whenever the main frame scroll position changes.
</span><span class="cx">     void scheduleUpdateMainFrameScrollPosition(const IntPoint&amp;, bool programmaticScroll, SetOrSyncScrollingLayerPosition);
</span><span class="cx">     void updateMainFrameScrollPosition(const IntPoint&amp;, bool programmaticScroll, SetOrSyncScrollingLayerPosition);
</span><span class="lines">@@ -198,7 +201,7 @@
</span><span class="cx">     GraphicsLayer* headerLayerForFrameView(FrameView*);
</span><span class="cx">     GraphicsLayer* footerLayerForFrameView(FrameView*);
</span><span class="cx"> 
</span><del>-    Page* m_page;
</del><ins>+    Page* m_page; // FIXME: ideally this would be a reference but it gets nulled on async teardown.
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     virtual void recomputeWheelEventHandlerCountForFrameView(FrameView*) { }
</span><span class="lines">@@ -218,7 +221,7 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> #define SCROLLING_COORDINATOR_TYPE_CASTS(ToValueTypeName, predicate) \
</span><del>-    TYPE_CASTS_BASE(ToValueTypeName, ScrollingCoordinator, value, value-&gt;predicate, value.predicate)
</del><ins>+    TYPE_CASTS_BASE(ToValueTypeName, WebCore::ScrollingCoordinator, value, value-&gt;predicate, value.predicate)
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingTreeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingTree.h (161372 => 161373)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingTree.h        2014-01-06 22:18:07 UTC (rev 161372)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTree.h        2014-01-06 22:19:42 UTC (rev 161373)
</span><span class="lines">@@ -57,6 +57,7 @@
</span><span class="cx">     };
</span><span class="cx">     
</span><span class="cx">     virtual bool isThreadedScrollingTree() const { return false; }
</span><ins>+    virtual bool isRemoteScrollingTree() const { return false; }
</ins><span class="cx"> 
</span><span class="cx">     virtual EventResult tryToHandleWheelEvent(const PlatformWheelEvent&amp;) = 0;
</span><span class="cx">     bool shouldHandleWheelEventSynchronously(const PlatformWheelEvent&amp;);
</span><span class="lines">@@ -133,7 +134,7 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> #define SCROLLING_TREE_TYPE_CASTS(ToValueTypeName, predicate) \
</span><del>-    TYPE_CASTS_BASE(ToValueTypeName, ScrollingTree, value, value-&gt;predicate, value.predicate)
</del><ins>+    TYPE_CASTS_BASE(ToValueTypeName, WebCore::ScrollingTree, value, value-&gt;predicate, value.predicate)
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (161372 => 161373)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-01-06 22:18:07 UTC (rev 161372)
+++ trunk/Source/WebKit2/ChangeLog        2014-01-06 22:19:42 UTC (rev 161373)
</span><span class="lines">@@ -1,3 +1,85 @@
</span><ins>+2014-01-06  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Rename DrawingArea::supportsThreadedScrolling() to supportsAsyncScrolling()
+        https://bugs.webkit.org/show_bug.cgi?id=126529
+
+        Reviewed by Tim Horton.
+        
+        Change function name from using &quot;threaded&quot; to &quot;async&quot; terminology.
+
+        * WebProcess/WebPage/DrawingArea.h:
+        (WebKit::DrawingArea::supportsAsyncScrolling):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::WebPage):
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+
+2014-01-06  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Add new files for UI-side scrolling
+        https://bugs.webkit.org/show_bug.cgi?id=126532
+
+        Reviewed by Anders Carlson.
+        
+        Add RemoteScrollingCoordinator, RemoteScrollingCoordinatorProxy,
+        RemoteScrollingCoordinatorTransaction, RemoteScrollingTree. 
+        
+        These allow the scrolling tree to be used in the UI process.
+        RemoteScrollingCoordinator builds a ScrollingStateTree, which is
+        encoded by RemoteScrollingCoordinatorTransaction. Decoding the
+        transaction recreates that ScrollingStateTree in the UI process,
+        and RemoteScrollingCoordinatorProxy &quot;commits&quot; that to update
+        the RemoteScrollingTree.
+        
+        New classes are not hooked up to anything yet.
+
+        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp: Added.
+        (ArgumentCoder&lt;ScrollingStateNode&gt;::encode):
+        (ArgumentCoder&lt;ScrollingStateNode&gt;::decode):
+        (ArgumentCoder&lt;ScrollingStateScrollingNode&gt;::encode):
+        (ArgumentCoder&lt;ScrollingStateScrollingNode&gt;::decode):
+        (ArgumentCoder&lt;ScrollingStateFixedNode&gt;::encode):
+        (ArgumentCoder&lt;ScrollingStateFixedNode&gt;::decode):
+        (ArgumentCoder&lt;ScrollingStateStickyNode&gt;::encode):
+        (ArgumentCoder&lt;ScrollingStateStickyNode&gt;::decode):
+        (WebKit::encodeNodeAndDescendants):
+        (WebKit::RemoteScrollingCoordinatorTransaction::encode):
+        (WebKit::RemoteScrollingCoordinatorTransaction::decode):
+        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h: Added.
+        (WebKit::RemoteScrollingCoordinatorTransaction::setStateTreeToEncode):
+        (WebKit::RemoteScrollingCoordinatorTransaction::scrollingStateTree):
+        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: Added.
+        (WebKit::RemoteScrollingCoordinatorProxy::RemoteScrollingCoordinatorProxy):
+        (WebKit::RemoteScrollingCoordinatorProxy::~RemoteScrollingCoordinatorProxy):
+        (WebKit::RemoteScrollingCoordinatorProxy::layerTreeHost):
+        (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
+        (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
+        (WebKit::RemoteScrollingCoordinatorProxy::handleWheelEvent):
+        (WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChanged):
+        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h: Added.
+        * UIProcess/Scrolling/RemoteScrollingTree.cpp: Added.
+        (WebKit::RemoteScrollingTree::create):
+        (WebKit::RemoteScrollingTree::RemoteScrollingTree):
+        (WebKit::RemoteScrollingTree::~RemoteScrollingTree):
+        (WebKit::RemoteScrollingTree::tryToHandleWheelEvent):
+        (WebKit::RemoteScrollingTree::handleWheelEventPhase):
+        (WebKit::RemoteScrollingTree::updateMainFrameScrollPosition):
+        (WebKit::RemoteScrollingTree::createNode):
+        * UIProcess/Scrolling/RemoteScrollingTree.h: Added.
+        (WebKit::RemoteScrollingTree::scrollingCoordinatorProxy):
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/Scrolling/RemoteScrollingCoordinator.h: Added.
+        (WebKit::RemoteScrollingCoordinator::create):
+        * WebProcess/Scrolling/RemoteScrollingCoordinator.messages.in: Added.
+        * WebProcess/Scrolling/RemoteScrollingCoordinator.mm: Added.
+        (WebKit::RemoteScrollingCoordinator::RemoteScrollingCoordinator):
+        (WebKit::RemoteScrollingCoordinator::~RemoteScrollingCoordinator):
+        (WebKit::RemoteScrollingCoordinator::scheduleTreeStateCommit):
+        (WebKit::RemoteScrollingCoordinator::createScrollingTreeNode):
+        (WebKit::RemoteScrollingCoordinator::isRubberBandInProgress):
+        (WebKit::RemoteScrollingCoordinator::setScrollPinningBehavior):
+        (WebKit::RemoteScrollingCoordinator::buildTransaction):
+        (WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):
+
</ins><span class="cx"> 2014-01-06  Martin Robinson  &lt;mrobinson@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Small build fix for the GTK+ CMake port
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedScrollingRemoteScrollingCoordinatorTransactioncpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp (0 => 161373)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp                                (rev 0)
+++ trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp        2014-01-06 22:19:42 UTC (rev 161373)
</span><span class="lines">@@ -0,0 +1,299 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;RemoteScrollingCoordinatorTransaction.h&quot;
+
+#include &quot;ArgumentCoders.h&quot;
+#include &quot;MessageDecoder.h&quot;
+#include &quot;MessageEncoder.h&quot;
+#include &quot;WebCoreArgumentCoders.h&quot;
+#include &lt;WebCore/GraphicsLayer.h&gt;
+#include &lt;WebCore/ScrollingStateFixedNode.h&gt;
+#include &lt;WebCore/ScrollingStateScrollingNode.h&gt;
+#include &lt;WebCore/ScrollingStateStickyNode.h&gt;
+
+#include &lt;wtf/HashMap.h&gt;
+
+using namespace WebCore;
+
+namespace IPC {
+
+template&lt;&gt; struct ArgumentCoder&lt;ScrollingStateNode&gt; {
+    static void encode(ArgumentEncoder&amp;, const ScrollingStateNode&amp;);
+    static bool decode(ArgumentDecoder&amp;, ScrollingStateNode&amp;);
+};
+
+template&lt;&gt; struct ArgumentCoder&lt;ScrollingStateScrollingNode&gt; {
+    static void encode(ArgumentEncoder&amp;, const ScrollingStateScrollingNode&amp;);
+    static bool decode(ArgumentDecoder&amp;, ScrollingStateScrollingNode&amp;);
+};
+
+template&lt;&gt; struct ArgumentCoder&lt;ScrollingStateFixedNode&gt; {
+    static void encode(ArgumentEncoder&amp;, const ScrollingStateFixedNode&amp;);
+    static bool decode(ArgumentDecoder&amp;, ScrollingStateFixedNode&amp;);
+};
+
+template&lt;&gt; struct ArgumentCoder&lt;ScrollingStateStickyNode&gt; {
+    static void encode(ArgumentEncoder&amp;, const ScrollingStateStickyNode&amp;);
+    static bool decode(ArgumentDecoder&amp;, ScrollingStateStickyNode&amp;);
+};
+
+} // namespace IPC
+
+using namespace IPC;
+
+void ArgumentCoder&lt;ScrollingStateNode&gt;::encode(ArgumentEncoder&amp; encoder, const ScrollingStateNode&amp; node)
+{
+    encoder.encodeEnum(node.nodeType());
+    encoder &lt;&lt; node.scrollingNodeID();
+    encoder &lt;&lt; node.parentNodeID();
+    encoder &lt;&lt; node.changedProperties();
+    
+    if (node.hasChangedProperty(ScrollingStateNode::ScrollLayer))
+        encoder &lt;&lt; static_cast&lt;GraphicsLayer::PlatformLayerID&gt;(node.layer());
+}
+
+bool ArgumentCoder&lt;ScrollingStateNode&gt;::decode(ArgumentDecoder&amp; decoder, ScrollingStateNode&amp; node)
+{
+    // nodeType, scrollingNodeID and parentNodeID have already been decoded by the caller in order to create the node.
+    ScrollingStateNode::ChangedProperties changedProperties;
+    if (!decoder.decode(changedProperties))
+        return false;
+
+    node.setChangedProperties(changedProperties);
+    if (node.hasChangedProperty(ScrollingStateNode::ScrollLayer)) {
+        GraphicsLayer::PlatformLayerID layerID;
+        if (!decoder.decode(layerID))
+            return false;
+        node.setLayer(layerID);
+    }
+
+    return true;
+}
+
+#define SCROLLING_NODE_ENCODE(property, getter) \
+    if (node.hasChangedProperty(ScrollingStateScrollingNode::property)) \
+        encoder &lt;&lt; node.getter();
+
+#define SCROLLING_NODE_ENCODE_ENUM(property, getter) \
+    if (node.hasChangedProperty(ScrollingStateScrollingNode::property)) \
+        encoder.encodeEnum(node.getter());
+
+void ArgumentCoder&lt;ScrollingStateScrollingNode&gt;::encode(ArgumentEncoder&amp; encoder, const ScrollingStateScrollingNode&amp; node)
+{
+    encoder &lt;&lt; static_cast&lt;const ScrollingStateNode&amp;&gt;(node);
+    
+    SCROLLING_NODE_ENCODE(ViewportRect, viewportRect)
+    SCROLLING_NODE_ENCODE(TotalContentsSize, totalContentsSize)
+    SCROLLING_NODE_ENCODE(ScrollOrigin, scrollOrigin)
+    SCROLLING_NODE_ENCODE(FrameScaleFactor, frameScaleFactor)
+//    SCROLLING_NODE_ENCODE(NonFastScrollableRegion, nonFastScrollableRegion) // FIXME: no encoder support for Region
+    SCROLLING_NODE_ENCODE(WheelEventHandlerCount, wheelEventHandlerCount)
+    SCROLLING_NODE_ENCODE(ReasonsForSynchronousScrolling, synchronousScrollingReasons)
+    SCROLLING_NODE_ENCODE(ScrollableAreaParams, scrollableAreaParameters)
+    SCROLLING_NODE_ENCODE_ENUM(BehaviorForFixedElements, scrollBehaviorForFixedElements)
+    // FIXME: encode requestedScrollPosition?
+    SCROLLING_NODE_ENCODE(HeaderHeight, headerHeight)
+    SCROLLING_NODE_ENCODE(FooterHeight, footerHeight)
+}
+
+#define SCROLLING_NODE_DECODE(property, type, setter) \
+    if (node.hasChangedProperty(ScrollingStateScrollingNode::property)) { \
+        type decodedValue; \
+        if (!decoder.decode(decodedValue)) \
+            return false; \
+        node.setter(decodedValue); \
+    }
+
+#define SCROLLING_NODE_DECODE_ENUM(property, type, setter) \
+    if (node.hasChangedProperty(ScrollingStateScrollingNode::property)) { \
+        type decodedValue; \
+        if (!decoder.decodeEnum(decodedValue)) \
+            return false; \
+        node.setter(decodedValue); \
+    }
+
+bool ArgumentCoder&lt;ScrollingStateScrollingNode&gt;::decode(ArgumentDecoder&amp; decoder, ScrollingStateScrollingNode&amp; node)
+{
+    if (!decoder.decode(static_cast&lt;ScrollingStateNode&amp;&gt;(node)))
+        return false;
+
+    SCROLLING_NODE_DECODE(ViewportRect, IntRect, setViewportRect);
+    SCROLLING_NODE_DECODE(TotalContentsSize, IntSize, setTotalContentsSize);
+    SCROLLING_NODE_DECODE(ScrollOrigin, IntPoint, setScrollOrigin);
+    SCROLLING_NODE_DECODE(FrameScaleFactor, float, setFrameScaleFactor);
+//    SCROLLING_NODE_DECODE(NonFastScrollableRegion, Region, setNonFastScrollableRegion); // FIXME: no decoder support for Region.
+    SCROLLING_NODE_DECODE(WheelEventHandlerCount, int, setWheelEventHandlerCount);
+    SCROLLING_NODE_DECODE(ReasonsForSynchronousScrolling, SynchronousScrollingReasons, setSynchronousScrollingReasons);
+    SCROLLING_NODE_DECODE(ScrollableAreaParams, ScrollableAreaParameters, setScrollableAreaParameters);
+    SCROLLING_NODE_DECODE_ENUM(BehaviorForFixedElements, ScrollBehaviorForFixedElements, setScrollBehaviorForFixedElements);
+    // FIXME: decode requestedScrollPosition?
+    SCROLLING_NODE_DECODE(HeaderHeight, int, setHeaderHeight);
+    SCROLLING_NODE_DECODE(FooterHeight, int, setFooterHeight);
+
+    return true;
+}
+
+void ArgumentCoder&lt;ScrollingStateFixedNode&gt;::encode(ArgumentEncoder&amp; encoder, const ScrollingStateFixedNode&amp; node)
+{
+    encoder &lt;&lt; static_cast&lt;const ScrollingStateNode&amp;&gt;(node);
+    
+    if (node.hasChangedProperty(ScrollingStateFixedNode::ViewportConstraints))
+        encoder &lt;&lt; node.viewportConstraints();
+}
+
+bool ArgumentCoder&lt;ScrollingStateFixedNode&gt;::decode(ArgumentDecoder&amp; decoder, ScrollingStateFixedNode&amp; node)
+{
+    if (!decoder.decode(static_cast&lt;ScrollingStateNode&amp;&gt;(node)))
+        return false;
+
+    if (node.hasChangedProperty(ScrollingStateFixedNode::ViewportConstraints)) {
+        FixedPositionViewportConstraints decodedValue;
+        if (!decoder.decode(decodedValue))
+            return false;
+        node.updateConstraints(decodedValue);
+    }
+
+    return true;
+}
+
+void ArgumentCoder&lt;ScrollingStateStickyNode&gt;::encode(ArgumentEncoder&amp; encoder, const ScrollingStateStickyNode&amp; node)
+{
+    encoder &lt;&lt; static_cast&lt;const ScrollingStateNode&amp;&gt;(node);
+    
+    if (node.hasChangedProperty(ScrollingStateStickyNode::ViewportConstraints))
+        encoder &lt;&lt; node.viewportConstraints();
+}
+
+bool ArgumentCoder&lt;ScrollingStateStickyNode&gt;::decode(ArgumentDecoder&amp; decoder, ScrollingStateStickyNode&amp; node)
+{
+    if (!decoder.decode(static_cast&lt;ScrollingStateNode&amp;&gt;(node)))
+        return false;
+
+    if (node.hasChangedProperty(ScrollingStateStickyNode::ViewportConstraints)) {
+        StickyPositionViewportConstraints decodedValue;
+        if (!decoder.decode(decodedValue))
+            return false;
+        node.updateConstraints(decodedValue);
+    }
+
+    return true;
+}
+
+namespace WebKit {
+
+static void encodeNodeAndDescendants(IPC::ArgumentEncoder&amp; encoder, const ScrollingStateNode&amp; stateNode)
+{
+    switch (stateNode.nodeType()) {
+    case ScrollingNode:
+        encoder &lt;&lt; toScrollingStateScrollingNode(stateNode);
+        break;
+    case FixedNode:
+        encoder &lt;&lt; toScrollingStateFixedNode(stateNode);
+        break;
+    case StickyNode:
+        encoder &lt;&lt; toScrollingStateStickyNode(stateNode);
+        break;
+    }
+
+    if (!stateNode.children())
+        return;
+
+    for (size_t i = 0; i &lt; stateNode.children()-&gt;size(); ++i) {
+        const OwnPtr&lt;ScrollingStateNode&gt;&amp; child = stateNode.children()-&gt;at(i);
+        encodeNodeAndDescendants(encoder, *child.get());
+    }
+}
+
+void RemoteScrollingCoordinatorTransaction::encode(IPC::ArgumentEncoder&amp; encoder) const
+{
+    encoder &lt;&lt; m_scrollingStateTree-&gt;nodeCount();
+    
+    if (const ScrollingStateNode* rootNode = m_scrollingStateTree-&gt;rootStateNode())
+        encodeNodeAndDescendants(encoder, *rootNode);
+    
+    encoder &lt;&lt; m_scrollingStateTree-&gt;removedNodes();
+}
+
+bool RemoteScrollingCoordinatorTransaction::decode(IPC::ArgumentDecoder&amp; decoder, RemoteScrollingCoordinatorTransaction&amp; transaction)
+{
+    return transaction.decode(decoder);
+}
+
+bool RemoteScrollingCoordinatorTransaction::decode(IPC::ArgumentDecoder&amp; decoder)
+{
+    int numNodes;
+    if (!decoder.decode(numNodes))
+        return false;
+
+    m_scrollingStateTree = ScrollingStateTree::create();
+    
+    for (int i = 0; i &lt; numNodes; ++i) {
+        ScrollingNodeType nodeType;
+        if (!decoder.decodeEnum(nodeType))
+            return false;
+
+        ScrollingNodeID nodeID;
+        if (!decoder.decode(nodeID))
+            return false;
+
+        ScrollingNodeID parentNodeID;
+        if (!decoder.decode(parentNodeID))
+            return false;
+
+        m_scrollingStateTree-&gt;attachNode(nodeType, nodeID, parentNodeID);
+        ScrollingStateNode* newNode = m_scrollingStateTree-&gt;stateNodeForID(nodeID);
+        ASSERT(newNode);
+        ASSERT(!parentNodeID || newNode-&gt;parent());
+        
+        switch (nodeType) {
+        case ScrollingNode:
+            if (!decoder.decode(*toScrollingStateScrollingNode(newNode)))
+                return false;
+            break;
+        case FixedNode:
+            if (!decoder.decode(*toScrollingStateFixedNode(newNode)))
+                return false;
+            break;
+        case StickyNode:
+            if (!decoder.decode(*toScrollingStateStickyNode(newNode)))
+                return false;
+            break;
+        }
+    }
+
+    // Removed nodes
+    Vector&lt;ScrollingNodeID&gt; removedNodes;
+    if (!decoder.decode(removedNodes))
+        return false;
+    
+    if (removedNodes.size())
+        m_scrollingStateTree-&gt;setRemovedNodes(removedNodes);
+
+    return true;
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharedScrollingRemoteScrollingCoordinatorTransactionhfromrev161371trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxyh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h (from rev 161371, trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h) (0 => 161373)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h                                (rev 0)
+++ trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h        2014-01-06 22:19:42 UTC (rev 161373)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RemoteScrollingCoordinatorTransaction_h
+#define RemoteScrollingCoordinatorTransaction_h
+
+#include &lt;WebCore/ScrollingStateTree.h&gt;
+#include &lt;wtf/OwnPtr.h&gt;
+#include &lt;wtf/PassOwnPtr.h&gt;
+
+namespace IPC {
+class ArgumentDecoder;
+class ArgumentEncoder;
+}
+
+namespace WebKit {
+
+class RemoteScrollingCoordinatorTransaction {
+public:
+    void setStateTreeToEncode(PassOwnPtr&lt;WebCore::ScrollingStateTree&gt; stateTree) { m_scrollingStateTree = stateTree; }
+    OwnPtr&lt;WebCore::ScrollingStateTree&gt;&amp; scrollingStateTree() { return m_scrollingStateTree; }
+    
+    void encode(IPC::ArgumentEncoder&amp;) const;
+    static bool decode(IPC::ArgumentDecoder&amp;, RemoteScrollingCoordinatorTransaction&amp;);
+
+private:
+    bool decode(IPC::ArgumentDecoder&amp;);
+    
+    OwnPtr&lt;WebCore::ScrollingStateTree&gt; m_scrollingStateTree;
+};
+
+} // namespace WebKit
+
+#endif // RemoteScrollingCoordinatorTransaction_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessScrollingRemoteScrollingCoordinatorProxycpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp (0 => 161373)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp        2014-01-06 22:19:42 UTC (rev 161373)
</span><span class="lines">@@ -0,0 +1,126 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;RemoteScrollingCoordinatorProxy.h&quot;
+
+#include &quot;ArgumentCoders.h&quot;
+#include &quot;MessageDecoder.h&quot;
+#include &quot;MessageEncoder.h&quot;
+#include &quot;RemoteLayerTreeDrawingAreaProxy.h&quot;
+#include &quot;RemoteScrollingCoordinator.h&quot;
+#include &quot;RemoteScrollingCoordinatorMessages.h&quot;
+#include &quot;RemoteScrollingCoordinatorTransaction.h&quot;
+#include &quot;RemoteScrollingTree.h&quot;
+#include &quot;WebPageProxy.h&quot;
+#include &quot;WebProcessProxy.h&quot;
+#include &lt;WebCore/ScrollingStateTree.h&gt;
+
+using namespace WebCore;
+
+namespace WebKit {
+
+RemoteScrollingCoordinatorProxy::RemoteScrollingCoordinatorProxy(WebPageProxy&amp; webPageProxy)
+    : m_webPageProxy(webPageProxy)
+    , m_scrollingTree(RemoteScrollingTree::create(*this))
+{
+}
+
+RemoteScrollingCoordinatorProxy::~RemoteScrollingCoordinatorProxy()
+{
+}
+
+const RemoteLayerTreeHost* RemoteScrollingCoordinatorProxy::layerTreeHost() const
+{
+    DrawingAreaProxy* drawingArea = m_webPageProxy.drawingArea();
+    if (!drawingArea || drawingArea-&gt;type() != DrawingAreaTypeRemoteLayerTree) {
+        ASSERT_NOT_REACHED();
+        return nullptr;
+    }
+
+    RemoteLayerTreeDrawingAreaProxy* remoteDrawingArea = static_cast&lt;RemoteLayerTreeDrawingAreaProxy*&gt;(drawingArea);
+    return &amp;remoteDrawingArea-&gt;remoteLayerTreeHost();
+}
+
+void RemoteScrollingCoordinatorProxy::updateScrollingTree(const RemoteScrollingCoordinatorTransaction&amp; transaction)
+{
+    OwnPtr&lt;ScrollingStateTree&gt; stateTree = const_cast&lt;RemoteScrollingCoordinatorTransaction&amp;&gt;(transaction).scrollingStateTree().release();
+    
+    const RemoteLayerTreeHost* layerTreeHost = this-&gt;layerTreeHost();
+    if (!layerTreeHost) {
+        ASSERT_NOT_REACHED();
+        return;
+    }
+    
+    connectStateNodeLayers(*stateTree, *layerTreeHost);
+    m_scrollingTree-&gt;commitNewTreeState(stateTree.release());
+}
+
+void RemoteScrollingCoordinatorProxy::connectStateNodeLayers(ScrollingStateTree&amp; stateTree, const RemoteLayerTreeHost&amp; layerTreeHost)
+{
+    for (auto it : stateTree.nodeMap()) {
+        ScrollingStateNode* currNode = it.value;
+        switch (currNode-&gt;nodeType()) {
+        case ScrollingNode: {
+            ScrollingStateScrollingNode* scrollingStateNode = toScrollingStateScrollingNode(currNode);
+            
+            if (scrollingStateNode-&gt;hasChangedProperty(ScrollingStateNode::ScrollLayer))
+                scrollingStateNode-&gt;setLayer(layerTreeHost.getLayer(scrollingStateNode-&gt;layer()));
+
+            if (scrollingStateNode-&gt;hasChangedProperty(ScrollingStateScrollingNode::CounterScrollingLayer))
+                scrollingStateNode-&gt;setCounterScrollingLayer(layerTreeHost.getLayer(scrollingStateNode-&gt;counterScrollingLayer()));
+
+            // FIXME: we should never have header and footer layers coming from the WebProcess.
+            if (scrollingStateNode-&gt;hasChangedProperty(ScrollingStateScrollingNode::HeaderLayer))
+                scrollingStateNode-&gt;setHeaderLayer(layerTreeHost.getLayer(scrollingStateNode-&gt;headerLayer()));
+
+            if (scrollingStateNode-&gt;hasChangedProperty(ScrollingStateScrollingNode::FooterLayer))
+                scrollingStateNode-&gt;setFooterLayer(layerTreeHost.getLayer(scrollingStateNode-&gt;footerLayer()));
+            break;
+        }
+        case FixedNode:
+            if (currNode-&gt;hasChangedProperty(ScrollingStateNode::ScrollLayer))
+                currNode-&gt;setLayer(layerTreeHost.getLayer(currNode-&gt;layer()));
+            break;
+        case StickyNode:
+            if (currNode-&gt;hasChangedProperty(ScrollingStateNode::ScrollLayer))
+                currNode-&gt;setLayer(layerTreeHost.getLayer(currNode-&gt;layer()));
+            break;
+        }
+    }
+}
+
+bool RemoteScrollingCoordinatorProxy::handleWheelEvent(const PlatformWheelEvent&amp; event)
+{
+    ScrollingTree::EventResult result = m_scrollingTree-&gt;tryToHandleWheelEvent(event);
+    return result == ScrollingTree::DidHandleEvent; // FIXME: handle other values.
+}
+
+void RemoteScrollingCoordinatorProxy::scrollPositionChanged(WebCore::ScrollingNodeID scrolledNodeID, const WebCore::FloatPoint&amp; newScrollPosition)
+{
+    m_webPageProxy.send(Messages::RemoteScrollingCoordinator::ScrollPositionChangedForNode(scrolledNodeID, newScrollPosition));
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessScrollingRemoteScrollingCoordinatorProxyhfromrev161371trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxyh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h (from rev 161371, trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h) (0 => 161373)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h        2014-01-06 22:19:42 UTC (rev 161373)
</span><span class="lines">@@ -0,0 +1,73 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RemoteScrollingCoordinatorProxy_h
+#define RemoteScrollingCoordinatorProxy_h
+
+#include &quot;MessageReceiver.h&quot;
+#include &quot;RemoteScrollingCoordinator.h&quot;
+#include &lt;wtf/Noncopyable.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+
+namespace WebCore {
+class FloatPoint;
+class PlatformWheelEvent;
+}
+
+namespace WebKit {
+
+class RemoteLayerTreeHost;
+class RemoteScrollingCoordinatorTransaction;
+class RemoteScrollingTree;
+class WebPageProxy;
+
+class RemoteScrollingCoordinatorProxy {
+    WTF_MAKE_NONCOPYABLE(RemoteScrollingCoordinatorProxy);
+public:
+    explicit RemoteScrollingCoordinatorProxy(WebPageProxy&amp;);
+    virtual ~RemoteScrollingCoordinatorProxy();
+    
+    // Inform the web process that the scroll position changed.
+    void scrollPositionChanged(WebCore::ScrollingNodeID, const WebCore::FloatPoint&amp; newScrollPosition);
+
+    // FIXME: expose the tree and pass this to that?
+    bool handleWheelEvent(const WebCore::PlatformWheelEvent&amp;);
+    
+    WebCore::ScrollingNodeID rootScrollingNodeID() const;
+
+    const RemoteLayerTreeHost* layerTreeHost() const;
+
+    void updateScrollingTree(const RemoteScrollingCoordinatorTransaction&amp;);
+
+private:
+    void connectStateNodeLayers(WebCore::ScrollingStateTree&amp;, const RemoteLayerTreeHost&amp;);
+
+    WebPageProxy&amp; m_webPageProxy;
+    RefPtr&lt;RemoteScrollingTree&gt; m_scrollingTree;
+};
+
+} // namespace WebKit
+
+#endif // RemoteScrollingCoordinatorProxy_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessScrollingRemoteScrollingTreecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.cpp (0 => 161373)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.cpp                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.cpp        2014-01-06 22:19:42 UTC (rev 161373)
</span><span class="lines">@@ -0,0 +1,91 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;RemoteScrollingTree.h&quot;
+
+#include &quot;RemoteLayerTreeHost.h&quot;
+#include &quot;RemoteScrollingCoordinatorProxy.h&quot;
+#include &lt;WebCore/ScrollingTreeFixedNode.h&gt;
+#include &lt;WebCore/ScrollingTreeScrollingNodeMac.h&gt;
+#include &lt;WebCore/ScrollingTreeStickyNode.h&gt;
+
+using namespace WebCore;
+
+namespace WebKit {
+
+RefPtr&lt;RemoteScrollingTree&gt; RemoteScrollingTree::create(RemoteScrollingCoordinatorProxy&amp; scrollingCoordinator)
+{
+    return adoptRef(new RemoteScrollingTree(scrollingCoordinator));
+}
+
+RemoteScrollingTree::RemoteScrollingTree(RemoteScrollingCoordinatorProxy&amp; scrollingCoordinator)
+    : m_scrollingCoordinatorProxy(scrollingCoordinator)
+{
+}
+
+RemoteScrollingTree::~RemoteScrollingTree()
+{
+}
+
+ScrollingTree::EventResult RemoteScrollingTree::tryToHandleWheelEvent(const PlatformWheelEvent&amp; wheelEvent)
+{
+    if (shouldHandleWheelEventSynchronously(wheelEvent))
+        return SendToMainThread;
+
+    if (willWheelEventStartSwipeGesture(wheelEvent))
+        return DidNotHandleEvent;
+
+    handleWheelEvent(wheelEvent);
+    return DidHandleEvent;
+}
+
+#if PLATFORM(MAC)
+void RemoteScrollingTree::handleWheelEventPhase(PlatformWheelEventPhase phase)
+{
+    // FIXME: hand off to m_scrollingCoordinatorProxy?
+}
+#endif
+
+void RemoteScrollingTree::updateMainFrameScrollPosition(const IntPoint&amp; scrollPosition, SetOrSyncScrollingLayerPosition)
+{
+    // FIXME: fix for all scrolling nodes.
+    m_scrollingCoordinatorProxy.scrollPositionChanged(rootNode()-&gt;scrollingNodeID(), scrollPosition);
+}
+
+PassOwnPtr&lt;ScrollingTreeNode&gt; RemoteScrollingTree::createNode(ScrollingNodeType nodeType, ScrollingNodeID nodeID)
+{
+    switch (nodeType) {
+    case ScrollingNode:
+        return ScrollingTreeScrollingNodeMac::create(*this, nodeID);
+    case FixedNode:
+        return ScrollingTreeFixedNode::create(*this, nodeID);
+    case StickyNode:
+        return ScrollingTreeStickyNode::create(*this, nodeID);
+    }
+    return nullptr;
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessScrollingRemoteScrollingTreeh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h (0 => 161373)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h        2014-01-06 22:19:42 UTC (rev 161373)
</span><span class="lines">@@ -0,0 +1,65 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RemoteScrollingTree_h
+#define RemoteScrollingTree_h
+
+#include &quot;RemoteScrollingCoordinator.h&quot;
+#include &lt;WebCore/ScrollElasticityController.h&gt;
+#include &lt;WebCore/ScrollingConstraints.h&gt;
+#include &lt;WebCore/ScrollingTree.h&gt;
+
+namespace WebKit {
+
+class RemoteScrollingCoordinatorProxy;
+
+class RemoteScrollingTree : public WebCore::ScrollingTree {
+public:
+    static RefPtr&lt;RemoteScrollingTree&gt; create(RemoteScrollingCoordinatorProxy&amp;);
+    virtual ~RemoteScrollingTree();
+
+    virtual bool isRemoteScrollingTree() const OVERRIDE { return true; }
+    virtual EventResult tryToHandleWheelEvent(const WebCore::PlatformWheelEvent&amp;) OVERRIDE;
+
+    const RemoteScrollingCoordinatorProxy&amp; scrollingCoordinatorProxy() const { return m_scrollingCoordinatorProxy; }
+
+private:
+    explicit RemoteScrollingTree(RemoteScrollingCoordinatorProxy&amp;);
+
+#if PLATFORM(MAC)
+    virtual void handleWheelEventPhase(WebCore::PlatformWheelEventPhase) OVERRIDE;
+#endif
+    virtual void updateMainFrameScrollPosition(const WebCore::IntPoint&amp; scrollPosition, WebCore::SetOrSyncScrollingLayerPosition = WebCore::SyncScrollingLayerPosition) OVERRIDE;
+
+    virtual PassOwnPtr&lt;WebCore::ScrollingTreeNode&gt; createNode(WebCore::ScrollingNodeType, WebCore::ScrollingNodeID);
+    
+    RemoteScrollingCoordinatorProxy&amp; m_scrollingCoordinatorProxy;
+};
+
+SCROLLING_TREE_TYPE_CASTS(RemoteScrollingTree, isRemoteScrollingTree());
+
+} // namespace WebKit
+
+#endif // RemoteScrollingTree_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h (161372 => 161373)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h        2014-01-06 22:18:07 UTC (rev 161372)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h        2014-01-06 22:19:42 UTC (rev 161373)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx">     virtual void deviceScaleFactorDidChange() OVERRIDE;
</span><span class="cx">     virtual void didUpdateGeometry() OVERRIDE;
</span><span class="cx"> 
</span><del>-    // CoreIPC::MessageReceiver
</del><ins>+    // IPC::MessageReceiver
</ins><span class="cx">     virtual void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&amp;) OVERRIDE;
</span><span class="cx"> 
</span><span class="cx">     // Message handlers
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (161372 => 161373)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-01-06 22:18:07 UTC (rev 161372)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-01-06 22:19:42 UTC (rev 161373)
</span><span class="lines">@@ -49,6 +49,14 @@
</span><span class="cx"> /* Begin PBXBuildFile section */
</span><span class="cx">                 0F174AA3142A4CB70039250F /* APIGeometry.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F174AA2142A4CB60039250F /* APIGeometry.h */; };
</span><span class="cx">                 0F174AA7142AAC610039250F /* WKGeometry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F174AA6142AAC610039250F /* WKGeometry.cpp */; };
</span><ins>+                0F594790187B3B3A00437857 /* RemoteScrollingCoordinator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F59478D187B3B3A00437857 /* RemoteScrollingCoordinator.h */; };
+                0F594792187B3B3A00437857 /* RemoteScrollingCoordinator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F59478F187B3B3A00437857 /* RemoteScrollingCoordinator.mm */; };
+                0F59479A187B3B6000437857 /* RemoteScrollingCoordinatorProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F594794187B3B6000437857 /* RemoteScrollingCoordinatorProxy.cpp */; };
+                0F59479B187B3B6000437857 /* RemoteScrollingCoordinatorProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F594795187B3B6000437857 /* RemoteScrollingCoordinatorProxy.h */; };
+                0F59479C187B3B6000437857 /* RemoteScrollingTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F594796187B3B6000437857 /* RemoteScrollingTree.cpp */; };
+                0F59479D187B3B6000437857 /* RemoteScrollingTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F594797187B3B6000437857 /* RemoteScrollingTree.h */; };
+                0F5947A3187B3B7D00437857 /* RemoteScrollingCoordinatorTransaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F5947A1187B3B7D00437857 /* RemoteScrollingCoordinatorTransaction.cpp */; };
+                0F5947A4187B3B7D00437857 /* RemoteScrollingCoordinatorTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5947A2187B3B7D00437857 /* RemoteScrollingCoordinatorTransaction.h */; };
</ins><span class="cx">                 0FB659231208B4DB0044816C /* DrawingAreaInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB659221208B4DB0044816C /* DrawingAreaInfo.h */; };
</span><span class="cx">                 0FF24A2D1879E4BC003ABF0C /* RemoteLayerTreeDrawingAreaProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FF24A2B1879E4BC003ABF0C /* RemoteLayerTreeDrawingAreaProxyMessageReceiver.cpp */; };
</span><span class="cx">                 0FF24A2E1879E4BC003ABF0C /* RemoteLayerTreeDrawingAreaProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF24A2C1879E4BC003ABF0C /* RemoteLayerTreeDrawingAreaProxyMessages.h */; };
</span><span class="lines">@@ -1586,6 +1594,15 @@
</span><span class="cx">                 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F174AA2142A4CB60039250F /* APIGeometry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIGeometry.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F174AA6142AAC610039250F /* WKGeometry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKGeometry.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                0F59478D187B3B3A00437857 /* RemoteScrollingCoordinator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RemoteScrollingCoordinator.h; path = Scrolling/RemoteScrollingCoordinator.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F59478E187B3B3A00437857 /* RemoteScrollingCoordinator.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = RemoteScrollingCoordinator.messages.in; path = Scrolling/RemoteScrollingCoordinator.messages.in; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F59478F187B3B3A00437857 /* RemoteScrollingCoordinator.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RemoteScrollingCoordinator.mm; path = Scrolling/RemoteScrollingCoordinator.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F594794187B3B6000437857 /* RemoteScrollingCoordinatorProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RemoteScrollingCoordinatorProxy.cpp; path = Scrolling/RemoteScrollingCoordinatorProxy.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F594795187B3B6000437857 /* RemoteScrollingCoordinatorProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RemoteScrollingCoordinatorProxy.h; path = Scrolling/RemoteScrollingCoordinatorProxy.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F594796187B3B6000437857 /* RemoteScrollingTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RemoteScrollingTree.cpp; path = Scrolling/RemoteScrollingTree.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F594797187B3B6000437857 /* RemoteScrollingTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RemoteScrollingTree.h; path = Scrolling/RemoteScrollingTree.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F5947A1187B3B7D00437857 /* RemoteScrollingCoordinatorTransaction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RemoteScrollingCoordinatorTransaction.cpp; path = Scrolling/RemoteScrollingCoordinatorTransaction.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0F5947A2187B3B7D00437857 /* RemoteScrollingCoordinatorTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RemoteScrollingCoordinatorTransaction.h; path = Scrolling/RemoteScrollingCoordinatorTransaction.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 0FB659221208B4DB0044816C /* DrawingAreaInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingAreaInfo.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0FF24A2B1879E4BC003ABF0C /* RemoteLayerTreeDrawingAreaProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteLayerTreeDrawingAreaProxyMessageReceiver.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0FF24A2C1879E4BC003ABF0C /* RemoteLayerTreeDrawingAreaProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteLayerTreeDrawingAreaProxyMessages.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -3235,6 +3252,36 @@
</span><span class="cx">                         tabWidth = 8;
</span><span class="cx">                         usesTabs = 0;
</span><span class="cx">                 };
</span><ins>+                0F59478C187B3B2A00437857 /* Scrolling */ = {
+                        isa = PBXGroup;
+                        children = (
+                                0F59478D187B3B3A00437857 /* RemoteScrollingCoordinator.h */,
+                                0F59478E187B3B3A00437857 /* RemoteScrollingCoordinator.messages.in */,
+                                0F59478F187B3B3A00437857 /* RemoteScrollingCoordinator.mm */,
+                        );
+                        name = Scrolling;
+                        sourceTree = &quot;&lt;group&gt;&quot;;
+                };
+                0F594793187B3B4C00437857 /* Scrolling */ = {
+                        isa = PBXGroup;
+                        children = (
+                                0F594794187B3B6000437857 /* RemoteScrollingCoordinatorProxy.cpp */,
+                                0F594795187B3B6000437857 /* RemoteScrollingCoordinatorProxy.h */,
+                                0F594796187B3B6000437857 /* RemoteScrollingTree.cpp */,
+                                0F594797187B3B6000437857 /* RemoteScrollingTree.h */,
+                        );
+                        name = Scrolling;
+                        sourceTree = &quot;&lt;group&gt;&quot;;
+                };
+                0F5947A0187B3B7100437857 /* Scrolling */ = {
+                        isa = PBXGroup;
+                        children = (
+                                0F5947A1187B3B7D00437857 /* RemoteScrollingCoordinatorTransaction.cpp */,
+                                0F5947A2187B3B7D00437857 /* RemoteScrollingCoordinatorTransaction.h */,
+                        );
+                        name = Scrolling;
+                        sourceTree = &quot;&lt;group&gt;&quot;;
+                };
</ins><span class="cx">                 1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="lines">@@ -3496,6 +3543,7 @@
</span><span class="cx">                                 BC111B5A112F628200337BAB /* mac */,
</span><span class="cx">                                 51A8A60D1627F2AC000D90E9 /* Network */,
</span><span class="cx">                                 1AAE058C1279DCD400852418 /* Plugins */,
</span><ins>+                                0F5947A0187B3B7100437857 /* Scrolling */,
</ins><span class="cx">                                 BC64696D11DBE603006455B0 /* APIArray.cpp */,
</span><span class="cx">                                 BC64696E11DBE603006455B0 /* APIArray.h */,
</span><span class="cx">                                 1A3DD205125E5A2F004515E6 /* APIClient.h */,
</span><span class="lines">@@ -4430,6 +4478,7 @@
</span><span class="cx">                                 31099974146C8AA80029DEB9 /* Notifications (User) */,
</span><span class="cx">                                 1A6FB7AA11E64B4900DB1371 /* Plugins */,
</span><span class="cx">                                 3336762B130C9978006C9DE2 /* ResourceCache */,
</span><ins>+                                0F59478C187B3B2A00437857 /* Scrolling */,
</ins><span class="cx">                                 1AAC4DDE16B1CBF6009425E3 /* Storage */,
</span><span class="cx">                                 BC032D5D10F437220058C15A /* WebCoreSupport */,
</span><span class="cx">                                 BC032D5E10F4372B0058C15A /* WebPage */,
</span><span class="lines">@@ -4547,6 +4596,7 @@
</span><span class="cx">                                 510CC7E716138E7200D03ED3 /* Network */,
</span><span class="cx">                                 31A2EC401489973700810D71 /* Notifications */,
</span><span class="cx">                                 1AEFCC0511D01F34008219D3 /* Plugins */,
</span><ins>+                                0F594793187B3B4C00437857 /* Scrolling */,
</ins><span class="cx">                                 1A44B95816B73F8C00B7BBD8 /* Storage */,
</span><span class="cx">                                 BCF69FA11176D01400471A52 /* APINavigationData.cpp */,
</span><span class="cx">                                 BCF69FA01176D01400471A52 /* APINavigationData.h */,
</span><span class="lines">@@ -5737,6 +5787,7 @@
</span><span class="cx">                                 1AB474D8184D43FD0051B622 /* WKBundlePageLoaderClient.h in Headers */,
</span><span class="cx">                                 1AEFD27911D16C81008219D3 /* ArgumentCoder.h in Headers */,
</span><span class="cx">                                 1AEFD2F711D1807B008219D3 /* ArgumentCoders.h in Headers */,
</span><ins>+                                0F59479D187B3B6000437857 /* RemoteScrollingTree.h in Headers */,
</ins><span class="cx">                                 1AAF0C4A12B16334008E49E2 /* ArgumentCodersCF.h in Headers */,
</span><span class="cx">                                 E179FD9C134D38060015B883 /* ArgumentCodersMac.h in Headers */,
</span><span class="cx">                                 BC032DA610F437D10058C15A /* ArgumentDecoder.h in Headers */,
</span><span class="lines">@@ -5937,6 +5988,7 @@
</span><span class="cx">                                 1A043B5E124D5E9D00FFBFB5 /* PluginProcessProxyMessages.h in Headers */,
</span><span class="cx">                                 1A043DC1124FF87500FFBFB5 /* PluginProxy.h in Headers */,
</span><span class="cx">                                 1A8EFA711252B84100F7067F /* PluginProxyMessages.h in Headers */,
</span><ins>+                                0F594790187B3B3A00437857 /* RemoteScrollingCoordinator.h in Headers */,
</ins><span class="cx">                                 1A4A9F3312B844E2008FE984 /* PluginQuirks.h in Headers */,
</span><span class="cx">                                 7CD622781739D863005BD7FF /* PluginSandboxProfile.h in Headers */,
</span><span class="cx">                                 1AAB037A185A7C6A00EDF501 /* MessageSender.h in Headers */,
</span><span class="lines">@@ -6108,6 +6160,7 @@
</span><span class="cx">                                 37C4C08D1814AC5C003688B9 /* WKBackForwardList.h in Headers */,
</span><span class="cx">                                 371A19421824D29300F32A5E /* WKNSDictionary.h in Headers */,
</span><span class="cx">                                 33D3A3BB1339606200709BE4 /* WebMediaCacheManagerProxy.h in Headers */,
</span><ins>+                                0F5947A4187B3B7D00437857 /* RemoteScrollingCoordinatorTransaction.h in Headers */,
</ins><span class="cx">                                 33D3A3CB1339617900709BE4 /* WebMediaCacheManagerProxyMessages.h in Headers */,
</span><span class="cx">                                 909854ED12BC4E18000AD080 /* WebMemorySampler.h in Headers */,
</span><span class="cx">                                 BCF69FA21176D01400471A52 /* APINavigationData.h in Headers */,
</span><span class="lines">@@ -6188,6 +6241,7 @@
</span><span class="cx">                                 512F58F812A88A5400629530 /* WKAuthenticationDecisionListener.h in Headers */,
</span><span class="cx">                                 512A976A180E09B80039A149 /* DatabaseProcessProxyMessages.h in Headers */,
</span><span class="cx">                                 BC646C1B11DD399F006455B0 /* WKBackForwardListRef.h in Headers */,
</span><ins>+                                0F59479B187B3B6000437857 /* RemoteScrollingCoordinatorProxy.h in Headers */,
</ins><span class="cx">                                 37C4C0951814B9E6003688B9 /* WKBackForwardListInternal.h in Headers */,
</span><span class="cx">                                 BC646C1D11DD399F006455B0 /* WKBackForwardListItemRef.h in Headers */,
</span><span class="cx">                                 1AB474DA184D44250051B622 /* WKBundlePageResourceLoadClient.h in Headers */,
</span><span class="lines">@@ -7187,6 +7241,7 @@
</span><span class="cx">                                 BC8147AA12F64CDA007B2C32 /* InjectedBundlePagePolicyClient.cpp in Sources */,
</span><span class="cx">                                 659C551E130006410025C0C2 /* InjectedBundlePageResourceLoadClient.cpp in Sources */,
</span><span class="cx">                                 BCA8C6AF11E3C08700812FB7 /* InjectedBundlePageUIClient.cpp in Sources */,
</span><ins>+                                0F5947A3187B3B7D00437857 /* RemoteScrollingCoordinatorTransaction.cpp in Sources */,
</ins><span class="cx">                                 BC33E0D212408E8600360F3F /* InjectedBundleRangeHandle.cpp in Sources */,
</span><span class="cx">                                 BC14DF78120B5B7900826C0C /* InjectedBundleScriptWorld.cpp in Sources */,
</span><span class="cx">                                 1AE49A4A11FFA8CE0048B464 /* JSNPMethod.cpp in Sources */,
</span><span class="lines">@@ -7312,6 +7367,7 @@
</span><span class="cx">                                 1AAB0379185A7C6A00EDF501 /* MessageSender.cpp in Sources */,
</span><span class="cx">                                 1AB16ADD1648598400290D62 /* RemoteLayerTreeDrawingArea.mm in Sources */,
</span><span class="cx">                                 1AB16AE11648656D00290D62 /* RemoteLayerTreeDrawingAreaProxy.mm in Sources */,
</span><ins>+                                0F59479C187B3B6000437857 /* RemoteScrollingTree.cpp in Sources */,
</ins><span class="cx">                                 1AA3D75B1651B44F008713D0 /* RemoteLayerTreeHost.mm in Sources */,
</span><span class="cx">                                 1AF1AC6B1651759E00C17D7F /* RemoteLayerTreeTransaction.mm in Sources */,
</span><span class="cx">                                 E1B78473163F253E0007B692 /* RemoteNetworkingContext.mm in Sources */,
</span><span class="lines">@@ -7604,6 +7660,7 @@
</span><span class="cx">                                 293EBEAC1627D9C9005F89F1 /* WKDOMText.mm in Sources */,
</span><span class="cx">                                 BC017D2016263308007054F5 /* WKDOMTextIterator.mm in Sources */,
</span><span class="cx">                                 1AB7D78E1288CD9A00CFD08C /* WKDownload.cpp in Sources */,
</span><ins>+                                0F594792187B3B3A00437857 /* RemoteScrollingCoordinator.mm in Sources */,
</ins><span class="cx">                                 BC4075FB124FF0270068F20A /* WKError.cpp in Sources */,
</span><span class="cx">                                 BCFD548B132D82680055D816 /* WKErrorCF.cpp in Sources */,
</span><span class="cx">                                 BCE469591214EDF4000B98EB /* WKFormSubmissionListener.cpp in Sources */,
</span><span class="lines">@@ -7622,6 +7679,7 @@
</span><span class="cx">                                 2D8949F0182044F600E898AA /* PlatformCALayerRemoteTiledBacking.cpp in Sources */,
</span><span class="cx">                                 51032F1D180F791700961BB7 /* DatabaseToWebProcessConnectionMessageReceiver.cpp in Sources */,
</span><span class="cx">                                 BCCF6AC212C91F34008F9C35 /* WKImage.cpp in Sources */,
</span><ins>+                                0F59479A187B3B6000437857 /* RemoteScrollingCoordinatorProxy.cpp in Sources */,
</ins><span class="cx">                                 BCCF6AC912C91F59008F9C35 /* WKImageCG.cpp in Sources */,
</span><span class="cx">                                 1C8E293A12761E5B00BC7BD0 /* WKInspector.cpp in Sources */,
</span><span class="cx">                                 51A9E10A1315CD18009E7031 /* WKKeyValueStorageManager.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessScrollingRemoteScrollingCoordinatorh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.h (0 => 161373)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.h                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.h        2014-01-06 22:19:42 UTC (rev 161373)
</span><span class="lines">@@ -0,0 +1,81 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RemoteScrollingCoordinator_h
+#define RemoteScrollingCoordinator_h
+
+#include &quot;MessageReceiver.h&quot;
+#include &lt;WebCore/AsyncScrollingCoordinator.h&gt;
+#include &lt;WebCore/ScrollTypes.h&gt;
+#include &lt;WebCore/ScrollingConstraints.h&gt;
+#include &lt;WebCore/Timer.h&gt;
+#include &lt;wtf/HashMap.h&gt;
+
+namespace IPC {
+class ArgumentDecoder;
+class ArgumentEncoder;
+}
+
+namespace WebKit {
+
+class WebPage;
+class RemoteScrollingCoordinatorTransaction;
+
+class RemoteScrollingCoordinator : public WebCore::AsyncScrollingCoordinator, public IPC::MessageReceiver {
+public:
+    static PassRefPtr&lt;RemoteScrollingCoordinator&gt; create(WebPage* page)
+    {
+        return adoptRef(new RemoteScrollingCoordinator(page));
+    }
+
+    void buildTransaction(RemoteScrollingCoordinatorTransaction&amp;);
+
+private:
+    RemoteScrollingCoordinator(WebPage*);
+    virtual ~RemoteScrollingCoordinator();
+
+    virtual bool isRemoteScrollingCoordinator() const OVERRIDE { return true; }
+    
+    // ScrollingCoordinator
+    virtual void scheduleTreeStateCommit() OVERRIDE;
+
+    virtual PassOwnPtr&lt;WebCore::ScrollingTreeNode&gt; createScrollingTreeNode(WebCore::ScrollingNodeType, WebCore::ScrollingNodeID) OVERRIDE;
+    virtual bool isRubberBandInProgress() const OVERRIDE;
+    virtual void setScrollPinningBehavior(WebCore::ScrollPinningBehavior) OVERRIDE;
+
+    // IPC::MessageReceiver
+    virtual void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&amp;) OVERRIDE;
+    
+    // Respond to UI process changes.
+    void scrollPositionChangedForNode(WebCore::ScrollingNodeID, const WebCore::FloatPoint&amp; scrollPosition);
+
+    WebPage* m_webPage;
+};
+
+SCROLLING_COORDINATOR_TYPE_CASTS(RemoteScrollingCoordinator, isRemoteScrollingCoordinator());
+
+} // namespace WebKit
+
+#endif // RemoteScrollingCoordinator_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessScrollingRemoteScrollingCoordinatormessagesin"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.messages.in (0 => 161373)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.messages.in                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.messages.in        2014-01-06 22:19:42 UTC (rev 161373)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+# Copyright (C) 2014 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+messages -&gt; RemoteScrollingCoordinator {
+    ScrollPositionChangedForNode(uint64_t nodeID, WebCore::FloatPoint scrollPosition);
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessScrollingRemoteScrollingCoordinatormm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.mm (0 => 161373)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.mm                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.mm        2014-01-06 22:19:42 UTC (rev 161373)
</span><span class="lines">@@ -0,0 +1,97 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &quot;config.h&quot;
+#import &quot;RemoteScrollingCoordinator.h&quot;
+
+#import &quot;ArgumentCoders.h&quot;
+#import &quot;GraphicsLayerCARemote.h&quot;
+#import &quot;MessageDecoder.h&quot;
+#import &quot;MessageEncoder.h&quot;
+#import &quot;RemoteLayerTreeDrawingArea.h&quot;
+#import &quot;RemoteScrollingCoordinatorMessages.h&quot;
+#import &quot;RemoteScrollingCoordinatorTransaction.h&quot;
+#import &quot;WebCoreArgumentCoders.h&quot;
+#import &quot;WebPage.h&quot;
+#import &quot;WebProcess.h&quot;
+#import &lt;WebCore/GraphicsLayer.h&gt;
+#import &lt;WebCore/FrameView.h&gt;
+#import &lt;WebCore/Frame.h&gt;
+#import &lt;WebCore/RenderLayerCompositor.h&gt;
+#import &lt;WebCore/RenderView.h&gt;
+#import &lt;WebCore/ScrollingTreeFixedNode.h&gt;
+#import &lt;WebCore/ScrollingTreeStickyNode.h&gt;
+
+using namespace WebCore;
+
+namespace WebKit {
+
+RemoteScrollingCoordinator::RemoteScrollingCoordinator(WebPage* page)
+    : AsyncScrollingCoordinator(page-&gt;corePage())
+    , m_webPage(page)
+{
+    WebProcess::shared().addMessageReceiver(Messages::RemoteScrollingCoordinator::messageReceiverName(), m_webPage-&gt;pageID(), *this);
+}
+
+RemoteScrollingCoordinator::~RemoteScrollingCoordinator()
+{
+    WebProcess::shared().removeMessageReceiver(Messages::RemoteScrollingCoordinator::messageReceiverName(), m_webPage-&gt;pageID());
+}
+
+void RemoteScrollingCoordinator::scheduleTreeStateCommit()
+{
+    m_webPage-&gt;drawingArea()-&gt;scheduleCompositingLayerFlush();
+}
+
+PassOwnPtr&lt;ScrollingTreeNode&gt; RemoteScrollingCoordinator::createScrollingTreeNode(ScrollingNodeType, ScrollingNodeID)
+{
+    // We never created scrolling nodes in the WebProcess with remote scrolling.
+    ASSERT_NOT_REACHED();
+    return nullptr;
+}
+
+bool RemoteScrollingCoordinator::isRubberBandInProgress() const
+{
+    // FIXME: need to maintain state in the web process?
+    return false;
+}
+
+void RemoteScrollingCoordinator::setScrollPinningBehavior(ScrollPinningBehavior)
+{
+    // FIXME: send to the UI process.
+}
+
+void RemoteScrollingCoordinator::buildTransaction(RemoteScrollingCoordinatorTransaction&amp; transaction)
+{
+    transaction.setStateTreeToEncode(scrollingStateTree()-&gt;commit(LayerRepresentation::PlatformLayerIDRepresentation));
+}
+
+// Notification from the UI process that we scrolled.
+void RemoteScrollingCoordinator::scrollPositionChangedForNode(ScrollingNodeID nodeID, const FloatPoint&amp; scrollPosition)
+{
+    scheduleUpdateScrollPositionForNode(nodeID, roundedIntPoint(scrollPosition), false /* FIXME */, SyncScrollingLayerPosition);
+}
+
+} // namespace WebKit
</ins></span></pre>
</div>
</div>

</body>
</html>