DescriptionRevert of Blink doesn't honor percent heights on children of "align-self:stretch" flex items in a fixed-height (patchset #20 id:380001 of https://codereview.chromium.org/331203002/)
Reason for revert:
The patch broke a canvas with forced height in DevTools. See crbug.com/418591
Original issue's description:
> Blink doesn't honor percent heights on children of "align-self:stretch" flex items in a fixed-height flex container
>
> Blink does not honor percent heights on children of flex items
> having align-self:stretch in a fixed-height flex container. It
> ignores the height specified in percent and take the height as
> min-content height.
>
> This bug occurs because while applying stretch alignment to the flex-item
> we set the OverrideLogicalContentHeight for the flex-item but while
> computing PercentageLogicalHeight for the children of the flex-item
> in the api RenderBox::computePercentageLogicalHeight we are checking for
> hasOverrideContainingBlockLogicalHeight() which checks if the child which
> is having percentage height has overrideLogicalHeight or not. Since for
> the child we had not set overideLogicalHeight so this condtion returns
> false and available height for child becomes -1. Hence it takes height
> as min-content height.
>
> This patch fixes this bug by using overrideLogicalContentHeight() of
> containing block as availableHeight while computing the
> percentage heights of children of flex item having stretch alignment.
> Also for the cases where desiredLogicalHeight == logicalHeight() and
> flex item hasPercentHeightDescendants() we are forcing a relayout
> of the flex item as overrideLogicalContentHeight()
> gets cleared off while calculating preferredMainAxisContentExtentForChild
>
> BUG=341310, 346275
>
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=182735
TBR=a.bah@chromium.org,cbiesinger@chromium.org,leviw@chromium.org,tony@chromium.org,harpreet.sk@samsung.com
NOTREECHECKS=true
NOTRY=true
BUG=341310, 346275
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=182850
Patch Set 1 #
Created: 6 years, 2 months ago
(Patch set is too large to download)
Messages
Total messages: 1 (0 generated)
|