Formatted code

This commit is contained in:
hundredeir 2019-04-06 23:40:01 +05:30
parent 816e599db3
commit a00b5b2053
3 changed files with 25 additions and 18 deletions

View file

@ -1872,7 +1872,7 @@ impl ScriptThread {
reply,
)
},
WebDriverScriptCommand::FindElementElementsCSS(selector,element_id,reply) => {
WebDriverScriptCommand::FindElementElementsCSS(selector, element_id, reply) => {
webdriver_handlers::handle_find_element_elements_css(
&*documents,
pipeline_id,

View file

@ -226,11 +226,12 @@ pub fn handle_find_element_elements_css(
element_id: String,
selector: String,
reply: IpcSender<Result<Option<String>, ()>>,
){
let node_ids = find_node_by_unique_id(documents,pipeline,element_id)
) {
let node_ids = find_node_by_unique_id(documents, pipeline, element_id)
.ok_or(())
.and_then(|node|{
node.query_selector_all(DOMString::from(selector)).map_err(|_| ())
.and_then(|node| {
node.query_selector_all(DOMString::from(selector))
.map_err(|_| ())
})
.map(|nodes| {
nodes