Use more smart pointers in editing code.
Pull request: https://github.com/WebKit/WebKit/pull/18294
Committed 268548@main (3b05ce368ecc): <https://commits.webkit.org/268548@main> Reviewed commits have been landed. Closing PR #18294 and removing active labels.
<rdar://problem/116149588>