Bug 203021

Summary: [Clipboard API] Support navigator.clipboard.read()
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: HTML EditingAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, cdumez, commit-queue, darin, ews-watchlist, megan_gardner, rniwa, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews213 for win-future
none
For EWS
commit-queue: commit-queue-
Archive of layout-test-results from webkit-cq-01 for mac-highsierra none

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.