diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2020-01-31 01:48:35 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-31 01:48:35 -0500 |
commit | 4edd1590f48bf61d60e69254b2e05bf62185ef77 (patch) | |
tree | 3b5c0083de28ceb6d408a98af228116ecc052a71 /components/style/servo/selector_parser.rs | |
parent | b2f466d9e421656b12ccce9f9572a71b113986c5 (diff) | |
parent | 8ca4db2cd64344c874016f110922cefd9e4ebb58 (diff) | |
download | servo-4edd1590f48bf61d60e69254b2e05bf62185ef77.tar.gz servo-4edd1590f48bf61d60e69254b2e05bf62185ef77.zip |
Auto merge of #25627 - pshaughn:definedpseudo, r=emilio,jdm
Implement :defined CSS selector
<!-- Please describe your changes on the following line: -->
ElementState::IN_DEFINED_STATE already existed but wasn't hooked up to anything; now it is set appropriately, and CSS is aware of it. The main test for this selector needed the window named getter for no important reason, so I made a one-line test change to avoid that. Remaining failures in the test are all about SVG elements.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #25010
<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because ___
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Diffstat (limited to 'components/style/servo/selector_parser.rs')
-rw-r--r-- | components/style/servo/selector_parser.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/components/style/servo/selector_parser.rs b/components/style/servo/selector_parser.rs index 942dcdba1bb..599b603f4ff 100644 --- a/components/style/servo/selector_parser.rs +++ b/components/style/servo/selector_parser.rs @@ -278,6 +278,7 @@ pub enum NonTSPseudoClass { Active, AnyLink, Checked, + Defined, Disabled, Enabled, Focus, @@ -332,6 +333,7 @@ impl ToCss for NonTSPseudoClass { Active => ":active", AnyLink => ":any-link", Checked => ":checked", + Defined => ":defined", Disabled => ":disabled", Enabled => ":enabled", Focus => ":focus", @@ -371,6 +373,7 @@ impl NonTSPseudoClass { Focus => ElementState::IN_FOCUS_STATE, Fullscreen => ElementState::IN_FULLSCREEN_STATE, Hover => ElementState::IN_HOVER_STATE, + Defined => ElementState::IN_DEFINED_STATE, Enabled => ElementState::IN_ENABLED_STATE, Disabled => ElementState::IN_DISABLED_STATE, Checked => ElementState::IN_CHECKED_STATE, @@ -436,6 +439,7 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> { "active" => Active, "any-link" => AnyLink, "checked" => Checked, + "defined" => Defined, "disabled" => Disabled, "enabled" => Enabled, "focus" => Focus, |