diff --git a/accessible/tests/mochitest/textattrs/test_mathml.html b/accessible/tests/mochitest/textattrs/test_mathml.html index 14a8decc9dd4..e6936ebc7f11 100644 --- a/accessible/tests/mochitest/textattrs/test_mathml.html +++ b/accessible/tests/mochitest/textattrs/test_mathml.html @@ -21,20 +21,11 @@ testTextAttrs(id, 0, {}, defAttrs, 0, 1); } - // These elements contain a surrogate pair, so the end offset is 2. - for (const id of ["mn_double_struck", "mi_italic"]) { - testTextAttrs(id, 0, {}, defAttrs, 0, 2); - } - SimpleTest.finish(); } SimpleTest.waitForExplicitFinish(); - SpecialPowers.pushPrefEnv({ - set: [["mathml.legacy_mathvariant_attribute.disabled", true]], - }).then(() => { - addA11yLoadEvent(doTest); - }); + addA11yLoadEvent(doTest); @@ -46,9 +37,7 @@ 1 - x - 𝟙 - x + x a a diff --git a/devtools/shared/css/generated/properties-db.js b/devtools/shared/css/generated/properties-db.js index 26337850f193..37e1c37e03c7 100644 --- a/devtools/shared/css/generated/properties-db.js +++ b/devtools/shared/css/generated/properties-db.js @@ -11783,7 +11783,6 @@ exports.CSS_PROPERTIES = { "inherit", "initial", "lowercase", - "math-auto", "none", "revert", "revert-layer", diff --git a/dom/mathml/MathMLElement.cpp b/dom/mathml/MathMLElement.cpp index 42892d22f23c..55f6c5b0264b 100644 --- a/dom/mathml/MathMLElement.cpp +++ b/dom/mathml/MathMLElement.cpp @@ -126,13 +126,10 @@ bool MathMLElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute, // https://mathml-refresh.github.io/mathml-core/#global-attributes static Element::MappedAttributeEntry sGlobalAttributes[] = { - {nsGkAtoms::dir}, - {nsGkAtoms::mathbackground_}, - {nsGkAtoms::mathcolor_}, - {nsGkAtoms::mathsize_}, - {nsGkAtoms::scriptlevel_}, - {nsGkAtoms::displaystyle_}, - {nullptr}}; + {nsGkAtoms::dir}, {nsGkAtoms::mathbackground_}, + {nsGkAtoms::mathcolor_}, {nsGkAtoms::mathsize_}, + {nsGkAtoms::mathvariant_}, {nsGkAtoms::scriptlevel_}, + {nsGkAtoms::displaystyle_}, {nullptr}}; bool MathMLElement::IsAttributeMapped(const nsAtom* aAttribute) const { MOZ_ASSERT(IsMathMLElement()); @@ -144,9 +141,6 @@ bool MathMLElement::IsAttributeMapped(const nsAtom* aAttribute) const { aAttribute == nsGkAtoms::scriptminsize_) || (!StaticPrefs::mathml_scriptsizemultiplier_attribute_disabled() && aAttribute == nsGkAtoms::scriptsizemultiplier_) || - ((!StaticPrefs::mathml_legacy_mathvariant_attribute_disabled() || - mNodeInfo->Equals(nsGkAtoms::mi_)) && - aAttribute == nsGkAtoms::mathvariant_) || (mNodeInfo->Equals(nsGkAtoms::mtable_) && aAttribute == nsGkAtoms::width); } @@ -155,10 +149,6 @@ nsMapRuleToAttributesFunc MathMLElement::GetAttributeMappingFunction() const { if (mNodeInfo->Equals(nsGkAtoms::mtable_)) { return &MapMTableAttributesInto; } - if (StaticPrefs::mathml_legacy_mathvariant_attribute_disabled() && - mNodeInfo->Equals(nsGkAtoms::mi_)) { - return &MapMiAttributesInto; - } return &MapGlobalMathMLAttributesInto; } @@ -396,24 +386,6 @@ void MathMLElement::MapMTableAttributesInto( MapGlobalMathMLAttributesInto(aBuilder); } -void MathMLElement::MapMiAttributesInto(MappedDeclarationsBuilder& aBuilder) { - MOZ_ASSERT(StaticPrefs::mathml_scriptminsize_attribute_disabled()); - // mathvariant - // https://w3c.github.io/mathml-core/#dfn-mathvariant - if (!aBuilder.PropertyIsSet(eCSSProperty_text_transform)) { - const nsAttrValue* value = aBuilder.GetAttr(nsGkAtoms::mathvariant_); - if (value && value->Type() == nsAttrValue::eString) { - auto str = value->GetStringValue(); - str.CompressWhitespace(); - if (value->GetStringValue().LowerCaseEqualsASCII("normal")) { - aBuilder.SetKeywordValue(eCSSProperty_text_transform, - StyleTextTransformCase::None); - } - } - } - MapGlobalMathMLAttributesInto(aBuilder); -} - void MathMLElement::MapGlobalMathMLAttributesInto( MappedDeclarationsBuilder& aBuilder) { // scriptsizemultiplier @@ -528,65 +500,63 @@ void MathMLElement::MapGlobalMathMLAttributesInto( } } - if (!StaticPrefs::mathml_legacy_mathvariant_attribute_disabled()) { - // mathvariant - // - // "Specifies the logical class of the token. Note that this class is more - // than styling, it typically conveys semantic intent;" - // - // values: "normal" | "bold" | "italic" | "bold-italic" | "double-struck" | - // "bold-fraktur" | "script" | "bold-script" | "fraktur" | "sans-serif" | - // "bold-sans-serif" | "sans-serif-italic" | "sans-serif-bold-italic" | - // "monospace" | "initial" | "tailed" | "looped" | "stretched" - // default: normal (except on ) - // - value = aBuilder.GetAttr(nsGkAtoms::mathvariant_); - if (value && value->Type() == nsAttrValue::eString && - !aBuilder.PropertyIsSet(eCSSProperty__moz_math_variant)) { - auto str = value->GetStringValue(); - str.CompressWhitespace(); - static const char sizes[19][23] = {"normal", - "bold", - "italic", - "bold-italic", - "script", - "bold-script", - "fraktur", - "double-struck", - "bold-fraktur", - "sans-serif", - "bold-sans-serif", - "sans-serif-italic", - "sans-serif-bold-italic", - "monospace", - "initial", - "tailed", - "looped", - "stretched"}; - static const StyleMathVariant values[MOZ_ARRAY_LENGTH(sizes)] = { - StyleMathVariant::Normal, - StyleMathVariant::Bold, - StyleMathVariant::Italic, - StyleMathVariant::BoldItalic, - StyleMathVariant::Script, - StyleMathVariant::BoldScript, - StyleMathVariant::Fraktur, - StyleMathVariant::DoubleStruck, - StyleMathVariant::BoldFraktur, - StyleMathVariant::SansSerif, - StyleMathVariant::BoldSansSerif, - StyleMathVariant::SansSerifItalic, - StyleMathVariant::SansSerifBoldItalic, - StyleMathVariant::Monospace, - StyleMathVariant::Initial, - StyleMathVariant::Tailed, - StyleMathVariant::Looped, - StyleMathVariant::Stretched}; - for (uint32_t i = 0; i < ArrayLength(sizes); ++i) { - if (str.LowerCaseEqualsASCII(sizes[i])) { - aBuilder.SetKeywordValue(eCSSProperty__moz_math_variant, values[i]); - break; - } + // mathvariant + // + // "Specifies the logical class of the token. Note that this class is more + // than styling, it typically conveys semantic intent;" + // + // values: "normal" | "bold" | "italic" | "bold-italic" | "double-struck" | + // "bold-fraktur" | "script" | "bold-script" | "fraktur" | "sans-serif" | + // "bold-sans-serif" | "sans-serif-italic" | "sans-serif-bold-italic" | + // "monospace" | "initial" | "tailed" | "looped" | "stretched" + // default: normal (except on ) + // + value = aBuilder.GetAttr(nsGkAtoms::mathvariant_); + if (value && value->Type() == nsAttrValue::eString && + !aBuilder.PropertyIsSet(eCSSProperty__moz_math_variant)) { + auto str = value->GetStringValue(); + str.CompressWhitespace(); + static const char sizes[19][23] = {"normal", + "bold", + "italic", + "bold-italic", + "script", + "bold-script", + "fraktur", + "double-struck", + "bold-fraktur", + "sans-serif", + "bold-sans-serif", + "sans-serif-italic", + "sans-serif-bold-italic", + "monospace", + "initial", + "tailed", + "looped", + "stretched"}; + static const StyleMathVariant values[MOZ_ARRAY_LENGTH(sizes)] = { + StyleMathVariant::Normal, + StyleMathVariant::Bold, + StyleMathVariant::Italic, + StyleMathVariant::BoldItalic, + StyleMathVariant::Script, + StyleMathVariant::BoldScript, + StyleMathVariant::Fraktur, + StyleMathVariant::DoubleStruck, + StyleMathVariant::BoldFraktur, + StyleMathVariant::SansSerif, + StyleMathVariant::BoldSansSerif, + StyleMathVariant::SansSerifItalic, + StyleMathVariant::SansSerifBoldItalic, + StyleMathVariant::Monospace, + StyleMathVariant::Initial, + StyleMathVariant::Tailed, + StyleMathVariant::Looped, + StyleMathVariant::Stretched}; + for (uint32_t i = 0; i < ArrayLength(sizes); ++i) { + if (str.LowerCaseEqualsASCII(sizes[i])) { + aBuilder.SetKeywordValue(eCSSProperty__moz_math_variant, values[i]); + break; } } } diff --git a/dom/mathml/MathMLElement.h b/dom/mathml/MathMLElement.h index 3773b839ccda..3ac0e5fd136b 100644 --- a/dom/mathml/MathMLElement.h +++ b/dom/mathml/MathMLElement.h @@ -57,7 +57,6 @@ class MathMLElement final : public MathMLElementBase, public Link { static void MapGlobalMathMLAttributesInto( mozilla::MappedDeclarationsBuilder&); - static void MapMiAttributesInto(mozilla::MappedDeclarationsBuilder&); static void MapMTableAttributesInto(mozilla::MappedDeclarationsBuilder&); void GetEventTargetParent(mozilla::EventChainPreVisitor& aVisitor) override; diff --git a/layout/generic/MathMLTextRunFactory.cpp b/layout/generic/MathMLTextRunFactory.cpp index 1cd293c7ed3d..a04062ba802d 100644 --- a/layout/generic/MathMLTextRunFactory.cpp +++ b/layout/generic/MathMLTextRunFactory.cpp @@ -171,8 +171,7 @@ static uint32_t MathvarMappingSearch(uint32_t aKey, http://lists.w3.org/Archives/Public/www-math/2013Sep/0012.html and https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols */ -/*static */ uint32_t MathMLTextRunFactory::MathVariant( - uint32_t aCh, StyleMathVariant aMathVar) { +static uint32_t MathVariant(uint32_t aCh, StyleMathVariant aMathVar) { uint32_t baseChar; enum CharacterType { kIsLatin, @@ -525,9 +524,7 @@ void MathMLTextRunFactory::RebuildTextRun( int extraChars = 0; mathVar = styles[i]->mMathVariant; - if (singleCharMI && mathVar == StyleMathVariant::None && - (!StaticPrefs::mathml_legacy_mathvariant_attribute_disabled() || - styles[i]->mTextTransform.case_ == StyleTextTransformCase::MathAuto)) { + if (singleCharMI && mathVar == StyleMathVariant::None) { mathVar = StyleMathVariant::Italic; } diff --git a/layout/generic/MathMLTextRunFactory.h b/layout/generic/MathMLTextRunFactory.h index 5d2cf8d59d40..79ef0dae1684 100644 --- a/layout/generic/MathMLTextRunFactory.h +++ b/layout/generic/MathMLTextRunFactory.h @@ -25,7 +25,6 @@ class MathMLTextRunFactory : public nsTransformingTextRunFactory { mFontInflation(aFontInflation), mSSTYScriptLevel(aSSTYScriptLevel) {} - static uint32_t MathVariant(uint32_t aCh, StyleMathVariant aMathVar); virtual void RebuildTextRun(nsTransformedTextRun* aTextRun, mozilla::gfx::DrawTarget* aRefDrawTarget, gfxMissingFontRecorder* aMFR) override; diff --git a/layout/generic/nsTextRunTransformations.cpp b/layout/generic/nsTextRunTransformations.cpp index 47749e674c21..5dd85fe61f38 100644 --- a/layout/generic/nsTextRunTransformations.cpp +++ b/layout/generic/nsTextRunTransformations.cpp @@ -10,11 +10,9 @@ #include "GreekCasing.h" #include "IrishCasing.h" -#include "MathMLTextRunFactory.h" #include "mozilla/ComputedStyleInlines.h" #include "mozilla/MemoryReporting.h" #include "mozilla/StaticPrefs_layout.h" -#include "mozilla/StaticPrefs_mathml.h" #include "mozilla/TextEditor.h" #include "mozilla/gfx/2D.h" #include "nsGkAtoms.h" @@ -352,7 +350,6 @@ bool nsCaseTransformTextRunFactory::TransformString( if (i < length - 1 && NS_IS_SURROGATE_PAIR(ch, str[i + 1])) { ch = SURROGATE_TO_UCS4(ch, str[i + 1]); } - const uint32_t originalCh = ch; // Skip case transform if we're masking current character. if (!maskPassword) { @@ -723,31 +720,6 @@ bool nsCaseTransformTextRunFactory::TransformString( } break; - case StyleTextTransformCase::MathAuto: - // text-transform: math-auto is used for automatic italicization of - // single-char elements. However, some legacy cases (italic style - // fallback and with leading/trailing whitespace) are still - // handled in MathMLTextRunFactory. - if (length == 1) { - uint32_t ch2 = - MathMLTextRunFactory::MathVariant(ch, StyleMathVariant::Italic); - if (StaticPrefs::mathml_mathvariant_styling_fallback_disabled()) { - ch = ch2; - } else if (ch2 != ch) { - // Bug 930504. Some platforms do not have fonts for Mathematical - // Alphanumeric Symbols. Hence we only perform the transform if a - // character is actually available. - FontMatchType matchType; - RefPtr mathFont = - aTextRun->GetFontGroup()->FindFontForChar( - ch2, 0, 0, intl::Script::COMMON, nullptr, &matchType); - if (mathFont) { - ch = ch2; - } - } - } - break; - default: MOZ_ASSERT_UNREACHABLE("all cases should be handled"); break; @@ -821,7 +793,6 @@ bool nsCaseTransformTextRunFactory::TransformString( } if (IS_IN_BMP(ch)) { - MOZ_ASSERT(IS_IN_BMP(originalCh)); aConvertedString.Append(maskPassword ? mask : ch); } else { if (maskPassword) { @@ -833,12 +804,10 @@ bool nsCaseTransformTextRunFactory::TransformString( aConvertedString.Append(L_SURROGATE(ch)); } ++extraChars; - if (!IS_IN_BMP(originalCh)) { - // Skip the trailing surrogate. - ++aOffsetInTextRun; - ++i; - aDeletedCharsArray.AppendElement(true); - } + ++i; + ++aOffsetInTextRun; + // Skip the trailing surrogate. + aDeletedCharsArray.AppendElement(true); } while (extraChars-- > 0) { diff --git a/layout/mathml/mathml.css b/layout/mathml/mathml.css index 7e8ede157299..597aedabb778 100644 --- a/layout/mathml/mathml.css +++ b/layout/mathml/mathml.css @@ -328,11 +328,3 @@ mphantom { display: none; } } - -@media (-moz-mathml-core-mi) { - /* Implement MathML Core's automatic italic on mi. - https://w3c.github.io/mathml-core/#the-mathvariant-attribute */ - mi { - text-transform: math-auto; - } -} diff --git a/layout/reftests/mathml/reftest.list b/layout/reftests/mathml/reftest.list index df268967ba76..5b76d6439156 100644 --- a/layout/reftests/mathml/reftest.list +++ b/layout/reftests/mathml/reftest.list @@ -13,7 +13,7 @@ pref(mathml.scriptminsize_attribute.disabled,false) pref(mathml.scriptsizemultip == 373533-3.xhtml about:blank == 393760-1.xml 393760-1-ref.xml fuzzy(0-2,0-529) == 393760-2.xml 393760-2-ref.xml -pref(mathml.legacy_mathvariant_attribute.disabled,false) == 414123.xhtml 414123-ref.xhtml +== 414123.xhtml 414123-ref.xhtml == dir-1.html dir-1-ref.html == dir-2.html dir-2-ref.html random-if(gtkWidget) == dir-3.html dir-3-ref.html # bug 1309426 @@ -29,8 +29,8 @@ random-if(smallScreen&&Android) fuzzy(0-255,0-200) fuzzy-if(geckoview,201-216,20 == dynamic-mi.xhtml dynamic-mi-ref.xhtml == mphantom-1.html mphantom-1-ref.html == mphantom-2.html mphantom-2-ref.html -pref(mathml.legacy_mathvariant_attribute.disabled,false) == mi-mathvariant-1.xhtml mi-mathvariant-1-ref.xhtml -pref(mathml.legacy_mathvariant_attribute.disabled,false) == mi-mathvariant-2.xhtml mi-mathvariant-2-ref.xhtml +== mi-mathvariant-1.xhtml mi-mathvariant-1-ref.xhtml +== mi-mathvariant-2.xhtml mi-mathvariant-2-ref.xhtml != mi-mathvariant-3.html mi-mathvariant-3-ref.html != non-spacing-accent-1.xhtml non-spacing-accent-1-ref.xhtml == overbar-width-1.xhtml overbar-width-1-ref.xhtml @@ -114,9 +114,9 @@ fails-if(OSX>=1010) == scale-stretchy-3.xhtml scale-stretchy-3-ref.xhtml == mpadded-5.html mpadded-5-ref.html == mpadded-1-2.html mpadded-1-2-ref.html == mpadded-6.html mpadded-6-ref.html -pref(mathml.legacy_mathvariant_attribute.disabled,false) random-if(gtkWidget) fails-if(geckoview&&device) == mpadded-7.html mpadded-7-ref.html # bug 1309430 -pref(mathml.legacy_mathvariant_attribute.disabled,false) random-if(gtkWidget) == mpadded-8.html mpadded-8-ref.html # bug 1309430 -pref(mathml.legacy_mathvariant_attribute.disabled,false) random-if(gtkWidget) == mpadded-9.html mpadded-9-ref.html # bug 1309430 +random-if(gtkWidget) fails-if(geckoview&&device) == mpadded-7.html mpadded-7-ref.html # bug 1309430 +random-if(gtkWidget) == mpadded-8.html mpadded-8-ref.html # bug 1309430 +random-if(gtkWidget) == mpadded-9.html mpadded-9-ref.html # bug 1309430 pref(mathml.scriptsizemultiplier_attribute.disabled,false) == scriptlevel-1.html scriptlevel-1-ref.html == scriptlevel-movablelimits-1.html scriptlevel-movablelimits-1-ref.html == munderover-align-accent-false.html munderover-align-accent-false-ref.html @@ -245,16 +245,16 @@ fuzzy-if(d2d,0-7,0-1) == menclose-6-updiagonalstrike.html menclose-6-ref.html == menclose-6-phasorangle.html menclose-6-ref.html == mmultiscript-align.html mmultiscript-align-ref.html fails-if(winWidget) fuzzy-if(gtkWidget,255-255,776226-776226) == subscript-italic-correction.html subscript-italic-correction-ref.html # bug 961482 (Windows), bug 1599640 (Linux) -pref(mathml.legacy_mathvariant_attribute.disabled,false) fails-if(Android&&emulator) == mathvariant-1a.html mathvariant-1a-ref.html # Bug 1010679, Bug 1392106 -pref(mathml.legacy_mathvariant_attribute.disabled,false) fails-if(Android&&emulator) == mathvariant-1b.html mathvariant-1b-ref.html # Bug 1010679, Bug 1392106 -pref(mathml.legacy_mathvariant_attribute.disabled,false) fails-if(Android&&emulator) == mathvariant-1c.html mathvariant-1c-ref.html # Bug 1010679, Bug 1392106 -pref(mathml.legacy_mathvariant_attribute.disabled,false) == mathvariant-1d.html mathvariant-1d-ref.html -pref(mathml.legacy_mathvariant_attribute.disabled,false) fails-if(Android&&emulator) == mathvariant-2.html mathvariant-2-ref.html # Bug 1010679 -pref(mathml.legacy_mathvariant_attribute.disabled,false) == mathvariant-4.html mathvariant-4-ref.html -pref(mathml.legacy_mathvariant_attribute.disabled,false) == mathvariant-5.html mathvariant-5-ref.html +fails-if(Android&&emulator) == mathvariant-1a.html mathvariant-1a-ref.html # Bug 1010679, Bug 1392106 +fails-if(Android&&emulator) == mathvariant-1b.html mathvariant-1b-ref.html # Bug 1010679, Bug 1392106 +fails-if(Android&&emulator) == mathvariant-1c.html mathvariant-1c-ref.html # Bug 1010679, Bug 1392106 +== mathvariant-1d.html mathvariant-1d-ref.html +fails-if(Android&&emulator) == mathvariant-2.html mathvariant-2-ref.html # Bug 1010679 +== mathvariant-4.html mathvariant-4-ref.html +== mathvariant-5.html mathvariant-5-ref.html == dtls-1.html dtls-1-ref.html pref(mathml.error_message_layout_for_invalid_markup.disabled,false) == dtls-2.html dtls-2-ref.html -pref(mathml.legacy_mathvariant_attribute.disabled,false) pref(mathml.error_message_layout_for_invalid_markup.disabled,false) == dtls-3.html dtls-3-ref.html +pref(mathml.error_message_layout_for_invalid_markup.disabled,false) == dtls-3.html dtls-3-ref.html == ssty-1.html ssty-1-ref.html == ssty-2.html ssty-2-ref.html pref(mathml.scriptsizemultiplier_attribute.disabled,false) == ssty-3.html ssty-3-ref.html @@ -300,7 +300,7 @@ random-if(gtkWidget) == rowlines-3-2.html rowlines-3-2-ref.html # bug 1309426 == mfrac-D-2.html mfrac-D-2-ref.html == mfrac-E-1.html mfrac-E-1-ref.html == shadow-dom-1.html shadow-dom-1-ref.html -pref(mathml.legacy_mathvariant_attribute.disabled,false) pref(ui.useOverlayScrollbars,1) pref(dom.meta-viewport.enabled,true) pref(font.size.inflation.emPerLine,25) fuzzy-if(!gtkWidget,0-255,0-324) fuzzy-if(gtkWidget,0-255,0-66) == font-inflation-1.html font-inflation-1-ref.html # gtkWidget due to Bug 1607294 +pref(ui.useOverlayScrollbars,1) pref(dom.meta-viewport.enabled,true) pref(font.size.inflation.emPerLine,25) fuzzy-if(!gtkWidget,0-255,0-324) fuzzy-if(gtkWidget,0-255,0-66) == font-inflation-1.html font-inflation-1-ref.html # gtkWidget due to Bug 1607294 test-pref(font.minimum-size.x-math,40) == default-font.html default-font-ref.html != radicalbar-1.html about:blank != radicalbar-1a.html about:blank diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index c5129a3f498d..a78b39333a27 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -9541,16 +9541,6 @@ #endif mirror: always -# Whether to disable the MathML3 support for the mathvariant attribute. For -# MathML Core, support is restricted to the element and to value "normal". -# Corresponding automatic italicization on single-char element is also -# implemented via text-transform: auto when that flag is enabled. -- name: mathml.legacy_mathvariant_attribute.disabled - type: bool - value: @IS_NIGHTLY_BUILD@ - mirror: always - rust: true - #--------------------------------------------------------------------------- # Prefs starting with "media." #--------------------------------------------------------------------------- diff --git a/servo/components/style/gecko/media_features.rs b/servo/components/style/gecko/media_features.rs index 8f049ce88ccf..4ca746ea84d9 100644 --- a/servo/components/style/gecko/media_features.rs +++ b/servo/components/style/gecko/media_features.rs @@ -694,7 +694,7 @@ macro_rules! bool_pref_feature { /// to support new types in these entries and (2) ensuring that either /// nsPresContext::MediaFeatureValuesChanged is called when the value that /// would be returned by the evaluator function could change. -pub static MEDIA_FEATURES: [QueryFeatureDescription; 68] = [ +pub static MEDIA_FEATURES: [QueryFeatureDescription; 67] = [ feature!( atom!("width"), AllowsRanges::Yes, @@ -1025,9 +1025,4 @@ pub static MEDIA_FEATURES: [QueryFeatureDescription; 68] = [ ), // media query for popover attribute bool_pref_feature!(atom!("-moz-popover-enabled"), "dom.element.popover.enabled"), - // media query for MathML Core's implementation of mi - bool_pref_feature!( - atom!("-moz-mathml-core-mi"), - "mathml.legacy_mathvariant_attribute.disabled" - ), ]; diff --git a/servo/components/style/values/specified/text.rs b/servo/components/style/values/specified/text.rs index 6688bc7cd6fa..60eedb78723a 100644 --- a/servo/components/style/values/specified/text.rs +++ b/servo/components/style/values/specified/text.rs @@ -341,11 +341,6 @@ impl Parse for TextTransform { "capitalize" if result.case_ == TextTransformCase::None => { result.case_ = TextTransformCase::Capitalize }, - "math-auto" if result.case_ == TextTransformCase::None && - result.other_.is_empty() => { - result.case_ = TextTransformCase::MathAuto; - return Ok(result); - }, "full-width" if !result.other_.intersects(TextTransformOther::FULL_WIDTH) => { result.other_.insert(TextTransformOther::FULL_WIDTH) }, @@ -410,8 +405,6 @@ pub enum TextTransformCase { Lowercase, /// Capitalize each word. Capitalize, - /// Automatic italicization of math variables. - MathAuto, } bitflags! { diff --git a/servo/ports/geckolib/glue.rs b/servo/ports/geckolib/glue.rs index 228cd504b165..182ad36a7fd7 100644 --- a/servo/ports/geckolib/glue.rs +++ b/servo/ports/geckolib/glue.rs @@ -5204,7 +5204,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetKeywordValue( use style::values::generics::box_::{VerticalAlign, VerticalAlignKeyword}; use style::values::generics::font::FontStyle; use style::values::specified::{ - table::CaptionSide, BorderStyle, Clear, Display, Float, TextAlign, TextEmphasisPosition, TextTransform + table::CaptionSide, BorderStyle, Clear, Display, Float, TextAlign, TextEmphasisPosition, }; fn get_from_computed(value: u32) -> T @@ -5249,10 +5249,6 @@ pub extern "C" fn Servo_DeclarationBlock_SetKeywordValue( BorderRightStyle => get_from_computed::(value), BorderBottomStyle => get_from_computed::(value), BorderLeftStyle => get_from_computed::(value), - TextTransform => { - debug_assert_eq!(value, structs::StyleTextTransformCase_None as u32); - TextTransform::none() - }, }; write_locked_arc(declarations, |decls: &mut PropertyDeclarationBlock| { decls.push(prop, Importance::Normal); diff --git a/testing/web-platform/meta/css/css-text/__dir__.ini b/testing/web-platform/meta/css/css-text/__dir__.ini deleted file mode 100644 index fb8d38bf0c5c..000000000000 --- a/testing/web-platform/meta/css/css-text/__dir__.ini +++ /dev/null @@ -1 +0,0 @@ -prefs: [mathml.legacy_mathvariant_attribute.disabled: true] \ No newline at end of file diff --git a/testing/web-platform/meta/css/css-text/text-transform/math/text-transform-math-auto-001.html.ini b/testing/web-platform/meta/css/css-text/text-transform/math/text-transform-math-auto-001.html.ini new file mode 100644 index 000000000000..36f0472490bc --- /dev/null +++ b/testing/web-platform/meta/css/css-text/text-transform/math/text-transform-math-auto-001.html.ini @@ -0,0 +1,2 @@ +[text-transform-math-auto-001.html] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-text/text-transform/math/text-transform-math-auto-002.html.ini b/testing/web-platform/meta/css/css-text/text-transform/math/text-transform-math-auto-002.html.ini new file mode 100644 index 000000000000..5eee4898f47e --- /dev/null +++ b/testing/web-platform/meta/css/css-text/text-transform/math/text-transform-math-auto-002.html.ini @@ -0,0 +1,2 @@ +[text-transform-math-auto-002.html] + expected: FAIL diff --git a/testing/web-platform/meta/mathml/__dir__.ini b/testing/web-platform/meta/mathml/__dir__.ini index 79837bbf0f9d..6abcb7a6fcb2 100644 --- a/testing/web-platform/meta/mathml/__dir__.ini +++ b/testing/web-platform/meta/mathml/__dir__.ini @@ -1 +1 @@ -prefs: [mathml.scriptsizemultiplier_attribute.disabled: true, mathml.scriptminsize_attribute.disabled: true, mathml.mathspace_names.disabled: true, layout.css.math-style.enabled: true, mathml.legacy_mathvariant_attribute.disabled: true] \ No newline at end of file +prefs: [mathml.scriptsizemultiplier_attribute.disabled: true, mathml.scriptminsize_attribute.disabled: true, mathml.mathspace_names.disabled: true, layout.css.math-style.enabled: true] \ No newline at end of file diff --git a/testing/web-platform/meta/mathml/relations/css-styling/attribute-mapping-002.html.ini b/testing/web-platform/meta/mathml/relations/css-styling/attribute-mapping-002.html.ini index 6e7d8af4b3a1..9804fb31ee7e 100644 --- a/testing/web-platform/meta/mathml/relations/css-styling/attribute-mapping-002.html.ini +++ b/testing/web-platform/meta/mathml/relations/css-styling/attribute-mapping-002.html.ini @@ -190,3 +190,6 @@ [invalid scriptlevel values on the mspace element are not mapped to math-depth(...)] expected: FAIL + + [mathvariant on the mi element is mapped to CSS text-transform] + expected: FAIL diff --git a/testing/web-platform/mozilla/meta/mathml/mathvariant/__dir__.ini b/testing/web-platform/mozilla/meta/mathml/mathvariant/__dir__.ini deleted file mode 100644 index 8607e3b5ec17..000000000000 --- a/testing/web-platform/mozilla/meta/mathml/mathvariant/__dir__.ini +++ /dev/null @@ -1 +0,0 @@ -prefs: [mathml.legacy_mathvariant_attribute.disabled: false] diff --git a/testing/web-platform/tests/css/css-text/parsing/text-transform-computed.html b/testing/web-platform/tests/css/css-text/parsing/text-transform-computed.html index 1808e6fdca2e..391ee019d30b 100644 --- a/testing/web-platform/tests/css/css-text/parsing/text-transform-computed.html +++ b/testing/web-platform/tests/css/css-text/parsing/text-transform-computed.html @@ -4,7 +4,6 @@ CSS Text: getComputedStyle().textTransform - @@ -20,7 +19,6 @@ test_computed_value("text-transform", "uppercase"); test_computed_value("text-transform", "lowercase"); test_computed_value("text-transform", "full-width"); test_computed_value("text-transform", "full-size-kana"); -test_computed_value("text-transform", "math-auto"); test_computed_value("text-transform", "capitalize full-width"); test_computed_value("text-transform", "full-width full-size-kana"); diff --git a/testing/web-platform/tests/css/css-text/parsing/text-transform-invalid.html b/testing/web-platform/tests/css/css-text/parsing/text-transform-invalid.html index 3981480d38c8..41482ab5f2c5 100644 --- a/testing/web-platform/tests/css/css-text/parsing/text-transform-invalid.html +++ b/testing/web-platform/tests/css/css-text/parsing/text-transform-invalid.html @@ -4,8 +4,7 @@ CSS Text Module Test: parsing text-transform with invalid values - - + @@ -19,22 +18,6 @@ test_invalid_value("text-transform", "capitalize full-width lowercase"); test_invalid_value("text-transform", "uppercase full-size-kana uppercase"); test_invalid_value("text-transform", "full-width full-size-kana full-width"); test_invalid_value("text-transform", "full-size-kana capitalize full-size-kana"); - - -// math-auto keyword cannot be combined with other values. -test_invalid_value("text-transform", "none math-auto"); -test_invalid_value("text-transform", "math-auto none"); -test_invalid_value("text-transform", "uppercase math-auto"); -test_invalid_value("text-transform", "math-auto uppercase"); -test_invalid_value("text-transform", "lowercase math-auto"); -test_invalid_value("text-transform", "math-auto lowercase"); -test_invalid_value("text-transform", "capitalize math-auto"); -test_invalid_value("text-transform", "math-auto capitalize"); -test_invalid_value("text-transform", "full-width math-auto"); -test_invalid_value("text-transform", "math-auto full-width"); -test_invalid_value("text-transform", "full-size-kana math-auto"); -test_invalid_value("text-transform", "math-auto full-size-kana"); -test_invalid_value("text-transform", "math-auto math-auto"); diff --git a/testing/web-platform/tests/css/css-text/parsing/text-transform-valid.html b/testing/web-platform/tests/css/css-text/parsing/text-transform-valid.html index 522eb791b0c9..fead45c8b8e4 100644 --- a/testing/web-platform/tests/css/css-text/parsing/text-transform-valid.html +++ b/testing/web-platform/tests/css/css-text/parsing/text-transform-valid.html @@ -4,8 +4,7 @@ CSS Text Module Test: parsing text-transform with valid values - - + @@ -19,7 +18,6 @@ test_valid_value("text-transform", "uppercase"); test_valid_value("text-transform", "lowercase"); test_valid_value("text-transform", "full-width"); test_valid_value("text-transform", "full-size-kana"); -test_valid_value("text-transform", "math-auto"); test_valid_value("text-transform", "capitalize full-width"); test_valid_value("text-transform", "uppercase full-size-kana"); diff --git a/widget/nsXPLookAndFeel.cpp b/widget/nsXPLookAndFeel.cpp index 84e57a058524..fbde834fec2e 100644 --- a/widget/nsXPLookAndFeel.cpp +++ b/widget/nsXPLookAndFeel.cpp @@ -533,7 +533,6 @@ static constexpr struct { {"mathml.legacy_maction_and_semantics_implementations.disabled"_ns}, {"mathml.ms_lquote_rquote_attributes.disabled"_ns}, {"dom.element.popover.enabled"_ns}, - {"mathml.legacy_mathvariant_attribute.disabled"_ns}, }; // Read values from the user's preferences. diff --git a/xpcom/ds/StaticAtoms.py b/xpcom/ds/StaticAtoms.py index a1fedc48aa5d..cb1b917bb03d 100644 --- a/xpcom/ds/StaticAtoms.py +++ b/xpcom/ds/StaticAtoms.py @@ -2406,8 +2406,6 @@ STATIC_ATOMS = [ # media query for MathML Core's implementation of ms Atom("_moz_mathml_core_ms", "-moz-mathml-core-ms"), Atom("_moz_popover_enabled", "-moz-popover-enabled"), - # media query for MathML Core's implementation of mi - Atom("_moz_mathml_core_mi", "-moz-mathml-core-mi"), # Contextual Identity / Containers Atom("usercontextid", "usercontextid"), Atom("geckoViewSessionContextId", "geckoViewSessionContextId"),