diff options
Diffstat (limited to 'render')
-rw-r--r-- | render/box.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/render/box.c b/render/box.c index f5c02eedb..2eb928d46 100644 --- a/render/box.c +++ b/render/box.c @@ -3442,11 +3442,11 @@ siblings: bool box_contains_point(struct box *box, int x, int y) { if (box->style && box->style->overflow != CSS_OVERFLOW_VISIBLE) { - if (box->x <= x && - x < box->x + box->padding[LEFT] + box->border[LEFT] +box->width + + if (box->x <= x + box->border[LEFT] && + x < box->x + box->padding[LEFT] + box->width + box->border[RIGHT] + box->padding[RIGHT] && - box->y <= y && - y < box->y + box->padding[TOP] + box->border[TOP] + box->height + + box->y <= y + box->border[TOP] && + y < box->y + box->padding[TOP] + box->height + box->border[BOTTOM] + box->padding[BOTTOM]) return true; } else { |