[FastTextAutosizer] Use the deepest block that contains text for width
This patch makes the cluster multiplier calculation use the width of
the deepest block containing text for a cluster instead of the cluster
root's width. For example:
<div width="500"> <-- cluster root
<div width="100">
text
</div>
</div>
Previously, the cluster would use a width of 500 but with this patch
a width of 100 is used. This improves our rendering on the lca
tests.
Unfortunately, the width of child render objects is not available at
style recalc time (when FastTextAutosizer::record is called). This
patch refactors the cluster multiplier calculation to be lazy so that
it is not calculated until after style recalc. computeMultiplier has
been renamed clusterMultiplier to better describe this laziness.
With this patch we pass 2 additional tests, and fail 1 that we
erroneously passed before.
NOTRY=true
R=skobes
B=302005
Review URL: https://codereview.chromium.org/142933002
git-svn-id: svn://svn.chromium.org/blink/trunk@165687 bbb929c8-8fbe-4397-9dbb-9b2b20218538
4 files changed