diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index f9d74e25b79..74d33afc082 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -6982,9 +6982,6 @@ nsCSSFrameConstructor::ConstructMathMLFrame(nsIPresShell* aPresShell, nsHTMLContainerFrame::CreateViewForFrame(aPresContext, newFrame, aStyleContext, aParentFrame, PR_FALSE); - // Add the new frame to our list of frame items. - aFrameItems.AddChild(newFrame); - // Process the child content if requested nsFrameItems childItems; if (processChildren) { @@ -7015,6 +7012,10 @@ nsCSSFrameConstructor::ConstructMathMLFrame(nsIPresShell* aPresShell, // Add the placeholder frame to the flow aFrameItems.AddChild(placeholderFrame); } + else { + // Add the new frame to our list of frame items. + aFrameItems.AddChild(newFrame); + } } return rv; } diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index f9d74e25b79..74d33afc082 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -6982,9 +6982,6 @@ nsCSSFrameConstructor::ConstructMathMLFrame(nsIPresShell* aPresShell, nsHTMLContainerFrame::CreateViewForFrame(aPresContext, newFrame, aStyleContext, aParentFrame, PR_FALSE); - // Add the new frame to our list of frame items. - aFrameItems.AddChild(newFrame); - // Process the child content if requested nsFrameItems childItems; if (processChildren) { @@ -7015,6 +7012,10 @@ nsCSSFrameConstructor::ConstructMathMLFrame(nsIPresShell* aPresShell, // Add the placeholder frame to the flow aFrameItems.AddChild(placeholderFrame); } + else { + // Add the new frame to our list of frame items. + aFrameItems.AddChild(newFrame); + } } return rv; }