LibWeb: Allow passing a resolution context to CSSStyleValue::to_color

This will be used for resolving any calculated style values within the
various `CSSColorValue` sub-classes.

No functionality changes.
This commit is contained in:
Callum Law 2025-06-29 12:56:28 +12:00 committed by Sam Atkins
parent b468923372
commit 62d138ebf7
Notes: github-actions[bot] 2025-07-04 12:20:15 +00:00
33 changed files with 105 additions and 105 deletions

View file

@ -288,7 +288,7 @@ void OffscreenCanvasRenderingContext2D::set_shadow_color(String color)
// 2. Let parsedValue be the result of parsing the given value with context if non-null.
auto style_value = parse_css_value(CSS::Parser::ParsingParams(), color, CSS::PropertyID::Color);
if (style_value && style_value->has_color()) {
auto parsedValue = style_value->to_color(OptionalNone());
auto parsedValue = style_value->to_color({}, {});
// 4. Set this's shadow color to parsedValue.
drawing_state().shadow_color = parsedValue;