Changeset 228461 in webkit
- Timestamp:
- Feb 13, 2018 10:57:35 PM (6 years ago)
- Location:
- branches/safari-605-branch
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-605-branch/Source/WebCore/ChangeLog
r228450 r228461 1 2018-02-13 Jason Marcell <jmarcell@apple.com> 2 3 Cherry-pick r228430. rdar://problem/37518683 4 5 2018-02-13 Chris Dumez <cdumez@apple.com> 6 7 REGRESSION (r228299): Broke reader mode in Safari 8 https://bugs.webkit.org/show_bug.cgi?id=182697 9 <rdar://problem/37399012> 10 11 Reviewed by Ryosuke Niwa. 12 13 Rework the fix for r228299 to be more targeted. I moved the policy check 14 cencelation from FrameLoader::stopLoading() to NavigationScheduler::schedule() 15 when a pending load is cancelled by another load. I have verified that the 16 sites fixed by r228299 still work with this more limited change. However, 17 reader mode is now working again. 18 19 The issue seems to be that we tell CFNetwork to continue with the load after 20 receiving the response, even if the client has not responded to the 21 decidePolicyForNavigationResponse delegate yet. As a result, CFNetwork sends 22 us the resource data and we may commit the provisional load before receiving 23 the policy response from the client. When the provisional load is committed, 24 we call FrameLoader::stopLoading() which after r228299 cancelled pending 25 policy checks. Because we did not wait for the policy check response to 26 commit the load, we would cancel it which would make the load fail. 27 28 The real fix here would be to make not tell CFNetwork to continue until after 29 we've received the policy delegate response. However, this is a larger and 30 riskier change at this point. I will follow-up on this issue. 31 32 Covered by new API test. 33 34 * loader/FrameLoader.cpp: 35 (WebCore::FrameLoader::stopLoading): 36 * loader/NavigationScheduler.cpp: 37 (WebCore::NavigationScheduler::schedule): 38 1 39 2018-02-13 Jason Marcell <jmarcell@apple.com> 2 40 -
branches/safari-605-branch/Source/WebCore/loader/FrameLoader.cpp
r228447 r228461 489 489 } 490 490 491 policyChecker().stopCheck();492 493 491 // FIXME: This will cancel redirection timer, which really needs to be restarted when restoring the frame from b/f cache. 494 492 m_frame.navigationScheduler().cancel(); -
branches/safari-605-branch/Source/WebCore/loader/NavigationScheduler.cpp
r226894 r228461 51 51 #include "NavigationDisabler.h" 52 52 #include "Page.h" 53 #include "PolicyChecker.h" 53 54 #include "ScriptController.h" 54 55 #include "UserGestureIndicator.h" … … 521 522 if (DocumentLoader* provisionalDocumentLoader = m_frame.loader().provisionalDocumentLoader()) 522 523 provisionalDocumentLoader->stopLoading(); 524 m_frame.loader().policyChecker().stopCheck(); 523 525 m_frame.loader().stopLoading(UnloadEventPolicyUnloadAndPageHide); 524 526 } -
branches/safari-605-branch/Tools/ChangeLog
r228380 r228461 1 2018-02-13 Jason Marcell <jmarcell@apple.com> 2 3 Cherry-pick r228430. rdar://problem/37518683 4 5 2018-02-13 Chris Dumez <cdumez@apple.com> 6 7 REGRESSION (r228299): Broke reader mode in Safari 8 https://bugs.webkit.org/show_bug.cgi?id=182697 9 <rdar://problem/37399012> 10 11 Reviewed by Ryosuke Niwa. 12 13 Add API test coverage for responding asynchronously to the decidePolicyForNavigationResponse 14 delegate. 15 16 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 17 * TestWebKitAPI/Tests/WebKitCocoa/AsyncPolicyForNavigationResponse.mm: Added. 18 (-[TestAsyncNavigationDelegate webView:didFinishNavigation:]): 19 (-[TestAsyncNavigationDelegate webView:didFailNavigation:withError:]): 20 (-[TestAsyncNavigationDelegate webView:didFailProvisionalNavigation:withError:]): 21 (-[TestAsyncNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]): 22 (-[TestAsyncNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]): 23 (TestWebKitAPI::TEST): 24 1 25 2018-02-12 Jason Marcell <jmarcell@apple.com> 2 26 -
branches/safari-605-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r228360 r228461 531 531 7CEFA9661AC0B9E200B910FD /* _WKUserContentExtensionStore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7CEFA9641AC0B9E200B910FD /* _WKUserContentExtensionStore.mm */; }; 532 532 7CFBCAE51743238F00B2BFCF /* WillLoad_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CFBCAE31743238E00B2BFCF /* WillLoad_Bundle.cpp */; }; 533 834138C7203261CA00F26960 /* AsyncPolicyForNavigationResponse.mm in Sources */ = {isa = PBXBuildFile; fileRef = 834138C6203261B900F26960 /* AsyncPolicyForNavigationResponse.mm */; }; 533 534 8349D3C21DB96DDE004A9F65 /* ContextMenuDownload.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8349D3C11DB96DDA004A9F65 /* ContextMenuDownload.mm */; }; 534 535 8349D3C41DB9728E004A9F65 /* link-with-download-attribute.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 8349D3C31DB9724F004A9F65 /* link-with-download-attribute.html */; }; … … 1518 1519 7CFBCAE31743238E00B2BFCF /* WillLoad_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WillLoad_Bundle.cpp; sourceTree = "<group>"; }; 1519 1520 81B50192140F232300D9EB58 /* StringBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StringBuilder.cpp; sourceTree = "<group>"; }; 1521 834138C6203261B900F26960 /* AsyncPolicyForNavigationResponse.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AsyncPolicyForNavigationResponse.mm; sourceTree = "<group>"; }; 1520 1522 8349D3C11DB96DDA004A9F65 /* ContextMenuDownload.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ContextMenuDownload.mm; sourceTree = "<group>"; }; 1521 1523 8349D3C31DB9724F004A9F65 /* link-with-download-attribute.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "link-with-download-attribute.html"; sourceTree = "<group>"; }; … … 2054 2056 2DE71AFD1D49C0BD00904094 /* AnimatedResize.mm */, 2055 2057 63F668201F97C3AA0032EE51 /* ApplicationManifest.mm */, 2058 834138C6203261B900F26960 /* AsyncPolicyForNavigationResponse.mm */, 2056 2059 754CEC801F6722DC00D0039A /* AutoFillAvailable.mm */, 2057 2060 2DD355351BD08378005DF4A7 /* AutoLayoutIntegration.mm */, … … 3339 3342 63F668221F97F7F90032EE51 /* ApplicationManifest.mm in Sources */, 3340 3343 6354F4D11F7C3AB500D89DF3 /* ApplicationManifestParser.cpp in Sources */, 3344 834138C7203261CA00F26960 /* AsyncPolicyForNavigationResponse.mm in Sources */, 3341 3345 7CCE7EB41A411A7E00447C4C /* AttributedString.mm in Sources */, 3342 3346 CDC8E48D1BC5CB4500594FEC /* AudioSessionCategoryIOS.mm in Sources */,
Note: See TracChangeset
for help on using the changeset viewer.