mirror of
https://github.com/servo/servo.git
synced 2025-08-16 10:55:34 +01:00
Stylo: match both ::placehoder & ::moz-placeholder for placeholder pseudo-elements.
This commit is contained in:
parent
84c1f904cb
commit
6143e95d74
5 changed files with 22 additions and 4 deletions
|
@ -102,6 +102,15 @@ impl PseudoElement {
|
|||
pub fn is_precomputed(&self) -> bool {
|
||||
self.is_anon_box()
|
||||
}
|
||||
|
||||
/// Covert non-canonical pseudo-element to canonical one, and keep a
|
||||
/// canonical one as it is.
|
||||
pub fn canonical(&self) -> PseudoElement {
|
||||
match *self {
|
||||
PseudoElement::MozPlaceholder => PseudoElement::Placeholder,
|
||||
_ => self.clone(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ToCss for PseudoElement {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue