From f4ce62ebfe56283763533f1b778cee074ee6f372 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 19 Mar 2013 12:44:03 +0000 Subject: In box textarea binding only redraw the area that was requested, not the whole textarea. --- render/box_textarea.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'render') diff --git a/render/box_textarea.c b/render/box_textarea.c index d58f5ef1b..546a39e04 100644 --- a/render/box_textarea.c +++ b/render/box_textarea.c @@ -152,9 +152,17 @@ static void box_textarea_callback(void *data, struct textarea_msg *msg) break; case TEXTAREA_MSG_REDRAW_REQUEST: - /* Redraw the textarea */ - /* TODO: don't redraw whole box, just the part asked for */ - html__redraw_a_box(html, box); + { + /* Request redraw of the required textarea rectangle */ + int x, y; + box_coords(box, &x, &y); + + content__request_redraw((struct content *)html, + x + msg->data.redraw.x0, + y + msg->data.redraw.y0, + msg->data.redraw.x1 - msg->data.redraw.x0, + msg->data.redraw.y1 - msg->data.redraw.y0); + } break; case TEXTAREA_MSG_SELECTION_REPORT: -- cgit v1.2.3