diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2004-12-05 23:51:10 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2004-12-05 23:51:10 +0000 |
commit | 8a0965110f5ed20e7baee165c7f1405f052eb83c (patch) | |
tree | d83c1de10f7fff50aaa5b5947ba954e7eae6c41b /render/html_redraw.c | |
parent | 3e6a2b9d9a0b4125eeeb37384b25a0232d4da7c5 (diff) | |
download | netsurf-8a0965110f5ed20e7baee165c7f1405f052eb83c.tar.gz netsurf-8a0965110f5ed20e7baee165c7f1405f052eb83c.tar.bz2 |
[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
Diffstat (limited to 'render/html_redraw.c')
-rw-r--r-- | render/html_redraw.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/render/html_redraw.c b/render/html_redraw.c index 1e4a32def..20e9080aa 100644 --- a/render/html_redraw.c +++ b/render/html_redraw.c @@ -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; |