Changeset 182799 in webkit
- Timestamp:
- Apr 14, 2015 10:25:31 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r182797 r182799 1 2015-04-13 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] Interactive elements of developer.apple.com are broken 4 https://bugs.webkit.org/show_bug.cgi?id=143692 5 6 Reviewed by Sam Weinig. 7 8 * platform/ios-simulator-wk2/scrolling/remove-scrolling-role-expected.txt: Added. 9 * platform/ios-simulator-wk2/scrolling/remove-scrolling-role.html: Added. 10 1 11 2015-04-14 Commit Queue <commit-queue@webkit.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r182797 r182799 1 2015-04-13 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] Interactive elements of developer.apple.com are broken 4 https://bugs.webkit.org/show_bug.cgi?id=143692 5 rdar://problem/19320087 6 7 Reviewed by Sam Weinig. 8 9 When a composited RenderLayer had nodes in the scrolling tree by virtue of 10 both position and overflow:scroll, and one of those reasons disappeared, 11 we'd fail to remove the corresponding node from the scrolling tree. This 12 could leave an overflow:scroll element behaving as if it were position:fixed. 13 14 Fix by having RenderLayerCompositor::updateScrollCoordinationForThisFrame() 15 detach the layer on a per-role basis. 16 17 Test: platform/ios-simulator-wk2/scrolling/remove-scrolling-role.html 18 19 * rendering/RenderLayerBacking.cpp: 20 (WebCore::RenderLayerBacking::detachFromScrollingCoordinatorForRole): 21 * rendering/RenderLayerBacking.h: 22 * rendering/RenderLayerCompositor.cpp: 23 (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayerForRole): 24 (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer): Just moved. 25 (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): Call detachScrollCoordinatedLayerForRole() 26 if the layer doesn't have the relevant scrolling reasons. 27 * rendering/RenderLayerCompositor.h: 28 1 29 2015-04-14 Commit Queue <commit-queue@webkit.org> 2 30 -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r182132 r182799 1571 1571 } 1572 1572 1573 void RenderLayerBacking::detachFromScrollingCoordinatorForRole(ScrollingNodeType role) 1574 { 1575 ScrollingNodeID nodeID = scrollingNodeIDForRole(role); 1576 if (!nodeID) 1577 return; 1578 1579 ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLayer(m_owningLayer); 1580 if (!scrollingCoordinator) 1581 return; 1582 1583 scrollingCoordinator->detachFromStateTree(nodeID); 1584 setScrollingNodeIDForRole(0, role); 1585 } 1586 1573 1587 GraphicsLayerPaintingPhase RenderLayerBacking::paintingPhaseForPrimaryLayer() const 1574 1588 { -
trunk/Source/WebCore/rendering/RenderLayerBacking.h
r180965 r182799 109 109 110 110 void detachFromScrollingCoordinator(); 111 void detachFromScrollingCoordinatorForRole(ScrollingNodeType); 111 112 112 113 ScrollingNodeID scrollingNodeIDForRole(ScrollingNodeType nodeType) const -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r182132 r182799 3814 3814 } 3815 3815 3816 void RenderLayerCompositor::detachScrollCoordinatedLayerForRole(RenderLayer& layer, ScrollingNodeType role) 3817 { 3818 RenderLayerBacking* backing = layer.backing(); 3819 if (!backing) 3820 return; 3821 3822 if (ScrollingNodeID nodeID = backing->scrollingNodeIDForRole(role)) 3823 m_scrollingNodeToLayerMap.remove(nodeID); 3824 3825 backing->detachFromScrollingCoordinatorForRole(role); 3826 } 3827 3828 void RenderLayerCompositor::detachScrollCoordinatedLayer(RenderLayer& layer) 3829 { 3830 RenderLayerBacking* backing = layer.backing(); 3831 if (!backing) 3832 return; 3833 3834 if (ScrollingNodeID nodeID = backing->scrollingNodeIDForRole(FrameScrollingNode)) 3835 m_scrollingNodeToLayerMap.remove(nodeID); 3836 3837 if (ScrollingNodeID nodeID = backing->scrollingNodeIDForRole(FixedNode)) 3838 m_scrollingNodeToLayerMap.remove(nodeID); 3839 3840 backing->detachFromScrollingCoordinator(); 3841 } 3842 3816 3843 void RenderLayerCompositor::updateScrollCoordinationForThisFrame(ScrollingNodeID parentNodeID) 3817 3844 { … … 3884 3911 3885 3912 parentNodeID = nodeID; 3886 } 3913 } else 3914 detachScrollCoordinatedLayerForRole(layer, FixedNode); 3887 3915 3888 3916 if (reasons & Scrolling) { … … 3909 3937 scrollingCoordinator->updateOverflowScrollingNode(nodeID, backing->scrollingLayer(), backing->scrollingContentsLayer(), &scrollingGeometry); 3910 3938 } 3911 } 3912 } 3913 3914 void RenderLayerCompositor::detachScrollCoordinatedLayer(RenderLayer& layer) 3915 { 3916 RenderLayerBacking* backing = layer.backing(); 3917 if (!backing) 3918 return; 3919 3920 if (ScrollingNodeID nodeID = backing->scrollingNodeIDForRole(FrameScrollingNode)) 3921 m_scrollingNodeToLayerMap.remove(nodeID); 3922 3923 if (ScrollingNodeID nodeID = backing->scrollingNodeIDForRole(FixedNode)) 3924 m_scrollingNodeToLayerMap.remove(nodeID); 3925 3926 backing->detachFromScrollingCoordinator(); 3939 } else 3940 detachScrollCoordinatedLayerForRole(layer, OverflowScrollingNode); 3927 3941 } 3928 3942 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.h
r181656 r182799 435 435 void updateScrollCoordinatedLayer(RenderLayer&, ScrollCoordinationReasons); 436 436 void detachScrollCoordinatedLayer(RenderLayer&); 437 void detachScrollCoordinatedLayerForRole(RenderLayer&, ScrollingNodeType); 437 438 void reattachSubframeScrollLayers(); 438 439
Note: See TracChangeset
for help on using the changeset viewer.