mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb: Use is_ascii_case_insensitive_match() where the spec says to
This commit is contained in:
parent
f0b72b819e
commit
2026ea557e
Notes:
sideshowbarker
2024-07-17 00:04:12 +09:00
Author: https://github.com/AtkinsSJ
Commit: 2026ea557e
Pull-request: https://github.com/SerenityOS/serenity/pull/17502
Reviewed-by: https://github.com/linusg
Reviewed-by: https://github.com/trflynn89
10 changed files with 59 additions and 44 deletions
|
@ -11,6 +11,7 @@
|
|||
#include <LibWeb/CSS/Parser/Parser.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
#include <LibWeb/Infra/Strings.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
|
@ -88,7 +89,7 @@ WebIDL::ExceptionOr<void> PropertyOwningCSSStyleDeclaration::set_property(Proper
|
|||
}
|
||||
|
||||
// 4. If priority is not the empty string and is not an ASCII case-insensitive match for the string "important", then return.
|
||||
if (!priority.is_empty() && !priority.equals_ignoring_case("important"sv))
|
||||
if (!priority.is_empty() && !Infra::is_ascii_case_insensitive_match(priority, "important"sv))
|
||||
return {};
|
||||
|
||||
// 5. Let component value list be the result of parsing value for property property.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue