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; ycount = 0;
break; break;
case NS_STYLE_BG_REPEAT_X: case NS_STYLE_BG_REPEAT_X:
xcount = (PRIntn) (aBounds.width / tileWidth); xcount = (tileWidth == 0) ? 0 : (PRIntn) (aBounds.width / tileWidth);
ycount = 0; ycount = 0;
break; break;
case NS_STYLE_BG_REPEAT_Y: case NS_STYLE_BG_REPEAT_Y:
xcount = 0; xcount = 0;
ycount = (PRIntn) (aBounds.height / tileHeight); ycount = (tileHeight == 0) ? 0 : (PRIntn) (aBounds.height / tileHeight);
break; break;
case NS_STYLE_BG_REPEAT_XY: case NS_STYLE_BG_REPEAT_XY:
xcount = (PRIntn) (aBounds.width / tileWidth); xcount = (tileWidth == 0) ? 0 : (PRIntn) (aBounds.width / tileWidth);
ycount = (PRIntn) (aBounds.height / tileHeight); ycount = (tileHeight == 0) ? 0 : (PRIntn) (aBounds.height / tileHeight);
break; break;
} }

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

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

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

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

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

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