mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Implements :indeterminate pseudo-class
Addresses reviews
This commit is contained in:
parent
2d05ac537c
commit
504f968b20
14 changed files with 105 additions and 206 deletions
|
@ -23,7 +23,7 @@ use properties::{PropertyDeclaration, PropertyDeclarationBlock};
|
|||
use selectors::{After, AnyLink, AttrDashMatch, AttrEqual};
|
||||
use selectors::{AttrExists, AttrIncludes, AttrPrefixMatch};
|
||||
use selectors::{AttrSubstringMatch, AttrSuffixMatch, Before, CaseInsensitive, CaseSensitive};
|
||||
use selectors::{Checked, Child, ClassSelector};
|
||||
use selectors::{Checked, Child, ClassSelector, Indeterminate};
|
||||
use selectors::{CompoundSelector, Descendant, Disabled, Enabled, FirstChild, FirstOfType};
|
||||
use selectors::{Hover, IDSelector, LastChild, LastOfType};
|
||||
use selectors::{LaterSibling, LocalName, LocalNameSelector};
|
||||
|
@ -972,6 +972,12 @@ pub fn matches_simple_selector<'a,E,N>(selector: &SimpleSelector,
|
|||
let elem = element.as_element();
|
||||
elem.get_checked_state()
|
||||
}
|
||||
// https://html.spec.whatwg.org/multipage/scripting.html#selector-indeterminate
|
||||
Indeterminate => {
|
||||
*shareable = false;
|
||||
let elem = element.as_element();
|
||||
elem.get_indeterminate_state()
|
||||
}
|
||||
FirstChild => {
|
||||
*shareable = false;
|
||||
matches_first_child(element)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue