Skip to content

source element move and removing steps are wrong #11113

@annevk

Description

@annevk

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions