mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Do not use CVAS for the list-style-type property
This commit is contained in:
parent
7fc2c43551
commit
0254fd0635
4 changed files with 5 additions and 7 deletions
|
@ -342,7 +342,7 @@ impl ToCss for System {
|
|||
}
|
||||
|
||||
/// https://drafts.csswg.org/css-counter-styles/#typedef-symbol
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq, ToComputedValue)]
|
||||
pub enum Symbol {
|
||||
/// <string>
|
||||
String(String),
|
||||
|
@ -489,7 +489,7 @@ impl Parse for Fallback {
|
|||
}
|
||||
|
||||
/// https://drafts.csswg.org/css-counter-styles/#descdef-counter-style-symbols
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq, ToComputedValue)]
|
||||
pub struct Symbols(pub Vec<Symbol>);
|
||||
|
||||
impl Parse for Symbols {
|
||||
|
|
|
@ -33,7 +33,6 @@ ${helpers.single_keyword("list-style-position", "outside inside", animation_valu
|
|||
<%helpers:longhand name="list-style-type" animation_value_type="discrete" boxed="True"
|
||||
spec="https://drafts.csswg.org/css-lists/#propdef-list-style-type">
|
||||
use values::CustomIdent;
|
||||
use values::computed::ComputedValueAsSpecified;
|
||||
use values::generics::CounterStyleOrNone;
|
||||
|
||||
pub use self::computed_value::T as SpecifiedValue;
|
||||
|
@ -42,15 +41,13 @@ ${helpers.single_keyword("list-style-position", "outside inside", animation_valu
|
|||
use values::generics::CounterStyleOrNone;
|
||||
|
||||
/// <counter-style> | <string> | none
|
||||
#[derive(Clone, Debug, Eq, PartialEq, ToCss)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq, ToComputedValue, ToCss)]
|
||||
pub enum T {
|
||||
CounterStyle(CounterStyleOrNone),
|
||||
String(String),
|
||||
}
|
||||
}
|
||||
|
||||
impl ComputedValueAsSpecified for SpecifiedValue {}
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
impl SpecifiedValue {
|
||||
/// Convert from gecko keyword to list-style-type.
|
||||
|
|
|
@ -339,6 +339,7 @@ trivial_to_computed_value!(bool);
|
|||
trivial_to_computed_value!(i32);
|
||||
trivial_to_computed_value!(f32);
|
||||
trivial_to_computed_value!(BorderStyle);
|
||||
trivial_to_computed_value!(String);
|
||||
|
||||
/// A `<number>` value.
|
||||
pub type Number = CSSFloat;
|
||||
|
|
|
@ -71,7 +71,7 @@ impl SymbolsType {
|
|||
///
|
||||
/// Since wherever <counter-style> is used, 'none' is a valid value as
|
||||
/// well, we combine them into one type to make code simpler.
|
||||
#[derive(Clone, Debug, Eq, PartialEq, ToCss)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq, ToComputedValue, ToCss)]
|
||||
pub enum CounterStyleOrNone {
|
||||
/// `none`
|
||||
None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue