RESOLVED FIXED 97827
RenderFlexibleBox::preferredMainAxisContentExtentForChild can return a negative value
https://bugs.webkit.org/show_bug.cgi?id=97827
Summary RenderFlexibleBox::preferredMainAxisContentExtentForChild can return a negati...
Ojan Vafai
Reported 2012-09-27 16:00:58 PDT
LayoutUnit RenderFlexibleBox::preferredMainAxisContentExtentForChild(RenderBox* child) { Length flexBasis = flexBasisForChild(child); if (flexBasis.isAuto()) { LayoutUnit mainAxisExtent = hasOrthogonalFlow(child) ? child->logicalHeight() : child->maxPreferredLogicalWidth(); return mainAxisExtent - mainAxisBorderAndPaddingExtentForChild(child); } return std::max(LayoutUnit(0), computeMainAxisExtentForChild(child, MainOrPreferredSize, flexBasis)); } In the first return statement we need to clamp to 0 the same way we do in the second one. If mainAxisExtent < mainAxisBorderAndPaddingExtentForChild, then we are incorrectly returning a negative value.
Attachments
Patch (1.80 KB, patch)
2012-10-19 16:47 PDT, Tony Chang
no flags
Tony Chang
Comment 1 2012-10-19 16:47:36 PDT
WebKit Review Bot
Comment 2 2012-10-19 18:49:17 PDT
Comment on attachment 169722 [details] Patch Clearing flags on attachment: 169722 Committed r131972: <http://trac.webkit.org/changeset/131972>
WebKit Review Bot
Comment 3 2012-10-19 18:49:21 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.