mirror of
https://github.com/servo/servo.git
synced 2025-08-09 23:45:35 +01:00
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:
parent
e83f5629ff
commit
7f3b23126a
2 changed files with 70 additions and 17 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue