[wpt-sync] Sync PR 48883 - DOM: Preserve selection during moveBefore()
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox134 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 48883 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/48883
Details from upstream follow.
Dominic Farolino <dom@chromium.org> wrote:
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 selectionBug: 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}
Assignee | ||
Comment 1•6 days ago
|
||
Assignee | ||
Updated•6 days ago
|
Assignee | ||
Comment 2•6 days ago
|
||
Assignee | ||
Comment 3•6 days ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 6 subtests
Status Summary
Firefox
OK
: 1
FAIL
: 6
Chrome
OK
: 1
FAIL
: 6
Safari
OK
: 1
FAIL
: 6
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /dom/nodes/moveBefore/tentative/selection-preserve.html [wpt.fyi]
- moveBefore should not reset selection with preceding text:
FAIL
(Chrome:FAIL
, Safari:FAIL
) - moveBefore should not reset selection with preceding and following text:
FAIL
(Chrome:FAIL
, Safari:FAIL
) - moveBefore should not reset selection that enters a subtree, when the whole selection is moved:
FAIL
(Chrome:FAIL
, Safari:FAIL
) - moveBefore anchor node moved up to expand selection and absorb nodes:
FAIL
(Chrome:FAIL
, Safari:FAIL
) - moveBefore move intersecting nodes out of a selection:
FAIL
(Chrome:FAIL
, Safari:FAIL
) - moveBefore focus node moved up to shrink selection and exclude nodes:
FAIL
(Chrome:FAIL
, Safari:FAIL
)
- moveBefore should not reset selection with preceding text:
https://hg.mozilla.org/mozilla-central/rev/34f7bebb5f72
https://hg.mozilla.org/mozilla-central/rev/7a78e50c8a2a
Description
•