LibWeb: Reset text-shadow if needed after paint-only properties update

Previously we would not propagate text-shadow changes when it's changed
from some value to none.

Fixes https://github.com/LadybirdBrowser/ladybird/issues/6580
This commit is contained in:
Aliaksandr Kalenik 2025-11-14 12:10:05 +01:00 committed by Jelle Raaijmakers
parent c7e4a99219
commit 57c925cfa9
Notes: github-actions[bot] 2025-11-14 11:51:03 +00:00
3 changed files with 23 additions and 2 deletions

View file

@ -1644,8 +1644,8 @@ void PaintableWithLines::resolve_paint_properties()
fragment.set_text_decoration_thickness(css_line_thickness);
auto const& text_shadow = text_node.computed_values().text_shadow();
Vector<ShadowData> resolved_shadow_data;
if (!text_shadow.is_empty()) {
Vector<ShadowData> resolved_shadow_data;
resolved_shadow_data.ensure_capacity(text_shadow.size());
for (auto const& layer : text_shadow) {
resolved_shadow_data.empend(
@ -1656,8 +1656,8 @@ void PaintableWithLines::resolve_paint_properties()
layer.spread_distance.to_px(layout_node),
ShadowPlacement::Outer);
}
fragment.set_shadows(move(resolved_shadow_data));
}
fragment.set_shadows(move(resolved_shadow_data));
}
}