mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
LibWeb: Add a rule-cache for PseudoElements
This works a little differently from the other caches - ALL rules containing a pseudo-element are in this bucket. This lets us only look at this bucket when finding styles for a pseudo-element, and ignore it if we're not.
This commit is contained in:
parent
817cd13d59
commit
f3cda3c830
2 changed files with 45 additions and 28 deletions
|
@ -100,6 +100,7 @@ private:
|
|||
HashMap<FlyString, Vector<MatchingRule>> rules_by_id;
|
||||
HashMap<FlyString, Vector<MatchingRule>> rules_by_class;
|
||||
HashMap<FlyString, Vector<MatchingRule>> rules_by_tag_name;
|
||||
HashMap<Selector::PseudoElement, Vector<MatchingRule>> rules_by_pseudo_element;
|
||||
Vector<MatchingRule> other_rules;
|
||||
int generation { 0 };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue