diff options
author | James Bursa <james@netsurf-browser.org> | 2005-06-05 20:54:37 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2005-06-05 20:54:37 +0000 |
commit | 57b68bd9332f4c1636073ab8dd10a3ce50a173cf (patch) | |
tree | 8323cb6b6ed9a63b75751c6fa892c6f927c2c833 /render/box.c | |
parent | 99a483dd7b744ede170eeffde5ec30fd8ed1a0e5 (diff) | |
download | netsurf-57b68bd9332f4c1636073ab8dd10a3ce50a173cf.tar.gz netsurf-57b68bd9332f4c1636073ab8dd10a3ce50a173cf.tar.bz2 |
[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
Diffstat (limited to 'render/box.c')
-rw-r--r-- | render/box.c | 11 |
1 files changed, 7 insertions, 4 deletions
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) |