LibWeb: Stop pretending text-decoration-thickness is a LengthPercentage

It has two keywords: auto and from-font. from-font isn't handled
properly yet, but at least we have a FIXME for it now. :^)
This commit is contained in:
Sam Atkins 2025-08-27 15:12:17 +01:00
commit 381d3bf4e0
Notes: github-actions[bot] 2025-09-04 12:34:14 +00:00
5 changed files with 50 additions and 10 deletions

View file

@ -653,8 +653,7 @@ void NodeWithStyle::apply_style(CSS::ComputedProperties const& computed_style)
// we just manually grab the value from `color`. This makes it dependent on `color` being
// specified first, so it's far from ideal.
computed_values.set_text_decoration_color(computed_style.color_or_fallback(CSS::PropertyID::TextDecorationColor, CSS::ColorResolutionContext::for_layout_node_with_style(*this), computed_values.color()));
if (auto maybe_text_decoration_thickness = computed_style.length_percentage(CSS::PropertyID::TextDecorationThickness, *this, CSS::ComputedProperties::ClampNegativeLengths::No); maybe_text_decoration_thickness.has_value())
computed_values.set_text_decoration_thickness(maybe_text_decoration_thickness.release_value());
computed_values.set_text_decoration_thickness(computed_style.text_decoration_thickness());
computed_values.set_webkit_text_fill_color(computed_style.color_or_fallback(CSS::PropertyID::WebkitTextFillColor, CSS::ColorResolutionContext::for_layout_node_with_style(*this), computed_values.color()));