Chromium Code Reviews
DescriptionProperly shrink stretched flexbox children on relayout
In Blink r164728, I landed an optimization to flexbox layout to avoid forcing
layout on children that may be stretched in layoutAndPlaceChildren, since
applyStretchAlignmentToChild already does this. This is correct on the first
layout, but if a flexbox shrinks, we would continue using the override
stretched size for subsequent relayouts, which would prevent stretched
children (and the flexbox) from collapsing down to the correct size.
This patch uses the intrinsic content logical height in layoutAndPlaceChildren
to accumulate the flexbox height and to diff against the actual height of
the children in applyStretchAlignmentToChild. To do this, I added several
convenience methods to RenderFlexibleBox, and fixed an issue with the
cached intrinsic content logical height of text controls (it failed to include
the inner text box... the fix is hacky).
BUG=358743
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=171893
Patch Set 1 #
Total comments: 6
Patch Set 2 : Address nits #Patch Set 3 : Fix remaining computeLogicalHeight methods #
Total comments: 1
Patch Set 4 : Made comments clearer #Messages
Total messages: 18 (0 generated)
|