Title: [252315] trunk/Source/WebCore
Revision
252315
Author
[email protected]
Date
2019-11-10 16:16:47 -0800 (Sun, 10 Nov 2019)

Log Message

[Clipboard API] Add some infrastructure to resolve ClipboardItems into pasteboard data for writing
https://bugs.webkit.org/show_bug.cgi?id=203707

Reviewed by Ryosuke Niwa.

Implements a new method that will be used in a future patch to aggregate data vended by ClipboardItems when
writing items to the platform pasteboard. See below for more details; no new tests, since there is no change in
behavior yet.

* Modules/async-clipboard/ClipboardItem.cpp:
(WebCore::ClipboardItem::collectDataForWriting):

Add a new virtual `collectDataForWriting` method, which is used when writing ClipboardItem data to the
pasteboard. This allows ClipboardItems to asynchronously convert data to a PasteboardCustomData after resolving
promises to strings or blobs; or alternately, cancel all data loading if a promise is rejected.

In order to convert items into a list of PasteboardCustomData, we do the following:

set up a PasteboardCustomData corresponding to each clipboard item
for each clipboard item:
    for each type in the clipboard item:
        try to resolve the promise
        if the promise resolved to a string:
            write the string to custom data under the type
        if the promise resolved to a blob:
            load the blob data as either text or an ArrayBuffer (depending on the type)
            write either the loaded string or buffer to custom data under the type
        if the promise rejected or resolved to an unsupported value, bail from these steps

* Modules/async-clipboard/ClipboardItem.h:
* Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:
(WebCore::documentFromClipboard):
(WebCore::readTypeForMIMEType):
(WebCore::ClipboardItemBindingsDataSource::collectDataForWriting):
(WebCore::ClipboardItemBindingsDataSource::invokeCompletionHandler):
(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::ClipboardItemTypeLoader):
(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::~ClipboardItemTypeLoader):

Add a helper class to hold state associated with loading each clipboard type. This includes the final data
itself (a variant that holds either a String or Blob), as well as a FileReaderLoader which may be present in the
case where the clipboard item type resolves to a blob.

(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didFinishLoading):
(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didFail):

Each ClipboardItemType is also the client for its FileReaderLoader, if present; when the FileReaderLoader
finishes loading or fails, we then extract data from the loader and invoke the completion handler.

(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::invokeCompletionHandler):
(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didResolveToBlob):
(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didFailToResolve):
(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didResolveToString):

One of these three methods is called when the promise corresponding to a clipboard type is either resolved or
rejected. If rejected or resolved to an incompatible type, we call the completion handler immediately with no
data; if we resolve to a string, we simply store the string in `m_data` and invoke the completion handler;
otherwise, if we resolve to a blob, we create a new loader to fetch either the string or data buffer for the
blob, and wait until either didFinishLoading or didFail is called.

* Modules/async-clipboard/ClipboardItemBindingsDataSource.h:
(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::create):
(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::type):
(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::data):
* Modules/async-clipboard/ClipboardItemDataSource.h:
* Modules/async-clipboard/ClipboardItemPasteboardDataSource.cpp:
(WebCore::ClipboardItemPasteboardDataSource::collectDataForWriting):

For the time being, leave this unimplemented; a future patch will add support for writing ClipboardItems that
came from the platform pasteboard, as opposed to those created by the page.

* Modules/async-clipboard/ClipboardItemPasteboardDataSource.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (252314 => 252315)


