Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce moveBefore() state-preserving atomic move API #1307

Open
wants to merge 57 commits into
base: main
Choose a base branch
from

Conversation

domfarolino
Copy link
Member

@domfarolino domfarolino commented Aug 26, 2024

This PR introduces a new DOM API on the ParentNode mixin: moveBefore(). It mirrors insertBefore() in shape, but defers to a new DOM manipulation primitive that this PR adds in service of this new API: the "move" primitive. The move primitive contains some of the DOM tree bookkeeping steps from the remove primitive, as well as the insert primitive, and does three more interesting things:

  1. Calls the moving steps hook with the moved node and the old parent (possibly null, just like the removing steps)
  2. Queues a custom element callback reaction for the connectedMoveCallback()
  3. Queues two back-to-back mutation record tasks: one for removal from the old parent; one for insertion into the new one

The power of the move primitive comes from the fact that the algorithm does not defer to the traditional insert and removal primitives, and therefore does not invoke the removing steps and insertion steps. This allows most state to be preserved by default (i.e., we don't tear down iframes, or close dialogs). Sometimes, the insertion/removing step overrides in other specifications have steps that do need to be performed during a move anyways. These specifications are expected to override the moving steps hook and perform the necessary work accordingly. See whatwg/html#10657 for HTML.

Closes #1255. Closes #1335.

Remaining tasks (some will be PRs in other standards):

  • Custom element integration
  • Keep popovers open
  • Don't call post-connection steps if state-preserving atomic move is in progress
  • Don't call becomes connected / becomes browsing-context
  • Only disconnect subframes on removal when state-preserving atomic move is not in progress
  • Keep dialogs open: see removing steps
  • img/source: this shouldn't count as a relevant mutation
  • Preserve fullscreen
  • Preserve focus
    • Need to resolve focusin event semantics
  • ~[ ] Don't reset animations / transitions. See here
    • Maybe nothing needs to be done here. Given how element removals are handled, the spec does NOT require transitions to be removed from the UA's set of running transitions for moved nodes since they are never removed from the Document.~
  • [ ] Preserve text-selection. See set the selection range. Edit: Nothing needs to be done here. Selection metadata (i.e., selectionStart and kin) is preserved by default in browsers, consistent with HTML (no action is taken on removal). The UI behavior of the selection not being highlighted is a side-effect of the element losing focus
  • Selection API: don't reset the Document's selection
    • Updates to the selection range should happen according to how the DOM Standard primitives update ranges. The Selection API specification admits as much, by deferring to the insert and removal algorithms. Therefore, we should reference the move primitive from the Selection API specification, and ensure that the move primitive in this DOM Standard PR updates live ranges correctly: Reference the move primitive in DOM mutations section w3c/selection-api#341
    • selectionchange event: We've decided to allow selectionchange event to still fire, since it is queued in a task. No changes for this part are required.
  • Pointer event state reset: see here
  • Hide input/select picker: here
  • Preserve pointer lock: here
  • Containment: keep last remembered size(see here)

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

@domfarolino domfarolino changed the title Introduce \moveBefore()\ state-preserving atomic move API Introduce moveBefore() state-preserving atomic move API Aug 26, 2024
@domfarolino domfarolino added the impacts documentation Used by documentation communities, such as MDN, to track changes that impact documentation label Aug 26, 2024
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the mutation record needs some more design work. I would expect it to capture the information of a remove and an insert at the same time. Perhaps it needs to be a new object, though we could further overload the existing MutationRecord as well I guess. At least I think you need:

  • old target
  • target
  • moved node (I'm not sure you can ever move multiple at this point, but maybe we should allow for it in the mutation record design?)
  • old previous sibling
  • old next sibling
  • previous sibling
  • next sibling

Would be good to know what @smaug---- thinks and maybe @ajklein even wants to chime in.

dom.bs Outdated Show resolved Hide resolved
dom.bs Outdated Show resolved Hide resolved
dom.bs Outdated Show resolved Hide resolved
dom.bs Outdated Show resolved Hide resolved
@annevk annevk added topic: nodes addition/proposal New features or enhancements labels Aug 27, 2024
@smaug----
Copy link
Collaborator

  • old target

  • target

  • moved node (I'm not sure you can ever move multiple at this point, but maybe we should allow for it in the mutation record design?)

Shouldn't the target node be all the time the same, it is just the siblings which change.
So we'd need only oldPreviousSibling and oldNextSibling. Oh, hmm, this isn't only about moving children but moving anything.

If this is really just remove and add back elsewhere, we could just reuse the existing childList MutationRecords, one for remove, one for adding node back, and possibly just add a flag to MutationRecord that it was about move.

(movedNodes is a bit confusing, since it seems to depend on the connectedness of the relevant nodes and it is apparently empty for the removal part. And it is unclear to me why we need the connectedness check. This is about basic DOM tree operations, and I'd assume those to work the same way whether or not the node is connected)

@annevk
Copy link
Member

annevk commented Sep 4, 2024

Creating two separate mutation records that a consumer would have to merge to (fully) understand it's a move seems suboptimal?

I agree that it should probably work for disconnected nodes as well, but I don't think we want to support a case where the shadow-including root changes.

@ajklein
Copy link

ajklein commented Sep 4, 2024

It's been a long time since I've thought about this stuff, but I'm inclined to agree with @smaug---- that creating a new type of MutationRecord feels unnecessary. Users of MutationObserver already have to do coalescing if they want to make sense of the stream of changes they observe. There are already other move-like operations, such as appending a child that's already somewhere else in the tree, which today generates two records.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 16, 2024
This CL makes moveBefore() match the spec PR [1], with regard to the
agreed-upon error-throwing behavior for all pre-moving validity and
hierarchy conditions. This means throwing an exception for:
 - Disconnected parent destination or move target
 - Cross-document Nodes
 - Destination parent that is not an Element node
 - Move target that is not an Element or character data

[1]: whatwg/dom#1307

[email protected]

Bug: 40150299
Change-Id: Iaf5243fb2762e21ede068a222600bd158859fe92
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 16, 2024
This CL makes moveBefore() match the spec PR [1], with regard to the
agreed-upon error-throwing behavior for all pre-moving validity and
hierarchy conditions. This means throwing an exception for:
 - Disconnected parent destination or move target
 - Cross-document Nodes
 - Destination parent that is not an Element node
 - Move target that is not an Element or character data

[1]: whatwg/dom#1307

[email protected]

Bug: 40150299
Change-Id: Iaf5243fb2762e21ede068a222600bd158859fe92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5935350
Reviewed-by: Noam Rosenthal <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1369303}
KyleJu pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 21, 2024
This CL makes moveBefore() match the spec PR [1], with regard to the
agreed-upon error-throwing behavior for all pre-moving validity and
hierarchy conditions. This means throwing an exception for:
 - Disconnected parent destination or move target
 - Cross-document Nodes
 - Destination parent that is not an Element node
 - Move target that is not an Element or character data

[1]: whatwg/dom#1307

[email protected]

Bug: 40150299
Change-Id: Iaf5243fb2762e21ede068a222600bd158859fe92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5935350
Reviewed-by: Noam Rosenthal <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1369303}

Co-authored-by: Dominic Farolino <[email protected]>
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Oct 23, 2024
…-move validity checks, a=testonly

Automatic update from web-platform-tests
DOM: Make moveBefore() throw for all pre-move validity checks (#48642)

This CL makes moveBefore() match the spec PR [1], with regard to the
agreed-upon error-throwing behavior for all pre-moving validity and
hierarchy conditions. This means throwing an exception for:
 - Disconnected parent destination or move target
 - Cross-document Nodes
 - Destination parent that is not an Element node
 - Move target that is not an Element or character data

[1]: whatwg/dom#1307

[email protected]

Bug: 40150299
Change-Id: Iaf5243fb2762e21ede068a222600bd158859fe92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5935350
Reviewed-by: Noam Rosenthal <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1369303}

Co-authored-by: Dominic Farolino <[email protected]>
--

wpt-commits: 06b6ff6579327f235fff80b0f8bae8b0bbbc1069
wpt-pr: 48642
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this pull request Oct 23, 2024
…-move validity checks, a=testonly

Automatic update from web-platform-tests
DOM: Make moveBefore() throw for all pre-move validity checks (#48642)

This CL makes moveBefore() match the spec PR [1], with regard to the
agreed-upon error-throwing behavior for all pre-moving validity and
hierarchy conditions. This means throwing an exception for:
 - Disconnected parent destination or move target
 - Cross-document Nodes
 - Destination parent that is not an Element node
 - Move target that is not an Element or character data

[1]: whatwg/dom#1307

[email protected]

Bug: 40150299
Change-Id: Iaf5243fb2762e21ede068a222600bd158859fe92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5935350
Reviewed-by: Noam Rosenthal <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1369303}

Co-authored-by: Dominic Farolino <[email protected]>
--

wpt-commits: 06b6ff6579327f235fff80b0f8bae8b0bbbc1069
wpt-pr: 48642
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Oct 24, 2024
…-move validity checks, a=testonly

Automatic update from web-platform-tests
DOM: Make moveBefore() throw for all pre-move validity checks (#48642)

This CL makes moveBefore() match the spec PR [1], with regard to the
agreed-upon error-throwing behavior for all pre-moving validity and
hierarchy conditions. This means throwing an exception for:
 - Disconnected parent destination or move target
 - Cross-document Nodes
 - Destination parent that is not an Element node
 - Move target that is not an Element or character data

[1]: whatwg/dom#1307

[email protected]

Bug: 40150299
Change-Id: Iaf5243fb2762e21ede068a222600bd158859fe92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5935350
Reviewed-by: Noam Rosenthal <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1369303}

Co-authored-by: Dominic Farolino <[email protected]>
--

wpt-commits: 06b6ff6579327f235fff80b0f8bae8b0bbbc1069
wpt-pr: 48642
domfarolino added a commit to domfarolino/selection-api that referenced this pull request Oct 30, 2024
@domfarolino domfarolino marked this pull request as ready for review November 7, 2024 16:33
dom.bs Outdated Show resolved Hide resolved
dom.bs Outdated Show resolved Hide resolved
dom.bs Outdated Show resolved Hide resolved
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 11, 2024
This CL enables moveBefore() inside connected ShadowRoot
DocumentFragments, as the general only-Element-node target parent
pre-condition was too strict, and disabled this case, despite it being
a pretty valid one.

This was discussed in
whatwg/dom#1307 (comment).

[email protected]

Bug: 40150299
Change-Id: Ie9c6e31400b75b2b5d10d095c059012056a440da
aarongable pushed a commit to chromium/chromium that referenced this pull request Nov 11, 2024
This CL enables moveBefore() inside connected ShadowRoot
DocumentFragments, as the general only-Element-node target parent
pre-condition was too strict, and disabled this case, despite it being
a pretty valid one.

This was discussed in
whatwg/dom#1307 (comment).

[email protected]

Bug: 40150299
Change-Id: Ie9c6e31400b75b2b5d10d095c059012056a440da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6012161
Commit-Queue: Dominic Farolino <[email protected]>
Reviewed-by: Noam Rosenthal <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1381208}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 11, 2024
This CL enables moveBefore() inside connected ShadowRoot
DocumentFragments, as the general only-Element-node target parent
pre-condition was too strict, and disabled this case, despite it being
a pretty valid one.

This was discussed in
whatwg/dom#1307 (comment).

[email protected]

Bug: 40150299
Change-Id: Ie9c6e31400b75b2b5d10d095c059012056a440da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6012161
Commit-Queue: Dominic Farolino <[email protected]>
Reviewed-by: Noam Rosenthal <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1381208}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 20, 2024
See whatwg/dom#1307 (comment).

