summaryrefslogtreecommitdiff
path: root/riscos/htmlredraw.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2004-08-25 23:56:49 +0000
committerJames Bursa <james@netsurf-browser.org>2004-08-25 23:56:49 +0000
commite44249f6edb3781ebc6816e79791ba266a568935 (patch)
treea199eb5d2604a295cb469a8d5e66649a1fb9ff25 /riscos/htmlredraw.c
parent26d107c444cd6e30a0dacf707470c6cda267d34b (diff)
downloadnetsurf-e44249f6edb3781ebc6816e79791ba266a568935.tar.gz
netsurf-e44249f6edb3781ebc6816e79791ba266a568935.tar.bz2
[project @ 2004-08-25 23:56:48 by bursa]
Experimental overflow: scroll code. svn path=/import/netsurf/; revision=1250
Diffstat (limited to 'riscos/htmlredraw.c')
-rw-r--r--riscos/htmlredraw.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/riscos/htmlredraw.c b/riscos/htmlredraw.c
index 23629529f..b9e47cd00 100644
--- a/riscos/htmlredraw.c
+++ b/riscos/htmlredraw.c
@@ -153,6 +153,7 @@ bool html_redraw_box(struct box *box,
int padding_left, padding_top, padding_width, padding_height;
int x0, y0, x1, y1;
int colour;
+ int x_scrolled, y_scrolled;
os_error *error;
ro_gui_redraw_box_depth++;
@@ -167,6 +168,8 @@ bool html_redraw_box(struct box *box,
box->padding[RIGHT]) * 2 * scale;
padding_height = (box->padding[TOP] + box->height +
box->padding[BOTTOM]) * 2 * scale;
+ x_scrolled = x - box->scroll_x * 2 * scale;
+ y_scrolled = y + box->scroll_y * 2 * scale;
/* calculate clip rectangle for this box */
if (box->style && box->style->overflow != CSS_OVERFLOW_VISIBLE) {
@@ -184,7 +187,7 @@ bool html_redraw_box(struct box *box,
/* if visibility is hidden render children only */
if (box->style && box->style->visibility == CSS_VISIBILITY_HIDDEN) {
for (c = box->children; c; c = c->next)
- if (!html_redraw_box(c, x, y,
+ if (!html_redraw_box(c, x_scrolled, y_scrolled,
current_background_color,
x0, y0, x1, y1, scale))
return false;
@@ -537,14 +540,14 @@ bool html_redraw_box(struct box *box,
} else {
for (c = box->children; c != 0; c = c->next)
if (c->type != BOX_FLOAT_LEFT && c->type != BOX_FLOAT_RIGHT)
- if (!html_redraw_box(c, x,
- y, current_background_color,
+ if (!html_redraw_box(c, x_scrolled, y_scrolled,
+ current_background_color,
x0, y0, x1, y1, scale))
return false;
for (c = box->float_children; c != 0; c = c->next_float)
- if (!html_redraw_box(c, x,
- y, current_background_color,
+ if (!html_redraw_box(c, x_scrolled, y_scrolled,
+ current_background_color,
x0, y0, x1, y1, scale))
return false;
}