Not part of the build. Don't trim whitespace if wrapping is disabled. Don't compress a space that's preceded by an incompressible space.
This commit is contained in:
@@ -1398,6 +1398,11 @@ BuildTextRunsScanner::BuildTextRunForFrames(void* aTextBuffer)
|
|||||||
aTextBuffer = end;
|
aTextBuffer = end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// In CSS 2.1, we do not compress a space that is preceded by a non-compressible
|
||||||
|
// space.
|
||||||
|
if (!compressWhitespace) {
|
||||||
|
mTrimNextRunLeadingWhitespace = PR_FALSE;
|
||||||
|
}
|
||||||
textFlags |= analysisFlags;
|
textFlags |= analysisFlags;
|
||||||
|
|
||||||
currentTransformedTextOffset =
|
currentTransformedTextOffset =
|
||||||
@@ -4899,7 +4904,8 @@ nsTextFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
PRBool usedHyphenation;
|
PRBool usedHyphenation;
|
||||||
gfxFloat trimmedWidth = 0;
|
gfxFloat trimmedWidth = 0;
|
||||||
gfxFloat availWidth = aReflowState.availableWidth;
|
gfxFloat availWidth = aReflowState.availableWidth;
|
||||||
PRBool canTrimTrailingWhitespace = !textStyle->WhiteSpaceIsSignificant();
|
PRBool canTrimTrailingWhitespace = !textStyle->WhiteSpaceIsSignificant() &&
|
||||||
|
textStyle->WhiteSpaceCanWrap();
|
||||||
PRUint32 transformedCharsFit =
|
PRUint32 transformedCharsFit =
|
||||||
mTextRun->BreakAndMeasureText(transformedOffset, transformedLength,
|
mTextRun->BreakAndMeasureText(transformedOffset, transformedLength,
|
||||||
(GetStateBits() & TEXT_START_OF_LINE) != 0,
|
(GetStateBits() & TEXT_START_OF_LINE) != 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user