mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb/CSS: Use CSS::URL for <url> and <paint> types
This commit is contained in:
Notes:
github-actions[bot]
2025-04-30 16:39:41 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/326933cd93c Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4531
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user