diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp index 2120116088..3c638dac48 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp @@ -400,7 +400,20 @@ Vector StyleProperties::transformations() const transformation.function = transformation_style_value.transform_function(); Vector values; for (auto& transformation_value : transformation_style_value.values()) { - if (transformation_value->is_length()) { + if (transformation_value->is_calculated()) { + auto& calculated = transformation_value->as_calculated(); + if (calculated.resolves_to_length()) { + dbgln("FIXME: Unable to resolve length with no layout node! {}", calculated.to_string()); + } else if (calculated.resolves_to_percentage()) { + values.append({ calculated.resolve_percentage().value() }); + } else if (calculated.resolves_to_number()) { + values.append({ calculated.resolve_number().value() }); + } else if (calculated.resolves_to_angle()) { + values.append({ calculated.resolve_angle().value() }); + } else { + dbgln("FIXME: Unsupported calc value in transform! {}", calculated.to_string()); + } + } else if (transformation_value->is_length()) { values.append({ transformation_value->as_length().length() }); } else if (transformation_value->is_percentage()) { values.append({ transformation_value->as_percentage().percentage() }); @@ -409,7 +422,7 @@ Vector StyleProperties::transformations() const } else if (transformation_value->is_angle()) { values.append({ transformation_value->as_angle().angle() }); } else { - dbgln("FIXME: Unsupported value in transform!"); + dbgln("FIXME: Unsupported value in transform! {}", transformation_value->to_string()); } } transformation.values = move(values); diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/CalculatedStyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValues/CalculatedStyleValue.cpp index 2ce0745d64..27c59da0dc 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValues/CalculatedStyleValue.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleValues/CalculatedStyleValue.cpp @@ -745,7 +745,7 @@ Optional