Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e6fb0fd49c8ef4ebc3c0fd3c9079f73a0df2740c
      
https://github.com/WebKit/WebKit/commit/e6fb0fd49c8ef4ebc3c0fd3c9079f73a0df2740c
  Author: Patrick Griffis <[email protected]>
  Date:   2026-08-20 (Thu, 20 Aug 2026)

  Changed paths:
    R 
LayoutTests/platform/wpe/editing/selection/caret-mode-paragraph-keys-navigation-expected.txt
    R 
LayoutTests/platform/wpe/imported/w3c/web-platform-tests/editing/other/paste-in-list-with-inline-style.tentative-expected.txt
    R 
LayoutTests/platform/wpe/imported/w3c/web-platform-tests/editing/other/paste-text-after-collapsible-white-space-whose-container-remove-non-first-children-expected.txt
    R 
LayoutTests/platform/wpe/imported/w3c/web-platform-tests/editing/other/plain-text-copy-paste-of-paragraph-ending-with-non-layed-out-content-expected.txt
    M Source/WebKit/WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp
    A Tools/TestWebKitAPI/Tests/WebKit/WKWebView/wpe/TestWebViewEditor.cpp
    M Tools/TestWebKitAPI/glib/PlatformWPE.cmake

  Log Message:
  -----------
  [WPE] Ctrl+C does not copy on non-editable content
https://bugs.webkit.org/show_bug.cgi?id=322012

Reviewed by Carlos Garcia Campos.

handleKeyboardEvent() gave up on anything that could not be edited, so the
bindings that do not modify text never ran at all: Ctrl+C and Ctrl+A did
nothing on an ordinary page. The guard belongs in handleKeyPress(), which is
the only path that inserts text.

That leaves handleKeyDown() executing commands the selection is free to
refuse, so it now claims the event only when the command actually ran. Without
that the arrow and paging keys would stop scrolling non-editable content,
where the movement command fails but the event was still marked handled.

Tests: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/wpe/TestWebViewEditor.cpp

* 
LayoutTests/platform/wpe/editing/selection/caret-mode-paragraph-keys-navigation-expected.txt:
 Removed.
* 
LayoutTests/platform/wpe/imported/w3c/web-platform-tests/editing/other/paste-in-list-with-inline-style.tentative-expected.txt:
 Removed.
* 
LayoutTests/platform/wpe/imported/w3c/web-platform-tests/editing/other/paste-text-after-collapsible-white-space-whose-container-remove-non-first-children-expected.txt:
 Removed.
* 
LayoutTests/platform/wpe/imported/w3c/web-platform-tests/editing/other/plain-text-copy-paste-of-paragraph-ending-with-non-layed-out-content-expected.txt:
 Removed.
* Source/WebKit/WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:
(WebKit::handleKeyPress):
(WebKit::handleKeyDown):
(WebKit::WebEditorClient::handleKeyboardEvent):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/wpe/TestWebViewEditor.cpp: Added.
(EditorKeyBindingTest::loadContentsAndWait):
(EditorKeyBindingTest::evaluateString):
(EditorKeyBindingTest::clipboard const):
(EditorKeyBindingTest::copyWithKeyStroke):
(testEditorCopyKeyBindingNonEditable):
(testEditorCopyKeyBindingEditable):
(testEditorSelectAllKeyBindingNonEditable):
(testEditorArrowKeysStillScroll):
(beforeAll):
(afterAll):
* Tools/TestWebKitAPI/glib/PlatformWPE.cmake:

Canonical link: https://commits.webkit.org/319521@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to