[email protected]

Bug: 40150299
Change-Id: I9529941e05591620da5b3c11635693a15f0ce866
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6111212
Reviewed-by: Noam Rosenthal <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1399350}
@domfarolino
Copy link
Member Author

OK slotchange and MutationObserver tests are added in web-platform-tests/wpt#49810 and https://chromium-review.googlesource.com/c/chromium/src/+/6108064 (upstreamed soon), so I think everything here is resolved. I'll look at the comments on the HTML integration PR, but I think this one is ready to go.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 20, 2024
See whatwg/dom#1307 (comment).

[email protected]

Bug: 40150299
Change-Id: I9529941e05591620da5b3c11635693a15f0ce866
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6111212
Reviewed-by: Noam Rosenthal <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1399350}
@noamr noamr removed their request for review December 23, 2024 07:42
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 26, 2024
See whatwg/dom#1307 (comment).

[email protected]

Bug: 40150299
Change-Id: I6be9d91d4e20690694fb20480f0d1d13a766b117
aarongable pushed a commit to chromium/chromium that referenced this pull request Dec 26, 2024
See whatwg/dom#1307 (comment).

[email protected]

Bug: 40150299
Change-Id: I6be9d91d4e20690694fb20480f0d1d13a766b117
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108064
Reviewed-by: Noam Rosenthal <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1400321}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 26, 2024
See whatwg/dom#1307 (comment).

