[project @ 2005-02-04 19:41:59 by jmb]

Prevent assertion failure on pages with white-space: pre-wrap / pre-line

svn path=/import/netsurf/; revision=1492
This commit is contained in:
John Mark Bell 2005-02-04 19:41:59 +00:00
parent b07582615b
commit 430d7bc1ae

View File

@ -578,7 +578,12 @@ bool convert_xml_to_box(xmlNode *n, struct content *content,
/* white-space: pre */ /* white-space: pre */
char *text = cnv_space2nbsp(n->content); char *text = cnv_space2nbsp(n->content);
char *current; char *current;
assert(parent_style->white_space == CSS_WHITE_SPACE_PRE); /* note: pre-wrap/pre-line are unimplemented */
assert(parent_style->white_space == CSS_WHITE_SPACE_PRE ||
parent_style->white_space ==
CSS_WHITE_SPACE_PRE_LINE ||
parent_style->white_space ==
CSS_WHITE_SPACE_PRE_WRAP);
if (!text) if (!text)
goto no_memory; goto no_memory;
if (parent_style->text_transform != CSS_TEXT_TRANSFORM_NONE) if (parent_style->text_transform != CSS_TEXT_TRANSFORM_NONE)