mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Represent FirstChild, FirstOfType, LastChild, LastOfType, OnlyChild, and OnlyOfType as functionless Nth variants
Like bug 1808226, this doesn't change any behavior, it just simplifies matching. I also added a WPT JavaScript test for :only-of-type, since dedicated WPT JavScript tests already exist for the other pseudo-classes this patch touches. Differential Revision: https://phabricator.services.mozilla.com/D165859
This commit is contained in:
parent
dc225e0b2f
commit
211761ad88
5 changed files with 76 additions and 74 deletions
|
@ -711,16 +711,10 @@ where
|
|||
Component::Class(..) |
|
||||
Component::AttributeInNoNamespaceExists { .. } |
|
||||
Component::AttributeInNoNamespace { .. } |
|
||||
Component::FirstChild |
|
||||
Component::LastChild |
|
||||
Component::OnlyChild |
|
||||
Component::Root |
|
||||
Component::Empty |
|
||||
Component::Scope |
|
||||
Component::Nth(..) |
|
||||
Component::FirstOfType |
|
||||
Component::LastOfType |
|
||||
Component::OnlyOfType |
|
||||
Component::Host(None) => 0,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue