diff options
Diffstat (limited to 'render/html_object.c')
-rw-r--r-- | render/html_object.c | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/render/html_object.c b/render/html_object.c index e20cd6d63..e98bdba0b 100644 --- a/render/html_object.c +++ b/render/html_object.c @@ -125,7 +125,9 @@ html_object_callback(hlcache_handle *object, struct box *box; box = o->box; - if (box == NULL && event->type != CONTENT_MSG_ERROR) { + if (box == NULL && + event->type != CONTENT_MSG_ERROR && + event->type != CONTENT_MSG_ERRORCODE) { return NSERROR_OK; } @@ -158,7 +160,7 @@ html_object_callback(hlcache_handle *object, case CONTENT_MSG_DONE: c->base.active--; - LOG("%d fetches active", c->base.active); + NSLOG(netsurf, INFO, "%d fetches active", c->base.active); html_object_done(box, object, o->background); @@ -177,10 +179,11 @@ html_object_callback(hlcache_handle *object, data.redraw.height = box->height; data.redraw.full_redraw = true; - content_broadcast(&c->base, CONTENT_MSG_REDRAW, data); + content_broadcast(&c->base, CONTENT_MSG_REDRAW, &data); } break; + case CONTENT_MSG_ERRORCODE: case CONTENT_MSG_ERROR: hlcache_handle_release(object); @@ -188,7 +191,8 @@ html_object_callback(hlcache_handle *object, if (box != NULL) { c->base.active--; - LOG("%d fetches active", c->base.active); + NSLOG(netsurf, INFO, "%d fetches active", + c->base.active); content_add_error(&c->base, "?", 0); html_object_failed(box, c, o->background); @@ -276,7 +280,7 @@ html_object_callback(hlcache_handle *object, data.redraw.object_y += y; content_broadcast(&c->base, - CONTENT_MSG_REDRAW, data); + CONTENT_MSG_REDRAW, &data); break; } else { @@ -315,7 +319,7 @@ html_object_callback(hlcache_handle *object, data.redraw.object_y += y + box->padding[TOP]; } - content_broadcast(&c->base, CONTENT_MSG_REDRAW, data); + content_broadcast(&c->base, CONTENT_MSG_REDRAW, &data); } break; @@ -354,7 +358,7 @@ html_object_callback(hlcache_handle *object, msg_data.dragsave.content = event->data.dragsave.content; - content_broadcast(&c->base, CONTENT_MSG_DRAGSAVE, msg_data); + content_broadcast(&c->base, CONTENT_MSG_DRAGSAVE, &msg_data); } break; @@ -364,7 +368,7 @@ html_object_callback(hlcache_handle *object, case CONTENT_MSG_GADGETCLICK: /* These messages are for browser window layer. * we're not interested, so pass them on. */ - content_broadcast(&c->base, event->type, event->data); + content_broadcast(&c->base, event->type, &event->data); break; case CONTENT_MSG_CARET: @@ -437,7 +441,8 @@ html_object_callback(hlcache_handle *object, c->base.active == 0 && (event->type == CONTENT_MSG_LOADING || event->type == CONTENT_MSG_DONE || - event->type == CONTENT_MSG_ERROR)) { + event->type == CONTENT_MSG_ERROR || + event->type == CONTENT_MSG_ERRORCODE)) { /* all objects have arrived */ content__reformat(&c->base, false, c->base.available_width, c->base.height); @@ -499,7 +504,8 @@ static bool html_replace_object(struct content_html_object *object, nsurl *url) /* remove existing object */ if (content_get_status(object->content) != CONTENT_STATUS_DONE) { c->base.active--; - LOG("%d fetches active", c->base.active); + NSLOG(netsurf, INFO, "%d fetches active", + c->base.active); } hlcache_handle_release(object->content); @@ -520,7 +526,7 @@ static bool html_replace_object(struct content_html_object *object, nsurl *url) for (page = c; page != NULL; page = page->page) { page->base.active++; - LOG("%d fetches active", c->base.active); + NSLOG(netsurf, INFO, "%d fetches active", c->base.active); page->base.status = CONTENT_STATUS_READY; } @@ -603,7 +609,8 @@ nserror html_object_abort_objects(html_content *htmlc) object->content = NULL; if (object->box != NULL) { htmlc->base.active--; - LOG("%d fetches active", htmlc->base.active); + NSLOG(netsurf, INFO, "%d fetches active", + htmlc->base.active); } break; @@ -641,7 +648,7 @@ nserror html_object_free_objects(html_content *html) struct content_html_object *victim = html->object_list; if (victim->content != NULL) { - LOG("object %p", victim->content); + NSLOG(netsurf, INFO, "object %p", victim->content); if (content_get_type(victim->content) == CONTENT_HTML) { guit->misc->schedule(-1, html_object_refresh, victim); @@ -703,7 +710,7 @@ bool html_fetch_object(html_content *c, nsurl *url, struct box *box, c->num_objects++; if (box != NULL) { c->base.active++; - LOG("%d fetches active", c->base.active); + NSLOG(netsurf, INFO, "%d fetches active", c->base.active); } return true; |