mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
style: Implement transform: perspective(none)
Differential Revision: https://phabricator.services.mozilla.com/D123350
This commit is contained in:
parent
ce45f68d9c
commit
fa840e1666
4 changed files with 72 additions and 19 deletions
|
@ -24,6 +24,9 @@ pub type Transform = generic::GenericTransform<TransformOperation>;
|
|||
pub type TransformOrigin =
|
||||
generic::GenericTransformOrigin<LengthPercentage, LengthPercentage, Length>;
|
||||
|
||||
/// The computed value of the `perspective()` transform function.
|
||||
pub type PerspectiveFunction = generic::PerspectiveFunction<Length>;
|
||||
|
||||
/// A vector to represent the direction vector (rotate axis) for Rotate3D.
|
||||
pub type DirectionVector = Vector3D<CSSFloat>;
|
||||
|
||||
|
@ -517,7 +520,7 @@ impl ToAnimatedZero for TransformOperation {
|
|||
Ok(generic::TransformOperation::Rotate(Angle::zero()))
|
||||
},
|
||||
generic::TransformOperation::Perspective(_) => Ok(
|
||||
generic::TransformOperation::Perspective(Length::new(std::f32::INFINITY))
|
||||
generic::TransformOperation::Perspective(generic::PerspectiveFunction::None)
|
||||
),
|
||||
generic::TransformOperation::AccumulateMatrix { .. } |
|
||||
generic::TransformOperation::InterpolateMatrix { .. } => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue