Stylo: wrong rotate angle in animation

VERIFIED FIXED in Firefox 56

Status

()

defect
P2
normal
VERIFIED FIXED
2 years ago
2 years ago

People

(Reporter: 5.5, Assigned: hiro)

Tracking

(Blocks 1 bug, {nightly-community})

Trunk
mozilla56
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(5 attachments, 3 obsolete attachments)

Reporter

Description

2 years ago
The following HTML is rendered by the nightly as different from Fx 54.
Wrong RotateY angle (opposite sign of angle).
If we change "transform: none" to "transform: rotateY(0deg)" in "@keyframes tilt ", it will be correct.


<!DOCTYPE html>
<meta charset="utf-8">
<title>3D-rotation</title>
<style>
* {
  margin: 0;
  padding: 0
}
body {
  font-family: arial, sans-serif;
  font-size: 80px;
  font-weight: bold;
  perspective: 1200px;
}
.board {
  animation: 1s ease 4s both tilt;
  margin: 200px 0 0;
  text-align: center;
  position: relative;
  overflow: hidden
}
.content {
  position: relative;
  animation: 1s slidein;
}

@keyframes tilt {
  from {transform: rotateY(30deg)}
  to {transform: none}
}

@keyframes slidein {
  from {left: -20em}
  to {left: 0}
}
</style>
<div class="board">
  <div class="content">Firefox</div>
</div>
Reporter

Comment 1

2 years ago
Comment hidden (obsolete)
Thank you! :)
Confirmed in Nightly 56 x64 20170725144053 @ Debian Testing.
attachment 8890278 [details]
with stylo: The text is looking over my left shoulder, then on my face.
without stylo: The text is looking over my right shoulder, then on my face.
Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true
Assignee

Comment 4

2 years ago
Posted file Reduced test case
The 'left' animation needs for running the transform animation on the main thread since we are still using gecko's interpolation code on the compositor.

I think we have a bug that gecko's transform interpolation (with quarternion?) does not comply the spec, but I can't find it and I am not sure that is related to this bug.
Attachment #8890278 - Attachment is obsolete: true
Assignee

Comment 5

2 years ago
OK, recomposing 3D matrix was wrong.
Assignee: nobody → hikezoe
Status: NEW → ASSIGNED
Assignee

Comment 6

2 years ago
there seems to be another mistake in transform matrix handling.  Fixing this makes a wpt failure.
Priority: -- → P2

Updated

2 years ago
Duplicate of this bug: 1384855
Assignee

Comment 8

2 years ago
Posted file A WIP patch (obsolete) —
FWIW here is a WIP patch that fixes this bug case but makes a test [1] failure.  This change makes the rotation in the test case opposite direction.

[1] https://hg.mozilla.org/mozilla-central/file/e5693cea1ec9/testing/web-platform/tests/web-animations/animation-model/animation-types/property-types.js#l878
Assignee

Comment 9

2 years ago
I was wrong. Recomposing was not wrong. rotate_to_matrix returned transposed matrix.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=ab8c4ff551972c43e0ec1d74a1e647275d07e4b7
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 12

2 years ago
mozreview-review
Comment on attachment 8891536 [details]
Bug 1384410 - Fix rotate_to_matrix.

https://reviewboard.mozilla.org/r/162654/#review168024
Attachment #8891536 - Flags: review?(canaltinova) → review+

Comment 13

2 years ago
mozreview-review
Comment on attachment 8891537 [details]
Bug 1384410 - Fix multiply matrix order for skew.

https://reviewboard.mozilla.org/r/162656/#review168026

Thanks for fixing that!
Attachment #8891537 - Flags: review?(canaltinova) → review+
Though we should investigate this a little further after that bug and report to the csswg if these are spec bugs. FWIW, there is already one for that: https://github.com/w3c/csswg-drafts/issues/483
Assignee

Comment 15

2 years ago
Thank you!

I think bug 769892 is the same issue for gecko, but it seems to be already solved to me.
Assignee

Comment 16

2 years ago
Filed a meta bug to grasping transform interpolation bugs.
bug 1385477.
Comment hidden (mozreview-request)
Assignee

Updated

2 years ago
Attachment #8891537 - Attachment is obsolete: true
Assignee

Comment 19

2 years ago
Posted file Servo PR
Attachment #8890783 - Attachment is obsolete: true

Comment 20

2 years ago
Pushed by hikezoe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cce87afe3904
Fix rotate_to_matrix. r=canaltinova

Comment 21

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/cce87afe3904
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
(In reply to Darkspirit from comment #3)
> Confirmed in Nightly 56 x64 20170725144053 @ Debian Testing.
> attachment 8890278 [details]
> with stylo: The text is looking over my left shoulder, then on my face.
> without stylo: The text is looking over my right shoulder, then on my face.

Verified fixed in Nightly 56 x64 20170730100307 @ Debian Testing.
Stylo behaves now like Gecko.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.