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

@ -291,27 +291,32 @@ impl<'a, E> Element for ElementWrapper<'a, E>
.map(|e| ElementWrapper::new(e, self.snapshot_map))
}
#[inline]
fn is_html_element_in_html_document(&self) -> bool {
self.element.is_html_element_in_html_document()
}
#[inline]
fn is_html_slot_element(&self) -> bool {
self.element.is_html_slot_element()
}
fn get_local_name(&self) -> &<Self::Impl as ::selectors::SelectorImpl>::BorrowedLocalName {
self.element.get_local_name()
#[inline]
fn local_name(&self) -> &<Self::Impl as ::selectors::SelectorImpl>::BorrowedLocalName {
self.element.local_name()
}
fn get_namespace(&self) -> &<Self::Impl as ::selectors::SelectorImpl>::BorrowedNamespaceUrl {
self.element.get_namespace()
#[inline]
fn namespace(&self) -> &<Self::Impl as ::selectors::SelectorImpl>::BorrowedNamespaceUrl {
self.element.namespace()
}
fn attr_matches(&self,
ns: &NamespaceConstraint<&Namespace>,
local_name: &LocalName,
operation: &AttrSelectorOperation<&AttrValue>)
-> bool {
fn attr_matches(
&self,
ns: &NamespaceConstraint<&Namespace>,
local_name: &LocalName,
operation: &AttrSelectorOperation<&AttrValue>,
) -> bool {
match self.snapshot() {
Some(snapshot) if snapshot.has_attrs() => {
snapshot.attr_matches(ns, local_name, operation)

View file

@ -84,7 +84,7 @@ impl Invalidation {
// This could look at the quirks mode of the document, instead
// of testing against both names, but it's probably not worth
// it.
let local_name = element.get_local_name();
let local_name = element.local_name();
return *local_name == **name || *local_name == **lower_name
}
}