Description[css-grid] Fix indefinite height detection
The change introduced in r398680 was wrong. In that occasion
in order to check if the height of an element was indefinite,
we were picking the first child and checking if a percentage
was resolvable for it.
This is not right, for example on a grid container where the first cell
has a fixed height, if the first child is in that cell it can resolve
a percentage. Thus, we were detecting that the grid container has
a definite height when it might not be the case.
This patch introduces back a LayoutBlock::hasDefiniteLogicalHeight()
reusing the logic from LayoutBox::computePercentageLogicalHeight()
that was extracted to a separated static method
LayoutBlock::availableLogicalHeightForPercentageComputation().
That way we can call hasDefiniteLogicalHeight() directly on an element
to determine if the height is or not definite.
This fixes a TODO related to orthogonal flows and also the example
explained above. The orthogonal flows test results are updated
and a new test is included.
BUG=624301, 617876
TEST=fast/css-grid-layout/grid-container-percentage-rows.html
Committed: https://crrev.com/9a12b00b915eccd82d4444ecba101f27e2761769
Cr-Commit-Position: refs/heads/master@{#415478}
Patch Set 1 #Patch Set 2 : Fix fast/table/003.html test #
Total comments: 13
Patch Set 3 : New version #
Total comments: 8
Patch Set 4 : Minor changes from review and new test #Patch Set 5 : Use 2 lines for bool includeBorderPadding #
Total comments: 14
Patch Set 6 : New version applying suggested changes #Patch Set 7 : Same patch than previous version but rebased to current master #Patch Set 8 : Add reference to bug #635655 on TODO comments #
Total comments: 3
Patch Set 9 : Check skipContainingBlockForPercentHeightCalculation() #Messages
Total messages: 28 (6 generated)
|