Privatize Attr

This commit is contained in:
Tim Taubert 2014-10-11 23:25:42 +02:00
parent 9a52bb8310
commit 78fef7eec5
4 changed files with 33 additions and 17 deletions

View file

@ -1529,8 +1529,8 @@ impl Node {
copy_elem.attrs.borrow_mut().push_unrooted(
&Attr::new(*window,
attr.local_name().clone(), attr.value().clone(),
attr.name.clone(), attr.namespace.clone(),
attr.prefix.clone(), copy_elem));
attr.name().clone(), attr.namespace().clone(),
attr.prefix().clone(), copy_elem));
}
},
_ => ()
@ -1988,7 +1988,7 @@ impl<'a> NodeMethods for JSRef<'a, Node> {
assert!(element.attrs.borrow().len() == other_element.attrs.borrow().len());
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.namespace() == *other_attr.namespace()) &&
(attr.local_name() == other_attr.local_name()) &&
(attr.value().as_slice() == other_attr.value().as_slice())
})