LibWeb: Don't crash when encountering border-spacing: calc(...)

This allows us to progress further on this WPT test:
https://wpt.live/quirks/unitless-length/quirks.html

...although it still crashes before finishing.
This commit is contained in:
Andreas Kling 2024-10-09 13:36:09 +02:00 committed by Tim Ledbetter
commit 5e240f997c
Notes: github-actions[bot] 2024-10-09 13:15:20 +00:00
5 changed files with 26 additions and 6 deletions

View file

@ -613,8 +613,8 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& computed_style)
if (float_.has_value())
computed_values.set_float(float_.value());
computed_values.set_border_spacing_horizontal(computed_style.border_spacing_horizontal());
computed_values.set_border_spacing_vertical(computed_style.border_spacing_vertical());
computed_values.set_border_spacing_horizontal(computed_style.border_spacing_horizontal(*this));
computed_values.set_border_spacing_vertical(computed_style.border_spacing_vertical(*this));
auto caption_side = computed_style.caption_side();
if (caption_side.has_value())