mirror of
https://github.com/servo/servo.git
synced 2025-06-29 11:33:39 +01:00
style: Unprefix :-moz-selection.
Our implementation is totally not what the spec says, but totally what other UAs do, see https://github.com/w3c/csswg-drafts/issues/2474. So given this is causing webcompat pain, I think we should be pragmatic and just unprefix this. We could keep serialization and getComputedStyle with ::selection working with a bit more effort, like we do for :-moz-placeholder, but I'd prefer not doing at least the serialization bit, and just alias in nsCSSPseudoElements :-moz-selection to selection too. Bug: 509958 Reviewed-by: dbaron,xidorn MozReview-Commit-ID: 6lxctozRDqv
This commit is contained in:
parent
db0134e697
commit
06dbb6700d
1 changed files with 5 additions and 5 deletions
|
@ -216,11 +216,7 @@ impl PseudoElement {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Constructs an atom from a string of text, and whether we're in a
|
/// Constructs a pseudo-element from a string of text.
|
||||||
/// user-agent stylesheet.
|
|
||||||
///
|
|
||||||
/// If we're not in a user-agent stylesheet, we will never parse anonymous
|
|
||||||
/// box pseudo-elements.
|
|
||||||
///
|
///
|
||||||
/// Returns `None` if the pseudo-element is not recognised.
|
/// Returns `None` if the pseudo-element is not recognised.
|
||||||
#[inline]
|
#[inline]
|
||||||
|
@ -234,6 +230,10 @@ impl PseudoElement {
|
||||||
return Some(${pseudo_element_variant(pseudo)})
|
return Some(${pseudo_element_variant(pseudo)})
|
||||||
}
|
}
|
||||||
% endfor
|
% endfor
|
||||||
|
// Alias "-moz-selection" to "selection" at parse time.
|
||||||
|
"-moz-selection" => {
|
||||||
|
return Some(PseudoElement::Selection);
|
||||||
|
}
|
||||||
_ => {
|
_ => {
|
||||||
// FIXME: -moz-tree check should probably be
|
// FIXME: -moz-tree check should probably be
|
||||||
// ascii-case-insensitive.
|
// ascii-case-insensitive.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue