[project @ 2005-04-09 13:25:54 by bursa]

Add an assert() to layout_line() to help detect bugs.

svn path=/import/netsurf/; revision=1614
This commit is contained in:
James Bursa 2005-04-09 13:25:54 +00:00
parent f9d5c0f7c8
commit 49fdeafbbf
1 changed files with 2 additions and 0 deletions

View File

@ -903,6 +903,8 @@ bool layout_line(struct box *first, int width, int *y,
/* pass 2: place boxes in line: loop body executed at least once */
for (x = x_previous = 0, b = first; x <= x1 - x0 && b; b = b->next) {
if (b->type == BOX_INLINE || b->type == BOX_INLINE_BLOCK) {
assert(b->width != UNKNOWN_WIDTH);
x_previous = x;
x += space_after;
b->x = x;