mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Do not use CVAS for FontSettings<T>
This commit is contained in:
parent
def983c295
commit
bf034a83e8
4 changed files with 8 additions and 11 deletions
|
@ -338,6 +338,7 @@ trivial_to_computed_value!(f32);
|
|||
trivial_to_computed_value!(i32);
|
||||
trivial_to_computed_value!(u8);
|
||||
trivial_to_computed_value!(u16);
|
||||
trivial_to_computed_value!(u32);
|
||||
trivial_to_computed_value!(Atom);
|
||||
trivial_to_computed_value!(BorderStyle);
|
||||
trivial_to_computed_value!(Cursor);
|
||||
|
|
|
@ -129,8 +129,8 @@ impl Parse for CounterStyleOrNone {
|
|||
///
|
||||
/// For font-feature-settings, this is a tag and an integer,
|
||||
/// for font-variation-settings this is a tag and a float
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
#[derive(Clone, Debug, Eq, PartialEq, ToComputedValue)]
|
||||
pub struct FontSettingTag<T> {
|
||||
/// A four-character tag, packed into a u32 (one byte per character)
|
||||
pub tag: u32,
|
||||
|
@ -187,7 +187,7 @@ impl<T: Parse> Parse for FontSettingTag<T> {
|
|||
|
||||
/// A font settings value for font-variation-settings or font-feature-settings
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
#[derive(Clone, Debug, Eq, PartialEq, ToCss)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq, ToComputedValue, ToCss)]
|
||||
pub enum FontSettings<T> {
|
||||
/// No settings (default)
|
||||
Normal,
|
||||
|
@ -210,16 +210,17 @@ impl<T: Parse> Parse for FontSettings<T> {
|
|||
///
|
||||
/// Do not use this type anywhere except within FontSettings
|
||||
/// because it serializes with the preceding space
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, ToComputedValue)]
|
||||
pub struct FontSettingTagInt(pub u32);
|
||||
|
||||
/// A number value to be used for font-variation-settings
|
||||
///
|
||||
/// Do not use this type anywhere except within FontSettings
|
||||
/// because it serializes with the preceding space
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
#[cfg_attr(feature = "gecko", derive(Animate, ComputeSquaredDistance))]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
#[derive(Clone, Debug, PartialEq, ToComputedValue)]
|
||||
pub struct FontSettingTagFloat(pub f32);
|
||||
|
||||
impl ToCss for FontSettingTagInt {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue