Oriol Brufau 2024-03-30 14:30:13 +01:00 committed by GitHub
parent a7ad92d9a3
commit fff9ef87e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 97 additions and 181 deletions

View file

@ -453,6 +453,21 @@ impl<'dom, LayoutDataType: LayoutDataTrait> style::dom::TElement
) -> euclid::default::Size2D<Option<app_units::Au>> {
todo!();
}
fn has_selector_flags(&self, flags: ElementSelectorFlags) -> bool {
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)
}
}
}
impl<'dom, LayoutDataType: LayoutDataTrait> ::selectors::Element