Skip to content

Commit ebdcfa5

Browse files
enable text-overflow property for Servo
Signed-off-by: Richard Tjokroutomo <[email protected]> Co-authored-by: Minghua Wu <[email protected]>
1 parent 92a4473 commit ebdcfa5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

style/properties/longhands/text.mako.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ ${helpers.predefined_type(
99
"TextOverflow",
1010
"computed::TextOverflow::get_initial_value()",
1111
engines="gecko servo",
12-
servo_pref="layout.unimplemented",
1312
animation_type="discrete",
1413
boxed=True,
1514
spec="https://drafts.csswg.org/css-ui/#propdef-text-overflow",

style/values/specified/text.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ pub enum TextOverflowSide {
189189
/// Render ellipsis to represent clipped inline content.
190190
Ellipsis,
191191
/// Render a given string to represent clipped inline content.
192+
#[cfg(feature = "gecko")]
192193
String(crate::values::AtomString),
193194
}
194195

@@ -227,9 +228,10 @@ impl Parse for TextOverflow {
227228
context: &ParserContext,
228229
input: &mut Parser<'i, 't>,
229230
) -> Result<TextOverflow, ParseError<'i>> {
230-
let first = TextOverflowSide::parse(context, input)?;
231+
let first = <TextOverflowSide as Parse>::parse(context, input)?;
231232
Ok(
232-
if let Ok(second) = input.try_parse(|input| TextOverflowSide::parse(context, input)) {
233+
if let Ok(second) = input.try_parse(|input| <TextOverflowSide as Parse>::parse(context, input)) {
234+
#[cfg(feature = "gecko")]
233235
Self {
234236
first,
235237
second,

0 commit comments

Comments
 (0)