Changeset 172112 in webkit
- Timestamp:
- Aug 5, 2014, 5:54:04 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/frames/orphaned-subtree-expected.txt (added)
-
LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/frames/orphaned-subtree.html (added)
-
LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/frames/resources/leaf-frame.html (added)
-
LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/frames/resources/subframe-inside-fixed.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/scrolling/ScrollingStateTree.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r172099 r172112 1 2014-08-05 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] Crash going back on a specific tumblr blog (under ScrollingStateTree::removeNodeAndAllDescendants) 4 https://bugs.webkit.org/show_bug.cgi?id=135629 5 <rdar://problem/17802174> 6 7 Reviewed by Tim Horton. 8 9 Testcase with nesting of frames inside fixed inside frames, where a subframe disconnects 10 part of the scrolling tree. 11 12 * platform/mac-wk2/tiled-drawing/scrolling/frames/orphaned-subtree-expected.txt: Added. 13 * platform/mac-wk2/tiled-drawing/scrolling/frames/orphaned-subtree.html: Added. 14 * platform/mac-wk2/tiled-drawing/scrolling/frames/resources/leaf-frame.html: Added. 15 * platform/mac-wk2/tiled-drawing/scrolling/frames/resources/subframe-inside-fixed.html: Added. 16 1 17 2014-08-05 Andreas Kling <akling@apple.com> 2 18 -
trunk/Source/WebCore/ChangeLog
r172110 r172112 1 2014-08-05 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] Crash going back on a specific tumblr blog (under ScrollingStateTree::removeNodeAndAllDescendants) 4 https://bugs.webkit.org/show_bug.cgi?id=135629 5 <rdar://problem/17802174> 6 7 Reviewed by Tim Horton. 8 9 In r170198 I added an "orphan scrolling nodes" code path that sets aside subtrees 10 of scrolling nodes into an m_orphanedSubframeNodes map, which keeps them alive until 11 they get reparented or destroyed. The nodes in that subtree remain in m_stateNodeMap, 12 which holds raw pointers to them. 13 14 However, ScrollingStateTree::commit() can clear m_orphanedSubframeNodes, which is 15 sometimes non-empty at this point. When that happened, we would destroy nodes which 16 were still referenced by m_stateNodeMap, with the result that a later query for the 17 same nodeID would hand back a pointer to a deleted object. 18 19 Fix by calling recursiveNodeWillBeRemoved() on nodes in the m_orphanedSubframeNodes 20 before clearing it, which removes them and all their descendants from the state node map. 21 22 Test: platform/mac-wk2/tiled-drawing/scrolling/frames/orphaned-subtree.html 23 24 * page/scrolling/ScrollingStateTree.cpp: 25 (WebCore::ScrollingStateTree::clear): 26 (WebCore::ScrollingStateTree::commit): 27 1 28 2014-08-05 Peyton Randolph <prandolph@apple.com> 2 29 -
trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp
r171311 r172112 153 153 removeNodeAndAllDescendants(rootStateNode()); 154 154 155 ASSERT(m_stateNodeMap.isEmpty());156 155 m_stateNodeMap.clear(); 157 156 m_orphanedSubframeNodes.clear(); … … 160 159 PassOwnPtr<ScrollingStateTree> ScrollingStateTree::commit(LayerRepresentation::Type preferredLayerRepresentation) 161 160 { 162 m_orphanedSubframeNodes.clear(); 161 if (!m_orphanedSubframeNodes.isEmpty()) { 162 // If we still have orphaned subtrees, remove them from m_stateNodeMap since they will be deleted 163 // when clearing m_orphanedSubframeNodes. 164 for (auto& orphanNode : m_orphanedSubframeNodes.values()) 165 recursiveNodeWillBeRemoved(orphanNode.get(), SubframeNodeRemoval::Delete); 166 m_orphanedSubframeNodes.clear(); 167 } 163 168 164 169 // This function clones and resets the current state tree, but leaves the tree structure intact.
Note:
See TracChangeset
for help on using the changeset viewer.