summaryrefslogtreecommitdiff
path: root/render/html_redraw.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/html_redraw.c')
-rw-r--r--render/html_redraw.c6
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),