Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DOM: Preserve selection during moveBefore()
This CL preserves visual selection computation when a child is removed from the DOM *during* a state-preserving atomic move. This is particularly relevant when the moved node is either the anchor or focus node of the selection. This CL also adds a bunch of tests to confirm that selection is properly preserved when: - Selection anchor is moved in the DOM to include more nodes - Selection focus is moved in the DOM to exclude once-intersecting nodes - Nodes that are entirely within a selection (not anchor or focus) are rearranged/moved still within that selection [email protected] Bug: 40150299 Change-Id: Ib4a4cc8531f954d9864bd62399b297b5c8aa870b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5961984 Commit-Queue: Dominic Farolino <[email protected]> Reviewed-by: Noam Rosenthal <[email protected]> Cr-Commit-Position: refs/heads/main@{#1375807}
- Loading branch information