Bug 233939 - Add a `DOMPasteAccessCategory` to control which pasteboard the WebProcess is granted access to when pasting
Summary: Add a `DOMPasteAccessCategory` to control which pasteboard the WebProcess is ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks: 191379
  Show dependency treegraph
 
Reported: 2021-12-07 10:57 PST by Devin Rousso
Modified: 2021-12-09 19:10 PST (History)
16 users (show)

See Also:


Attachments
Patch (61.13 KB, patch)
2021-12-07 11:58 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (58.22 KB, patch)
2021-12-07 12:44 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (54.29 KB, patch)
2021-12-08 19:33 PST, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2021-12-07 10:57:38 PST
.
Comment 1 Devin Rousso 2021-12-07 11:58:33 PST
Created attachment 446217 [details]
Patch
Comment 2 EWS Watchlist 2021-12-07 11:59:29 PST Comment hidden (obsolete)
Comment 3 Wenson Hsieh 2021-12-07 12:25:39 PST
Comment on attachment 446217 [details]
Patch

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

> Source/WebCore/page/Frame.h:179
> +    bool requestDOMPasteAccess(DOMPasteAccessCategory);

Could we make this default to `DOMPasteAccessCategory::General`?
Comment 4 Devin Rousso 2021-12-07 12:27:46 PST
Comment on attachment 446217 [details]
Patch

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

>> Source/WebCore/page/Frame.h:179
>> +    bool requestDOMPasteAccess(DOMPasteAccessCategory);
> 
> Could we make this default to `DOMPasteAccessCategory::General`?

Sure.  I kinda like the explicit-ness of having the callsite know exactly which category they're asking for, but I can also see the benefit in having `General` be the default.
Comment 5 Devin Rousso 2021-12-07 12:44:51 PST
Created attachment 446222 [details]
Patch
Comment 6 EWS 2021-12-07 16:56:23 PST
Committed r286632 (244945@main): <https://commits.webkit.org/244945@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 446222 [details].
Comment 7 Radar WebKit Bug Importer 2021-12-07 16:57:24 PST
<rdar://problem/86183512>
Comment 8 Truitt Savell 2021-12-08 10:06:07 PST
It looks like the changes in https://trac.webkit.org/changeset/286632/webkit

broke 3 pasteboard tests on iOS 15 

editing/pasteboard/dom-paste/dom-paste-confirmation.html
editing/pasteboard/dom-paste/dom-paste-consecutive-confirmations.html
editing/pasteboard/dom-paste/dom-paste-requires-user-gesture.html

tracking in https://bugs.webkit.org/show_bug.cgi?id=234014
Comment 9 Truitt Savell 2021-12-08 12:35:10 PST
Reverted r286632 for reason:

Broke 3 tests on iOS

Committed r286705 (244984@trunk): <https://commits.webkit.org/244984@trunk>
Comment 10 Devin Rousso 2021-12-08 19:33:41 PST
Created attachment 446487 [details]
Patch

fix mistake in `-[WKContentView pasteForWebView:]`
Comment 11 EWS 2021-12-09 19:10:09 PST
Committed r286825 (245059@main): <https://commits.webkit.org/245059@main>

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