mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Unexpose :-moz-locale-dir and :-moz-lwtheme* from content
Behind a pref for now. Given these selectors do nothing on non-chrome documents (they just don't match) it seems worth trying. A cursory search seems to indicate they're not used for UA detection or something like that (or at least I haven't found such an usage). Differential Revision: https://phabricator.services.mozilla.com/D130736
This commit is contained in:
parent
07dbd9d637
commit
6d887b96bc
2 changed files with 10 additions and 4 deletions
|
@ -90,9 +90,9 @@ macro_rules! apply_non_ts_list {
|
||||||
("-moz-use-shadow-tree-root", MozUseShadowTreeRoot, _, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS),
|
("-moz-use-shadow-tree-root", MozUseShadowTreeRoot, _, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS),
|
||||||
("-moz-is-html", MozIsHTML, _, _),
|
("-moz-is-html", MozIsHTML, _, _),
|
||||||
("-moz-placeholder", MozPlaceholder, _, _),
|
("-moz-placeholder", MozPlaceholder, _, _),
|
||||||
("-moz-lwtheme", MozLWTheme, _, _),
|
("-moz-lwtheme", MozLWTheme, _, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME),
|
||||||
("-moz-lwtheme-brighttext", MozLWThemeBrightText, _, _),
|
("-moz-lwtheme-brighttext", MozLWThemeBrightText, _, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME),
|
||||||
("-moz-lwtheme-darktext", MozLWThemeDarkText, _, _),
|
("-moz-lwtheme-darktext", MozLWThemeDarkText, _, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME),
|
||||||
("-moz-window-inactive", MozWindowInactive, _, _),
|
("-moz-window-inactive", MozWindowInactive, _, _),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,7 +127,7 @@ impl NonTSPseudoClass {
|
||||||
([$(($css:expr, $name:ident, $state:tt, $flags:tt),)*]) => {
|
([$(($css:expr, $name:ident, $state:tt, $flags:tt),)*]) => {
|
||||||
match *self {
|
match *self {
|
||||||
$(NonTSPseudoClass::$name => check_flag!($flags),)*
|
$(NonTSPseudoClass::$name => check_flag!($flags),)*
|
||||||
NonTSPseudoClass::MozLocaleDir(_) |
|
NonTSPseudoClass::MozLocaleDir(_) => check_flag!(PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME),
|
||||||
NonTSPseudoClass::Lang(_) |
|
NonTSPseudoClass::Lang(_) |
|
||||||
NonTSPseudoClass::Dir(_) => false,
|
NonTSPseudoClass::Dir(_) => false,
|
||||||
}
|
}
|
||||||
|
@ -145,6 +145,12 @@ impl NonTSPseudoClass {
|
||||||
if let NonTSPseudoClass::MozSubmitInvalid = *self {
|
if let NonTSPseudoClass::MozSubmitInvalid = *self {
|
||||||
return static_prefs::pref!("layout.css.moz-submit-invalid.enabled");
|
return static_prefs::pref!("layout.css.moz-submit-invalid.enabled");
|
||||||
}
|
}
|
||||||
|
if matches!(*self, Self::MozLWTheme | Self::MozLWThemeBrightText | Self::MozLWThemeDarkText) {
|
||||||
|
return static_prefs::pref!("layout.css.moz-lwtheme.content.enabled");
|
||||||
|
}
|
||||||
|
if let NonTSPseudoClass::MozLocaleDir(..) = *self {
|
||||||
|
return static_prefs::pref!("layout.css.moz-locale-dir.content.enabled");
|
||||||
|
}
|
||||||
!self.has_any_flag(NonTSPseudoClassFlag::PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME)
|
!self.has_any_flag(NonTSPseudoClassFlag::PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue