Backed out changeset 0da5103ba772 (bug 1665975) for mozglue_static::panic_hook mass crashes CLOSED TREE

This commit is contained in:
Bogdan Tara 2020-09-21 10:07:03 +03:00
parent 1ac695dbdc
commit 2991b8c066
29 changed files with 96 additions and 92 deletions

View File

@ -216,7 +216,7 @@ exports.ANIMATION_TYPE_FOR_LONGHANDS = [
"margin-block-start",
"margin-inline-end",
"margin-inline-start",
"math-style",
"-moz-math-display",
"max-block-size",
"max-inline-size",
"min-block-size",

View File

@ -26,22 +26,22 @@ math {
letter-spacing: normal;
text-rendering: optimizeLegibility;
-moz-float-edge: margin-box;
math-style: compact;
-moz-math-display: inline;
}
math[display="block" i] {
display: block;
text-align: -moz-center;
math-style: normal;
-moz-math-display: block;
}
math[display="inline" i] {
display: inline;
math-style: compact;
-moz-math-display: inline;
}
math[displaystyle="false" i] {
math-style: compact;
-moz-math-display: inline;
}
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
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.
*/
/*
Map mstyle@displaystyle to math-style.
Map mstyle@displaystyle to -moz-math-display.
*/
mstyle[displaystyle="false" i] {
math-style: compact;
-moz-math-display: inline;
}
mstyle[displaystyle="true" i] {
math-style: normal;
-moz-math-display: block;
}
/* munder, mover and munderover change the scriptlevels of their children
@ -250,7 +250,7 @@ mstyle[displaystyle="true" i] {
*/
mfrac > * {
-moz-script-level: auto;
math-style: compact;
-moz-math-display: inline;
}
/*
@ -260,7 +260,7 @@ mfrac > * {
*/
mroot > :not(:first-child) {
-moz-script-level: +2;
math-style: compact;
-moz-math-display: inline;
}
/*
@ -284,7 +284,7 @@ msup > :not(:first-child),
msubsup > :not(:first-child),
mmultiscripts > :not(:first-child) {
-moz-script-level: +1;
math-style: compact;
-moz-math-display: inline;
}
/*
@ -304,7 +304,7 @@ mmultiscripts > :not(:first-child) {
munder > :not(:first-child),
mover > :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
mtable element sets displaystyle to "false" within the table elements.
*/
mtable { math-style: compact; }
mtable[displaystyle="true" i] { math-style: normal; }
mtable { -moz-math-display: inline; }
mtable[displaystyle="true" i] { -moz-math-display: block; }
/*
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.
mscarries {
-moz-script-level: +1;
math-style: compact;
-moz-math-display: inline;
}
*/

View File

@ -367,9 +367,9 @@ nsresult nsMathMLmencloseFrame::PlaceInternal(DrawTarget* aDrawTarget,
if (delta) padding += onePixel - delta; // round up
if (IsToDraw(NOTATION_LONGDIV) || IsToDraw(NOTATION_RADICAL)) {
GetRadicalParameters(fm,
StyleFont()->mMathStyle == NS_STYLE_MATH_STYLE_NORMAL,
mRadicalRuleThickness, leading, psi);
GetRadicalParameters(
fm, StyleFont()->mMathDisplay == NS_MATHML_DISPLAYSTYLE_BLOCK,
mRadicalRuleThickness, leading, psi);
// make sure that the rule appears on on screen
if (mRadicalRuleThickness < onePixel) {

View File

@ -51,7 +51,7 @@ eMathMLFrameType nsMathMLmfracFrame::GetMathMLFrameType() {
}
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)) {
return 1;
}
@ -67,7 +67,7 @@ nsMathMLmfracFrame::TransmitAutomaticData() {
// If displaystyle is false, then scriptlevel is incremented, so notify the
// children of this.
if (StyleFont()->mMathStyle == NS_STYLE_MATH_STYLE_COMPACT) {
if (!StyleFont()->mMathDisplay) {
PropagateFrameFlagFor(mFrames.FirstChild(),
NS_FRAME_MATHML_SCRIPT_DESCENDANT);
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) {
mLineRect.height = mLineThickness;
@ -511,7 +511,7 @@ nsresult nsMathMLmfracFrame::PlaceInternal(DrawTarget* aDrawTarget,
denShift += delta;
}
if (StyleFont()->mMathStyle == NS_STYLE_MATH_STYLE_NORMAL) {
if (StyleFont()->mMathDisplay == NS_MATHML_DISPLAYSTYLE_BLOCK) {
delta =
std::min(bmDen.ascent + bmDen.descent, bmNum.ascent + bmNum.descent) /
2;

View File

@ -268,7 +268,7 @@ nsresult nsMathMLmmultiscriptsFrame::PlaceMultiScript(
// get sup script shift depending on current script level and display style
// Rule 18c, App. G, TeXbook
if (font->mScriptLevel == 0 &&
font->mMathStyle == NS_STYLE_MATH_STYLE_NORMAL &&
font->mMathDisplay == NS_MATHML_DISPLAYSTYLE_BLOCK &&
!NS_MATHML_IS_COMPRESSED(presentationData.flags)) {
// Style D in TeXbook
supScriptShift = supScriptShift1;

View File

@ -542,7 +542,7 @@ static uint32_t GetStretchHint(nsOperatorFlags aFlags,
// stretchy are true or false (see bug 69325).
// . largeopOnly is taken if largeop=true and stretchy=false
// . 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)) {
stretchHint = NS_STRETCH_LARGEOP; // (largeopOnly, not mask!)
if (NS_MATHML_OPERATOR_IS_INTEGRAL(aFlags)) {
@ -938,7 +938,8 @@ nsresult nsMathMLmoFrame::Place(DrawTarget* aDrawTarget, bool aPlaceOrigin,
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()) {
nsBoundingMetrics newMetrics;
rv = mMathMLChar.Stretch(

View File

@ -203,9 +203,9 @@ void nsMathMLmrootFrame::Reflow(nsPresContext* aPresContext,
nsLayoutUtils::GetFontMetricsForFrame(this, fontSizeInflation);
nscoord ruleThickness, leading, psi;
GetRadicalParameters(fm,
StyleFont()->mMathStyle == NS_STYLE_MATH_STYLE_NORMAL,
ruleThickness, leading, psi);
GetRadicalParameters(
fm, StyleFont()->mMathDisplay == NS_MATHML_DISPLAYSTYLE_BLOCK,
ruleThickness, leading, psi);
// built-in: adjust clearance psi to emulate \mathstrut using '1' (TexBook,
// p.131)

View File

@ -55,7 +55,7 @@ nsMathMLmunderoverFrame::UpdatePresentationData(uint32_t aFlagsValues,
// disable the stretch-all flag if we are going to act like a
// subscript-superscript pair
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;
} else {
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 =
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
if (subsupDisplay) {
@ -349,7 +349,7 @@ The REC says:
i.e.,:
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
}
else {
@ -363,7 +363,7 @@ nsresult nsMathMLmunderoverFrame::Place(DrawTarget* aDrawTarget,
ReflowOutput& aDesiredSize) {
float fontSizeInflation = nsLayoutUtils::FontSizeInflationFor(this);
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
if (mContent->IsMathMLElement(nsGkAtoms::munderover_)) {
return nsMathMLmmultiscriptsFrame::PlaceMultiScript(

View File

@ -420,9 +420,9 @@ enum class StyleGridTrackBreadth : uint8_t {
#define NS_MATHML_MATHVARIANT_LOOPED 17
#define NS_MATHML_MATHVARIANT_STRETCHED 18
// See nsStyleFont::mMathStyle
#define NS_STYLE_MATH_STYLE_COMPACT 0
#define NS_STYLE_MATH_STYLE_NORMAL 1
// See nsStyleFont::mMathDisplay
#define NS_MATHML_DISPLAYSTYLE_INLINE 0
#define NS_MATHML_DISPLAYSTYLE_BLOCK 1
// See nsStyleDisplay.mPosition
enum class StylePositionProperty : uint8_t {

View File

@ -228,7 +228,7 @@ nsStyleFont::nsStyleFont(const nsStyleFont& aSrc)
mGenericID(aSrc.mGenericID),
mScriptLevel(aSrc.mScriptLevel),
mMathVariant(aSrc.mMathVariant),
mMathStyle(aSrc.mMathStyle),
mMathDisplay(aSrc.mMathDisplay),
mMinFontSizeRatio(aSrc.mMinFontSizeRatio),
mExplicitLanguage(aSrc.mExplicitLanguage),
mAllowZoomAndMinSize(aSrc.mAllowZoomAndMinSize),
@ -249,7 +249,7 @@ nsStyleFont::nsStyleFont(const Document& aDocument)
mGenericID(StyleGenericFontFamily::None),
mScriptLevel(0),
mMathVariant(NS_MATHML_MATHVARIANT_NONE),
mMathStyle(NS_STYLE_MATH_STYLE_NORMAL),
mMathDisplay(NS_MATHML_DISPLAYSTYLE_INLINE),
mMinFontSizeRatio(100), // 100%
mExplicitLanguage(false),
mAllowZoomAndMinSize(true),
@ -276,7 +276,7 @@ nsChangeHint nsStyleFont::CalcDifference(const nsStyleFont& aNewData) const {
if (mSize != aNewData.mSize || mLanguage != aNewData.mLanguage ||
mExplicitLanguage != aNewData.mExplicitLanguage ||
mMathVariant != aNewData.mMathVariant ||
mMathStyle != aNewData.mMathStyle ||
mMathDisplay != aNewData.mMathDisplay ||
mMinFontSizeRatio != aNewData.mMinFontSizeRatio) {
return NS_STYLE_HINT_REFLOW;
}

View File

@ -114,8 +114,8 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleFont {
int8_t mScriptLevel;
// MathML mathvariant support
uint8_t mMathVariant;
// math-style support (used for MathML displaystyle)
uint8_t mMathStyle;
// MathML displaystyle support
uint8_t mMathDisplay;
// allow different min font-size for certain cases
uint8_t mMinFontSizeRatio; // percent * 100

View File

@ -9141,14 +9141,6 @@ var gCSSProperties = {
other_values: ["url(#mysym)"],
invalid_values: [],
},
"math-style": {
domProp: "mathStyle",
inherited: true,
type: CSS_TYPE_LONGHAND,
initial_values: ["normal"],
other_values: ["compact"],
invalid_values: [],
},
"mix-blend-mode": {
domProp: "mixBlendMode",
inherited: false,

View File

@ -6049,13 +6049,6 @@
mirror: always
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.
- name: layout.css.moz-document.content.enabled
type: RelaxedAtomicBool

View File

@ -239,14 +239,14 @@ ${helpers.predefined_type(
)}
${helpers.single_keyword(
"math-style",
"compact normal",
"-moz-math-display",
"inline block",
engines="gecko",
gecko_pref="layout.css.math-style.enabled",
spec="https://mathml-refresh.github.io/mathml-core/#the-math-style-property",
has_effect_on_gecko_scrollbars=False,
animation_value_type="none",
gecko_constant_prefix="NS_MATHML_DISPLAYSTYLE",
gecko_ffi_name="mMathDisplay",
enabled_in="ua",
spec="Internal (not web-exposed)",
animation_value_type="none",
)}
${helpers.single_keyword(

View File

@ -819,14 +819,14 @@ impl ToComputedValue for specified::MozScriptLevel {
type ComputedValue = MozScriptLevel;
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};
let int = match *self {
specified::MozScriptLevel::Auto => {
let parent = cx.builder.get_parent_font().clone__moz_script_level() as i32;
let style = cx.builder.get_parent_font().clone_math_style();
if style == MathStyleValue::Compact {
let display = cx.builder.get_parent_font().clone__moz_math_display();
if display == DisplayValue::Inline {
parent + 1
} else {
parent

View File

@ -1 +0,0 @@
prefs: [layout.css.math-style.enabled: true]

View File

@ -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

View File

@ -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]

View File

@ -62,6 +62,9 @@
[displaystyle on the msqrt element is mapped to CSS math-style]
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]
expected: FAIL
@ -113,6 +116,9 @@
[displaystyle on the mi element is mapped to CSS math-style]
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]
expected: FAIL
@ -131,6 +137,9 @@
[displaystyle on the mrow element is mapped to CSS math-style]
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]
expected: FAIL

View File

@ -80,18 +80,18 @@
<div>
<div class="container">
<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>
<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>
</div>
<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>
<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>
</div>

View File

@ -6,7 +6,7 @@
<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-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="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
@ -19,7 +19,7 @@
</head>
<body>
<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>
</body>

View File

@ -6,7 +6,7 @@
<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-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="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
@ -19,7 +19,7 @@
</head>
<body>
<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>
</body>

View File

@ -6,7 +6,7 @@
<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-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="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>

View File

@ -6,7 +6,7 @@
<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-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="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
@ -20,7 +20,7 @@
<body>
<p>Test passes if you see a square of side 500 × 0.71^(1 0) = 355px.</p>
<div class="container">
<div style="math-style: normal">
<div style="math-style: display">
<div style="math-style: initial">
<div style="font-size: scriptlevel(auto)">X</div>
</div>

View File

@ -20,7 +20,7 @@
<body>
<p>Test passes if you see a square of side 100 × 0.71^(0 0) = 100px.</p>
<div class="container">
<div style="math-style: normal;">
<div style="math-style: display;">
<div>
<div>
<div style="font-size: scriptlevel(auto)">X</div>

View File

@ -16,15 +16,15 @@
setup({ explicit_done: true });
window.addEventListener("load", function() {
test(function() {
assert_equals(mathStyle("initial"), "normal");
assert_equals(mathStyle("initial"), "inline");
}, "Initial value of math-style");
test(function() {
assert_equals(mathStyle("specifiedInline"), "compact");
assert_equals(mathStyle("specifiedDisplay"), "normal");
assert_equals(mathStyle("specifiedInline"), "inline");
assert_equals(mathStyle("specifiedDisplay"), "display");
}, "Specified values of math-style");
test(function() {
assert_equals(mathStyle("inheritedInline"), "compact");
assert_equals(mathStyle("inheritedDisplay"), "normal");
assert_equals(mathStyle("inheritedInline"), "inline");
assert_equals(mathStyle("inheritedDisplay"), "display");
}, "Inherited values of math-style");
done();
});
@ -33,10 +33,10 @@
<body>
<div id="log"></div>
<div id="initial"></div>
<div id="specifiedInline" style="math-style: compact">
<div id="specifiedInline" style="math-style: inline">
<div id="inheritedInline"></div>
</div>
<div id="specifiedDisplay" style="math-style: normal">
<div id="specifiedDisplay" style="math-style: display">
<div id="inheritedDisplay"></div>
</div>
</body>

View File

@ -69,11 +69,11 @@
}, `scriptlevel on the ${tag} element is mapped to font-size: scriptlevel(...)`);
test(function() {
assert_equals(style.getPropertyValue("math-style"), "compact", "no attribute");
assert_equals(style.getPropertyValue("math-style"), "inline", "no attribute");
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");
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`);
});

View File

@ -46,7 +46,7 @@
</math>
</p>
<p>displaystyle:
<math style="math-style: compact">
<math style="math-style: inline">
<munder>
<mo movablelimits="true">X</mo>
<mo>X</mo>

View File

@ -56,7 +56,7 @@
</math>
</p>
<p>displaystyle:
<math displaystyle="true" style="math-style: compact">
<math displaystyle="true" style="math-style: inline">
<munder>
<mo movablelimits="true">X</mo>
<mo>X</mo>