mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-16 21:20:18 +00:00
LibWeb: Don't include spread distance when serializing text-shadow
We shouldn't include spread distance when serializing `text-shadow` as it is not supported unlike `box-shadow` - to achieve this we store whether this is a text or box shadow within the ShadowStyleValue and serialize appropriately.
This commit is contained in:
parent
1ac7b47764
commit
c3a78d2884
Notes:
github-actions[bot]
2025-09-18 14:23:44 +00:00
Author: https://github.com/Calme1709
Commit: c3a78d2884
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6208
Reviewed-by: https://github.com/AtkinsSJ ✅
6 changed files with 27 additions and 23 deletions
|
@ -961,6 +961,7 @@ RefPtr<StyleValue const> interpolate_box_shadow(DOM::Element& element, Calculati
|
|||
values.ensure_capacity(other.size());
|
||||
for (size_t i = values.size(); i < other.size(); i++) {
|
||||
values.unchecked_append(ShadowStyleValue::create(
|
||||
other.get(0).value()->as_shadow().shadow_type(),
|
||||
ColorStyleValue::create_from_color(Color::Transparent, ColorSyntax::Legacy),
|
||||
LengthStyleValue::create(Length::make_px(0)),
|
||||
LengthStyleValue::create(Length::make_px(0)),
|
||||
|
@ -1012,6 +1013,7 @@ RefPtr<StyleValue const> interpolate_box_shadow(DOM::Element& element, Calculati
|
|||
interpolated_color = interpolate_color(from_color.value(), to_color.value(), delta, color_syntax);
|
||||
|
||||
auto result_shadow = ShadowStyleValue::create(
|
||||
from_shadow.shadow_type(),
|
||||
ColorStyleValue::create_from_color(interpolated_color, ColorSyntax::Modern),
|
||||
*interpolated_offset_x,
|
||||
*interpolated_offset_y,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue