fixed divide by zero, test9 has sub sub doc.

git-svn-id: svn://10.0.0.236/trunk@4073 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
karnaze 1998-06-18 18:33:34 +00:00
parent 2cda5cddc8
commit ae1802e8be
4 changed files with 12 additions and 10 deletions

View File

@ -881,16 +881,16 @@ void nsCSSRendering::PaintBackground(nsIPresContext& aPresContext,
ycount = 0;
break;
case NS_STYLE_BG_REPEAT_X:
xcount = (PRIntn) (aBounds.width / tileWidth);
xcount = (tileWidth == 0) ? 0 : (PRIntn) (aBounds.width / tileWidth);
ycount = 0;
break;
case NS_STYLE_BG_REPEAT_Y:
xcount = 0;
ycount = (PRIntn) (aBounds.height / tileHeight);
ycount = (tileHeight == 0) ? 0 : (PRIntn) (aBounds.height / tileHeight);
break;
case NS_STYLE_BG_REPEAT_XY:
xcount = (PRIntn) (aBounds.width / tileWidth);
ycount = (PRIntn) (aBounds.height / tileHeight);
xcount = (tileWidth == 0) ? 0 : (PRIntn) (aBounds.width / tileWidth);
ycount = (tileHeight == 0) ? 0 : (PRIntn) (aBounds.height / tileHeight);
break;
}

View File

@ -881,16 +881,16 @@ void nsCSSRendering::PaintBackground(nsIPresContext& aPresContext,
ycount = 0;
break;
case NS_STYLE_BG_REPEAT_X:
xcount = (PRIntn) (aBounds.width / tileWidth);
xcount = (tileWidth == 0) ? 0 : (PRIntn) (aBounds.width / tileWidth);
ycount = 0;
break;
case NS_STYLE_BG_REPEAT_Y:
xcount = 0;
ycount = (PRIntn) (aBounds.height / tileHeight);
ycount = (tileHeight == 0) ? 0 : (PRIntn) (aBounds.height / tileHeight);
break;
case NS_STYLE_BG_REPEAT_XY:
xcount = (PRIntn) (aBounds.width / tileWidth);
ycount = (PRIntn) (aBounds.height / tileHeight);
xcount = (tileWidth == 0) ? 0 : (PRIntn) (aBounds.width / tileWidth);
ycount = (tileHeight == 0) ? 0 : (PRIntn) (aBounds.height / tileHeight);
break;
}

View File

@ -8,5 +8,7 @@
hello<iframe width=250 height=250 src=test1.html></iframe>
&nbsp;
<iframe width=250 height=250 src=test2.html></iframe>
<BR>
<iframe width=400 height=400 src=test9a.html></iframe>
</body>
</html>

View File

@ -1,7 +1,7 @@
<html>
<body>
a frame within a frame
&nbsp;
<iframe src=test5.html width=150 height=150></iframe>
<BR>
<iframe src=test7.html width=300 height=300></iframe>
</body>
</html>