LibWeb: Remove two lowercase string creations from Element::has_class

This commit is contained in:
Timothy Flynn 2021-10-28 09:03:06 -04:00 committed by Andreas Kling
commit 691e4820ac
Notes: sideshowbarker 2024-07-18 01:48:54 +09:00

View file

@ -114,7 +114,7 @@ bool Element::has_class(const FlyString& class_name, CaseSensitivity case_sensit
return any_of(m_classes, [&](auto& it) {
return case_sensitivity == CaseSensitivity::CaseSensitive
? it == class_name
: it.to_lowercase() == class_name.to_lowercase();
: it.equals_ignoring_case(class_name);
});
}