diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-03-08 14:13:27 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-03-09 15:37:40 +0000 |
commit | 87f6314dabdc2067a19e01f8b29f9ecc38ed825b (patch) | |
tree | 78f8f8395e3bf3b7ee2c18a7b5a5e6d2d5ca9ddc /render/html_object.c | |
parent | fb9b171e325488dc9792ee0f3062f15d8ec597ee (diff) | |
download | netsurf-87f6314dabdc2067a19e01f8b29f9ecc38ed825b.tar.gz netsurf-87f6314dabdc2067a19e01f8b29f9ecc38ed825b.tar.bz2 |
move scheduleing into browser operation table
Diffstat (limited to 'render/html_object.c')
-rw-r--r-- | render/html_object.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/render/html_object.c b/render/html_object.c index e76919dd4..6499f249a 100644 --- a/render/html_object.c +++ b/render/html_object.c @@ -31,12 +31,13 @@ #include "css/utils.h" #include "utils/nsoption.h" #include "desktop/scrollbar.h" -#include "render/box.h" -#include "render/html_internal.h" +#include "desktop/gui_factory.h" #include "utils/corestrings.h" #include "utils/config.h" #include "utils/log.h" -#include "utils/schedule.h" + +#include "render/box.h" +#include "render/html_internal.h" /* break reference loop */ static void html_object_refresh(void *p); @@ -335,7 +336,7 @@ html_object_callback(hlcache_handle *object, case CONTENT_MSG_REFRESH: if (content_get_type(object) == CONTENT_HTML) { /* only for HTML objects */ - schedule(event->data.delay * 100, + guit->browser->schedule(event->data.delay * 1000, html_object_refresh, o); } @@ -534,7 +535,7 @@ static bool html_replace_object(struct content_html_object *object, nsurl *url) } /** - * schedule() callback for object refresh + * schedule callback for object refresh */ static void html_object_refresh(void *p) @@ -630,8 +631,9 @@ nserror html_object_close_objects(html_content *html) if (content_get_type(object->content) == CONTENT_NONE) continue; - if (content_get_type(object->content) == CONTENT_HTML) - schedule_remove(html_object_refresh, object); + if (content_get_type(object->content) == CONTENT_HTML) { + guit->browser->schedule(-1, html_object_refresh, object); + } content_close(object->content); } @@ -646,9 +648,9 @@ nserror html_object_free_objects(html_content *html) if (victim->content != NULL) { LOG(("object %p", victim->content)); - if (content_get_type(victim->content) == CONTENT_HTML) - schedule_remove(html_object_refresh, victim); - + if (content_get_type(victim->content) == CONTENT_HTML) { + guit->browser->schedule(-1, html_object_refresh, victim); + } hlcache_handle_release(victim->content); } |