Index: Source/core/rendering/RenderFlexibleBox.cpp |
diff --git a/Source/core/rendering/RenderFlexibleBox.cpp b/Source/core/rendering/RenderFlexibleBox.cpp |
index 51454b7179a4eb3ffcc6e7fb45df9a2b67d5c165..1a789c494170efdb4b653ed483ab7c25aac6ea30 100644 |
--- a/Source/core/rendering/RenderFlexibleBox.cpp |
+++ b/Source/core/rendering/RenderFlexibleBox.cpp |
@@ -1350,7 +1350,12 @@ void RenderFlexibleBox::applyStretchAlignmentToChild(RenderBox& child, LayoutUni |
child.setOverrideLogicalContentHeight(desiredLogicalHeight - child.borderAndPaddingLogicalHeight()); |
if (childNeedsRelayout) { |
child.setLogicalHeight(0); |
+ // We cache the child's intrinsic content logical height to avoid it being reset to the stretched height. |
+ // FIXME: This is fragile. RenderBoxes should be smart enough to determine their intrinsic content logical |
+ // height correctly even when there's an overrideHeight. |
+ LayoutUnit childIntrinsicContentLogicalHeight = child.intrinsicContentLogicalHeight(); |
child.forceChildLayout(); |
+ child.updateIntrinsicContentLogicalHeight(childIntrinsicContentLogicalHeight); |
} |
} |
} else if (isColumnFlow() && child.style()->logicalWidth().isAuto()) { |