Check for fluid continuations up the parent chain and make them non-fluid. Bug 818454, r=roc

This commit is contained in:
Simon Montagu 2013-02-11 23:45:55 -08:00
parent 7cbe508525
commit ea93d5cb25

View File

@ -803,12 +803,26 @@ nsBidiPresUtils::ResolveParagraph(nsBlockFrame* aBlockFrame,
} else if (runLength == fragmentLength) {
/*
* If the directional run ends at the end of the frame, make sure
* that any continuation is non-fluid
* that any continuation is non-fluid, and do the same up the
* parent chain
*/
nsIFrame* next = frame->GetNextInFlow();
if (next) {
frame->SetNextContinuation(next);
next->SetPrevContinuation(frame);
nsIFrame* parent = frame;
nsIFrame* nextParent = next;
while (parent && nextParent) {
if (parent == nextParent ||
nextParent != parent->GetNextInFlow() ||
!parent->IsFrameOfType(nsIFrame::eLineParticipant) ||
!nextParent->IsFrameOfType(nsIFrame::eLineParticipant)) {
break;
}
parent->SetNextContinuation(nextParent);
nextParent->SetPrevContinuation(parent);
parent = parent->GetParent();
nextParent = nextParent->GetParent();
}
}
}
frame->AdjustOffsetsForBidi(contentOffset, contentOffset + fragmentLength);