Changeset 207080 in webkit
- Timestamp:
- Oct 11, 2016 3:38:37 AM (8 years ago)
- Location:
- releases/WebKitGTK/webkit-2.14
- Files:
-
- 6 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.14/LayoutTests/ChangeLog
r207078 r207080 1 2016-09-16 Chris Dumez <cdumez@apple.com> 2 3 Cancelling one frame's load cancels load in other frames that have the same URL as well 4 https://bugs.webkit.org/show_bug.cgi?id=162094 5 6 Reviewed by Antti Koivisto. 7 8 Add layout test coverage. 9 10 * http/tests/cache/iframe-detach-expected.txt: Added. 11 * http/tests/cache/iframe-detach.html: Added. 12 * http/tests/cache/resources/slow-iframe.php: Added. 13 Import Alex Christensen's test from Bug 157563. 14 15 * http/tests/navigation/frames-same-url-cancel-load-expected.txt: Added. 16 * http/tests/navigation/frames-same-url-cancel-load.html: Added. 17 * http/tests/navigation/resources/success.html: Added. 18 * http/tests/security/XFrameOptions/x-frame-options-deny-multiple-clients-expected.txt: 19 1 20 2016-09-15 Zalan Bujtas <zalan@apple.com> 2 21 -
releases/WebKitGTK/webkit-2.14/LayoutTests/http/tests/security/XFrameOptions/x-frame-options-deny-multiple-clients-expected.txt
r180202 r207080 1 CONSOLE MESSAGE: Refused to display 'http://127.0.0.1:8000/security/XFrameOptions/resources/x-frame-options-deny.cgi' in a frame because it set 'X-Frame-Options' to 'deny'. 2 ALERT: PASS: onload fired. 1 3 CONSOLE MESSAGE: Refused to display 'http://127.0.0.1:8000/security/XFrameOptions/resources/x-frame-options-deny.cgi' in a frame because it set 'X-Frame-Options' to 'deny'. 2 4 ALERT: PASS: onload fired. -
releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog
r207079 r207080 1 2016-09-16 Chris Dumez <cdumez@apple.com> 2 3 Cancelling one frame's load cancels load in other frames that have the same URL as well 4 https://bugs.webkit.org/show_bug.cgi?id=162094 5 6 Reviewed by Antti Koivisto. 7 8 Cancelling one frame's load cancels load in other frames that have the same URL as well. 9 10 So if you have several frames that are loading URL X and you navigate one of the frames 11 to Y, then the load of X will be cancelled and this frame will navigate to Y. All other 12 frames will not load URL X even though they should. 13 14 The issue is that all the DocumentLoaders share the same CachedResource because of the 15 memoryCache. When we call DocumentLoader::stopLoading(), it will cancel the 16 CachedResource's load even though there are several clients for this CachedResource 17 and other clients still want the load. 18 19 The approach chosen in this patch is to not reuse CachedResources that are still 20 loading when trying to load a main resource. This is not the most efficient approach. 21 I still chose this approach because: 22 - It is very unlikely to introduce new bugs. 23 - The change is very simple. 24 - This is a corner case (several iframes having the same URL and cancelling the load in 25 one of them). 26 27 Test: http/tests/navigation/frames-same-url-cancel-load.html 28 29 * loader/cache/CachedResourceLoader.cpp: 30 (WebCore::CachedResourceLoader::determineRevalidationPolicy): 31 1 32 2016-09-16 Michael Catanzaro <mcatanzaro@igalia.com> 2 33 -
releases/WebKitGTK/webkit-2.14/Source/WebCore/loader/cache/CachedResourceLoader.cpp
r204976 r207080 865 865 return Reload; 866 866 } 867 868 // For resources that are not yet loaded we ignore the cache policy. 869 if (existingResource->isLoading()) 867 868 if (existingResource->isLoading()) { 869 // Do not use cached main resources that are still loading because sharing 870 // loading CachedResources in this case causes issues with regards to cancellation. 871 // If one of the DocumentLoader clients decides to cancel the load, then the load 872 // would be cancelled for all other DocumentLoaders as well. 873 if (type == CachedResource::Type::MainResource) 874 return Reload; 875 // For cached subresources that are still loading we ignore the cache policy. 870 876 return Use; 877 } 871 878 872 879 auto revalidationDecision = existingResource->makeRevalidationDecision(cachePolicy(type));
Note: See TracChangeset
for help on using the changeset viewer.