mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-23 14:59:47 +03:00
An INLINE_CONTAINER which contains a TEXT which is zero chars long but *is* in a PRE white-space rule *DOES* contain a text child.
svn path=/trunk/netsurf/; revision=3672
This commit is contained in:
parent
6ee6a8c8dc
commit
23781fb862
@ -892,9 +892,13 @@ bool layout_inline_container(struct box *inline_container, int width,
|
||||
inline_container, width, cont, cx, cy));
|
||||
|
||||
has_text_children = false;
|
||||
for (c = inline_container->children; c; c = c->next)
|
||||
if ((!c->object && c->text && c->length) || c->type == BOX_BR)
|
||||
has_text_children = true;
|
||||
for (c = inline_container->children; c; c = c->next) {
|
||||
bool is_pre = (c->style->white_space == CSS_WHITE_SPACE_PRE ||
|
||||
c->style->white_space == CSS_WHITE_SPACE_PRE_LINE ||
|
||||
c->style->white_space == CSS_WHITE_SPACE_PRE_WRAP);
|
||||
if ((!c->object && c->text && (c->length || is_pre)) || c->type == BOX_BR)
|
||||
has_text_children = true;
|
||||
}
|
||||
|
||||
/** \todo fix wrapping so that a box with horizontal scrollbar will shrink back to 'width' if no word is wider than 'width' (Or just set curwidth = width and have the multiword lines wrap to the min width) */
|
||||
for (c = inline_container->children; c; ) {
|
||||
|
Loading…
Reference in New Issue
Block a user