Implement ComputeSquaredDistance trait for Rotate/Translate/Scale properties

RESOLVED FIXED in Firefox 65

Status

()

enhancement
P3
normal
RESOLVED FIXED
2 years ago
6 months ago

People

(Reporter: u459114, Assigned: boris)

Tracking

(Blocks 1 bug)

unspecified
mozilla65
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox65 fixed)

Details

Attachments

(4 attachments)

Reporter

Description

2 years ago
We need to implement this trait since devtools need it
Priority: -- → P1
Priority: P1 → P3
Assignee

Updated

7 months ago
Assignee: nobody → boris.chiou
Assignee

Comment 1

6 months ago
We use ComputeSquaredDistance for Translate, Rotate, Scale, so if two property values are the same enum type, everything is ok. However, we still need to implement the fallback cases for two different enum types, e.g. Translate::Translate and Translate::Translate3D.
Assignee

Comment 2

6 months ago
I'm trying to put all the mako code together, so we could move transform
code into a different file.
Assignee

Comment 3

6 months ago
Basically, most of the animation code of transform don't need mako, so
we could move them into values/animated/transform.rs.

However, we still use mako to generate some code to make the methods of
Matrix3D simpler, so I still leave them in animated_properties.mako.rs.
Or maybe we could move them into a new file, matrix.mako.rs.

Depends on D11933
Assignee

Comment 4

6 months ago
We manually implement ComputeSquaredDistance for Translate, Rotate, and
Scale because we have to handle mismatch cases, and actually we don't
need to implement it for specified types.

Depends on D11934
Assignee

Comment 5

6 months ago
Although the methods of Matrix3D in animated_properties.mako.rs could be
simplified by mako, it's a little bit hard to read because they are far
from the usage and definition. Therefore, we move them to the definition of
computed::Matrix3D and expand the mako.

Depends on D11935

Comment 7

6 months ago
Pushed by boris.chiou@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/f70b47c227bf
Part 1: Factor the mako code out from transform functions. r=emilio
https://hg.mozilla.org/integration/autoland/rev/f0c56dea286e
Part 2: Move the animation code of transform into a different file. r=emilio
https://hg.mozilla.org/integration/autoland/rev/fbf6efa9b8ec
Part 3: Implement ComputeSquaredDistance for individual transforms. r=birtles
https://hg.mozilla.org/integration/autoland/rev/dbc9d48aa60b
Part 4: Expand the mako code of Matrix3D and move them into transform.rs. r=emilio
You need to log in before you can comment on or make changes to this bug.