diff --git a/layout/mathml/nsMathMLContainerFrame.cpp b/layout/mathml/nsMathMLContainerFrame.cpp index 342bee7fd869..a5d57862df01 100644 --- a/layout/mathml/nsMathMLContainerFrame.cpp +++ b/layout/mathml/nsMathMLContainerFrame.cpp @@ -1343,22 +1343,16 @@ nscoord nsMathMLContainerFrame::FixInterFrameSpacing( } /* static */ -void nsMathMLContainerFrame::DidReflowChildren(nsIFrame* aFirst, - nsIFrame* aStop) - -{ - if (MOZ_UNLIKELY(!aFirst)) return; - - for (nsIFrame* frame = aFirst; frame != aStop; - frame = frame->GetNextSibling()) { - NS_ASSERTION(frame, "aStop isn't a sibling"); - if (frame->HasAnyStateBits(NS_FRAME_IN_REFLOW)) { - // finish off principal descendants, too - nsIFrame* grandchild = frame->PrincipalChildList().FirstChild(); - if (grandchild) DidReflowChildren(grandchild, nullptr); - - frame->DidReflow(frame->PresContext(), nullptr); +void nsMathMLContainerFrame::DidReflowChildren(nsIFrame* aFirst) { + for (nsIFrame* frame = aFirst; frame; frame = frame->GetNextSibling()) { + if (!frame->HasAnyStateBits(NS_FRAME_IN_REFLOW)) { + continue; } + if (nsIFrame* grandchild = frame->PrincipalChildList().FirstChild()) { + // Finish off principal descendants, too + DidReflowChildren(grandchild); + } + frame->DidReflow(frame->PresContext(), nullptr); } } diff --git a/layout/mathml/nsMathMLContainerFrame.h b/layout/mathml/nsMathMLContainerFrame.h index ec3d28e816c1..a462e921b010 100644 --- a/layout/mathml/nsMathMLContainerFrame.h +++ b/layout/mathml/nsMathMLContainerFrame.h @@ -361,12 +361,10 @@ class nsMathMLContainerFrame : public nsContainerFrame, public nsMathMLFrame { void GatherAndStoreOverflow(ReflowOutput* aMetrics); /** - * Call DidReflow() if the NS_FRAME_IN_REFLOW frame bit is set on aFirst and - * all its next siblings up to, but not including, aStop. - * aStop == nullptr meaning all next siblings with the bit set. - * The method does nothing if aFirst == nullptr. + * Call DidReflow() if the NS_FRAME_IN_REFLOW frame bit is set on aFirst + * and all its next siblings. The method does nothing if aFirst == nullptr. */ - static void DidReflowChildren(nsIFrame* aFirst, nsIFrame* aStop = nullptr); + static void DidReflowChildren(nsIFrame* aFirst); /** * Recompute mIntrinsicISize if it's not already up to date.