<!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>[161610] 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/161610">161610</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2014-01-09 17:38:46 -0800 (Thu, 09 Jan 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Enable async scrolling for iOS
https://bugs.webkit.org/show_bug.cgi?id=126730
Source/WebCore:
Reviewed by Tim Horton.
Turn on ENABLE_ASYNC_SCROLLING for iOS.
Disable rubber-banding and scrollbar-related Mac code for PLATFORM(IOS),
provide stubs for scrolling nodes and scrolling state nodes, and an
iOS scrolling tree, and scrolling coordinator.
Move crollingCoordinator::create() into the platform implementation file.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::create):
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setScrollbarPaintersFromScrollbars):
* page/scrolling/ScrollingStateScrollingNode.h:
* page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::isScrollingTreeIOS):
* page/scrolling/ThreadedScrollingTree.h:
* page/scrolling/ios/ScrollingCoordinatorIOS.h: Copied from Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h.
* page/scrolling/ios/ScrollingCoordinatorIOS.mm: Copied from Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm.
(WebCore::ScrollingCoordinator::create):
(WebCore::ScrollingCoordinatorIOS::ScrollingCoordinatorIOS):
(WebCore::ScrollingCoordinatorIOS::~ScrollingCoordinatorIOS):
(WebCore::ScrollingCoordinatorIOS::pageDestroyed):
(WebCore::ScrollingCoordinatorIOS::commitTreeStateIfNeeded):
(WebCore::ScrollingCoordinatorIOS::scheduleTreeStateCommit):
(WebCore::ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired):
(WebCore::ScrollingCoordinatorIOS::commitTreeState):
(WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode):
* page/scrolling/ios/ScrollingTreeIOS.cpp: Added.
(WebCore::ScrollingTreeIOS::create):
(WebCore::ScrollingTreeIOS::ScrollingTreeIOS):
(WebCore::ScrollingTreeIOS::~ScrollingTreeIOS):
(WebCore::derefScrollingCoordinator):
(WebCore::ScrollingTreeIOS::invalidate):
(WebCore::ScrollingTreeIOS::commitNewTreeState):
(WebCore::ScrollingTreeIOS::updateMainFrameScrollPosition):
(WebCore::ScrollingTreeIOS::createNode):
* page/scrolling/ios/ScrollingTreeIOS.h: Copied from Source/WebCore/page/scrolling/ThreadedScrollingTree.h.
* page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h: Added.
* page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm: Added.
(WebCore::ScrollingTreeScrollingNodeIOS::create):
(WebCore::ScrollingTreeScrollingNodeIOS::ScrollingTreeScrollingNodeIOS):
(WebCore::ScrollingTreeScrollingNodeIOS::~ScrollingTreeScrollingNodeIOS):
(WebCore::ScrollingTreeScrollingNodeIOS::updateBeforeChildren):
(WebCore::ScrollingTreeScrollingNodeIOS::updateAfterChildren):
(WebCore::ScrollingTreeScrollingNodeIOS::scrollPosition):
(WebCore::ScrollingTreeScrollingNodeIOS::setScrollPosition):
(WebCore::ScrollingTreeScrollingNodeIOS::setScrollPositionWithoutContentEdgeConstraints):
(WebCore::ScrollingTreeScrollingNodeIOS::setScrollLayerPosition):
(WebCore::ScrollingTreeScrollingNodeIOS::minimumScrollPosition):
(WebCore::ScrollingTreeScrollingNodeIOS::maximumScrollPosition):
(WebCore::ScrollingTreeScrollingNodeIOS::scrollBy):
(WebCore::ScrollingTreeScrollingNodeIOS::scrollByWithoutContentEdgeConstraints):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinator::create):
* page/scrolling/mac/ScrollingTreeFixedNode.mm:
* page/scrolling/mac/ScrollingTreeStickyNode.mm:
Source/WebKit2:
Reviewed by Tim Horton.
Turn on ENABLE_ASYNC_SCROLLING for iOS.
On iOS, create ScrollingTreeScrollingNodeIOS nodes.
* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::createNode):
* UIProcess/Scrolling/RemoteScrollingTree.h:
Source/WTF:
Reviewed by Tim Horton.
Turn on ENABLE_ASYNC_SCROLLING for iOS.
* wtf/FeatureDefines.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfFeatureDefinesh">trunk/Source/WTF/wtf/FeatureDefines.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreConfigurationsWebCorexcconfig">trunk/Source/WebCore/Configurations/WebCore.xcconfig</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="#trunkSourceWebCorepagescrollingScrollingStateScrollingNodecpp">trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingStateScrollingNodeh">trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingTreeh">trunk/Source/WebCore/page/scrolling/ScrollingTree.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingThreadedScrollingTreeh">trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingmacScrollingCoordinatorMacmm">trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm</a></li>
<li><a href="#trunkSourceWebCorepagescrollingmacScrollingTreeFixedNodemm">trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.mm</a></li>
<li><a href="#trunkSourceWebCorepagescrollingmacScrollingTreeStickyNodemm">trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</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>
</ul>
<h3>Added Paths</h3>
<ul>
<li>trunk/Source/WebCore/page/scrolling/ios/</li>
<li><a href="#trunkSourceWebCorepagescrollingiosScrollingCoordinatorIOSh">trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingiosScrollingCoordinatorIOSmm">trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.mm</a></li>
<li><a href="#trunkSourceWebCorepagescrollingiosScrollingTreeIOScpp">trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingiosScrollingTreeIOSh">trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingiosScrollingTreeScrollingNodeIOSh">trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingiosScrollingTreeScrollingNodeIOSmm">trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (161609 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2014-01-10 01:34:24 UTC (rev 161609)
+++ trunk/Source/WTF/ChangeLog        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2014-01-09 Simon Fraser <simon.fraser@apple.com>
+
+ Enable async scrolling for iOS
+ https://bugs.webkit.org/show_bug.cgi?id=126730
+
+ Reviewed by Tim Horton.
+
+ Turn on ENABLE_ASYNC_SCROLLING for iOS.
+
+ * wtf/FeatureDefines.h:
+
</ins><span class="cx"> 2014-01-09 Anders Carlsson <andersca@apple.com>
</span><span class="cx">
</span><span class="cx"> Remove Blackberry and QNX bits from WTF
</span></span></pre></div>
<a id="trunkSourceWTFwtfFeatureDefinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/FeatureDefines.h (161609 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/FeatureDefines.h        2014-01-10 01:34:24 UTC (rev 161609)
+++ trunk/Source/WTF/wtf/FeatureDefines.h        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -56,6 +56,10 @@
</span><span class="cx"> /* PLATFORM(MAC) is always enabled when PLATFORM(IOS) is enabled. */
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">
</span><ins>+#if !defined(ENABLE_ASYNC_SCROLLING)
+#define ENABLE_ASYNC_SCROLLING 1
+#endif
+
</ins><span class="cx"> #if !defined(ENABLE_8BIT_TEXTRUN)
</span><span class="cx"> #define ENABLE_8BIT_TEXTRUN 1
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (161609 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-10 01:34:24 UTC (rev 161609)
+++ trunk/Source/WebCore/ChangeLog        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -1,3 +1,68 @@
</span><ins>+2014-01-09 Simon Fraser <simon.fraser@apple.com>
+
+ Enable async scrolling for iOS
+ https://bugs.webkit.org/show_bug.cgi?id=126730
+
+ Reviewed by Tim Horton.
+
+ Turn on ENABLE_ASYNC_SCROLLING for iOS.
+
+ Disable rubber-banding and scrollbar-related Mac code for PLATFORM(IOS),
+ provide stubs for scrolling nodes and scrolling state nodes, and an
+ iOS scrolling tree, and scrolling coordinator.
+
+ Move crollingCoordinator::create() into the platform implementation file.
+
+ * page/scrolling/ScrollingCoordinator.cpp:
+ (WebCore::ScrollingCoordinator::create):
+ * page/scrolling/ScrollingStateScrollingNode.cpp:
+ (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
+ (WebCore::ScrollingStateScrollingNode::setScrollbarPaintersFromScrollbars):
+ * page/scrolling/ScrollingStateScrollingNode.h:
+ * page/scrolling/ScrollingTree.h:
+ (WebCore::ScrollingTree::isScrollingTreeIOS):
+ * page/scrolling/ThreadedScrollingTree.h:
+ * page/scrolling/ios/ScrollingCoordinatorIOS.h: Copied from Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h.
+ * page/scrolling/ios/ScrollingCoordinatorIOS.mm: Copied from Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm.
+ (WebCore::ScrollingCoordinator::create):
+ (WebCore::ScrollingCoordinatorIOS::ScrollingCoordinatorIOS):
+ (WebCore::ScrollingCoordinatorIOS::~ScrollingCoordinatorIOS):
+ (WebCore::ScrollingCoordinatorIOS::pageDestroyed):
+ (WebCore::ScrollingCoordinatorIOS::commitTreeStateIfNeeded):
+ (WebCore::ScrollingCoordinatorIOS::scheduleTreeStateCommit):
+ (WebCore::ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired):
+ (WebCore::ScrollingCoordinatorIOS::commitTreeState):
+ (WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode):
+ * page/scrolling/ios/ScrollingTreeIOS.cpp: Added.
+ (WebCore::ScrollingTreeIOS::create):
+ (WebCore::ScrollingTreeIOS::ScrollingTreeIOS):
+ (WebCore::ScrollingTreeIOS::~ScrollingTreeIOS):
+ (WebCore::derefScrollingCoordinator):
+ (WebCore::ScrollingTreeIOS::invalidate):
+ (WebCore::ScrollingTreeIOS::commitNewTreeState):
+ (WebCore::ScrollingTreeIOS::updateMainFrameScrollPosition):
+ (WebCore::ScrollingTreeIOS::createNode):
+ * page/scrolling/ios/ScrollingTreeIOS.h: Copied from Source/WebCore/page/scrolling/ThreadedScrollingTree.h.
+ * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h: Added.
+ * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm: Added.
+ (WebCore::ScrollingTreeScrollingNodeIOS::create):
+ (WebCore::ScrollingTreeScrollingNodeIOS::ScrollingTreeScrollingNodeIOS):
+ (WebCore::ScrollingTreeScrollingNodeIOS::~ScrollingTreeScrollingNodeIOS):
+ (WebCore::ScrollingTreeScrollingNodeIOS::updateBeforeChildren):
+ (WebCore::ScrollingTreeScrollingNodeIOS::updateAfterChildren):
+ (WebCore::ScrollingTreeScrollingNodeIOS::scrollPosition):
+ (WebCore::ScrollingTreeScrollingNodeIOS::setScrollPosition):
+ (WebCore::ScrollingTreeScrollingNodeIOS::setScrollPositionWithoutContentEdgeConstraints):
+ (WebCore::ScrollingTreeScrollingNodeIOS::setScrollLayerPosition):
+ (WebCore::ScrollingTreeScrollingNodeIOS::minimumScrollPosition):
+ (WebCore::ScrollingTreeScrollingNodeIOS::maximumScrollPosition):
+ (WebCore::ScrollingTreeScrollingNodeIOS::scrollBy):
+ (WebCore::ScrollingTreeScrollingNodeIOS::scrollByWithoutContentEdgeConstraints):
+ * page/scrolling/mac/ScrollingCoordinatorMac.mm:
+ (WebCore::ScrollingCoordinator::create):
+ * page/scrolling/mac/ScrollingTreeFixedNode.mm:
+ * page/scrolling/mac/ScrollingTreeStickyNode.mm:
+
</ins><span class="cx"> 2014-01-09 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> text-decoration-skip: ink does not work with line wraps
</span></span></pre></div>
<a id="trunkSourceWebCoreConfigurationsWebCorexcconfig"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Configurations/WebCore.xcconfig (161609 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Configurations/WebCore.xcconfig        2014-01-10 01:34:24 UTC (rev 161609)
+++ trunk/Source/WebCore/Configurations/WebCore.xcconfig        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -106,6 +106,6 @@
</span><span class="cx"> JAVASCRIPTCORE_PRIVATE_HEADERS_engineering = $(BUILT_PRODUCTS_DIR)/JavaScriptCore.framework/PrivateHeaders;
</span><span class="cx">
</span><span class="cx"> EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(PLATFORM_NAME));
</span><del>-EXCLUDED_SOURCE_FILE_NAMES_iphoneos = *.tiff *Cursor.png Cursor.cpp CursorMac.mm EventHandlerMac.mm HTMLConverter.mm KillRingMac.mm PlatformEventFactoryMac.mm SSLKeyGeneratorMac.cpp SearchPopupMenuMac.mm SharedTimerMac.mm WebVideoFullscreenController.mm WebVideoFullscreenHUDWindowController.mm WebWindowAnimation.mm;
</del><ins>+EXCLUDED_SOURCE_FILE_NAMES_iphoneos = *.tiff *Cursor.png Cursor.cpp CursorMac.mm EventHandlerMac.mm HTMLConverter.mm KillRingMac.mm PlatformEventFactoryMac.mm SSLKeyGeneratorMac.cpp SearchPopupMenuMac.mm ScrollingCoordinatorMac.mm ScrollingStateScrollingNodeMac.mm ScrollingTreeScrollingNodeMac.mm SharedTimerMac.mm WebVideoFullscreenController.mm WebVideoFullscreenHUDWindowController.mm WebWindowAnimation.mm;
</ins><span class="cx"> EXCLUDED_SOURCE_FILE_NAMES_iphonesimulator = $(EXCLUDED_SOURCE_FILE_NAMES_iphoneos);
</span><span class="cx"> EXCLUDED_SOURCE_FILE_NAMES_macosx = *IOS.h *IOS.cpp *IOS.mm KillRingNone.cpp WAKAppKitStubs.h WAKClipView.h WAKResponder.h WAKScrollView.h WAKView.h WAKViewPrivate.h WAKWindow.h WKContentObservation.h WKGraphics.h WKTypes.h WKUtilities.h WKView.h WKViewPrivate.h WebCoreThread.h WebCoreThreadMessage.h WebCoreThreadRun.h WebCoreThreadSystemInterface.h;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (161609 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-01-10 01:34:24 UTC (rev 161609)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -489,6 +489,12 @@
</span><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><span class="cx">                 0FB8890F167D30160010CDA5 /* ScrollingStateStickyNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB8890D167D30160010CDA5 /* ScrollingStateStickyNode.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                0FC4E40D187F82E10045882C /* ScrollingCoordinatorIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC4E407187F82E10045882C /* ScrollingCoordinatorIOS.h */; };
+                0FC4E40E187F82E10045882C /* ScrollingCoordinatorIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FC4E408187F82E10045882C /* ScrollingCoordinatorIOS.mm */; };
+                0FC4E40F187F82E10045882C /* ScrollingTreeIOS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC4E409187F82E10045882C /* ScrollingTreeIOS.cpp */; };
+                0FC4E410187F82E10045882C /* ScrollingTreeIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC4E40A187F82E10045882C /* ScrollingTreeIOS.h */; };
+                0FC4E411187F82E10045882C /* ScrollingTreeScrollingNodeIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC4E40B187F82E10045882C /* ScrollingTreeScrollingNodeIOS.h */; };
+                0FC4E412187F82E10045882C /* ScrollingTreeScrollingNodeIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FC4E40C187F82E10045882C /* ScrollingTreeScrollingNodeIOS.mm */; };
</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">@@ -7217,6 +7223,12 @@
</span><span class="cx">                 0FB88909167D2FA10010CDA5 /* ScrollingTreeStickyNode.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollingTreeStickyNode.mm; sourceTree = "<group>"; };
</span><span class="cx">                 0FB8890C167D30160010CDA5 /* ScrollingStateStickyNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollingStateStickyNode.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 0FB8890D167D30160010CDA5 /* ScrollingStateStickyNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingStateStickyNode.h; sourceTree = "<group>"; };
</span><ins>+                0FC4E407187F82E10045882C /* ScrollingCoordinatorIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScrollingCoordinatorIOS.h; path = ios/ScrollingCoordinatorIOS.h; sourceTree = "<group>"; };
+                0FC4E408187F82E10045882C /* ScrollingCoordinatorIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ScrollingCoordinatorIOS.mm; path = ios/ScrollingCoordinatorIOS.mm; sourceTree = "<group>"; };
+                0FC4E409187F82E10045882C /* ScrollingTreeIOS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScrollingTreeIOS.cpp; path = ios/ScrollingTreeIOS.cpp; sourceTree = "<group>"; };
+                0FC4E40A187F82E10045882C /* ScrollingTreeIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScrollingTreeIOS.h; path = ios/ScrollingTreeIOS.h; sourceTree = "<group>"; };
+                0FC4E40B187F82E10045882C /* ScrollingTreeScrollingNodeIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScrollingTreeScrollingNodeIOS.h; path = ios/ScrollingTreeScrollingNodeIOS.h; sourceTree = "<group>"; };
+                0FC4E40C187F82E10045882C /* ScrollingTreeScrollingNodeIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ScrollingTreeScrollingNodeIOS.mm; path = ios/ScrollingTreeScrollingNodeIOS.mm; sourceTree = "<group>"; };
</ins><span class="cx">                 0FCF33230F2B9715004B6795 /* ColorCG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ColorCG.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 0FCF332A0F2B9A25004B6795 /* WebLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebLayer.mm; sourceTree = "<group>"; };
</span><span class="cx">                 0FCF332B0F2B9A25004B6795 /* WebLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebLayer.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -14440,6 +14452,19 @@
</span><span class="cx">                         tabWidth = 4;
</span><span class="cx">                         usesTabs = 0;
</span><span class="cx">                 };
</span><ins>+                0FC4E406187F82D30045882C /* ios */ = {
+                        isa = PBXGroup;
+                        children = (
+                                0FC4E407187F82E10045882C /* ScrollingCoordinatorIOS.h */,
+                                0FC4E408187F82E10045882C /* ScrollingCoordinatorIOS.mm */,
+                                0FC4E409187F82E10045882C /* ScrollingTreeIOS.cpp */,
+                                0FC4E40A187F82E10045882C /* ScrollingTreeIOS.h */,
+                                0FC4E40B187F82E10045882C /* ScrollingTreeScrollingNodeIOS.h */,
+                                0FC4E40C187F82E10045882C /* ScrollingTreeScrollingNodeIOS.mm */,
+                        );
+                        name = ios;
+                        sourceTree = "<group>";
+                };
</ins><span class="cx">                 14DFB33F0A7DF7630018F769 /* Derived Sources */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="lines">@@ -14664,6 +14689,7 @@
</span><span class="cx">                 1AF62EE114DA22A70041556C /* scrolling */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                0FC4E406187F82D30045882C /* ios */,
</ins><span class="cx">                                 0FFD4D5E18651FA300512F6E /* AsyncScrollingCoordinator.cpp */,
</span><span class="cx">                                 0FFD4D5F18651FA300512F6E /* AsyncScrollingCoordinator.h */,
</span><span class="cx">                                 1AF62EE214DA22A70041556C /* mac */,
</span><span class="lines">@@ -23727,6 +23753,7 @@
</span><span class="cx">                                 A8EA7D2D0A19385500A8EF5F /* HTMLImageElement.h in Headers */,
</span><span class="cx">                                 A8EA7D2B0A19385500A8EF5F /* HTMLImageLoader.h in Headers */,
</span><span class="cx">                                 A81369CC097374F600D74463 /* HTMLInputElement.h in Headers */,
</span><ins>+                                0FC4E410187F82E10045882C /* ScrollingTreeIOS.h in Headers */,
</ins><span class="cx">                                 97BC849B12370A4B000C6161 /* HTMLInputStream.h in Headers */,
</span><span class="cx">                                 93309DE6099E64920056E581 /* HTMLInterchange.h in Headers */,
</span><span class="cx">                                 A81369E4097374F600D74463 /* HTMLKeygenElement.h in Headers */,
</span><span class="lines">@@ -23739,6 +23766,7 @@
</span><span class="cx">                                 E44613A50CD6331000FADA75 /* HTMLMediaElement.h in Headers */,
</span><span class="cx">                                 A8EA79F40A1916DF00A8EF5F /* HTMLMenuElement.h in Headers */,
</span><span class="cx">                                 2BE8E2C712A589EC00FAD550 /* HTMLMetaCharsetParser.h in Headers */,
</span><ins>+                                0FC4E40D187F82E10045882C /* ScrollingCoordinatorIOS.h in Headers */,
</ins><span class="cx">                                 A871DC240A15205700B12A68 /* HTMLMetaElement.h in Headers */,
</span><span class="cx">                                 A454424B119B3661009BE912 /* HTMLMeterElement.h in Headers */,
</span><span class="cx">                                 A8CFF7A70A156978000A4234 /* HTMLModElement.h in Headers */,
</span><span class="lines">@@ -25670,6 +25698,7 @@
</span><span class="cx">                                 E4C91A0E1802343100A17F6D /* TextPaintStyle.h in Headers */,
</span><span class="cx">                                 BEF29EEC1715DD0900C4B4C9 /* VideoTrackPrivate.h in Headers */,
</span><span class="cx">                                 0705851B17FB44B4005F2BCB /* JSAllAudioCapabilities.h in Headers */,
</span><ins>+                                0FC4E411187F82E10045882C /* ScrollingTreeScrollingNodeIOS.h in Headers */,
</ins><span class="cx">                                 CEF418CF1179678C009D112C /* ViewportArguments.h in Headers */,
</span><span class="cx">                                 3FFFF9AE159D9B060020BBD5 /* ViewportStyleResolver.h in Headers */,
</span><span class="cx">                                 93309E20099E64920056E581 /* VisiblePosition.h in Headers */,
</span><span class="lines">@@ -27200,6 +27229,7 @@
</span><span class="cx">                                 41F062150F5F192600A07EAC /* InspectorDatabaseResource.cpp in Sources */,
</span><span class="cx">                                 F33F053D120B0DA500E5743A /* InspectorDebuggerAgent.cpp in Sources */,
</span><span class="cx">                                 7A24587B1021EAF4000A00AA /* InspectorDOMAgent.cpp in Sources */,
</span><ins>+                                0FC4E40F187F82E10045882C /* ScrollingTreeIOS.cpp in Sources */,
</ins><span class="cx">                                 F3D4C47812E07663003DA150 /* InspectorDOMDebuggerAgent.cpp in Sources */,
</span><span class="cx">                                 7A74ECBA101839A600BF939E /* InspectorDOMStorageAgent.cpp in Sources */,
</span><span class="cx">                                 4F4F5FFB11CBD2E100A186BF /* InspectorWebFrontendDispatchers.cpp in Sources */,
</span><span class="lines">@@ -28220,6 +28250,7 @@
</span><span class="cx">                                 0F580CFE0F12DE9B0051D689 /* RenderLayerCompositor.cpp in Sources */,
</span><span class="cx">                                 50D10D991545F5760096D288 /* RenderLayerFilterInfo.cpp in Sources */,
</span><span class="cx">                                 3C244FEBA375AC633F88BE6F /* RenderLayerModelObject.cpp in Sources */,
</span><ins>+                                0FC4E40E187F82E10045882C /* ScrollingCoordinatorIOS.mm in Sources */,
</ins><span class="cx">                                 BC33FB1B0F30EE85002CDD7C /* RenderLineBoxList.cpp in Sources */,
</span><span class="cx">                                 ABB5419E0ACDDFE4002820EB /* RenderListBox.cpp in Sources */,
</span><span class="cx">                                 A8EA7A4E0A191A5200A8EF5F /* RenderListItem.cpp in Sources */,
</span><span class="lines">@@ -28906,6 +28937,7 @@
</span><span class="cx">                                 E1FE1370183FECF000892F13 /* CryptoAlgorithmRSA_OAEPMac.cpp in Sources */,
</span><span class="cx">                                 6E3FAE8E14733FDB00E42307 /* WebGLDepthTexture.cpp in Sources */,
</span><span class="cx">                                 6EBF0E5412A8929800DB1709 /* WebGLExtension.cpp in Sources */,
</span><ins>+                                0FC4E412187F82E10045882C /* ScrollingTreeScrollingNodeIOS.mm in Sources */,
</ins><span class="cx">                                 49C7B9CE1042D32F0009D447 /* WebGLFramebuffer.cpp in Sources */,
</span><span class="cx">                                 6E47E66010B7944B00B186C8 /* WebGLGetInfo.cpp in Sources */,
</span><span class="cx">                                 49FFBF4011C93EE3006A7118 /* WebGLLayer.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingCoordinatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (161609 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp        2014-01-10 01:34:24 UTC (rev 161609)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -45,10 +45,6 @@
</span><span class="cx"> #include "RenderLayerCompositor.h"
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if ENABLE(ASYNC_SCROLLING)
-#include "ScrollingCoordinatorMac.h"
-#endif
-
</del><span class="cx"> #if USE(COORDINATED_GRAPHICS)
</span><span class="cx"> #include "ScrollingCoordinatorCoordinatedGraphics.h"
</span><span class="cx"> #endif
</span><span class="lines">@@ -59,12 +55,9 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+#if !PLATFORM(MAC)
</ins><span class="cx"> PassRefPtr<ScrollingCoordinator> ScrollingCoordinator::create(Page* page)
</span><span class="cx"> {
</span><del>-#if USE(ACCELERATED_COMPOSITING) && ENABLE(ASYNC_SCROLLING)
- return adoptRef(new ScrollingCoordinatorMac(page));
-#endif
-
</del><span class="cx"> #if USE(COORDINATED_GRAPHICS)
</span><span class="cx"> return adoptRef(new ScrollingCoordinatorCoordinatedGraphics(page));
</span><span class="cx"> #endif
</span><span class="lines">@@ -75,6 +68,7 @@
</span><span class="cx">
</span><span class="cx"> return adoptRef(new ScrollingCoordinator(page));
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> ScrollingCoordinator::ScrollingCoordinator(Page* page)
</span><span class="cx"> : m_page(page)
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingStateScrollingNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp (161609 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp        2014-01-10 01:34:24 UTC (rev 161609)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">
</span><span class="cx"> ScrollingStateScrollingNode::ScrollingStateScrollingNode(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
</span><span class="cx"> : ScrollingStateNode(ScrollingNode, stateTree, nodeID)
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if PLATFORM(MAC) && !PLATFORM(IOS)
</ins><span class="cx"> , m_verticalScrollbarPainter(0)
</span><span class="cx"> , m_horizontalScrollbarPainter(0)
</span><span class="cx"> #endif
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx">
</span><span class="cx"> ScrollingStateScrollingNode::ScrollingStateScrollingNode(const ScrollingStateScrollingNode& stateNode, ScrollingStateTree& adoptiveTree)
</span><span class="cx"> : ScrollingStateNode(stateNode, adoptiveTree)
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if PLATFORM(MAC) && !PLATFORM(IOS)
</ins><span class="cx"> , m_verticalScrollbarPainter(stateNode.verticalScrollbarPainter())
</span><span class="cx"> , m_horizontalScrollbarPainter(stateNode.horizontalScrollbarPainter())
</span><span class="cx"> #endif
</span><span class="lines">@@ -232,6 +232,12 @@
</span><span class="cx"> setPropertyChanged(FooterLayer);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if !(PLATFORM(MAC) && !PLATFORM(IOS))
+void ScrollingStateScrollingNode::setScrollbarPaintersFromScrollbars(Scrollbar*, Scrollbar*)
+{
+}
+#endif
+
</ins><span class="cx"> void ScrollingStateScrollingNode::dumpProperties(TextStream& ts, int indent) const
</span><span class="cx"> {
</span><span class="cx"> ts << "(" << "Scrolling node" << "\n";
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingStateScrollingNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h (161609 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h        2014-01-10 01:34:24 UTC (rev 161609)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -116,7 +116,7 @@
</span><span class="cx"> const LayerRepresentation& footerLayer() const { return m_footerLayer; }
</span><span class="cx"> void setFooterLayer(const LayerRepresentation&);
</span><span class="cx">
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if PLATFORM(MAC) && !PLATFORM(IOS)
</ins><span class="cx"> ScrollbarPainter verticalScrollbarPainter() const { return m_verticalScrollbarPainter; }
</span><span class="cx"> ScrollbarPainter horizontalScrollbarPainter() const { return m_horizontalScrollbarPainter; }
</span><span class="cx"> #endif
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx"> LayerRepresentation m_headerLayer;
</span><span class="cx"> LayerRepresentation m_footerLayer;
</span><span class="cx">
</span><del>-#if PLATFORM(MAC)
</del><ins>+#if PLATFORM(MAC) && !PLATFORM(IOS)
</ins><span class="cx"> ScrollbarPainter m_verticalScrollbarPainter;
</span><span class="cx"> ScrollbarPainter m_horizontalScrollbarPainter;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingTreeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingTree.h (161609 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingTree.h        2014-01-10 01:34:24 UTC (rev 161609)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTree.h        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -58,6 +58,7 @@
</span><span class="cx">
</span><span class="cx"> virtual bool isThreadedScrollingTree() const { return false; }
</span><span class="cx"> virtual bool isRemoteScrollingTree() const { return false; }
</span><ins>+ virtual bool isScrollingTreeIOS() 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></pre></div>
<a id="trunkSourceWebCorepagescrollingThreadedScrollingTreeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h (161609 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h        2014-01-10 01:34:24 UTC (rev 161609)
+++ trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -47,8 +47,6 @@
</span><span class="cx">
</span><span class="cx"> virtual ~ThreadedScrollingTree();
</span><span class="cx">
</span><del>- virtual bool isThreadedScrollingTree() const { return true; }
-
</del><span class="cx"> virtual void commitNewTreeState(PassOwnPtr<ScrollingStateTree>) OVERRIDE;
</span><span class="cx">
</span><span class="cx"> virtual void handleWheelEvent(const PlatformWheelEvent&) OVERRIDE;
</span><span class="lines">@@ -62,6 +60,7 @@
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> explicit ThreadedScrollingTree(AsyncScrollingCoordinator*);
</span><ins>+ virtual bool isThreadedScrollingTree() const OVERRIDE { return true; }
</ins><span class="cx">
</span><span class="cx"> virtual PassOwnPtr<ScrollingTreeNode> createNode(ScrollingNodeType, ScrollingNodeID) OVERRIDE;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingiosScrollingCoordinatorIOShfromrev161609trunkSourceWebKit2UIProcessScrollingRemoteScrollingTreeh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.h (from rev 161609, trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h) (0 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.h         (rev 0)
+++ trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.h        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -0,0 +1,67 @@
</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 ScrollingCoordinatorIOS_h
+#define ScrollingCoordinatorIOS_h
+
+#if ENABLE(ASYNC_SCROLLING)
+
+#include "AsyncScrollingCoordinator.h"
+
+namespace WebCore {
+
+class Scrollbar;
+class ScrollingStateNode;
+class ScrollingStateScrollingNode;
+class ScrollingStateTree;
+class ThreadedScrollingTree;
+
+class ScrollingCoordinatorIOS : public AsyncScrollingCoordinator {
+public:
+ explicit ScrollingCoordinatorIOS(Page*);
+ virtual ~ScrollingCoordinatorIOS();
+
+ virtual void pageDestroyed();
+
+ virtual void commitTreeStateIfNeeded() OVERRIDE;
+
+ // Handle the wheel event on the scrolling thread. Returns whether the event was handled or not.
+ virtual bool handleWheelEvent(FrameView*, const PlatformWheelEvent&) OVERRIDE { return false; }
+
+private:
+ virtual PassOwnPtr<ScrollingTreeNode> createScrollingTreeNode(ScrollingNodeType, ScrollingNodeID) OVERRIDE;
+ virtual void scheduleTreeStateCommit() OVERRIDE;
+
+ void scrollingStateTreeCommitterTimerFired(Timer<ScrollingCoordinatorIOS>*);
+ void commitTreeState();
+
+ Timer<ScrollingCoordinatorIOS> m_scrollingStateTreeCommitterTimer;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(ASYNC_SCROLLING)
+
+#endif // ScrollingCoordinatorIOS_h
</ins></span></pre></div>
<a id="trunkSourceWebCorepagescrollingiosScrollingCoordinatorIOSmmfromrev161609trunkSourceWebCorepagescrollingmacScrollingCoordinatorMacmm"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.mm (from rev 161609, trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm) (0 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.mm         (rev 0)
+++ trunk/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.mm        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -0,0 +1,125 @@
</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"
+
+#if ENABLE(ASYNC_SCROLLING)
+
+#import "ScrollingCoordinatorIOS.h"
+
+#include "FrameView.h"
+#include "MainFrame.h"
+#include "Page.h"
+#include "Region.h"
+#include "ScrollingStateTree.h"
+#include "ScrollingThread.h"
+#include "ScrollingTreeFixedNode.h"
+#include "ScrollingTreeScrollingNodeIOS.h"
+#include "ScrollingTreeStickyNode.h"
+#include "ScrollingTreeIOS.h"
+#include <wtf/Functional.h>
+#include <wtf/MainThread.h>
+#include <wtf/PassRefPtr.h>
+
+namespace WebCore {
+
+PassRefPtr<ScrollingCoordinator> ScrollingCoordinator::create(Page* page)
+{
+ return adoptRef(new ScrollingCoordinatorIOS(page));
+}
+
+ScrollingCoordinatorIOS::ScrollingCoordinatorIOS(Page* page)
+ : AsyncScrollingCoordinator(page)
+ , m_scrollingStateTreeCommitterTimer(this, &ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired)
+{
+ setScrollingTree(ScrollingTreeIOS::create(this));
+}
+
+ScrollingCoordinatorIOS::~ScrollingCoordinatorIOS()
+{
+ ASSERT(!scrollingTree());
+}
+
+void ScrollingCoordinatorIOS::pageDestroyed()
+{
+ AsyncScrollingCoordinator::pageDestroyed();
+
+ m_scrollingStateTreeCommitterTimer.stop();
+
+ // Invalidating the scrolling tree will break the reference cycle between the ScrollingCoordinator and ScrollingTree objects.
+ releaseScrollingTree();
+}
+
+void ScrollingCoordinatorIOS::commitTreeStateIfNeeded()
+{
+ if (!scrollingStateTree()->hasChangedProperties())
+ return;
+
+ commitTreeState();
+ m_scrollingStateTreeCommitterTimer.stop();
+}
+
+void ScrollingCoordinatorIOS::scheduleTreeStateCommit()
+{
+ ASSERT(scrollingStateTree()->hasChangedProperties());
+
+ if (m_scrollingStateTreeCommitterTimer.isActive())
+ return;
+
+ m_scrollingStateTreeCommitterTimer.startOneShot(0);
+}
+
+void ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired(Timer<ScrollingCoordinatorIOS>*)
+{
+ commitTreeState();
+}
+
+void ScrollingCoordinatorIOS::commitTreeState()
+{
+ ASSERT(scrollingStateTree()->hasChangedProperties());
+
+ OwnPtr<ScrollingStateTree> treeState = scrollingStateTree()->commit(LayerRepresentation::PlatformLayerRepresentation);
+ // FIXME: figure out how to commit.
+}
+
+PassOwnPtr<ScrollingTreeNode> ScrollingCoordinatorIOS::createScrollingTreeNode(ScrollingNodeType nodeType, ScrollingNodeID nodeID)
+{
+ ASSERT(scrollingTree());
+
+ switch (nodeType) {
+ case ScrollingNode:
+ return ScrollingTreeScrollingNodeIOS::create(*scrollingTree(), nodeID);
+ case FixedNode:
+ return ScrollingTreeFixedNode::create(*scrollingTree(), nodeID);
+ case StickyNode:
+ return ScrollingTreeStickyNode::create(*scrollingTree(), nodeID);
+ }
+ return nullptr;
+}
+
+
+} // namespace WebCore
+
+#endif // ENABLE(ASYNC_SCROLLING)
</ins></span></pre></div>
<a id="trunkSourceWebCorepagescrollingiosScrollingTreeIOScpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.cpp (0 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.cpp         (rev 0)
+++ trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.cpp        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -0,0 +1,101 @@
</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 "ScrollingTreeIOS.h"
+
+#if ENABLE(ASYNC_SCROLLING)
+
+#include "AsyncScrollingCoordinator.h"
+#include "PlatformWheelEvent.h"
+#include "ScrollingThread.h"
+#include "ScrollingTreeFixedNode.h"
+#include "ScrollingTreeNode.h"
+#include "ScrollingTreeScrollingNode.h"
+#include "ScrollingTreeStickyNode.h"
+#include <wtf/MainThread.h>
+#include <wtf/TemporaryChange.h>
+
+namespace WebCore {
+
+RefPtr<ScrollingTreeIOS> ScrollingTreeIOS::create(AsyncScrollingCoordinator* scrollingCoordinator)
+{
+ return adoptRef(new ScrollingTreeIOS(scrollingCoordinator));
+}
+
+ScrollingTreeIOS::ScrollingTreeIOS(AsyncScrollingCoordinator* scrollingCoordinator)
+ : m_scrollingCoordinator(scrollingCoordinator)
+{
+}
+
+ScrollingTreeIOS::~ScrollingTreeIOS()
+{
+ // invalidate() should have cleared m_scrollingCoordinator.
+ ASSERT(!m_scrollingCoordinator);
+}
+
+static void derefScrollingCoordinator(ScrollingCoordinator* scrollingCoordinator)
+{
+ ASSERT(isMainThread());
+
+ scrollingCoordinator->deref();
+}
+
+void ScrollingTreeIOS::invalidate()
+{
+ // Invalidate is dispatched by the ScrollingCoordinator class on the ScrollingThread
+ // to break the reference cycle between ScrollingTree and ScrollingCoordinator when the
+ // ScrollingCoordinator's page is destroyed.
+ ASSERT(ScrollingThread::isCurrentThread());
+
+ // Since this can potentially be the last reference to the scrolling coordinator,
+ // we need to release it on the main thread since it has member variables (such as timers)
+ // that expect to be destroyed from the main thread.
+ callOnMainThread(bind(derefScrollingCoordinator, m_scrollingCoordinator.release().leakRef()));
+}
+
+void ScrollingTreeIOS::commitNewTreeState(PassOwnPtr<ScrollingStateTree> scrollingStateTree)
+{
+ ScrollingTree::commitNewTreeState(scrollingStateTree);
+}
+
+void ScrollingTreeIOS::updateMainFrameScrollPosition(const IntPoint& scrollPosition, SetOrSyncScrollingLayerPosition scrollingLayerPositionAction)
+{
+ if (!m_scrollingCoordinator)
+ return;
+
+ setMainFrameScrollPosition(scrollPosition);
+
+ callOnMainThread(bind(&ScrollingCoordinator::scheduleUpdateMainFrameScrollPosition, m_scrollingCoordinator.get(), scrollPosition, isHandlingProgrammaticScroll(), scrollingLayerPositionAction));
+}
+
+PassOwnPtr<ScrollingTreeNode> ScrollingTreeIOS::createNode(ScrollingNodeType nodeType, ScrollingNodeID nodeID)
+{
+ return m_scrollingCoordinator->createScrollingTreeNode(nodeType, nodeID);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(ASYNC_SCROLLING)
</ins><span class="cx">Property changes on: trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.cpp
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkSourceWebCorepagescrollingiosScrollingTreeIOShfromrev161609trunkSourceWebCorepagescrollingThreadedScrollingTreeh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.h (from rev 161609, trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h) (0 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.h         (rev 0)
+++ trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.h        2014-01-10 01:38:46 UTC (rev 161610)
</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 ScrollingTreeIOS_h
+#define ScrollingTreeIOS_h
+
+#if ENABLE(ASYNC_SCROLLING)
+
+#include "ScrollingStateTree.h"
+#include "ScrollingTree.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+class AsyncScrollingCoordinator;
+
+class ScrollingTreeIOS : public ScrollingTree {
+public:
+ static RefPtr<ScrollingTreeIOS> create(AsyncScrollingCoordinator*);
+ virtual ~ScrollingTreeIOS();
+
+ virtual void commitNewTreeState(PassOwnPtr<ScrollingStateTree>) OVERRIDE;
+
+ // No wheel events on iOS
+ virtual void handleWheelEvent(const PlatformWheelEvent&) OVERRIDE { }
+ virtual EventResult tryToHandleWheelEvent(const PlatformWheelEvent&) OVERRIDE { return DidNotHandleEvent; }
+
+ virtual void invalidate() OVERRIDE;
+
+private:
+ explicit ScrollingTreeIOS(AsyncScrollingCoordinator*);
+ virtual bool isScrollingTreeIOS() const OVERRIDE { return true; }
+
+ virtual PassOwnPtr<ScrollingTreeNode> createNode(ScrollingNodeType, ScrollingNodeID) OVERRIDE;
+
+ virtual void updateMainFrameScrollPosition(const IntPoint& scrollPosition, SetOrSyncScrollingLayerPosition = SyncScrollingLayerPosition) OVERRIDE;
+#if PLATFORM(MAC)
+ virtual void handleWheelEventPhase(PlatformWheelEventPhase) OVERRIDE { }
+#endif
+
+ RefPtr<AsyncScrollingCoordinator> m_scrollingCoordinator;
+};
+
+SCROLLING_TREE_TYPE_CASTS(ScrollingTreeIOS, isScrollingTreeIOS());
+
+} // namespace WebCore
+
+#endif // ENABLE(ASYNC_SCROLLING)
+
+#endif // ScrollingTreeIOS_h
</ins></span></pre></div>
<a id="trunkSourceWebCorepagescrollingiosScrollingTreeScrollingNodeIOShfromrev161609trunkSourceWebKit2UIProcessScrollingRemoteScrollingTreeh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h (from rev 161609, trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h) (0 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h         (rev 0)
+++ trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -0,0 +1,74 @@
</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 ScrollingTreeScrollingNodeIOS_h
+#define ScrollingTreeScrollingNodeIOS_h
+
+#if ENABLE(ASYNC_SCROLLING)
+
+#include "ScrollingTreeScrollingNode.h"
+#include <wtf/RetainPtr.h>
+
+OBJC_CLASS CALayer;
+
+namespace WebCore {
+
+class ScrollingTreeScrollingNodeIOS : public ScrollingTreeScrollingNode {
+public:
+ static PassOwnPtr<ScrollingTreeScrollingNode> create(ScrollingTree&, ScrollingNodeID);
+ virtual ~ScrollingTreeScrollingNodeIOS();
+
+private:
+ ScrollingTreeScrollingNodeIOS(ScrollingTree&, ScrollingNodeID);
+
+ // ScrollingTreeNode member functions.
+ virtual void updateBeforeChildren(const ScrollingStateNode&) OVERRIDE;
+ virtual void updateAfterChildren(const ScrollingStateNode&) OVERRIDE;
+ virtual void handleWheelEvent(const PlatformWheelEvent&) OVERRIDE { }
+
+ IntPoint scrollPosition() const;
+ void setScrollPosition(const IntPoint&);
+ void setScrollPositionWithoutContentEdgeConstraints(const IntPoint&);
+
+ void setScrollLayerPosition(const IntPoint&);
+
+ IntPoint minimumScrollPosition() const;
+ IntPoint maximumScrollPosition() const;
+
+ void scrollBy(const IntSize&);
+ void scrollByWithoutContentEdgeConstraints(const IntSize&);
+
+ RetainPtr<CALayer> m_scrollLayer;
+ RetainPtr<CALayer> m_counterScrollingLayer;
+ RetainPtr<CALayer> m_headerLayer;
+ RetainPtr<CALayer> m_footerLayer;
+ IntPoint m_probableMainThreadScrollPosition;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(ASYNC_SCROLLING)
+
+#endif // ScrollingTreeScrollingNodeIOS_h
</ins></span></pre></div>
<a id="trunkSourceWebCorepagescrollingiosScrollingTreeScrollingNodeIOSmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm (0 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm         (rev 0)
+++ trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -0,0 +1,199 @@
</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 "ScrollingTreeScrollingNodeIOS.h"
+
+#if ENABLE(ASYNC_SCROLLING)
+
+#import "FrameView.h"
+#import "ScrollingCoordinator.h"
+#import "ScrollingTree.h"
+#import "ScrollingStateTree.h"
+#import "Settings.h"
+#import "TileController.h"
+#import "WebLayer.h"
+
+#import <QuartzCore/QuartzCore.h>
+
+namespace WebCore {
+
+PassOwnPtr<ScrollingTreeScrollingNode> ScrollingTreeScrollingNodeIOS::create(ScrollingTree& scrollingTree, ScrollingNodeID nodeID)
+{
+ return adoptPtr(new ScrollingTreeScrollingNodeIOS(scrollingTree, nodeID));
+}
+
+ScrollingTreeScrollingNodeIOS::ScrollingTreeScrollingNodeIOS(ScrollingTree& scrollingTree, ScrollingNodeID nodeID)
+ : ScrollingTreeScrollingNode(scrollingTree, nodeID)
+{
+}
+
+ScrollingTreeScrollingNodeIOS::~ScrollingTreeScrollingNodeIOS()
+{
+}
+
+void ScrollingTreeScrollingNodeIOS::updateBeforeChildren(const ScrollingStateNode& stateNode)
+{
+ ScrollingTreeScrollingNode::updateBeforeChildren(stateNode);
+ const auto& scrollingStateNode = toScrollingStateScrollingNode(stateNode);
+
+ if (scrollingStateNode.hasChangedProperty(ScrollingStateNode::ScrollLayer))
+ m_scrollLayer = scrollingStateNode.layer();
+
+ if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::CounterScrollingLayer))
+ m_counterScrollingLayer = scrollingStateNode.counterScrollingLayer();
+
+ if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::HeaderLayer))
+ m_headerLayer = scrollingStateNode.headerLayer();
+
+ if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::FooterLayer))
+ m_footerLayer = scrollingStateNode.footerLayer();
+
+ if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ReasonsForSynchronousScrolling)) {
+ if (shouldUpdateScrollLayerPositionSynchronously()) {
+ // We're transitioning to the slow "update scroll layer position on the main thread" mode.
+ // Initialize the probable main thread scroll position with the current scroll layer position.
+ if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::RequestedScrollPosition))
+ m_probableMainThreadScrollPosition = scrollingStateNode.requestedScrollPosition();
+ else {
+ CGPoint scrollLayerPosition = m_scrollLayer.get().position;
+ m_probableMainThreadScrollPosition = IntPoint(-scrollLayerPosition.x, -scrollLayerPosition.y);
+ }
+ }
+ }
+}
+
+void ScrollingTreeScrollingNodeIOS::updateAfterChildren(const ScrollingStateNode& stateNode)
+{
+ ScrollingTreeScrollingNode::updateAfterChildren(stateNode);
+
+ const auto& scrollingStateNode = toScrollingStateScrollingNode(stateNode);
+
+ // Update the scroll position after child nodes have been updated, because they need to have updated their constraints before any scrolling happens.
+ if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::RequestedScrollPosition))
+ setScrollPosition(scrollingStateNode.requestedScrollPosition());
+}
+
+IntPoint ScrollingTreeScrollingNodeIOS::scrollPosition() const
+{
+ if (shouldUpdateScrollLayerPositionSynchronously())
+ return m_probableMainThreadScrollPosition;
+
+ CGPoint scrollLayerPosition = m_scrollLayer.get().position;
+ return IntPoint(-scrollLayerPosition.x + scrollOrigin().x(), -scrollLayerPosition.y + scrollOrigin().y());
+}
+
+void ScrollingTreeScrollingNodeIOS::setScrollPosition(const IntPoint& scrollPosition)
+{
+ IntPoint newScrollPosition = scrollPosition;
+ newScrollPosition = newScrollPosition.shrunkTo(maximumScrollPosition());
+ newScrollPosition = newScrollPosition.expandedTo(minimumScrollPosition());
+
+ setScrollPositionWithoutContentEdgeConstraints(newScrollPosition);
+}
+
+void ScrollingTreeScrollingNodeIOS::setScrollPositionWithoutContentEdgeConstraints(const IntPoint& scrollPosition)
+{
+ if (shouldUpdateScrollLayerPositionSynchronously()) {
+ m_probableMainThreadScrollPosition = scrollPosition;
+ scrollingTree().updateMainFrameScrollPosition(scrollPosition, SetScrollingLayerPosition);
+ return;
+ }
+
+ setScrollLayerPosition(scrollPosition);
+ scrollingTree().updateMainFrameScrollPosition(scrollPosition);
+}
+
+void ScrollingTreeScrollingNodeIOS::setScrollLayerPosition(const IntPoint& position)
+{
+ ASSERT(!shouldUpdateScrollLayerPositionSynchronously());
+ m_scrollLayer.get().position = CGPointMake(-position.x() + scrollOrigin().x(), -position.y() + scrollOrigin().y());
+
+ ScrollBehaviorForFixedElements behaviorForFixed = scrollBehaviorForFixedElements();
+ IntPoint scrollOffset = position - toIntSize(scrollOrigin());
+ IntSize scrollOffsetForFixedChildren = FrameView::scrollOffsetForFixedPosition(viewportRect(), totalContentsSize(), scrollOffset, scrollOrigin(), frameScaleFactor(), false, behaviorForFixed, headerHeight(), footerHeight());
+ if (m_counterScrollingLayer)
+ m_counterScrollingLayer.get().position = FloatPoint(scrollOffsetForFixedChildren);
+
+ // Generally the banners should have the same horizontal-position computation as a fixed element. However,
+ // the banners are not affected by the frameScaleFactor(), so if there is currently a non-1 frameScaleFactor()
+ // then we should recompute scrollOffsetForFixedChildren for the banner with a scale factor of 1.
+ float horizontalScrollOffsetForBanner = scrollOffsetForFixedChildren.width();
+ if (frameScaleFactor() != 1)
+ horizontalScrollOffsetForBanner = FrameView::scrollOffsetForFixedPosition(viewportRect(), totalContentsSize(), scrollOffset, scrollOrigin(), 1, false, behaviorForFixed, headerHeight(), footerHeight()).width();
+
+ if (m_headerLayer)
+ m_headerLayer.get().position = FloatPoint(horizontalScrollOffsetForBanner, 0);
+
+ if (m_footerLayer)
+ m_footerLayer.get().position = FloatPoint(horizontalScrollOffsetForBanner, totalContentsSize().height() - footerHeight());
+
+ if (!m_children)
+ return;
+
+ IntRect viewportRect = this->viewportRect();
+ viewportRect.setLocation(IntPoint(scrollOffsetForFixedChildren));
+
+ size_t size = m_children->size();
+ for (size_t i = 0; i < size; ++i)
+ m_children->at(i)->parentScrollPositionDidChange(viewportRect, FloatSize());
+}
+
+IntPoint ScrollingTreeScrollingNodeIOS::minimumScrollPosition() const
+{
+ IntPoint position;
+
+ if (scrollingTree().rootNode() == this && scrollingTree().scrollPinningBehavior() == PinToBottom)
+ position.setY(maximumScrollPosition().y());
+
+ return position;
+}
+
+IntPoint ScrollingTreeScrollingNodeIOS::maximumScrollPosition() const
+{
+ IntPoint position(totalContentsSizeForRubberBand().width() - viewportRect().width(),
+ totalContentsSizeForRubberBand().height() - viewportRect().height());
+
+ position.clampNegativeToZero();
+
+ if (scrollingTree().rootNode() == this && scrollingTree().scrollPinningBehavior() == PinToTop)
+ position.setY(minimumScrollPosition().y());
+
+ return position;
+}
+
+void ScrollingTreeScrollingNodeIOS::scrollBy(const IntSize& offset)
+{
+ setScrollPosition(scrollPosition() + offset);
+}
+
+void ScrollingTreeScrollingNodeIOS::scrollByWithoutContentEdgeConstraints(const IntSize& offset)
+{
+ setScrollPositionWithoutContentEdgeConstraints(scrollPosition() + offset);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(ASYNC_SCROLLING)
</ins></span></pre></div>
<a id="trunkSourceWebCorepagescrollingmacScrollingCoordinatorMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm (161609 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm        2014-01-10 01:34:24 UTC (rev 161609)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -47,6 +47,11 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+PassRefPtr<ScrollingCoordinator> ScrollingCoordinator::create(Page* page)
+{
+ return adoptRef(new ScrollingCoordinatorMac(page));
+}
+
</ins><span class="cx"> ScrollingCoordinatorMac::ScrollingCoordinatorMac(Page* page)
</span><span class="cx"> : AsyncScrollingCoordinator(page)
</span><span class="cx"> , m_scrollingStateTreeCommitterTimer(this, &ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired)
</span><span class="lines">@@ -152,7 +157,6 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // ENABLE(ASYNC_SCROLLING)
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingmacScrollingTreeFixedNodemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.mm (161609 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.mm        2014-01-10 01:34:24 UTC (rev 161609)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.mm        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx">
</span><span class="cx"> #include "ScrollingStateFixedNode.h"
</span><span class="cx"> #include "ScrollingTree.h"
</span><ins>+#include <QuartzCore/CALayer.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingmacScrollingTreeStickyNodemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.mm (161609 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.mm        2014-01-10 01:34:24 UTC (rev 161609)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.mm        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx">
</span><span class="cx"> #include "ScrollingStateStickyNode.h"
</span><span class="cx"> #include "ScrollingTree.h"
</span><ins>+#include <QuartzCore/CALayer.h>
</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 (161609 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-01-10 01:34:24 UTC (rev 161609)
+++ trunk/Source/WebKit2/ChangeLog        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2014-01-09 Simon Fraser <simon.fraser@apple.com>
+
+ Enable async scrolling for iOS
+ https://bugs.webkit.org/show_bug.cgi?id=126730
+
+ Reviewed by Tim Horton.
+
+ Turn on ENABLE_ASYNC_SCROLLING for iOS.
+
+ On iOS, create ScrollingTreeScrollingNodeIOS nodes.
+
+ * UIProcess/Scrolling/RemoteScrollingTree.cpp:
+ (WebKit::RemoteScrollingTree::createNode):
+ * UIProcess/Scrolling/RemoteScrollingTree.h:
+
</ins><span class="cx"> 2014-01-06 Gavin Barraclough <barraclough@apple.com>
</span><span class="cx">
</span><span class="cx"> Change Page, FocusController to use ViewState
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessScrollingRemoteScrollingTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.cpp (161609 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.cpp        2014-01-10 01:34:24 UTC (rev 161609)
+++ trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.cpp        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -31,9 +31,14 @@
</span><span class="cx"> #include "RemoteLayerTreeHost.h"
</span><span class="cx"> #include "RemoteScrollingCoordinatorProxy.h"
</span><span class="cx"> #include <WebCore/ScrollingTreeFixedNode.h>
</span><del>-#include <WebCore/ScrollingTreeScrollingNodeMac.h>
</del><span class="cx"> #include <WebCore/ScrollingTreeStickyNode.h>
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+#include <WebCore/ScrollingTreeScrollingNodeIOS.h>
+#else
+#include <WebCore/ScrollingTreeScrollingNodeMac.h>
+#endif
+
</ins><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="lines">@@ -81,7 +86,11 @@
</span><span class="cx"> {
</span><span class="cx"> switch (nodeType) {
</span><span class="cx"> case ScrollingNode:
</span><ins>+#if PLATFORM(IOS)
+ return ScrollingTreeScrollingNodeIOS::create(*this, nodeID);
+#else
</ins><span class="cx"> return ScrollingTreeScrollingNodeMac::create(*this, nodeID);
</span><ins>+#endif
</ins><span class="cx"> case FixedNode:
</span><span class="cx"> return ScrollingTreeFixedNode::create(*this, nodeID);
</span><span class="cx"> case StickyNode:
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessScrollingRemoteScrollingTreeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h (161609 => 161610)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h        2014-01-10 01:34:24 UTC (rev 161609)
+++ trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingTree.h        2014-01-10 01:38:46 UTC (rev 161610)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> #if ENABLE(ASYNC_SCROLLING)
</span><span class="cx">
</span><span class="cx"> #include "RemoteScrollingCoordinator.h"
</span><del>-#include <WebCore/ScrollElasticityController.h>
</del><span class="cx"> #include <WebCore/ScrollingConstraints.h>
</span><span class="cx"> #include <WebCore/ScrollingTree.h>
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>