LibWeb: Remove CalculatedStyleValue from Length

This commit is contained in:
Sam Atkins 2023-03-30 15:46:05 +01:00 committed by Andreas Kling
commit 53a4a31af2
Notes: sideshowbarker 2024-07-17 20:58:35 +09:00
8 changed files with 25 additions and 70 deletions

View file

@ -603,7 +603,7 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& computed_style)
auto resolve_border_width = [&]() {
auto value = computed_style.property(width_property);
if (value->is_calculated())
return CSS::Length::make_calculated(const_cast<CSS::CalculatedStyleValue&>(value->as_calculated())).to_px(*this).value();
return value->as_calculated().resolve_length(*this)->to_px(*this).value();
if (value->has_length())
return value->to_length().to_px(*this).value();
if (value->is_identifier()) {