Recreate content when a deleted frame is the only child of a bidi continuation frame. Bug 718236, r=roc

This commit is contained in:
Simon Montagu 2012-01-26 00:04:22 -08:00
parent 8c2fb4d7c6
commit 240bfe4a4e

View File

@ -9044,6 +9044,16 @@ nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval(nsIFrame* aFrame,
}
#endif
// Reconstruct if inflowFrame is parent's only child, and parent is, or has,
// a non-fluid continuation, i.e. it was split by bidi resolution
if (!inFlowFrame->GetPrevSibling() &&
!inFlowFrame->GetNextSibling() &&
(parent->GetPrevContinuation() && !parent->GetPrevInFlow() ||
parent->GetNextContinuation() && !parent->GetNextInFlow())) {
*aResult = RecreateFramesForContent(parent->GetContent(), true);
return true;
}
// We might still need to reconstruct things if the parent of inFlowFrame is
// special, since in that case the removal of aFrame might affect the
// splitting of its parent.