Bug 234600

Summary: Simplify test for startOfLastParagraph in InsertListCommand::doApply
Product: WebKit Reporter: Frédéric Wang (:fredw) <fred.wang>
Component: HTML EditingAssignee: Frédéric Wang (:fredw) <fred.wang>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, ews-watchlist, mifenton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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>