Make sure that the offsets in a textframe are up-to-date before creating a bidi continuation. Bug 406675, r=uriber, sr=roc, blocking1.9=schrep

This commit is contained in:
smontagu%smontagu.org 2007-12-13 07:51:27 +00:00
Родитель a1fb15f84c
Коммит 68b817f904
2 изменённых файлов: 3 добавлений и 1 удалений

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

@ -411,6 +411,7 @@ nsBidiPresUtils::Resolve(nsBlockFrame* aBlockFrame,
// IBMBIDI - Egypt - End
if ( (runLength > 0) && (runLength < fragmentLength) ) {
frame->AdjustOffsetsForBidi(contentOffset, contentOffset + runLength);
if (!EnsureBidiContinuation(frame, &nextBidi, frameIndex) ) {
break;
}
@ -421,7 +422,6 @@ nsBidiPresUtils::Resolve(nsBlockFrame* aBlockFrame,
}
}
line->MarkDirty();
frame->AdjustOffsetsForBidi(contentOffset, contentOffset + runLength);
frame = nextBidi;
contentOffset += runLength;
} // if (runLength < fragmentLength)

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

@ -3161,6 +3161,8 @@ nsContinuingTextFrame::Init(nsIContent* aContent,
aPrevInFlow->SetNextInFlow(this);
nsTextFrame* prev = static_cast<nsTextFrame*>(aPrevInFlow);
mContentOffset = prev->GetContentOffset() + prev->GetContentLengthHint();
NS_ASSERTION(mContentOffset < aContent->GetText()->GetLength(),
"Creating ContinuingTextFrame, but there is no more content");
if (prev->GetStyleContext() != GetStyleContext()) {
// We're taking part of prev's text, and its style may be different
// so clear its textrun which may no longer be valid (and don't set ours)