diff options
author | Matthew Rasmus <mattr@zzntd.com> | 2014-12-08 11:29:42 -0800 |
---|---|---|
committer | Matthew Rasmus <mattr@zzntd.com> | 2014-12-16 11:34:04 -0800 |
commit | 504f968b20b35f901f2f6af564023b2bc8aa998d (patch) | |
tree | 9a61ebc16b7d132fc61a6552d4bcb14c53a5ef68 /components/style/selector_matching.rs | |
parent | 2d05ac537cbd33c413da3516544023391d03ee82 (diff) | |
download | servo-504f968b20b35f901f2f6af564023b2bc8aa998d.tar.gz servo-504f968b20b35f901f2f6af564023b2bc8aa998d.zip |
Implements :indeterminate pseudo-class
Addresses reviews
Diffstat (limited to 'components/style/selector_matching.rs')
-rw-r--r-- | components/style/selector_matching.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/components/style/selector_matching.rs b/components/style/selector_matching.rs index 5482745721f..091d6204886 100644 --- a/components/style/selector_matching.rs +++ b/components/style/selector_matching.rs @@ -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) |