Changeset 169913 in webkit
- Timestamp:
- Jun 12, 2014 3:24:13 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r169911 r169913 1 2014-06-12 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] Fix crash on back/foward swipe 4 https://bugs.webkit.org/show_bug.cgi?id=133826 5 <rdar://problem/17032752> 6 7 Reviewed by Tim Horton. 8 9 AsyncScrollingCoordinator::frameViewForScrollingNode() would crash with a null root 10 state node, because HistoryController::restoreScrollPositionAndViewState() tried 11 to restore scroll position (via restoreViewState()) before hooking up the scrolling 12 coordinator. 13 14 Fix by doing the scrollingCoordinator->frameViewRootLayerDidChange() before 15 calling restoreViewState(). 16 17 Also add a defensive null-check on the root state node in updateScrollPositionAfterAsyncScrollTimerFired(). 18 19 * loader/HistoryController.cpp: 20 (WebCore::HistoryController::restoreScrollPositionAndViewState): 21 * page/scrolling/AsyncScrollingCoordinator.cpp: 22 (WebCore::AsyncScrollingCoordinator::frameViewForScrollingNode): 23 1 24 2014-06-12 Anders Carlsson <andersca@apple.com> 2 25 -
trunk/Source/WebCore/loader/HistoryController.cpp
r169603 r169913 125 125 if (!m_currentItem) 126 126 return; 127 128 // FIXME: It would be great to work out a way to put this code in WebCore instead of calling 129 // through to the client. It's currently used only for the PDF view on Mac. 130 m_frame.loader().client().restoreViewState(); 127 128 FrameView* view = m_frame.view(); 131 129 132 130 // FIXME: There is some scrolling related work that needs to happen whenever a page goes into the … … 135 133 // Document::setIsInPageCache(bool). It would be nice if there was more symmetry in these spots. 136 134 // https://bugs.webkit.org/show_bug.cgi?id=98698 137 if ( FrameView* view = m_frame.view()) {135 if (view) { 138 136 Page* page = m_frame.page(); 139 137 if (page && m_frame.isMainFrame()) { … … 141 139 scrollingCoordinator->frameViewRootLayerDidChange(view); 142 140 } 141 } 142 143 // FIXME: It would be great to work out a way to put this code in WebCore instead of calling 144 // through to the client. 145 m_frame.loader().client().restoreViewState(); 143 146 144 147 #if !PLATFORM(IOS) 145 146 if (!view->wasScrolledByUser()) {147 148 149 150 151 148 // Don't restore scroll point on iOS as FrameLoaderClient::restoreViewState() does that. 149 if (view && !view->wasScrolledByUser()) { 150 if (page && m_frame.isMainFrame() && m_currentItem->pageScaleFactor()) 151 page->setPageScaleFactor(m_currentItem->pageScaleFactor(), m_currentItem->scrollPoint()); 152 else 153 view->setScrollPosition(m_currentItem->scrollPoint()); 154 } 152 155 #endif 153 }154 156 } 155 157 -
trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
r169733 r169913 198 198 FrameView* AsyncScrollingCoordinator::frameViewForScrollingNode(ScrollingNodeID scrollingNodeID) const 199 199 { 200 if (!m_scrollingStateTree->rootStateNode()) 201 return nullptr; 202 200 203 if (scrollingNodeID == m_scrollingStateTree->rootStateNode()->scrollingNodeID()) 201 204 return m_page->mainFrame().view();
Note: See TracChangeset
for help on using the changeset viewer.