diff options
-rw-r--r-- | Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSMediaFeatureID.cpp | 6 | ||||
-rw-r--r-- | Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPropertyID.cpp | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSMediaFeatureID.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSMediaFeatureID.cpp index 6cf5abcf43..8da1c6578f 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSMediaFeatureID.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSMediaFeatureID.cpp @@ -88,7 +88,9 @@ ErrorOr<void> generate_implementation_file(JsonObject& media_feature_data, Core: { StringBuilder builder; SourceGenerator generator { builder }; - generator.append(R"~~~(#include <LibWeb/CSS/MediaFeatureID.h> + generator.append(R"~~~( +#include <LibWeb/CSS/MediaFeatureID.h> +#include <LibWeb/Infra/Strings.h> namespace Web::CSS { @@ -100,7 +102,7 @@ Optional<MediaFeatureID> media_feature_id_from_string(StringView string) member_generator.set("name", name); member_generator.set("name:titlecase", title_casify(name)); member_generator.append(R"~~~( - if (string.equals_ignoring_case("@name@"sv)) + if (Infra::is_ascii_case_insensitive_match(string, "@name@"sv)) return MediaFeatureID::@name:titlecase@; )~~~"); }); diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPropertyID.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPropertyID.cpp index 5724dd7b1c..ce97679e98 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPropertyID.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPropertyID.cpp @@ -154,6 +154,7 @@ ErrorOr<void> generate_implementation_file(JsonObject& properties, Core::File& f #include <LibWeb/CSS/Parser/Parser.h> #include <LibWeb/CSS/PropertyID.h> #include <LibWeb/CSS/StyleValue.h> +#include <LibWeb/Infra/Strings.h> namespace Web::CSS { @@ -189,7 +190,7 @@ PropertyID property_id_from_string(StringView string) member_generator.set("name", name); member_generator.set("name:titlecase", title_casify(name)); member_generator.append(R"~~~( - if (string.equals_ignoring_case("@name@"sv)) + if (Infra::is_ascii_case_insensitive_match(string, "@name@"sv)) return PropertyID::@name:titlecase@; )~~~"); }); |