[Webkit-unassigned] [Bug 97606] flexbox assert fails with subpixel layout
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 25 14:46:50 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=97606
Ojan Vafai <ojan at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |62048
--- Comment #2 from Ojan Vafai <ojan at chromium.org> 2012-09-25 14:47:18 PST ---
Thanks! I'm pretty sure the bug is in RenderFlexibleBox::preferredMainAxisContentExtentForChild. Fix should be super-easy.
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.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list