Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Issue 616583002: Revert of Blink doesn't honor percent heights on children of "align-self:stretch" flex items in a fixed-height (Closed)

Created:
6 years, 2 months ago by alph
Modified:
6 years, 2 months ago
CC:
blink-reviews, blink-reviews-rendering, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr., rune+blink, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Revert 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -155 lines) Patch
M LayoutTests/css3/flexbox/flex-align.html View 1 chunk +2 lines, -1 line 0 comments Download
M LayoutTests/css3/flexbox/flex-align-vertical-writing-mode.html View 1 chunk +2 lines, -1 line 0 comments Download
M LayoutTests/css3/flexbox/flex-flow-padding.html View 8 chunks +16 lines, -16 lines 0 comments Download
D LayoutTests/css3/flexbox/percent-height-children-of-alignSelf-stretch-flex-item.html View 1 chunk +0 lines, -94 lines 0 comments Download
D LayoutTests/css3/flexbox/percent-height-children-of-alignSelf-stretch-flex-item-expected.txt View 1 chunk +0 lines, -13 lines 0 comments Download
M Source/core/rendering/RenderBox.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/rendering/RenderBox.cpp View 4 chunks +11 lines, -16 lines 0 comments Download
M Source/core/rendering/RenderFlexibleBox.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/rendering/RenderFlexibleBox.cpp View 3 chunks +3 lines, -12 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
alph
6 years, 2 months ago (2014-09-29 16:11:00 UTC) #1
Created Revert of Blink doesn't honor percent heights on children of
"align-self:stretch" flex items in a fixed-height

Powered by Google App Engine
This is Rietveld 408576698