1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:17:35 +00:00

LibWeb: Remove reference_for_percent parameter from Length::resolved()

Despite looking like it was still needed, it was only used for passing
to other calls to Length::resolved() recursively. This makes the
various `foo.resolved().resolved()` calls a lot less awkward.
(Though, still quite awkward.)

I think we'd need to separate calculated lengths out to properly tidy
these calls up, but one yak at a time. :^)
This commit is contained in:
Sam Atkins 2022-01-19 17:00:50 +00:00 committed by Andreas Kling
parent cff44831a8
commit bfcbab0dcf
11 changed files with 133 additions and 132 deletions

View file

@ -460,7 +460,7 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& specified_style)
if (border.line_style == CSS::LineStyle::None)
border.width = 0;
else
border.width = specified_style.length_or_fallback(width_property, {}).resolved_or_zero(*this, 0).to_px(*this);
border.width = specified_style.length_or_fallback(width_property, {}).resolved_or_zero(*this).to_px(*this);
};
do_border_style(computed_values.border_left(), CSS::PropertyID::BorderLeftWidth, CSS::PropertyID::BorderLeftColor, CSS::PropertyID::BorderLeftStyle);