WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
223183
Add a new delegate for geolocation permission
https://bugs.webkit.org/show_bug.cgi?id=223183
Summary
Add a new delegate for geolocation permission
youenn fablet
Reported
2021-03-15 07:25:09 PDT
Add a new delegate for geolocation permission
Attachments
Patch
(25.83 KB, patch)
2021-03-15 07:34 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(25.84 KB, patch)
2021-03-15 08:49 PDT
,
youenn fablet
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(25.84 KB, patch)
2021-03-15 09:06 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch for landing
(25.88 KB, patch)
2021-03-15 11:44 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2021-03-15 07:34:25 PDT
Created
attachment 423178
[details]
Patch
Radar WebKit Bug Importer
Comment 2
2021-03-15 08:39:10 PDT
<
rdar://problem/75430600
>
youenn fablet
Comment 3
2021-03-15 08:49:28 PDT
Created
attachment 423183
[details]
Patch
youenn fablet
Comment 4
2021-03-15 09:06:15 PDT
Created
attachment 423185
[details]
Patch
Eric Carlson
Comment 5
2021-03-15 11:04:43 PDT
Comment on
attachment 423185
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=423185&action=review
> Source/WebKit/UIProcess/Cocoa/UIDelegate.mm:415 > + [(id <WKUIDelegatePrivate>)delegate _webView:m_uiDelegate->m_webView.get().get() requestGeolocationPermissionForOrigin:wrapper(API::SecurityOrigin::create(securityOrigin.get())) initiatedByFrame:wrapper(API::FrameInfo::create(FrameInfoData { frameInfo }, &page)) decisionHandler:makeBlockPtr([completionHandler = std::exchange(completionHandler, nullptr), securityOrigin = securityOrigin->data(), checker = WTFMove(checker), page = makeWeakPtr(page)] (_WKPermissionDecision decision) mutable {
This is *much* harder to read and understand than the one you updated for `UIClient::decidePolicyForUserMediaPermissionRequest`, so it might be worth using a local variable or two to aid readability.
youenn fablet
Comment 6
2021-03-15 11:44:06 PDT
(In reply to Eric Carlson from
comment #5
)
> Comment on
attachment 423185
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=423185&action=review
> > > Source/WebKit/UIProcess/Cocoa/UIDelegate.mm:415 > > + [(id <WKUIDelegatePrivate>)delegate _webView:m_uiDelegate->m_webView.get().get() requestGeolocationPermissionForOrigin:wrapper(API::SecurityOrigin::create(securityOrigin.get())) initiatedByFrame:wrapper(API::FrameInfo::create(FrameInfoData { frameInfo }, &page)) decisionHandler:makeBlockPtr([completionHandler = std::exchange(completionHandler, nullptr), securityOrigin = securityOrigin->data(), checker = WTFMove(checker), page = makeWeakPtr(page)] (_WKPermissionDecision decision) mutable { > > This is *much* harder to read and understand than the one you updated for > `UIClient::decidePolicyForUserMediaPermissionRequest`, so it might be worth > using a local variable or two to aid readability.
OK, will add a local variable for the decisionHandler
youenn fablet
Comment 7
2021-03-15 11:44:49 PDT
Created
attachment 423211
[details]
Patch for landing
youenn fablet
Comment 8
2021-03-16 00:58:11 PDT
Comment on
attachment 423211
[details]
Patch for landing Win test failure is unrelated
EWS
Comment 9
2021-03-16 01:25:57 PDT
Committed
r274469
: <
https://commits.webkit.org/r274469
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 423211
[details]
.
Darryl Pogue
Comment 10
2021-03-16 10:57:31 PDT
Comment on
attachment 423211
[details]
Patch for landing View in context:
https://bugs.webkit.org/attachment.cgi?id=423211&action=review
> Source/WebKit/UIProcess/Cocoa/MediaPermissionUtilities.mm:139 > + return [NSString stringWithFormat:WEB_UI_NSSTRING(@"Allow â%@â to use your current location?", @"Message for geolocation prompt"), visibleDomain(origin.host)];
Is there a reason not to use visibleOrigin here to show the app name for apps that embed WKWebView with custom schemes?
youenn fablet
Comment 11
2021-03-16 12:10:05 PDT
(In reply to Darryl Pogue from
comment #10
)
> Comment on
attachment 423211
[details]
> Patch for landing > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=423211&action=review
> > > Source/WebKit/UIProcess/Cocoa/MediaPermissionUtilities.mm:139 > > + return [NSString stringWithFormat:WEB_UI_NSSTRING(@"Allow â%@â to use your current location?", @"Message for geolocation prompt"), visibleDomain(origin.host)]; > > Is there a reason not to use visibleOrigin here to show the app name for > apps that embed WKWebView with custom schemes?
No, we should probably update it accordingly.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug