diff options
author | Patrick Walton <pcwalton@mimiga.net> | 2014-09-23 10:24:17 -0700 |
---|---|---|
committer | Patrick Walton <pcwalton@mimiga.net> | 2014-09-25 17:50:24 -0700 |
commit | 5b4380389ea619659047643b3b4008336548ebb6 (patch) | |
tree | 0706155ea44023b029e7ea46d075e4a02fc83f42 /components/script/dom/htmlheadingelement.rs | |
parent | 9fb47b7636ca79c64acbf73a2c55cc6bf5cd4917 (diff) | |
download | servo-5b4380389ea619659047643b3b4008336548ebb6.tar.gz servo-5b4380389ea619659047643b3b4008336548ebb6.zip |
layout: Enhance the heuristic that guesses the inline size of block
formatting contexts.
The widths of block formatting contexts depend on the floats prior to
them. To avoid a circular dependency between width assignment and height
assignment, we must guess their widths during the assign-widths pass.
The old code simply used the size of the last float, whether
left-floated or right-floated, but this proved insufficient to handle
layouts like those seen on Reddit. The new heuristic keeps track of both
left and right floats independently and sums the width of all left and
right floats to determine the width of a block formatting context. This
is still insufficient to properly lay out Reddit, but the results are
much more acceptable.
A fully correct approach will require that blocks be laid out again if
the initial guess proved to be incorrect. A `TODO` is in the code to
handle this case.
Diffstat (limited to 'components/script/dom/htmlheadingelement.rs')
0 files changed, 0 insertions, 0 deletions