mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Add simple parsing and matching support for :has
Parsing is behind a config value `layout.css.has-selectors.enabled`. This change does not support p:has(> a) combinators, but will handle them gracefully, just not matching on them. Differential Revision: https://phabricator.services.mozilla.com/D149515
This commit is contained in:
parent
dcdf9f33d5
commit
3d0cf4dbf9
8 changed files with 85 additions and 10 deletions
|
@ -60,6 +60,9 @@ pub trait Element: Sized + Clone + Debug {
|
|||
/// Skips non-element nodes
|
||||
fn next_sibling_element(&self) -> Option<Self>;
|
||||
|
||||
/// Skips non-element nodes
|
||||
fn first_element_child(&self) -> Option<Self>;
|
||||
|
||||
fn is_html_element_in_html_document(&self) -> bool;
|
||||
|
||||
fn has_local_name(&self, local_name: &<Self::Impl as SelectorImpl>::BorrowedLocalName) -> bool;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue