mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-20 23:44:35 +00:00
Instead of putting every rule that matches a pseudo element in the same bucket, let them go in the best ID/class/tag name bucket instead. Then, add a flag to MatchingRule that says whether it contains a pseudo element in the rightmost compound selector. When deciding which selectors to run for an element, we can now simply filter in/out pseudo element selectors as appropriate depending on what we're trying to match. This fixes an issue where pages using Font Awesome had 1700+ rules in the pseudo-element rule cache. (This meant all those rules had to run against every element twice or more while instantiating pseudo elements.)
4.5 KiB
4.5 KiB