mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Revert "script: Use atom comparison in more places, especially for attributes." for persistent test failures.
This reverts commit 874db26104
.
This commit is contained in:
parent
7158cac2dc
commit
9607b468bc
32 changed files with 147 additions and 300 deletions
|
@ -27,7 +27,6 @@ use servo_msg::compositor_msg::ScriptListener;
|
|||
use servo_msg::constellation_msg::{ConstellationChan, WindowSizeData};
|
||||
use servo_msg::constellation_msg::{PipelineId, SubpageId};
|
||||
use servo_net::resource_task::ResourceTask;
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::namespace::Null;
|
||||
use servo_util::str::DOMString;
|
||||
use std::cell::{Cell, RefCell, Ref, RefMut};
|
||||
|
@ -402,11 +401,9 @@ impl Page {
|
|||
.filter(|node| node.is_anchor_element());
|
||||
anchors.find(|node| {
|
||||
let elem: &JSRef<Element> = ElementCast::to_ref(node).unwrap();
|
||||
elem.get_attribute(Null, &satom!("name"))
|
||||
.root()
|
||||
.map_or(false, |attr| {
|
||||
attr.deref().value().as_slice() == fragid.as_slice()
|
||||
})
|
||||
elem.get_attribute(Null, "name").root().map_or(false, |attr| {
|
||||
attr.deref().value().as_slice() == fragid.as_slice()
|
||||
})
|
||||
}).map(|node| Temporary::from_rooted(ElementCast::to_ref(&node).unwrap()))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue