mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
The :host::part() pattern allows a shadow DOM's own stylesheet to style its internal elements that have been exposed via the part attribute. Previously, ::part() rules were only collected from ancestor shadow roots (for external part styling), but never from the element's own containing shadow root. Fix this by also collecting ::part() rules from the element's own shadow root in collect_matching_rules(). Additionally, fix the selector engine's ::part() compound matching to preserve the shadow_host when the rule originates from the part element's own shadow root, allowing :host to match correctly in the same compound selector. This fixes 2 previously failing WPT tests: - css/css-shadow-parts/host-part-002.html - css/css-shadow-parts/host-part-nesting.html
72 KiB
72 KiB