mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +00:00
LibWeb: Use the globals from HTML::AttributeNames in style resolution
Using these avoids the FlyString lookups, so we should basically always prefer them over string literal attribute names.
This commit is contained in:
parent
770372ad02
commit
7f22e2a3c4
4 changed files with 9 additions and 3 deletions
|
@ -391,7 +391,7 @@ NonnullRefPtr<StyleProperties> StyleResolver::resolve_style(const Element& eleme
|
|||
}
|
||||
}
|
||||
|
||||
auto style_attribute = element.attribute("style");
|
||||
auto style_attribute = element.attribute(HTML::AttributeNames::style);
|
||||
if (!style_attribute.is_null()) {
|
||||
if (auto declaration = parse_css_declaration(style_attribute)) {
|
||||
for (auto& property : declaration->properties()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue