diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2011-10-04 10:23:47 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2011-10-04 10:23:47 +0000 |
commit | 08b42089ca43d7d51166032179b015706ea5c337 (patch) | |
tree | 57137de4dcc9c9373ac45ffddd19cb180c406f48 /render/html.c | |
parent | 170136a4e86fc0fd25a4bba389ae6da584fcba49 (diff) | |
download | netsurf-08b42089ca43d7d51166032179b015706ea5c337.tar.gz netsurf-08b42089ca43d7d51166032179b015706ea5c337.tar.bz2 |
Pass nsurls through html_fetch_object.
svn path=/trunk/netsurf/; revision=12945
Diffstat (limited to 'render/html.c')
-rw-r--r-- | render/html.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/render/html.c b/render/html.c index 9aaa914c4..27fe59424 100644 --- a/render/html.c +++ b/render/html.c @@ -1388,7 +1388,7 @@ nserror html_convert_css_callback(hlcache_handle *css, * \return true on success, false on memory exhaustion */ -bool html_fetch_object(html_content *c, const char *url, struct box *box, +bool html_fetch_object(html_content *c, nsurl *url, struct box *box, content_type permitted_types, int available_width, int available_height, bool background) @@ -1396,7 +1396,6 @@ bool html_fetch_object(html_content *c, const char *url, struct box *box, struct content_html_object *object; hlcache_child_context child; nserror error; - nsurl *object_url; /* If we've already been aborted, don't bother attempting the fetch */ if (c->aborted) @@ -1405,15 +1404,8 @@ bool html_fetch_object(html_content *c, const char *url, struct box *box, child.charset = c->encoding; child.quirks = c->base.quirks; - error = nsurl_create(url, &object_url); - if (error != NSERROR_OK) { - LOG(("failed to normalize url '%s'", url)); - return false; - } - object = talloc(c, struct content_html_object); if (object == NULL) { - nsurl_unref(object_url); return false; } @@ -1424,19 +1416,16 @@ bool html_fetch_object(html_content *c, const char *url, struct box *box, object->permitted_types = permitted_types; object->background = background; - error = hlcache_handle_retrieve(object_url, + error = hlcache_handle_retrieve(url, HLCACHE_RETRIEVE_SNIFF_TYPE, content__get_url(&c->base), NULL, html_object_callback, object, &child, object->permitted_types, &object->content); if (error != NSERROR_OK) { talloc_free(object); - nsurl_unref(object_url); return error != NSERROR_NOMEM; } - nsurl_unref(object_url); - /* add to content object list */ object->next = c->object_list; c->object_list = object; |