mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
merge from master
This commit is contained in:
commit
6e774ea6eb
1044 changed files with 46059 additions and 1506 deletions
|
@ -115,7 +115,7 @@ pub fn handle_get_frame_id(page: &Rc<Page>,
|
|||
|
||||
pub fn handle_find_element_css(page: &Rc<Page>, _pipeline: PipelineId, selector: String,
|
||||
reply: IpcSender<Result<Option<String>, ()>>) {
|
||||
reply.send(match page.document().r().QuerySelector(selector.clone()) {
|
||||
reply.send(match page.document().r().QuerySelector(selector) {
|
||||
Ok(node) => {
|
||||
Ok(node.map(|x| x.upcast::<Node>().get_unique_id()))
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ pub fn handle_find_elements_css(page: &Rc<Page>,
|
|||
_pipeline: PipelineId,
|
||||
selector: String,
|
||||
reply: IpcSender<Result<Vec<String>, ()>>) {
|
||||
reply.send(match page.document().r().QuerySelectorAll(selector.clone()) {
|
||||
reply.send(match page.document().r().QuerySelectorAll(selector) {
|
||||
Ok(ref nodes) => {
|
||||
let mut result = Vec::with_capacity(nodes.r().Length() as usize);
|
||||
for i in 0..nodes.r().Length() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue