LibWeb: Set "display before box type transformation" in relevant place

In a future commit we will update `compute_properties` to avoid calling
`compute_property_values` but we still need to store this value
This commit is contained in:
Callum Law
2026-01-26 17:35:40 +13:00
committed by Andreas Kling
parent 0ced4b5bb8
commit f490227ee0
Notes: github-actions[bot] 2026-02-13 20:56:18 +00:00

View File

@@ -1404,8 +1404,6 @@ void StyleComputer::compute_property_values(ComputedProperties& style, Optional<
style.set_property_without_modifying_flags(property_id, computed_value);
}
style.set_display_before_box_type_transformation(style.display());
if (abstract_element.has_value() && is<HTML::HTMLHtmlElement>(abstract_element->element()))
const_cast<StyleComputer&>(*this).m_root_element_font_metrics = calculate_root_element_font_metrics(style);
}
@@ -1617,6 +1615,8 @@ void StyleComputer::transform_box_type_if_needed(ComputedProperties& style, DOM:
auto display = style.display();
style.set_display_before_box_type_transformation(display);
if (display.is_none() || (display.is_contents() && !abstract_element.element().is_document_element()))
return;