diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2021-10-24 15:17:35 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-10-24 22:12:35 +0200 |
commit | 3e9191936b6a0daad63a4ff0b9ebdae1dd84d593 (patch) | |
tree | 002e8b947dfa3a5a42de35fc566910ad06cf8991 /Userland | |
parent | 094dc04695699b93085a0907d6b52c5a43b156dd (diff) | |
download | serenity-3e9191936b6a0daad63a4ff0b9ebdae1dd84d593.zip |
LibWeb: Remove now-unnecessary String copy when parsing CSS colors
Color::from_string() now does a case-insensitive comparison of color
names, so we don't need this copy. :^)
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp index 24acb508bf..b52e643a01 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp @@ -2088,7 +2088,7 @@ Optional<Color> Parser::parse_color(ParsingContext const& context, StyleComponen if (component_value.is(Token::Type::Ident)) { auto ident = component_value.token().ident(); - auto color = Color::from_string(ident.to_lowercase_string()); + auto color = Color::from_string(ident); if (color.has_value()) return color; |