[project @ 2004-12-05 23:51:10 by jmb]

Explicitly check for boxes with 0 area, as there's no point redrawing them

svn path=/import/netsurf/; revision=1384
This commit is contained in:
John Mark Bell 2004-12-05 23:51:10 +00:00
parent 3e6a2b9d9a
commit 8a0965110f

View File

@ -199,6 +199,10 @@ bool html_redraw_box(struct box *box,
if (y0 < clip_y0) y0 = clip_y0;
if (clip_x1 < x1) x1 = clip_x1;
if (clip_y1 < y1) y1 = clip_y1;
/* no point trying to draw 0-width/height boxes */
if (x0 == x1 || y0 == y1)
/* not an error, so return true */
return true;
/* clip to it */
if (!plot.clip(x0, y0, x1, y1))
return false;