Changeset 143074 in webkit
- Timestamp:
- Feb 15, 2013, 5:20:38 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r143073 r143074 1 2013-02-15 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION (r142505?): Crashes in WebCore::ScrollingStateNode::appendChild when using back/forward buttons 4 https://bugs.webkit.org/show_bug.cgi?id=109826 5 <rdar://problem/13216100> 6 7 Reviewed by Beth Dakin. 8 9 Test having a page with an iframe that navigates forwards then back. 10 11 * platform/mac-wk2/tiled-drawing/null-parent-back-crash.html: Added. 12 1 13 2013-02-15 Simon Fraser <simon.fraser@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r143073 r143074 1 2013-02-15 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION (r142505?): Crashes in WebCore::ScrollingStateNode::appendChild when using back/forward buttons 4 https://bugs.webkit.org/show_bug.cgi?id=109826 5 <rdar://problem/13216100> 6 7 Reviewed by Beth Dakin. 8 9 Fix a crash when going Back on some pages with fixed position elements. 10 11 When a page was being restored from the page cache, and a layout from 12 FrameLoader::commitProvisionalLoad() caused us to try to register the fixed 13 position layer before the main scrolling layer, we'd crash trying to dereference 14 the root node. 15 16 Fix by bailing from ScrollingStateTree::attachNode() if we can't find the parent 17 node. 18 19 Test: platform/mac-wk2/tiled-drawing/null-parent-back-crash.html 20 21 * page/scrolling/ScrollingStateTree.cpp: 22 (WebCore::ScrollingStateTree::attachNode): 23 (WebCore::ScrollingStateTree::stateNodeForID): 24 * page/scrolling/mac/ScrollingCoordinatorMac.mm: 25 (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode): 26 1 27 2013-02-15 Simon Fraser <simon.fraser@apple.com> 2 28 -
trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp
r142691 r143074 74 74 } else { 75 75 ScrollingStateNode* parent = stateNodeForID(parentID); 76 if (!parent) 77 return 0; 78 76 79 switch (nodeType) { 77 80 case FixedNode: { … … 95 98 break; 96 99 } 97 default:98 ASSERT_NOT_REACHED();99 100 } 100 101 } … … 176 177 return 0; 177 178 179 ASSERT(it->value->scrollingNodeID() == scrollLayerID); 178 180 return it->value; 179 181 } -
trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm
r142691 r143074 349 349 ASSERT(supportsFixedPositionLayers()); 350 350 351 ScrollingStateNode* node = m_scrollingStateTree->stateNodeForID(nodeID); 352 if (!node) 353 return; 354 351 355 switch (constraints.constraintType()) { 352 356 case ViewportConstraints::FixedPositionConstaint: { 353 ScrollingStateFixedNode* node = toScrollingStateFixedNode(m_scrollingStateTree->stateNodeForID(nodeID));354 setScrollLayerForNode(graphicsLayer, node);355 node->updateConstraints((const FixedPositionViewportConstraints&)constraints);357 ScrollingStateFixedNode* fixedNode = toScrollingStateFixedNode(node); 358 setScrollLayerForNode(graphicsLayer, fixedNode); 359 fixedNode->updateConstraints((const FixedPositionViewportConstraints&)constraints); 356 360 break; 357 361 } 358 362 case ViewportConstraints::StickyPositionConstraint: { 359 ScrollingStateStickyNode* node = toScrollingStateStickyNode(m_scrollingStateTree->stateNodeForID(nodeID));360 setScrollLayerForNode(graphicsLayer, node);361 node->updateConstraints((const StickyPositionViewportConstraints&)constraints);363 ScrollingStateStickyNode* stickyNode = toScrollingStateStickyNode(node); 364 setScrollLayerForNode(graphicsLayer, stickyNode); 365 stickyNode->updateConstraints((const StickyPositionViewportConstraints&)constraints); 362 366 break; 363 367 }
Note:
See TracChangeset
for help on using the changeset viewer.