mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:58:11 +00:00
LibWeb: Use Element::id() when collecting matching CSS rules
This commit is contained in:
parent
d0d7e5a782
commit
65787fffe4
1 changed files with 1 additions and 1 deletions
|
@ -310,7 +310,7 @@ Vector<MatchingRule> StyleComputer::collect_matching_rules(DOM::Element const& e
|
|||
if (auto it = rule_cache.rules_by_class.find(class_name); it != rule_cache.rules_by_class.end())
|
||||
add_rules_to_run(it->value);
|
||||
}
|
||||
if (auto id = element.get_attribute(HTML::AttributeNames::id); id.has_value()) {
|
||||
if (auto id = element.id(); id.has_value()) {
|
||||
if (auto it = rule_cache.rules_by_id.find(id.value()); it != rule_cache.rules_by_id.end())
|
||||
add_rules_to_run(it->value);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue