From 57b68bd9332f4c1636073ab8dd10a3ce50a173cf Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sun, 5 Jun 2005 20:54:37 +0000 Subject: [project @ 2005-06-05 20:54:37 by bursa] More work on borders / padding / margins on inline elements. Add BOX_INLINE_END to hold the right border / padding / margin (left is in the BOX_INLINE). svn path=/import/netsurf/; revision=1742 --- render/box.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'render/box.c') diff --git a/render/box.c b/render/box.c index b53ae2b2b..c6e1702d5 100644 --- a/render/box.c +++ b/render/box.c @@ -76,7 +76,7 @@ struct box * box_create(struct css_style *style, box->last = NULL; box->parent = NULL; box->fallback = NULL; - box->end_inline_children = NULL; + box->inline_end = NULL; box->float_children = NULL; box->next_float = NULL; box->col = NULL; @@ -100,6 +100,9 @@ struct box * box_create(struct css_style *style, void box_add_child(struct box *parent, struct box *child) { + assert(parent); + assert(child); + if (parent->children != 0) { /* has children already */ parent->last->next = child; child->prev = parent->last; @@ -447,6 +450,7 @@ void box_dump(struct box *box, unsigned int depth) case BOX_BLOCK: fprintf(stderr, "BLOCK "); break; case BOX_INLINE_CONTAINER: fprintf(stderr, "INLINE_CONTAINER "); break; case BOX_INLINE: fprintf(stderr, "INLINE "); break; + case BOX_INLINE_END: fprintf(stderr, "INLINE_END "); break; case BOX_INLINE_BLOCK: fprintf(stderr, "INLINE_BLOCK "); break; case BOX_TABLE: fprintf(stderr, "TABLE [columns %i] ", box->columns); break; @@ -476,9 +480,8 @@ void box_dump(struct box *box, unsigned int depth) fprintf(stderr, " [%s]", box->title); if (box->id != 0) fprintf(stderr, " <%s>", box->id); - if (box->type == BOX_INLINE) - fprintf(stderr, " end_inline_children %p", - box->end_inline_children); + if (box->type == BOX_INLINE || box->type == BOX_INLINE_END) + fprintf(stderr, " inline_end %p", box->inline_end); if (box->float_children) fprintf(stderr, " float_children %p", box->float_children); if (box->next_float) -- cgit v1.2.3