RESOLVED FIXED Bug 81722
compute the sign of flexibility for new flexbox
https://bugs.webkit.org/show_bug.cgi?id=81722
Summary compute the sign of flexibility for new flexbox
Tony Chang
Reported 2012-03-20 16:55:17 PDT
compute the sign of flexibility for new flexbox
Attachments
Patch (7.29 KB, patch)
2012-03-20 17:03 PDT, Tony Chang
no flags
Patch (9.15 KB, patch)
2012-03-21 10:19 PDT, Tony Chang
no flags
Patch for landing (9.33 KB, patch)
2012-03-21 11:36 PDT, Tony Chang
no flags
Tony Chang
Comment 1 2012-03-20 17:03:19 PDT
Tony Chang
Comment 2 2012-03-20 17:03:42 PDT
The ChangeLog links to the relevant part of the spec.
Build Bot
Comment 3 2012-03-20 19:42:56 PDT
Tony Chang
Comment 4 2012-03-21 10:19:37 PDT
Tony Chang
Comment 5 2012-03-21 10:20:39 PDT
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.
Ojan Vafai
Comment 6 2012-03-21 11:26:34 PDT
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.
Tony Chang
Comment 7 2012-03-21 11:36:00 PDT
Created attachment 133084 [details] Patch for landing
WebKit Review Bot
Comment 8 2012-03-21 13:00:39 PDT
Comment on attachment 133084 [details] Patch for landing Clearing flags on attachment: 133084 Committed r111596: <http://trac.webkit.org/changeset/111596>
WebKit Review Bot
Comment 9 2012-03-21 13:00:43 PDT
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.