diff options
author | Oriol Brufau <obrufau@igalia.com> | 2023-07-01 22:22:36 +0200 |
---|---|---|
committer | Oriol Brufau <obrufau@igalia.com> | 2023-07-03 11:53:43 +0200 |
commit | a4c4550e3b934328df180a50197681c3ebb14ffa (patch) | |
tree | 5d4ae7b563465c00dfad5df35d70fc0cec36327d /python/mach_bootstrap.py | |
parent | a1dfadc4fac39aa80fc3c277fc6e8365ed1311f5 (diff) | |
download | servo-a4c4550e3b934328df180a50197681c3ebb14ffa.tar.gz servo-a4c4550e3b934328df180a50197681c3ebb14ffa.zip |
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.
Diffstat (limited to 'python/mach_bootstrap.py')
0 files changed, 0 insertions, 0 deletions