github web-platform-tests/wpt merge_pr_48883

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
10 months ago

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

R=nrosenthal@chromium.org

Bug: 40150299
Change-Id: Ib4a4cc8531f954d9864bd62399b297b5c8aa870b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5961984
Commit-Queue: Dominic Farolino dom@chromium.org
Reviewed-by: Noam Rosenthal nrosenthal@chromium.org
Cr-Commit-Position: refs/heads/main@{#1375807}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.