mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-12 18:08:15 +02:00
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.
9.8 KiB
9.8 KiB