<?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>285908</bug_id>
          
          <creation_ts>2025-01-14 06:16:45 -0800</creation_ts>
          <short_desc>REGRESSION(288559@main) [GTK] API test  /WebKitGTK/TestWebViewEditor /webkit/WebKitWebView/cut-copy-paste/non-editable is failing</short_desc>
          <delta_ts>2025-09-26 15:48:59 -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>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=290257</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>156529</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Lauro Moura">lmoura</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>clopez</cc>
    
    <cc>ntim</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2087040</commentid>
    <comment_count>0</comment_count>
    <who name="Lauro Moura">lmoura</who>
    <bug_when>2025-01-14 06:16:45 -0800</bug_when>
    <thetext>/webkit/WebKitWebView/cut-copy-paste/non-editable:                  FAIL
ERROR:/app/webkit/Tools/TestWebKitAPI/Tests/WebKitGtk/TestWebViewEditor.cpp:217:bool EditorTest::canExecuteEditingCommand(const char*): assertion failed (m_canExecuteEditingCommand == webkit_editor_state_is_copy_available(editorState())): (1 == 0)

Steps to reproduce:

./Tools/Scripts/run-gtk-tests --release --display-server=xvfb WebKitBuild/GTK/Release/bin/TestWebKitAPI/WebKitGTK/TestWebViewEditor

IIUC, 288559@main changed the copy behavior to take the focused element as the source if the context is not editable, per the spec https://www.w3.org/TR/clipboard-apis/#fire-a-clipboard-event.

From a slack discussion[1] about the failure while still in EWS:

&gt; so line 217 is asserting that webkit_web_view_can_execute_editing_command and webkit_editor_state_is_copy_available yield the same result.
&gt; You&apos;ve changed the behavior of webkit_web_view_can_execute_editing_command without affecting the behavior of webkit_editor_state_is_copy_available so that&apos;s why the assertion is failing. 
&gt; So we should ask GTK+ maintainers which behavior we should maintain. Either we want the new behavior of execCommand or the old behavior / webkit_editor_state_is_copy_available&apos;s.

webkit_web_view_can_execute_editing_command docs:

&gt; Asynchronously check if it is possible to execute the given editing command.
&gt; When the operation is finished, callback will be called. You can then call 

webkit_editor_state_is_copy_available docs:

&gt; Gets whether a copy command can be issued.

[1] https://webkit.slack.com/archives/CU65R5WQY/p1736230230532089</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2146322</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2025-09-26 15:48:59 -0700</bug_when>
    <thetext>This test is timing out (instead of failing) since bots were migrated to the new infra. See: https://bugs.webkit.org/show_bug.cgi?id=299598</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>