aboutsummaryrefslogtreecommitdiffstats
path: root/components/selectors/tree.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-06-04 08:30:39 -0400
committerGitHub <noreply@github.com>2019-06-04 08:30:39 -0400
commitfe8aad722749e8e5c9223800b98fc4e87b9ab161 (patch)
tree31150ecb4738828a3afd66fa1b1e76d0bf785550 /components/selectors/tree.rs
parent6e83856d7bcb79d1a937f026ef4fcf1a3256c2c6 (diff)
parentc155639bc5d8357d8c6e27535bc64f72bb8d2562 (diff)
downloadservo-fe8aad722749e8e5c9223800b98fc4e87b9ab161.tar.gz
servo-fe8aad722749e8e5c9223800b98fc4e87b9ab161.zip
Auto merge of #23503 - emilio:gecko-sync, r=emilio
style: sync changes from mozilla-central See each individual commit for details. This also cherry-picks #23463 with a few fixes that were needed in Gecko-only code. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23503) <!-- Reviewable:end -->
Diffstat (limited to 'components/selectors/tree.rs')
-rw-r--r--components/selectors/tree.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/components/selectors/tree.rs b/components/selectors/tree.rs
index 611e40d6027..f892abd4e94 100644
--- a/components/selectors/tree.rs
+++ b/components/selectors/tree.rs
@@ -62,10 +62,13 @@ pub trait Element: Sized + Clone + Debug {
fn is_html_element_in_html_document(&self) -> bool;
- fn local_name(&self) -> &<Self::Impl as SelectorImpl>::BorrowedLocalName;
+ fn has_local_name(&self, local_name: &<Self::Impl as SelectorImpl>::BorrowedLocalName) -> bool;
/// Empty string for no namespace
- fn namespace(&self) -> &<Self::Impl as SelectorImpl>::BorrowedNamespaceUrl;
+ fn has_namespace(&self, ns: &<Self::Impl as SelectorImpl>::BorrowedNamespaceUrl) -> bool;
+
+ /// Whether this element and the `other` element have the same local name and namespace.
+ fn is_same_type(&self, other: &Self) -> bool;
fn attr_matches(
&self,