mirror of
https://github.com/servo/servo.git
synced 2025-08-02 04:00:32 +01:00
Update to euclid 0.8
This commit is contained in:
parent
b7facf41cb
commit
6259df5e2d
56 changed files with 538 additions and 558 deletions
|
@ -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!();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue