Closed Bug 1505200 Opened 6 years ago Closed 6 years ago

The getComputedStyle() should return none If both from value and to value are 'none' for rotate

Categories

(Core :: CSS Transitions and Animations, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: boris, Assigned: boris)

References

(Blocks 1 open bug, )

Details

Attachments

(3 files)

The spec [1] says: > When translate, rotate or scale are animating or transitioning, > and the from value or to value (but not both) is none, the > value none is replaced by the equivalent identity value > (0px for translate, 0deg for rotate, 1 for scale). This means we shouldn't convert the `none` into the identity value if both from value and to value are `none`. (I guess this may affect the creation of stacking context during animation?). The related wpt is [2]. [1] https://drafts.csswg.org/css-transforms-2/#valdef-translate-none [2] https://searchfox.org/mozilla-central/rev/b096dcf0ea226af628fe03f7e7acb56a25853533/testing/web-platform/tests/css/css-transforms/animation/translate-interpolation.html#64-75
Priority: -- → P3
It shouldn't affect the stacking context during animation. So long as there is a scheduled, running, or filling animation, there should be a stacking context as per: "While an animation is applied but has not finished, or has finished but has an animation-fill-mode of forwards or both, the user agent must act as if the will-change property ([css-will-change-1]) on the element additionally includes all the properties animated by the animation."[1] and: "For every property targeted by at least one animation effect that is current or in effect, the user agent must act as if the will-change property ([css-will-change-1]) on the target element includes the property."[2] [1] https://drafts.csswg.org/css-animations/#animations [2] https://drafts.csswg.org/web-animations-1/#side-effects-section
Summary: The gCS should return none If both from value and to value are 'none' for individual transform animation → The getComputedStyle() should return none If both from value and to value are 'none' for individual transform animation
It both from value and to value are none, we don't have to convert it into identity value, so just return None. We have done this for translate and scale in other bugs.
Assignee: nobody → boris.chiou
Summary: The getComputedStyle() should return none If both from value and to value are 'none' for individual transform animation → The getComputedStyle() should return none If both from value and to value are 'none' for rotate
Attachment #9023449 - Attachment description: Bug 1505200 - Return None if both from value and to value are none for rotate. → Bug 1505200 - Part 1: Interpolate Rotate::None and others properly.
So we can drop a lot of code. Depends on D11247
Rotate accepts rotate axis and angle in any order (i.e. <number>{3} <angle> or <angle> <number>{3}), so we rewrite the parser.
Attachment #9023829 - Attachment description: Bug 1505200 - Part 3: Fix Rotate parser. → Bug 1505200 - Part 3: Parse any order of number and angle for Rotate.
Attachment #9023449 - Attachment description: Bug 1505200 - Part 1: Interpolate Rotate::None and others properly. → Bug 1505200 - Part 1: Rewrite the interpolation of Rotate to return correct type.
Pushed by boris.chiou@gmail.com: https://hg.mozilla.org/integration/autoland/rev/f94bba680dc2 Part 1: Rewrite the interpolation of Rotate to return correct type. r=birtles https://hg.mozilla.org/integration/autoland/rev/3bd1f4cc8f9e Part 2: Serialize Rotate by servo. r=emilio https://hg.mozilla.org/integration/autoland/rev/36e5bf9afd50 Part 3: Parse any order of number and angle for Rotate. r=emilio
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: