Skip to content

Pass and use better parent/root information to (re)moving steps.#12144

Merged
annevk merged 4 commits intowhatwg:mainfrom
dbaron:removing-steps
Feb 12, 2026
Merged

Pass and use better parent/root information to (re)moving steps.#12144
annevk merged 4 commits intowhatwg:mainfrom
dbaron:removing-steps

Conversation

@dbaron
Copy link
Member

@dbaron dbaron commented Feb 9, 2026

For removing steps and moving steps, instead of passing only oldParent (which is null when the removed node is not the root of the removed subtree), pass both oldAncestor (never null) and isSubtreeRoot.

This updates element removing steps as needed, fixing spec bugs (apparently not reflected as implementation bugs) for a/area and for selectedcontent.

This is the HTML spec part of the fix for #12098
For the DOM spec change see whatwg/dom#1450

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


/embedded-content.html ( diff )
/form-elements.html ( diff )
/infrastructure.html ( diff )
/interactive-elements.html ( diff )
/links.html ( diff )

For removing steps and moving steps, instead of passing only oldParent
(which is null when the removed node is not the root of the removed
subtree), pass both oldParent (never null) and isSubtreeRoot.

This updates element removing steps as needed, fixing spec bugs
(apparently not reflected as implementation bugs) for a/area and for
selectedcontent.

This is the HTML spec part of the fix for
whatwg#12098
For the DOM spec change see
whatwg/dom#1450
@dbaron
Copy link
Member Author

dbaron commented Feb 9, 2026

Also note that this also fixes a minor error in the general definition of "HTML element moving steps", where it wasn't passing oldParent through from the DOM spec's "moving steps" through to the individual HTML element definitions.

@dbaron dbaron requested a review from annevk February 9, 2026 19:51
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.

Looks good modulo nits.

@annevk annevk merged commit 097be9f into whatwg:main Feb 12, 2026
2 checks passed
@whatwg whatwg deleted a comment from saeed3222ad-coder Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants