servo/components/layout_2020/flow
Martin Robinson a8b34e88ca
layout: Convert all inline iteration to a new foreach function (#31117)
Instead of a tricky stack of enum iterators expose a `foreach()`
function on InlineFormattingContext, which takes a `FnMut`. This
prevents callers wanting to iterate from keeping a stack of iterators
and will potentially allow a future version of this function to avoid
borrowing the ArcRefCell<...> of inline boxes for every iteration
(presumably using something like OwnedRef).

Convert `inline_content_sizes` to use this new `foreach()` function and
move the `Computation` out of the function body to
`ContentSizesComputation`. This reduces the stack depth of inline size
computation, because `foreach()` is iterative and not recursive.

This is a preliminary change to removing the second round of text shaping
during layout, because shaping will use this new iterator.
2024-01-19 13:56:14 +00:00
..
construct.rs Add support for table fixups (#30868) 2023-12-22 12:11:58 +00:00
float.rs Use App units in flow layout (#30894) 2024-01-19 13:20:01 +00:00
inline.rs layout: Convert all inline iteration to a new foreach function (#31117) 2024-01-19 13:56:14 +00:00
line.rs layout: Split LineItem layout into a new file (#31039) 2024-01-10 05:42:11 +00:00
mod.rs Use App units in flow layout (#30894) 2024-01-19 13:20:01 +00:00
root.rs Add initial support for table box tree construction (#30799) 2023-12-05 11:10:45 +00:00