Skip to content

source element move and removing steps are wrong #11113

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

Closed
annevk opened this issue Mar 7, 2025 · 0 comments · Fixed by #11137
Closed

source element move and removing steps are wrong #11113

annevk opened this issue Mar 7, 2025 · 0 comments · Fixed by #11137

Comments

@annevk
Copy link
Member

annevk commented Mar 7, 2025

What is the issue with the HTML Standard?

They start with something along these lines:

If movedNode's next sibling was an img element

but that would mean you'd actually have to pass the next sibling in. However, as @domfarolino discovered implementations don't actually do this https://github.com/whatwg/html/pull/10657/files#r1894423255:

Furthermore, I am actually skeptical that the spec has been doing the right thing in this case anyways. For example, Chromium doesn't track the "old next sibling" of the removed source, and trigger a relevant mutation on it. It triggers relevant mutations on all image children of the picture (https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/html_picture_element.cc;l=26-29;drc=a7096322ab1e5c9e70ae7b773faed492ed8461cb) so maybe implementations are compatible with that, and we can simplify all of this anyways.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Mar 17, 2025
See whatwg/html#11113. Since the test added
here passes in all browsers, we can remove the spec text indicating
that the source element's removing and moving steps somehow keep track
of the previous position's "next sibling" pointer.

See also whatwg/html#11137.

R=domenic

Bug: N/A
Change-Id: I572939ee5f7acb0c8980707a46aa581c449eb96d
aarongable pushed a commit to chromium/chromium that referenced this issue Mar 17, 2025
See whatwg/html#11113. Since the test added
here passes in all browsers, we can remove the spec text indicating
that the source element's removing and moving steps somehow keep track
of the previous position's "next sibling" pointer.

See also whatwg/html#11137.

R=domenic

Bug: N/A
Change-Id: I572939ee5f7acb0c8980707a46aa581c449eb96d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6357453
Reviewed-by: Domenic Denicola <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1433512}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Mar 17, 2025
See whatwg/html#11113. Since the test added
here passes in all browsers, we can remove the spec text indicating
that the source element's removing and moving steps somehow keep track
of the previous position's "next sibling" pointer.

See also whatwg/html#11137.

R=domenic

Bug: N/A
Change-Id: I572939ee5f7acb0c8980707a46aa581c449eb96d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6357453
Reviewed-by: Domenic Denicola <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1433512}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Mar 17, 2025
See whatwg/html#11113. Since the test added
here passes in all browsers, we can remove the spec text indicating
that the source element's removing and moving steps somehow keep track
of the previous position's "next sibling" pointer.

See also whatwg/html#11137.

R=domenic

Bug: N/A
Change-Id: I572939ee5f7acb0c8980707a46aa581c449eb96d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6357453
Reviewed-by: Domenic Denicola <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1433512}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Mar 18, 2025
…ion test, a=testonly

Automatic update from web-platform-tests
Add 'next sibling' source relevant mutation test

See whatwg/html#11113. Since the test added
here passes in all browsers, we can remove the spec text indicating
that the source element's removing and moving steps somehow keep track
of the previous position's "next sibling" pointer.

See also whatwg/html#11137.

R=domenic

Bug: N/A
Change-Id: I572939ee5f7acb0c8980707a46aa581c449eb96d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6357453
Reviewed-by: Domenic Denicola <[email protected]>
Commit-Queue: Dominic Farolino <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1433512}

--

wpt-commits: c29189937f2794b23486f6d7b3bdf8326fb05ddb
wpt-pr: 51381
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants