commit c3c97d73f3ac6dd886da3fee461ce81db26362df parent d55543ca8a1dbdf4ee67878bf1f7258f218b9ab8 Author: Narcis Beleuzu <nbeleuzu@mozilla.com> Date: Wed, 12 Nov 2025 16:56:20 +0200 Revert "Bug 1997564 - Make `math-depth` animate like an integer r=emilio,fredw,firefox-style-system-reviewers" for causing failures on test_transitions_per_property.html This reverts commit c29a4b75c2a9b6bd101a7ee16ea7a1e618f70656. Diffstat:
7 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/devtools/server/actors/animation-type-longhand.js b/devtools/server/actors/animation-type-longhand.js @@ -117,6 +117,7 @@ exports.ANIMATION_TYPE_FOR_LONGHANDS = [ "mask-repeat", "mask-type", "masonry-auto-flow", + "math-depth", "math-shift", "math-style", "mix-blend-mode", @@ -325,7 +326,6 @@ exports.ANIMATION_TYPE_FOR_LONGHANDS = [ "mask-position-x", "mask-position-y", "mask-size", - "math-depth", "object-position", "offset-anchor", "offset-path", diff --git a/servo/components/style/properties/longhands/font.mako.rs b/servo/components/style/properties/longhands/font.mako.rs @@ -308,6 +308,7 @@ ${helpers.predefined_type( "MathDepth", "0", engines="gecko", + animation_type="discrete", spec="https://mathml-refresh.github.io/mathml-core/#the-math-script-level-property", affects="", )} diff --git a/servo/components/style/values/computed/font.rs b/servo/components/style/values/computed/font.rs @@ -19,7 +19,6 @@ use crate::values::specified::font::{ self as specified, KeywordInfo, MAX_FONT_WEIGHT, MIN_FONT_WEIGHT, }; use crate::values::specified::length::{FontBaseSize, LineHeightBase, NoCalcLength}; -use crate::values::CSSInteger; use crate::Atom; use cssparser::{serialize_identifier, CssStringWriter, Parser}; use malloc_size_of::{MallocSizeOf, MallocSizeOfOps}; @@ -1101,21 +1100,6 @@ impl ToComputedValue for specified::MathDepth { } } -impl ToAnimatedValue for MathDepth { - type AnimatedValue = CSSInteger; - - #[inline] - fn to_animated_value(self, _: &crate::values::animated::Context) -> Self::AnimatedValue { - self.into() - } - - #[inline] - fn from_animated_value(animated: Self::AnimatedValue) -> Self { - use std::{cmp, i8}; - cmp::min(animated, i8::MAX as i32) as i8 - } -} - /// - Use a signed 8.8 fixed-point value (representable range -128.0..128) /// /// Values of <angle> below -90 or above 90 are not permitted, so we use an out diff --git a/testing/web-platform/meta/web-animations/animation-model/animation-types/accumulation-per-property-002.html.ini b/testing/web-platform/meta/web-animations/animation-model/animation-types/accumulation-per-property-002.html.ini @@ -7,3 +7,6 @@ [text-decoration: "underline" onto "overline"] expected: FAIL + + [math-depth: integer] + expected: FAIL diff --git a/testing/web-platform/meta/web-animations/animation-model/animation-types/addition-per-property-002.html.ini b/testing/web-platform/meta/web-animations/animation-model/animation-types/addition-per-property-002.html.ini @@ -7,3 +7,6 @@ [text-decoration: "underline" onto "overline"] expected: FAIL + + [math-depth: integer] + expected: FAIL diff --git a/testing/web-platform/meta/web-animations/animation-model/animation-types/interpolation-per-property-002.html.ini b/testing/web-platform/meta/web-animations/animation-model/animation-types/interpolation-per-property-002.html.ini @@ -16,3 +16,6 @@ [text-decoration uses discrete animation when animating between "underline" and "overline" with keyframe easing] expected: FAIL + + [math-depth supports animating as an integer] + expected: FAIL diff --git a/testing/web-platform/tests/web-animations/animation-model/animation-types/property-list.js b/testing/web-platform/tests/web-animations/animation-model/animation-types/property-list.js @@ -907,7 +907,11 @@ const gCSSProperties2 = { }, "math-depth": { // https://w3c.github.io/mathml-core/#propdef-math-depth - types: [ "integer" ], + types: [ + "integer", + { type: "discrete", options: [ [ "auto-add", "1", "0", "1" ], + [ "add(1)", "2", "1", "2" ] ] }, + ], }, "math-shift": { // https://w3c.github.io/mathml-core/#propdef-math-shift