Merge pull request #3099 from Ms2ger/attr-local_name-atom

Make Attr::local_name an Atom; r=abinader
This commit is contained in:
Ms2ger 2014-08-19 17:04:39 +02:00
commit 1c1216de5c
22 changed files with 172 additions and 122 deletions

View file

@ -1374,7 +1374,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));
}
@ -1833,7 +1833,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())
})
})