aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_dom/element.rs
diff options
context:
space:
mode:
authorOriol Brufau <obrufau@igalia.com>2024-04-25 16:48:07 +0200
committerGitHub <noreply@github.com>2024-04-25 14:48:07 +0000
commit401e49010f4851e5a8b14a72741b287945824e3e (patch)
treeb585248e51fd56fb66575147b2b90b68706f977e /components/script/layout_dom/element.rs
parent1440406e91684771bb810ead6ac5ae710f55f3ea (diff)
downloadservo-401e49010f4851e5a8b14a72741b287945824e3e.tar.gz
servo-401e49010f4851e5a8b14a72741b287945824e3e.zip
Upgrade Stylo to 2024-04-16 (#32128)
* Upgrade Stylo to 2024-04-16 * Fixup for https://phabricator.services.mozilla.com/D205051 * Fixup for https://phabricator.services.mozilla.com/D203153 * Fixup for https://phabricator.services.mozilla.com/D202460 * Fixup for https://phabricator.services.mozilla.com/D205718 * Fixup for https://phabricator.services.mozilla.com/D206428 * Update test expectations
Diffstat (limited to 'components/script/layout_dom/element.rs')
-rw-r--r--components/script/layout_dom/element.rs28
1 files changed, 19 insertions, 9 deletions
diff --git a/components/script/layout_dom/element.rs b/components/script/layout_dom/element.rs
index 8d1c6713849..3e71e1eb773 100644
--- a/components/script/layout_dom/element.rs
+++ b/components/script/layout_dom/element.rs
@@ -414,15 +414,16 @@ impl<'dom> style::dom::TElement for ServoLayoutElement<'dom> {
self.element.get_selector_flags().contains(flags)
}
- fn relative_selector_search_direction(&self) -> Option<ElementSelectorFlags> {
- let flags = self.element.get_selector_flags().intersection(
- ElementSelectorFlags::RELATIVE_SELECTOR_SEARCH_DIRECTION_ANCESTOR_SIBLING,
- );
- if flags.is_empty() {
- None
- } else {
- Some(flags)
- }
+ fn relative_selector_search_direction(&self) -> ElementSelectorFlags {
+ self.element
+ .get_selector_flags()
+ .intersection(ElementSelectorFlags::RELATIVE_SELECTOR_SEARCH_DIRECTION_ANCESTOR_SIBLING)
+ }
+
+ fn each_custom_state<F>(&self, _callback: F)
+ where
+ F: FnMut(&AtomIdent),
+ {
}
}
@@ -551,6 +552,7 @@ impl<'dom> ::selectors::Element for ServoLayoutElement<'dom> {
NonTSPseudoClass::Link | NonTSPseudoClass::AnyLink => self.is_link(),
NonTSPseudoClass::Visited => false,
+ NonTSPseudoClass::CustomState(ref state) => self.has_custom_state(&state.0),
NonTSPseudoClass::Lang(ref lang) => self.match_element_lang(None, lang),
NonTSPseudoClass::ServoNonZeroBorder => !matches!(
@@ -651,6 +653,10 @@ impl<'dom> ::selectors::Element for ServoLayoutElement<'dom> {
each_relevant_element_hash(*self, |hash| filter.insert_hash(hash & BLOOM_HASH_MASK));
true
}
+
+ fn has_custom_state(&self, _name: &AtomIdent) -> bool {
+ false
+ }
}
/// A wrapper around elements that ensures layout can only
@@ -893,4 +899,8 @@ impl<'dom> ::selectors::Element for ServoThreadSafeLayoutElement<'dom> {
});
true
}
+
+ fn has_custom_state(&self, _name: &AtomIdent) -> bool {
+ false
+ }
}