mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 04:41:11 +00:00
Bug 1925478 - Simplify nsMathMLContainerFrame::DidReflowChildren. r=fredw
No behavior change. Differential Revision: https://phabricator.services.mozilla.com/D226144
This commit is contained in:
parent
28463c11dd
commit
c1dda0bb6e
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user