Closed Bug 1424134 Opened 7 years ago Closed 6 years ago

Implement ComputeSquaredDistance trait for Rotate/Translate/Scale properties

Categories

(Core :: Layout, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: u459114, Assigned: boris)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

We need to implement this trait since devtools need it
Priority: -- → P1
Priority: P1 → P3
Assignee: nobody → boris.chiou
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.
I'm trying to put all the mako code together, so we could move transform code into a different file.
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
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
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
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.

Attachment

General

Created:
Updated:
Size: