mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Return an infinite perspective in TransformOperation::Perspective::to_animated_zero
Differential Revision: https://phabricator.services.mozilla.com/D122919
This commit is contained in:
parent
26c5db6a6e
commit
79893116e7
3 changed files with 11 additions and 7 deletions
|
@ -583,10 +583,10 @@ impl<T: ToMatrix> Transform<T> {
|
|||
/// Return the transform matrix from a perspective length.
|
||||
#[inline]
|
||||
pub fn create_perspective_matrix(d: CSSFloat) -> Transform3D<CSSFloat> {
|
||||
if d < 0.0 {
|
||||
Transform3D::identity()
|
||||
} else {
|
||||
if d.is_finite() {
|
||||
Transform3D::perspective(d.max(1.))
|
||||
} else {
|
||||
Transform3D::identity()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue