mirror of
https://github.com/servo/servo
synced 2026-05-09 00:22:16 +02:00
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>
458 B
458 B