Bug 1667118 - Rename -moz-math-script-level to math-depth. r=emilio

This renames the internal -moz-math-script-level property in order to
prepare for full math-depth support. Currently, the property is guarded
under a disabled-by-default flag, so there should be no observable
behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D91285
This commit is contained in:
Frederic Wang
2020-09-25 12:04:53 +00:00
parent f48573c999
commit ef2b51a0c8
21 changed files with 79 additions and 60 deletions

View File

@@ -333,19 +333,19 @@ void nsMathMLmfencedFrame::Reflow(nsPresContext* aPresContext,
/////////////////
// opening fence ...
ReflowChar(drawTarget, *fm, fontSizeInflation, mOpenChar,
NS_MATHML_OPERATOR_FORM_PREFIX, font->mScriptLevel, axisHeight,
NS_MATHML_OPERATOR_FORM_PREFIX, font->mMathDepth, axisHeight,
leading, em, containerSize, ascent, descent, isRTL);
/////////////////
// separators ...
for (i = 0; i < mSeparatorsCount; i++) {
ReflowChar(drawTarget, *fm, fontSizeInflation, &mSeparatorsChar[i],
NS_MATHML_OPERATOR_FORM_INFIX, font->mScriptLevel, axisHeight,
NS_MATHML_OPERATOR_FORM_INFIX, font->mMathDepth, axisHeight,
leading, em, containerSize, ascent, descent, isRTL);
}
/////////////////
// closing fence ...
ReflowChar(drawTarget, *fm, fontSizeInflation, mCloseChar,
NS_MATHML_OPERATOR_FORM_POSTFIX, font->mScriptLevel, axisHeight,
NS_MATHML_OPERATOR_FORM_POSTFIX, font->mMathDepth, axisHeight,
leading, em, containerSize, ascent, descent, isRTL);
//////////////////
@@ -574,7 +574,7 @@ void nsMathMLmfencedFrame::GetIntrinsicISizeMetrics(
if (mOpenChar) {
width += GetMaxCharWidth(
this, aRenderingContext->GetDrawTarget(), fontSizeInflation, mOpenChar,
NS_MATHML_OPERATOR_FORM_PREFIX, font->mScriptLevel, em);
NS_MATHML_OPERATOR_FORM_PREFIX, font->mMathDepth, em);
}
int32_t i = 0;
@@ -586,10 +586,10 @@ void nsMathMLmfencedFrame::GetIntrinsicISizeMetrics(
nsLayoutUtils::PREF_ISIZE);
if (i < mSeparatorsCount) {
width += GetMaxCharWidth(this, aRenderingContext->GetDrawTarget(),
fontSizeInflation, &mSeparatorsChar[i],
NS_MATHML_OPERATOR_FORM_INFIX,
font->mScriptLevel, em);
width +=
GetMaxCharWidth(this, aRenderingContext->GetDrawTarget(),
fontSizeInflation, &mSeparatorsChar[i],
NS_MATHML_OPERATOR_FORM_INFIX, font->mMathDepth, em);
}
i++;
}
@@ -597,7 +597,7 @@ void nsMathMLmfencedFrame::GetIntrinsicISizeMetrics(
if (mCloseChar) {
width += GetMaxCharWidth(
this, aRenderingContext->GetDrawTarget(), fontSizeInflation, mCloseChar,
NS_MATHML_OPERATOR_FORM_POSTFIX, font->mScriptLevel, em);
NS_MATHML_OPERATOR_FORM_POSTFIX, font->mMathDepth, em);
}
aDesiredSize.Width() = width;