mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Add support for :scope pseudo-class
This commit is contained in:
parent
715fc9cea6
commit
ab46a0bbe0
4 changed files with 25 additions and 1 deletions
|
@ -673,6 +673,7 @@ pub enum Component<Impl: SelectorImpl> {
|
|||
FirstChild, LastChild, OnlyChild,
|
||||
Root,
|
||||
Empty,
|
||||
Scope,
|
||||
NthChild(i32, i32),
|
||||
NthLastChild(i32, i32),
|
||||
NthOfType(i32, i32),
|
||||
|
@ -969,6 +970,7 @@ impl<Impl: SelectorImpl> ToCss for Component<Impl> {
|
|||
OnlyChild => dest.write_str(":only-child"),
|
||||
Root => dest.write_str(":root"),
|
||||
Empty => dest.write_str(":empty"),
|
||||
Scope => dest.write_str(":scope"),
|
||||
FirstOfType => dest.write_str(":first-of-type"),
|
||||
LastOfType => dest.write_str(":last-of-type"),
|
||||
OnlyOfType => dest.write_str(":only-of-type"),
|
||||
|
@ -1699,6 +1701,7 @@ fn parse_simple_pseudo_class<'i, P, E, Impl>(parser: &P, name: CowRcStr<'i>)
|
|||
"only-child" => Ok(Component::OnlyChild),
|
||||
"root" => Ok(Component::Root),
|
||||
"empty" => Ok(Component::Empty),
|
||||
"scope" => Ok(Component::Scope),
|
||||
"first-of-type" => Ok(Component::FirstOfType),
|
||||
"last-of-type" => Ok(Component::LastOfType),
|
||||
"only-of-type" => Ok(Component::OnlyOfType),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue