Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 447be98d29228a55b1faa0aa3822e06026e8d14e
https://github.com/WebKit/WebKit/commit/447be98d29228a55b1faa0aa3822e06026e8d14e
Author: Wenson Hsieh <[email protected]>
Date: 2026-03-13 (Fri, 13 Mar 2026)
Changed paths:
M Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/EditorStateTests.mm
Log Message:
-----------
[macOS] Allow attributedSubstringForCharacterRangeAsync for non-editable
selections
https://bugs.webkit.org/show_bug.cgi?id=309847
rdar://172295236
Reviewed by Abrar Rahman Protyasha.
Remove the `isContentEditable()` early return, so that
`attributedSubstringForProposedRange` works
on non-editable content.
Note that from code inspection, this codepath is only currently called by
AppKit when the user is
already editing (IME, inspector bar), so opening it up to non-editable
selections should not break
existing clients.
* Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::attributedSubstringForCharacterRangeAsync):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/EditorStateTests.mm:
(TestWebKitAPI::TEST(EditorStateTests,
UnionRectInVisibleSelectedRangeForNonEditableRangeSelection)):
Canonical link: https://commits.webkit.org/309186@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications