mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 14:45:29 +00:00
Don't strip trailing whitespace otherwise underlines render wrong; set max element width properly when not wrapping
This commit is contained in:
parent
0528089f8d
commit
ca76f69d6c
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user