[email protected]

Bug: 40150299
Change-Id: I6be9d91d4e20690694fb20480f0d1d13a766b117
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108064
Reviewed-by: Noam Rosenthal <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1400321}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Dec 26, 2024
See whatwg/dom#1307 (comment).

[email protected]

Bug: 40150299
Change-Id: I6be9d91d4e20690694fb20480f0d1d13a766b117
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108064
Reviewed-by: Noam Rosenthal <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1400321}
aarongable pushed a commit to chromium/chromium that referenced this pull request Dec 27, 2024
This CL ships the `ParentNode#moveBefore` API to Chrome stable,
targeting M133. See:

 - https://chromestatus.com/feature/5135990159835136
 - https://groups.google.com/a/chromium.org/g/blink-dev/c/YE_xLH6MkRs
 - https://issues.chromium.org/issues/40150299
 - whatwg/dom#1255
 - whatwg/dom#1307
 - whatwg/html#10657

R=chrishtr, masonf, nrosenthal

Bug: 40150299
Change-Id: I005f1db250d731d6845b5238048bbd0b90b20c81
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6112499
Reviewed-by: Noam Rosenthal <[email protected]>
Reviewed-by: Mason Freed <[email protected]>
Reviewed-by: Chris Harrelson <[email protected]>
Commit-Queue: Chris Harrelson <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1400559}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jan 8, 2025
…ng move, a=testonly

