diff options
author | James Bursa <james@netsurf-browser.org> | 2005-07-31 21:57:07 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2005-07-31 21:57:07 +0000 |
commit | 0ba79e1ad41feb944b2ac81521f8343137cb6ddc (patch) | |
tree | cc1a71bfb940bf8b584a7f895a489fe3a5e7f1cd /render/layout.c | |
parent | f4851eb142296939efc02467e80f42b6fbf47bf7 (diff) | |
download | netsurf-0ba79e1ad41feb944b2ac81521f8343137cb6ddc.tar.gz netsurf-0ba79e1ad41feb944b2ac81521f8343137cb6ddc.tar.bz2 |
[project @ 2005-07-31 21:57:07 by bursa]
Implement clear on <br>.
svn path=/import/netsurf/; revision=1834
Diffstat (limited to 'render/layout.c')
-rw-r--r-- | render/layout.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/render/layout.c b/render/layout.c index 97bfdb71c..dc1111d70 100644 --- a/render/layout.c +++ b/render/layout.c @@ -1431,7 +1431,18 @@ bool layout_line(struct box *first, int width, int *y, } assert(b != first || (move_y && 0 < used_height && (left || right))); - if (move_y) *y += used_height; + + /* handle clearance for br */ + if (b->prev->type == BOX_BR && + b->prev->style->clear != CSS_CLEAR_NONE) { + int clear_y = layout_clear(cont->float_children, + b->prev->style->clear); + if (used_height < clear_y - cy) + used_height = clear_y - cy; + } + + if (move_y) + *y += used_height; *next_box = b; return true; } |