summaryrefslogtreecommitdiff
path: root/riscos
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
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')
-rw-r--r--riscos/htmlredraw.c13
-rw-r--r--riscos/window.c5
2 files changed, 12 insertions, 6 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;
}
diff --git a/riscos/window.c b/riscos/window.c
index 25fe4cbc7..aec6bd8da 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -975,7 +975,10 @@ void ro_gui_window_mouse_at(struct gui_window *g, wimp_pointer *pointer)
x = window_x_units(pointer->pos.x, &state) / 2 / g->option.scale;
y = -window_y_units(pointer->pos.y, &state) / 2 / g->option.scale;
- browser_window_mouse_click(g->bw, BROWSER_MOUSE_HOVER, x, y);
+ if (pointer->buttons)
+ browser_window_mouse_click(g->bw, BROWSER_MOUSE_DRAG, x, y);
+ else
+ browser_window_mouse_click(g->bw, BROWSER_MOUSE_HOVER, x, y);
}