fix sizing of auto sized flexbox
Created attachment 112375 [details] Patch
This patch needs more tests. I'm uploading it so Ojan can try it out a bit.
Created attachment 112574 [details] Patch
Attachment 112574 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/css2..." exit_code: 1 Source/WebCore/rendering/RenderImage.cpp:481: A case label should not be indented, but line up with its switch statement. [whitespace/indent] [4] Source/WebCore/rendering/RenderImage.cpp:500: A case label should not be indented, but line up with its switch statement. [whitespace/indent] [4] Source/WebCore/rendering/svg/RenderSVGRoot.cpp:273: Should have only a single space after a punctuation in a comment. [whitespace/comments] [5] Total errors found: 3 in 49 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 112574 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=112574&action=review Code changes look good to me. Just a couple nits. > Source/WebCore/rendering/RenderFlexibleBox.cpp:709 > if (hasPackingSpace(availableFreeSpace, totalPositiveFlexibility) && style()->flexPack() == PackJustify && childSizes.size() > 1) > startEdge += availableFreeSpace / (childSizes.size() - 1); > } > + if (isColumnFlow() && flowAwareLogicalWidthLength().isAuto()) > + setFlowAwareLogicalWidth(startEdge); Maybe add a flex-pack test case to ensure that the last addition of "availableFreeSpace / (childSizes.size() - 1)" gets the correct result? > LayoutTests/css3/flexbox/columns-auto-size.html:53 > +<body onload="checkFlexBoxen(); checkFlexBoxen('flexbox-vertical-rl')"> I'm not opposed to this change, but it doesn't seem necessary. Just make vertical-rl a separate classname and make the class of these boxes be "flexbox vertical-rl". It's what we do in the other tests.
Created attachment 112581 [details] Patch
Created attachment 112582 [details] Patch
(In reply to comment #5) > (From update of attachment 112574 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=112574&action=review > > > Source/WebCore/rendering/RenderFlexibleBox.cpp:709 > > if (hasPackingSpace(availableFreeSpace, totalPositiveFlexibility) && style()->flexPack() == PackJustify && childSizes.size() > 1) > > startEdge += availableFreeSpace / (childSizes.size() - 1); > > } > > + if (isColumnFlow() && flowAwareLogicalWidthLength().isAuto()) > > + setFlowAwareLogicalWidth(startEdge); > > Maybe add a flex-pack test case to ensure that the last addition of "availableFreeSpace / (childSizes.size() - 1)" gets the correct result? Done, although it's not that interesting because with an auto height, the available free space is always 0. > > LayoutTests/css3/flexbox/columns-auto-size.html:53 > > +<body onload="checkFlexBoxen(); checkFlexBoxen('flexbox-vertical-rl')"> > > I'm not opposed to this change, but it doesn't seem necessary. Just make vertical-rl a separate classname and make the class of these boxes be "flexbox vertical-rl". It's what we do in the other tests. Done (had to add a horizontal class, but that's not a big deal).
Comment on attachment 112582 [details] Patch Minusing as per discussion in IRC. I think you need to back up and implement preferred widths.
Comment on attachment 112582 [details] Patch r=me
Created attachment 112727 [details] Patch
Comment on attachment 112727 [details] Patch r=me
Committed r98628: <http://trac.webkit.org/changeset/98628>