--- trunk/Source/WebCore/ChangeLog	2019-11-10 23:45:00 UTC (rev 252314)
+++ trunk/Source/WebCore/ChangeLog	2019-11-11 00:16:47 UTC (rev 252315)
@@ -1,3 +1,77 @@
+2019-11-10  Wenson Hsieh  <[email protected]>
+
+        [Clipboard API] Add some infrastructure to resolve ClipboardItems into pasteboard data for writing
+        https://bugs.webkit.org/show_bug.cgi?id=203707
+
+        Reviewed by Ryosuke Niwa.
+
+        Implements a new method that will be used in a future patch to aggregate data vended by ClipboardItems when
+        writing items to the platform pasteboard. See below for more details; no new tests, since there is no change in
+        behavior yet.
+
+        * Modules/async-clipboard/ClipboardItem.cpp:
+        (WebCore::ClipboardItem::collectDataForWriting):
+
+        Add a new virtual `collectDataForWriting` method, which is used when writing ClipboardItem data to the
+        pasteboard. This allows ClipboardItems to asynchronously convert data to a PasteboardCustomData after resolving
+        promises to strings or blobs; or alternately, cancel all data loading if a promise is rejected.
+
+        In order to convert items into a list of PasteboardCustomData, we do the following:
+
+        set up a PasteboardCustomData corresponding to each clipboard item
+        for each clipboard item:
+            for each type in the clipboard item:
+                try to resolve the promise
+                if the promise resolved to a string:
+                    write the string to custom data under the type
+                if the promise resolved to a blob:
+                    load the blob data as either text or an ArrayBuffer (depending on the type)
+                    write either the loaded string or buffer to custom data under the type
+                if the promise rejected or resolved to an unsupported value, bail from these steps
+
+        * Modules/async-clipboard/ClipboardItem.h:
+        * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:
+        (WebCore::documentFromClipboard):
+        (WebCore::readTypeForMIMEType):
+        (WebCore::ClipboardItemBindingsDataSource::collectDataForWriting):
+        (WebCore::ClipboardItemBindingsDataSource::invokeCompletionHandler):
+        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::ClipboardItemTypeLoader):
+        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::~ClipboardItemTypeLoader):
+
+        Add a helper class to hold state associated with loading each clipboard type. This includes the final data
+        itself (a variant that holds either a String or Blob), as well as a FileReaderLoader which may be present in the
+        case where the clipboard item type resolves to a blob.
+
+        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didFinishLoading):
+        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didFail):
+
+        Each ClipboardItemType is also the client for its FileReaderLoader, if present; when the FileReaderLoader
+        finishes loading or fails, we then extract data from the loader and invoke the completion handler.
+
+        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::invokeCompletionHandler):
+        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didResolveToBlob):
+        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didFailToResolve):
+        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didResolveToString):
+
+        One of these three methods is called when the promise corresponding to a clipboard type is either resolved or
+        rejected. If rejected or resolved to an incompatible type, we call the completion handler immediately with no
+        data; if we resolve to a string, we simply store the string in `m_data` and invoke the completion handler;
+        otherwise, if we resolve to a blob, we create a new loader to fetch either the string or data buffer for the
+        blob, and wait until either didFinishLoading or didFail is called.
+
+        * Modules/async-clipboard/ClipboardItemBindingsDataSource.h:
+        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::create):
+        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::type):
+        (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::data):
+        * Modules/async-clipboard/ClipboardItemDataSource.h:
+        * Modules/async-clipboard/ClipboardItemPasteboardDataSource.cpp:
+        (WebCore::ClipboardItemPasteboardDataSource::collectDataForWriting):
+
+        For the time being, leave this unimplemented; a future patch will add support for writing ClipboardItems that
+        came from the platform pasteboard, as opposed to those created by the page.
+
+        * Modules/async-clipboard/ClipboardItemPasteboardDataSource.h:
+
 2019-11-10  Antti Koivisto  <[email protected]>
 
         Stack allocate StyleResolver state

Modified: trunk/Source/WebCore/Modules/async-clipboard/ClipboardItem.cpp (252314 => 252315)


--- trunk/Source/WebCore/Modules/async-clipboard/ClipboardItem.cpp	2019-11-10 23:45:00 UTC (rev 252314)
+++ trunk/Source/WebCore/Modules/async-clipboard/ClipboardItem.cpp	2019-11-11 00:16:47 UTC (rev 252315)
@@ -92,6 +92,11 @@
     m_dataSource->getType(type, WTFMove(promise));
 }
 
