LibWeb: Recompute child style when parent's display changes

When a parent element's display property changes (e.g., to flex or
grid), children may need to be blockified or un-blockified.
Previously, children only received a recompute_inherited_style() call
which doesn't run the blockification logic.

This patch adds a parent_display_changed flag to the recursive style
update that forces children to get a full style recompute when their
parent's display change triggers a layout tree rebuild.
This commit is contained in:
Andreas Kling
2026-01-26 07:13:06 +01:00
committed by Andreas Kling
parent 5fc276872a
commit 3b90eb1d49
Notes: github-actions[bot] 2026-02-06 11:06:45 +00:00
4 changed files with 45 additions and 9 deletions

View File

@@ -0,0 +1,4 @@
Initial child display: inline
Color after flex: rgb(0, 0, 0)
Display after flex: block
Display after block: inline