From 5b42f8d707f6763afaab71c78dab698527f1384d Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 4 Jun 2025 14:35:34 +0100 Subject: [PATCH] LibWeb/HTML: Compare paragraph align="" values insensitively This is the one place we weren't comparing align keywords insensitively. --- Libraries/LibWeb/HTML/HTMLParagraphElement.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Libraries/LibWeb/HTML/HTMLParagraphElement.cpp b/Libraries/LibWeb/HTML/HTMLParagraphElement.cpp index f629541a6cd..c9b04b3efb5 100644 --- a/Libraries/LibWeb/HTML/HTMLParagraphElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLParagraphElement.cpp @@ -41,13 +41,13 @@ void HTMLParagraphElement::apply_presentational_hints(GC::Refset_property_from_presentational_hint(CSS::PropertyID::TextAlign, CSS::CSSKeywordValue::create(CSS::Keyword::Left)); - else if (value == "right"sv) + else if (value.equals_ignoring_ascii_case("right"sv)) cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::TextAlign, CSS::CSSKeywordValue::create(CSS::Keyword::Right)); - else if (value == "center"sv) + else if (value.equals_ignoring_ascii_case("center"sv)) cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::TextAlign, CSS::CSSKeywordValue::create(CSS::Keyword::Center)); - else if (value == "justify"sv) + else if (value.equals_ignoring_ascii_case("justify"sv)) cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::TextAlign, CSS::CSSKeywordValue::create(CSS::Keyword::Justify)); } });