From fb0903a089575b5c3aedbf4ba0da96c89da12e37 Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Sat, 19 Mar 2005 14:23:47 +0000 Subject: [project @ 2005-03-19 14:23:47 by rjw] Solve clickable area test case. svn path=/import/netsurf/; revision=1544 --- render/box.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'render') 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 { -- cgit v1.2.3