style: Implement ComputeSquaredDistance for individual transforms.

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.

Differential Revision: https://phabricator.services.mozilla.com/D11935
This commit is contained in:
Boris Chiou 2018-11-16 18:58:41 +00:00 committed by Emilio Cobos Álvarez
parent e83f5629ff
commit 7f3b23126a
2 changed files with 70 additions and 17 deletions

View file

@ -530,7 +530,6 @@ pub fn get_normalized_vector_and_angle<T: Zero>(
#[derive(
Clone,
ComputeSquaredDistance,
Copy,
Debug,
MallocSizeOf,
@ -600,7 +599,6 @@ where
#[derive(
Clone,
ComputeSquaredDistance,
Copy,
Debug,
MallocSizeOf,
@ -649,7 +647,6 @@ impl<Number: ToCss + PartialEq> ToCss for Scale<Number> {
#[derive(
Clone,
ComputeSquaredDistance,
Debug,
MallocSizeOf,
PartialEq,