servo/components/layout_2020
Martin Robinson 459a7d26aa
Simplify layout of absolutes with static insets
Absolutes with static insets need to be laid out at their ancestor
containing blocks, but their position is dependent on their parent's
layout. The static layout position is passed up the tree during hoisting
and ancestors each add their own offset to the position until it is
relative to the containing block that contains the absolute.

This is currently done with a closure and a fairly tricky "tree rank"
numbering system that needs to be threaded through the entire layout.
This change replaces that system.

Every time a child is laid out we create a positioning context to hold
any absolute children (this can be optimized away at a later time). At
each of these moments, we call a method to aggregate offsets to the
static insets of hoisted absolutes. This makes the logic easier to
follow and will also allow implementing this behavior for inline-blocks,
which was impossible with the old system.
2023-06-20 11:44:25 +02:00
..
display_list Don't pass up float stacking containers to parent stacking contexts 2023-06-16 17:11:00 +02:00
flexbox Simplify layout of absolutes with static insets 2023-06-20 11:44:25 +02:00
flow Simplify layout of absolutes with static insets 2023-06-20 11:44:25 +02:00
fragment_tree Layout 2020: Move all Fragment code to the fragment_tree directory 2023-06-04 18:12:11 +02:00
tests Fix the unit test 2023-06-03 06:10:17 +02:00
Cargo.toml Start the transition to workspace dependencies 2023-05-17 11:59:35 +02:00
cell.rs Implement Default for ArcRefCell 2020-03-17 11:15:17 -07:00
context.rs Combine DOM-related concepts in Layout 2020 into dom.rs 2023-05-13 11:52:59 +02:00
dom.rs Combine DOM-related concepts in Layout 2020 into dom.rs 2023-05-13 11:52:59 +02:00
dom_traversal.rs Further changes required by Servo 2023-05-16 12:54:55 +02:00
formatting_contexts.rs Simplify layout of absolutes with static insets 2023-06-20 11:44:25 +02:00
geom.rs Place floats in layout 2020, but don't flow text around the floats yet. 2023-06-03 06:09:21 +02:00
layout_debug.rs Layout 2020: Move all Fragment code to the fragment_tree directory 2023-06-04 18:12:11 +02:00
lib.rs Layout 2020: Move all Fragment code to the fragment_tree directory 2023-06-04 18:12:11 +02:00
lists.rs Combine DOM-related concepts in Layout 2020 into dom.rs 2023-05-13 11:52:59 +02:00
positioned.rs Simplify layout of absolutes with static insets 2023-06-20 11:44:25 +02:00
query.rs Layout 2020: Move all Fragment code to the fragment_tree directory 2023-06-04 18:12:11 +02:00
replaced.rs Layout 2020: Move all Fragment code to the fragment_tree directory 2023-06-04 18:12:11 +02:00
sizing.rs Handle floats in BlockContainer::inline_content_sizes 2023-06-19 16:02:35 +02:00
style_ext.rs layout_2020: Add 'establishes_block_formatting_context' method to 'ComputedValuesExt' 2023-05-31 21:51:52 +08:00
traversal.rs Combine DOM-related concepts in Layout 2020 into dom.rs 2023-05-13 11:52:59 +02:00