diff options
author | James Bursa <james@netsurf-browser.org> | 2002-05-21 21:32:35 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2002-05-21 21:32:35 +0000 |
commit | 16f1b4d913430975e1c52077a110c483cbf570cc (patch) | |
tree | d985834cb107d009213a5c68f3d2ab276189c969 /render/layout.c | |
parent | f78fab56c779effaa4d859c99f8585ccf46f9033 (diff) | |
download | netsurf-16f1b4d913430975e1c52077a110c483cbf570cc.tar.gz netsurf-16f1b4d913430975e1c52077a110c483cbf570cc.tar.bz2 |
[project @ 2002-05-21 21:32:35 by bursa]
Start of float implementation.
svn path=/import/netsurf/; revision=18
Diffstat (limited to 'render/layout.c')
-rw-r--r-- | render/layout.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/render/layout.c b/render/layout.c index d02c44926..0070d6b95 100644 --- a/render/layout.c +++ b/render/layout.c @@ -1,5 +1,5 @@ /** - * $Id: layout.c,v 1.3 2002/05/18 08:23:39 bursa Exp $ + * $Id: layout.c,v 1.4 2002/05/21 21:32:35 bursa Exp $ */ #include <assert.h> @@ -118,6 +118,15 @@ void layout_inline_container(struct box * box, unsigned long width) struct font_split split; for (c = box->children; c != 0; ) { + if (c->type == BOX_FLOAT) { + layout_block(c, width); + c->x = 0; + c->y = y; + c = c->next; + continue; + } + + assert(c->type == BOX_INLINE); split = font_split(0, c->font, c->text, width - x, x == 0); if (*(split.end) == 0) { /* fits into this line */ @@ -132,9 +141,6 @@ void layout_inline_container(struct box * box, unsigned long width) /* doesn't fit at all: move down a line */ x = 0; y += 30; - /*c->width = font_split(0, c->font, c->text, (width-x)/20+1, &end)*20; - if (end == c->text) end = strchr(c->text, ' '); - if (end == 0) end = c->text + 1;*/ } else { /* split into two lines */ c->x = x; |