diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2011-02-11 00:14:22 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2011-02-11 00:14:22 +0000 |
commit | 9a183018ea9c7d58a6aa71a2afb92271c4207e01 (patch) | |
tree | 469c6efd35b035c954b13d2624377ede29858e74 /desktop/browser.c | |
parent | 2a8e8a5cf10a22d47dd7ba8701b2b97b317c26ff (diff) | |
download | netsurf-9a183018ea9c7d58a6aa71a2afb92271c4207e01.tar.gz netsurf-9a183018ea9c7d58a6aa71a2afb92271c4207e01.tar.bz2 |
improve browser_window_redraw width and height handling
svn path=/trunk/netsurf/; revision=11642
Diffstat (limited to 'desktop/browser.c')
-rw-r--r-- | desktop/browser.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/desktop/browser.c b/desktop/browser.c index 1ffc12e29..553baefc3 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -91,10 +91,12 @@ static void browser_window_find_target_internal(struct browser_window *bw, /* exported interface, documented in browser.h */ bool browser_window_redraw(struct browser_window *bw, int x, int y, - int width, int height, int clip_x0, int clip_y0, int clip_x1, int clip_y1) { + int width = 0; + int height = 0; + if (bw == NULL) { LOG(("NULL browser window")); return false; @@ -106,6 +108,11 @@ bool browser_window_redraw(struct browser_window *bw, return plot.rectangle(clip_x0, clip_y0, clip_x1, clip_y1, plot_style_fill_white); } + + if (content_get_type(bw->current_content) != CONTENT_HTML) { + width = content_get_width(bw->current_content) * bw->scale; + height = content_get_height(bw->current_content) * bw->scale; + } return content_redraw(bw->current_content, x, y, width, height, clip_x0, clip_y0, clip_x1, clip_y1, |