mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:18:12 +00:00
LibWeb: Add "ID" buckets to StyleComputer::RuleCache
We can skip rules that require a specific ID when matching against any element that doesn't have that ID.
This commit is contained in:
parent
646b37d1a9
commit
031296cf7b
2 changed files with 14 additions and 1 deletions
|
@ -96,6 +96,7 @@ private:
|
|||
DOM::Document& m_document;
|
||||
|
||||
struct RuleCache {
|
||||
HashMap<FlyString, Vector<MatchingRule>> rules_by_id;
|
||||
HashMap<FlyString, Vector<MatchingRule>> rules_by_class;
|
||||
Vector<MatchingRule> other_rules;
|
||||
int generation { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue