summaryrefslogtreecommitdiff
path: root/render/box_construct.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_construct.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_construct.c')
-rw-r--r--render/box_construct.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/render/box_construct.c b/render/box_construct.c
index 63575876e..52c8cfee5 100644
--- a/render/box_construct.c
+++ b/render/box_construct.c
@@ -994,12 +994,15 @@ bool box_construct_element(struct box_construct_ctx *ctx,
return true;
}
- /* Attach box to DOM node */
+ /* Attach DOM node to box */
err = dom_node_set_user_data(ctx->n, kstr_box_key, box, NULL,
(void *) &old_box);
if (err != DOM_NO_ERR)
return false;
+ /* Attach box to DOM node */
+ box->node = dom_node_ref(ctx->n);
+
if (props.inline_container == NULL &&
(box->type == BOX_INLINE ||
box->type == BOX_BR ||