mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibWeb: Add a non-DeprecatedString version of Element::get_attribute
Renaming the DeprecatedString version of this function to Element::get_deprecated_attribute. While performing this rename, port over functions where it is trivial to do so to the Optional<String> version of this function.
This commit is contained in:
parent
ebe01b51c8
commit
50350fb79c
17 changed files with 52 additions and 56 deletions
|
@ -310,8 +310,8 @@ 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.is_null()) {
|
||||
if (auto it = rule_cache.rules_by_id.find(FlyString::from_deprecated_fly_string(id).release_value_but_fixme_should_propagate_errors()); it != rule_cache.rules_by_id.end())
|
||||
if (auto id = element.get_attribute(HTML::AttributeNames::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);
|
||||
}
|
||||
if (auto it = rule_cache.rules_by_tag_name.find(FlyString::from_deprecated_fly_string(element.local_name()).release_value_but_fixme_should_propagate_errors()); it != rule_cache.rules_by_tag_name.end())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue