diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/content.c | 10 | ||||
-rw-r--r-- | content/content.h | 5 | ||||
-rw-r--r-- | content/content_protected.h | 3 |
3 files changed, 13 insertions, 5 deletions
diff --git a/content/content.c b/content/content.c index e4fbcc86d..0517240dc 100644 --- a/content/content.c +++ b/content/content.c @@ -329,12 +329,15 @@ void content_set_done(struct content *c) * Calls the reformat function for the content. */ -void content_reformat(hlcache_handle *h, int width, int height) +void content_reformat(hlcache_handle *h, bool background, + int width, int height) { - content__reformat(hlcache_handle_get_content(h), width, height); + content__reformat(hlcache_handle_get_content(h), background, + width, height); } -void content__reformat(struct content *c, int width, int height) +void content__reformat(struct content *c, bool background, + int width, int height) { union content_msg_data data; assert(c != 0); @@ -346,6 +349,7 @@ void content__reformat(struct content *c, int width, int height) c->available_width = width; if (c->handler->reformat != NULL) { c->handler->reformat(c, width, height); + data.background = background; content_broadcast(c, CONTENT_MSG_REFORMAT, data); } c->locked = false; diff --git a/content/content.h b/content/content.h index 0efdf443f..636da4e23 100644 --- a/content/content.h +++ b/content/content.h @@ -88,6 +88,8 @@ union content_msg_data { int object_width, object_height; } redraw; int delay; /**< Minimum delay, for CONTENT_MSG_REFRESH */ + /** Reformat should not cause a redraw, for CONTENT_MSG_REFORMAT */ + bool background; /** Low-level cache handle, for CONTENT_MSG_DOWNLOAD */ struct llcache_handle *download; }; @@ -117,7 +119,8 @@ nserror content_abort(struct content *c); /* Client functions */ bool content_can_reformat(struct hlcache_handle *h); -void content_reformat(struct hlcache_handle *h, int width, int height); +void content_reformat(struct hlcache_handle *h, bool background, + int width, int height); void content_request_redraw(struct hlcache_handle *h, int x, int y, int width, int height); void content_mouse_track(struct hlcache_handle *h, struct browser_window *bw, diff --git a/content/content_protected.h b/content/content_protected.h index 144136df4..5f8081017 100644 --- a/content/content_protected.h +++ b/content/content_protected.h @@ -152,7 +152,8 @@ void content_broadcast(struct content *c, content_msg msg, void content_add_error(struct content *c, const char *token, unsigned int line); -void content__reformat(struct content *c, int width, int height); +void content__reformat(struct content *c, bool background, + int width, int height); bool content__set_title(struct content *c, const char *title); |