diff options
Diffstat (limited to 'render')
-rw-r--r-- | render/html_redraw.c | 6 | ||||
-rw-r--r-- | render/layout.c | 3 |
2 files changed, 8 insertions, 1 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), diff --git a/render/layout.c b/render/layout.c index d00cf6af4..02374e755 100644 --- a/render/layout.c +++ b/render/layout.c @@ -1505,7 +1505,8 @@ bool layout_line(struct box *first, int *width, int *y, d->x += x0; d->y = *y - d->padding[TOP]; } - if (d->type == BOX_INLINE_BLOCK) { + if ((d->type == BOX_INLINE && (d->object || d->gadget)) || + d->type == BOX_INLINE_BLOCK) { d->x += x0; d->y = *y + d->border[TOP] + d->margin[TOP]; } |