Limit the fix for bug 337135 to the -moz-pre-wrap case only. bug=343390, r+sr=roc

git-svn-id: svn://10.0.0.236/trunk@201480 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
uriber%gmail.com
2006-07-03 07:12:42 +00:00
parent f6e363000b
commit 01ebf6856f

View File

@@ -2919,9 +2919,15 @@ nsTextFrame::PaintUnicodeText(nsPresContext* aPresContext,
nsTextTransformer tx(aPresContext);
PRInt32 textLength;
// In whitespace:-moz-pre-wrap it's possible that we trimmed multiple
// spaces from the end of line because they did not fit in the line.
// In that case, all those spaces need to be removed before painting.
PRBool removeMultipleTrimmedWS = NS_STYLE_WHITESPACE_MOZ_PRE_WRAP == GetStyleText()->mWhiteSpace;
// no need to worry about justification, that's always on the slow path
PrepareUnicodeText(tx, (displaySelection ? &indexBuffer : nsnull),
&paintBuffer, &textLength, PR_FALSE, nsnull, PR_TRUE);
&paintBuffer, &textLength, PR_FALSE, nsnull, removeMultipleTrimmedWS);
PRInt32* ip = indexBuffer.mBuffer;
PRUnichar* text = paintBuffer.mBuffer;