mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Add CSS support for the hyphenate-character property
Differential Revision: https://phabricator.services.mozilla.com/D133889
This commit is contained in:
parent
9e7b8e9202
commit
da29cade57
5 changed files with 36 additions and 0 deletions
|
@ -373,3 +373,15 @@ ${helpers.predefined_type(
|
|||
animation_value_type="discrete",
|
||||
spec="https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-ink-property",
|
||||
)}
|
||||
|
||||
// hyphenation character
|
||||
${helpers.predefined_type(
|
||||
"hyphenate-character",
|
||||
"HyphenateCharacter",
|
||||
"computed::HyphenateCharacter::Auto",
|
||||
engines="gecko",
|
||||
gecko_pref="layout.css.hyphenate-character.enabled",
|
||||
has_effect_on_gecko_scrollbars=False,
|
||||
animation_value_type="discrete",
|
||||
spec="https://www.w3.org/TR/css-text-4/#hyphenate-character",
|
||||
)}
|
||||
|
|
|
@ -89,6 +89,7 @@ pub use self::text::{InitialLetter, LetterSpacing, LineBreak, LineHeight};
|
|||
pub use self::text::{OverflowWrap, RubyPosition, TextOverflow, WordBreak, WordSpacing};
|
||||
pub use self::text::{TextAlign, TextAlignLast, TextEmphasisPosition, TextEmphasisStyle};
|
||||
pub use self::text::{TextDecorationLength, TextDecorationSkipInk, TextJustify};
|
||||
pub use self::text::HyphenateCharacter;
|
||||
pub use self::time::Time;
|
||||
pub use self::transform::{Rotate, Scale, Transform, TransformOperation};
|
||||
pub use self::transform::{TransformOrigin, TransformStyle, Translate};
|
||||
|
|
|
@ -24,6 +24,7 @@ pub use crate::values::specified::text::{
|
|||
pub use crate::values::specified::{LineBreak, OverflowWrap, RubyPosition, WordBreak};
|
||||
pub use crate::values::specified::{TextDecorationLine, TextEmphasisPosition};
|
||||
pub use crate::values::specified::{TextDecorationSkipInk, TextJustify, TextTransform};
|
||||
pub use crate::values::specified::HyphenateCharacter;
|
||||
|
||||
/// A computed value for the `initial-letter` property.
|
||||
pub type InitialLetter = GenericInitialLetter<CSSFloat, CSSInteger>;
|
||||
|
|
|
@ -90,6 +90,7 @@ pub use self::text::{InitialLetter, LetterSpacing, LineBreak, LineHeight, TextAl
|
|||
pub use self::text::{OverflowWrap, TextEmphasisPosition, TextEmphasisStyle, WordBreak};
|
||||
pub use self::text::{TextAlignKeyword, TextDecorationLine, TextOverflow, WordSpacing};
|
||||
pub use self::text::{TextDecorationLength, TextDecorationSkipInk, TextJustify, TextTransform};
|
||||
pub use self::text::HyphenateCharacter;
|
||||
pub use self::time::Time;
|
||||
pub use self::transform::{Rotate, Scale, Transform};
|
||||
pub use self::transform::{TransformOrigin, TransformStyle, Translate};
|
||||
|
|
|
@ -37,6 +37,27 @@ pub type WordSpacing = Spacing<LengthPercentage>;
|
|||
/// A specified value for the `line-height` property.
|
||||
pub type LineHeight = GenericLineHeight<NonNegativeNumber, NonNegativeLengthPercentage>;
|
||||
|
||||
/// A value for the `hyphenate-character` property.
|
||||
#[derive(
|
||||
Clone,
|
||||
Debug,
|
||||
MallocSizeOf,
|
||||
Parse,
|
||||
PartialEq,
|
||||
SpecifiedValueInfo,
|
||||
ToComputedValue,
|
||||
ToCss,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
)]
|
||||
#[repr(C, u8)]
|
||||
pub enum HyphenateCharacter {
|
||||
/// `auto`
|
||||
Auto,
|
||||
/// `<string>`
|
||||
String(crate::OwnedStr),
|
||||
}
|
||||
|
||||
impl Parse for InitialLetter {
|
||||
fn parse<'i, 't>(
|
||||
context: &ParserContext,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue