Index: Source/core/rendering/RenderBox.cpp |
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp |
index 747528e6a35f7bfebec806bbb570a3990b21849a..21a567302a7f3f696a005e02c1994ce950c2f2b5 100644 |
--- a/Source/core/rendering/RenderBox.cpp |
+++ b/Source/core/rendering/RenderBox.cpp |
@@ -2181,6 +2181,10 @@ LayoutUnit RenderBox::computeLogicalWidthInRegionUsing(SizeType widthType, Lengt |
static bool flexItemHasStretchAlignment(const RenderObject* flexitem) |
{ |
RenderObject* parent = flexitem->parent(); |
+ // auto margins mean we don't stretch. Note that this function will only be used for |
+ // widths, so we don't have to check marginBefore/marginAfter. |
ojan
2013/05/24 22:39:09
Instead of adding (or maybe in addition to) the ex
|
+ if (flexitem->style()->marginStart().isAuto() || flexitem->style()->marginEnd().isAuto()) |
+ return false; |
return flexitem->style()->alignSelf() == AlignStretch || (flexitem->style()->alignSelf() == AlignAuto && parent->style()->alignItems() == AlignStretch); |
} |