diff options
author | Martin Robinson <mrobinson@igalia.com> | 2016-08-11 00:29:19 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-08-12 03:12:06 +0200 |
commit | 6259df5e2da6574f3d5951a7df2cb511d263697a (patch) | |
tree | f68cc95e507fc7e208a3c04de637c0914bcd9d60 /components/script/dom/document.rs | |
parent | b7facf41cbc7ba727666e95fd0c390d432d862fa (diff) | |
download | servo-6259df5e2da6574f3d5951a7df2cb511d263697a.tar.gz servo-6259df5e2da6574f3d5951a7df2cb511d263697a.zip |
Update to euclid 0.8
Diffstat (limited to 'components/script/dom/document.rs')
-rw-r--r-- | components/script/dom/document.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 5f1bf4c45cd..5fca33081eb 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -2807,7 +2807,7 @@ impl DocumentMethods for Document { fn ElementFromPoint(&self, x: Finite<f64>, y: Finite<f64>) -> Option<Root<Element>> { let x = *x as f32; let y = *y as f32; - let point = &Point2D { x: x, y: y }; + let point = &Point2D::new(x, y); let window = window_from_node(self); let viewport = window.window_size().unwrap().visible_viewport; @@ -2815,7 +2815,7 @@ impl DocumentMethods for Document { return None; } - if x < 0.0 || y < 0.0 || x > viewport.width.get() || y > viewport.height.get() { + if x < 0.0 || y < 0.0 || x > viewport.width || y > viewport.height { return None; } @@ -2840,7 +2840,7 @@ impl DocumentMethods for Document { fn ElementsFromPoint(&self, x: Finite<f64>, y: Finite<f64>) -> Vec<Root<Element>> { let x = *x as f32; let y = *y as f32; - let point = &Point2D { x: x, y: y }; + let point = &Point2D::new(x, y); let window = window_from_node(self); let viewport = window.window_size().unwrap().visible_viewport; @@ -2849,7 +2849,7 @@ impl DocumentMethods for Document { } // Step 2 - if x < 0.0 || y < 0.0 || x > viewport.width.get() || y > viewport.height.get() { + if x < 0.0 || y < 0.0 || x > viewport.width || y > viewport.height { return vec!(); } |