mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 05:08:56 +00:00
LibWeb: Rename CSSColorValue::create() to create_from_color()
Soon, CSSColorValue will be an abstract class, and we'll instead create a CSSRGB, CSSHSL, or other specific color type from the Typed-OM spec. However, it's still useful to have an easy "just give me a style value for this color" method. So change the name to distinguish this from the usual StyleValue::create() methods.
This commit is contained in:
@@ -2995,7 +2995,7 @@ Optional<Color> Parser::parse_color(TokenStream<ComponentValue>& tokens)
|
||||
RefPtr<CSSStyleValue> Parser::parse_color_value(TokenStream<ComponentValue>& tokens)
|
||||
{
|
||||
if (auto color = parse_color(tokens); color.has_value())
|
||||
return CSSColorValue::create(color.value());
|
||||
return CSSColorValue::create_from_color(color.value());
|
||||
|
||||
auto transaction = tokens.begin_transaction();
|
||||
if (auto keyword = parse_keyword_value(tokens); keyword && keyword->has_color()) {
|
||||
|
||||
Reference in New Issue
Block a user