mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Auto merge of #20044 - upsuper:font-face-initial, r=SimonSapin
Remove initial values from font-face descriptors They are not used anyway. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20044) <!-- Reviewable:end -->
This commit is contained in:
commit
9f3ce51d50
1 changed files with 10 additions and 29 deletions
|
@ -331,8 +331,7 @@ macro_rules! font_face_descriptors {
|
||||||
$( #[$m_doc: meta] $m_name: tt $m_ident: ident / $m_gecko_ident: ident: $m_ty: ty, )*
|
$( #[$m_doc: meta] $m_name: tt $m_ident: ident / $m_gecko_ident: ident: $m_ty: ty, )*
|
||||||
]
|
]
|
||||||
optional descriptors = [
|
optional descriptors = [
|
||||||
$( #[$o_doc: meta] $o_name: tt $o_ident: ident / $o_gecko_ident: ident: $o_ty: ty =
|
$( #[$o_doc: meta] $o_name: tt $o_ident: ident / $o_gecko_ident: ident: $o_ty: ty, )*
|
||||||
$o_initial: expr, )*
|
|
||||||
]
|
]
|
||||||
) => {
|
) => {
|
||||||
font_face_descriptors_common! {
|
font_face_descriptors_common! {
|
||||||
|
@ -364,21 +363,11 @@ macro_rules! font_face_descriptors {
|
||||||
self.0 .$m_ident.as_ref().unwrap()
|
self.0 .$m_ident.as_ref().unwrap()
|
||||||
}
|
}
|
||||||
)*
|
)*
|
||||||
$(
|
|
||||||
#[$o_doc]
|
|
||||||
pub fn $o_ident(&self) -> $o_ty {
|
|
||||||
if let Some(ref value) = self.0 .$o_ident {
|
|
||||||
value.clone()
|
|
||||||
} else {
|
|
||||||
$o_initial
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)*
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// css-name rust_identifier: Type = initial_value,
|
/// css-name rust_identifier: Type,
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
font_face_descriptors! {
|
font_face_descriptors! {
|
||||||
mandatory descriptors = [
|
mandatory descriptors = [
|
||||||
|
@ -390,36 +379,28 @@ font_face_descriptors! {
|
||||||
]
|
]
|
||||||
optional descriptors = [
|
optional descriptors = [
|
||||||
/// The style of this font face
|
/// The style of this font face
|
||||||
"font-style" style / mStyle: font_style::T = font_style::T::normal,
|
"font-style" style / mStyle: font_style::T,
|
||||||
|
|
||||||
/// The weight of this font face
|
/// The weight of this font face
|
||||||
"font-weight" weight / mWeight: FontWeight = FontWeight::Normal,
|
"font-weight" weight / mWeight: FontWeight,
|
||||||
|
|
||||||
/// The stretch of this font face
|
/// The stretch of this font face
|
||||||
"font-stretch" stretch / mStretch: font_stretch::T = font_stretch::T::normal,
|
"font-stretch" stretch / mStretch: font_stretch::T,
|
||||||
|
|
||||||
/// The display of this font face
|
/// The display of this font face
|
||||||
"font-display" display / mDisplay: FontDisplay = FontDisplay::Auto,
|
"font-display" display / mDisplay: FontDisplay,
|
||||||
|
|
||||||
/// The ranges of code points outside of which this font face should not be used.
|
/// The ranges of code points outside of which this font face should not be used.
|
||||||
"unicode-range" unicode_range / mUnicodeRange: Vec<UnicodeRange> = vec![
|
"unicode-range" unicode_range / mUnicodeRange: Vec<UnicodeRange>,
|
||||||
UnicodeRange { start: 0, end: 0x10FFFF }
|
|
||||||
],
|
|
||||||
|
|
||||||
/// The feature settings of this font face.
|
/// The feature settings of this font face.
|
||||||
"font-feature-settings" feature_settings / mFontFeatureSettings: SpecifiedFontFeatureSettings = {
|
"font-feature-settings" feature_settings / mFontFeatureSettings: SpecifiedFontFeatureSettings,
|
||||||
font_feature_settings::SpecifiedValue::normal()
|
|
||||||
},
|
|
||||||
|
|
||||||
/// The variation settings of this font face.
|
/// The variation settings of this font face.
|
||||||
"font-variation-settings" variation_settings / mFontVariationSettings: FontVariationSettings = {
|
"font-variation-settings" variation_settings / mFontVariationSettings: FontVariationSettings,
|
||||||
font_variation_settings::SpecifiedValue::normal()
|
|
||||||
},
|
|
||||||
|
|
||||||
/// The language override of this font face.
|
/// The language override of this font face.
|
||||||
"font-language-override" language_override / mFontLanguageOverride: font_language_override::SpecifiedValue = {
|
"font-language-override" language_override / mFontLanguageOverride: font_language_override::SpecifiedValue,
|
||||||
font_language_override::SpecifiedValue::Normal
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue