Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: bbb71e0a35315e1d6b3df324925377bf7b55a789
https://github.com/WebKit/WebKit/commit/bbb71e0a35315e1d6b3df324925377bf7b55a789
Author: Chris Dumez <[email protected]>
Date: 2023-01-31 (Tue, 31 Jan 2023)
Changed paths:
M Source/WebCore/PAL/pal/spi/cocoa/NSFileManagerSPI.h
M Source/WebCore/en.lproj/Localizable.strings
M Source/WebKit/Platform/spi/ios/UIKitSPI.h
M Source/WebKit/SourcesCocoa.txt
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm
M Source/WebKit/UIProcess/ios/WKGeolocationProviderIOS.mm
R Source/WebKit/UIProcess/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm
A Source/WebKit/UIProcess/ios/WKWebGeolocationPolicyDecider.h
A Source/WebKit/UIProcess/ios/WKWebGeolocationPolicyDeciderIOS.mm
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/WebKitCocoa/Geolocation.mm
Log Message:
-----------
[WK2] Stop relying on WebKitLegacy code to do geolocation permission prompting
https://bugs.webkit.org/show_bug.cgi?id=251368
rdar://102728659
Reviewed by Geoffrey Garen.
Stop relying on WebKitLegacy code to do geolocation permission prompting in
WebKit2. We now have a WKWebGeolocationPolicyDecider class that lives in
the WebKit2 project.
Also enhance the prompting dialog to be closer to the one MobileSafari uses
(see screenshots on radar).
The logic for remembering the geolocation permission is identical to the
one WebKitLegacy is using, except that we only use the host as key instead
of the full security origin. Note that the prompt only shows the host, like
it does in MobileSafari.
* Source/WebCore/en.lproj/Localizable.strings:
* Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js:
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/UIProcess/ios/WKGeolocationProviderIOS.mm:
(-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
(-[WKWebAllowDenyPolicyListener deny]):
(-[WKWebAllowDenyPolicyListener denyOnlyThisRequest]): Deleted.
(-[WKWebAllowDenyPolicyListener shouldClearCache]): Deleted.
* Source/WebKit/UIProcess/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm:
Removed.
* Source/WebKit/UIProcess/ios/WKWebGeolocationPolicyDecider.h: Added.
* Source/WebKit/UIProcess/ios/WKWebGeolocationPolicyDeciderIOS.mm: Added.
(clearGeolocationCache):
(appHasPreciseLocationPermission):
(appDisplayName):
(getToken):
(PermissionRequest::create):
(+[WKWebGeolocationPolicyDecider sharedPolicyDecider]):
(-[WKWebGeolocationPolicyDecider init]):
(-[WKWebGeolocationPolicyDecider dealloc]):
(-[WKWebGeolocationPolicyDecider
decidePolicyForGeolocationRequestFromOrigin:requestingURL:view:listener:]):
(-[WKWebGeolocationPolicyDecider _executeNextChallenge]):
(-[WKWebGeolocationPolicyDecider _finishActiveChallenge:]):
(-[WKWebGeolocationPolicyDecider clearCache]):
(-[WKWebGeolocationPolicyDecider
_siteFileInContainerDirectory:creatingIntermediateDirectoriesIfNecessary:]):
(-[WKWebGeolocationPolicyDecider _siteFile]):
(createChallengeDictionary):
(-[WKWebGeolocationPolicyDecider _loadWithCompletionHandler:]):
(-[WKWebGeolocationPolicyDecider _save]):
(-[WKWebGeolocationPolicyDecider
_getChallengeCountFromHistoryForToken:requestingURL:]):
(-[WKWebGeolocationPolicyDecider _addChallengeCount:forToken:requestingURL:]):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
Canonical link: https://commits.webkit.org/259658@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes