github web-platform-tests/wpt merge_pr_47476

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

[Selection API] Add composed range endpoints

We update Range API to support composed range. Previously, when setting
the start/end range endpoints, if they are in different node trees,
they will be collapsed. Now, if start/end are in different node trees,
but same document, composed_range_ will be set to track those cross
shadow tree endpoints.

We update Selection::GetComposedRanges to use composed start and end
to create a composed StaticRange.

We fix Selection::GetComposedRanges to use
IsShadowIncludingInclusiveAncestorOf for Rescoping and add a test.

Change-Id: Ib46497382fb83809394499182b5c8e4ee08925b7
Bug: 40286116
Fixed: 335245347
Fixed: 355630554
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5744732
Reviewed-by: Mason Freed masonf@chromium.org
Reviewed-by: Siye Liu siliu@microsoft.com
Commit-Queue: Di Zhang dizhangg@chromium.org
Cr-Commit-Position: refs/heads/main@{#1337611}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.