From c05333fa62c6dfdd76f20d8a4056bd66f6e9cddd Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 14 Feb 2011 17:57:08 +0000 Subject: Pass clip rect to scroll_redraw as struct. Simplify test to see if scrollbar is within clip rect. svn path=/trunk/netsurf/; revision=11679 --- render/form.c | 7 ++++++- render/html_redraw.c | 8 ++------ 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'render') diff --git a/render/form.c b/render/form.c index 71a42da4c..8c54b23d5 100644 --- a/render/form.c +++ b/render/form.c @@ -989,6 +989,11 @@ bool form_redraw_select_menu(struct form_control *control, int x, int y, int i; int scroll; int x_cp, y_cp; + struct rect clip; + clip.x0 = clip_x0; + clip.y0 = clip_y0; + clip.x1 = clip_x1; + clip.y1 = clip_y1; box = control->box; @@ -1079,7 +1084,7 @@ bool form_redraw_select_menu(struct form_control *control, int x, int y, if (!scroll_redraw(menu->scroll, x_cp + menu->width - SCROLLBAR_WIDTH, y_cp, - clip_x0, clip_y0, clip_x1, clip_y1, scale)) + &clip, scale)) return false; return true; diff --git a/render/html_redraw.c b/render/html_redraw.c index d36eb8d91..019b99ed7 100644 --- a/render/html_redraw.c +++ b/render/html_redraw.c @@ -722,17 +722,13 @@ bool html_redraw_box(struct box *box, int x_parent, int y_parent, x_parent + box->x, y_parent + box->y + box->padding[TOP] + box->height + box->padding[BOTTOM] - - SCROLLBAR_WIDTH, - clip.x0, clip.y0, clip.x1, clip.y1, - scale); + SCROLLBAR_WIDTH, &clip, scale); if (box->scroll_y != NULL) scroll_redraw(box->scroll_y, x_parent + box->x + box->padding[LEFT] + box->width + box->padding[RIGHT] - SCROLLBAR_WIDTH, - y_parent + box->y, - clip.x0, clip.y0, clip.x1, clip.y1, - scale); + y_parent + box->y, &clip, scale); } -- cgit v1.2.3