Changeset 162748 in webkit
- Timestamp:
- Jan 24, 2014 6:32:26 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r162747 r162748 1 2014-01-24 Simon Fraser <simon.fraser@apple.com> 2 3 Start using the RemoteScrollingCoordinatorProxy on iOS 4 https://bugs.webkit.org/show_bug.cgi?id=127598 5 6 Reviewed by Tim Horton. 7 8 Add a scrollPositionChangedViaDelegatedScrolling() function to 9 ScrollingTree, allowing the ScrollingTree to be informed about 10 external sources of scrolling. 11 12 Also add a convenience getter for nodes, nodeForID(). 13 14 * WebCore.exp.in: 15 * page/scrolling/ScrollingTree.cpp: 16 (WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling): 17 (WebCore::ScrollingTree::nodeForID): 18 * page/scrolling/ScrollingTree.h: 19 * rendering/RenderLayerCompositor.cpp: 20 (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers): 21 To avoid assertions on iOS, bail from iOS WK1 fixed position code if 22 we have a ScrollingCoordinator. 23 (WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers): 24 Ditto. 25 1 26 2014-01-24 Simon Fraser <simon.fraser@apple.com> 2 27 -
trunk/Source/WebCore/WebCore.exp.in
r162745 r162748 2975 2975 __ZN7WebCore13ScrollingTree35shouldHandleWheelEventSynchronouslyERKNS_18PlatformWheelEventE 2976 2976 __ZN7WebCore13ScrollingTree37setScrollingPerformanceLoggingEnabledEb 2977 __ZN7WebCore13ScrollingTree42scrollPositionChangedViaDelegatedScrollingEyRKNS_8IntPointE 2977 2978 __ZN7WebCore13ScrollingTreeC2Ev 2978 2979 __ZN7WebCore13ScrollingTreeD1Ev -
trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp
r161276 r162748 81 81 } 82 82 83 void ScrollingTree::scrollPositionChangedViaDelegatedScrolling(ScrollingNodeID nodeID, const IntPoint& scrollPosition) 84 { 85 ScrollingTreeNode* node = nodeForID(nodeID); 86 if (!node) 87 return; 88 89 if (node->nodeType() != ScrollingNode) 90 return; 91 92 toScrollingTreeScrollingNode(node)->setScrollPosition(scrollPosition); 93 } 94 83 95 void ScrollingTree::commitNewTreeState(PassOwnPtr<ScrollingStateTree> scrollingStateTree) 84 96 { … … 174 186 } 175 187 188 ScrollingTreeNode* ScrollingTree::nodeForID(ScrollingNodeID nodeID) const 189 { 190 if (!nodeID) 191 return nullptr; 192 193 return m_nodeMap.get(nodeID); 194 } 195 176 196 void ScrollingTree::setMainFramePinState(bool pinnedToTheLeft, bool pinnedToTheRight, bool pinnedToTheTop, bool pinnedToTheBottom) 177 197 { -
trunk/Source/WebCore/page/scrolling/ScrollingTree.h
r162736 r162748 63 63 virtual EventResult tryToHandleWheelEvent(const PlatformWheelEvent&) = 0; 64 64 bool shouldHandleWheelEventSynchronously(const PlatformWheelEvent&); 65 66 virtual void scrollPositionChangedViaDelegatedScrolling(ScrollingNodeID, const IntPoint&); 65 67 66 68 void setMainFrameIsRubberBanding(bool); … … 108 110 virtual PassOwnPtr<ScrollingTreeNode> createNode(ScrollingNodeType, ScrollingNodeID) = 0; 109 111 112 ScrollingTreeNode* nodeForID(ScrollingNodeID) const; 113 110 114 OwnPtr<ScrollingTreeScrollingNode> m_rootNode; 111 115 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r162523 r162748 3529 3529 return; 3530 3530 3531 if (scrollingCoordinator()) 3532 return; 3533 3531 3534 LayerMap layerMap; 3532 3535 StickyContainerMap stickyContainerMap; … … 3560 3563 return; 3561 3564 3565 if (scrollingCoordinator()) 3566 return; 3567 3562 3568 if (ChromeClient* client = this->chromeClient()) { 3563 3569 LayerMap layerMap; -
trunk/Source/WebKit2/ChangeLog
r162746 r162748 1 2014-01-24 Simon Fraser <simon.fraser@apple.com> 2 3 Start using the RemoteScrollingCoordinatorProxy on iOS 4 https://bugs.webkit.org/show_bug.cgi?id=127598 5 6 Reviewed by Tim Horton. 7 8 Add a scrollPositionChangedViaDelegatedScrolling() function to 9 ScrollingTree, allowing the ScrollingTree to be informed about 10 external sources of scrolling. 11 12 Call it from -[WKContentView didScrollTo:] for the root node. 13 14 * UIProcess/API/ios/WKContentView.mm: 15 (-[WKContentView didScrollTo:]): 16 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: 17 (WebKit::RemoteScrollingCoordinatorProxy::rootScrollingNodeID): 18 (WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChangedViaDelegatedScrolling): 19 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h: 20 1 21 2014-01-24 Anders Carlsson <andersca@apple.com> 2 22 -
trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.mm
r162730 r162748 30 30 #import "PageClientImplIOS.h" 31 31 #import "RemoteLayerTreeDrawingAreaProxy.h" 32 #import "RemoteScrollingCoordinatorProxy.h" 32 33 #import "WebKit2Initialize.h" 33 34 #import "WKBrowsingContextControllerInternal.h" … … 194 195 _currentExposedRectPosition = contentOffset; 195 196 [self _updateViewExposedRect]; 197 198 _page->scrollingCoordinatorProxy()->scrollPositionChangedViaDelegatedScrolling(_page->scrollingCoordinatorProxy()->rootScrollingNodeID(), roundedIntPoint(contentOffset)); 196 199 } 197 200 -
trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp
r161529 r162748 40 40 #include "WebProcessProxy.h" 41 41 #include <WebCore/ScrollingStateTree.h> 42 #include <WebCore/ScrollingTreeScrollingNode.h> 42 43 43 44 using namespace WebCore; … … 53 54 RemoteScrollingCoordinatorProxy::~RemoteScrollingCoordinatorProxy() 54 55 { 56 } 57 58 WebCore::ScrollingNodeID RemoteScrollingCoordinatorProxy::rootScrollingNodeID() const 59 { 60 return m_scrollingTree->rootNode()->scrollingNodeID(); 55 61 } 56 62 … … 121 127 } 122 128 129 void RemoteScrollingCoordinatorProxy::scrollPositionChangedViaDelegatedScrolling(ScrollingNodeID nodeID, const IntPoint& offset) 130 { 131 m_scrollingTree->scrollPositionChangedViaDelegatedScrolling(nodeID, offset); 132 } 133 123 134 void RemoteScrollingCoordinatorProxy::scrollPositionChanged(WebCore::ScrollingNodeID scrolledNodeID, const WebCore::FloatPoint& newScrollPosition) 124 135 { -
trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h
r161529 r162748 52 52 virtual ~RemoteScrollingCoordinatorProxy(); 53 53 54 // Inform the web process that the scroll position changed .54 // Inform the web process that the scroll position changed (called from the scrolling tree) 55 55 void scrollPositionChanged(WebCore::ScrollingNodeID, const WebCore::FloatPoint& newScrollPosition); 56 57 // Called externally when native views move around. 58 void scrollPositionChangedViaDelegatedScrolling(WebCore::ScrollingNodeID, const WebCore::IntPoint&); 56 59 57 60 // FIXME: expose the tree and pass this to that?
Note: See TracChangeset
for help on using the changeset viewer.