Index: Source/core/rendering/RenderFlexibleBox.cpp |
diff --git a/Source/core/rendering/RenderFlexibleBox.cpp b/Source/core/rendering/RenderFlexibleBox.cpp |
index 6b940a9b40a5ac69d0d1fad9982395414318b65e..faff63cc332575ce84bb1b4cb80c6037e17c17d7 100644 |
--- a/Source/core/rendering/RenderFlexibleBox.cpp |
+++ b/Source/core/rendering/RenderFlexibleBox.cpp |
@@ -1346,8 +1346,10 @@ void RenderFlexibleBox::applyStretchAlignmentToChild(RenderBox& child, LayoutUni |
LayoutUnit desiredLogicalHeight = child.constrainLogicalHeightByMinMax(stretchedLogicalHeight, heightBeforeStretching - child.borderAndPaddingLogicalHeight()); |
// FIXME: Can avoid laying out here in some cases. See https://webkit.org/b/87905. |
- if (desiredLogicalHeight != child.logicalHeight()) { |
+ bool childNeedsRelayout = desiredLogicalHeight != child.logicalHeight(); |
+ if (childNeedsRelayout || !child.hasOverrideHeight()) |
child.setOverrideLogicalContentHeight(desiredLogicalHeight - child.borderAndPaddingLogicalHeight()); |
+ if (childNeedsRelayout) { |
child.setLogicalHeight(0); |
child.forceChildLayout(); |
} |