mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Expose :autofill behind a pref to content, and add :-webkit-autofill as a compat alias.
Nightly only until we get resolutions on the relevant spec issues. Differential Revision: https://phabricator.services.mozilla.com/D99296
This commit is contained in:
parent
019e6a3e2a
commit
72a0dbacc7
1 changed files with 5 additions and 1 deletions
|
@ -121,6 +121,7 @@ impl NonTSPseudoClass {
|
|||
"-moz-full-screen" => Some(NonTSPseudoClass::Fullscreen),
|
||||
"-moz-read-only" => Some(NonTSPseudoClass::ReadOnly),
|
||||
"-moz-read-write" => Some(NonTSPseudoClass::ReadWrite),
|
||||
"-webkit-autofill" => Some(NonTSPseudoClass::Autofill),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
@ -155,9 +156,12 @@ impl NonTSPseudoClass {
|
|||
/// Returns whether the pseudo-class is enabled in content sheets.
|
||||
#[inline]
|
||||
fn is_enabled_in_content(&self) -> bool {
|
||||
if matches!(*self, NonTSPseudoClass::FocusVisible) {
|
||||
if let NonTSPseudoClass::FocusVisible = *self {
|
||||
return static_prefs::pref!("layout.css.focus-visible.enabled");
|
||||
}
|
||||
if let NonTSPseudoClass::Autofill = *self {
|
||||
return static_prefs::pref!("layout.css.autofill.enabled");
|
||||
}
|
||||
!self.has_any_flag(NonTSPseudoClassFlag::PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue