mirror of
https://github.com/servo/servo.git
synced 2025-06-10 01:23:13 +00:00
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. |
||
---|---|---|
.. | ||
construct.rs | ||
float.rs | ||
inline.rs | ||
line.rs | ||
mod.rs | ||
root.rs |