Index: Source/WebCore/rendering/RenderFlexibleBox.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderFlexibleBox.cpp (revision 105192) |
+++ Source/WebCore/rendering/RenderFlexibleBox.cpp (working copy) |
@@ -579,7 +579,7 @@ |
child->containingBlock()->insertPositionedObject(child); |
RenderLayer* childLayer = child->layer(); |
LayoutUnit inlinePosition = isColumnFlow() ? crossAxisOffset : mainAxisOffset; |
- if (style()->flexDirection() == FlowRowReverse) |
+ if (style()->flexFlow() == FlowRowReverse) |
inlinePosition = mainAxisExtent() - mainAxisOffset; |
childLayer->setStaticInlinePosition(inlinePosition); // FIXME: Not right for regions. |
@@ -608,8 +608,9 @@ |
size_t i = 0; |
for (RenderBox* child = iterator.first(); child; child = iterator.next(), ++i) { |
if (child->isPositioned()) { |
- prepareChildForPositionedLayout(child, mainAxisOffset, crossAxisOffset); |
- mainAxisOffset += packingSpaceBetweenChildren(availableFreeSpace, totalPositiveFlexibility, style()->flexPack(), childSizes.size()); |
+ prepareChildForPositionedLayout(child, startEdge, logicalTop); |
+ if (hasPackingSpace(availableFreeSpace, totalPositiveFlexibility) && style()->flexPack() == PackJustify && childSizes.size() > 1) |
+ startEdge += availableFreeSpace / (childSizes.size() - 1); |
continue; |
} |
LayoutUnit childPreferredSize = childSizes[i] + mainAxisBorderAndPaddingExtentForChild(child); |