From edef40bbc432c092b1e5f4f6f5d408180ba188b3 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 20 Aug 2012 14:22:28 +0100 Subject: Don't pass struct box to content open. --- content/content.c | 6 ++---- content/content.h | 4 +--- content/content_protected.h | 4 +--- desktop/browser.c | 2 +- render/html.c | 3 --- render/textplain.c | 6 ++---- 6 files changed, 7 insertions(+), 18 deletions(-) diff --git a/content/content.c b/content/content.c index e78ead295..57d370848 100644 --- a/content/content.c +++ b/content/content.c @@ -670,22 +670,20 @@ void content_broadcast(struct content *c, content_msg msg, * \param bw browser window containing the content * \param page content of type CONTENT_HTML containing c, or 0 if not an * object within a page - * \param box box containing c, or 0 if not an object * \param params object parameters, or 0 if not an object * * Calls the open function for the content. */ void content_open(hlcache_handle *h, struct browser_window *bw, - struct content *page, struct box *box, - struct object_params *params) + struct content *page, struct object_params *params) { struct content *c = hlcache_handle_get_content(h); assert(c != 0); LOG(("content %p %s", c, nsurl_access(llcache_handle_get_url(c->llcache)))); if (c->handler->open != NULL) - c->handler->open(c, bw, page, box, params); + c->handler->open(c, bw, page, params); } diff --git a/content/content.h b/content/content.h index 8987e2cdf..562bcd798 100644 --- a/content/content.h +++ b/content/content.h @@ -40,7 +40,6 @@ #include "desktop/mouse.h" #include "desktop/plot_style.h" -struct box; struct browser_window; struct content; struct llcache_handle; @@ -218,8 +217,7 @@ void content_mouse_action(struct hlcache_handle *h, struct browser_window *bw, bool content_redraw(struct hlcache_handle *h, struct content_redraw_data *data, 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); + struct content *page, struct object_params *params); void content_close(struct hlcache_handle *h); struct selection *content_get_selection(struct hlcache_handle *h); void content_get_contextual_content(struct hlcache_handle *h, diff --git a/content/content_protected.h b/content/content_protected.h index e37573493..a52a51be9 100644 --- a/content/content_protected.h +++ b/content/content_protected.h @@ -62,9 +62,7 @@ struct content_handler { const struct rect *clip, const struct redraw_context *ctx); void (*open)(struct content *c, struct browser_window *bw, - struct content *page, - struct box *box, - struct object_params *params); + struct content *page, struct object_params *params); void (*close)(struct content *c); struct selection * (*get_selection)(struct content *c); void (*get_contextual_content)(struct content *c, int x, int y, diff --git a/desktop/browser.c b/desktop/browser.c index 3fe16f54c..a721d7358 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -1247,7 +1247,7 @@ nserror browser_window_callback(hlcache_handle *c, /* new content; set scroll_to_top */ browser_window_update(bw, true); - content_open(c, bw, 0, 0, 0); + content_open(c, bw, 0, 0); browser_window_set_status(bw, content_get_status_message(c)); /* history */ diff --git a/render/html.c b/render/html.c index 79ca02603..0dde26b9b 100644 --- a/render/html.c +++ b/render/html.c @@ -1119,7 +1119,6 @@ html_object_callback(hlcache_handle *object, if (c->base.status != CONTENT_STATUS_LOADING && c->bw != NULL) content_open(object, c->bw, &c->base, - box, box->object_params); break; @@ -2554,7 +2553,6 @@ static void html_open(struct content *c, struct browser_window *bw, struct content *page, - struct box *box, struct object_params *params) { html_content *html = (html_content *) c; @@ -2577,7 +2575,6 @@ html_open(struct content *c, content_open(object->content, bw, c, - object->box, object->box->object_params); } } diff --git a/render/textplain.c b/render/textplain.c index 78539b47d..1877f32eb 100644 --- a/render/textplain.c +++ b/render/textplain.c @@ -113,8 +113,7 @@ static void textplain_destroy(struct content *c); static bool textplain_redraw(struct content *c, struct content_redraw_data *data, const struct rect *clip, const struct redraw_context *ctx); static void textplain_open(struct content *c, struct browser_window *bw, - struct content *page, struct box *box, - struct object_params *params); + struct content *page, struct object_params *params); void textplain_close(struct content *c); struct selection *textplain_get_selection(struct content *c); struct search_context *textplain_get_search(struct content *c); @@ -855,8 +854,7 @@ bool textplain_redraw(struct content *c, struct content_redraw_data *data, */ void textplain_open(struct content *c, struct browser_window *bw, - struct content *page, struct box *box, - struct object_params *params) + struct content *page, struct object_params *params) { textplain_content *text = (textplain_content *) c; -- cgit v1.2.3