diff --git a/Userland/Libraries/LibWeb/CSS/StyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValue.cpp index 5cc9cca591..520c699ab7 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValue.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleValue.cpp @@ -669,6 +669,9 @@ Optional CalculatedStyleValue::resolve_angle_percentage(Angle const& perc [&](Angle const& angle) -> Optional { return angle; }, + [&](Percentage const& percentage) -> Optional { + return percentage_basis.percentage_of(percentage); + }, [&](auto const&) -> Optional { return {}; }); @@ -691,6 +694,9 @@ Optional CalculatedStyleValue::resolve_frequency_percentage(Frequency [&](Frequency const& frequency) -> Optional { return frequency; }, + [&](Percentage const& percentage) -> Optional { + return percentage_basis.percentage_of(percentage); + }, [&](auto const&) -> Optional { return {}; }); @@ -713,6 +719,9 @@ Optional CalculatedStyleValue::resolve_length_percentage(Layout::Node co [&](Length const& length) -> Optional { return length; }, + [&](Percentage const& percentage) -> Optional { + return percentage_basis.percentage_of(percentage); + }, [&](auto const&) -> Optional { return {}; });