selectors: Remove the get_ prefix from get_local_name and get_namespace.

This commit is contained in:
Emilio Cobos Álvarez 2018-02-24 20:40:04 +01:00
parent da99f159f4
commit 7ab4b21bc3
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
12 changed files with 60 additions and 55 deletions

View file

@ -553,7 +553,7 @@ where
&local_name.name,
&local_name.lower_name
).borrow();
element.get_local_name() == name
element.local_name() == name
}
/// Determines whether the given element matches the given compound selector.
@ -655,11 +655,11 @@ where
}
Component::Namespace(_, ref url) |
Component::DefaultNamespace(ref url) => {
element.get_namespace() == url.borrow()
element.namespace() == url.borrow()
}
Component::ExplicitNoNamespace => {
let ns = ::parser::namespace_empty_string::<E::Impl>();
element.get_namespace() == ns.borrow()
element.namespace() == ns.borrow()
}
Component::ID(ref id) => {
element.has_id(id, context.shared.classes_and_ids_case_sensitivity())
@ -860,8 +860,8 @@ where
#[inline]
fn same_type<E: Element>(a: &E, b: &E) -> bool {
a.get_local_name() == b.get_local_name() &&
a.get_namespace() == b.get_namespace()
a.local_name() == b.local_name() &&
a.namespace() == b.namespace()
}
#[inline]

View file

@ -53,10 +53,10 @@ pub trait Element: Sized + Clone + Debug {
fn is_html_element_in_html_document(&self) -> bool;
fn get_local_name(&self) -> &<Self::Impl as SelectorImpl>::BorrowedLocalName;
fn local_name(&self) -> &<Self::Impl as SelectorImpl>::BorrowedLocalName;
/// Empty string for no namespace
fn get_namespace(&self) -> &<Self::Impl as SelectorImpl>::BorrowedNamespaceUrl;
fn namespace(&self) -> &<Self::Impl as SelectorImpl>::BorrowedNamespaceUrl;
fn attr_matches(&self,
ns: &NamespaceConstraint<&<Self::Impl as SelectorImpl>::NamespaceUrl>,