Files
serenity/Userland/Libraries/LibWeb/DOM/ShadowRoot.cpp
Andreas Kling a5dbfe414c LibWeb: Only invalidate shadow root when style sheet inside changes
We don't have to invalidate style for the entire document when a style
sheet changes inside of a shadow root.

To make this possible, StyleSheetList now keeps track of which
Document-or-ShadowRoot it corresponds to, instead of just tracking the
containing Document.

This avoids a lot of style recomputation on pages with lots of shadow
DOM content (like GitHub).

(cherry picked from commit 4bc3055c0face93e69b7632c40d7726588a1b247)
2024-10-11 20:25:41 -04:00

6.1 KiB