From 36eff6da2bfe5b183c2b4876bb2afe9dedec9b39 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 3 Oct 2011 15:56:47 +0000 Subject: Port more internals to nsurl. Front ends may need updating. svn path=/trunk/netsurf/; revision=12926 --- render/box.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'render/box.c') diff --git a/render/box.c b/render/box.c index 87f1134cf..00ba0852d 100644 --- a/render/box.c +++ b/render/box.c @@ -72,11 +72,10 @@ void *box_style_alloc(void *ptr, size_t len, void *pw) /** * Destructor for box nodes which own styles * - * @param b The box being destroyed. - * @return 0 to allow talloc to continue destroying the tree. + * \param b The box being destroyed. + * \return 0 to allow talloc to continue destroying the tree. */ -static int -free_box_style(struct box *b) +static int box_talloc_destructor(struct box *b) { if ((b->flags & STYLE_OWNED) && b->style != NULL) { css_computed_style_destroy(b->style); @@ -119,10 +118,9 @@ struct box * box_create(css_select_results *styles, css_computed_style *style, if (!box) { return 0; } - - if (style_owned == true || styles != NULL) - talloc_set_destructor(box, free_box_style); - + + talloc_set_destructor(box, box_talloc_destructor); + box->type = BOX_INLINE; box->flags = 0; box->flags = style_owned ? (box->flags | STYLE_OWNED) : box->flags; @@ -935,7 +933,7 @@ void box_dump(FILE *stream, struct box *box, unsigned int depth) fprintf(stream, "space "); if (box->object) { fprintf(stream, "(object '%s') ", - content_get_url(box->object)); + nsurl_access(content_get_url(box->object))); } if (box->iframe) { fprintf(stream, "(iframe) "); -- cgit v1.2.3