Bug 223248

Summary: Apply permission policy to geolocation
Product: WebKit Reporter: youenn fablet <youennf>
Component: DOMAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, benjamin, cdumez, changseok, eric.carlson, esprehn+autocc, ews-watchlist, gyuyoung.kim, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch for landing none

Description youenn fablet 2021-03-16 03:59:49 PDT
Apply permission policy to geolocation
Comment 1 youenn fablet 2021-03-16 04:02:52 PDT
Created attachment 423316 [details]
Patch
Comment 2 youenn fablet 2021-03-16 07:45:16 PDT
Created attachment 423328 [details]
Patch
Comment 3 Eric Carlson 2021-03-17 09:20:10 PDT
Comment on attachment 423328 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=423328&action=review

> Source/WebCore/Modules/geolocation/Geolocation.cpp:358
> +    if (!isFeaturePolicyAllowedByDocumentAndAllOwners(FeaturePolicy::Type::Geolocation, *document(), LogFeaturePolicyFailure::Yes))
> +        return true;

As we discussed, I think a linked-on-or-after check would be a good idea so we don't break existing apps that depend on the old behavior.
Comment 4 youenn fablet 2021-03-23 03:51:19 PDT
> As we discussed, I think a linked-on-or-after check would be a good idea so
> we don't break existing apps that depend on the old behavior.

If we add a linked-on-or-after check here, we probably need to do the same when computing the origin shown on the geolocation prompt.
We can probably do that, but maybe we can try to land this change and use linked-on-or-after if we see breakage?
Comment 5 Radar WebKit Bug Importer 2021-03-23 04:00:53 PDT
<rdar://problem/75732512>
Comment 6 EWS 2021-03-30 05:27:55 PDT
Tools/Scripts/svn-apply failed to apply attachment 423328 [details] to trunk.
Please resolve the conflicts and upload a new patch.
Comment 7 youenn fablet 2021-03-30 07:43:22 PDT
Created attachment 424637 [details]
Patch for landing
Comment 8 EWS 2021-03-31 04:16:18 PDT
Committed r275276: <https://commits.webkit.org/r275276>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 424637 [details].