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
Родитель 0528089f8d
Коммит ca76f69d6c
1 изменённых файлов: 3 добавлений и 14 удалений

Просмотреть файл

@ -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();