mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Implement :valid :invalid pseudo classes (#26729)
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
2b67392fd5
commit
5f2c6c09cd
30 changed files with 324 additions and 241 deletions
|
@ -281,6 +281,8 @@ pub enum NonTSPseudoClass {
|
|||
Active,
|
||||
AnyLink,
|
||||
Checked,
|
||||
Valid,
|
||||
Invalid,
|
||||
Defined,
|
||||
Disabled,
|
||||
Enabled,
|
||||
|
@ -338,6 +340,8 @@ impl ToCss for NonTSPseudoClass {
|
|||
Active => ":active",
|
||||
AnyLink => ":any-link",
|
||||
Checked => ":checked",
|
||||
Valid => ":valid",
|
||||
Invalid => ":invalid",
|
||||
Defined => ":defined",
|
||||
Disabled => ":disabled",
|
||||
Enabled => ":enabled",
|
||||
|
@ -371,6 +375,8 @@ impl NonTSPseudoClass {
|
|||
Enabled => ElementState::IN_ENABLED_STATE,
|
||||
Disabled => ElementState::IN_DISABLED_STATE,
|
||||
Checked => ElementState::IN_CHECKED_STATE,
|
||||
Valid => ElementState::IN_VALID_STATE,
|
||||
Invalid => ElementState::IN_INVALID_STATE,
|
||||
Indeterminate => ElementState::IN_INDETERMINATE_STATE,
|
||||
ReadOnly | ReadWrite => ElementState::IN_READWRITE_STATE,
|
||||
PlaceholderShown => ElementState::IN_PLACEHOLDER_SHOWN_STATE,
|
||||
|
@ -425,6 +431,8 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> {
|
|||
"active" => Active,
|
||||
"any-link" => AnyLink,
|
||||
"checked" => Checked,
|
||||
"valid" => Valid,
|
||||
"invalid" => Invalid,
|
||||
"defined" => Defined,
|
||||
"disabled" => Disabled,
|
||||
"enabled" => Enabled,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue