servo/components/layout_2020/flow
Oriol Brufau a4c4550e3b Layout 2020: Optimize collapsible margin lookahead
Every time that we would lay out a block box that could collapse its
top margin with its contents, we would do a lookahead to compute the
resulting margin in order to place floats correctly.

The problem was that this lookahead could iterate several descendants,
but then when laying these we would run the lookahead again.

This patch restricts the lookahead to boxes that either aren't collapsing
their top margin with their parent, or that have 'clear' different than
'none' (since clearance prevents collapsing margins with the parent).

Since the lookahead stops iterating when it finds a box that doesn't
collapse its top margin with its parent, or whose 'clear' isn't 'none',
this should ensure that lookahead never handles the same box twice.
2023-07-03 11:53:43 +02:00
..
construct.rs layout_2020: Check blocks for whether they will establish a formatting context 2023-05-31 23:28:28 +08:00
float.rs Layout 2020: Properly calculate clearance 2023-06-30 16:51:39 +02:00
inline.rs Auto merge of #29836 - stshine:newline, r=mrobinson 2023-06-30 17:45:19 +02:00
mod.rs Layout 2020: Optimize collapsible margin lookahead 2023-07-03 11:53:43 +02:00
root.rs Simplify layout of absolutes with static insets 2023-06-20 11:44:25 +02:00