servo/components/layout_2020
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
..
display_list layout: Implement support for line-height and vertical-align (#30902) 2024-01-08 14:49:50 +00:00
flexbox layout: Add *very* basic support for table layout (#31121) 2024-01-19 13:20:20 +00:00
flow layout: Convert all inline iteration to a new foreach function (#31117) 2024-01-19 13:56:14 +00:00
fragment_tree layout: Implement support for line-height and vertical-align (#30902) 2024-01-08 14:49:50 +00:00
table layout: Add *very* basic support for table layout (#31121) 2024-01-19 13:20:20 +00:00
tests layout: Add *very* basic support for table layout (#31121) 2024-01-19 13:20:20 +00:00
Cargo.toml Move *_traits and other shared types to shared 2023-11-03 15:38:18 +00:00
cell.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
context.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
dom.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
dom_traversal.rs Anonymous boxes that wrap inlines should not inherit overflow (#30579) 2023-10-19 13:43:55 +00:00
formatting_contexts.rs layout: Add *very* basic support for table layout (#31121) 2024-01-19 13:20:20 +00:00
geom.rs layout: Add *very* basic support for table layout (#31121) 2024-01-19 13:20:20 +00:00
layout_debug.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
lib.rs Compile Servo with the latest version of rust stable (#30831) 2023-12-06 17:36:07 +00:00
lists.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
positioned.rs layout: Switch IndependentLayout to use Au instead of Length (#31083) 2024-01-15 14:31:21 +00:00
query.rs Further changes required by Servo 2023-11-04 08:17:09 +01:00
replaced.rs Use app units in replaced elements (#30825) 2023-12-11 11:30:37 +00:00
sizing.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
style_ext.rs layout: Switch IndependentLayout to use Au instead of Length (#31083) 2024-01-15 14:31:21 +00:00
traversal.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00