diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2004-07-16 20:26:49 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2004-07-16 20:26:49 +0000 |
commit | 51af46fde6b5885d32eab0812189eb8f5e270abf (patch) | |
tree | 68d72bf6dfb05988088c3bda1664db5ac1bb4c3b /riscos | |
parent | 6560a2ae5f68831bec809e9ee847ac0e36ff011d (diff) | |
download | netsurf-51af46fde6b5885d32eab0812189eb8f5e270abf.tar.gz netsurf-51af46fde6b5885d32eab0812189eb8f5e270abf.tar.bz2 |
[project @ 2004-07-16 20:26:49 by jmb]
Preliminary overflow support. This also goes some way to making the horizontal scrollbar work.
svn path=/import/netsurf/; revision=1088
Diffstat (limited to 'riscos')
-rw-r--r-- | riscos/htmlredraw.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/riscos/htmlredraw.c b/riscos/htmlredraw.c index 2c4da8a28..fb08ae060 100644 --- a/riscos/htmlredraw.c +++ b/riscos/htmlredraw.c @@ -258,6 +258,35 @@ void html_redraw_box(struct content *content, struct box * box, } } + /* handle overflow - horrendously broken atm */ +#if 0 + if ((box->type == BOX_BLOCK || box->type == BOX_INLINE_BLOCK || + box->type == BOX_TABLE_CELL || box->object) && + box->style && + box->style->overflow == CSS_OVERFLOW_VISIBLE && + box->descendant_x1 && box->descendant_y1) { + LOG(("Box Coords: %d, %d", box->x, box->y)); + LOG(("Descendants: %d, %d, %d, %d", box->descendant_x0, box->descendant_y0, box->descendant_x1, box->descendant_y1)); + LOG(("Previous vals: %d, %d, %d, %d", x0, y0, x1, y1)); + x0 = (box->x + box->descendant_x0) * 2 * scale; + y1 = (box->y + box->descendant_y1) * 2 * scale - 1; + x1 = (box->x + box->descendant_x1) * 2 * scale - 1; + y0 = (box->y + box->descendant_y0) * 2 * scale + 1; + + LOG(("New Coords: %d, %d, %d, %d", x0, y0, x1, y1)); + LOG(("Clipping: %ld, %ld, %ld, %ld", clip_x0, clip_y0, clip_x1, clip_y1)); + /* find intersection of clip rectangle and box */ + if (x0 < clip_x0) x0 = clip_x0; + if (y0 < clip_y0) y0 = clip_y0; + if (clip_x1 > x1) x1 = clip_x1; + if (clip_y1 > y1) y1 = clip_y1; + + LOG(("Overflow clip: %d, %d, %d, %d", x0, y0, x1, y1)); + /* clip to it */ + html_redraw_clip(x0, y0, x1, y1); + } +#endif + if (box->object) { content_redraw(box->object, x + padding_left, y - padding_top, width, height, x0, y0, x1, y1, scale); |