mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Adding parsing support for text-decoration-skip-ink
Differential Revision: https://phabricator.services.mozilla.com/D35831
This commit is contained in:
parent
3530ea9862
commit
034557a717
6 changed files with 41 additions and 2 deletions
|
@ -336,6 +336,7 @@ class Longhand(object):
|
|||
"MozScriptLevel",
|
||||
"MozScriptMinSize",
|
||||
"MozScriptSizeMultiplier",
|
||||
"TextDecorationSkipInk",
|
||||
"NonNegativeNumber",
|
||||
"Number",
|
||||
"OffsetRotate",
|
||||
|
|
|
@ -384,3 +384,15 @@ ${helpers.predefined_type(
|
|||
gecko_pref="layout.css.text-underline-offset.enabled",
|
||||
spec="https://drafts.csswg.org/css-text-decor-4/#underline-offset",
|
||||
)}
|
||||
|
||||
// text decoration skip ink
|
||||
${helpers.predefined_type(
|
||||
"text-decoration-skip-ink",
|
||||
"TextDecorationSkipInk",
|
||||
"computed::TextDecorationSkipInk::Auto",
|
||||
products="gecko",
|
||||
needs_context=False,
|
||||
animation_value_type="discrete",
|
||||
gecko_pref="layout.css.text-decoration-skip-ink.enabled",
|
||||
spec="https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-ink-property",
|
||||
)}
|
||||
|
|
|
@ -78,6 +78,7 @@ pub use self::table::XSpan;
|
|||
pub use self::text::{InitialLetter, LetterSpacing, LineBreak, LineHeight};
|
||||
pub use self::text::{OverflowWrap, TextOverflow, WordBreak, WordSpacing};
|
||||
pub use self::text::{TextAlign, TextEmphasisPosition, TextEmphasisStyle};
|
||||
pub use self::text::TextDecorationSkipInk;
|
||||
pub use self::time::Time;
|
||||
pub use self::transform::{Rotate, Scale, Transform, TransformOperation};
|
||||
pub use self::transform::{TransformOrigin, TransformStyle, Translate};
|
||||
|
|
|
@ -19,7 +19,7 @@ use std::fmt::{self, Write};
|
|||
use style_traits::{CssWriter, ToCss};
|
||||
|
||||
pub use crate::values::specified::TextAlignKeyword as TextAlign;
|
||||
pub use crate::values::specified::TextTransform;
|
||||
pub use crate::values::specified::{TextTransform, TextDecorationSkipInk};
|
||||
pub use crate::values::specified::{LineBreak, OverflowWrap, WordBreak};
|
||||
pub use crate::values::specified::{TextDecorationLine, TextEmphasisPosition};
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ pub use self::svg::{SVGLength, SVGOpacity, SVGPaint, SVGPaintKind};
|
|||
pub use self::svg::{SVGPaintOrder, SVGStrokeDashArray, SVGWidth};
|
||||
pub use self::svg_path::SVGPathData;
|
||||
pub use self::table::XSpan;
|
||||
pub use self::text::TextTransform;
|
||||
pub use self::text::{TextTransform, TextDecorationSkipInk};
|
||||
pub use self::text::{InitialLetter, LetterSpacing, LineBreak, LineHeight, TextAlign};
|
||||
pub use self::text::{OverflowWrap, TextEmphasisPosition, TextEmphasisStyle, WordBreak};
|
||||
pub use self::text::{TextAlignKeyword, TextDecorationLine, TextOverflow, WordSpacing};
|
||||
|
|
|
@ -1054,3 +1054,28 @@ pub enum OverflowWrap {
|
|||
BreakWord,
|
||||
Anywhere,
|
||||
}
|
||||
|
||||
/// Implements text-decoration-skip-ink which takes the keywords auto | none
|
||||
///
|
||||
/// https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-ink-property
|
||||
#[repr(u8)]
|
||||
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
Debug,
|
||||
Eq,
|
||||
MallocSizeOf,
|
||||
Parse,
|
||||
PartialEq,
|
||||
SpecifiedValueInfo,
|
||||
ToComputedValue,
|
||||
ToCss,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
)]
|
||||
#[allow(missing_docs)]
|
||||
pub enum TextDecorationSkipInk {
|
||||
Auto,
|
||||
None,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue