mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Remove non-standard and unused system font values
And hide internal but used values. System fonts are not exposed in the computed style so this should be fine. If we need the old values for some obscure reason, it's trivial to alias them to e.g., menu or so. Differential Revision: https://phabricator.services.mozilla.com/D163269
This commit is contained in:
parent
bf593a81ed
commit
11313368ac
2 changed files with 16 additions and 8 deletions
|
@ -71,7 +71,7 @@
|
|||
let mut stretch = None;
|
||||
let size;
|
||||
% if engine == "gecko":
|
||||
if let Ok(sys) = input.try_parse(SystemFont::parse) {
|
||||
if let Ok(sys) = input.try_parse(|i| SystemFont::parse(context, i)) {
|
||||
return Ok(expanded! {
|
||||
% for name in SYSTEM_FONT_LONGHANDS:
|
||||
${name}: ${name}::SpecifiedValue::system_font(sys),
|
||||
|
|
|
@ -72,21 +72,29 @@ macro_rules! system_font_methods {
|
|||
#[allow(missing_docs)]
|
||||
#[cfg(feature = "gecko")]
|
||||
pub enum SystemFont {
|
||||
/// https://drafts.csswg.org/css-fonts/#valdef-font-caption
|
||||
Caption,
|
||||
/// https://drafts.csswg.org/css-fonts/#valdef-font-icon
|
||||
Icon,
|
||||
/// https://drafts.csswg.org/css-fonts/#valdef-font-menu
|
||||
Menu,
|
||||
/// https://drafts.csswg.org/css-fonts/#valdef-font-message-box
|
||||
MessageBox,
|
||||
/// https://drafts.csswg.org/css-fonts/#valdef-font-small-caption
|
||||
SmallCaption,
|
||||
/// https://drafts.csswg.org/css-fonts/#valdef-font-status-bar
|
||||
StatusBar,
|
||||
MozWindow,
|
||||
MozDocument,
|
||||
MozWorkspace,
|
||||
MozDesktop,
|
||||
MozInfo,
|
||||
MozDialog,
|
||||
MozButton,
|
||||
/// Internal system font, used by the `<menupopup>`s on macOS.
|
||||
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||
MozPullDownMenu,
|
||||
/// Internal system font, used for `<button>` elements.
|
||||
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||
MozButton,
|
||||
/// Internal font, used by `<select>` elements.
|
||||
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||
MozList,
|
||||
/// Internal font, used by `<input>` elements.
|
||||
#[parse(condition = "ParserContext::in_ua_or_chrome_sheet")]
|
||||
MozField,
|
||||
#[css(skip)]
|
||||
End, // Just for indexing purposes.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue