This commit is contained in:
roc+@cs.cmu.edu 2007-10-09 19:30:48 -07:00
Родитель a9f24144f5
Коммит 884794bcc1
1 изменённых файлов: 1 добавлений и 14 удалений

Просмотреть файл

@ -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<nsTextFrame*>(textFrame->GetNextContinuation())) {