summaryrefslogtreecommitdiff
path: root/render/box.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2012-11-30 12:29:54 +0000
committerVincent Sanders <vince@netsurf-browser.org>2012-11-30 12:29:54 +0000
commit31c9ffb4b51b79394f882e5efed629c2df0600d9 (patch)
treedcd4c81e3d94c6511ec09989d92c2e2305d1864d /render/box.c
parent61872ab3a493d60ede0e5ca2221b4c5c94708171 (diff)
downloadnetsurf-31c9ffb4b51b79394f882e5efed629c2df0600d9.tar.gz
netsurf-31c9ffb4b51b79394f882e5efed629c2df0600d9.tar.bz2
make boxes keep reference to the DOM node that causes them
Diffstat (limited to 'render/box.c')
-rw-r--r--render/box.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/render/box.c b/render/box.c
index b9d059858..5dfada0c0 100644
--- a/render/box.c
+++ b/render/box.c
@@ -92,9 +92,14 @@ static int box_talloc_destructor(struct box *b)
if (b->href != NULL)
nsurl_unref(b->href);
- if (b->id != NULL)
+ if (b->id != NULL) {
lwc_string_unref(b->id);
-
+ }
+
+ if (b->node != NULL) {
+ dom_node_unref(b->node);
+ }
+
return 0;
}
@@ -172,6 +177,7 @@ struct box * box_create(css_select_results *styles, css_computed_style *style,
box->object = NULL;
box->object_params = NULL;
box->iframe = NULL;
+ box->node = NULL;
return box;
}