Commit Graph

2 Commits

Author SHA1 Message Date
Simon Wülker
46e6d072b7 script: Enforce exclusivity between <details> elements in the same tree (#40314)
Within the same tree, only one `<details>` element with the same name
may be open at a time. Before this change, this invariant was not
enforced.

I've added a `HashMap` to `Document` and `ShadowRoot` which maps from a
name to the a list of details elements with the same name. This map
allows us to find conflicting details elements without having to
traverse the whole tree. Of course this only works when the tree is a
document tree or a shadow tree, so we still have to fall back to
`traverse_preorder` in some cases (which I believe to be uncommon).

This is ready for review, but I'd like to wait until
https://github.com/servo/servo/pull/40271 is merged to not cause
unnecessary merge conflicts.

Testing: New web platform tests start to pass

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-11-04 21:54:21 +00:00
Josh Matthews
af8d7c2de7 script: Move code generation and webidl files to new script_bindings crate. (#35157)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-01-24 20:47:43 +00:00