1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 13:37:10 +09:00

LibWeb/CSS: Use CSS::URL for <url> and <paint> types

This commit is contained in:
Sam Atkins 2025-04-29 15:32:46 +01:00
parent d301510ab2
commit 326933cd93
Notes: github-actions[bot] 2025-04-30 16:39:41 +00:00
7 changed files with 40 additions and 26 deletions

View file

@ -2725,16 +2725,12 @@ Optional<URL> Parser::parse_url_function(TokenStream<ComponentValue>& tokens)
return {};
}
RefPtr<CSSStyleValue const> Parser::parse_url_value(TokenStream<ComponentValue>& tokens)
RefPtr<URLStyleValue const> Parser::parse_url_value(TokenStream<ComponentValue>& tokens)
{
auto url = parse_url_function(tokens);
if (!url.has_value())
return nullptr;
// FIXME: Stop completing the URL here
auto completed_url = complete_url(url->url());
if (!completed_url.has_value())
return nullptr;
return URLStyleValue::create(completed_url.release_value());
return URLStyleValue::create(url.release_value());
}
// https://www.w3.org/TR/css-shapes-1/#typedef-shape-radius