File tree Expand file tree Collapse file tree 2 files changed +18
-17
lines changed
Expand file tree Collapse file tree 2 files changed +18
-17
lines changed Original file line number Diff line number Diff 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" ,
Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ impl Parse for InitialLetter {
182182 ToResolvedValue ,
183183 ToShmem ,
184184) ]
185- #[ repr( C , u8 ) ]
185+ #[ repr( C ) ]
186186pub enum TextOverflowSide {
187187 /// Clip inline content.
188188 Clip ,
@@ -228,21 +228,23 @@ impl Parse for TextOverflow {
228228 input : & mut Parser < ' i , ' t > ,
229229 ) -> Result < TextOverflow , ParseError < ' i > > {
230230 let first = TextOverflowSide :: parse ( context, input) ?;
231- Ok (
232- if let Ok ( second) = input. try_parse ( |input| TextOverflowSide :: parse ( context, input) ) {
233- Self {
234- first,
235- second,
236- sides_are_logical : false ,
237- }
238- } else {
239- Self {
240- first : TextOverflowSide :: Clip ,
241- second : first,
242- sides_are_logical : true ,
243- }
244- } ,
245- )
231+ #[ cfg( feature = "servo" ) ]
232+ if matches ! ( first, TextOverflowSide :: String ( _) ) {
233+ return Err ( input. new_custom_error ( StyleParseErrorKind :: UnspecifiedError ) ) ;
234+ }
235+ #[ cfg( feature = "gecko" ) ]
236+ if let Ok ( second) = input. try_parse ( |input| TextOverflowSide :: parse ( context, input) ) {
237+ return Ok ( Self {
238+ first,
239+ second,
240+ sides_are_logical : false ,
241+ } ) ;
242+ }
243+ Ok ( Self {
244+ first : TextOverflowSide :: Clip ,
245+ second : first,
246+ sides_are_logical : true ,
247+ } )
246248 }
247249}
248250
You can’t perform that action at this time.
0 commit comments