diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp index 26f02a9e0045..16420438955b 100644 --- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -4395,12 +4395,16 @@ nsTextFrame::MeasureText(nsIPresContext* aPresContext, PRBool endsInNewline = PR_FALSE; PRBool justDidFirstLetter = PR_FALSE; nsTextDimensions dimensions, lastWordDimensions; -#if defined(_WIN32) || defined(XP_OS2) +#if defined(_WIN32) PRBool measureTextRuns = !aTextData.mComputeMaxWordWidth && !aTs.mPreformatted && !aTs.mSmallCaps && !aTs.mWordSpacing && !aTs.mLetterSpacing && aTextData.mWrapping; // Don't measure text runs with letter spacing active, it doesn't work // it also doesn't work if we are not word-wrapping (bug 42832) +#elif defined(XP_OS2) + PRBool measureTextRuns = !aTextData.mComputeMaxWordWidth && !aTs.mSmallCaps && + !aTs.mWordSpacing && !aTs.mLetterSpacing && + aTextData.mWrapping; #else PRBool measureTextRuns = PR_FALSE; #endif diff --git a/layout/html/base/src/nsTextFrame.cpp b/layout/html/base/src/nsTextFrame.cpp index 26f02a9e0045..16420438955b 100644 --- a/layout/html/base/src/nsTextFrame.cpp +++ b/layout/html/base/src/nsTextFrame.cpp @@ -4395,12 +4395,16 @@ nsTextFrame::MeasureText(nsIPresContext* aPresContext, PRBool endsInNewline = PR_FALSE; PRBool justDidFirstLetter = PR_FALSE; nsTextDimensions dimensions, lastWordDimensions; -#if defined(_WIN32) || defined(XP_OS2) +#if defined(_WIN32) PRBool measureTextRuns = !aTextData.mComputeMaxWordWidth && !aTs.mPreformatted && !aTs.mSmallCaps && !aTs.mWordSpacing && !aTs.mLetterSpacing && aTextData.mWrapping; // Don't measure text runs with letter spacing active, it doesn't work // it also doesn't work if we are not word-wrapping (bug 42832) +#elif defined(XP_OS2) + PRBool measureTextRuns = !aTextData.mComputeMaxWordWidth && !aTs.mSmallCaps && + !aTs.mWordSpacing && !aTs.mLetterSpacing && + aTextData.mWrapping; #else PRBool measureTextRuns = PR_FALSE; #endif