mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-23 19:09:49 +00:00
Test the containing frame for continuations, not the child. Bug 698706, r=roc
This commit is contained in:
parent
c121ebe5e0
commit
47421feaee
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user