Simplify some editing code
Created attachment 407810 [details] Patch
Came from one of the things Sam Weinig asked for in my last patch.
Committed r266498: <https://trac.webkit.org/changeset/266498> All reviewed patches have been landed. Closing bug and clearing flags on attachment 407810 [details].
<rdar://problem/68246474>
It looks like the changes in https://trac.webkit.org/changeset/266498/webkit has caused editing/inserting/insert-paragraph-separator-crash.html to crash constantly with an assertion on Mac and iOS debug History: https://results.webkit.org/?suite=layout-tests&test=editing%2Finserting%2Finsert-paragraph-separator-crash.html Log: https://build.webkit.org/results/Apple-Catalina-Debug-WK1-Tests/r266517%20(6843)/editing/inserting/insert-paragraph-separator-crash-crash-log.txt
Created https://bugs.webkit.org/show_bug.cgi?id=216128 to track this
Lets roll this out. I will re-land after fixing.
Re-opened since this is blocked by bug 216143
Comment on attachment 407810 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=407810&action=review > Source/WebCore/page/DOMSelection.cpp:344 > + frame->selection().setSelectedRange(makeSimpleRange(selectedRange->start), Affinity::Upstream, FrameSelection::ShouldCloseTyping::No); Turns out this needs to be Affinity::Downstream to preserve behavior. Might be correct to have it be upstream, but requires changes elsewhere. Landing with Affinity::Downstream to preserve behavior.
Committed r266618: <https://trac.webkit.org/changeset/266618>