mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 09:39:39 +00:00
LibWeb: Add direct pointer to CSS::Selector in MatchingRule struct
This avoids looking up the selector by index repeatedly, giving us a ~400ms reduction in load time on https://wpt.fyi/
This commit is contained in:
parent
c3680a02a7
commit
e03aedbdf0
Notes:
github-actions[bot]
2025-01-26 14:08:36 +00:00
Author: https://github.com/awesomekling
Commit: e03aedbdf0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3370
Reviewed-by: https://github.com/gmta ✅
3 changed files with 10 additions and 13 deletions
|
@ -1652,7 +1652,7 @@ void Document::invalidate_style_for_elements_affected_by_hover_change(Node& old_
|
|||
if (!rule_is_relevant_for_current_scope)
|
||||
continue;
|
||||
|
||||
auto const& selector = rule.absolutized_selectors()[rule.selector_index];
|
||||
auto const& selector = rule.selector;
|
||||
|
||||
SelectorEngine::MatchContext context;
|
||||
bool selector_matched = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue