Index: Source/core/rendering/RenderFlexibleBox.cpp |
diff --git a/Source/core/rendering/RenderFlexibleBox.cpp b/Source/core/rendering/RenderFlexibleBox.cpp |
index 2a6c7056fe62f5936d31f67d7d298d59b86f3769..53b20e2c0062f8c6cab437549541894a34a481a2 100644 |
--- a/Source/core/rendering/RenderFlexibleBox.cpp |
+++ b/Source/core/rendering/RenderFlexibleBox.cpp |
@@ -116,11 +116,7 @@ void RenderFlexibleBox::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidt |
minLogicalWidth += minPreferredLogicalWidth; |
} else { |
minLogicalWidth = std::max(minPreferredLogicalWidth, minLogicalWidth); |
- if (isMultiline()) { |
- // For multiline, the max preferred width is if you never break between items. |
- maxLogicalWidth += maxPreferredLogicalWidth; |
- } else |
- maxLogicalWidth = std::max(maxPreferredLogicalWidth, maxLogicalWidth); |
+ maxLogicalWidth = std::max(maxPreferredLogicalWidth, maxLogicalWidth); |
} |
} |
@@ -1119,8 +1115,16 @@ void RenderFlexibleBox::layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, cons |
} else { |
childCrossAxisMarginBoxExtent = crossAxisIntrinsicExtentForChild(child) + crossAxisMarginExtentForChild(child); |
} |
- if (!isColumnFlow()) |
+ if (!isColumnFlow()) { |
setLogicalHeight(std::max(logicalHeight(), crossAxisOffset + flowAwareBorderAfter() + flowAwarePaddingAfter() + childCrossAxisMarginBoxExtent + crossAxisScrollbarExtent())); |
+ } else if (isMultiline() && !style()->logicalWidth().isSpecified()) { |
tony
2014/07/21 17:50:59
I don't think this is correct. This part of the s
harpreet.sk
2014/07/22 10:10:23
Acknowledged.
|
+ LayoutUnit w = std::max(logicalWidth(), crossAxisOffset + flowAwareBorderAfter() + flowAwarePaddingAfter() + childCrossAxisMarginBoxExtent + crossAxisScrollbarExtent()); |
+ bool hasPerpendicularContainingBlock = containingBlock()->isHorizontalWritingMode() != isHorizontalWritingMode(); |
+ LayoutUnit containerWidthInInlineDirection = std::max<LayoutUnit>(0, containingBlockLogicalWidthForContent()); |
+ if (hasPerpendicularContainingBlock) |
+ containerWidthInInlineDirection = perpendicularContainingBlockLogicalHeight(); |
+ setLogicalWidth(constrainLogicalWidthByMinMax(w, containerWidthInInlineDirection, containingBlock())); |
+ } |
maxChildCrossAxisExtent = std::max(maxChildCrossAxisExtent, childCrossAxisMarginBoxExtent); |
mainAxisOffset += flowAwareMarginStartForChild(child); |