Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a02317c7845df741fdc35eea02278e28e5dd4752
https://github.com/WebKit/WebKit/commit/a02317c7845df741fdc35eea02278e28e5dd4752
Author: Claudio Saavedra <[email protected]>
Date: 2026-05-19 (Tue, 19 May 2026)
Changed paths:
M Source/WebCore/platform/KeypressCommand.h
M Tools/Scripts/webkitpy/api_tests/allowlist.txt
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/TextExtractionTests.mm
Log Message:
-----------
2-parameter KeypressCommand constructor missing replacement range
initialization
https://bugs.webkit.org/show_bug.cgi?id=315027
Reviewed by Ryosuke Niwa.
The KeypressCommand 2-parameter constructor was missing an initializer for
replacementRange, leaving its location at 0 (the CharacterRange default)
instead of WTF::notFound. executeKeypressCommandsInternal() interprets any
location other than WTF::notFound as an explicit replacement range, so it
was resetting the cursor to position 0 before every character insertion,
causing typed text to appear in reverse order.
* Source/WebCore/platform/KeypressCommand.h:
(WebCore::KeypressCommand::KeypressCommand):
* Tools/Scripts/webkitpy/api_tests/allowlist.txt:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/TextExtractionTests.mm:
(TestWebKitAPI::(TextExtractionTests, KeyPressInsertsCharactersInOrder)):
Canonical link: https://commits.webkit.org/313470@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications