Changeset 224914 in webkit
- Timestamp:
- Nov 16, 2017 5:49:02 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r224912 r224914 1 2017-11-16 Frederic Wang <fwang@igalia.com> 2 3 Consider non-main frames for frameViewRootLayerDidChange 4 https://bugs.webkit.org/show_bug.cgi?id=178508 5 6 Reviewed by Antonio Gomes. 7 8 No new tests, behavior unchanged. 9 10 AsyncScrollingCoordinator::frameViewRootLayerDidChange assumes that frameView is always a 11 main-frame. It calls ensureRootStateNodeForFrameView, which always attaches a frame node with 12 null parent ID. It also has an ASSERT to check m_scrollingStateTree->rootStateNode(), instead 13 of m_scrollingStateTree->stateNodeForID(frameView.scrollLayerID()). This patch makes the 14 ASSERT more generic. It also adds an early return into ensureRootStateNodeForFrameView when the 15 node already exists so that the call to attachToStateTree can be skipped. It turns out that that 16 call is actually only necessary for main frame, so another ASSERT is added to verify it. 17 18 * page/scrolling/AsyncScrollingCoordinator.cpp: 19 (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange): Modify the ASSERT to 20 verify the availability of a scrolling node for the frame, not just the root node. 21 (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView): Add an early return to 22 skip the call to attachToStateTree when the node is actually already available. Add an ASSERT to 23 ensure that attaching a new node is only necessary for main frames. 24 1 25 2017-11-16 Miguel Gomez <magomez@igalia.com> 2 26 -
trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
r223728 r224914 221 221 // If the root layer does not have a ScrollingStateNode, then we should create one. 222 222 ensureRootStateNodeForFrameView(frameView); 223 ASSERT(m_scrollingStateTree-> rootStateNode());223 ASSERT(m_scrollingStateTree->stateNodeForID(frameView.scrollLayerID())); 224 224 225 225 ScrollingCoordinator::frameViewRootLayerDidChange(frameView); … … 513 513 { 514 514 ASSERT(frameView.scrollLayerID()); 515 if (m_scrollingStateTree->stateNodeForID(frameView.scrollLayerID())) 516 return; 517 518 // For non-main frames, it is only possible to arrive in this function from 519 // RenderLayerCompositor::updateBacking where the node has already been created. 520 ASSERT(frameView.frame().isMainFrame()); 515 521 attachToStateTree(FrameScrollingNode, frameView.scrollLayerID(), 0); 516 522 }
Note: See TracChangeset
for help on using the changeset viewer.