<!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 "commits" that to update
the RemoteScrollingTree.
New classes are not hooked up to anything yet.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp: Added.
(ArgumentCoder<ScrollingStateNode>::encode):
(ArgumentCoder<ScrollingStateNode>::decode):
(ArgumentCoder<ScrollingStateScrollingNode>::encode):
(ArgumentCoder<ScrollingStateScrollingNode>::decode):
(ArgumentCoder<ScrollingStateFixedNode>::encode):
(ArgumentCoder<ScrollingStateFixedNode>::decode):
(ArgumentCoder<ScrollingStateStickyNode>::encode):
(ArgumentCoder<ScrollingStateStickyNode>::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 <simon.fraser@apple.com>
+
+ 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 <barraclough@apple.com>
</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& 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& 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&, 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&, bool programmaticScroll, SetOrSyncScrollingLayerPosition);
</span><span class="cx"> void updateMainFrameScrollPosition(const IntPoint&, 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->predicate, value.predicate)
</del><ins>+ TYPE_CASTS_BASE(ToValueTypeName, WebCore::ScrollingCoordinator, value, value->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&) = 0;
</span><span class="cx"> bool shouldHandleWheelEventSynchronously(const PlatformWheelEvent&);
</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->predicate, value.predicate)
</del><ins>+ TYPE_CASTS_BASE(ToValueTypeName, WebCore::ScrollingTree, value, value->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 <simon.fraser@apple.com>
+
+ Rename DrawingArea::supportsThreadedScrolling() to supportsAsyncScrolling()
+ https://bugs.webkit.org/show_bug.cgi?id=126529
+
+ Reviewed by Tim Horton.
+
+ Change function name from using "threaded" to "async" 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 <simon.fraser@apple.com>
+
+ 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 "commits" that to update
+ the RemoteScrollingTree.
+
+ New classes are not hooked up to anything yet.
+
+ * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp: Added.
+ (ArgumentCoder<ScrollingStateNode>::encode):
+ (ArgumentCoder<ScrollingStateNode>::decode):
+ (ArgumentCoder<ScrollingStateScrollingNode>::encode):
+ (ArgumentCoder<ScrollingStateScrollingNode>::decode):
+ (ArgumentCoder<ScrollingStateFixedNode>::encode):
+ (ArgumentCoder<ScrollingStateFixedNode>::decode):
+ (ArgumentCoder<ScrollingStateStickyNode>::encode):
+ (ArgumentCoder<ScrollingStateStickyNode>::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 <mrobinson@igalia.com>
</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 "config.h"
+#include "RemoteScrollingCoordinatorTransaction.h"
+
+#include "ArgumentCoders.h"
+#include "MessageDecoder.h"
+#include "MessageEncoder.h"
+#include "WebCoreArgumentCoders.h"
+#include <WebCore/GraphicsLayer.h>
+#include <WebCore/ScrollingStateFixedNode.h>
+#include <WebCore/ScrollingStateScrollingNode.h>
+#include <WebCore/ScrollingStateStickyNode.h>
+
+#include <wtf/HashMap.h>
+
+using namespace WebCore;
+
+namespace IPC {
+
+template<> struct ArgumentCoder<ScrollingStateNode> {
+ static void encode(ArgumentEncoder&, const ScrollingStateNode&);
+ static bool decode(ArgumentDecoder&, ScrollingStateNode&);
+};
+
+template<> struct ArgumentCoder<ScrollingStateScrollingNode> {
+ static void encode(ArgumentEncoder&, const ScrollingStateScrollingNode&);
+ static bool decode(ArgumentDecoder&, ScrollingStateScrollingNode&);
+};
+
+template<> struct ArgumentCoder<ScrollingStateFixedNode> {
+ static void encode(ArgumentEncoder&, const ScrollingStateFixedNode&);
+ static bool decode(ArgumentDecoder&, ScrollingStateFixedNode&);
+};
+
+template<> struct ArgumentCoder<ScrollingStateStickyNode> {
+ static void encode(ArgumentEncoder&, const ScrollingStateStickyNode&);
+ static bool decode(ArgumentDecoder&, ScrollingStateStickyNode&);
+};
+
+} // namespace IPC
+
+using namespace IPC;
+
+void ArgumentCoder<ScrollingStateNode>::encode(ArgumentEncoder& encoder, const ScrollingStateNode& node)
+{
+ encoder.encodeEnum(node.nodeType());
+ encoder << node.scrollingNodeID();
+ encoder << node.parentNodeID();
+ encoder << node.changedProperties();
+
+ if (node.hasChangedProperty(ScrollingStateNode::ScrollLayer))
+ encoder << static_cast<GraphicsLayer::PlatformLayerID>(node.layer());
+}
+
+bool ArgumentCoder<ScrollingStateNode>::decode(ArgumentDecoder& decoder, ScrollingStateNode& 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 << node.getter();
+
+#define SCROLLING_NODE_ENCODE_ENUM(property, getter) \
+ if (node.hasChangedProperty(ScrollingStateScrollingNode::property)) \
+ encoder.encodeEnum(node.getter());
+
+void ArgumentCoder<ScrollingStateScrollingNode>::encode(ArgumentEncoder& encoder, const ScrollingStateScrollingNode& node)
+{
+ encoder << static_cast<const ScrollingStateNode&>(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<ScrollingStateScrollingNode>::decode(ArgumentDecoder& decoder, ScrollingStateScrollingNode& node)
+{
+ if (!decoder.decode(static_cast<ScrollingStateNode&>(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<ScrollingStateFixedNode>::encode(ArgumentEncoder& encoder, const ScrollingStateFixedNode& node)
+{
+ encoder << static_cast<const ScrollingStateNode&>(node);
+
+ if (node.hasChangedProperty(ScrollingStateFixedNode::ViewportConstraints))
+ encoder << node.viewportConstraints();
+}
+
+bool ArgumentCoder<ScrollingStateFixedNode>::decode(ArgumentDecoder& decoder, ScrollingStateFixedNode& node)
+{
+ if (!decoder.decode(static_cast<ScrollingStateNode&>(node)))
+ return false;
+
+ if (node.hasChangedProperty(ScrollingStateFixedNode::ViewportConstraints)) {
+ FixedPositionViewportConstraints decodedValue;
+ if (!decoder.decode(decodedValue))
+ return false;
+ node.updateConstraints(decodedValue);
+ }
+
+ return true;
+}
+
+void ArgumentCoder<ScrollingStateStickyNode>::encode(ArgumentEncoder& encoder, const ScrollingStateStickyNode& node)
+{
+ encoder << static_cast<const ScrollingStateNode&>(node);
+
+ if (node.hasChangedProperty(ScrollingStateStickyNode::ViewportConstraints))
+ encoder << node.viewportConstraints();
+}
+
+bool ArgumentCoder<ScrollingStateStickyNode>::decode(ArgumentDecoder& decoder, ScrollingStateStickyNode& node)
+{
+ if (!decoder.decode(static_cast<ScrollingStateNode&>(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& encoder, const ScrollingStateNode& stateNode)
+{
+ switch (stateNode.nodeType()) {
+ case ScrollingNode:
+ encoder << toScrollingStateScrollingNode(stateNode);
+ break;
+ case FixedNode:
+ encoder << toScrollingStateFixedNode(stateNode);
+ break;
+ case StickyNode:
+ encoder << toScrollingStateStickyNode(stateNode);
+ break;
+ }
+
+ if (!stateNode.children())
+ return;
+
+ for (size_t i = 0; i < stateNode.children()->size(); ++i) {
+ const OwnPtr<ScrollingStateNode>& child = stateNode.children()->at(i);
+ encodeNodeAndDescendants(encoder, *child.get());
+ }
+}
+
+void RemoteScrollingCoordinatorTransaction::encode(IPC::ArgumentEncoder& encoder) const
+{
+ encoder << m_scrollingStateTree->nodeCount();
+
+ if (const ScrollingStateNode* rootNode = m_scrollingStateTree->rootStateNode())
+ encodeNodeAndDescendants(encoder, *rootNode);
+
+ encoder << m_scrollingStateTree->removedNodes();
+}
+
+bool RemoteScrollingCoordinatorTransaction::decode(IPC::ArgumentDecoder& decoder, RemoteScrollingCoordinatorTransaction& transaction)
+{
+ return transaction.decode(decoder);
+}
+
+bool RemoteScrollingCoordinatorTransaction::decode(IPC::ArgumentDecoder& decoder)
+{
+ int numNodes;
+ if (!decoder.decode(numNodes))
+ return false;
+
+ m_scrollingStateTree = ScrollingStateTree::create();
+
+ for (int i = 0; i < 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->attachNode(nodeType, nodeID, parentNodeID);
+ ScrollingStateNode* newNode = m_scrollingStateTree->stateNodeForID(nodeID);
+ ASSERT(newNode);
+ ASSERT(!parentNodeID || newNode->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<ScrollingNodeID> removedNodes;
+ if (!decoder.decode(removedNodes))
+ return false;
+
+ if (removedNodes.size())
+ m_scrollingStateTree->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 <WebCore/ScrollingStateTree.h>
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
+
+namespace IPC {
+class ArgumentDecoder;
+class ArgumentEncoder;
+}
+
+namespace WebKit {
+
+class RemoteScrollingCoordinatorTransaction {
+public:
+ void setStateTreeToEncode(PassOwnPtr<WebCore::ScrollingStateTree> stateTree) { m_scrollingStateTree = stateTree; }
+ OwnPtr<WebCore::ScrollingStateTree>& scrollingStateTree() { return m_scrollingStateTree; }
+
+ void encode(IPC::ArgumentEncoder&) const;
+ static bool decode(IPC::ArgumentDecoder&, RemoteScrollingCoordinatorTransaction&);
+
+private:
+ bool decode(IPC::ArgumentDecoder&);
+
+ OwnPtr<WebCore::ScrollingStateTree> 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 "config.h"
+#include "RemoteScrollingCoordinatorProxy.h"
+
+#include "ArgumentCoders.h"
+#include "MessageDecoder.h"
+#include "MessageEncoder.h"
+#include "RemoteLayerTreeDrawingAreaProxy.h"
+#include "RemoteScrollingCoordinator.h"
+#include "RemoteScrollingCoordinatorMessages.h"
+#include "RemoteScrollingCoordinatorTransaction.h"
+#include "RemoteScrollingTree.h"
+#include "WebPageProxy.h"
+#include "WebProcessProxy.h"
+#include <WebCore/ScrollingStateTree.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+RemoteScrollingCoordinatorProxy::RemoteScrollingCoordinatorProxy(WebPageProxy& webPageProxy)
+ : m_webPageProxy(webPageProxy)
+ , m_scrollingTree(RemoteScrollingTree::create(*this))
+{
+}
+
+RemoteScrollingCoordinatorProxy::~RemoteScrollingCoordinatorProxy()
+{
+}
+
+const RemoteLayerTreeHost* RemoteScrollingCoordinatorProxy::layerTreeHost() const
+{
+ DrawingAreaProxy* drawingArea = m_webPageProxy.drawingArea();
+ if (!drawingArea || drawingArea->type() != DrawingAreaTypeRemoteLayerTree) {
+ ASSERT_NOT_REACHED();
+ return nullptr;
+ }
+
+ RemoteLayerTreeDrawingAreaProxy* remoteDrawingArea = static_cast<RemoteLayerTreeDrawingAreaProxy*>(drawingArea);
+ return &remoteDrawingArea->remoteLayerTreeHost();
+}
+
+void RemoteScrollingCoordinatorProxy::updateScrollingTree(const RemoteScrollingCoordinatorTransaction& transaction)
+{
+ OwnPtr<ScrollingStateTree> stateTree = const_cast<RemoteScrollingCoordinatorTransaction&>(transaction).scrollingStateTree().release();
+
+ const RemoteLayerTreeHost* layerTreeHost = this->layerTreeHost();
+ if (!layerTreeHost) {
+ ASSERT_NOT_REACHED();
+ return;
+ }
+
+ connectStateNodeLayers(*stateTree, *layerTreeHost);
+ m_scrollingTree->commitNewTreeState(stateTree.release());
+}
+
+void RemoteScrollingCoordinatorProxy::connectStateNodeLayers(ScrollingStateTree& stateTree, const RemoteLayerTreeHost& layerTreeHost)
+{
+ for (auto it : stateTree.nodeMap()) {
+ ScrollingStateNode* currNode = it.value;
+ switch (currNode->nodeType()) {
+ case ScrollingNode: {
+ ScrollingStateScrollingNode* scrollingStateNode = toScrollingStateScrollingNode(currNode);
+
+ if (scrollingStateNode->hasChangedProperty(ScrollingStateNode::ScrollLayer))
+ scrollingStateNode->setLayer(layerTreeHost.getLayer(scrollingStateNode->layer()));
+
+ if (scrollingStateNode->hasChangedProperty(ScrollingStateScrollingNode::CounterScrollingLayer))
+ scrollingStateNode->setCounterScrollingLayer(layerTreeHost.getLayer(scrollingStateNode->counterScrollingLayer()));
+
+ // FIXME: we should never have header and footer layers coming from the WebProcess.
+ if (scrollingStateNode->hasChangedProperty(ScrollingStateScrollingNode::HeaderLayer))
+ scrollingStateNode->setHeaderLayer(layerTreeHost.getLayer(scrollingStateNode->headerLayer()));
+
+ if (scrollingStateNode->hasChangedProperty(ScrollingStateScrollingNode::FooterLayer))
+ scrollingStateNode->setFooterLayer(layerTreeHost.getLayer(scrollingStateNode->footerLayer()));
+ break;
+ }
+ case FixedNode:
+ if (currNode->hasChangedProperty(ScrollingStateNode::ScrollLayer))
+ currNode->setLayer(layerTreeHost.getLayer(currNode->layer()));
+ break;
+ case StickyNode:
+ if (currNode->hasChangedProperty(ScrollingStateNode::ScrollLayer))
+ currNode->setLayer(layerTreeHost.getLayer(currNode->layer()));
+ break;
+ }
+ }
+}
+
+bool RemoteScrollingCoordinatorProxy::handleWheelEvent(const PlatformWheelEvent& event)
+{
+ ScrollingTree::EventResult result = m_scrollingTree->tryToHandleWheelEvent(event);
+ return result == ScrollingTree::DidHandleEvent; // FIXME: handle other values.
+}
+
+void RemoteScrollingCoordinatorProxy::scrollPositionChanged(WebCore::ScrollingNodeID scrolledNodeID, const WebCore::FloatPoint& 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 "MessageReceiver.h"
+#include "RemoteScrollingCoordinator.h"
+#include <wtf/Noncopyable.h>
+#include <wtf/RefPtr.h>
+
+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&);
+ virtual ~RemoteScrollingCoordinatorProxy();
+
+ // Inform the web process that the scroll position changed.
+ void scrollPositionChanged(WebCore::ScrollingNodeID, const WebCore::FloatPoint& newScrollPosition);
+
+ // FIXME: expose the tree and pass this to that?
+ bool handleWheelEvent(const WebCore::PlatformWheelEvent&);
+
+ WebCore::ScrollingNodeID rootScrollingNodeID() const;
+
+ const RemoteLayerTreeHost* layerTreeHost() const;
+
+ void updateScrollingTree(const RemoteScrollingCoordinatorTransaction&);
+
+private:
+ void connectStateNodeLayers(WebCore::ScrollingStateTree&, const RemoteLayerTreeHost&);
+
+ WebPageProxy& m_webPageProxy;
+ RefPtr<RemoteScrollingTree> 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 "config.h"
+#include "RemoteScrollingTree.h"
+
+#include "RemoteLayerTreeHost.h"
+#include "RemoteScrollingCoordinatorProxy.h"
+#include <WebCore/ScrollingTreeFixedNode.h>
+#include <WebCore/ScrollingTreeScrollingNodeMac.h>
+#include <WebCore/ScrollingTreeStickyNode.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+RefPtr<RemoteScrollingTree> RemoteScrollingTree::create(RemoteScrollingCoordinatorProxy& scrollingCoordinator)
+{
+ return adoptRef(new RemoteScrollingTree(scrollingCoordinator));
+}
+
+RemoteScrollingTree::RemoteScrollingTree(RemoteScrollingCoordinatorProxy& scrollingCoordinator)
+ : m_scrollingCoordinatorProxy(scrollingCoordinator)
+{
+}
+
+RemoteScrollingTree::~RemoteScrollingTree()
+{
+}
+
+ScrollingTree::EventResult RemoteScrollingTree::tryToHandleWheelEvent(const PlatformWheelEvent& 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& scrollPosition, SetOrSyncScrollingLayerPosition)
+{
+ // FIXME: fix for all scrolling nodes.
+ m_scrollingCoordinatorProxy.scrollPositionChanged(rootNode()->scrollingNodeID(), scrollPosition);
+}
+
+PassOwnPtr<ScrollingTreeNode> 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 "RemoteScrollingCoordinator.h"
+#include <WebCore/ScrollElasticityController.h>
+#include <WebCore/ScrollingConstraints.h>
+#include <WebCore/ScrollingTree.h>
+
+namespace WebKit {
+
+class RemoteScrollingCoordinatorProxy;
+
+class RemoteScrollingTree : public WebCore::ScrollingTree {
+public:
+ static RefPtr<RemoteScrollingTree> create(RemoteScrollingCoordinatorProxy&);
+ virtual ~RemoteScrollingTree();
+
+ virtual bool isRemoteScrollingTree() const OVERRIDE { return true; }
+ virtual EventResult tryToHandleWheelEvent(const WebCore::PlatformWheelEvent&) OVERRIDE;
+
+ const RemoteScrollingCoordinatorProxy& scrollingCoordinatorProxy() const { return m_scrollingCoordinatorProxy; }
+
+private:
+ explicit RemoteScrollingTree(RemoteScrollingCoordinatorProxy&);
+
+#if PLATFORM(MAC)
+ virtual void handleWheelEventPhase(WebCore::PlatformWheelEventPhase) OVERRIDE;
+#endif
+ virtual void updateMainFrameScrollPosition(const WebCore::IntPoint& scrollPosition, WebCore::SetOrSyncScrollingLayerPosition = WebCore::SyncScrollingLayerPosition) OVERRIDE;
+
+ virtual PassOwnPtr<WebCore::ScrollingTreeNode> createNode(WebCore::ScrollingNodeType, WebCore::ScrollingNodeID);
+
+ RemoteScrollingCoordinatorProxy& 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&) 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 = "<group>"; };
</span><span class="cx">                 0F174AA2142A4CB60039250F /* APIGeometry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIGeometry.h; sourceTree = "<group>"; };
</span><span class="cx">                 0F174AA6142AAC610039250F /* WKGeometry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKGeometry.cpp; sourceTree = "<group>"; };
</span><ins>+                0F59478D187B3B3A00437857 /* RemoteScrollingCoordinator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RemoteScrollingCoordinator.h; path = Scrolling/RemoteScrollingCoordinator.h; sourceTree = "<group>"; };
+                0F59478E187B3B3A00437857 /* RemoteScrollingCoordinator.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = RemoteScrollingCoordinator.messages.in; path = Scrolling/RemoteScrollingCoordinator.messages.in; sourceTree = "<group>"; };
+                0F59478F187B3B3A00437857 /* RemoteScrollingCoordinator.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RemoteScrollingCoordinator.mm; path = Scrolling/RemoteScrollingCoordinator.mm; sourceTree = "<group>"; };
+                0F594794187B3B6000437857 /* RemoteScrollingCoordinatorProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RemoteScrollingCoordinatorProxy.cpp; path = Scrolling/RemoteScrollingCoordinatorProxy.cpp; sourceTree = "<group>"; };
+                0F594795187B3B6000437857 /* RemoteScrollingCoordinatorProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RemoteScrollingCoordinatorProxy.h; path = Scrolling/RemoteScrollingCoordinatorProxy.h; sourceTree = "<group>"; };
+                0F594796187B3B6000437857 /* RemoteScrollingTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RemoteScrollingTree.cpp; path = Scrolling/RemoteScrollingTree.cpp; sourceTree = "<group>"; };
+                0F594797187B3B6000437857 /* RemoteScrollingTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RemoteScrollingTree.h; path = Scrolling/RemoteScrollingTree.h; sourceTree = "<group>"; };
+                0F5947A1187B3B7D00437857 /* RemoteScrollingCoordinatorTransaction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RemoteScrollingCoordinatorTransaction.cpp; path = Scrolling/RemoteScrollingCoordinatorTransaction.cpp; sourceTree = "<group>"; };
+                0F5947A2187B3B7D00437857 /* RemoteScrollingCoordinatorTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RemoteScrollingCoordinatorTransaction.h; path = Scrolling/RemoteScrollingCoordinatorTransaction.h; sourceTree = "<group>"; };
</ins><span class="cx">                 0FB659221208B4DB0044816C /* DrawingAreaInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingAreaInfo.h; sourceTree = "<group>"; };
</span><span class="cx">                 0FF24A2B1879E4BC003ABF0C /* RemoteLayerTreeDrawingAreaProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteLayerTreeDrawingAreaProxyMessageReceiver.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 0FF24A2C1879E4BC003ABF0C /* RemoteLayerTreeDrawingAreaProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteLayerTreeDrawingAreaProxyMessages.h; sourceTree = "<group>"; };
</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 = "<group>";
+                };
+                0F594793187B3B4C00437857 /* Scrolling */ = {
+                        isa = PBXGroup;
+                        children = (
+                                0F594794187B3B6000437857 /* RemoteScrollingCoordinatorProxy.cpp */,
+                                0F594795187B3B6000437857 /* RemoteScrollingCoordinatorProxy.h */,
+                                0F594796187B3B6000437857 /* RemoteScrollingTree.cpp */,
+                                0F594797187B3B6000437857 /* RemoteScrollingTree.h */,
+                        );
+                        name = Scrolling;
+                        sourceTree = "<group>";
+                };
+                0F5947A0187B3B7100437857 /* Scrolling */ = {
+                        isa = PBXGroup;
+                        children = (
+                                0F5947A1187B3B7D00437857 /* RemoteScrollingCoordinatorTransaction.cpp */,
+                                0F5947A2187B3B7D00437857 /* RemoteScrollingCoordinatorTransaction.h */,
+                        );
+                        name = Scrolling;
+                        sourceTree = "<group>";
+                };
</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 "MessageReceiver.h"
+#include <WebCore/AsyncScrollingCoordinator.h>
+#include <WebCore/ScrollTypes.h>
+#include <WebCore/ScrollingConstraints.h>
+#include <WebCore/Timer.h>
+#include <wtf/HashMap.h>
+
+namespace IPC {
+class ArgumentDecoder;
+class ArgumentEncoder;
+}
+
+namespace WebKit {
+
+class WebPage;
+class RemoteScrollingCoordinatorTransaction;
+
+class RemoteScrollingCoordinator : public WebCore::AsyncScrollingCoordinator, public IPC::MessageReceiver {
+public:
+ static PassRefPtr<RemoteScrollingCoordinator> create(WebPage* page)
+ {
+ return adoptRef(new RemoteScrollingCoordinator(page));
+ }
+
+ void buildTransaction(RemoteScrollingCoordinatorTransaction&);
+
+private:
+ RemoteScrollingCoordinator(WebPage*);
+ virtual ~RemoteScrollingCoordinator();
+
+ virtual bool isRemoteScrollingCoordinator() const OVERRIDE { return true; }
+
+ // ScrollingCoordinator
+ virtual void scheduleTreeStateCommit() OVERRIDE;
+
+ virtual PassOwnPtr<WebCore::ScrollingTreeNode> 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&) OVERRIDE;
+
+ // Respond to UI process changes.
+ void scrollPositionChangedForNode(WebCore::ScrollingNodeID, const WebCore::FloatPoint& 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 -> 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 "config.h"
+#import "RemoteScrollingCoordinator.h"
+
+#import "ArgumentCoders.h"
+#import "GraphicsLayerCARemote.h"
+#import "MessageDecoder.h"
+#import "MessageEncoder.h"
+#import "RemoteLayerTreeDrawingArea.h"
+#import "RemoteScrollingCoordinatorMessages.h"
+#import "RemoteScrollingCoordinatorTransaction.h"
+#import "WebCoreArgumentCoders.h"
+#import "WebPage.h"
+#import "WebProcess.h"
+#import <WebCore/GraphicsLayer.h>
+#import <WebCore/FrameView.h>
+#import <WebCore/Frame.h>
+#import <WebCore/RenderLayerCompositor.h>
+#import <WebCore/RenderView.h>
+#import <WebCore/ScrollingTreeFixedNode.h>
+#import <WebCore/ScrollingTreeStickyNode.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+RemoteScrollingCoordinator::RemoteScrollingCoordinator(WebPage* page)
+ : AsyncScrollingCoordinator(page->corePage())
+ , m_webPage(page)
+{
+ WebProcess::shared().addMessageReceiver(Messages::RemoteScrollingCoordinator::messageReceiverName(), m_webPage->pageID(), *this);
+}
+
+RemoteScrollingCoordinator::~RemoteScrollingCoordinator()
+{
+ WebProcess::shared().removeMessageReceiver(Messages::RemoteScrollingCoordinator::messageReceiverName(), m_webPage->pageID());
+}
+
+void RemoteScrollingCoordinator::scheduleTreeStateCommit()
+{
+ m_webPage->drawingArea()->scheduleCompositingLayerFlush();
+}
+
+PassOwnPtr<ScrollingTreeNode> 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& transaction)
+{
+ transaction.setStateTreeToEncode(scrollingStateTree()->commit(LayerRepresentation::PlatformLayerIDRepresentation));
+}
+
+// Notification from the UI process that we scrolled.
+void RemoteScrollingCoordinator::scrollPositionChangedForNode(ScrollingNodeID nodeID, const FloatPoint& scrollPosition)
+{
+ scheduleUpdateScrollPositionForNode(nodeID, roundedIntPoint(scrollPosition), false /* FIXME */, SyncScrollingLayerPosition);
+}
+
+} // namespace WebKit
</ins></span></pre>
</div>
</div>
</body>
</html>