[Webkit-unassigned] [Bug 236952] Permission API: handle non-fully active documents

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 21 22:54:30 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=236952

youenn fablet <youennf at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #452777|review?                     |review+
              Flags|                            |

--- Comment #8 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 452777
  --> https://bugs.webkit.org/attachment.cgi?id=452777
Patch

LGTM, a few comments below.

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

> Source/WebCore/Modules/permissions/PermissionStatus.cpp:75
> +        if (!document.isFullyActive())

We have the new dynamicDowncast we could use:
if (auto* document = dynamicDowncast<Document>(context); !document->isFullyActive())
    return;

Also, this makes the case of iframes detached-then-reattached potentially complex to handle for developers.
Say we query permission before detaching (and get granted), we detach, we change permission to prompt, we reattach the frame and we query permission again.
The two permission objects would have different state. This seems somewhat inconvenient for web developers (although simpler for implementors).
There could be a case where web page hangs on the first permission object state.

> Source/WebCore/Modules/permissions/Permissions.cpp:92
> +    if (is<Document>(context) && !downcast<Document>(*context).isFullyActive()) {

Ditto for dynamicDowncast

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220222/1db968a9/attachment-0001.htm>


More information about the webkit-unassigned mailing list