[Selection API] Use composed DOM tree for getComposedRanges
We update the implementation of getComposedRanges to use the cached
selection in DOM Tree to find start/end endpoints. These endpoints
are composed because they are not restricted to be within one TreeScope,
unlike the range associated with the selection.
We also remove the old logic of adding composed_range_ in Range to cache
flat tree endpoints.
Change-Id: Iee7807f74348d09a4b1e7c3dbb4ebe514bde874c
Bug: 356905057
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5921292
Commit-Queue: Di Zhang dizhangg@chromium.org
Reviewed-by: Mason Freed masonf@chromium.org
Reviewed-by: Siye Liu siliu@microsoft.com
Cr-Commit-Position: refs/heads/main@{#1368897}