mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
LibWeb: Store ShadowStyleValue's color as a StyleValue
Colors can be specified in a way that `Gfx::Color` can't represent, such as named system colors, `currentColor`, or functions involving `calc()`.
This commit is contained in:
@@ -1316,7 +1316,7 @@ static NonnullRefPtr<CSSStyleValue const> interpolate_box_shadow(DOM::Element& e
|
||||
values.ensure_capacity(other.size());
|
||||
for (size_t i = values.size(); i < other.size(); i++) {
|
||||
values.unchecked_append(ShadowStyleValue::create(
|
||||
Color::Transparent,
|
||||
CSSColorValue::create(Color::Transparent),
|
||||
LengthStyleValue::create(Length::make_px(0)),
|
||||
LengthStyleValue::create(Length::make_px(0)),
|
||||
LengthStyleValue::create(Length::make_px(0)),
|
||||
@@ -1339,7 +1339,7 @@ static NonnullRefPtr<CSSStyleValue const> interpolate_box_shadow(DOM::Element& e
|
||||
auto const& from_shadow = from_shadows[i]->as_shadow();
|
||||
auto const& to_shadow = to_shadows[i]->as_shadow();
|
||||
auto result_shadow = ShadowStyleValue::create(
|
||||
interpolate_color(from_shadow.color(), to_shadow.color(), delta),
|
||||
CSSColorValue::create(interpolate_color(from_shadow.color()->to_color({}), to_shadow.color()->to_color({}), delta)),
|
||||
interpolate_value(element, from_shadow.offset_x(), to_shadow.offset_x(), delta),
|
||||
interpolate_value(element, from_shadow.offset_y(), to_shadow.offset_y(), delta),
|
||||
interpolate_value(element, from_shadow.blur_radius(), to_shadow.blur_radius(), delta),
|
||||
|
||||
Reference in New Issue
Block a user