Changeset 251019 in webkit
- Timestamp:
- Oct 11, 2019 1:26:15 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r251016 r251019 1 2019-10-11 Chris Dumez <cdumez@apple.com> 2 3 Pages frequently fail to enter the back/forward cache due to frames with a quick redirect coming 4 https://bugs.webkit.org/show_bug.cgi?id=202768 5 <rdar://problem/56132022> 6 7 Reviewed by Alex Christensen. 8 9 Add lauout test coverage. 10 11 * fast/history/page-cache-iframe-js-url-expected.txt: Added. 12 * fast/history/page-cache-iframe-js-url.html: Added. 13 1 14 2019-10-11 Kate Cheney <katherine_cheney@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r251015 r251019 1 2019-10-11 Chris Dumez <cdumez@apple.com> 2 3 Pages frequently fail to enter the back/forward cache due to frames with a quick redirect coming 4 https://bugs.webkit.org/show_bug.cgi?id=202768 5 <rdar://problem/56132022> 6 7 Reviewed by Alex Christensen. 8 9 When a quick redirect is scheduled with the navigation scheduler, we set the m_quickRedirectComing flag. 10 This flag is supposed to get unset if the navigation gets cancelled and when the navigation actually 11 happens. However, for a navigation to a javascript: URL, we would return early after executing the JS 12 and fail to reset the m_quickRedirectComing flag. Later on, we would fail to enter the page cache because 13 we would think that the iframe still has a quick redirect scheduled. 14 15 Test: fast/history/page-cache-iframe-js-url.html 16 17 * loader/FrameLoader.cpp: 18 (WebCore::FrameLoader::urlSelected): 19 Reset the m_quickRedirectComing flag if we return early after executing 20 the javascript URL. 21 22 (WebCore::FrameLoader::stopForPageCache): 23 Stop policy checks & cancel scheduled navigations after stopping loads. Stopping loads may 24 run script which may in theory schedule new navigations. This is hardening. 25 1 26 2019-10-11 Antti Koivisto <antti@apple.com> 2 27 -
trunk/Source/WebCore/loader/FrameLoader.cpp
r250686 r251019 396 396 Ref<Frame> protect(m_frame); 397 397 398 if (m_frame.script().executeIfJavaScriptURL(frameRequest.resourceRequest().url(), frameRequest.shouldReplaceDocumentIfJavaScriptURL())) 399 return; 398 if (m_frame.script().executeIfJavaScriptURL(frameRequest.resourceRequest().url(), frameRequest.shouldReplaceDocumentIfJavaScriptURL())) { 399 m_quickRedirectComing = false; 400 return; 401 } 400 402 401 403 if (frameRequest.frameName().isEmpty()) … … 1848 1850 void FrameLoader::stopForPageCache() 1849 1851 { 1850 // Make sure there are no scheduled loads or policy checks.1851 policyChecker().stopCheck();1852 m_frame.navigationScheduler().cancel();1853 1854 1852 // Stop provisional loads in subframes (The one in the main frame is about to be committed). 1855 1853 if (!m_frame.isMainFrame()) { … … 1865 1863 for (RefPtr<Frame> child = m_frame.tree().firstChild(); child; child = child->tree().nextSibling()) 1866 1864 child->loader().stopForPageCache(); 1865 1866 // Make sure there are no scheduled loads or policy checks. 1867 policyChecker().stopCheck(); 1868 m_frame.navigationScheduler().cancel(); 1867 1869 } 1868 1870
Note: See TracChangeset
for help on using the changeset viewer.