mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Fix crash bug #5621; we weren't pushing frames to the next-in-flow in all cases like we should
This commit is contained in:
parent
e83d736b28
commit
fe6e59058f
@ -242,6 +242,14 @@ nsFirstLetterFrame::Reflow(nsIPresContext& aPresContext,
|
||||
kid->SetNextSibling(nsnull);
|
||||
mOverflowFrames.SetFrames(nextInFlow);
|
||||
}
|
||||
else {
|
||||
nsIFrame* nextSib;
|
||||
kid->GetNextSibling(&nextSib);
|
||||
if (nextSib) {
|
||||
kid->SetNextSibling(nsnull);
|
||||
mOverflowFrames.SetFrames(nextSib);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
@ -275,7 +283,9 @@ nsFirstLetterFrame::DrainOverflowFrames(nsIPresContext* aPresContext)
|
||||
|
||||
// Now repair our first frames style context
|
||||
nsIFrame* kid = mFrames.FirstChild();
|
||||
kid->ReResolveStyleContext(aPresContext, mStyleContext,
|
||||
NS_STYLE_HINT_REFLOW,
|
||||
nsnull, nsnull);
|
||||
if (kid) {
|
||||
kid->ReResolveStyleContext(aPresContext, mStyleContext,
|
||||
NS_STYLE_HINT_REFLOW,
|
||||
nsnull, nsnull);
|
||||
}
|
||||
}
|
||||
|
@ -242,6 +242,14 @@ nsFirstLetterFrame::Reflow(nsIPresContext& aPresContext,
|
||||
kid->SetNextSibling(nsnull);
|
||||
mOverflowFrames.SetFrames(nextInFlow);
|
||||
}
|
||||
else {
|
||||
nsIFrame* nextSib;
|
||||
kid->GetNextSibling(&nextSib);
|
||||
if (nextSib) {
|
||||
kid->SetNextSibling(nsnull);
|
||||
mOverflowFrames.SetFrames(nextSib);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
@ -275,7 +283,9 @@ nsFirstLetterFrame::DrainOverflowFrames(nsIPresContext* aPresContext)
|
||||
|
||||
// Now repair our first frames style context
|
||||
nsIFrame* kid = mFrames.FirstChild();
|
||||
kid->ReResolveStyleContext(aPresContext, mStyleContext,
|
||||
NS_STYLE_HINT_REFLOW,
|
||||
nsnull, nsnull);
|
||||
if (kid) {
|
||||
kid->ReResolveStyleContext(aPresContext, mStyleContext,
|
||||
NS_STYLE_HINT_REFLOW,
|
||||
nsnull, nsnull);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user