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