mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-03 23:30:46 +00:00

In SMIL if a discrete calcMode is used, the keyTimes attribute may be used to specify the times at which the various animation values are used, overriding the regular 50% flip behavior (see nsSMILAnimationFunction::ScaleSimpleProgress). However, this behavior is only applied when the calcMode is known to be discrete. If the author specifies calcMode="linear" but attributeType="stroke-linecap" then SMIL should fall back to discrete calcMode including applying the special keyTimes behavior. For the Servo backend, Servo_AnimationValues_Interpolate does not return an error for discretely animated properties so SMIL does not recognize when we fall back to discrete calcMode. This patch adds a check before performing interpolation that tests if the property is a discretely interpolable one and, if it is, returns an error so that we run SMIL's special discrete calcMode handling. MozReview-Commit-ID: FOp8XcNbvdu --HG-- extra : rebase_source : 57ddb333855de111aa585fe894e99937681e5cd2