From a504ac3e2a57654b96501b3a1ba80f37b3381dc8 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 10 Mar 2023 08:48:54 +0100 Subject: Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_case Let's make it clear that these functions deal with ASCII case only. --- Userland/Libraries/LibWeb/CSS/MediaQuery.cpp | 66 ++++++++++++++-------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'Userland/Libraries/LibWeb/CSS/MediaQuery.cpp') 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 serialize_a_media_query_list(Vector> 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; } -- cgit v1.2.3