mirror of
https://github.com/servo/servo.git
synced 2025-06-21 15:49:04 +01:00
Derive ToCss for PairValues
This commit is contained in:
parent
71c0c3a5d3
commit
51a54e1a60
1 changed files with 1 additions and 15 deletions
|
@ -80,7 +80,7 @@ impl ToGeckoFontFeatureValues for SingleValue {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A @font-feature-values block declaration value that keeps one or two values.
|
/// A @font-feature-values block declaration value that keeps one or two values.
|
||||||
#[derive(Clone, Debug, PartialEq)]
|
#[derive(Clone, Debug, PartialEq, ToCss)]
|
||||||
pub struct PairValues(pub u32, pub Option<u32>);
|
pub struct PairValues(pub u32, pub Option<u32>);
|
||||||
|
|
||||||
impl Parse for PairValues {
|
impl Parse for PairValues {
|
||||||
|
@ -104,20 +104,6 @@ impl Parse for PairValues {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ToCss for PairValues {
|
|
||||||
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
|
|
||||||
where
|
|
||||||
W: Write,
|
|
||||||
{
|
|
||||||
self.0.to_css(dest)?;
|
|
||||||
if let Some(second) = self.1 {
|
|
||||||
dest.write_char(' ')?;
|
|
||||||
second.to_css(dest)?;
|
|
||||||
}
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
impl ToGeckoFontFeatureValues for PairValues {
|
impl ToGeckoFontFeatureValues for PairValues {
|
||||||
fn to_gecko_font_feature_values(&self, array: &mut nsTArray<u32>) {
|
fn to_gecko_font_feature_values(&self, array: &mut nsTArray<u32>) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue