diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-06-01 18:36:22 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-06-01 18:36:22 +0100 |
commit | 5085bfbf99ff3885acb2e23f8a48d18f150e294a (patch) | |
tree | 3ea7b30d9e5b4512ffc22c49dd5ce78b53f4754b /render/box.c | |
parent | 576e93e1f33614003dd876b93f2f5bbf8228eeed (diff) | |
download | netsurf-5085bfbf99ff3885acb2e23f8a48d18f150e294a.tar.gz netsurf-5085bfbf99ff3885acb2e23f8a48d18f150e294a.tar.bz2 |
Handle overflow-x and overflow-y properties.
Fixes display of BBC Sport.
Requires LibCSS with support for overflow-x and overflow-y.
Diffstat (limited to 'render/box.c')
-rw-r--r-- | render/box.c | 12 |
1 files changed, 9 insertions, 3 deletions
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; |