summaryrefslogtreecommitdiff
path: root/content/handlers/html/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'content/handlers/html/html.c')
-rw-r--r--content/handlers/html/html.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/content/handlers/html/html.c b/content/handlers/html/html.c
index 6e389abe3..c7a9afebd 100644
--- a/content/handlers/html/html.c
+++ b/content/handlers/html/html.c
@@ -268,13 +268,31 @@ static void html_box_convert_done(html_content *c, bool success)
content_set_ready(&c->base);
- if (c->base.active == 0) {
- content_set_done(&c->base);
- }
+ html_proceed_to_done(c);
dom_node_unref(html);
}
+/* Documented in html_internal.h */
+nserror
+html_proceed_to_done(html_content *html)
+{
+ switch (content__get_status(&html->base)) {
+ case CONTENT_STATUS_READY:
+ if (html->base.active == 0) {
+ content_set_done(&html->base);
+ return NSERROR_OK;
+ }
+ break;
+ case CONTENT_STATUS_DONE:
+ return NSERROR_OK;
+ default:
+ NSLOG(netsurf, ERROR, "Content status unexpectedly not READY/DONE");
+ break;
+ }
+ return NSERROR_UNKNOWN;
+}
+
/** process link node */
static bool html_process_link(html_content *c, dom_node *node)