Automatic update from web-platform-tests
DOM: Test 'slotchange' event firing during move

See whatwg/dom#1307 (comment).

[email protected]

Bug: 40150299
Change-Id: I9529941e05591620da5b3c11635693a15f0ce866
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6111212
Reviewed-by: Noam Rosenthal <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1399350}

--

wpt-commits: dbed603b4216d2c9d7d2da4ec7edf6e9fcda1b9c
wpt-pr: 49810
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Jan 10, 2025
…ng move, a=testonly

Automatic update from web-platform-tests
DOM: Test 'slotchange' event firing during move

See whatwg/dom#1307 (comment).

[email protected]

Bug: 40150299
Change-Id: I9529941e05591620da5b3c11635693a15f0ce866
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6111212
Reviewed-by: Noam Rosenthal <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1399350}

--

wpt-commits: dbed603b4216d2c9d7d2da4ec7edf6e9fcda1b9c
wpt-pr: 49810
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Jan 10, 2025
…rver tests, a=testonly

Automatic update from web-platform-tests
DOM: Add basic moveBefore() MutationObserver tests

See whatwg/dom#1307 (comment).

[email protected]

Bug: 40150299
Change-Id: I6be9d91d4e20690694fb20480f0d1d13a766b117
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108064
Reviewed-by: Noam Rosenthal <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1400321}

--

wpt-commits: a53473e775d7da1c4ccb9e67d5b5a3f72e7223b2
wpt-pr: 49846
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jan 10, 2025
…rver tests, a=testonly

Automatic update from web-platform-tests
DOM: Add basic moveBefore() MutationObserver tests

See whatwg/dom#1307 (comment).

[email protected]

Bug: 40150299
Change-Id: I6be9d91d4e20690694fb20480f0d1d13a766b117
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108064
Reviewed-by: Noam Rosenthal <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1400321}

--

wpt-commits: a53473e775d7da1c4ccb9e67d5b5a3f72e7223b2
wpt-pr: 49846
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can fix these nits before merging if you want. I will merge this and the HTML PR on January 20 provided there is no further feedback.

dom.bs Outdated
@@ -2872,6 +2872,135 @@ before a <var>child</var>, with an optional <i>suppress observers flag</i>, run
</ol>


<p><a lt="Other applicable specifications">Specifications</a> may define <dfn export
id=concept-node-move-ext>moving steps</dfn> for all or some <a for=/>nodes</a>. The algorithm is
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DOM standard doesn't wrap on all spaces. Phrasing-level elements need to be kept on a single line. (This applies several times in this PR.)

It also seems okay to drop the explicit ID here as we stopped doing those.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed this instance, after finishing rewrapping this paragraph, no more jumped out at me. Maybe you have others in mind further down.

It also seems okay to drop the explicit ID here as we stopped doing those.

Yeah I realize it isn't necessary, however I liked the formatting of concept-node-move-ext since it perfectly matches the other primitives that HTML links to, so it seemed nice for link consistency: https://github.com/whatwg/html/pull/10657/files#diff-41cf6794ba4200b839c53531555f0f3998df4cbb01a4d5cb0b94e3ca5e23947dR3290-R3291. If you want to remove it, feel free, just remember to update the HTML PR. Otherwise, I'd slightly slightly prefer keeping as-is.

dom.bs Outdated Show resolved Hide resolved
sadym-chromium pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 14, 2025
See whatwg/dom#1307 (comment).

[email protected]

