зеркало из https://github.com/mozilla/pjs.git
[MathML] Fix to get the scriptlevel style context back, and minor cleanups.
This commit is contained in:
Родитель
6603bb1392
Коммит
8da96e7a6e
|
@ -36,9 +36,8 @@
|
|||
#include "nsIFontMetrics.h"
|
||||
#include "nsStyleUtil.h"
|
||||
|
||||
#include "nsMathMLAtoms.h"
|
||||
#include "nsMathMLChar.h"
|
||||
#include "nsMathMLOperators.h"
|
||||
#include "nsMathMLChar.h"
|
||||
|
||||
//
|
||||
// nsMathMLChar implementation
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче