summaryrefslogtreecommitdiff
path: root/render/box.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2005-01-01 22:05:21 +0000
committerJames Bursa <james@netsurf-browser.org>2005-01-01 22:05:21 +0000
commit7a71363d767f88f54e80e4bbe07eaef54e6fbbee (patch)
treec4a04c6cef960ad4a7cf1d510bb040c622074c18 /render/box.c
parentff8dc1f9d60c67f60c118175e385153fbdb06fa3 (diff)
downloadnetsurf-7a71363d767f88f54e80e4bbe07eaef54e6fbbee.tar.gz
netsurf-7a71363d767f88f54e80e4bbe07eaef54e6fbbee.tar.bz2
[project @ 2005-01-01 22:05:20 by bursa]
xcalloc/xrealloc/xstrdup-purge week, part 5. Improve and simplify encoding detection. svn path=/import/netsurf/; revision=1416
Diffstat (limited to 'render/box.c')
-rw-r--r--render/box.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/render/box.c b/render/box.c
index 131060dde..bf055eac4 100644
--- a/render/box.c
+++ b/render/box.c
@@ -731,8 +731,9 @@ end:
if (!url)
return false;
/* start fetch */
- html_fetch_object(content, url, box, image_types,
- content->available_width, 1000, true);
+ if (!html_fetch_object(content, url, box, image_types,
+ content->available_width, 1000, true))
+ return false;
}
return true;
@@ -1120,8 +1121,9 @@ struct box_result box_image(xmlNode *n, struct box_status *status,
return (struct box_result) {box, false, false};
/* start fetch */
- html_fetch_object(status->content, url, box, image_types,
- status->content->available_width, 1000, false);
+ if (!html_fetch_object(status->content, url, box, image_types,
+ status->content->available_width, 1000, false))
+ return (struct box_result) {0, false, true};
return (struct box_result) {box, false, false};
}
@@ -1551,10 +1553,11 @@ struct box_result box_input(xmlNode *n, struct box_status *status,
*/
if (res == URL_FUNC_OK &&
strcasecmp(url, status->content->data.html.base_url) != 0)
- html_fetch_object(status->content, url, box,
+ if (!html_fetch_object(status->content, url, box,
image_types,
status->content->available_width,
- 1000, false);
+ 1000, false))
+ goto no_memory;
xmlFree(s);
}
@@ -2942,7 +2945,8 @@ bool plugin_decode(struct content* content, char* url, struct box* box,
* handle when we fetch it (if the type was not specified or is
* different to that given in the attributes).
*/
- html_fetch_object(content, url, box, 0, 1000, 1000, false);
+ if (!html_fetch_object(content, url, box, 0, 1000, 1000, false))
+ return false;
return true;
}
@@ -3152,8 +3156,10 @@ struct box_result box_frameset(xmlNode *n, struct box_status *status,
LOG(("frame, url '%s'", url));
- html_fetch_object(status->content, url, object_box, 0,
- object_width, object_height, false);
+ if (!html_fetch_object(status->content, url,
+ object_box, 0,
+ object_width, object_height, false))
+ return (struct box_result) {0, false, true};
xmlFree(s);
c = c->next;