mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:28:11 +00:00
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. :^)
This commit is contained in:
parent
094dc04695
commit
3e9191936b
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue