mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-05 22:52:10 +02:00
Before this change, the ancestor filter would only reject rules that required a certain set of descendant strings (class, ID or tag name) to be present in the current element's ancestor chain. An immediate child is also a descendant, so we can include this relationship in the ancestor filter as well. This substantially improves the efficiency of the ancestor filter on websites using Tailwind CSS. For example, https://tailwindcss.com/ itself goes from full style updates taking ~1400ms to ~350ms. Still *way* too long, but a huge improvement nonetheless. (cherry picked from commit 34fdd0d44fcf916540ea66ba9c895ba005a54b9a)
23 KiB
23 KiB