mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Backed out changeset 0da5103ba772 (bug 1665975) for mozglue_static::panic_hook mass crashes CLOSED TREE
This commit is contained in:
parent
1ac695dbdc
commit
2991b8c066
@ -216,7 +216,7 @@ exports.ANIMATION_TYPE_FOR_LONGHANDS = [
|
|||||||
"margin-block-start",
|
"margin-block-start",
|
||||||
"margin-inline-end",
|
"margin-inline-end",
|
||||||
"margin-inline-start",
|
"margin-inline-start",
|
||||||
"math-style",
|
"-moz-math-display",
|
||||||
"max-block-size",
|
"max-block-size",
|
||||||
"max-inline-size",
|
"max-inline-size",
|
||||||
"min-block-size",
|
"min-block-size",
|
||||||
|
@ -26,22 +26,22 @@ math {
|
|||||||
letter-spacing: normal;
|
letter-spacing: normal;
|
||||||
text-rendering: optimizeLegibility;
|
text-rendering: optimizeLegibility;
|
||||||
-moz-float-edge: margin-box;
|
-moz-float-edge: margin-box;
|
||||||
math-style: compact;
|
-moz-math-display: inline;
|
||||||
}
|
}
|
||||||
math[display="block" i] {
|
math[display="block" i] {
|
||||||
display: block;
|
display: block;
|
||||||
text-align: -moz-center;
|
text-align: -moz-center;
|
||||||
math-style: normal;
|
-moz-math-display: block;
|
||||||
}
|
}
|
||||||
math[display="inline" i] {
|
math[display="inline" i] {
|
||||||
display: inline;
|
display: inline;
|
||||||
math-style: compact;
|
-moz-math-display: inline;
|
||||||
}
|
}
|
||||||
math[displaystyle="false" i] {
|
math[displaystyle="false" i] {
|
||||||
math-style: compact;
|
-moz-math-display: inline;
|
||||||
}
|
}
|
||||||
math[displaystyle="true" i] {
|
math[displaystyle="true" i] {
|
||||||
math-style: normal;
|
-moz-math-display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
@ -223,18 +223,18 @@ mtable[framespacing] > mtr > mtd {
|
|||||||
/*
|
/*
|
||||||
http://www.w3.org/Math/draft-spec/chapter3.html#presm.scriptlevel
|
http://www.w3.org/Math/draft-spec/chapter3.html#presm.scriptlevel
|
||||||
|
|
||||||
The determination of math-style for <math> involves the displaystyle
|
The determination of -moz-math-display for <math> involves the displaystyle
|
||||||
and display attributes. See the <math> section above.
|
and display attributes. See the <math> section above.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Map mstyle@displaystyle to math-style.
|
Map mstyle@displaystyle to -moz-math-display.
|
||||||
*/
|
*/
|
||||||
mstyle[displaystyle="false" i] {
|
mstyle[displaystyle="false" i] {
|
||||||
math-style: compact;
|
-moz-math-display: inline;
|
||||||
}
|
}
|
||||||
mstyle[displaystyle="true" i] {
|
mstyle[displaystyle="true" i] {
|
||||||
math-style: normal;
|
-moz-math-display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* munder, mover and munderover change the scriptlevels of their children
|
/* munder, mover and munderover change the scriptlevels of their children
|
||||||
@ -250,7 +250,7 @@ mstyle[displaystyle="true" i] {
|
|||||||
*/
|
*/
|
||||||
mfrac > * {
|
mfrac > * {
|
||||||
-moz-script-level: auto;
|
-moz-script-level: auto;
|
||||||
math-style: compact;
|
-moz-math-display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -260,7 +260,7 @@ mfrac > * {
|
|||||||
*/
|
*/
|
||||||
mroot > :not(:first-child) {
|
mroot > :not(:first-child) {
|
||||||
-moz-script-level: +2;
|
-moz-script-level: +2;
|
||||||
math-style: compact;
|
-moz-math-display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -284,7 +284,7 @@ msup > :not(:first-child),
|
|||||||
msubsup > :not(:first-child),
|
msubsup > :not(:first-child),
|
||||||
mmultiscripts > :not(:first-child) {
|
mmultiscripts > :not(:first-child) {
|
||||||
-moz-script-level: +1;
|
-moz-script-level: +1;
|
||||||
math-style: compact;
|
-moz-math-display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -304,7 +304,7 @@ mmultiscripts > :not(:first-child) {
|
|||||||
munder > :not(:first-child),
|
munder > :not(:first-child),
|
||||||
mover > :not(:first-child),
|
mover > :not(:first-child),
|
||||||
munderover > :not(:first-child) {
|
munderover > :not(:first-child) {
|
||||||
math-style: compact;
|
-moz-math-display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -312,8 +312,8 @@ munderover > :not(:first-child) {
|
|||||||
inherited value of the attribute. If the attribute is not present, the
|
inherited value of the attribute. If the attribute is not present, the
|
||||||
mtable element sets displaystyle to "false" within the table elements.
|
mtable element sets displaystyle to "false" within the table elements.
|
||||||
*/
|
*/
|
||||||
mtable { math-style: compact; }
|
mtable { -moz-math-display: inline; }
|
||||||
mtable[displaystyle="true" i] { math-style: normal; }
|
mtable[displaystyle="true" i] { -moz-math-display: block; }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The mscarries element sets displaystyle to "false", and increments
|
The mscarries element sets displaystyle to "false", and increments
|
||||||
@ -321,7 +321,7 @@ mtable[displaystyle="true" i] { math-style: normal; }
|
|||||||
XXXfredw: This element is not implemented yet. See bug 534967.
|
XXXfredw: This element is not implemented yet. See bug 534967.
|
||||||
mscarries {
|
mscarries {
|
||||||
-moz-script-level: +1;
|
-moz-script-level: +1;
|
||||||
math-style: compact;
|
-moz-math-display: inline;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -367,9 +367,9 @@ nsresult nsMathMLmencloseFrame::PlaceInternal(DrawTarget* aDrawTarget,
|
|||||||
if (delta) padding += onePixel - delta; // round up
|
if (delta) padding += onePixel - delta; // round up
|
||||||
|
|
||||||
if (IsToDraw(NOTATION_LONGDIV) || IsToDraw(NOTATION_RADICAL)) {
|
if (IsToDraw(NOTATION_LONGDIV) || IsToDraw(NOTATION_RADICAL)) {
|
||||||
GetRadicalParameters(fm,
|
GetRadicalParameters(
|
||||||
StyleFont()->mMathStyle == NS_STYLE_MATH_STYLE_NORMAL,
|
fm, StyleFont()->mMathDisplay == NS_MATHML_DISPLAYSTYLE_BLOCK,
|
||||||
mRadicalRuleThickness, leading, psi);
|
mRadicalRuleThickness, leading, psi);
|
||||||
|
|
||||||
// make sure that the rule appears on on screen
|
// make sure that the rule appears on on screen
|
||||||
if (mRadicalRuleThickness < onePixel) {
|
if (mRadicalRuleThickness < onePixel) {
|
||||||
|
@ -51,7 +51,7 @@ eMathMLFrameType nsMathMLmfracFrame::GetMathMLFrameType() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint8_t nsMathMLmfracFrame::ScriptIncrement(nsIFrame* aFrame) {
|
uint8_t nsMathMLmfracFrame::ScriptIncrement(nsIFrame* aFrame) {
|
||||||
if (StyleFont()->mMathStyle == NS_STYLE_MATH_STYLE_COMPACT && aFrame &&
|
if (!StyleFont()->mMathDisplay && aFrame &&
|
||||||
(mFrames.FirstChild() == aFrame || mFrames.LastChild() == aFrame)) {
|
(mFrames.FirstChild() == aFrame || mFrames.LastChild() == aFrame)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -67,7 +67,7 @@ nsMathMLmfracFrame::TransmitAutomaticData() {
|
|||||||
|
|
||||||
// If displaystyle is false, then scriptlevel is incremented, so notify the
|
// If displaystyle is false, then scriptlevel is incremented, so notify the
|
||||||
// children of this.
|
// children of this.
|
||||||
if (StyleFont()->mMathStyle == NS_STYLE_MATH_STYLE_COMPACT) {
|
if (!StyleFont()->mMathDisplay) {
|
||||||
PropagateFrameFlagFor(mFrames.FirstChild(),
|
PropagateFrameFlagFor(mFrames.FirstChild(),
|
||||||
NS_FRAME_MATHML_SCRIPT_DESCENDANT);
|
NS_FRAME_MATHML_SCRIPT_DESCENDANT);
|
||||||
PropagateFrameFlagFor(mFrames.LastChild(),
|
PropagateFrameFlagFor(mFrames.LastChild(),
|
||||||
@ -264,7 +264,7 @@ nsresult nsMathMLmfracFrame::PlaceInternal(DrawTarget* aDrawTarget,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool displayStyle = StyleFont()->mMathStyle == NS_STYLE_MATH_STYLE_NORMAL;
|
bool displayStyle = StyleFont()->mMathDisplay == NS_MATHML_DISPLAYSTYLE_BLOCK;
|
||||||
|
|
||||||
if (!mIsBevelled) {
|
if (!mIsBevelled) {
|
||||||
mLineRect.height = mLineThickness;
|
mLineRect.height = mLineThickness;
|
||||||
@ -511,7 +511,7 @@ nsresult nsMathMLmfracFrame::PlaceInternal(DrawTarget* aDrawTarget,
|
|||||||
denShift += delta;
|
denShift += delta;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StyleFont()->mMathStyle == NS_STYLE_MATH_STYLE_NORMAL) {
|
if (StyleFont()->mMathDisplay == NS_MATHML_DISPLAYSTYLE_BLOCK) {
|
||||||
delta =
|
delta =
|
||||||
std::min(bmDen.ascent + bmDen.descent, bmNum.ascent + bmNum.descent) /
|
std::min(bmDen.ascent + bmDen.descent, bmNum.ascent + bmNum.descent) /
|
||||||
2;
|
2;
|
||||||
|
@ -268,7 +268,7 @@ nsresult nsMathMLmmultiscriptsFrame::PlaceMultiScript(
|
|||||||
// get sup script shift depending on current script level and display style
|
// get sup script shift depending on current script level and display style
|
||||||
// Rule 18c, App. G, TeXbook
|
// Rule 18c, App. G, TeXbook
|
||||||
if (font->mScriptLevel == 0 &&
|
if (font->mScriptLevel == 0 &&
|
||||||
font->mMathStyle == NS_STYLE_MATH_STYLE_NORMAL &&
|
font->mMathDisplay == NS_MATHML_DISPLAYSTYLE_BLOCK &&
|
||||||
!NS_MATHML_IS_COMPRESSED(presentationData.flags)) {
|
!NS_MATHML_IS_COMPRESSED(presentationData.flags)) {
|
||||||
// Style D in TeXbook
|
// Style D in TeXbook
|
||||||
supScriptShift = supScriptShift1;
|
supScriptShift = supScriptShift1;
|
||||||
|
@ -542,7 +542,7 @@ static uint32_t GetStretchHint(nsOperatorFlags aFlags,
|
|||||||
// stretchy are true or false (see bug 69325).
|
// stretchy are true or false (see bug 69325).
|
||||||
// . largeopOnly is taken if largeop=true and stretchy=false
|
// . largeopOnly is taken if largeop=true and stretchy=false
|
||||||
// . largeop is taken if largeop=true and stretchy=true
|
// . largeop is taken if largeop=true and stretchy=true
|
||||||
if (aStyleFont->mMathStyle == NS_STYLE_MATH_STYLE_NORMAL &&
|
if (aStyleFont->mMathDisplay == NS_MATHML_DISPLAYSTYLE_BLOCK &&
|
||||||
NS_MATHML_OPERATOR_IS_LARGEOP(aFlags)) {
|
NS_MATHML_OPERATOR_IS_LARGEOP(aFlags)) {
|
||||||
stretchHint = NS_STRETCH_LARGEOP; // (largeopOnly, not mask!)
|
stretchHint = NS_STRETCH_LARGEOP; // (largeopOnly, not mask!)
|
||||||
if (NS_MATHML_OPERATOR_IS_INTEGRAL(aFlags)) {
|
if (NS_MATHML_OPERATOR_IS_INTEGRAL(aFlags)) {
|
||||||
@ -938,7 +938,8 @@ nsresult nsMathMLmoFrame::Place(DrawTarget* aDrawTarget, bool aPlaceOrigin,
|
|||||||
Stretch() method.
|
Stretch() method.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!aPlaceOrigin && StyleFont()->mMathStyle == NS_STYLE_MATH_STYLE_NORMAL &&
|
if (!aPlaceOrigin &&
|
||||||
|
StyleFont()->mMathDisplay == NS_MATHML_DISPLAYSTYLE_BLOCK &&
|
||||||
NS_MATHML_OPERATOR_IS_LARGEOP(mFlags) && UseMathMLChar()) {
|
NS_MATHML_OPERATOR_IS_LARGEOP(mFlags) && UseMathMLChar()) {
|
||||||
nsBoundingMetrics newMetrics;
|
nsBoundingMetrics newMetrics;
|
||||||
rv = mMathMLChar.Stretch(
|
rv = mMathMLChar.Stretch(
|
||||||
|
@ -203,9 +203,9 @@ void nsMathMLmrootFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
nsLayoutUtils::GetFontMetricsForFrame(this, fontSizeInflation);
|
nsLayoutUtils::GetFontMetricsForFrame(this, fontSizeInflation);
|
||||||
|
|
||||||
nscoord ruleThickness, leading, psi;
|
nscoord ruleThickness, leading, psi;
|
||||||
GetRadicalParameters(fm,
|
GetRadicalParameters(
|
||||||
StyleFont()->mMathStyle == NS_STYLE_MATH_STYLE_NORMAL,
|
fm, StyleFont()->mMathDisplay == NS_MATHML_DISPLAYSTYLE_BLOCK,
|
||||||
ruleThickness, leading, psi);
|
ruleThickness, leading, psi);
|
||||||
|
|
||||||
// built-in: adjust clearance psi to emulate \mathstrut using '1' (TexBook,
|
// built-in: adjust clearance psi to emulate \mathstrut using '1' (TexBook,
|
||||||
// p.131)
|
// p.131)
|
||||||
|
@ -55,7 +55,7 @@ nsMathMLmunderoverFrame::UpdatePresentationData(uint32_t aFlagsValues,
|
|||||||
// disable the stretch-all flag if we are going to act like a
|
// disable the stretch-all flag if we are going to act like a
|
||||||
// subscript-superscript pair
|
// subscript-superscript pair
|
||||||
if (NS_MATHML_EMBELLISH_IS_MOVABLELIMITS(mEmbellishData.flags) &&
|
if (NS_MATHML_EMBELLISH_IS_MOVABLELIMITS(mEmbellishData.flags) &&
|
||||||
StyleFont()->mMathStyle == NS_STYLE_MATH_STYLE_COMPACT) {
|
StyleFont()->mMathDisplay == NS_MATHML_DISPLAYSTYLE_INLINE) {
|
||||||
mPresentationData.flags &= ~NS_MATHML_STRETCH_ALL_CHILDREN_HORIZONTALLY;
|
mPresentationData.flags &= ~NS_MATHML_STRETCH_ALL_CHILDREN_HORIZONTALLY;
|
||||||
} else {
|
} else {
|
||||||
mPresentationData.flags |= NS_MATHML_STRETCH_ALL_CHILDREN_HORIZONTALLY;
|
mPresentationData.flags |= NS_MATHML_STRETCH_ALL_CHILDREN_HORIZONTALLY;
|
||||||
@ -255,7 +255,7 @@ XXX The winner is the outermost setting in conflicting settings like these:
|
|||||||
|
|
||||||
bool subsupDisplay =
|
bool subsupDisplay =
|
||||||
NS_MATHML_EMBELLISH_IS_MOVABLELIMITS(mEmbellishData.flags) &&
|
NS_MATHML_EMBELLISH_IS_MOVABLELIMITS(mEmbellishData.flags) &&
|
||||||
StyleFont()->mMathStyle == NS_STYLE_MATH_STYLE_COMPACT;
|
StyleFont()->mMathDisplay == NS_MATHML_DISPLAYSTYLE_INLINE;
|
||||||
|
|
||||||
// disable the stretch-all flag if we are going to act like a superscript
|
// disable the stretch-all flag if we are going to act like a superscript
|
||||||
if (subsupDisplay) {
|
if (subsupDisplay) {
|
||||||
@ -349,7 +349,7 @@ The REC says:
|
|||||||
|
|
||||||
i.e.,:
|
i.e.,:
|
||||||
if (NS_MATHML_EMBELLISH_IS_MOVABLELIMITS(mEmbellishDataflags) &&
|
if (NS_MATHML_EMBELLISH_IS_MOVABLELIMITS(mEmbellishDataflags) &&
|
||||||
StyleFont()->mMathStyle == NS_STYLE_MATH_STYLE_COMPACT) {
|
StyleFont()->mMathDisplay == NS_MATHML_DISPLAYSTYLE_INLINE) {
|
||||||
// place like subscript-superscript pair
|
// place like subscript-superscript pair
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -363,7 +363,7 @@ nsresult nsMathMLmunderoverFrame::Place(DrawTarget* aDrawTarget,
|
|||||||
ReflowOutput& aDesiredSize) {
|
ReflowOutput& aDesiredSize) {
|
||||||
float fontSizeInflation = nsLayoutUtils::FontSizeInflationFor(this);
|
float fontSizeInflation = nsLayoutUtils::FontSizeInflationFor(this);
|
||||||
if (NS_MATHML_EMBELLISH_IS_MOVABLELIMITS(mEmbellishData.flags) &&
|
if (NS_MATHML_EMBELLISH_IS_MOVABLELIMITS(mEmbellishData.flags) &&
|
||||||
StyleFont()->mMathStyle == NS_STYLE_MATH_STYLE_COMPACT) {
|
StyleFont()->mMathDisplay == NS_MATHML_DISPLAYSTYLE_INLINE) {
|
||||||
// place like sub sup or subsup
|
// place like sub sup or subsup
|
||||||
if (mContent->IsMathMLElement(nsGkAtoms::munderover_)) {
|
if (mContent->IsMathMLElement(nsGkAtoms::munderover_)) {
|
||||||
return nsMathMLmmultiscriptsFrame::PlaceMultiScript(
|
return nsMathMLmmultiscriptsFrame::PlaceMultiScript(
|
||||||
|
@ -420,9 +420,9 @@ enum class StyleGridTrackBreadth : uint8_t {
|
|||||||
#define NS_MATHML_MATHVARIANT_LOOPED 17
|
#define NS_MATHML_MATHVARIANT_LOOPED 17
|
||||||
#define NS_MATHML_MATHVARIANT_STRETCHED 18
|
#define NS_MATHML_MATHVARIANT_STRETCHED 18
|
||||||
|
|
||||||
// See nsStyleFont::mMathStyle
|
// See nsStyleFont::mMathDisplay
|
||||||
#define NS_STYLE_MATH_STYLE_COMPACT 0
|
#define NS_MATHML_DISPLAYSTYLE_INLINE 0
|
||||||
#define NS_STYLE_MATH_STYLE_NORMAL 1
|
#define NS_MATHML_DISPLAYSTYLE_BLOCK 1
|
||||||
|
|
||||||
// See nsStyleDisplay.mPosition
|
// See nsStyleDisplay.mPosition
|
||||||
enum class StylePositionProperty : uint8_t {
|
enum class StylePositionProperty : uint8_t {
|
||||||
|
@ -228,7 +228,7 @@ nsStyleFont::nsStyleFont(const nsStyleFont& aSrc)
|
|||||||
mGenericID(aSrc.mGenericID),
|
mGenericID(aSrc.mGenericID),
|
||||||
mScriptLevel(aSrc.mScriptLevel),
|
mScriptLevel(aSrc.mScriptLevel),
|
||||||
mMathVariant(aSrc.mMathVariant),
|
mMathVariant(aSrc.mMathVariant),
|
||||||
mMathStyle(aSrc.mMathStyle),
|
mMathDisplay(aSrc.mMathDisplay),
|
||||||
mMinFontSizeRatio(aSrc.mMinFontSizeRatio),
|
mMinFontSizeRatio(aSrc.mMinFontSizeRatio),
|
||||||
mExplicitLanguage(aSrc.mExplicitLanguage),
|
mExplicitLanguage(aSrc.mExplicitLanguage),
|
||||||
mAllowZoomAndMinSize(aSrc.mAllowZoomAndMinSize),
|
mAllowZoomAndMinSize(aSrc.mAllowZoomAndMinSize),
|
||||||
@ -249,7 +249,7 @@ nsStyleFont::nsStyleFont(const Document& aDocument)
|
|||||||
mGenericID(StyleGenericFontFamily::None),
|
mGenericID(StyleGenericFontFamily::None),
|
||||||
mScriptLevel(0),
|
mScriptLevel(0),
|
||||||
mMathVariant(NS_MATHML_MATHVARIANT_NONE),
|
mMathVariant(NS_MATHML_MATHVARIANT_NONE),
|
||||||
mMathStyle(NS_STYLE_MATH_STYLE_NORMAL),
|
mMathDisplay(NS_MATHML_DISPLAYSTYLE_INLINE),
|
||||||
mMinFontSizeRatio(100), // 100%
|
mMinFontSizeRatio(100), // 100%
|
||||||
mExplicitLanguage(false),
|
mExplicitLanguage(false),
|
||||||
mAllowZoomAndMinSize(true),
|
mAllowZoomAndMinSize(true),
|
||||||
@ -276,7 +276,7 @@ nsChangeHint nsStyleFont::CalcDifference(const nsStyleFont& aNewData) const {
|
|||||||
if (mSize != aNewData.mSize || mLanguage != aNewData.mLanguage ||
|
if (mSize != aNewData.mSize || mLanguage != aNewData.mLanguage ||
|
||||||
mExplicitLanguage != aNewData.mExplicitLanguage ||
|
mExplicitLanguage != aNewData.mExplicitLanguage ||
|
||||||
mMathVariant != aNewData.mMathVariant ||
|
mMathVariant != aNewData.mMathVariant ||
|
||||||
mMathStyle != aNewData.mMathStyle ||
|
mMathDisplay != aNewData.mMathDisplay ||
|
||||||
mMinFontSizeRatio != aNewData.mMinFontSizeRatio) {
|
mMinFontSizeRatio != aNewData.mMinFontSizeRatio) {
|
||||||
return NS_STYLE_HINT_REFLOW;
|
return NS_STYLE_HINT_REFLOW;
|
||||||
}
|
}
|
||||||
|
@ -114,8 +114,8 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleFont {
|
|||||||
int8_t mScriptLevel;
|
int8_t mScriptLevel;
|
||||||
// MathML mathvariant support
|
// MathML mathvariant support
|
||||||
uint8_t mMathVariant;
|
uint8_t mMathVariant;
|
||||||
// math-style support (used for MathML displaystyle)
|
// MathML displaystyle support
|
||||||
uint8_t mMathStyle;
|
uint8_t mMathDisplay;
|
||||||
|
|
||||||
// allow different min font-size for certain cases
|
// allow different min font-size for certain cases
|
||||||
uint8_t mMinFontSizeRatio; // percent * 100
|
uint8_t mMinFontSizeRatio; // percent * 100
|
||||||
|
@ -9141,14 +9141,6 @@ var gCSSProperties = {
|
|||||||
other_values: ["url(#mysym)"],
|
other_values: ["url(#mysym)"],
|
||||||
invalid_values: [],
|
invalid_values: [],
|
||||||
},
|
},
|
||||||
"math-style": {
|
|
||||||
domProp: "mathStyle",
|
|
||||||
inherited: true,
|
|
||||||
type: CSS_TYPE_LONGHAND,
|
|
||||||
initial_values: ["normal"],
|
|
||||||
other_values: ["compact"],
|
|
||||||
invalid_values: [],
|
|
||||||
},
|
|
||||||
"mix-blend-mode": {
|
"mix-blend-mode": {
|
||||||
domProp: "mixBlendMode",
|
domProp: "mixBlendMode",
|
||||||
inherited: false,
|
inherited: false,
|
||||||
|
@ -6049,13 +6049,6 @@
|
|||||||
mirror: always
|
mirror: always
|
||||||
rust: true
|
rust: true
|
||||||
|
|
||||||
# Is support for math-style enabled?
|
|
||||||
- name: layout.css.math-style.enabled
|
|
||||||
type: RelaxedAtomicBool
|
|
||||||
value: @IS_NIGHTLY_BUILD@
|
|
||||||
mirror: always
|
|
||||||
rust: true
|
|
||||||
|
|
||||||
# Pref to control whether @-moz-document rules are enabled in content pages.
|
# Pref to control whether @-moz-document rules are enabled in content pages.
|
||||||
- name: layout.css.moz-document.content.enabled
|
- name: layout.css.moz-document.content.enabled
|
||||||
type: RelaxedAtomicBool
|
type: RelaxedAtomicBool
|
||||||
|
@ -239,14 +239,14 @@ ${helpers.predefined_type(
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
${helpers.single_keyword(
|
${helpers.single_keyword(
|
||||||
"math-style",
|
"-moz-math-display",
|
||||||
"compact normal",
|
"inline block",
|
||||||
engines="gecko",
|
engines="gecko",
|
||||||
gecko_pref="layout.css.math-style.enabled",
|
gecko_constant_prefix="NS_MATHML_DISPLAYSTYLE",
|
||||||
spec="https://mathml-refresh.github.io/mathml-core/#the-math-style-property",
|
gecko_ffi_name="mMathDisplay",
|
||||||
has_effect_on_gecko_scrollbars=False,
|
|
||||||
animation_value_type="none",
|
|
||||||
enabled_in="ua",
|
enabled_in="ua",
|
||||||
|
spec="Internal (not web-exposed)",
|
||||||
|
animation_value_type="none",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
${helpers.single_keyword(
|
${helpers.single_keyword(
|
||||||
|
@ -819,14 +819,14 @@ impl ToComputedValue for specified::MozScriptLevel {
|
|||||||
type ComputedValue = MozScriptLevel;
|
type ComputedValue = MozScriptLevel;
|
||||||
|
|
||||||
fn to_computed_value(&self, cx: &Context) -> i8 {
|
fn to_computed_value(&self, cx: &Context) -> i8 {
|
||||||
use crate::properties::longhands::math_style::SpecifiedValue as MathStyleValue;
|
use crate::properties::longhands::_moz_math_display::SpecifiedValue as DisplayValue;
|
||||||
use std::{cmp, i8};
|
use std::{cmp, i8};
|
||||||
|
|
||||||
let int = match *self {
|
let int = match *self {
|
||||||
specified::MozScriptLevel::Auto => {
|
specified::MozScriptLevel::Auto => {
|
||||||
let parent = cx.builder.get_parent_font().clone__moz_script_level() as i32;
|
let parent = cx.builder.get_parent_font().clone__moz_script_level() as i32;
|
||||||
let style = cx.builder.get_parent_font().clone_math_style();
|
let display = cx.builder.get_parent_font().clone__moz_math_display();
|
||||||
if style == MathStyleValue::Compact {
|
if display == DisplayValue::Inline {
|
||||||
parent + 1
|
parent + 1
|
||||||
} else {
|
} else {
|
||||||
parent
|
parent
|
||||||
|
@ -1 +0,0 @@
|
|||||||
prefs: [layout.css.math-style.enabled: true]
|
|
@ -0,0 +1,10 @@
|
|||||||
|
[math-style-001.tentative.html]
|
||||||
|
[Specified values of math-style]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Inherited values of math-style]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Initial value of math-style]
|
||||||
|
expected: FAIL
|
||||||
|
|
@ -1 +1 @@
|
|||||||
prefs: [mathml.deprecated_style_attributes.disabled: true, mathml.deprecated_menclose_notation_radical.disabled: true, mathml.mathsize_names.disabled:true, mathml.mathspace_names.disabled: true, mathml.mfrac_linethickness_names.disabled:true, mathml.deprecated_alignment_attributes.disabled: true, mathml.script_shift_attributes.disabled: true, mathml.mfrac_bevelled_attribute.disabled: true, mathml.mfenced_element.disabled: true, layout.css.math-style.enabled: true]
|
prefs: [mathml.deprecated_style_attributes.disabled: true, mathml.deprecated_menclose_notation_radical.disabled: true, mathml.mathsize_names.disabled:true, mathml.mathspace_names.disabled: true, mathml.mfrac_linethickness_names.disabled:true, mathml.deprecated_alignment_attributes.disabled: true, mathml.script_shift_attributes.disabled: true, mathml.mfrac_bevelled_attribute.disabled: true, mathml.mfenced_element.disabled: true]
|
@ -62,6 +62,9 @@
|
|||||||
[displaystyle on the msqrt element is mapped to CSS math-style]
|
[displaystyle on the msqrt element is mapped to CSS math-style]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[displaystyle on the mstyle element is mapped to CSS math-style]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
[mathvariant on the mprescripts element is mapped to CSS text-transform]
|
[mathvariant on the mprescripts element is mapped to CSS text-transform]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
@ -113,6 +116,9 @@
|
|||||||
[displaystyle on the mi element is mapped to CSS math-style]
|
[displaystyle on the mi element is mapped to CSS math-style]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[displaystyle on the math element is mapped to CSS math-style]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
[mathvariant on the mmultiscripts element is mapped to CSS text-transform]
|
[mathvariant on the mmultiscripts element is mapped to CSS text-transform]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
@ -131,6 +137,9 @@
|
|||||||
[displaystyle on the mrow element is mapped to CSS math-style]
|
[displaystyle on the mrow element is mapped to CSS math-style]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[displaystyle on the mtable element is mapped to CSS math-style]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
[mathvariant on the annotation-xml element is mapped to CSS text-transform]
|
[mathvariant on the annotation-xml element is mapped to CSS text-transform]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -80,18 +80,18 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div>
|
<div>
|
||||||
<div style="font-size: 200px; math-style: normal">
|
<div style="font-size: 200px; math-style: display">
|
||||||
<div id="autoDisplay" style="font-size: scriptlevel(auto)"></div>
|
<div id="autoDisplay" style="font-size: scriptlevel(auto)"></div>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-size: 500px; math-style: compact">
|
<div style="font-size: 500px; math-style: inline">
|
||||||
<div id="autoInline" style="font-size: scriptlevel(auto)"></div>
|
<div id="autoInline" style="font-size: scriptlevel(auto)"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-size: 2000px;">
|
<div style="font-size: 2000px;">
|
||||||
<div style="math-style: normal; font-size: scriptlevel(7)">
|
<div style="math-style: display; font-size: scriptlevel(7)">
|
||||||
<div id="autoDisplayFrom7" style="font-size: scriptlevel(auto)"></div>
|
<div id="autoDisplayFrom7" style="font-size: scriptlevel(auto)"></div>
|
||||||
</div>
|
</div>
|
||||||
<div style="math-style: compact; font-size: scriptlevel(7)">
|
<div style="math-style: inline; font-size: scriptlevel(7)">
|
||||||
<div id="autoInlineFrom7" style="font-size: scriptlevel(auto)"></div>
|
<div id="autoInlineFrom7" style="font-size: scriptlevel(auto)"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3746">
|
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3746">
|
||||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-script-level-property">
|
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-script-level-property">
|
||||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-style-property">
|
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-style-property">
|
||||||
<meta name="assert" content="If font-size is scriptlevel('auto') and the inherited value of math-style is 'normal' then the internal scriptlevel is the one of its parent.">
|
<meta name="assert" content="If font-size is scriptlevel('auto') and the inherited value of math-style is 'display' then the internal scriptlevel is the one of its parent.">
|
||||||
<link rel="match" href="math-script-level-auto-and-math-style-001.tentative-ref.html">
|
<link rel="match" href="math-script-level-auto-and-math-style-001.tentative-ref.html">
|
||||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||||
<style>
|
<style>
|
||||||
@ -19,7 +19,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p>Test passes if you see a square of side 100 × 0.71^(0 − 0) = 100px.</p>
|
<p>Test passes if you see a square of side 100 × 0.71^(0 − 0) = 100px.</p>
|
||||||
<div class="container" style="math-style: normal;">
|
<div class="container" style="math-style: display;">
|
||||||
<div style="font-size: scriptlevel(auto)">X</div>
|
<div style="font-size: scriptlevel(auto)">X</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3746">
|
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3746">
|
||||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-script-level-property">
|
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-script-level-property">
|
||||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-style-property">
|
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-style-property">
|
||||||
<meta name="assert" content="If font-size is scriptlevel('auto') and the inherited value of math-style is 'compact' then the internal scriptlevel is the one of its parent.">
|
<meta name="assert" content="If font-size is scriptlevel('auto') and the inherited value of math-style is 'inline' then the internal scriptlevel is the one of its parent.">
|
||||||
<link rel="match" href="math-script-level-auto-and-math-style-002.tentative-ref.html">
|
<link rel="match" href="math-script-level-auto-and-math-style-002.tentative-ref.html">
|
||||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||||
<style>
|
<style>
|
||||||
@ -19,7 +19,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p>Test passes if you see a square of side 500 × 0.71^(1 − 0) = 355px.</p>
|
<p>Test passes if you see a square of side 500 × 0.71^(1 − 0) = 355px.</p>
|
||||||
<div class="container" style="math-style: compact;">
|
<div class="container" style="math-style: inline;">
|
||||||
<div style="font-size: scriptlevel(auto)">X</div>
|
<div style="font-size: scriptlevel(auto)">X</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3746">
|
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3746">
|
||||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-script-level-property">
|
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-script-level-property">
|
||||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-style-property">
|
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-style-property">
|
||||||
<meta name="assert" content="Initial value of math-style is 'compact'">
|
<meta name="assert" content="Initial value of math-style is 'inline'">
|
||||||
<link rel="match" href="math-script-level-auto-and-math-style-003.tentative-ref.html">
|
<link rel="match" href="math-script-level-auto-and-math-style-003.tentative-ref.html">
|
||||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||||
<style>
|
<style>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3746">
|
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3746">
|
||||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-script-level-property">
|
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-script-level-property">
|
||||||
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-style-property">
|
<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#the-math-style-property">
|
||||||
<meta name="assert" content="Initial value of math-style is 'compact'">
|
<meta name="assert" content="Initial value of math-style is 'inline'">
|
||||||
<link rel="match" href="math-script-level-auto-and-math-style-004.tentative-ref.html">
|
<link rel="match" href="math-script-level-auto-and-math-style-004.tentative-ref.html">
|
||||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
|
||||||
<style>
|
<style>
|
||||||
@ -20,7 +20,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<p>Test passes if you see a square of side 500 × 0.71^(1 − 0) = 355px.</p>
|
<p>Test passes if you see a square of side 500 × 0.71^(1 − 0) = 355px.</p>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div style="math-style: normal">
|
<div style="math-style: display">
|
||||||
<div style="math-style: initial">
|
<div style="math-style: initial">
|
||||||
<div style="font-size: scriptlevel(auto)">X</div>
|
<div style="font-size: scriptlevel(auto)">X</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<p>Test passes if you see a square of side 100 × 0.71^(0 − 0) = 100px.</p>
|
<p>Test passes if you see a square of side 100 × 0.71^(0 − 0) = 100px.</p>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div style="math-style: normal;">
|
<div style="math-style: display;">
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<div style="font-size: scriptlevel(auto)">X</div>
|
<div style="font-size: scriptlevel(auto)">X</div>
|
||||||
|
@ -16,15 +16,15 @@
|
|||||||
setup({ explicit_done: true });
|
setup({ explicit_done: true });
|
||||||
window.addEventListener("load", function() {
|
window.addEventListener("load", function() {
|
||||||
test(function() {
|
test(function() {
|
||||||
assert_equals(mathStyle("initial"), "normal");
|
assert_equals(mathStyle("initial"), "inline");
|
||||||
}, "Initial value of math-style");
|
}, "Initial value of math-style");
|
||||||
test(function() {
|
test(function() {
|
||||||
assert_equals(mathStyle("specifiedInline"), "compact");
|
assert_equals(mathStyle("specifiedInline"), "inline");
|
||||||
assert_equals(mathStyle("specifiedDisplay"), "normal");
|
assert_equals(mathStyle("specifiedDisplay"), "display");
|
||||||
}, "Specified values of math-style");
|
}, "Specified values of math-style");
|
||||||
test(function() {
|
test(function() {
|
||||||
assert_equals(mathStyle("inheritedInline"), "compact");
|
assert_equals(mathStyle("inheritedInline"), "inline");
|
||||||
assert_equals(mathStyle("inheritedDisplay"), "normal");
|
assert_equals(mathStyle("inheritedDisplay"), "display");
|
||||||
}, "Inherited values of math-style");
|
}, "Inherited values of math-style");
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@ -33,10 +33,10 @@
|
|||||||
<body>
|
<body>
|
||||||
<div id="log"></div>
|
<div id="log"></div>
|
||||||
<div id="initial"></div>
|
<div id="initial"></div>
|
||||||
<div id="specifiedInline" style="math-style: compact">
|
<div id="specifiedInline" style="math-style: inline">
|
||||||
<div id="inheritedInline"></div>
|
<div id="inheritedInline"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="specifiedDisplay" style="math-style: normal">
|
<div id="specifiedDisplay" style="math-style: display">
|
||||||
<div id="inheritedDisplay"></div>
|
<div id="inheritedDisplay"></div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
@ -69,11 +69,11 @@
|
|||||||
}, `scriptlevel on the ${tag} element is mapped to font-size: scriptlevel(...)`);
|
}, `scriptlevel on the ${tag} element is mapped to font-size: scriptlevel(...)`);
|
||||||
|
|
||||||
test(function() {
|
test(function() {
|
||||||
assert_equals(style.getPropertyValue("math-style"), "compact", "no attribute");
|
assert_equals(style.getPropertyValue("math-style"), "inline", "no attribute");
|
||||||
element.setAttribute("displaystyle", "true");
|
element.setAttribute("displaystyle", "true");
|
||||||
assert_equals(style.getPropertyValue("math-style"), "normal", "attribute specified");
|
assert_equals(style.getPropertyValue("math-style"), "display", "attribute specified");
|
||||||
element.setAttribute("displaystyle", "TrUe");
|
element.setAttribute("displaystyle", "TrUe");
|
||||||
assert_equals(style.getPropertyValue("math-style"), "normal", "case insensitive");
|
assert_equals(style.getPropertyValue("math-style"), "display", "case insensitive");
|
||||||
}, `displaystyle on the ${tag} element is mapped to CSS math-style`);
|
}, `displaystyle on the ${tag} element is mapped to CSS math-style`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
</math>
|
</math>
|
||||||
</p>
|
</p>
|
||||||
<p>displaystyle:
|
<p>displaystyle:
|
||||||
<math style="math-style: compact">
|
<math style="math-style: inline">
|
||||||
<munder>
|
<munder>
|
||||||
<mo movablelimits="true">X</mo>
|
<mo movablelimits="true">X</mo>
|
||||||
<mo>X</mo>
|
<mo>X</mo>
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
</math>
|
</math>
|
||||||
</p>
|
</p>
|
||||||
<p>displaystyle:
|
<p>displaystyle:
|
||||||
<math displaystyle="true" style="math-style: compact">
|
<math displaystyle="true" style="math-style: inline">
|
||||||
<munder>
|
<munder>
|
||||||
<mo movablelimits="true">X</mo>
|
<mo movablelimits="true">X</mo>
|
||||||
<mo>X</mo>
|
<mo>X</mo>
|
||||||
|
Loading…
Reference in New Issue
Block a user