Created
March 6, 2015 17:08
-
-
Save AutomatedTester/0196e538288c3ee6deeb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/response.rs b/src/response.rs | |
| index 5874900..fe6c8de 100644 | |
| --- a/src/response.rs | |
| +++ b/src/response.rs | |
| @@ -72,14 +72,14 @@ impl WindowSizeResponse { | |
| #[derive(RustcEncodable, Debug)] | |
| pub struct ElementRectResponse { | |
| - x: u64, | |
| - y: u64, | |
| - width: u64, | |
| - height: u64 | |
| + x: f64, | |
| + y: f64, | |
| + width: f64, | |
| + height: f64 | |
| } | |
| impl ElementRectResponse { | |
| - pub fn new(x: u64, y: u64, width: u64, height: u64) -> ElementRectResponse { | |
| + pub fn new(x: f64, y: f64, width: f64, height: f64) -> ElementRectResponse { | |
| ElementRectResponse { | |
| x: x, | |
| y: y, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/marionette.rs b/src/marionette.rs | |
| index 920c93a..a5db540 100644 | |
| --- a/src/marionette.rs | |
| +++ b/src/marionette.rs | |
| @@ -325,28 +325,28 @@ impl MarionetteSession { | |
| let x = try_opt!( | |
| try_opt!(value.get("x"), | |
| ErrorStatus::UnknownError, | |
| - "Failed to find x field").as_u64(), | |
| + "Failed to find x field").as_f64(), | |
| ErrorStatus::UnknownError, | |
| "Failed to interpret x as integer"); | |
| let y = try_opt!( | |
| try_opt!(value.get("y"), | |
| ErrorStatus::UnknownError, | |
| - "Failed to find y field").as_u64(), | |
| + "Failed to find y field").as_f64(), | |
| ErrorStatus::UnknownError, | |
| "Failed to interpret y as integer"); | |
| let width = try_opt!( | |
| try_opt!(value.get("width"), | |
| ErrorStatus::UnknownError, | |
| - "Failed to find width field").as_u64(), | |
| + "Failed to find width field").as_f64(), | |
| ErrorStatus::UnknownError, | |
| "Failed to interpret width as integer"); | |
| let height = try_opt!( | |
| try_opt!(value.get("height"), | |
| ErrorStatus::UnknownError, | |
| - "Failed to find height field").as_u64(), | |
| + "Failed to find height field").as_f64(), | |
| ErrorStatus::UnknownError, | |
| "Failed to interpret width as integer"); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment