Don't strip trailing whitespace otherwise underlines render wrong; set max element width properly when not wrapping

This commit is contained in:
kipp 1998-06-06 01:54:20 +00:00
parent 0528089f8d
commit ca76f69d6c

View File

@ -525,13 +525,6 @@ void TextFrame::PaintRegularText(nsIPresContext& aPresContext,
col++;
}
// Strip trailing whitespace
if (s != s0) {
if (s[-1] == ' ') {
s--;
}
}
// Get Selection Object
nsIPresShell * shell = aPresContext.GetShell();
nsIDocument * doc = shell->GetDocument();
@ -603,13 +596,6 @@ void TextFrame::PaintRegularText(nsIPresContext& aPresContext,
}
}
// Strip trailing whitespace
if (s != s0) {
if (s[-1] == ' ') {
s--;
}
}
// Get Selection Object
nsIPresShell * shell = aPresContext.GetShell();
nsIDocument * doc = shell->GetDocument();
@ -988,6 +974,9 @@ TextFrame::ReflowNormal(nsIPresContext* aCX,
aDesiredSize.height = fm->GetHeight();
aDesiredSize.ascent = fm->GetMaxAscent();
aDesiredSize.descent = fm->GetMaxDescent();
if ((nsnull != aLineState) && aLineState->mNoWrap) {
maxWordWidth = x;
}
if (nsnull != aMaxElementSize) {
aMaxElementSize->width = maxWordWidth;
aMaxElementSize->height = fm->GetHeight();