11use cssparser:: * ;
2- use super :: Property ;
2+ use super :: { Property , PropertyId } ;
3+ use super :: custom:: UnparsedProperty ;
34use crate :: vendor_prefix:: VendorPrefix ;
45use crate :: declaration:: DeclarationList ;
56use crate :: targets:: Browsers ;
@@ -308,7 +309,7 @@ impl DisplayHandler {
308309}
309310
310311impl PropertyHandler for DisplayHandler {
311- fn handle_property ( & mut self , property : & Property , _ : & mut DeclarationList ) -> bool {
312+ fn handle_property ( & mut self , property : & Property , dest : & mut DeclarationList ) -> bool {
312313 if let Property :: Display ( display) = property {
313314 match ( & self . display , display) {
314315 ( Some ( Display :: Pair ( cur) ) , Display :: Pair ( new) ) => {
@@ -334,6 +335,12 @@ impl PropertyHandler for DisplayHandler {
334335 self . display = Some ( display. clone ( ) ) ;
335336 return true
336337 }
338+
339+ if matches ! ( property, Property :: Unparsed ( UnparsedProperty { property_id: PropertyId :: Display , .. } ) ) {
340+ self . finalize ( dest) ;
341+ dest. push ( property. clone ( ) ) ;
342+ return true
343+ }
337344
338345 false
339346 }
@@ -342,7 +349,7 @@ impl PropertyHandler for DisplayHandler {
342349 if self . display . is_none ( ) {
343350 return
344351 }
345-
352+
346353 dest. extend ( & mut self . decls ) ;
347354
348355 if let Some ( display) = std:: mem:: take ( & mut self . display ) {
0 commit comments