servo/components/layout_2020/flow
Oriol Brufau 9102644470
Use a RwLock to cache inline_content_sizes() (#34232)
In order to support size keywords in block layout, we may need to call
`inline_content_sizes()` in order to compute the min/max-content sizes.
But this required a mutable reference in order the update the cache,
and in various places we already had mutable references.

So this switches the cache into a RwLock to avoid needing mutable refs.
Note OnceCell wouldn't work because it's not thread-safe.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2024-11-13 09:56:02 +00:00
..
inline Use a RwLock to cache inline_content_sizes() (#34232) 2024-11-13 09:56:02 +00:00
construct.rs layout: Add initial support for bidirectional text (BiDi) (#33148) 2024-08-21 14:28:54 +00:00
float.rs Use a RwLock to cache inline_content_sizes() (#34232) 2024-11-13 09:56:02 +00:00
mod.rs Use a RwLock to cache inline_content_sizes() (#34232) 2024-11-13 09:56:02 +00:00
root.rs Replace .map_or(false with Option::is_some_and (#33468) 2024-09-16 10:03:52 +00:00