diff --git a/layout/generic/nsTextFrameThebes.cpp b/layout/generic/nsTextFrameThebes.cpp index be1eee549e88..54d5e4d8a1e6 100644 --- a/layout/generic/nsTextFrameThebes.cpp +++ b/layout/generic/nsTextFrameThebes.cpp @@ -5410,6 +5410,7 @@ nsTextFrame::TrimTrailingWhiteSpace(nsPresContext* aPresContext, gfxSkipCharsIterator iter = start; const nsStyleText* textStyle = GetStyleText(); gfxFloat delta = 0; + PRUint32 trimmedEnd = iter.ConvertOriginalToSkipped(trimmed.GetEnd()); if (GetStateBits() & TEXT_TRIMMED_TRAILING_WHITESPACE) { aLastCharIsJustifiable = PR_TRUE; @@ -5429,18 +5430,6 @@ nsTextFrame::TrimTrailingWhiteSpace(nsPresContext* aPresContext, } } - PRUint32 trimmedEnd = iter.ConvertOriginalToSkipped(trimmed.GetEnd()); - // 'iter' is now at the end - if (HasSoftHyphenBefore(frag, mTextRun, trimmed, iter)) { - // Fix up metrics to include hyphen - gfxTextRunCache::AutoTextRun hyphenTextRun(GetHyphenTextRun(mTextRun, aReflowState.rendContext)); - if (hyphenTextRun.get()) { - AddCharToMetrics(hyphenTextRun.get(), - mTextRun, &textMetrics, needTightBoundingBox, ctx); - } - AddStateBits(TEXT_HYPHEN_BREAK); - } - if (!aLastCharIsJustifiable && NS_STYLE_TEXT_ALIGN_JUSTIFY == textStyle->mTextAlign) { // Check if any character in the last cluster is justifiable @@ -5549,8 +5538,6 @@ nsresult nsTextFrame::GetRenderedText(nsAString* aAppendToString, PRUint32 keptCharsLength = 0; PRUint32 validCharsLength = 0; - // XXX should we return a soft hyphen here? - // Build skipChars and copy text, for each text frame in this continuation block for (textFrame = this; textFrame; textFrame = static_cast(textFrame->GetNextContinuation())) {