Update to euclid 0.8

This commit is contained in:
Martin Robinson 2016-08-11 00:29:19 +02:00 committed by Anthony Ramine
parent b7facf41cb
commit 6259df5e2d
56 changed files with 538 additions and 558 deletions

View file

@ -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!();
}