style: Add an inherited internal UA sheet property (-moz-list-reversed:true|false) to propagate <ol reversed> to its relevant descendants.

Bug: 288704
Reviewed-by: emilio
This commit is contained in:
Mats Palmgren 2019-03-24 23:13:52 +01:00 committed by Emilio Cobos Álvarez
parent 4b4b5b6a1d
commit 4f44b1c6b1
8 changed files with 28 additions and 0 deletions

View file

@ -108,6 +108,7 @@ include = [
"TouchAction",
"WillChangeBits",
"TextDecorationLine",
"MozListReversed",
]
item_types = ["enums", "structs", "typedefs"]

View file

@ -324,6 +324,7 @@ class Longhand(object):
"JustifyItems",
"JustifySelf",
"MozForceBrokenImageIcon",
"MozListReversed",
"MozScriptLevel",
"MozScriptMinSize",
"MozScriptSizeMultiplier",

View file

@ -1247,6 +1247,7 @@ impl Clone for ${style_struct.gecko_struct_name} {
"Length": impl_absolute_length,
"LengthOrNormal": impl_style_coord,
"LengthPercentageOrAuto": impl_style_coord,
"MozListReversed": impl_simple,
"MozScriptMinSize": impl_absolute_length,
"RGBAColor": impl_rgba_color,
"SVGLength": impl_svg_length,

View file

@ -68,3 +68,15 @@ ${helpers.predefined_type(
boxed=True,
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-image-region)",
)}
${helpers.predefined_type(
"-moz-list-reversed",
"MozListReversed",
"computed::MozListReversed::False",
animation_value_type="discrete",
products="gecko",
enabled_in="ua",
needs_context=False,
spec="Internal implementation detail for <ol reversed>",
servo_restyle_damage="rebuild_and_reflow",
)}

View file

@ -6,6 +6,7 @@
#[cfg(feature = "gecko")]
pub use crate::values::specified::list::ListStyleType;
pub use crate::values::specified::list::MozListReversed;
pub use crate::values::specified::list::{QuotePair, Quotes};
use servo_arc::Arc;

View file

@ -64,6 +64,7 @@ pub use self::length::{LengthOrAuto, LengthPercentageOrAuto, MaxSize, Size};
pub use self::length::{NonNegativeLengthPercentage, NonNegativeLengthPercentageOrAuto};
#[cfg(feature = "gecko")]
pub use self::list::ListStyleType;
pub use self::list::MozListReversed;
pub use self::list::{QuotePair, Quotes};
pub use self::motion::OffsetPath;
pub use self::outline::OutlineStyle;

View file

@ -123,3 +123,13 @@ impl Parse for Quotes {
}
}
}
/// Specified and computed `-moz-list-reversed` property (for UA sheets only).
#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
#[repr(u8)]
pub enum MozListReversed {
/// the initial value
False,
/// exclusively used for <ol reversed> in our html.css UA sheet
True,
}

View file

@ -66,6 +66,7 @@ pub use self::length::{NoCalcLength, ViewportPercentageLength};
pub use self::length::{NonNegativeLengthPercentage, NonNegativeLengthPercentageOrAuto};
#[cfg(feature = "gecko")]
pub use self::list::ListStyleType;
pub use self::list::MozListReversed;
pub use self::list::{QuotePair, Quotes};
pub use self::motion::OffsetPath;
pub use self::outline::OutlineStyle;