Bug 234600 - Simplify test for startOfLastParagraph in InsertListCommand::doApply
Summary: Simplify test for startOfLastParagraph in InsertListCommand::doApply
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Frédéric Wang (:fredw)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-12-22 05:52 PST by Frédéric Wang (:fredw)
Modified: 2021-12-24 09:09 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.54 KB, patch)
2021-12-22 06:01 PST, Frédéric Wang (:fredw)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Wang (:fredw) 2021-12-22 05:52:45 PST
Currently, we are doing

!startOfLastParagraph.deepEquivalent().anchorNode()->isConnected()

but it could be replaced with

startOfLastParagraph.isOrphan()

which is the same as

startOfLastParagraph.deepEquivalent().isOrphan()

and so the same as

startOfLastParagraph.deepEquivalent().anchorNode() && !startOfLastParagraph.deepEquivalent().anchorNode()->isConnected()
Comment 1 Frédéric Wang (:fredw) 2021-12-22 06:01:48 PST
Created attachment 447798 [details]
Patch
Comment 2 EWS 2021-12-24 09:08:12 PST
Committed r287428 (245563@main): <https://commits.webkit.org/245563@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 447798 [details].
Comment 3 Radar WebKit Bug Importer 2021-12-24 09:09:15 PST
<rdar://problem/86894407>