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

Unified Diff: Source/WebCore/rendering/RenderFlexibleBox.cpp

Issue 13674002: Support intrinsic values for height, min-height and max-height (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: CSS table tests Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/rendering/RenderBox.cpp ('k') | Source/WebCore/rendering/RenderGrid.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderFlexibleBox.cpp
diff --git a/Source/WebCore/rendering/RenderFlexibleBox.cpp b/Source/WebCore/rendering/RenderFlexibleBox.cpp
index 033368f9f113a68b11570f8d0fd055d1e3287d3e..5253e37f585b73fb61d2c420da3dcb50cb51a3ce 100644
--- a/Source/WebCore/rendering/RenderFlexibleBox.cpp
+++ b/Source/WebCore/rendering/RenderFlexibleBox.cpp
@@ -534,11 +534,14 @@ LayoutUnit RenderFlexibleBox::computeMainAxisExtentForChild(RenderBox* child, Si
{
// FIXME: This is wrong for orthogonal flows. It should use the flexbox's writing-mode, not the child's in order
// to figure out the logical height/width.
- // FIXME: This is wrong if the height is set to an intrinsic keyword value. computeContentLogicalHeight will return -1.
- // Instead, we need to layout the child an get the appropriate height value.
- // https://bugs.webkit.org/show_bug.cgi?id=113610
- if (isColumnFlow())
- return child->computeContentLogicalHeight(size);
+ if (isColumnFlow()) {
+ if (child->style()->logicalHeight().isIntrinsic() || child->style()->logicalMinHeight().isIntrinsic() ||
+ child->style()->logicalMaxHeight().isIntrinsic()) {
+ if (child->needsLayout())
+ child->layout();
+ }
+ return child->computeContentLogicalHeight(size, child->logicalHeight() - child->borderAndPaddingLogicalHeight());
+ }
// FIXME: Figure out how this should work for regions and pass in the appropriate values.
LayoutUnit offsetFromLogicalTopOfFirstPage = 0;
RenderRegion* region = 0;
@@ -1389,7 +1392,8 @@ void RenderFlexibleBox::applyStretchAlignmentToChild(RenderBox* child, LayoutUni
// FIXME: If the child has orthogonal flow, then it already has an override height set, so use it.
if (!hasOrthogonalFlow(child)) {
LayoutUnit stretchedLogicalHeight = child->logicalHeight() + availableAlignmentSpaceForChild(lineCrossAxisExtent, child);
- LayoutUnit desiredLogicalHeight = child->constrainLogicalHeightByMinMax(stretchedLogicalHeight);
+ ASSERT(!child->needsLayout());
+ LayoutUnit desiredLogicalHeight = child->constrainLogicalHeightByMinMax(stretchedLogicalHeight, child->logicalHeight() - child->borderAndPaddingLogicalHeight());
// FIXME: Can avoid laying out here in some cases. See https://webkit.org/b/87905.
if (desiredLogicalHeight != child->logicalHeight()) {
« no previous file with comments | « Source/WebCore/rendering/RenderBox.cpp ('k') | Source/WebCore/rendering/RenderGrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698