aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/webdriver_handlers.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-05-24 18:27:26 -0500
committerbors-servo <metajack+bors@gmail.com>2015-05-24 18:27:26 -0500
commit542519ebfd073662bc9421ac5fa0aa01ebc0d6fe (patch)
tree4f6814d089be78af598f1d9f536c18a6a61f8e54 /components/script/webdriver_handlers.rs
parent16f19b628fa630aab8cfd275a90128da7b59723b (diff)
parent5793add4cdc9e96930160dfc90025f43607f9f5d (diff)
downloadservo-542519ebfd073662bc9421ac5fa0aa01ebc0d6fe.tar.gz
servo-542519ebfd073662bc9421ac5fa0aa01ebc0d6fe.zip
Auto merge of #6174 - frewsxcv:cleanup-long-lines, r=SimonSapin
Part of https://github.com/servo/servo/issues/6041 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6174) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/webdriver_handlers.rs')
-rw-r--r--components/script/webdriver_handlers.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/components/script/webdriver_handlers.rs b/components/script/webdriver_handlers.rs
index dc04e2346a0..6d6c7313a7c 100644
--- a/components/script/webdriver_handlers.rs
+++ b/components/script/webdriver_handlers.rs
@@ -46,7 +46,9 @@ pub fn jsval_to_webdriver(cx: *mut JSContext, val: JSVal) -> WebDriverJSResult {
Ok(WebDriverJSValue::Number(FromJSValConvertible::from_jsval(cx, val, ()).unwrap()))
} else if val.is_string() {
//FIXME: use jsstring_to_str when jsval grows to_jsstring
- Ok(WebDriverJSValue::String(FromJSValConvertible::from_jsval(cx, val, StringificationBehavior::Default).unwrap()))
+ Ok(
+ WebDriverJSValue::String(
+ FromJSValConvertible::from_jsval(cx, val, StringificationBehavior::Default).unwrap()))
} else if val.is_null() {
Ok(WebDriverJSValue::Null)
} else {
@@ -63,14 +65,16 @@ pub fn handle_execute_script(page: &Rc<Page>, pipeline: PipelineId, eval: String
reply.send(jsval_to_webdriver(cx, rval)).unwrap();
}
-pub fn handle_execute_async_script(page: &Rc<Page>, pipeline: PipelineId, eval: String, reply: Sender<WebDriverJSResult>) {
+pub fn handle_execute_async_script(page: &Rc<Page>, pipeline: PipelineId, eval: String,
+ reply: Sender<WebDriverJSResult>) {
let page = get_page(&*page, pipeline);
let window = page.window().root();
window.r().set_webdriver_script_chan(Some(reply));
window.r().evaluate_js_on_global_with_result(&eval);
}
-pub fn handle_find_element_css(page: &Rc<Page>, _pipeline: PipelineId, selector: String, reply: Sender<Result<Option<String>, ()>>) {
+pub fn handle_find_element_css(page: &Rc<Page>, _pipeline: PipelineId, selector: String,
+ reply: Sender<Result<Option<String>, ()>>) {
reply.send(match page.document().root().r().QuerySelector(selector.clone()) {
Ok(node) => {
let result = node.map(|x| NodeCast::from_ref(x.root().r()).get_unique_id());
@@ -80,7 +84,8 @@ pub fn handle_find_element_css(page: &Rc<Page>, _pipeline: PipelineId, selector:
}).unwrap();
}
-pub fn handle_find_elements_css(page: &Rc<Page>, _pipeline: PipelineId, selector: String, reply: Sender<Result<Vec<String>, ()>>) {
+pub fn handle_find_elements_css(page: &Rc<Page>, _pipeline: PipelineId, selector: String,
+ reply: Sender<Result<Vec<String>, ()>>) {
reply.send(match page.document().root().r().QuerySelectorAll(selector.clone()) {
Ok(ref node_list) => {
let nodes = node_list.root();