LibWeb: Update to_color to take ColorResolutionContext

Using a generic context argument will allow us to resolve colors in
places where we have all the required information but not in the form of
a layout node as was expected previously.
This commit is contained in:
Callum Law 2025-07-19 11:31:07 +12:00 committed by Sam Atkins
commit 46153910ec
Notes: github-actions[bot] 2025-08-04 10:30:51 +00:00
31 changed files with 129 additions and 127 deletions

View file

@ -5119,7 +5119,7 @@ RefPtr<CSSStyleValue const> Parser::parse_filter_value_list_value(TokenStream<Co
Optional<Color> color = {};
if (maybe_color)
// FIXME: We should support colors which require compute-time information (i.e. `em` and `vw` to `px` ratios).
color = maybe_color->to_color({}, {});
color = maybe_color->to_color({});
return if_no_more_tokens_return(FilterOperation::DropShadow { x_offset.value(), y_offset.value(), maybe_radius, color });
} else if (filter_token == FilterToken::HueRotate) {