mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Remove two lowercase string creations from Element::has_class
This commit is contained in:
committed by
Andreas Kling
parent
7f223e2290
commit
691e4820ac
Notes:
sideshowbarker
2024-07-18 01:48:54 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/691e4820ac0 Pull-request: https://github.com/SerenityOS/serenity/pull/10668
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user