GetTextDimensions(aRenderingContext, aTextStyle, aBuffer, aLength, &trueDimensions);
GetTextDimensions(aRenderingContext, aTextStyle, aBuffer, aLength, PR_TRUE, &trueDimensions);
nsTextFrame::ComputeExtraJustificationSpacing(nsIRenderingContext& aRenderingContext,                                              TextStyle& aTextStyle,                                              PRUnichar* aBuffer, PRInt32 aLength,                                              PRInt32 aNumJustifiableCharacter){  if (aTextStyle.mJustifying) {    nsTextDimensions trueDimensions;        // OK, so this is a bit ugly. The problem is that to get the right margin    // nice and clean, we have to apply a little extra space to *some* of the    // justifiable characters. It has to be the same ones every time or things will go haywire.    // This implies that the GetTextDimensionsOrLength and RenderString functions depend    // on a little bit of secret state: which part of the prepared text they are    // looking at. It turns out that they get called in a regular way: they look    // at the text from the beginning to the end. So we just count which justifiable character    // we're up to, for each context.    // This is not a great solution, but a perfect solution requires much more    // widespread changes, to explicitly annotate all the transformed text fragments    // that are passed around with their position in the transformed text    // for the entire frame.    aTextStyle.mNumJustifiableCharacterToMeasure = 0;    aTextStyle.mExtraSpacePerJustifiableCharacter = 0;    aTextStyle.mNumJustifiableCharacterReceivingExtraJot = 0;        GetTextDimensions(aRenderingContext, aTextStyle, aBuffer, aLength, &trueDimensions);    aTextStyle.mNumJustifiableCharacterToMeasure = aNumJustifiableCharacter;    aTextStyle.mNumJustifiableCharacterToRender = aNumJustifiableCharacter;    nscoord extraSpace = mRect.width - trueDimensions.width;    if (extraSpace > 0 && aNumJustifiableCharacter > 0) {      aTextStyle.mExtraSpacePerJustifiableCharacter = extraSpace/aNumJustifiableCharacter;      aTextStyle.mNumJustifiableCharacterReceivingExtraJot =        extraSpace - aTextStyle.mExtraSpacePerJustifiableCharacter*aNumJustifiableCharacter;    }  }}