diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2008-01-28 00:58:31 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2008-01-28 00:58:31 +0000 |
commit | 49fce64c1a9a76e8ef9062e90932df3f55073508 (patch) | |
tree | fe75361b99017dd575f1aef41cf00a8ab2e286f5 /render/html_redraw.c | |
parent | 48bdeb34c87d2124ce0bfbd885e14b1bb1695ce2 (diff) | |
download | netsurf-49fce64c1a9a76e8ef9062e90932df3f55073508.tar.gz netsurf-49fce64c1a9a76e8ef9062e90932df3f55073508.tar.bz2 |
Fix vertical position of images with margin/borders/padding.
svn path=/trunk/netsurf/; revision=3785
Diffstat (limited to 'render/html_redraw.c')
-rw-r--r-- | render/html_redraw.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/render/html_redraw.c b/render/html_redraw.c index 52b33190a..6ad5f8c47 100644 --- a/render/html_redraw.c +++ b/render/html_redraw.c @@ -1305,6 +1305,12 @@ bool html_redraw_background(int x, int y, struct box *box, float scale, if (plot_content) { if (!plot.clip(clip_x0, clip_y0, clip_x1, clip_y1)) return false; + if ((repeat_x || repeat_y) && (!(repeat_x && repeat_y))) { + clip_x0 += ceilf(box->border[LEFT] * scale); + clip_x1 -= ceilf(box->border[RIGHT] * scale); + clip_y0 += ceilf(box->border[TOP] * scale); + clip_y1 -= ceilf(box->border[BOTTOM] * scale); + } if (!content_redraw_tiled(background->background, x, y, ceilf(background->background->width * scale), ceilf(background->background->height * scale), |