Summary: | Need to implement flex-flow: column-reverse | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tony Chang <tony> | ||||||||
Component: | Layout and Rendering | 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: | 62048 | ||||||||||
Attachments: |
|
Description
Tony Chang
2011-11-30 17:15:48 PST
Created attachment 117501 [details]
Patch
Created attachment 117502 [details]
Patch
Comment on attachment 117502 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=117502&action=review > Source/WebCore/rendering/RenderFlexibleBox.cpp:635 > + computeLogicalHeight(); If you move this out of the if-statement, you can remove the last computeLogicalHeight() call in layoutBlock(), right? > Source/WebCore/rendering/RenderFlexibleBox.cpp:646 > + // This is similar to the logic in layoutAndPlaceChildren, except we place the children > + // starting from the end of the flexbox. We also don't need to layout anything since we're > + // just moving the children to a new position. Do we really need to duplicate all this logic? It is not sufficient to just flip the children? Created attachment 117685 [details]
Patch
(In reply to comment #3) > (From update of attachment 117502 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=117502&action=review > > > Source/WebCore/rendering/RenderFlexibleBox.cpp:635 > > + computeLogicalHeight(); > > If you move this out of the if-statement, you can remove the last computeLogicalHeight() call in layoutBlock(), right? If we do that, then in the non-column-reverse case, we lose the overflow (clientLogicalBottom() will be called after we set the height to the computed height). > > Source/WebCore/rendering/RenderFlexibleBox.cpp:646 > > + // This is similar to the logic in layoutAndPlaceChildren, except we place the children > > + // starting from the end of the flexbox. We also don't need to layout anything since we're > > + // just moving the children to a new position. > > Do we really need to duplicate all this logic? It is not sufficient to just flip the children? It's a bit complicated because of how the padding and margins are applied. Based on offline discussion, I consolidated the flex-pack logic into some helper functions to cut down on duplicate code. Comment on attachment 117685 [details]
Patch
LGTM. I'll leave it for Hyatt to r+ though.
Comment on attachment 117685 [details]
Patch
r=me
Comment on attachment 117685 [details] Patch Clearing flags on attachment: 117685 Committed r101897: <http://trac.webkit.org/changeset/101897> All reviewed patches have been landed. Closing bug. |