Bug 203021 - [Clipboard API] Support navigator.clipboard.read()
Summary: [Clipboard API] Support navigator.clipboard.read()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-10-15 19:12 PDT by Wenson Hsieh
Modified: 2019-10-18 14:25 PDT (History)
10 users (show)

See Also:


Attachments
Patch (53.45 KB, patch)
2019-10-17 13:48 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews213 for win-future (13.88 MB, application/zip)
2019-10-17 15:05 PDT, EWS Watchlist
no flags Details
For EWS (58.22 KB, patch)
2019-10-17 16:35 PDT, Wenson Hsieh
commit-queue: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-cq-01 for mac-highsierra (3.46 MB, application/zip)
2019-10-17 23:25 PDT, WebKit Commit Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2019-10-15 19:12:33 PDT
More work in progress. This should unlock the ability to asynchronously fetch pasted content from the clipboard as ClipboardItems, via the Clipboard API.
Comment 1 Wenson Hsieh 2019-10-17 13:48:21 PDT Comment hidden (obsolete)
Comment 2 Ryosuke Niwa 2019-10-17 14:07:49 PDT
Comment on attachment 381222 [details]
Patch

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

> Source/WebCore/Modules/async-clipboard/Clipboard.cpp:112
> +            if (itemInfo.changeCount != changeCountAtStart) {

This change count check should really be happening in the UI process side but it's okay for now.
Comment 3 EWS Watchlist 2019-10-17 15:05:55 PDT Comment hidden (obsolete)
Comment 4 EWS Watchlist 2019-10-17 15:05:57 PDT Comment hidden (obsolete)
Comment 5 Wenson Hsieh 2019-10-17 15:57:50 PDT
Comment on attachment 381222 [details]
Patch

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

>> Source/WebCore/Modules/async-clipboard/Clipboard.cpp:112
>> +            if (itemInfo.changeCount != changeCountAtStart) {
> 
> This change count check should really be happening in the UI process side but it's okay for now.

Indeed — I’m planning to implement UI-process-side changeCount checking in a subsequent patch. I’ll add a FIXME here for now.
Comment 6 Wenson Hsieh 2019-10-17 16:35:22 PDT
Created attachment 381247 [details]
For EWS
Comment 7 WebKit Commit Bot 2019-10-17 22:21:17 PDT Comment hidden (obsolete)
Comment 8 WebKit Commit Bot 2019-10-17 22:21:35 PDT Comment hidden (obsolete)
Comment 9 WebKit Commit Bot 2019-10-17 23:07:54 PDT Comment hidden (obsolete)
Comment 10 WebKit Commit Bot 2019-10-17 23:08:06 PDT Comment hidden (obsolete)
Comment 11 WebKit Commit Bot 2019-10-17 23:25:56 PDT
Comment on attachment 381247 [details]
For EWS

Rejecting attachment 381247 [details] from commit-queue.

New failing tests:
fast/events/resize-subframe-in-rendering-update.html
inspector/console/webcore-logging.html
Full output: https://webkit-queues.webkit.org/results/13146169
Comment 12 WebKit Commit Bot 2019-10-17 23:25:58 PDT Comment hidden (obsolete)
Comment 13 Wenson Hsieh 2019-10-18 07:24:51 PDT
The CQ test failures (fast/events/resize-subframe-in-rendering-update.html and inspector/console/webcore-logging.html) are unrelated.

Committed: https://trac.webkit.org/r251279.
Comment 14 Radar WebKit Bug Importer 2019-10-18 07:25:22 PDT
<rdar://problem/56406019>
Comment 15 Darin Adler 2019-10-18 14:19:01 PDT
Comment on attachment 381247 [details]
For EWS

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

> Tools/DumpRenderTree/mac/DumpRenderTreePasteboard.mm:38
> +#import <WebCore/LegacyNSPasteboardTypes.h>

Seems like this is left over from before you did some refactoring and isn’t needed.
Comment 16 Wenson Hsieh 2019-10-18 14:25:27 PDT
Comment on attachment 381247 [details]
For EWS

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

>> Tools/DumpRenderTree/mac/DumpRenderTreePasteboard.mm:38
>> +#import <WebCore/LegacyNSPasteboardTypes.h>
> 
> Seems like this is left over from before you did some refactoring and isn’t needed.

Good catch! Removing it now.