Test the containing frame for continuations, not the child. Bug 698706, r=roc

This commit is contained in:
Simon Montagu 2011-11-07 16:26:50 +02:00
Родитель c121ebe5e0
Коммит 47421feaee
2 изменённых файлов: 14 добавлений и 17 удалений

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

@ -904,8 +904,7 @@ void
nsBidiPresUtils::TraverseFrames(nsBlockFrame* aBlockFrame,
nsBlockInFlowLineIterator* aLineIter,
nsIFrame* aCurrentFrame,
BidiParagraphData* aBpd,
BidiParagraphData* aContainingParagraph)
BidiParagraphData* aBpd)
{
if (!aCurrentFrame)
return;
@ -936,10 +935,6 @@ nsBidiPresUtils::TraverseFrames(nsBlockFrame* aBlockFrame,
}
}
if (aContainingParagraph && isFirstFrame) {
aBpd->Reset(aCurrentFrame, aContainingParagraph);
}
PRUnichar ch = 0;
if (frame->IsFrameOfType(nsIFrame::eBidiInlineContainer)) {
const nsStyleVisibility* vis = frame->GetStyleVisibility();
@ -1111,8 +1106,18 @@ nsBidiPresUtils::TraverseFrames(nsBlockFrame* aBlockFrame,
if (text->mUnicodeBidi & NS_STYLE_UNICODE_BIDI_ISOLATE) {
// css "unicode-bidi: isolate" and html5 bdi:
// resolve the element as a separate paragraph
TraverseFrames(aBlockFrame, aLineIter, kid,
aBpd->GetSubParagraph(), aBpd);
BidiParagraphData* subParagraph = aBpd->GetSubParagraph();
if (!frame->GetPrevContinuation()) {
subParagraph->Reset(kid, aBpd);
}
TraverseFrames(aBlockFrame, aLineIter, kid, subParagraph);
if (!frame->GetNextContinuation()) {
ResolveParagraph(aBlockFrame, subParagraph);
}
// Treat the element as a neutral character within its containing
// paragraph.
aBpd->AppendControlChar(kObjectSubstitute);
} else {
TraverseFrames(aBlockFrame, aLineIter, kid, aBpd);
}
@ -1126,13 +1131,6 @@ nsBidiPresUtils::TraverseFrames(nsBlockFrame* aBlockFrame,
// last frame of an element specifying embedding or override
aBpd->PopBidiControl();
}
if (aContainingParagraph) {
ResolveParagraph(aBlockFrame, aBpd);
// Treat an element with unicode-bidi: isolate as a neutral character
// within its containing paragraph
aContainingParagraph->AppendControlChar(kObjectSubstitute);
}
}
childFrame = nextSibling;
} while (childFrame);

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

@ -371,8 +371,7 @@ private:
static void TraverseFrames(nsBlockFrame* aBlockFrame,
nsBlockInFlowLineIterator* aLineIter,
nsIFrame* aCurrentFrame,
BidiParagraphData* aBpd,
BidiParagraphData* containingParagraph = nsnull);
BidiParagraphData* aBpd);
/*
* Position aFrame and it's descendants to their visual places. Also if aFrame