+void ClipboardItem::collectDataForWriting(Clipboard& destination, CompletionHandler<void(Optional<PasteboardCustomData>)>&& completion)
+{
+    m_dataSource->collectDataForWriting(destination, WTFMove(completion));
+}
+
 Navigator* ClipboardItem::navigator()
 {
     return m_navigator.get();

Modified: trunk/Source/WebCore/Modules/async-clipboard/ClipboardItem.h (252314 => 252315)


--- trunk/Source/WebCore/Modules/async-clipboard/ClipboardItem.h	2019-11-10 23:45:00 UTC (rev 252314)
+++ trunk/Source/WebCore/Modules/async-clipboard/ClipboardItem.h	2019-11-11 00:16:47 UTC (rev 252315)
@@ -40,6 +40,7 @@
 class DeferredPromise;
 class DOMPromise;
 class Navigator;
+class PasteboardCustomData;
 struct PasteboardItemInfo;
 
 class ClipboardItem : public RefCounted<ClipboardItem> {
@@ -59,6 +60,8 @@
     Vector<String> types() const;
     void getType(const String&, Ref<DeferredPromise>&&);
 
+    void collectDataForWriting(Clipboard& destination, CompletionHandler<void(Optional<PasteboardCustomData>)>&&);
+
     PresentationStyle presentationStyle() const { return m_presentationStyle; };
     Navigator* navigator();
     Clipboard* clipboard();

Modified: trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp (252314 => 252315)


--- trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp	2019-11-10 23:45:00 UTC (rev 252314)
+++ trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp	2019-11-11 00:16:47 UTC (rev 252315)
@@ -27,7 +27,11 @@
 #include "ClipboardItemBindingsDataSource.h"
 
 #include "Blob.h"
+#include "Clipboard.h"
 #include "ClipboardItem.h"
+#include "Document.h"
+#include "FileReaderLoader.h"
+#include "Frame.h"
 #include "JSBlob.h"
 #include "JSDOMPromise.h"
 #include "JSDOMPromiseDeferred.h"
@@ -36,6 +40,25 @@
 
 namespace WebCore {
 
+static RefPtr<Document> documentFromClipboard(const Clipboard* clipboard)
+{
+    if (!clipboard)
+        return nullptr;
+
+    auto* frame = clipboard->frame();
+    if (!frame)
+        return nullptr;
+
+    return frame->document();
+}
+
+static FileReaderLoader::ReadType readTypeForMIMEType(const String& type)
+{
+    if (type == "text/uri-list"_s || type == "text/plain"_s || type == "text/html"_s)
+        return FileReaderLoader::ReadAsText;
+    return FileReaderLoader::ReadAsArrayBuffer;
+}
+
 ClipboardItemBindingsDataSource::ClipboardItemBindingsDataSource(ClipboardItem& item, Vector<KeyValuePair<String, RefPtr<DOMPromise>>>&& itemPromises)
     : ClipboardItemDataSource(item)
     , m_itemPromises(WTFMove(itemPromises))
@@ -94,4 +117,164 @@
     });
 }
 
