style: Make ::-moz-focus-outer a no-op, and remove it on Nightly.

See https://bugzilla.mozilla.org/show_bug.cgi?id=932410#c2 for the
context for which this pseudo-element was added.

In the previous patch, I had to special-case range appearance because of
this pseudo-class, but that patch makes this pseudo-class completely
redundant, as now all form controls, themed and unthemed, display
outlines, unless the native theme displays a focus indicator on its own.

Remove the special case, and make ranges use outlines like everything
else rather than this bespoke pseudo-element.

Differential Revision: https://phabricator.services.mozilla.com/D74734
This commit is contained in:
Emilio Cobos Álvarez 2020-05-18 10:54:16 +00:00
parent 0c4bba6b52
commit 7cbc963fc7

View file

@ -159,7 +159,13 @@ impl PseudoElement {
/// Whether this pseudo-element is enabled for all content.
pub fn enabled_in_content(&self) -> bool {
(self.flags() & structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS_AND_CHROME) == 0
if (self.flags() & structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS_AND_CHROME) != 0 {
return false;
}
match *self {
PseudoElement::MozFocusOuter => static_prefs::pref!("layout.css.moz-focus-outer.enabled"),
_ => true,
}
}
/// Whether this pseudo is enabled explicitly in UA sheets.