Bug: 40150299
Change-Id: I9529941e05591620da5b3c11635693a15f0ce866
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6111212
Reviewed-by: Noam Rosenthal <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1399350}
sadym-chromium pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 14, 2025
See whatwg/dom#1307 (comment).

[email protected]

Bug: 40150299
Change-Id: I6be9d91d4e20690694fb20480f0d1d13a766b117
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108064
Reviewed-by: Noam Rosenthal <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1400321}

<li><p>If <var>oldParent</var>'s <a for=tree>root</a> is a <a for=/>shadow root</a>, and
<var>oldParent</var> is a <a>slot</a> whose <a for=slot>assigned nodes</a> is the empty list, then
run <a>signal a slot change</a> for <var>oldParent</var>.
Copy link
Collaborator

@smaug---- smaug---- Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't we missing the steps needed to track the case when slot element itself if moving. In the "remove" algorithm step 14.
And I didn't immediately see tests for moving slots.

gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Jan 16, 2025
…rver tests, a=testonly

Automatic update from web-platform-tests
DOM: Add basic moveBefore() MutationObserver tests

See whatwg/dom#1307 (comment).

R=nrosenthalchromium.org

Bug: 40150299
Change-Id: I6be9d91d4e20690694fb20480f0d1d13a766b117
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108064
Reviewed-by: Noam Rosenthal <nrosenthalchromium.org>
Commit-Queue: Dominic Farolino <domchromium.org>
Cr-Commit-Position: refs/heads/main{#1400321}

--

wpt-commits: a53473e775d7da1c4ccb9e67d5b5a3f72e7223b2
wpt-pr: 49846

UltraBlame original commit: f3c0448263a2e25020e8474c519e842535771a93
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Jan 16, 2025
…rver tests, a=testonly

Automatic update from web-platform-tests
DOM: Add basic moveBefore() MutationObserver tests

See whatwg/dom#1307 (comment).

R=nrosenthalchromium.org

Bug: 40150299
Change-Id: I6be9d91d4e20690694fb20480f0d1d13a766b117
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108064
Reviewed-by: Noam Rosenthal <nrosenthalchromium.org>
Commit-Queue: Dominic Farolino <domchromium.org>
Cr-Commit-Position: refs/heads/main{#1400321}

--

wpt-commits: a53473e775d7da1c4ccb9e67d5b5a3f72e7223b2
wpt-pr: 49846

UltraBlame original commit: f3c0448263a2e25020e8474c519e842535771a93
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Jan 16, 2025
…rver tests, a=testonly

Automatic update from web-platform-tests
DOM: Add basic moveBefore() MutationObserver tests

See whatwg/dom#1307 (comment).

R=nrosenthalchromium.org

Bug: 40150299
Change-Id: I6be9d91d4e20690694fb20480f0d1d13a766b117
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108064
Reviewed-by: Noam Rosenthal <nrosenthalchromium.org>
Commit-Queue: Dominic Farolino <domchromium.org>
Cr-Commit-Position: refs/heads/main{#1400321}

--

wpt-commits: a53473e775d7da1c4ccb9e67d5b5a3f72e7223b2
wpt-pr: 49846

UltraBlame original commit: f3c0448263a2e25020e8474c519e842535771a93
bramus added a commit to bramus/react that referenced this pull request Jan 16, 2025
`moveBefore` was moved to the `ParentNode` mixin as per whatwg/dom#1307 (comment) (and was committed in whatwg/dom@3f3e94c)

As a result, its existence can no longer be checked on `Node.prototype` but must be checked in `Element.prototype`.
sebmarkbage pushed a commit to facebook/react that referenced this pull request Jan 17, 2025
`moveBefore` was moved to the `ParentNode` mixin as per
whatwg/dom#1307 (comment) _(and was
committed in
whatwg/dom@3f3e94c5beda922962dacaeb606087f57bd7f7be)_

As a result, its existence can no longer be checked on `Node.prototype`
but must be checked in `Element.prototype`
github-actions bot pushed a commit to facebook/react that referenced this pull request Jan 17, 2025
`moveBefore` was moved to the `ParentNode` mixin as per
whatwg/dom#1307 (comment) _(and was
committed in
whatwg/dom@3f3e94c5beda922962dacaeb606087f57bd7f7be)_

As a result, its existence can no longer be checked on `Node.prototype`
but must be checked in `Element.prototype`

DiffTrain build for [313c8c5](313c8c5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements impacts documentation Used by documentation communities, such as MDN, to track changes that impact documentation stage: 3 Committed topic: nodes
Development

Successfully merging this pull request may close these issues.

moveBefore() cosmetic concerns Atomic move operation for element reparenting & reordering
9 participants