+void ClipboardItemBindingsDataSource::collectDataForWriting(Clipboard& destination, CompletionHandler<void(Optional<PasteboardCustomData>)>&& completion)
+{
+    m_itemTypeLoaders.clear();
+    ASSERT(!m_completionHandler);
+    m_completionHandler = WTFMove(completion);
+    m_writingDestination = makeWeakPtr(destination);
+    m_numberOfPendingClipboardTypes = m_itemPromises.size();
+    m_itemTypeLoaders = m_itemPromises.map([&] (auto& typeAndItem) {
+        auto type = typeAndItem.key;
+        auto itemTypeLoader = ClipboardItemTypeLoader::create(type, [this, protectedItem = makeRef(m_item)] {
+            ASSERT(m_numberOfPendingClipboardTypes);
+            if (!--m_numberOfPendingClipboardTypes)
+                invokeCompletionHandler();
+        });
+
+        auto promise = typeAndItem.value;
+        promise->whenSettled([this, protectedItem = makeRefPtr(m_item), destination = m_writingDestination, promise, type, weakItemTypeLoader = makeWeakPtr(itemTypeLoader.ptr())] () mutable {
+            if (!weakItemTypeLoader)
+                return;
+
+            auto itemTypeLoader = makeRef(*weakItemTypeLoader);
+            ASSERT_UNUSED(this, notFound != m_itemTypeLoaders.findMatching([&] (auto& loader) { return loader.ptr() == itemTypeLoader.ptr(); }));
+
+            auto result = promise->result();
+            if (!result) {
+                itemTypeLoader->didFailToResolve();
+                return;
+            }
+
+            auto clipboard = makeRefPtr(destination.get());
+            if (!clipboard) {
+                itemTypeLoader->didFailToResolve();
+                return;
+            }
+
+            if (!clipboard->scriptExecutionContext()) {
+                itemTypeLoader->didFailToResolve();
+                return;
+            }
+
+            String text;
+            result.getString(promise->globalObject(), text);
+            if (!text.isNull()) {
+                itemTypeLoader->didResolveToString(text);
+                return;
+            }
+
+            if (!result.isObject()) {
+                itemTypeLoader->didFailToResolve();
+                return;
+            }
+
+            if (auto blob = makeRefPtr(JSBlob::toWrapped(result.getObject()->vm(), result.getObject())))
+                itemTypeLoader->didResolveToBlob(*clipboard->scriptExecutionContext(), blob.releaseNonNull());
+            else
+                itemTypeLoader->didFailToResolve();
+        });
+
+        return itemTypeLoader;
+    });
+
+    if (!m_numberOfPendingClipboardTypes)
+        invokeCompletionHandler();
+}
+
+void ClipboardItemBindingsDataSource::invokeCompletionHandler()
+{
+    if (!m_completionHandler) {
+        ASSERT_NOT_REACHED();
+        return;
+    }
+
+    auto completionHandler = std::exchange(m_completionHandler, { });
+    auto itemTypeLoaders = std::exchange(m_itemTypeLoaders, { });
+    auto clipboard = makeRefPtr(m_writingDestination.get());
+    m_writingDestination = nullptr;
+
+    auto document = documentFromClipboard(clipboard.get());
+    if (!document) {
+        completionHandler(WTF::nullopt);
+        return;
+    }
+
+    PasteboardCustomData customData;
+    for (auto& itemTypeLoader : itemTypeLoaders) {
+        auto type = itemTypeLoader->type();
+        auto& data = ""
+        if (WTF::holds_alternative<String>(data) && !!WTF::get<String>(data))
+            customData.writeString(type, WTF::get<String>(data));
+        else if (WTF::holds_alternative<Ref<SharedBuffer>>(data))
+            customData.writeData(type, WTF::get<Ref<SharedBuffer>>(data).copyRef());
+        else {
+            completionHandler(WTF::nullopt);
+            return;
+        }
+    }
+
+    customData.setOrigin(document->originIdentifierForPasteboard());
+    completionHandler(WTFMove(customData));
+}
+
+ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::ClipboardItemTypeLoader(const String& type, CompletionHandler<void()>&& completionHandler)
+    : m_type(type)
+    , m_completionHandler(WTFMove(completionHandler))
+{
+}
+
+ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::~ClipboardItemTypeLoader()
+{
+    if (m_blobLoader)
+        m_blobLoader->cancel();
+
+    invokeCompletionHandler();
+}
+
+void ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didFinishLoading()
+{
+    ASSERT(m_blobLoader);
+    auto stringResult = readTypeForMIMEType(m_type) == FileReaderLoader::ReadAsText ? m_blobLoader->stringResult() : nullString();
+    if (!stringResult.isNull())
+        m_data = { stringResult };
+    else if (auto arrayBuffer = m_blobLoader->arrayBufferResult())
+        m_data = { SharedBuffer::create(static_cast<const char*>(arrayBuffer->data()), arrayBuffer->byteLength()) };
+    m_blobLoader = nullptr;
+    invokeCompletionHandler();
+}
+
+void ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didFail(int)
+{
+    ASSERT(m_blobLoader);
+    m_blobLoader = nullptr;
+    invokeCompletionHandler();
+}
+
+void ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::invokeCompletionHandler()
+{
+    if (auto completion = WTFMove(m_completionHandler))
+        completion();
+}
+
+void ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didResolveToBlob(ScriptExecutionContext& context, Ref<Blob>&& blob)
+{
+    ASSERT(!m_blobLoader);
+    m_blobLoader = makeUnique<FileReaderLoader>(readTypeForMIMEType(m_type), this);
+    m_blobLoader->start(&context, WTFMove(blob));
+}
+
+void ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didFailToResolve()
+{
+    ASSERT(!m_blobLoader);
+    invokeCompletionHandler();
+}
+
+void ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didResolveToString(const String& text)
+{
+    ASSERT(!m_blobLoader);
+    m_data = { text };
+    invokeCompletionHandler();
+}
+
 } // namespace WebCore

Modified: trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.h (252314 => 252315)


--- trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.h	2019-11-10 23:45:00 UTC (rev 252314)
+++ trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.h	2019-11-11 00:16:47 UTC (rev 252315)
@@ -26,10 +26,16 @@
 #pragma once
 
 #include "ClipboardItemDataSource.h"
+#include "FileReaderLoaderClient.h"
+#include <wtf/Optional.h>
+#include <wtf/Variant.h>
+#include <wtf/WeakPtr.h>
 
 namespace WebCore {
 
 class DOMPromise;
+class FileReaderLoader;
+class PasteboardCustomData;
 
 class ClipboardItemBindingsDataSource : public ClipboardItemDataSource {
     WTF_MAKE_FAST_ALLOCATED;
@@ -40,7 +46,49 @@
 private:
     Vector<String> types() const final;
     void getType(const String&, Ref<DeferredPromise>&&) final;
+    void collectDataForWriting(Clipboard& destination, CompletionHandler<void(Optional<PasteboardCustomData>)>&&) final;
 
+    void invokeCompletionHandler();
+
+    using BufferOrString = Variant<String, Ref<SharedBuffer>>;
+    class ClipboardItemTypeLoader : public FileReaderLoaderClient, public RefCounted<ClipboardItemTypeLoader>, public CanMakeWeakPtr<ClipboardItemTypeLoader> {
+    public:
+        static Ref<ClipboardItemTypeLoader> create(const String& type, CompletionHandler<void()>&& completionHandler)
+        {
+            return adoptRef(*new ClipboardItemTypeLoader(type, WTFMove(completionHandler)));
+        }
+
+        ~ClipboardItemTypeLoader();
+
+        void didResolveToString(const String&);
+        void didFailToResolve();
+        void didResolveToBlob(ScriptExecutionContext&, Ref<Blob>&&);
+
+        const String& type() { return m_type; }
+        const BufferOrString& data() { return m_data; }
+
+    private:
+        ClipboardItemTypeLoader(const String& type, CompletionHandler<void()>&&);
+
+        void invokeCompletionHandler();
+
+        // FileReaderLoaderClient methods.
+        void didStartLoading() final { }
+        void didReceiveData() final { }
+        void didFinishLoading() final;
+        void didFail(int) final;
+
+        String m_type;
+        BufferOrString m_data;
+        std::unique_ptr<FileReaderLoader> m_blobLoader;
+        CompletionHandler<void()> m_completionHandler;
+    };
+
+    unsigned m_numberOfPendingClipboardTypes { 0 };
+    CompletionHandler<void(Optional<PasteboardCustomData>)> m_completionHandler;
+    Vector<Ref<ClipboardItemTypeLoader>> m_itemTypeLoaders;
+    WeakPtr<Clipboard> m_writingDestination;
+
     Vector<KeyValuePair<String, RefPtr<DOMPromise>>> m_itemPromises;
 };
 

Modified: trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemDataSource.h (252314 => 252315)


--- trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemDataSource.h	2019-11-10 23:45:00 UTC (rev 252314)
+++ trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemDataSource.h	2019-11-11 00:16:47 UTC (rev 252315)
@@ -32,8 +32,9 @@
 
 namespace WebCore {
 
+class Clipboard;
+class ClipboardItem;
 class DeferredPromise;
-class ClipboardItem;
 
 class ClipboardItemDataSource {
 public:
@@ -46,6 +47,7 @@
 
     virtual Vector<String> types() const = 0;
     virtual void getType(const String&, Ref<DeferredPromise>&&) = 0;
+    virtual void collectDataForWriting(Clipboard& destination, CompletionHandler<void(Optional<PasteboardCustomData>)>&&) = 0;
 
 protected:
     ClipboardItem& m_item;

Modified: trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemPasteboardDataSource.cpp (252314 => 252315)


--- trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemPasteboardDataSource.cpp	2019-11-10 23:45:00 UTC (rev 252314)
+++ trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemPasteboardDataSource.cpp	2019-11-11 00:16:47 UTC (rev 252315)
@@ -54,4 +54,11 @@
         promise->reject(NotAllowedError);
 }
 
+void ClipboardItemPasteboardDataSource::collectDataForWriting(Clipboard&, CompletionHandler<void(Optional<PasteboardCustomData>)>&& completion)
+{
+    // FIXME: Not implemented. This is needed to support writing platform-backed ClipboardItems
+    // back to the pasteboard using Clipboard.write().
+    completion(WTF::nullopt);
+}
+
 } // namespace WebCore

Modified: trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemPasteboardDataSource.h (252314 => 252315)


--- trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemPasteboardDataSource.h	2019-11-10 23:45:00 UTC (rev 252314)
+++ trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemPasteboardDataSource.h	2019-11-11 00:16:47 UTC (rev 252315)
@@ -40,6 +40,7 @@
 private:
     Vector<String> types() const final;
     void getType(const String&, Ref<DeferredPromise>&&) final;
+    void collectDataForWriting(Clipboard& destination, CompletionHandler<void(Optional<PasteboardCustomData>)>&&) final;
 
     Vector<String> m_types;
 };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to