Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 88b600d040a8c6caf2c28647720de8087aad63de
https://github.com/WebKit/WebKit/commit/88b600d040a8c6caf2c28647720de8087aad63de
Author: Richard Robinson <[email protected]>
Date: 2024-07-10 (Wed, 10 Jul 2024)
Changed paths:
M Source/WebKit/Shared/EditingRange.cpp
Log Message:
-----------
Debug assertion `ASSERT(editingRange.location != notFound)` is frequently hit
in Mail compose
https://bugs.webkit.org/show_bug.cgi?id=276403
rdar://131427649
Reviewed by Ryosuke Niwa.
The pattern of clients calling `selectedRangeWithCompletionHandler`, then
passing the resulting range
to `attributedSubstringForProposedRange` is not uncommon and happens in several
circumstances (for example,
AppKit does this when replying to an email in Mail, and WritingTools does this
when showing the affordance).
Since it is perfectly valid for `selectedRangeWithCompletionHandler` to return
`NSNotFound`, and also valid
for `attributedSubstringForProposedRange` to receive `NSNotFound`, and also
results in valid behavior (when
it is notFound, the behavior is just to return the whole range of the editable
content), this assertion can
and should be removed.
* Source/WebKit/Shared/EditingRange.cpp:
(WebKit::EditingRange::toRange):
Canonical link: https://commits.webkit.org/280817@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes