Summary: | Implement flex-wrap: wrap | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tony Chang <tony> | ||||||
Component: | New Bugs | Assignee: | Tony Chang <tony> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | hyatt, ojan, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 70781 | ||||||||
Attachments: |
|
Description
Tony Chang
2012-02-29 11:43:34 PST
Created attachment 129487 [details]
Patch
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. Created attachment 129523 [details]
Patch
(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. Comment on attachment 129523 [details]
Patch
r=me
Comment on attachment 129523 [details] Patch Clearing flags on attachment: 129523 Committed r109799: <http://trac.webkit.org/changeset/109799> All reviewed patches have been landed. Closing bug. |