summaryrefslogtreecommitdiff
path: root/render/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/html.c')
-rw-r--r--render/html.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/render/html.c b/render/html.c
index d9e6c4834..205469934 100644
--- a/render/html.c
+++ b/render/html.c
@@ -274,6 +274,7 @@ nserror html_create_html_data(html_content *c, const http_parameter *params)
c->stylesheet_count = 0;
c->stylesheets = NULL;
c->select_ctx = NULL;
+ c->universal = NULL;
c->num_objects = 0;
c->object_list = NULL;
c->forms = NULL;
@@ -286,6 +287,11 @@ nserror html_create_html_data(html_content *c, const http_parameter *params)
c->font_func = &nsfont;
c->scrollbar = NULL;
+ if (lwc_intern_string("*", SLEN("*"), &c->universal) != lwc_error_ok) {
+ error = BINDING_NOMEM;
+ goto error;
+ }
+
selection_prepare(&c->sel, (struct content *)c, true);
nerror = http_parameter_list_find_item(params, html_charset, &charset);
@@ -329,6 +335,16 @@ error:
content_broadcast(&c->base, CONTENT_MSG_ERROR, msg_data);
+ if (c->universal != NULL) {
+ lwc_string_unref(c->universal);
+ c->universal = NULL;
+ }
+
+ if (c->base_url != NULL) {
+ nsurl_unref(c->base_url);
+ c->base_url = NULL;
+ }
+
return nerror;
}
@@ -1979,6 +1995,11 @@ void html_destroy(struct content *c)
html->select_ctx = NULL;
}
+ if (html->universal != NULL) {
+ lwc_string_unref(html->universal);
+ html->universal = NULL;
+ }
+
/* Free stylesheets */
for (i = 0; i != html->stylesheet_count; i++) {
if (html->stylesheets[i].type == HTML_STYLESHEET_EXTERNAL &&