Summary: | compute the sign of flexibility for new flexbox | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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 | ||||||||||
Attachments: |
|
Description
Tony Chang
2012-03-20 16:55:17 PDT
Created attachment 132931 [details]
Patch
The ChangeLog links to the relevant part of the spec. Comment on attachment 132931 [details] Patch Attachment 132931 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/12035169 Created attachment 133067 [details]
Patch
As discussed offline, rather than adding a new loop, we compute the min/max applied size when we're computing the not min/max applied size. This should be a bit more efficient. Comment on attachment 133067 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=133067&action=review > Source/WebCore/rendering/RenderFlexibleBox.cpp:744 > + Length maxLength = isHorizontalFlow() ? child->style()->maxWidth() : child->style()->maxHeight(); > + if (maxLength.isSpecified() && childMinMaxAppliedMainAxisExtent > valueForLength(maxLength, flexboxAvailableContentExtent)) > + childMinMaxAppliedMainAxisExtent = valueForLength(maxLength, flexboxAvailableContentExtent); > + Length minLength = isHorizontalFlow() ? child->style()->minWidth() : child->style()->minHeight(); > + if (minLength.isSpecified() && childMinMaxAppliedMainAxisExtent < valueForLength(minLength, flexboxAvailableContentExtent)) > + childMinMaxAppliedMainAxisExtent = valueForLength(minLength, flexboxAvailableContentExtent); As discussed in person, I'm pretty sure this does the wrong thing for percentages. I think we may want to use RenderBox::computeLogicalHeightUsing and RenderBox::computeLogicalWidthInRegionUsing, but I'm not sure. In either case, I'm fine with committing this now with a FIXME. Would be good to get Hyatt's thoughts on the right way to do this. Created attachment 133084 [details]
Patch for landing
Comment on attachment 133084 [details] Patch for landing Clearing flags on attachment: 133084 Committed r111596: <http://trac.webkit.org/changeset/111596> All reviewed patches have been landed. Closing bug. |