diff options
author | Andreas Kling <kling@serenityos.org> | 2023-03-10 08:48:54 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-03-10 13:15:44 +0100 |
commit | a504ac3e2a57654b96501b3a1ba80f37b3381dc8 (patch) | |
tree | 767a7e21a858e4b5c6dfec77dd52b540a0e4cf49 /Userland/Libraries/LibWeb/CSS/MediaQuery.cpp | |
parent | 03cc45e5a2ecc5d173aa121404d7ed8251c109f8 (diff) | |
download | serenity-a504ac3e2a57654b96501b3a1ba80f37b3381dc8.zip |
Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_case
Let's make it clear that these functions deal with ASCII case only.
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/MediaQuery.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/MediaQuery.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp b/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp index 801141793a..edf98938b4 100644 --- a/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp +++ b/Userland/Libraries/LibWeb/CSS/MediaQuery.cpp @@ -393,51 +393,51 @@ ErrorOr<String> serialize_a_media_query_list(Vector<NonnullRefPtr<MediaQuery>> c bool is_media_feature_name(StringView name) { // MEDIAQUERIES-4 - https://www.w3.org/TR/mediaqueries-4/#media-descriptor-table - if (name.equals_ignoring_case("any-hover"sv)) + if (name.equals_ignoring_ascii_case("any-hover"sv)) return true; - if (name.equals_ignoring_case("any-pointer"sv)) + if (name.equals_ignoring_ascii_case("any-pointer"sv)) return true; - if (name.equals_ignoring_case("aspect-ratio"sv)) + if (name.equals_ignoring_ascii_case("aspect-ratio"sv)) return true; - if (name.equals_ignoring_case("color"sv)) + if (name.equals_ignoring_ascii_case("color"sv)) return true; - if (name.equals_ignoring_case("color-gamut"sv)) + if (name.equals_ignoring_ascii_case("color-gamut"sv)) return true; - if (name.equals_ignoring_case("color-index"sv)) + if (name.equals_ignoring_ascii_case("color-index"sv)) return true; - if (name.equals_ignoring_case("device-aspect-ratio"sv)) + if (name.equals_ignoring_ascii_case("device-aspect-ratio"sv)) return true; - if (name.equals_ignoring_case("device-height"sv)) + if (name.equals_ignoring_ascii_case("device-height"sv)) return true; - if (name.equals_ignoring_case("device-width"sv)) + if (name.equals_ignoring_ascii_case("device-width"sv)) return true; - if (name.equals_ignoring_case("grid"sv)) + if (name.equals_ignoring_ascii_case("grid"sv)) return true; - if (name.equals_ignoring_case("height"sv)) + if (name.equals_ignoring_ascii_case("height"sv)) return true; - if (name.equals_ignoring_case("hover"sv)) + if (name.equals_ignoring_ascii_case("hover"sv)) return true; - if (name.equals_ignoring_case("monochrome"sv)) + if (name.equals_ignoring_ascii_case("monochrome"sv)) return true; - if (name.equals_ignoring_case("orientation"sv)) + if (name.equals_ignoring_ascii_case("orientation"sv)) return true; - if (name.equals_ignoring_case("overflow-block"sv)) + if (name.equals_ignoring_ascii_case("overflow-block"sv)) return true; - if (name.equals_ignoring_case("overflow-inline"sv)) + if (name.equals_ignoring_ascii_case("overflow-inline"sv)) return true; - if (name.equals_ignoring_case("pointer"sv)) + if (name.equals_ignoring_ascii_case("pointer"sv)) return true; - if (name.equals_ignoring_case("resolution"sv)) + if (name.equals_ignoring_ascii_case("resolution"sv)) return true; - if (name.equals_ignoring_case("scan"sv)) + if (name.equals_ignoring_ascii_case("scan"sv)) return true; - if (name.equals_ignoring_case("update"sv)) + if (name.equals_ignoring_ascii_case("update"sv)) return true; - if (name.equals_ignoring_case("width"sv)) + if (name.equals_ignoring_ascii_case("width"sv)) return true; // MEDIAQUERIES-5 - https://www.w3.org/TR/mediaqueries-5/#media-descriptor-table - if (name.equals_ignoring_case("prefers-color-scheme"sv)) + if (name.equals_ignoring_ascii_case("prefers-color-scheme"sv)) return true; // FIXME: Add other level 5 feature names @@ -446,27 +446,27 @@ bool is_media_feature_name(StringView name) MediaQuery::MediaType media_type_from_string(StringView name) { - if (name.equals_ignoring_case("all"sv)) + if (name.equals_ignoring_ascii_case("all"sv)) return MediaQuery::MediaType::All; - if (name.equals_ignoring_case("aural"sv)) + if (name.equals_ignoring_ascii_case("aural"sv)) return MediaQuery::MediaType::Aural; - if (name.equals_ignoring_case("braille"sv)) + if (name.equals_ignoring_ascii_case("braille"sv)) return MediaQuery::MediaType::Braille; - if (name.equals_ignoring_case("embossed"sv)) + if (name.equals_ignoring_ascii_case("embossed"sv)) return MediaQuery::MediaType::Embossed; - if (name.equals_ignoring_case("handheld"sv)) + if (name.equals_ignoring_ascii_case("handheld"sv)) return MediaQuery::MediaType::Handheld; - if (name.equals_ignoring_case("print"sv)) + if (name.equals_ignoring_ascii_case("print"sv)) return MediaQuery::MediaType::Print; - if (name.equals_ignoring_case("projection"sv)) + if (name.equals_ignoring_ascii_case("projection"sv)) return MediaQuery::MediaType::Projection; - if (name.equals_ignoring_case("screen"sv)) + if (name.equals_ignoring_ascii_case("screen"sv)) return MediaQuery::MediaType::Screen; - if (name.equals_ignoring_case("speech"sv)) + if (name.equals_ignoring_ascii_case("speech"sv)) return MediaQuery::MediaType::Speech; - if (name.equals_ignoring_case("tty"sv)) + if (name.equals_ignoring_ascii_case("tty"sv)) return MediaQuery::MediaType::TTY; - if (name.equals_ignoring_case("tv"sv)) + if (name.equals_ignoring_ascii_case("tv"sv)) return MediaQuery::MediaType::TV; return MediaQuery::MediaType::Unknown; } |