Changeset 169123 in webkit
- Timestamp:
- May 20, 2014 12:13:14 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r169120 r169123 1 2014-05-19 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION (r169063) Fixed and sticky nodes misplaced on scrolling sometimes 4 https://bugs.webkit.org/show_bug.cgi?id=133106 5 <rdar://problem/16967648> 6 7 Reviewed by Sam Weinig. 8 9 Fix regression from r169063. That commit removed scrolledContentsLayers from 10 frame scrolling nodes, but they do actually use them. 11 12 So put them back; not in the base class, because they have a somewhat different 13 meaning for overflow scrolling and frame scrolling. 14 15 * WebCore.exp.in: 16 * page/scrolling/AsyncScrollingCoordinator.cpp: 17 (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange): 18 (WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode): 19 * page/scrolling/AsyncScrollingCoordinator.h: 20 * page/scrolling/ScrollingCoordinator.h: 21 (WebCore::ScrollingCoordinator::updateFrameScrollingNode): 22 * page/scrolling/ScrollingStateFrameScrollingNode.cpp: 23 (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode): 24 (WebCore::ScrollingStateFrameScrollingNode::setScrolledContentsLayer): 25 * page/scrolling/ScrollingStateFrameScrollingNode.h: 26 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: 27 (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren): 28 * rendering/RenderLayerCompositor.cpp: 29 (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): 30 1 31 2014-05-20 Radu Stavila <stavila@adobe.com> 2 32 -
trunk/Source/WebCore/WebCore.exp.in
r169063 r169123 827 827 __ZN7WebCore20ApplicationCacheHost17maybeLoadResourceEPNS_14ResourceLoaderERKNS_15ResourceRequestERKNS_3URLE 828 828 __ZN7WebCore20ApplicationCacheHost25maybeLoadFallbackForErrorEPNS_14ResourceLoaderERKNS_13ResourceErrorE 829 __ZN7WebCore20ApplicationCacheHost28maybeLoadFallbackForRedirectEPNS_14ResourceLoaderERNS_15ResourceRequestERKNS_16ResourceResponseE 829 830 __ZN7WebCore20ApplicationCacheHost28maybeLoadFallbackForResponseEPNS_14ResourceLoaderERKNS_16ResourceResponseE 830 __ZN7WebCore20ApplicationCacheHost28maybeLoadFallbackForRedirectEPNS_14ResourceLoaderERNS_15ResourceRequestERKNS_16ResourceResponseE831 831 __ZN7WebCore20CachedResourceLoader31garbageCollectDocumentResourcesEv 832 832 __ZN7WebCore20DictationAlternativeC1Ejjy … … 2816 2816 __ZN7WebCore25AsyncScrollingCoordinator19detachFromStateTreeEy 2817 2817 __ZN7WebCore25AsyncScrollingCoordinator22frameViewLayoutUpdatedEPNS_9FrameViewE 2818 __ZN7WebCore25AsyncScrollingCoordinator24updateFrameScrollingNodeEyPNS_13GraphicsLayerES2_S2_ PKNS_20ScrollingCoordinator17ScrollingGeometryE2818 __ZN7WebCore25AsyncScrollingCoordinator24updateFrameScrollingNodeEyPNS_13GraphicsLayerES2_S2_S2_PKNS_20ScrollingCoordinator17ScrollingGeometryE 2819 2819 __ZN7WebCore25AsyncScrollingCoordinator27frameViewRootLayerDidChangeEPNS_9FrameViewE 2820 2820 __ZN7WebCore25AsyncScrollingCoordinator27requestScrollPositionUpdateEPNS_9FrameViewERKNS_8IntPointE … … 2847 2847 __ZN7WebCore32ScrollingStateFrameScrollingNode21setContentShadowLayerERKNS_19LayerRepresentationE 2848 2848 __ZN7WebCore32ScrollingStateFrameScrollingNode24setCounterScrollingLayerERKNS_19LayerRepresentationE 2849 __ZN7WebCore32ScrollingStateFrameScrollingNode24setScrolledContentsLayerERKNS_19LayerRepresentationE 2849 2850 __ZN7WebCore32ScrollingStateFrameScrollingNode25setWheelEventHandlerCountEj 2850 2851 __ZN7WebCore32ScrollingStateFrameScrollingNode26setNonFastScrollableRegionERKNS_6RegionE -
trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
r169063 r169123 135 135 ScrollingStateFrameScrollingNode* node = toScrollingStateFrameScrollingNode(m_scrollingStateTree->stateNodeForID(frameView->scrollLayerID())); 136 136 node->setLayer(scrollLayerForFrameView(frameView)); 137 node->setScrolledContentsLayer(rootContentLayerForFrameView(frameView)); 137 138 node->setCounterScrollingLayer(counterScrollingLayerForFrameView(frameView)); 138 139 node->setInsetClipLayer(insetClipLayerForFrameView(frameView)); … … 329 330 } 330 331 331 void AsyncScrollingCoordinator::updateFrameScrollingNode(ScrollingNodeID nodeID, GraphicsLayer* layer, GraphicsLayer* counterScrollingLayer, GraphicsLayer* insetClipLayer, const ScrollingGeometry* scrollingGeometry)332 void AsyncScrollingCoordinator::updateFrameScrollingNode(ScrollingNodeID nodeID, GraphicsLayer* layer, GraphicsLayer* scrolledContentsLayer, GraphicsLayer* counterScrollingLayer, GraphicsLayer* insetClipLayer, const ScrollingGeometry* scrollingGeometry) 332 333 { 333 334 ScrollingStateFrameScrollingNode* node = toScrollingStateFrameScrollingNode(m_scrollingStateTree->stateNodeForID(nodeID)); … … 338 339 node->setLayer(layer); 339 340 node->setInsetClipLayer(insetClipLayer); 341 node->setScrolledContentsLayer(scrolledContentsLayer); 340 342 node->setCounterScrollingLayer(counterScrollingLayer); 341 343 -
trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h
r169063 r169123 89 89 virtual void updateViewportConstrainedNode(ScrollingNodeID, const ViewportConstraints&, GraphicsLayer*) override; 90 90 91 virtual void updateFrameScrollingNode(ScrollingNodeID, GraphicsLayer* scrollLayer, GraphicsLayer* counterScrollingLayer, GraphicsLayer* insetClipLayer, const ScrollingGeometry* = nullptr);91 virtual void updateFrameScrollingNode(ScrollingNodeID, GraphicsLayer* scrollLayer, GraphicsLayer* scrolledContentsLayer, GraphicsLayer* counterScrollingLayer, GraphicsLayer* insetClipLayer, const ScrollingGeometry* = nullptr); 92 92 virtual void updateOverflowScrollingNode(ScrollingNodeID, GraphicsLayer* scrollLayer, GraphicsLayer* scrolledContentsLayer, const ScrollingGeometry* = nullptr); 93 93 -
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h
r169063 r169123 166 166 }; 167 167 168 virtual void updateFrameScrollingNode(ScrollingNodeID, GraphicsLayer* /*scrollLayer*/, GraphicsLayer* /* counterScrollingLayer*/, GraphicsLayer* /*insetClipLayer*/, const ScrollingGeometry* = nullptr) { }168 virtual void updateFrameScrollingNode(ScrollingNodeID, GraphicsLayer* /*scrollLayer*/, GraphicsLayer* /*scrolledContentsLayer*/, GraphicsLayer* /*counterScrollingLayer*/, GraphicsLayer* /*insetClipLayer*/, const ScrollingGeometry* = nullptr) { } 169 169 virtual void updateOverflowScrollingNode(ScrollingNodeID, GraphicsLayer* /*scrollLayer*/, GraphicsLayer* /*scrolledContentsLayer*/, const ScrollingGeometry* = nullptr) { } 170 170 virtual void syncChildPositions(const LayoutRect&) { } -
trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp
r169063 r169123 74 74 , m_topContentInset(stateNode.topContentInset()) 75 75 { 76 if (hasChangedProperty(ScrolledContentsLayer)) 77 setScrolledContentsLayer(stateNode.scrolledContentsLayer().toRepresentation(adoptiveTree.preferredLayerRepresentation())); 78 76 79 if (hasChangedProperty(CounterScrollingLayer)) 77 80 setCounterScrollingLayer(stateNode.counterScrollingLayer().toRepresentation(adoptiveTree.preferredLayerRepresentation())); … … 170 173 m_topContentInset = topContentInset; 171 174 setPropertyChanged(TopContentInset); 175 } 176 177 void ScrollingStateFrameScrollingNode::setScrolledContentsLayer(const LayerRepresentation& layerRepresentation) 178 { 179 if (layerRepresentation == m_scrolledContentsLayer) 180 return; 181 182 m_scrolledContentsLayer = layerRepresentation; 183 setPropertyChanged(ScrolledContentsLayer); 172 184 } 173 185 -
trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h
r169063 r169123 53 53 WheelEventHandlerCount, 54 54 ReasonsForSynchronousScrolling, 55 ScrolledContentsLayer, 55 56 CounterScrollingLayer, 56 57 InsetClipLayer, … … 88 89 float topContentInset() const { return m_topContentInset; } 89 90 void setTopContentInset(float); 90 91 92 const LayerRepresentation& scrolledContentsLayer() const { return m_scrolledContentsLayer; } 93 void setScrolledContentsLayer(const LayerRepresentation&); 94 91 95 // This is a layer moved in the opposite direction to scrolling, for example for background-attachment:fixed 92 96 const LayerRepresentation& counterScrollingLayer() const { return m_counterScrollingLayer; } … … 125 129 LayerRepresentation m_counterScrollingLayer; 126 130 LayerRepresentation m_insetClipLayer; 131 LayerRepresentation m_scrolledContentsLayer; 127 132 LayerRepresentation m_contentShadowLayer; 128 133 LayerRepresentation m_headerLayer; -
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm
r169063 r169123 78 78 if (scrollingStateNode.hasChangedProperty(ScrollingStateNode::ScrollLayer)) 79 79 m_scrollLayer = scrollingStateNode.layer(); 80 80 81 if (scrollingStateNode.hasChangedProperty(ScrollingStateFrameScrollingNode::ScrolledContentsLayer)) 82 m_scrolledContentsLayer = scrollingStateNode.scrolledContentsLayer(); 83 81 84 if (scrollingStateNode.hasChangedProperty(ScrollingStateFrameScrollingNode::CounterScrollingLayer)) 82 85 m_counterScrollingLayer = scrollingStateNode.counterScrollingLayer(); -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r169096 r169123 3674 3674 counterScrollingLayer = fixedRootBackgroundLayer(); 3675 3675 insetClipLayer = clipLayer(); 3676 scrollingCoordinator->updateFrameScrollingNode(nodeID, scrollingLayer, counterScrollingLayer, insetClipLayer);3676 scrollingCoordinator->updateFrameScrollingNode(nodeID, scrollingLayer, scrolledContentsLayer, counterScrollingLayer, insetClipLayer); 3677 3677 } else { 3678 3678 ScrollingCoordinator::ScrollingGeometry scrollingGeometry; -
trunk/Source/WebKit2/ChangeLog
r169122 r169123 1 2014-05-19 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION (r169063) Fixed and sticky nodes misplaced on scrolling sometimes 4 https://bugs.webkit.org/show_bug.cgi?id=133106 5 <rdar://problem/16967648> 6 7 Reviewed by Sam Weinig. 8 9 Fix regression from r169063. That commit removed scrolledContentsLayers from 10 frame scrolling nodes, but they do actually use them. 11 12 So put them back; not in the base class, because they have a somewhat different 13 meaning for overflow scrolling and frame scrolling. 14 15 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp: 16 (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode): 17 (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode): 18 (WebKit::RemoteScrollingTreeTextStream::dump): 19 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: 20 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers): 21 1 22 2014-05-20 Alexey Proskuryakov <ap@apple.com> 2 23 -
trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp
r169063 r169123 146 146 SCROLLING_NODE_ENCODE(ScrollingStateFrameScrollingNode::TopContentInset, topContentInset) 147 147 148 if (node.hasChangedProperty(ScrollingStateFrameScrollingNode::ScrolledContentsLayer)) 149 encoder << static_cast<GraphicsLayer::PlatformLayerID>(node.scrolledContentsLayer()); 150 148 151 if (node.hasChangedProperty(ScrollingStateFrameScrollingNode::CounterScrollingLayer)) 149 152 encoder << static_cast<GraphicsLayer::PlatformLayerID>(node.counterScrollingLayer()); … … 220 223 SCROLLING_NODE_DECODE(ScrollingStateFrameScrollingNode::FooterHeight, int, setFooterHeight); 221 224 SCROLLING_NODE_DECODE(ScrollingStateFrameScrollingNode::TopContentInset, float, setTopContentInset); 225 226 if (node.hasChangedProperty(ScrollingStateFrameScrollingNode::ScrolledContentsLayer)) { 227 GraphicsLayer::PlatformLayerID layerID; 228 if (!decoder.decode(layerID)) 229 return false; 230 node.setScrolledContentsLayer(layerID); 231 } 222 232 223 233 if (node.hasChangedProperty(ScrollingStateFrameScrollingNode::CounterScrollingLayer)) { … … 596 606 dumpProperty(ts, "top-content-inset", node.topContentInset()); 597 607 608 if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateFrameScrollingNode::ScrolledContentsLayer)) 609 dumpProperty(ts, "scrolled-contents-layer", static_cast<GraphicsLayer::PlatformLayerID>(node.scrolledContentsLayer())); 610 598 611 if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateFrameScrollingNode::InsetClipLayer)) 599 612 dumpProperty(ts, "clip-inset-layer", static_cast<GraphicsLayer::PlatformLayerID>(node.insetClipLayer())); 600 601 613 602 614 if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateFrameScrollingNode::ContentShadowLayer)) -
trunk/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp
r169063 r169123 104 104 ScrollingStateFrameScrollingNode* scrollingStateNode = toScrollingStateFrameScrollingNode(currNode); 105 105 106 if (scrollingStateNode->hasChangedProperty(ScrollingStateFrameScrollingNode::ScrolledContentsLayer)) 107 scrollingStateNode->setScrolledContentsLayer(layerTreeHost.getLayer(scrollingStateNode->scrolledContentsLayer())); 108 106 109 if (scrollingStateNode->hasChangedProperty(ScrollingStateFrameScrollingNode::CounterScrollingLayer)) 107 110 scrollingStateNode->setCounterScrollingLayer(layerTreeHost.getLayer(scrollingStateNode->counterScrollingLayer()));
Note: See TracChangeset
for help on using the changeset viewer.