mirror of
https://github.com/servo/servo.git
synced 2025-07-25 08:10:21 +01:00
Update to string-cache 0.3
This commit is contained in:
parent
9fcc9d9d3f
commit
53b638c0e2
170 changed files with 1309 additions and 1050 deletions
|
@ -16,7 +16,7 @@ use dom::globalscope::GlobalScope;
|
|||
use dom::htmlcollection::HTMLCollection;
|
||||
use dom::node::{Node, window_from_node};
|
||||
use dom::nodelist::NodeList;
|
||||
use string_cache::Atom;
|
||||
use servo_atoms::Atom;
|
||||
|
||||
// https://dom.spec.whatwg.org/#documentfragment
|
||||
#[dom_struct]
|
||||
|
@ -57,7 +57,7 @@ impl DocumentFragmentMethods for DocumentFragment {
|
|||
let node = self.upcast::<Node>();
|
||||
let id = Atom::from(id);
|
||||
node.traverse_preorder().filter_map(Root::downcast::<Element>).find(|descendant| {
|
||||
match descendant.get_attribute(&ns!(), &atom!("id")) {
|
||||
match descendant.get_attribute(&ns!(), &local_name!("id")) {
|
||||
None => false,
|
||||
Some(attr) => *attr.value().as_atom() == id,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue