diff options
author | Kai Koehne <kai.koehne@qt.io> | 2018-12-14 12:36:22 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2019-02-13 08:14:47 +0000 |
commit | d6c474b49b349dc6c30ea059040285221e712217 (patch) | |
tree | 04dc52f4ef2db85959bfbc51789eea080c6a10d6 /src/gui/text/qtextdocumentfragment.cpp | |
parent | 81fd7f4c8af260d753a834480f790c82fb161889 (diff) |
QTextDocument: Do respect white-space:nowrap
Prevent automatic insertion of line-breaks in blocks formatted with 'white-space:nowrap'.
This follows the example of white-space:pre.
Fixes: QTBUG-54787
Change-Id: If26f6a54106a02fe0e388947f6368ae4e86acf63
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/gui/text/qtextdocumentfragment.cpp')
-rw-r--r-- | src/gui/text/qtextdocumentfragment.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qtextdocumentfragment.cpp b/src/gui/text/qtextdocumentfragment.cpp index e7eaa54a45..6b3604afb5 100644 --- a/src/gui/text/qtextdocumentfragment.cpp +++ b/src/gui/text/qtextdocumentfragment.cpp @@ -1139,7 +1139,8 @@ QTextHtmlImporter::ProcessNodeResult QTextHtmlImporter::processBlockNode() // #################### // block.setFloatPosition(node->cssFloat); - if (wsm == QTextHtmlParserNode::WhiteSpacePre) { + if (wsm == QTextHtmlParserNode::WhiteSpacePre + || wsm == QTextHtmlParserNode::WhiteSpaceNoWrap) { block.setNonBreakableLines(true); modifiedBlockFormat = true; } |