1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:58:12 +00:00

LibWeb: Remove CalculatedStyleValue from Length

This commit is contained in:
Sam Atkins 2023-03-30 15:46:05 +01:00 committed by Andreas Kling
parent 62a8cf2bb8
commit 53a4a31af2
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()) {