Bug 1882144 - Remove layout.css.math-style.enabled and layout.css.math-depth.enabled prefs. r=layout-reviewers,emilio

Differential Revision: https://phabricator.services.mozilla.com/D202940
This commit is contained in:
Frédéric Wang 2024-02-29 16:37:40 +00:00
parent dd04bff973
commit 8d75a376ce
5 changed files with 27 additions and 79 deletions

View file

@ -68,24 +68,6 @@ if (!Services.prefs.getBoolPref("layout.css.zoom.enabled")) {
});
}
if (!Services.prefs.getBoolPref("layout.css.math-depth.enabled")) {
// mathml.css UA sheet rule for math-depth.
ignoreList.push({
sourceName: /\b(scrollbars|mathml)\.css$/i,
errorMessage: /Unknown property .*\bmath-depth\b/i,
isFromDevTools: false,
});
}
if (!Services.prefs.getBoolPref("layout.css.math-style.enabled")) {
// mathml.css UA sheet rule for math-style.
ignoreList.push({
sourceName: /(?:res|gre-resources)\/mathml\.css$/i,
errorMessage: /Unknown property .*\bmath-style\b/i,
isFromDevTools: false,
});
}
if (!Services.prefs.getBoolPref("layout.css.scroll-anchoring.enabled")) {
ignoreList.push({
sourceName: /webconsole\.css$/i,

View file

@ -13604,36 +13604,32 @@ if (IsCSSPropertyPrefEnabled("layout.css.backdrop-filter.enabled")) {
};
}
if (IsCSSPropertyPrefEnabled("layout.css.math-depth.enabled")) {
gCSSProperties["math-depth"] = {
domProp: "mathDepth",
inherited: true,
type: CSS_TYPE_LONGHAND,
initial_values: ["0"],
other_values: [
// auto-add cannot be tested here because it has no effect when the
// inherited math-style is equal to the default (normal).
"123",
"-123",
"add(123)",
"add(-123)",
"calc(1 + 2*3)",
"add(calc(4 - 2/3))",
],
invalid_values: ["auto", "1,23", "1.23", "add(1,23)", "add(1.23)"],
};
}
gCSSProperties["math-depth"] = {
domProp: "mathDepth",
inherited: true,
type: CSS_TYPE_LONGHAND,
initial_values: ["0"],
other_values: [
// auto-add cannot be tested here because it has no effect when the
// inherited math-style is equal to the default (normal).
"123",
"-123",
"add(123)",
"add(-123)",
"calc(1 + 2*3)",
"add(calc(4 - 2/3))",
],
invalid_values: ["auto", "1,23", "1.23", "add(1,23)", "add(1.23)"],
};
if (IsCSSPropertyPrefEnabled("layout.css.math-style.enabled")) {
gCSSProperties["math-style"] = {
domProp: "mathStyle",
inherited: true,
type: CSS_TYPE_LONGHAND,
initial_values: ["normal"],
other_values: ["compact"],
invalid_values: [],
};
}
gCSSProperties["math-style"] = {
domProp: "mathStyle",
inherited: true,
type: CSS_TYPE_LONGHAND,
initial_values: ["normal"],
other_values: ["compact"],
invalid_values: [],
};
if (IsCSSPropertyPrefEnabled("layout.css.forced-color-adjust.enabled")) {
gCSSProperties["forced-color-adjust"] = {

View file

@ -8644,20 +8644,6 @@
mirror: always
rust: true
# Is support for math-style enabled?
- name: layout.css.math-style.enabled
type: RelaxedAtomicBool
value: true
mirror: always
rust: true
# Is support for math-depth enabled?
- name: layout.css.math-depth.enabled
type: RelaxedAtomicBool
value: true
mirror: always
rust: true
# Is -moz-osx-font-smoothing enabled? (Only supported in OSX builds)
- name: layout.css.osx-font-smoothing.enabled
type: bool

View file

@ -305,10 +305,7 @@ ${helpers.predefined_type(
"MathDepth",
"0",
engines="gecko",
gecko_pref="layout.css.math-depth.enabled",
has_effect_on_gecko_scrollbars=False,
animation_value_type="none",
enabled_in="ua",
spec="https://mathml-refresh.github.io/mathml-core/#the-math-script-level-property",
affects="",
)}
@ -318,11 +315,8 @@ ${helpers.single_keyword(
"normal compact",
engines="gecko",
gecko_enum_prefix="StyleMathStyle",
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",
enabled_in="ua",
needs_conversion=True,
affects="layout",
)}

View file

@ -450,16 +450,6 @@ impl ToComputedValue for FontStretch {
}
}
#[cfg(feature = "gecko")]
fn math_depth_enabled(_context: &ParserContext) -> bool {
static_prefs::pref!("layout.css.math-depth.enabled")
}
#[cfg(feature = "servo")]
fn math_depth_enabled(_context: &ParserContext) -> bool {
false
}
/// CSS font keywords
#[derive(
Animate,
@ -496,7 +486,7 @@ pub enum FontSizeKeyword {
XXXLarge,
/// Indicate whether to apply font-size: math is specified so that extra
/// scaling due to math-depth changes is applied during the cascade.
#[parse(condition = "math_depth_enabled")]
#[cfg(feature="gecko")]
Math,
#[css(skip)]
None,
@ -1018,7 +1008,7 @@ impl FontSize {
return Ok(FontSize::Length(lp));
}
if let Ok(kw) = input.try_parse(|i| FontSizeKeyword::parse(context, i)) {
if let Ok(kw) = input.try_parse(|i| FontSizeKeyword::parse(i)) {
return Ok(FontSize::Keyword(KeywordInfo::new(kw)));
}