Make Attr::local_name an Atom.

This commit is contained in:
Ms2ger 2014-08-15 15:15:03 +02:00
parent ba592364b7
commit 9501d2e451
5 changed files with 68 additions and 53 deletions

View file

@ -1388,7 +1388,7 @@ impl Node {
for attr in node_elem.deref().attrs.borrow().iter().map(|attr| attr.root()) {
copy_elem.deref().attrs.borrow_mut().push_unrooted(
&Attr::new(&*window,
attr.deref().local_name.clone(), attr.deref().value().clone(),
attr.local_name().clone(), attr.deref().value().clone(),
attr.deref().name.clone(), attr.deref().namespace.clone(),
attr.deref().prefix.clone(), copy_elem));
}
@ -1847,7 +1847,7 @@ impl<'a> NodeMethods for JSRef<'a, Node> {
element.attrs.borrow().iter().map(|attr| attr.root()).all(|attr| {
other_element.attrs.borrow().iter().map(|attr| attr.root()).any(|other_attr| {
(attr.namespace == other_attr.namespace) &&
(attr.local_name == other_attr.local_name) &&
(attr.local_name() == other_attr.local_name()) &&
(attr.deref().value().as_slice() == other_attr.deref().value().as_slice())
})
})