Changeset 235364 in webkit
- Timestamp:
- Aug 27, 2018, 8:44:18 AM (7 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r235346 r235364 1 2018-08-27 Alex Christensen <achristensen@webkit.org> 2 3 Fix authentication for clients of WKPageLoaderClient after r234941 4 https://bugs.webkit.org/show_bug.cgi?id=188939 5 6 Reviewed by Youenn Fablet. 7 8 I simplified the authentication code path elegantly for clients of WKPageNavigationClient/WKNavigationDelegate, 9 but clients of WKPageLoaderClient that do not implement didReceiveAuthenticationChallengeInFrame would hang. 10 This fixes that. I've also made the performDefaultHandling (when delegates are not implemented) and rejectProtectionSpaceAndContinue 11 (when canAuthenticationAgainstProtectionSpace returns false) behave correctly. 12 13 * UIProcess/API/APILoaderClient.h: 14 (API::LoaderClient::didReachLayoutMilestone): 15 (API::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): Deleted. 16 * UIProcess/API/C/WKPage.cpp: 17 (WKPageSetPageLoaderClient): 18 (WKPageSetPageNavigationClient): 19 * UIProcess/Cocoa/NavigationState.mm: 20 (WebKit::NavigationState::NavigationClient::didReceiveAuthenticationChallenge): 21 1 22 2018-08-26 Sam Weinig <sam@webkit.org> 2 23 -
trunk/Source/WebKit/UIProcess/API/APILoaderClient.h
r235200 r235364 77 77 78 78 virtual void didReachLayoutMilestone(WebKit::WebPageProxy&, WebCore::LayoutMilestones) { } 79 80 virtual bool canAuthenticateAgainstProtectionSpaceInFrame(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, WebKit::WebProtectionSpace*) { return false; }81 79 virtual void didReceiveAuthenticationChallengeInFrame(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, WebKit::AuthenticationChallengeProxy&) { } 82 80 -
trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp
r235200 r235364 1166 1166 } 1167 1167 1168 bool canAuthenticateAgainstProtectionSpaceInFrame(WebPageProxy& page, WebFrameProxy& frame, WebProtectionSpace* protectionSpace) override1169 {1170 if (!m_client.canAuthenticateAgainstProtectionSpaceInFrame)1171 return false;1172 1173 return m_client.canAuthenticateAgainstProtectionSpaceInFrame(toAPI(&page), toAPI(&frame), toAPI(protectionSpace), m_client.base.clientInfo);1174 }1175 1176 1168 void didReceiveAuthenticationChallengeInFrame(WebPageProxy& page, WebFrameProxy& frame, AuthenticationChallengeProxy& authenticationChallenge) override 1177 1169 { 1170 if (m_client.canAuthenticateAgainstProtectionSpaceInFrame && !m_client.canAuthenticateAgainstProtectionSpaceInFrame(toAPI(&page), toAPI(&frame), toAPI(authenticationChallenge.protectionSpace()), m_client.base.clientInfo)) 1171 return authenticationChallenge.rejectProtectionSpaceAndContinue(); 1178 1172 if (!m_client.didReceiveAuthenticationChallengeInFrame) 1179 return ;1173 return authenticationChallenge.performDefaultHandling(); 1180 1174 1181 1175 m_client.didReceiveAuthenticationChallengeInFrame(toAPI(&page), toAPI(&frame), toAPI(&authenticationChallenge), m_client.base.clientInfo); … … 2311 2305 } 2312 2306 2313 bool canAuthenticateAgainstProtectionSpace(WebPageProxy& page, WebProtectionSpace* protectionSpace) override2314 {2315 if (!m_client.canAuthenticateAgainstProtectionSpace)2316 return false;2317 return m_client.canAuthenticateAgainstProtectionSpace(toAPI(&page), toAPI(protectionSpace), m_client.base.clientInfo);2318 }2319 2320 2307 void didReceiveAuthenticationChallenge(WebPageProxy& page, AuthenticationChallengeProxy& authenticationChallenge) override 2321 2308 { … … 2323 2310 return authenticationChallenge.rejectProtectionSpaceAndContinue(); 2324 2311 if (!m_client.didReceiveAuthenticationChallenge) 2325 return authenticationChallenge. rejectProtectionSpaceAndContinue();2312 return authenticationChallenge.performDefaultHandling(); 2326 2313 m_client.didReceiveAuthenticationChallenge(toAPI(&page), toAPI(&authenticationChallenge), m_client.base.clientInfo); 2327 2314 } -
trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm
r235332 r235364 854 854 { 855 855 if (!m_navigationState.m_navigationDelegateMethods.webViewDidReceiveAuthenticationChallengeCompletionHandler) 856 return authenticationChallenge. rejectProtectionSpaceAndContinue();856 return authenticationChallenge.performDefaultHandling(); 857 857 858 858 auto navigationDelegate = m_navigationState.m_navigationDelegate.get();
Note:
See TracChangeset
for help on using the changeset viewer.