[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:
parent
f9d5c0f7c8
commit
49fdeafbbf
|
@ -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 */
|
/* 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) {
|
for (x = x_previous = 0, b = first; x <= x1 - x0 && b; b = b->next) {
|
||||||
if (b->type == BOX_INLINE || b->type == BOX_INLINE_BLOCK) {
|
if (b->type == BOX_INLINE || b->type == BOX_INLINE_BLOCK) {
|
||||||
|
assert(b->width != UNKNOWN_WIDTH);
|
||||||
|
|
||||||
x_previous = x;
|
x_previous = x;
|
||||||
x += space_after;
|
x += space_after;
|
||||||
b->x = x;
|
b->x = x;
|
||||||
|
|
Loading…
Reference in New Issue