Bug 665597. Don't check overflow rects include border-box if the overflow rects are saturated. r=mats

This commit is contained in:
Robert O'Callahan 2012-01-03 11:55:35 +13:00
parent 66b55b58e5
commit c1fae35d3c

View File

@ -6564,9 +6564,14 @@ nsIFrame::FinishAndStoreOverflow(nsOverflowAreas& aOverflowAreas,
// This is now called FinishAndStoreOverflow() instead of
// StoreOverflow() because frame-generic ways of adding overflow
// can happen here, e.g. CSS2 outline and native theme.
// If the overflow area width or height is nscoord_MAX, then a
// saturating union may have encounted an overflow, so the overflow may not
// contain the frame border-box. Don't warn in that case.
NS_FOR_FRAME_OVERFLOW_TYPES(otype) {
DebugOnly<nsRect*> r = &aOverflowAreas.Overflow(otype);
NS_ASSERTION(aNewSize.width == 0 || aNewSize.height == 0 ||
aOverflowAreas.Overflow(otype).Contains(nsRect(nsPoint(0,0), aNewSize)),
r->width == nscoord_MAX || r->height == nscoord_MAX ||
r->Contains(nsRect(nsPoint(0,0), aNewSize)),
"Computed overflow area must contain frame bounds");
}