Fix handling of clip property to avoid clip rectangles that are entierly outside the redraw region.

This commit is contained in:
Michael Drake 2013-05-28 12:47:20 +01:00
parent ba9769bc8c
commit 977452b2ba
1 changed files with 2 additions and 2 deletions

View File

@ -2065,8 +2065,8 @@ bool html_redraw_box(const html_content *html, struct box *box,
if (r.y0 < clip->y0) r.y0 = clip->y0;
if (clip->x1 < r.x1) r.x1 = clip->x1;
if (clip->y1 < r.y1) r.y1 = clip->y1;
/* no point trying to draw 0-width/height boxes */
if (r.x0 == r.x1 || r.y0 == r.y1)
/* Nothing to do for invalid rectangles */
if (r.x0 >= r.x1 || r.y0 >= r.y1)
/* not an error */
return ((!plot->group_end) || (plot->group_end()));
/* clip to it */