WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Tony Chang
Comment 1
2012-10-19 16:47:36 PDT
Created
attachment 169722
[details]
Patch
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.
Top of Page
Format For Printing
XML
Clone This Bug