From 31c9ffb4b51b79394f882e5efed629c2df0600d9 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 30 Nov 2012 12:29:54 +0000 Subject: make boxes keep reference to the DOM node that causes them --- render/box.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'render/box.c') 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; } -- cgit v1.2.3