Bug 236301

Summary: Do not expose in WebIDL the parts of the permission API that are not yet supported
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebCore Misc.Assignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, eric.carlson, esprehn+autocc, ews-watchlist, kondapallykalyan, sihui_liu, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing ews-feeder: commit-queue-

Description youenn fablet 2022-02-08 07:55:04 PST
Some permission API (on change event, worker support) is not yet implemented.
Let's not expose the WebIDL part of it for now.
Comment 1 youenn fablet 2022-02-08 08:02:05 PST
Created attachment 451248 [details]
Patch
Comment 2 Chris Dumez 2022-02-08 11:43:15 PST
Comment on attachment 451248 [details]
Patch

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

> Source/WebCore/ChangeLog:3
> +        Disable non yet functional permission API

non -> not ?

Also, don't you mean that you are un-exposing it to workers?

Also, while you unexposed self.PermissionStatus and self.Permissions, I *think* that navigator.permissions is still accessible for workers, no?
Comment 3 youenn fablet 2022-02-08 11:56:31 PST
(In reply to Chris Dumez from comment #2)
> Comment on attachment 451248 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=451248&action=review
> 
> > Source/WebCore/ChangeLog:3
> > +        Disable non yet functional permission API
> 
> non -> not ?
> 
> Also, don't you mean that you are un-exposing it to workers?
> 
> Also, while you unexposed self.PermissionStatus and self.Permissions, I
> *think* that navigator.permissions is still accessible for workers, no?

AFAIK, there is no WorkerNavigator+Permissions.idl so it is not exposed in workers.
Comment 4 Chris Dumez 2022-02-08 11:59:13 PST
Comment on attachment 451248 [details]
Patch

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

r=me

>>> Source/WebCore/ChangeLog:3
>>> +        Disable non yet functional permission API
>> 
>> non -> not ?
>> 
>> Also, don't you mean that you are un-exposing it to workers?
>> 
>> Also, while you unexposed self.PermissionStatus and self.Permissions, I *think* that navigator.permissions is still accessible for workers, no?
> 
> AFAIK, there is no WorkerNavigator+Permissions.idl so it is not exposed in workers.

That is a good point. I missed that.

I still think we should clarify the bug title / change log description to match what the patch actually does.

Right now, it makes it sound like you're disabling the permission API entirely.

> Source/WebCore/Modules/permissions/PermissionStatus.idl:31
> +    Exposed=(Window)

Maybe we should add a FIXME to indicate this would be exposed to workers.

> Source/WebCore/Modules/permissions/Permissions.idl:31
> +    Exposed=(Window)

ditto.
Comment 5 youenn fablet 2022-02-10 07:32:22 PST
I filed https://bugs.webkit.org/show_bug.cgi?id=236443 to keep track of permission API in workers.
Comment 6 youenn fablet 2022-02-10 07:44:11 PST
Created attachment 451534 [details]
Patch for landing
Comment 7 EWS 2022-02-10 08:22:59 PST
Committed r289536 (247067@main): <https://commits.webkit.org/247067@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 451534 [details].
Comment 8 Radar WebKit Bug Importer 2022-02-10 08:24:17 PST
<rdar://problem/88756040>