Changeset 151088 in webkit
- Timestamp:
- Jun 2, 2013 6:43:24 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r151084 r151088 1 2013-06-02 Brady Eidson <beidson@apple.com> 2 3 Going "back" to a cached page from a page with a main resource error breaks scrolling, amongst other issues. 4 <rdar://problem/13751844> and https://bugs.webkit.org/show_bug.cgi?id=117112 5 6 Reviewed by Alexey Proskuryakov. 7 8 * http/tests/loading/resources/resource-that-goes-back-while-still-loading.php: Added. 9 * http/tests/loading/unfinished-load-back-to-cached-page-callbacks-expected.txt: Added. 10 * http/tests/loading/unfinished-load-back-to-cached-page-callbacks.html: Added. 11 1 12 2013-06-02 Alexey Proskuryakov <ap@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r151083 r151088 1 2013-06-02 Brady Eidson <beidson@apple.com> 2 3 Going "back" to a cached page from a page with a main resource error breaks scrolling, amongst other issues. 4 <rdar://problem/13751844> and https://bugs.webkit.org/show_bug.cgi?id=117112 5 6 Reviewed by Alexey Proskuryakov. 7 8 If a main resource load ends in error, the Document's parser is never cleared out. 9 10 If you then return to a CachedPage, we run the Document->clearParser() step for the 11 old page and that incorrectly dispatches didFinishLoad for the previous page load 12 in the middle of the load for the cached page. 13 14 The parser should never be needed after a load completes (even if it fails) and 15 holding on to the parser after the page load failed but before a new navigation is 16 actually using unnecessary resources. 17 18 So we should just clear the parser right when the main resource fails. 19 20 Test: http/tests/loading/unfinished-load-back-to-cached-page-callbacks.html 21 22 * loader/DocumentLoader.cpp: 23 (WebCore::DocumentLoader::stopLoading): After canceling the main resource load, also clear the parser. 24 1 25 2013-06-02 Csaba Osztrogonác <ossy@webkit.org> 2 26 -
trunk/Source/WebCore/loader/DocumentLoader.cpp
r150967 r151088 295 295 FrameLoader* frameLoader = DocumentLoader::frameLoader(); 296 296 297 if (isLoadingMainResource()) 297 if (isLoadingMainResource()) { 298 298 // Stop the main resource loader and let it send the cancelled message. 299 299 cancelMainResourceLoad(frameLoader->cancelledError(m_request)); 300 else if (!m_subresourceLoaders.isEmpty()) 300 301 // When cancelling the main resource load, we need to also cancel the Document's parser. 302 // Otherwise cancelling the parser when starting the next page load might result 303 // in unexpected side effects such as erroneous event dispatch. ( http://webkit.org/b/117112 ) 304 if (Document* doc = document()) 305 doc->cancelParsing(); 306 } else if (!m_subresourceLoaders.isEmpty()) 301 307 // The main resource loader already finished loading. Set the cancelled error on the 302 308 // document and let the subresourceLoaders send individual cancelled messages below.
Note: See TracChangeset
for help on using the changeset viewer.