Fix up painting issue; if we end up with a negative damage area then convert to damaging everything

This commit is contained in:
kipp%netscape.com 1998-11-21 17:21:18 +00:00
parent c94c4f2d6e
commit 3418cf24af

View File

@ -321,7 +321,8 @@ nsBodyFrame::Reflow(nsIPresContext& aPresContext,
damageArea.y = mRect.YMost();
damageArea.width = aDesiredSize.width;
damageArea.height = aDesiredSize.height - mRect.height;
if (aDesiredSize.height == mRect.height) {
if ((damageArea.height < 0) ||
(aDesiredSize.height == mRect.height)) {
// Since we don't know what changed, assume it all changed.
damageArea.y = 0;
damageArea.height = aDesiredSize.height;