mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Add :-moz-browser-frame pseudo-class
This commit is contained in:
parent
0399f359c1
commit
e7e3889422
3 changed files with 24 additions and 2 deletions
|
@ -154,6 +154,10 @@ pub enum NonTSPseudoClass {
|
|||
ReadWrite,
|
||||
/// :read-only
|
||||
ReadOnly,
|
||||
|
||||
// Internal pseudo-classes
|
||||
/// :-moz-browser-frame
|
||||
MozBrowserFrame,
|
||||
}
|
||||
|
||||
impl ToCss for NonTSPseudoClass {
|
||||
|
@ -173,6 +177,8 @@ impl ToCss for NonTSPseudoClass {
|
|||
Indeterminate => ":indeterminate",
|
||||
ReadWrite => ":read-write",
|
||||
ReadOnly => ":read-only",
|
||||
|
||||
MozBrowserFrame => ":-moz-browser-frame",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -196,6 +202,7 @@ impl NonTSPseudoClass {
|
|||
Indeterminate |
|
||||
ReadWrite |
|
||||
ReadOnly => false,
|
||||
MozBrowserFrame => true,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -216,7 +223,8 @@ impl NonTSPseudoClass {
|
|||
|
||||
AnyLink |
|
||||
Link |
|
||||
Visited => ElementState::empty(),
|
||||
Visited |
|
||||
MozBrowserFrame => ElementState::empty(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -236,6 +244,7 @@ impl NonTSPseudoClass {
|
|||
Disabled => disabled,
|
||||
Checked => checked,
|
||||
Indeterminate => indeterminate,
|
||||
MozBrowserFrame => mozBrowserFrame,
|
||||
ReadWrite | ReadOnly => { return None; }
|
||||
})
|
||||
}
|
||||
|
@ -287,6 +296,10 @@ impl<'a> ::selectors::Parser for SelectorParser<'a> {
|
|||
"indeterminate" => Indeterminate,
|
||||
"read-write" => ReadWrite,
|
||||
"read-only" => ReadOnly,
|
||||
|
||||
// Internal
|
||||
"-moz-browser-frame" => MozBrowserFrame,
|
||||
|
||||
_ => return Err(())
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue