ClipboardItem.getType returns a promise that resolves to a Blob containing data for the given type.
Created attachment 381380 [details] Patch
Created attachment 381381 [details] Fix Win/GTK/WPE
Comment on attachment 381381 [details] Fix Win/GTK/WPE View in context: https://bugs.webkit.org/attachment.cgi?id=381381&action=review > Source/WebCore/Modules/async-clipboard/Clipboard.cpp:148 > + m_activeSession = WTF::nullopt; Why does trying to get the type of a non-active item clear the Clipboard's "active session"?
Comment on attachment 381381 [details] Fix Win/GTK/WPE View in context: https://bugs.webkit.org/attachment.cgi?id=381381&action=review >> Source/WebCore/Modules/async-clipboard/Clipboard.cpp:148 >> + m_activeSession = WTF::nullopt; > > Why does trying to get the type of a non-active item clear the Clipboard's "active session"? Good catch! Yeah, this would mean that trying to fetch an invalid clipboard item’s data would cause currently valid items to become invalidated, which is wrong. Removed the `m_activeSession = WTF::nullopt;`; I will also add a new layout test to exercise this scenario.
Created attachment 381419 [details] Fix & new layout test
Comment on attachment 381419 [details] Fix & new layout test Clearing flags on attachment: 381419 Committed r251377: <https://trac.webkit.org/changeset/251377>
All reviewed patches have been landed. Closing bug.
<rdar://problem/56473973>