Files
ladybird/Libraries/LibWeb/DOM/ShadowRoot.cpp
Sam Atkins 8d401f7a95 LibWeb/DOM: Give ShadowRoots a "part element map"
It maps part names to the elements (or pseudo-elements) that have them.
The spec warns about this concept being expensive to calculate, and it
is: you have to walk the entire subtree. To make that less painful, I'm
keeping it cached on the ShadowRoot and recalculating it if the DOM
tree version has changed since. This will invalidate it more often than
necessary, but it's also simple and shouldn't be able to miss any cases,
so it seems reasonable for now.
2025-12-15 14:12:39 +00:00

9.8 KiB