[Editing] Update Selection before removing element in contenteditable
div
When an element is removed from a node, making it empty, the selection
was not updated accordingly. This resulted in the |OnSelectionChange|
event not being fired. To resolve this, the selection is now updated
prior to the removal of the element that makes the node empty.
Consequently, the |OnSelectionChange| event is fired through frame
selection.
Bug: 40876506
Change-Id: I2181ce44eb1356377c658bd6ba91023508ee4939
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5694338
Reviewed-by: Siye Liu siliu@microsoft.com
Reviewed-by: Kent Tamura tkent@chromium.org
Commit-Queue: Tanu Jain tanujain@microsoft.com
Cr-Commit-Position: refs/heads/main@{#1338306}