Skip to content

Commit

Permalink
style: Add an inherited internal UA sheet property (-moz-list-reverse…
Browse files Browse the repository at this point in the history
…d:true|false) to propagate <ol reversed> to its relevant descendants.

Bug: 288704
Reviewed-by: emilio
  • Loading branch information
Mats Palmgren authored and emilio committed Mar 27, 2019
1 parent 4b4b5b6 commit 4f44b1c
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions components/style/cbindgen.toml
Expand Up @@ -108,6 +108,7 @@ include = [
"TouchAction",
"WillChangeBits",
"TextDecorationLine",
"MozListReversed",
]
item_types = ["enums", "structs", "typedefs"]

Expand Down
1 change: 1 addition & 0 deletions components/style/properties/data.py
Expand Up @@ -324,6 +324,7 @@ def specified_is_copy(self):
"JustifyItems",
"JustifySelf",
"MozForceBrokenImageIcon",
"MozListReversed",
"MozScriptLevel",
"MozScriptMinSize",
"MozScriptSizeMultiplier",
Expand Down
1 change: 1 addition & 0 deletions components/style/properties/gecko.mako.rs
Expand Up @@ -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,
Expand Down
12 changes: 12 additions & 0 deletions components/style/properties/longhands/list.mako.rs
Expand Up @@ -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",
)}
1 change: 1 addition & 0 deletions components/style/values/computed/list.rs
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions components/style/values/computed/mod.rs
Expand Up @@ -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;
Expand Down
10 changes: 10 additions & 0 deletions components/style/values/specified/list.rs
Expand Up @@ -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,
}
1 change: 1 addition & 0 deletions components/style/values/specified/mod.rs
Expand Up @@ -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;
Expand Down

0 comments on commit 4f44b1c

Please sign in to comment.