aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/model.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-06-09 16:32:54 -0600
committerbors-servo <metajack+bors@gmail.com>2015-06-09 16:32:54 -0600
commit8236221acf0f23f2217bf8b2346411396bd04f3c (patch)
tree7c075f5890d4e74e074e334dad322191fdead8f4 /components/layout/model.rs
parent0dec64caf01c98d10e72b73e35b994127c23e81f (diff)
parent6dd082278d2d627f9d088c14dfd635990ff3183b (diff)
downloadservo-8236221acf0f23f2217bf8b2346411396bd04f3c.tar.gz
servo-8236221acf0f23f2217bf8b2346411396bd04f3c.zip
Auto merge of #6280 - glennw:transform-transitions, r=nox
Also tidy up some of the ComputedMatrix code. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6280) <!-- Reviewable:end -->
Diffstat (limited to 'components/layout/model.rs')
-rw-r--r--components/layout/model.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/components/layout/model.rs b/components/layout/model.rs
index 87e4d3cf3db..ad6dd66cf17 100644
--- a/components/layout/model.rs
+++ b/components/layout/model.rs
@@ -8,7 +8,7 @@
use fragment::Fragment;
-use geom::{Matrix4, SideOffsets2D, Size2D};
+use geom::{Matrix4, SideOffsets2D};
use std::cmp::{max, min};
use std::fmt;
use style::computed_values::transform::ComputedMatrix;
@@ -426,19 +426,16 @@ pub fn padding_from_style(style: &ComputedValues, containing_block_inline_size:
}
pub trait ToGfxMatrix {
- fn to_gfx_matrix(&self, containing_size: &Size2D<Au>) -> Matrix4<f32>;
+ fn to_gfx_matrix(&self) -> Matrix4<f32>;
}
impl ToGfxMatrix for ComputedMatrix {
- fn to_gfx_matrix(&self, containing_size: &Size2D<Au>) -> Matrix4<f32> {
+ fn to_gfx_matrix(&self) -> Matrix4<f32> {
Matrix4 {
m11: self.m11 as f32, m12: self.m12 as f32, m13: self.m13 as f32, m14: self.m14 as f32,
m21: self.m21 as f32, m22: self.m22 as f32, m23: self.m23 as f32, m24: self.m24 as f32,
m31: self.m31 as f32, m32: self.m32 as f32, m33: self.m33 as f32, m34: self.m34 as f32,
- m41: self.m41.to_au(containing_size.width).to_f32_px(),
- m42: self.m42.to_au(containing_size.height).to_f32_px(),
- m43: self.m43 as f32,
- m44: self.m44 as f32
+ m41: self.m41 as f32, m42: self.m42 as f32, m43: self.m43 as f32, m44: self.m44 as f32
}
}
}