servo/components/layout_2020/flow
Martin Robinson 52db185568
layout: Avoid layout sometimes when stretching (#33967)
This is the second flexbox caching change. It seeks to detect when a
relayout can be avoided in the case of a stretching flex item. This
heuristic can be combined, because currently we still do relayout
sometimes when we do not need to.

For instance currently we always relayout when a flex child is itself a
column flex. This only needs to happen when the grandchildren themselves
grow or shrink. That optimization is perhaps a lower priority as
`flex-grow: 0 / flex-shrink: 1` is the default behavior for flex.

Since this change means we more consistenly zero out the percentage part
of `calc` expressions when they have circular dependencies, this causes one
test to start failing (`/css/css-values/calc-min-height-block-1.html`).
This is related to w3c/csswg-drafts#10969, which is pending on further
discussion in the working group.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2024-10-24 17:44:30 +00:00
..
inline layout: Avoid layout sometimes when stretching (#33967) 2024-10-24 17:44:30 +00:00
construct.rs layout: Add initial support for bidirectional text (BiDi) (#33148) 2024-08-21 14:28:54 +00:00
float.rs Unify logic for laying out floats and atomic inlines (#33802) 2024-10-11 18:26:00 +00:00
mod.rs layout: Avoid layout sometimes when stretching (#33967) 2024-10-24 17:44:30 +00:00
root.rs Replace .map_or(false with Option::is_some_and (#33468) 2024-09-16 10:03:52 +00:00