aboutsummaryrefslogtreecommitdiff
path: root/src/html.cc
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2011-10-06 20:40:43 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2011-10-06 20:40:43 +0200
commitf4bffc0a8a3c3b02359d41b7357267e4c883de17 (patch)
treeb4035b07795a02302b7e141d43e34025dcd425a6 /src/html.cc
parent5ba40db6e4f45bb735fd4fc028b13439cba02d33 (diff)
rework line breaking and fix white-space:nowrap handling
Diffstat (limited to 'src/html.cc')
-rw-r--r--src/html.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/html.cc b/src/html.cc
index a50a183f..9f3f048b 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -1107,6 +1107,8 @@ static void Html_process_space(DilloHtml *html, const char *space,
}
if (spaceCnt) {
+ // add break possibility for the white-space:pre-wrap case
+ HT2TB(html)->addBreakOption (html->styleEngine->wordStyle ());
spc = dStrnfill(spaceCnt, ' ');
HT2TB(html)->addText (spc, spaceCnt, html->styleEngine->wordStyle ());
dFree(spc);
@@ -1208,10 +1210,12 @@ static void Html_process_word(DilloHtml *html, const char *word, int size)
Html_process_space(html, word2 + start, i - start);
} else if (!strncmp(word2+i, utf8_zero_width_space, 3)) {
i += 3;
+ HT2TB(html)->addBreakOption(html->styleEngine->wordStyle ());
} else if (a_Utf8_ideographic(word2+i, beyond_word2, &len)) {
i += len;
HT2TB(html)->addText(word2 + start, i - start,
html->styleEngine->wordStyle ());
+ HT2TB(html)->addBreakOption(html->styleEngine->wordStyle ());
} else {
do {
i += len;