mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 02:26:10 +00:00
LibWeb: Bucket CSS rules by pseudo-element
Instead of throwing all pseudo-element rules in one bucket, let's have one bucket per pseudo-element. This means we only run ::before rules for ::before pseudo-elements, only ::after rules for ::after, etc. Average style update time on https://tailwindcss.com/ 250ms -> 215ms.
This commit is contained in:
parent
d22228ab93
commit
87056ee0d2
Notes:
github-actions[bot]
2024-09-10 14:55:39 +00:00
Author: https://github.com/awesomekling
Commit: 87056ee0d2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1362
Reviewed-by: https://github.com/AtkinsSJ ✅
2 changed files with 9 additions and 3 deletions
|
@ -215,7 +215,7 @@ private:
|
|||
HashMap<FlyString, Vector<MatchingRule>> rules_by_class;
|
||||
HashMap<FlyString, Vector<MatchingRule>> rules_by_tag_name;
|
||||
HashMap<FlyString, Vector<MatchingRule>, AK::ASCIICaseInsensitiveFlyStringTraits> rules_by_attribute_name;
|
||||
Vector<MatchingRule> pseudo_element_rules;
|
||||
Array<Vector<MatchingRule>, to_underlying(CSS::Selector::PseudoElement::Type::KnownPseudoElementCount)> rules_by_pseudo_element;
|
||||
Vector<MatchingRule> root_rules;
|
||||
Vector<MatchingRule> other_rules;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue