mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
LibWeb: Add SVG paint fallback color support to CSS parsing
This commit is contained in:
committed by
Jelle Raaijmakers
parent
f13a26d68e
commit
804287847a
Notes:
github-actions[bot]
2026-02-27 16:16:30 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/804287847ac Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8011 Reviewed-by: https://github.com/gmta ✅
@@ -2873,8 +2873,9 @@ RefPtr<StyleValue const> Parser::parse_paint_value(TokenStream<ComponentValue>&
|
||||
tokens.discard_whitespace();
|
||||
if (auto color_or_none = parse_color_or_none(); color_or_none == nullptr) {
|
||||
// Fail to parse if the fallback is invalid, but otherwise ignore it.
|
||||
// FIXME: Use fallback color
|
||||
return nullptr;
|
||||
} else if (color_or_none.has_value() && *color_or_none && (*color_or_none)->has_color()) {
|
||||
return URLStyleValue::create(url->as_url().url(), color_or_none->release_nonnull());
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user