fixed divide by zero, test9 has sub sub doc.

This commit is contained in:
karnaze 1998-06-18 18:33:34 +00:00
Родитель 24c6d64077
Коммит 505cf9d7ac
4 изменённых файлов: 12 добавлений и 10 удалений

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -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>

Просмотреть файл

@ -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>