From 5085bfbf99ff3885acb2e23f8a48d18f150e294a Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 1 Jun 2014 18:36:22 +0100 Subject: Handle overflow-x and overflow-y properties. Fixes display of BBC Sport. Requires LibCSS with support for overflow-x and overflow-y. --- render/box.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'render/box.c') diff --git a/render/box.c b/render/box.c index 295308b5a..53f6c75d0 100644 --- a/render/box.c +++ b/render/box.c @@ -584,11 +584,17 @@ bool box_contains_point(struct box *box, int x, int y, bool *physically) *physically = true; return true; } - if ((box->style && css_computed_overflow(box->style) == + if ((box->style && css_computed_overflow_x(box->style) == CSS_OVERFLOW_VISIBLE) || !box->style) { if (box->x + box->descendant_x0 <= x && - x < box->x + box->descendant_x1 && - box->y + box->descendant_y0 <= y && + x < box->x + box->descendant_x1) { + *physically = false; + return true; + } + } + if ((box->style && css_computed_overflow_y(box->style) == + CSS_OVERFLOW_VISIBLE) || !box->style) { + if (box->y + box->descendant_y0 <= y && y < box->y + box->descendant_y1) { *physically = false; return true; -- cgit v1.2.3