mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-28 09:13:08 +03:00
[project @ 2005-03-18 23:50:36 by rjw]
Take borders into account when checking whether a box contains a point. svn path=/import/netsurf/; revision=1540
This commit is contained in:
parent
33d5ab57b5
commit
793bb9119a
@ -3443,11 +3443,11 @@ bool box_contains_point(struct box *box, int x, int y)
|
|||||||
{
|
{
|
||||||
if (box->style && box->style->overflow != CSS_OVERFLOW_VISIBLE) {
|
if (box->style && box->style->overflow != CSS_OVERFLOW_VISIBLE) {
|
||||||
if (box->x <= x &&
|
if (box->x <= x &&
|
||||||
x < box->x + box->padding[LEFT] + box->width +
|
x < box->x + box->padding[LEFT] + box->border[LEFT] +box->width +
|
||||||
box->padding[RIGHT] &&
|
box->border[RIGHT] + box->padding[RIGHT] &&
|
||||||
box->y <= y &&
|
box->y <= y &&
|
||||||
y < box->y + box->padding[TOP] + box->height +
|
y < box->y + box->padding[TOP] + box->border[TOP] + box->height +
|
||||||
box->padding[BOTTOM])
|
box->border[BOTTOM] + box->padding[BOTTOM])
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
if (box->x + box->descendant_x0 <= x &&
|
if (box->x + box->descendant_x0 <= x &&
|
||||||
|
Loading…
Reference in New Issue
Block a user