Bug 209167

Summary: REGRESSION (r258334): WebPasteboardProxy::setPasteboardBufferForType should allow zero-size buffers
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: WebKit2Assignee: David Kilzer (:ddkilzer) <ddkilzer>
Severity: Normal CC: cdumez, commit-queue, ggaren, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Patch v1 none

Description David Kilzer (:ddkilzer) 2020-03-16 20:46:04 PDT
WebPasteboardProxy::setPasteboardBufferForType should allow zero-size buffers.

Comment 1 David Kilzer (:ddkilzer) 2020-03-16 20:47:33 PDT
Created attachment 393723 [details]
Patch v1
Comment 2 David Kilzer (:ddkilzer) 2020-03-16 20:50:22 PDT
As noted in the radar, I was unable to create a test for this.

Changing Tools/TestWebKitAPI/Tests/WebKit/execCopy.html to contain only a single non-breaking space does not make the `size` parameter go to zero when running this test:

$ ./Tools/Scripts/run-api-tests --release --no-build TestWebKitAPI.WebKit.PasteboardNotifications

Changing execCopy.html to contain no copyable content makes the test hang.
Comment 3 Geoffrey Garen 2020-03-17 10:07:27 PDT
Comment on attachment 393723 [details]
Patch v1

Comment 4 WebKit Commit Bot 2020-03-17 11:34:03 PDT
Comment on attachment 393723 [details]
Patch v1

Clearing flags on attachment: 393723

Committed r258565: <https://trac.webkit.org/changeset/258565>
Comment 5 WebKit Commit Bot 2020-03-17 11:34:05 PDT
All reviewed patches have been landed.  Closing bug.