<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>211979</bug_id>
          
          <creation_ts>2020-05-16 02:52:30 -0700</creation_ts>
          <short_desc>[GTK] Enable the async clipboard API</short_desc>
          <delta_ts>2023-03-24 05:31:16 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=211981</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=253758</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=254408</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>177633</dependson>
          <blocked>206653</blocked>
    
    <blocked>212232</blocked>
    
    <blocked>253758</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Garcia Campos">cgarcia</reporter>
          <assigned_to name="Carlos Garcia Campos">cgarcia</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>darin</cc>
    
    <cc>dpino</cc>
    
    <cc>feaneron</cc>
    
    <cc>kdwkleung</cc>
    
    <cc>lmoura</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>m.goleb+bugzilla</cc>
    
    <cc>rniwa</cc>
    
    <cc>vjaquez</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1653293</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2020-05-16 02:52:30 -0700</bug_when>
    <thetext>Enable the async clipboard API</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1653977</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2020-05-19 06:40:40 -0700</bug_when>
    <thetext>I&apos;ve started to work on this, but there are two things that I don&apos;t think we will be able to support:

1. Writing multiple items in the clipboard. I don&apos;t think that&apos;s supported in Linux, at least it&apos;s not possible using the GTK APIs. This shouldn&apos;t be a blocker, thouch, chromium doesn&apos;t support it either, we an just raise a NotAllowedError when write is called with mor than 1 item like chromium does.

2. Detecting clipboard changes to reject data access from items. I think this is actually an optimization of the WebKit implementation. When reading the clipboard contents only the item information is read, not the actual data. And when the item data is accessed then the data is actually read. The problem of this approach is that between clipboard.read() and item.getType() the contents of the system clipboard might change. In Mac there&apos;s a changeCount in the NSPasteboard, so that it can be detected to make item.getType() raise an exception. I&apos;m not sure this is the expected behavior according to the spec, though, as I understand it it should return the previous data, because it&apos;s expected to be retrieved on clipboard.read(). We don&apos;t have a way to detect changes in the clipboard (unless we are the current owner), so this approach doesn&apos;t work for us. I guess we can&apos;t just return always the current clipboard contents and assume this is an edge case that hardly ever happens. So, the only solution would be for us to read also the data on clipboard.read(). This can be very inefficient if there&apos;s an image in the clipboard when we are going to read it as html, for example.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1659066</commentid>
    <comment_count>2</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2020-06-04 06:13:54 -0700</bug_when>
    <thetext>*** Bug 212742 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1940628</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-03-11 10:35:56 -0800</bug_when>
    <thetext>*** Bug 253749 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1940704</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2023-03-12 08:44:52 -0700</bug_when>
    <thetext>*** Bug 253793 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1941538</commentid>
    <comment_count>5</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2023-03-15 07:23:12 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/11550</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1941822</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-03-16 04:42:35 -0700</bug_when>
    <thetext>Committed 261740@main (ec3dd91419a8): &lt;https://commits.webkit.org/261740@main&gt;

Reviewed commits have been landed. Closing PR #11550 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>