mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #9708 - danlrobertson:i8623, r=KiChjang
Implement GetElementRect webdriver command: #8623 Implement the webdriver Get Element Rect command. Originally I wrote out the algorithm for [Step 7](https://w3c.github.io/webdriver/webdriver-spec.html#dfn-calculate-the-absolute-position) and then I found `GetBoundingClientRect`, and i thought it was probably best to use it instead. As always, feedback is very welcomed! <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9708) <!-- Reviewable:end -->
This commit is contained in:
commit
e5f3c5b6d1
4 changed files with 68 additions and 10 deletions
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use constellation_msg::{PipelineId, WindowSizeData};
|
||||
use euclid::rect::Rect;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use rustc_serialize::json::{Json, ToJson};
|
||||
use url::Url;
|
||||
|
@ -17,6 +18,7 @@ pub enum WebDriverScriptCommand {
|
|||
GetActiveElement(IpcSender<Option<String>>),
|
||||
GetElementAttribute(String, String, IpcSender<Result<Option<String>, ()>>),
|
||||
GetElementCSS(String, String, IpcSender<Result<String, ()>>),
|
||||
GetElementRect(String, IpcSender<Result<Rect<f64>, ()>>),
|
||||
GetElementTagName(String, IpcSender<Result<String, ()>>),
|
||||
GetElementText(String, IpcSender<Result<String, ()>>),
|
||||
GetFrameId(WebDriverFrameId, IpcSender<Result<Option<PipelineId>, ()>>),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue