RESOLVED FIXED 79930
Implement flex-wrap: wrap
https://bugs.webkit.org/show_bug.cgi?id=79930
Summary Implement flex-wrap: wrap
Tony Chang
Reported 2012-02-29 11:43:34 PST
Implement flex-wrap: wrap
Attachments
Patch (70.29 KB, patch)
2012-02-29 11:57 PST, Tony Chang
no flags
Patch (70.25 KB, patch)
2012-02-29 14:46 PST, Tony Chang
no flags
Tony Chang
Comment 1 2012-02-29 11:57:27 PST
Ojan Vafai
Comment 2 2012-02-29 14:40:52 PST
Comment on attachment 129487 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=129487&action=review Just the one issue for Hyatt to look at. The rest looks good modulo some nits. > Source/WebCore/rendering/RenderFlexibleBox.cpp:592 > +bool RenderFlexibleBox::computeFlexOrder(FlexOrderIterator& iterator, OrderedFlexItemList& orderedChildren, LayoutUnit& preferredMainAxisExtent, float& totalPositiveFlexibility, float& totalNegativeFlexibility) Not a huge fan of this method name. How about....computeNextFlexLine? > Source/WebCore/rendering/RenderFlexibleBox.cpp:769 > + setCrossAxisExtent(std::max(crossAxisExtent(), crossAxisOffset - flowAwareBorderBefore() - flowAwarePaddingBefore() + crossAxisBorderAndPaddingExtent() + crossAxisMarginExtentForChild(child) + childCrossAxisExtent + crossAxisScrollbarExtent())); This is kind of gross. I'm not sure how to make it cleaner though. :( > Source/WebCore/rendering/RenderFlexibleBox.cpp:795 > + // Single line flexboxes fill the alignment space. This isn't really an accurate comment. I think it just makes the code more confusing. > Source/WebCore/rendering/RenderFlexibleBox.cpp:869 > + } else if (isColumnFlow() && child->style()->logicalWidth().isAuto() && isMultiline()) { > + // FIXME: Handle min-width and max-width. > + LayoutUnit childWidth = lineCrossAxisExtent - crossAxisMarginExtentForChild(child); > + child->setOverrideWidth(std::max(0, childWidth)); > + child->setChildNeedsLayout(true); > + child->layoutIfNeeded(); This part scares me. I think it's right, but it would be good to get Hyatt to confirm before committing.
Tony Chang
Comment 3 2012-02-29 14:46:26 PST
Tony Chang
Comment 4 2012-02-29 14:52:47 PST
(In reply to comment #2) > (From update of attachment 129487 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=129487&action=review > > Just the one issue for Hyatt to look at. The rest looks good modulo some nits. > > > Source/WebCore/rendering/RenderFlexibleBox.cpp:592 > > +bool RenderFlexibleBox::computeFlexOrder(FlexOrderIterator& iterator, OrderedFlexItemList& orderedChildren, LayoutUnit& preferredMainAxisExtent, float& totalPositiveFlexibility, float& totalNegativeFlexibility) > > Not a huge fan of this method name. How about....computeNextFlexLine? Done. > > Source/WebCore/rendering/RenderFlexibleBox.cpp:795 > > + // Single line flexboxes fill the alignment space. > > This isn't really an accurate comment. I think it just makes the code more confusing. Removed.
Dave Hyatt
Comment 5 2012-03-05 11:45:24 PST
Comment on attachment 129523 [details] Patch r=me
WebKit Review Bot
Comment 6 2012-03-05 13:59:26 PST
Comment on attachment 129523 [details] Patch Clearing flags on attachment: 129523 Committed r109799: <http://trac.webkit.org/changeset/109799>
WebKit Review Bot
Comment 7 2012-03-05 13:59:30 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.