Move Attr::local_name() to AttrHelpers/AttrHelpersForLayout.

This commit is contained in:
Tetsuharu OHZEKI 2014-09-10 23:54:37 +09:00
parent b73b06b9a8
commit a4ec892dbc
2 changed files with 12 additions and 6 deletions

View file

@ -178,7 +178,7 @@ impl RawLayoutElementHelpers for Element {
let attrs: *const Vec<JS<Attr>> = mem::transmute(&self.attrs);
(*attrs).iter().find(|attr: & &JS<Attr>| {
let attr = attr.unsafe_get();
name == (*attr).local_name().as_slice() &&
name == (*attr).local_name_atom_forever().as_slice() &&
(*attr).namespace == *namespace
}).map(|attr| {
let attr = attr.unsafe_get();
@ -193,7 +193,7 @@ impl RawLayoutElementHelpers for Element {
let attrs: *const Vec<JS<Attr>> = mem::transmute(&self.attrs);
(*attrs).iter().find(|attr: & &JS<Attr>| {
let attr = attr.unsafe_get();
name == (*attr).local_name().as_slice() &&
name == (*attr).local_name_atom_forever().as_slice() &&
(*attr).namespace == *namespace
}).and_then(|attr| {
let attr = attr.unsafe_get();