diff --git a/layout/mathml/base/src/nsMathMLChar.cpp b/layout/mathml/base/src/nsMathMLChar.cpp index 7a42fe947c7..cea873ba455 100644 --- a/layout/mathml/base/src/nsMathMLChar.cpp +++ b/layout/mathml/base/src/nsMathMLChar.cpp @@ -36,9 +36,8 @@ #include "nsIFontMetrics.h" #include "nsStyleUtil.h" -#include "nsMathMLAtoms.h" -#include "nsMathMLChar.h" #include "nsMathMLOperators.h" +#include "nsMathMLChar.h" // // nsMathMLChar implementation diff --git a/layout/mathml/base/src/nsMathMLContainerFrame.cpp b/layout/mathml/base/src/nsMathMLContainerFrame.cpp index 8a0cc83d221..dedd990b749 100644 --- a/layout/mathml/base/src/nsMathMLContainerFrame.cpp +++ b/layout/mathml/base/src/nsMathMLContainerFrame.cpp @@ -250,9 +250,6 @@ nsMathMLContainerFrame::InsertScriptLevelStyleContext(nsIPresContext& aPresConte aPresContext.ResolvePseudoStyleContextFor(childContent, fontAtom, lastStyleContext, PR_FALSE, getter_AddRefs(newStyleContext)); if (newStyleContext && newStyleContext.get() != lastStyleContext) { - break; - } - else { // create a new frame and append it as sole child of the last created frame nsIFrame* newFrame = nsnull; NS_NewMathMLContainerFrame(&newFrame); @@ -269,6 +266,9 @@ nsMathMLContainerFrame::InsertScriptLevelStyleContext(nsIPresContext& aPresConte lastStyleContext = newStyleContext; lastFrame = newFrame; } + else { + break; + } } if (nsnull != firstFrame) { // at least one new frame was created mFrames.ReplaceFrame(this, childFrame, firstFrame); diff --git a/layout/mathml/base/src/nsMathMLmoFrame.cpp b/layout/mathml/base/src/nsMathMLmoFrame.cpp index cb0d379e7ef..18b3cede3f7 100644 --- a/layout/mathml/base/src/nsMathMLmoFrame.cpp +++ b/layout/mathml/base/src/nsMathMLmoFrame.cpp @@ -348,7 +348,7 @@ nsMathMLmoFrame::Stretch(nsIPresContext& aPresContext, } // account the spacing - aDesiredStretchSize.width += mCharOffset.x + nscoord( mRightSpace * em ); + aDesiredStretchSize.width += nscoord( (mLeftSpace + mRightSpace) * em ); // adjust the offsets of our children to leave the spacing if (0 < mCharOffset.x || 0 < mCharOffset.y) {