mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 02:40:49 +00:00
LibWeb: Use cached element name and id where possible
Instead of looking up in the named node map, we can simply use the cached name and ID on the element.
This commit is contained in:
committed by
Andreas Kling
parent
41f84deb9f
commit
0695236408
@@ -54,9 +54,8 @@ void HTMLMetaElement::inserted()
|
||||
// * The element is in a document tree
|
||||
// * The element has a name attribute, whose value is an ASCII case-insensitive match for theme-color
|
||||
// * The element has a content attribute
|
||||
auto name = attribute(AttributeNames::name);
|
||||
auto content = attribute(AttributeNames::content);
|
||||
if (name.has_value() && name->bytes_as_string_view().equals_ignoring_ascii_case("theme-color"sv) && content.has_value()) {
|
||||
if (name().has_value() && name()->equals_ignoring_ascii_case("theme-color"sv) && content.has_value()) {
|
||||
auto context = CSS::Parser::ParsingContext { document() };
|
||||
|
||||
// 2. For each element in candidate elements:
|
||||
|
||||
Reference in New Issue
Block a user