From eddae6af0663243a2677674d501f9a87d55798f5 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 30 Jun 2011 15:48:07 +0000 Subject: Remove plotter table global. Pass a redraw context around redraw functions. Knockout could be handled better. Note: untested on most front ends. svn path=/trunk/netsurf/; revision=12543 --- content/content.c | 4 ++-- content/content.h | 5 ++++- content/content_protected.h | 5 ++++- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'content') diff --git a/content/content.c b/content/content.c index 3aed46f36..1f7003404 100644 --- a/content/content.c +++ b/content/content.c @@ -490,7 +490,7 @@ void content__request_redraw(struct content *c, */ bool content_redraw(hlcache_handle *h, struct content_redraw_data *data, - const struct rect *clip) + const struct rect *clip, const struct redraw_context *ctx) { struct content *c = hlcache_handle_get_content(h); @@ -506,7 +506,7 @@ bool content_redraw(hlcache_handle *h, struct content_redraw_data *data, return true; } - return c->handler->redraw(c, data, clip); + return c->handler->redraw(c, data, clip, ctx); } diff --git a/content/content.h b/content/content.h index 39f784904..ca267060c 100644 --- a/content/content.h +++ b/content/content.h @@ -33,6 +33,7 @@ #include "utils/config.h" #include "utils/errors.h" #include "utils/http.h" +#include "utils/types.h" #include "content/content_factory.h" #include "content/content_type.h" #include "desktop/mouse.h" @@ -45,6 +46,8 @@ struct llcache_handle; struct hlcache_handle; struct object_params; struct rect; +struct redraw_context; + /** Status of a content */ typedef enum { @@ -149,7 +152,7 @@ void content_mouse_track(struct hlcache_handle *h, struct browser_window *bw, void content_mouse_action(struct hlcache_handle *h, struct browser_window *bw, browser_mouse_state mouse, int x, int y); bool content_redraw(struct hlcache_handle *h, struct content_redraw_data *data, - const struct rect *clip); + const struct rect *clip, const struct redraw_context *ctx); void content_open(struct hlcache_handle *h, struct browser_window *bw, struct content *page, struct box *box, struct object_params *params); diff --git a/content/content_protected.h b/content/content_protected.h index 688010ec8..bc2079017 100644 --- a/content/content_protected.h +++ b/content/content_protected.h @@ -36,6 +36,8 @@ struct bitmap; struct content; +struct rect; +struct redraw_context; struct content_handler { nserror (*create)(const content_handler *handler, @@ -55,7 +57,8 @@ struct content_handler { void (*mouse_action)(struct content *c, struct browser_window *bw, browser_mouse_state mouse, int x, int y); bool (*redraw)(struct content *c, struct content_redraw_data *data, - const struct rect *clip); + const struct rect *clip, + const struct redraw_context *ctx); void (*open)(struct content *c, struct browser_window *bw, struct content *page, struct box *box, -- cgit v1.2.3