mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 21:38:11 +00:00
LibWeb: Use is_ascii_case_insensitive_match() where the spec says to
This commit is contained in:
parent
f0b72b819e
commit
2026ea557e
10 changed files with 59 additions and 44 deletions
|
@ -32,6 +32,7 @@
|
|||
#include <LibWeb/CSS/StyleValue.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/Dump.h>
|
||||
#include <LibWeb/Infra/Strings.h>
|
||||
|
||||
static void log_parse_error(SourceLocation const& location = SourceLocation::current())
|
||||
{
|
||||
|
@ -1895,7 +1896,7 @@ Optional<Declaration> Parser::consume_a_declaration(TokenStream<T>& tokens)
|
|||
Optional<size_t> important_index;
|
||||
for (size_t i = declaration_values.size() - 1; i > 0; i--) {
|
||||
auto value = declaration_values[i];
|
||||
if (value.is(Token::Type::Ident) && value.token().ident().equals_ignoring_case("important"sv)) {
|
||||
if (value.is(Token::Type::Ident) && Infra::is_ascii_case_insensitive_match(value.token().ident(), "important"sv)) {
|
||||
important_index = i;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue