Bug 223248 - Apply permission policy to geolocation
Summary: Apply permission policy to geolocation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-16 03:59 PDT by youenn fablet
Modified: 2021-03-31 04:16 PDT (History)
9 users (show)

See Also:


Attachments
Patch (13.78 KB, patch)
2021-03-16 04:02 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (15.97 KB, patch)
2021-03-16 07:45 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (16.07 KB, patch)
2021-03-30 07:43 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].