mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
selectors: Remove the get_ prefix from get_local_name and get_namespace.
This commit is contained in:
parent
da99f159f4
commit
7ab4b21bc3
12 changed files with 60 additions and 55 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue