style/home/runner/work/servo/servo/target/debug/build/stylo-831a6b5139d5fc04/out/
properties.rs

1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
5// This file is a Mako template: http://www.makotemplates.org/
6
7
8
9use app_units::Au;
10use servo_arc::{Arc, UniqueArc};
11use std::{ops, ptr};
12use std::{fmt, mem};
13
14#[cfg(feature = "servo")] use euclid::SideOffsets2D;
15#[cfg(feature = "gecko")] use crate::gecko_bindings::structs::{self, nsCSSPropertyID};
16#[cfg(feature = "servo")] use crate::logical_geometry::LogicalMargin;
17#[cfg(feature = "servo")] use crate::computed_values;
18use crate::logical_geometry::WritingMode;
19use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
20use crate::computed_value_flags::*;
21use cssparser::Parser;
22use crate::media_queries::Device;
23use crate::parser::ParserContext;
24use crate::selector_parser::PseudoElement;
25use crate::stylist::Stylist;
26use style_traits::{CssWriter, KeywordsCollectFn, ParseError, SpecifiedValueInfo, StyleParseErrorKind, ToCss};
27use crate::stylesheets::{CssRuleType, CssRuleTypes, Origin};
28use crate::logical_geometry::{LogicalAxis, LogicalCorner, LogicalSide};
29use crate::use_counters::UseCounters;
30use crate::rule_tree::StrongRuleNode;
31use crate::str::CssStringWriter;
32use crate::values::{
33    computed,
34    resolved,
35    specified::{font::SystemFont, length::LineHeightBase, color::ColorSchemeFlags},
36};
37use std::cell::Cell;
38use super::{
39    PropertyDeclarationId, PropertyId, NonCustomPropertyId,
40    NonCustomPropertyIdSet, PropertyFlags, SourcePropertyDeclaration,
41    LonghandIdSet, VariableDeclaration, CustomDeclaration,
42    WideKeywordDeclaration, NonCustomPropertyIterator,
43};
44
45
46
47/// Conversion with fewer impls than From/Into
48pub trait MaybeBoxed<Out> {
49    /// Convert
50    fn maybe_boxed(self) -> Out;
51}
52
53impl<T> MaybeBoxed<T> for T {
54    #[inline]
55    fn maybe_boxed(self) -> T { self }
56}
57
58impl<T> MaybeBoxed<Box<T>> for T {
59    #[inline]
60    fn maybe_boxed(self) -> Box<T> { Box::new(self) }
61}
62
63macro_rules! expanded {
64    ( $( $name: ident: $value: expr ),+ ) => {
65        expanded!( $( $name: $value, )+ )
66    };
67    ( $( $name: ident: $value: expr, )+ ) => {
68        Longhands {
69            $(
70                $name: MaybeBoxed::maybe_boxed($value),
71            )+
72        }
73    }
74}
75
76/// A module with all the code for longhand properties.
77#[allow(missing_docs)]
78pub mod longhands {
79    
80    /* This Source Code Form is subject to the terms of the Mozilla Public
81 * License, v. 2.0. If a copy of the MPL was not distributed with this
82 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
83
84
85
86
87    
88        
89    
90    /// https://drafts.csswg.org/css-backgrounds/#background-color
91    pub mod background_color {
92        #[allow(unused_imports)]
93        use cssparser::{Parser, BasicParseError, Token};
94        #[allow(unused_imports)]
95        use crate::parser::{Parse, ParserContext};
96        #[allow(unused_imports)]
97        use crate::properties::{UnparsedValue, ShorthandId};
98        #[allow(unused_imports)]
99        use crate::error_reporting::ParseErrorReporter;
100        #[allow(unused_imports)]
101        use crate::properties::longhands;
102        #[allow(unused_imports)]
103        use crate::properties::{LonghandId, LonghandIdSet};
104        #[allow(unused_imports)]
105        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
106        #[allow(unused_imports)]
107        use crate::properties::style_structs;
108        #[allow(unused_imports)]
109        use selectors::parser::SelectorParseErrorKind;
110        #[allow(unused_imports)]
111        use servo_arc::Arc;
112        #[allow(unused_imports)]
113        use style_traits::{ParseError, StyleParseErrorKind};
114        #[allow(unused_imports)]
115        use crate::values::computed::{Context, ToComputedValue};
116        #[allow(unused_imports)]
117        use crate::values::{computed, generics, specified};
118        #[allow(unused_imports)]
119        use crate::Atom;
120        
121            
122        #[allow(unused_imports)]
123        use app_units::Au;
124        #[allow(unused_imports)]
125        use crate::values::specified::AllowQuirks;
126        #[allow(unused_imports)]
127        use crate::Zero;
128        #[allow(unused_imports)]
129        use smallvec::SmallVec;
130        pub use crate::values::specified::Color as SpecifiedValue;
131        pub mod computed_value {
132            pub use crate::values::computed::Color as T;
133        }
134        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Color::TRANSPARENT_BLACK }
135        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { SpecifiedValue::transparent() }
136        #[allow(unused_variables)]
137        #[inline]
138        pub fn parse<'i, 't>(
139            context: &ParserContext,
140            input: &mut Parser<'i, 't>,
141        ) -> Result<SpecifiedValue, ParseError<'i>> {
142            specified::Color::parse_quirky(context, input, AllowQuirks::Yes)
143        }
144    
145        
146        #[allow(unused_variables)]
147        pub unsafe fn cascade_property(
148            declaration: &PropertyDeclaration,
149            context: &mut computed::Context,
150        ) {
151            context.for_non_inherited_property = true;
152            debug_assert_eq!(
153                declaration.id().as_longhand().unwrap(),
154                LonghandId::BackgroundColor,
155            );
156            let specified_value = match *declaration {
157                PropertyDeclaration::CSSWideKeyword(ref wk) => {
158                    match wk.keyword {
159                        CSSWideKeyword::Unset |
160                        CSSWideKeyword::Initial => {
161                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
162                        },
163                        CSSWideKeyword::Inherit => {
164                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
165                                context.builder.inherit_background_color();
166                        }
167                        CSSWideKeyword::RevertLayer |
168                        CSSWideKeyword::Revert => {
169                            declaration.debug_crash("Found revert/revert-layer not dealt with");
170                        },
171                    }
172                    return;
173                },
174                #[cfg(debug_assertions)]
175                PropertyDeclaration::WithVariables(..) => {
176                    declaration.debug_crash("Found variables not substituted");
177                    return;
178                },
179                _ => unsafe {
180                    declaration.unchecked_value_as::<crate::values::specified::Color>()
181                },
182            };
183
184
185                let computed = specified_value.to_computed_value(context);
186                context.builder.set_background_color(computed)
187        }
188
189        pub fn parse_declared<'i, 't>(
190            context: &ParserContext,
191            input: &mut Parser<'i, 't>,
192        ) -> Result<PropertyDeclaration, ParseError<'i>> {
193                parse(context, input)
194                .map(PropertyDeclaration::BackgroundColor)
195        }
196    }
197
198
199
200
201    
202        
203    
204    
205    /// https://drafts.csswg.org/css-backgrounds/#the-background-image
206    pub mod background_image {
207        #[allow(unused_imports)]
208        use cssparser::{Parser, BasicParseError, Token};
209        #[allow(unused_imports)]
210        use crate::parser::{Parse, ParserContext};
211        #[allow(unused_imports)]
212        use crate::properties::{UnparsedValue, ShorthandId};
213        #[allow(unused_imports)]
214        use crate::error_reporting::ParseErrorReporter;
215        #[allow(unused_imports)]
216        use crate::properties::longhands;
217        #[allow(unused_imports)]
218        use crate::properties::{LonghandId, LonghandIdSet};
219        #[allow(unused_imports)]
220        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
221        #[allow(unused_imports)]
222        use crate::properties::style_structs;
223        #[allow(unused_imports)]
224        use selectors::parser::SelectorParseErrorKind;
225        #[allow(unused_imports)]
226        use servo_arc::Arc;
227        #[allow(unused_imports)]
228        use style_traits::{ParseError, StyleParseErrorKind};
229        #[allow(unused_imports)]
230        use crate::values::computed::{Context, ToComputedValue};
231        #[allow(unused_imports)]
232        use crate::values::{computed, generics, specified};
233        #[allow(unused_imports)]
234        use crate::Atom;
235        
236        #[allow(unused_imports)]
237        use smallvec::SmallVec;
238
239        pub mod single_value {
240            #[allow(unused_imports)]
241            use cssparser::{Parser, BasicParseError};
242            #[allow(unused_imports)]
243            use crate::parser::{Parse, ParserContext};
244            #[allow(unused_imports)]
245            use crate::properties::ShorthandId;
246            #[allow(unused_imports)]
247            use selectors::parser::SelectorParseErrorKind;
248            #[allow(unused_imports)]
249            use style_traits::{ParseError, StyleParseErrorKind};
250            #[allow(unused_imports)]
251            use crate::values::computed::{Context, ToComputedValue};
252            #[allow(unused_imports)]
253            use crate::values::{computed, specified};
254            
255            
256        #[allow(unused_imports)]
257        use app_units::Au;
258        #[allow(unused_imports)]
259        use crate::values::specified::AllowQuirks;
260        #[allow(unused_imports)]
261        use crate::Zero;
262        #[allow(unused_imports)]
263        use smallvec::SmallVec;
264        pub use crate::values::specified::Image as SpecifiedValue;
265        pub mod computed_value {
266            pub use crate::values::computed::Image as T;
267        }
268        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Image::None }
269        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::Image::None }
270        #[allow(unused_variables)]
271        #[inline]
272        pub fn parse<'i, 't>(
273            context: &ParserContext,
274            input: &mut Parser<'i, 't>,
275        ) -> Result<SpecifiedValue, ParseError<'i>> {
276            <specified::Image as crate::parser::Parse>::parse(context, input)
277        }
278    
279        
280        }
281
282        /// The definition of the computed value for background-image.
283        pub mod computed_value {
284            #[allow(unused_imports)]
285            use crate::values::animated::ToAnimatedValue;
286            #[allow(unused_imports)]
287            use crate::values::resolved::ToResolvedValue;
288            pub use super::single_value::computed_value as single_value;
289            pub use self::single_value::T as SingleComputedValue;
290            use smallvec::SmallVec;
291            use crate::values::computed::ComputedVecIter;
292
293            
294
295            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
296            // something for transition-name, which is the only remaining user
297            // of NotInitial.
298            pub type UnderlyingList<T> =
299                    SmallVec<[T; 1]>;
300
301            pub type UnderlyingOwnedList<T> =
302                    SmallVec<[T; 1]>;
303
304
305            /// The generic type defining the animated and resolved values for
306            /// this property.
307            ///
308            /// Making this type generic allows the compiler to figure out the
309            /// animated value for us, instead of having to implement it
310            /// manually for every type we care about.
311            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
312            #[css(comma)]
313            pub struct OwnedList<T>(
314                #[css(iterable)]
315                pub UnderlyingOwnedList<T>,
316            );
317
318            /// The computed value for this property.
319            pub type ComputedList = OwnedList<single_value::T>;
320            pub use self::OwnedList as List;
321
322
323
324            /// The computed value, effectively a list of single values.
325            pub use self::ComputedList as T;
326
327            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
328        }
329
330        /// The specified value of background-image.
331        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
332        #[css(comma)]
333        pub struct SpecifiedValue(
334            #[css(iterable)]
335            pub crate::OwnedSlice<single_value::SpecifiedValue>,
336        );
337
338        pub fn get_initial_value() -> computed_value::T {
339                let mut v = SmallVec::new();
340                v.push(single_value::get_initial_value());
341                computed_value::List(v)
342        }
343
344        pub fn parse<'i, 't>(
345            context: &ParserContext,
346            input: &mut Parser<'i, 't>,
347        ) -> Result<SpecifiedValue, ParseError<'i>> {
348            use style_traits::Separator;
349
350
351            let v = style_traits::Comma::parse(input, |parser| {
352                single_value::parse(context, parser)
353            })?;
354            Ok(SpecifiedValue(v.into()))
355        }
356
357        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
358
359
360        impl ToComputedValue for SpecifiedValue {
361            type ComputedValue = computed_value::T;
362
363            #[inline]
364            fn to_computed_value(&self, context: &Context) -> computed_value::T {
365                use std::iter::FromIterator;
366                computed_value::List(computed_value::UnderlyingList::from_iter(
367                    self.0.iter().map(|i| i.to_computed_value(context))
368                ))
369            }
370
371            #[inline]
372            fn from_computed_value(computed: &computed_value::T) -> Self {
373                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
374                SpecifiedValue(iter.collect())
375            }
376        }
377    
378        #[allow(unused_variables)]
379        pub unsafe fn cascade_property(
380            declaration: &PropertyDeclaration,
381            context: &mut computed::Context,
382        ) {
383            context.for_non_inherited_property = true;
384            debug_assert_eq!(
385                declaration.id().as_longhand().unwrap(),
386                LonghandId::BackgroundImage,
387            );
388            let specified_value = match *declaration {
389                PropertyDeclaration::CSSWideKeyword(ref wk) => {
390                    match wk.keyword {
391                        CSSWideKeyword::Unset |
392                        CSSWideKeyword::Initial => {
393                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
394                        },
395                        CSSWideKeyword::Inherit => {
396                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
397                                context.builder.inherit_background_image();
398                        }
399                        CSSWideKeyword::RevertLayer |
400                        CSSWideKeyword::Revert => {
401                            declaration.debug_crash("Found revert/revert-layer not dealt with");
402                        },
403                    }
404                    return;
405                },
406                #[cfg(debug_assertions)]
407                PropertyDeclaration::WithVariables(..) => {
408                    declaration.debug_crash("Found variables not substituted");
409                    return;
410                },
411                _ => unsafe {
412                    declaration.unchecked_value_as::<longhands::background_image::SpecifiedValue>()
413                },
414            };
415
416
417                let computed = specified_value.to_computed_value(context);
418                context.builder.set_background_image(computed)
419        }
420
421        pub fn parse_declared<'i, 't>(
422            context: &ParserContext,
423            input: &mut Parser<'i, 't>,
424        ) -> Result<PropertyDeclaration, ParseError<'i>> {
425                parse(context, input)
426                .map(PropertyDeclaration::BackgroundImage)
427        }
428    }
429
430
431
432
433    
434    
435        
436    
437    
438    /// https://drafts.csswg.org/css-backgrounds-4/#propdef-background-position-x
439    pub mod background_position_x {
440        #[allow(unused_imports)]
441        use cssparser::{Parser, BasicParseError, Token};
442        #[allow(unused_imports)]
443        use crate::parser::{Parse, ParserContext};
444        #[allow(unused_imports)]
445        use crate::properties::{UnparsedValue, ShorthandId};
446        #[allow(unused_imports)]
447        use crate::error_reporting::ParseErrorReporter;
448        #[allow(unused_imports)]
449        use crate::properties::longhands;
450        #[allow(unused_imports)]
451        use crate::properties::{LonghandId, LonghandIdSet};
452        #[allow(unused_imports)]
453        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
454        #[allow(unused_imports)]
455        use crate::properties::style_structs;
456        #[allow(unused_imports)]
457        use selectors::parser::SelectorParseErrorKind;
458        #[allow(unused_imports)]
459        use servo_arc::Arc;
460        #[allow(unused_imports)]
461        use style_traits::{ParseError, StyleParseErrorKind};
462        #[allow(unused_imports)]
463        use crate::values::computed::{Context, ToComputedValue};
464        #[allow(unused_imports)]
465        use crate::values::{computed, generics, specified};
466        #[allow(unused_imports)]
467        use crate::Atom;
468        
469        #[allow(unused_imports)]
470        use smallvec::SmallVec;
471
472        pub mod single_value {
473            #[allow(unused_imports)]
474            use cssparser::{Parser, BasicParseError};
475            #[allow(unused_imports)]
476            use crate::parser::{Parse, ParserContext};
477            #[allow(unused_imports)]
478            use crate::properties::ShorthandId;
479            #[allow(unused_imports)]
480            use selectors::parser::SelectorParseErrorKind;
481            #[allow(unused_imports)]
482            use style_traits::{ParseError, StyleParseErrorKind};
483            #[allow(unused_imports)]
484            use crate::values::computed::{Context, ToComputedValue};
485            #[allow(unused_imports)]
486            use crate::values::{computed, specified};
487            
488            
489        #[allow(unused_imports)]
490        use app_units::Au;
491        #[allow(unused_imports)]
492        use crate::values::specified::AllowQuirks;
493        #[allow(unused_imports)]
494        use crate::Zero;
495        #[allow(unused_imports)]
496        use smallvec::SmallVec;
497        pub use crate::values::specified::position::HorizontalPosition as SpecifiedValue;
498        pub mod computed_value {
499            pub use crate::values::computed::position::HorizontalPosition as T;
500        }
501        #[inline] pub fn get_initial_value() -> computed_value::T { computed::LengthPercentage::zero_percent() }
502        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { SpecifiedValue::initial_specified_value() }
503        #[allow(unused_variables)]
504        #[inline]
505        pub fn parse<'i, 't>(
506            context: &ParserContext,
507            input: &mut Parser<'i, 't>,
508        ) -> Result<SpecifiedValue, ParseError<'i>> {
509            <specified::position::HorizontalPosition as crate::parser::Parse>::parse(context, input)
510        }
511    
512        
513        }
514
515        /// The definition of the computed value for background-position-x.
516        pub mod computed_value {
517            #[allow(unused_imports)]
518            use crate::values::animated::ToAnimatedValue;
519            #[allow(unused_imports)]
520            use crate::values::resolved::ToResolvedValue;
521            pub use super::single_value::computed_value as single_value;
522            pub use self::single_value::T as SingleComputedValue;
523            use smallvec::SmallVec;
524            use crate::values::computed::ComputedVecIter;
525
526            
527
528            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
529            // something for transition-name, which is the only remaining user
530            // of NotInitial.
531            pub type UnderlyingList<T> =
532                    SmallVec<[T; 1]>;
533
534            pub type UnderlyingOwnedList<T> =
535                    SmallVec<[T; 1]>;
536
537
538            /// The generic type defining the animated and resolved values for
539            /// this property.
540            ///
541            /// Making this type generic allows the compiler to figure out the
542            /// animated value for us, instead of having to implement it
543            /// manually for every type we care about.
544            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
545            #[css(comma)]
546            pub struct OwnedList<T>(
547                #[css(iterable)]
548                pub UnderlyingOwnedList<T>,
549            );
550
551            /// The computed value for this property.
552            pub type ComputedList = OwnedList<single_value::T>;
553            pub use self::OwnedList as List;
554
555
556            use crate::values::animated::{Animate, ToAnimatedZero, Procedure, lists};
557            use crate::values::distance::{SquaredDistance, ComputeSquaredDistance};
558
559            // FIXME(emilio): For some reason rust thinks that this alias is
560            // unused, even though it's clearly used below?
561            #[allow(unused)]
562            type AnimatedList = <OwnedList<single_value::T> as ToAnimatedValue>::AnimatedValue;
563
564            impl ToAnimatedZero for AnimatedList {
565                fn to_animated_zero(&self) -> Result<Self, ()> { Err(()) }
566            }
567
568            impl Animate for AnimatedList {
569                fn animate(
570                    &self,
571                    other: &Self,
572                    procedure: Procedure,
573                ) -> Result<Self, ()> {
574                    Ok(OwnedList(
575                        lists::repeatable_list::animate(&self.0, &other.0, procedure)?
576                    ))
577                }
578            }
579            impl ComputeSquaredDistance for AnimatedList {
580                fn compute_squared_distance(
581                    &self,
582                    other: &Self,
583                ) -> Result<SquaredDistance, ()> {
584                    lists::repeatable_list::squared_distance(&self.0, &other.0)
585                }
586            }
587
588            /// The computed value, effectively a list of single values.
589            pub use self::ComputedList as T;
590
591            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
592        }
593
594        /// The specified value of background-position-x.
595        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
596        #[css(comma)]
597        pub struct SpecifiedValue(
598            #[css(iterable)]
599            pub crate::OwnedSlice<single_value::SpecifiedValue>,
600        );
601
602        pub fn get_initial_value() -> computed_value::T {
603                let mut v = SmallVec::new();
604                v.push(single_value::get_initial_value());
605                computed_value::List(v)
606        }
607
608        pub fn parse<'i, 't>(
609            context: &ParserContext,
610            input: &mut Parser<'i, 't>,
611        ) -> Result<SpecifiedValue, ParseError<'i>> {
612            use style_traits::Separator;
613
614
615            let v = style_traits::Comma::parse(input, |parser| {
616                single_value::parse(context, parser)
617            })?;
618            Ok(SpecifiedValue(v.into()))
619        }
620
621        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
622
623
624        impl ToComputedValue for SpecifiedValue {
625            type ComputedValue = computed_value::T;
626
627            #[inline]
628            fn to_computed_value(&self, context: &Context) -> computed_value::T {
629                use std::iter::FromIterator;
630                computed_value::List(computed_value::UnderlyingList::from_iter(
631                    self.0.iter().map(|i| i.to_computed_value(context))
632                ))
633            }
634
635            #[inline]
636            fn from_computed_value(computed: &computed_value::T) -> Self {
637                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
638                SpecifiedValue(iter.collect())
639            }
640        }
641    
642        #[allow(unused_variables)]
643        pub unsafe fn cascade_property(
644            declaration: &PropertyDeclaration,
645            context: &mut computed::Context,
646        ) {
647            context.for_non_inherited_property = true;
648            debug_assert_eq!(
649                declaration.id().as_longhand().unwrap(),
650                LonghandId::BackgroundPositionX,
651            );
652            let specified_value = match *declaration {
653                PropertyDeclaration::CSSWideKeyword(ref wk) => {
654                    match wk.keyword {
655                        CSSWideKeyword::Unset |
656                        CSSWideKeyword::Initial => {
657                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
658                        },
659                        CSSWideKeyword::Inherit => {
660                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
661                                context.builder.inherit_background_position_x();
662                        }
663                        CSSWideKeyword::RevertLayer |
664                        CSSWideKeyword::Revert => {
665                            declaration.debug_crash("Found revert/revert-layer not dealt with");
666                        },
667                    }
668                    return;
669                },
670                #[cfg(debug_assertions)]
671                PropertyDeclaration::WithVariables(..) => {
672                    declaration.debug_crash("Found variables not substituted");
673                    return;
674                },
675                _ => unsafe {
676                    declaration.unchecked_value_as::<longhands::background_position_x::SpecifiedValue>()
677                },
678            };
679
680
681                let computed = specified_value.to_computed_value(context);
682                context.builder.set_background_position_x(computed)
683        }
684
685        pub fn parse_declared<'i, 't>(
686            context: &ParserContext,
687            input: &mut Parser<'i, 't>,
688        ) -> Result<PropertyDeclaration, ParseError<'i>> {
689                parse(context, input)
690                .map(PropertyDeclaration::BackgroundPositionX)
691        }
692    }
693
694
695
696    
697    
698        
699    
700    
701    /// https://drafts.csswg.org/css-backgrounds-4/#propdef-background-position-y
702    pub mod background_position_y {
703        #[allow(unused_imports)]
704        use cssparser::{Parser, BasicParseError, Token};
705        #[allow(unused_imports)]
706        use crate::parser::{Parse, ParserContext};
707        #[allow(unused_imports)]
708        use crate::properties::{UnparsedValue, ShorthandId};
709        #[allow(unused_imports)]
710        use crate::error_reporting::ParseErrorReporter;
711        #[allow(unused_imports)]
712        use crate::properties::longhands;
713        #[allow(unused_imports)]
714        use crate::properties::{LonghandId, LonghandIdSet};
715        #[allow(unused_imports)]
716        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
717        #[allow(unused_imports)]
718        use crate::properties::style_structs;
719        #[allow(unused_imports)]
720        use selectors::parser::SelectorParseErrorKind;
721        #[allow(unused_imports)]
722        use servo_arc::Arc;
723        #[allow(unused_imports)]
724        use style_traits::{ParseError, StyleParseErrorKind};
725        #[allow(unused_imports)]
726        use crate::values::computed::{Context, ToComputedValue};
727        #[allow(unused_imports)]
728        use crate::values::{computed, generics, specified};
729        #[allow(unused_imports)]
730        use crate::Atom;
731        
732        #[allow(unused_imports)]
733        use smallvec::SmallVec;
734
735        pub mod single_value {
736            #[allow(unused_imports)]
737            use cssparser::{Parser, BasicParseError};
738            #[allow(unused_imports)]
739            use crate::parser::{Parse, ParserContext};
740            #[allow(unused_imports)]
741            use crate::properties::ShorthandId;
742            #[allow(unused_imports)]
743            use selectors::parser::SelectorParseErrorKind;
744            #[allow(unused_imports)]
745            use style_traits::{ParseError, StyleParseErrorKind};
746            #[allow(unused_imports)]
747            use crate::values::computed::{Context, ToComputedValue};
748            #[allow(unused_imports)]
749            use crate::values::{computed, specified};
750            
751            
752        #[allow(unused_imports)]
753        use app_units::Au;
754        #[allow(unused_imports)]
755        use crate::values::specified::AllowQuirks;
756        #[allow(unused_imports)]
757        use crate::Zero;
758        #[allow(unused_imports)]
759        use smallvec::SmallVec;
760        pub use crate::values::specified::position::VerticalPosition as SpecifiedValue;
761        pub mod computed_value {
762            pub use crate::values::computed::position::VerticalPosition as T;
763        }
764        #[inline] pub fn get_initial_value() -> computed_value::T { computed::LengthPercentage::zero_percent() }
765        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { SpecifiedValue::initial_specified_value() }
766        #[allow(unused_variables)]
767        #[inline]
768        pub fn parse<'i, 't>(
769            context: &ParserContext,
770            input: &mut Parser<'i, 't>,
771        ) -> Result<SpecifiedValue, ParseError<'i>> {
772            <specified::position::VerticalPosition as crate::parser::Parse>::parse(context, input)
773        }
774    
775        
776        }
777
778        /// The definition of the computed value for background-position-y.
779        pub mod computed_value {
780            #[allow(unused_imports)]
781            use crate::values::animated::ToAnimatedValue;
782            #[allow(unused_imports)]
783            use crate::values::resolved::ToResolvedValue;
784            pub use super::single_value::computed_value as single_value;
785            pub use self::single_value::T as SingleComputedValue;
786            use smallvec::SmallVec;
787            use crate::values::computed::ComputedVecIter;
788
789            
790
791            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
792            // something for transition-name, which is the only remaining user
793            // of NotInitial.
794            pub type UnderlyingList<T> =
795                    SmallVec<[T; 1]>;
796
797            pub type UnderlyingOwnedList<T> =
798                    SmallVec<[T; 1]>;
799
800
801            /// The generic type defining the animated and resolved values for
802            /// this property.
803            ///
804            /// Making this type generic allows the compiler to figure out the
805            /// animated value for us, instead of having to implement it
806            /// manually for every type we care about.
807            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
808            #[css(comma)]
809            pub struct OwnedList<T>(
810                #[css(iterable)]
811                pub UnderlyingOwnedList<T>,
812            );
813
814            /// The computed value for this property.
815            pub type ComputedList = OwnedList<single_value::T>;
816            pub use self::OwnedList as List;
817
818
819            use crate::values::animated::{Animate, ToAnimatedZero, Procedure, lists};
820            use crate::values::distance::{SquaredDistance, ComputeSquaredDistance};
821
822            // FIXME(emilio): For some reason rust thinks that this alias is
823            // unused, even though it's clearly used below?
824            #[allow(unused)]
825            type AnimatedList = <OwnedList<single_value::T> as ToAnimatedValue>::AnimatedValue;
826
827            impl ToAnimatedZero for AnimatedList {
828                fn to_animated_zero(&self) -> Result<Self, ()> { Err(()) }
829            }
830
831            impl Animate for AnimatedList {
832                fn animate(
833                    &self,
834                    other: &Self,
835                    procedure: Procedure,
836                ) -> Result<Self, ()> {
837                    Ok(OwnedList(
838                        lists::repeatable_list::animate(&self.0, &other.0, procedure)?
839                    ))
840                }
841            }
842            impl ComputeSquaredDistance for AnimatedList {
843                fn compute_squared_distance(
844                    &self,
845                    other: &Self,
846                ) -> Result<SquaredDistance, ()> {
847                    lists::repeatable_list::squared_distance(&self.0, &other.0)
848                }
849            }
850
851            /// The computed value, effectively a list of single values.
852            pub use self::ComputedList as T;
853
854            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
855        }
856
857        /// The specified value of background-position-y.
858        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
859        #[css(comma)]
860        pub struct SpecifiedValue(
861            #[css(iterable)]
862            pub crate::OwnedSlice<single_value::SpecifiedValue>,
863        );
864
865        pub fn get_initial_value() -> computed_value::T {
866                let mut v = SmallVec::new();
867                v.push(single_value::get_initial_value());
868                computed_value::List(v)
869        }
870
871        pub fn parse<'i, 't>(
872            context: &ParserContext,
873            input: &mut Parser<'i, 't>,
874        ) -> Result<SpecifiedValue, ParseError<'i>> {
875            use style_traits::Separator;
876
877
878            let v = style_traits::Comma::parse(input, |parser| {
879                single_value::parse(context, parser)
880            })?;
881            Ok(SpecifiedValue(v.into()))
882        }
883
884        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
885
886
887        impl ToComputedValue for SpecifiedValue {
888            type ComputedValue = computed_value::T;
889
890            #[inline]
891            fn to_computed_value(&self, context: &Context) -> computed_value::T {
892                use std::iter::FromIterator;
893                computed_value::List(computed_value::UnderlyingList::from_iter(
894                    self.0.iter().map(|i| i.to_computed_value(context))
895                ))
896            }
897
898            #[inline]
899            fn from_computed_value(computed: &computed_value::T) -> Self {
900                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
901                SpecifiedValue(iter.collect())
902            }
903        }
904    
905        #[allow(unused_variables)]
906        pub unsafe fn cascade_property(
907            declaration: &PropertyDeclaration,
908            context: &mut computed::Context,
909        ) {
910            context.for_non_inherited_property = true;
911            debug_assert_eq!(
912                declaration.id().as_longhand().unwrap(),
913                LonghandId::BackgroundPositionY,
914            );
915            let specified_value = match *declaration {
916                PropertyDeclaration::CSSWideKeyword(ref wk) => {
917                    match wk.keyword {
918                        CSSWideKeyword::Unset |
919                        CSSWideKeyword::Initial => {
920                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
921                        },
922                        CSSWideKeyword::Inherit => {
923                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
924                                context.builder.inherit_background_position_y();
925                        }
926                        CSSWideKeyword::RevertLayer |
927                        CSSWideKeyword::Revert => {
928                            declaration.debug_crash("Found revert/revert-layer not dealt with");
929                        },
930                    }
931                    return;
932                },
933                #[cfg(debug_assertions)]
934                PropertyDeclaration::WithVariables(..) => {
935                    declaration.debug_crash("Found variables not substituted");
936                    return;
937                },
938                _ => unsafe {
939                    declaration.unchecked_value_as::<longhands::background_position_y::SpecifiedValue>()
940                },
941            };
942
943
944                let computed = specified_value.to_computed_value(context);
945                context.builder.set_background_position_y(computed)
946        }
947
948        pub fn parse_declared<'i, 't>(
949            context: &ParserContext,
950            input: &mut Parser<'i, 't>,
951        ) -> Result<PropertyDeclaration, ParseError<'i>> {
952                parse(context, input)
953                .map(PropertyDeclaration::BackgroundPositionY)
954        }
955    }
956
957
958
959
960
961    
962        
963    
964    
965    /// https://drafts.csswg.org/css-backgrounds/#the-background-repeat
966    pub mod background_repeat {
967        #[allow(unused_imports)]
968        use cssparser::{Parser, BasicParseError, Token};
969        #[allow(unused_imports)]
970        use crate::parser::{Parse, ParserContext};
971        #[allow(unused_imports)]
972        use crate::properties::{UnparsedValue, ShorthandId};
973        #[allow(unused_imports)]
974        use crate::error_reporting::ParseErrorReporter;
975        #[allow(unused_imports)]
976        use crate::properties::longhands;
977        #[allow(unused_imports)]
978        use crate::properties::{LonghandId, LonghandIdSet};
979        #[allow(unused_imports)]
980        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
981        #[allow(unused_imports)]
982        use crate::properties::style_structs;
983        #[allow(unused_imports)]
984        use selectors::parser::SelectorParseErrorKind;
985        #[allow(unused_imports)]
986        use servo_arc::Arc;
987        #[allow(unused_imports)]
988        use style_traits::{ParseError, StyleParseErrorKind};
989        #[allow(unused_imports)]
990        use crate::values::computed::{Context, ToComputedValue};
991        #[allow(unused_imports)]
992        use crate::values::{computed, generics, specified};
993        #[allow(unused_imports)]
994        use crate::Atom;
995        
996        #[allow(unused_imports)]
997        use smallvec::SmallVec;
998
999        pub mod single_value {
1000            #[allow(unused_imports)]
1001            use cssparser::{Parser, BasicParseError};
1002            #[allow(unused_imports)]
1003            use crate::parser::{Parse, ParserContext};
1004            #[allow(unused_imports)]
1005            use crate::properties::ShorthandId;
1006            #[allow(unused_imports)]
1007            use selectors::parser::SelectorParseErrorKind;
1008            #[allow(unused_imports)]
1009            use style_traits::{ParseError, StyleParseErrorKind};
1010            #[allow(unused_imports)]
1011            use crate::values::computed::{Context, ToComputedValue};
1012            #[allow(unused_imports)]
1013            use crate::values::{computed, specified};
1014            
1015            
1016        #[allow(unused_imports)]
1017        use app_units::Au;
1018        #[allow(unused_imports)]
1019        use crate::values::specified::AllowQuirks;
1020        #[allow(unused_imports)]
1021        use crate::Zero;
1022        #[allow(unused_imports)]
1023        use smallvec::SmallVec;
1024        pub use crate::values::specified::BackgroundRepeat as SpecifiedValue;
1025        pub mod computed_value {
1026            pub use crate::values::computed::BackgroundRepeat as T;
1027        }
1028        #[inline] pub fn get_initial_value() -> computed_value::T { computed::BackgroundRepeat::repeat() }
1029        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::BackgroundRepeat::repeat() }
1030        #[allow(unused_variables)]
1031        #[inline]
1032        pub fn parse<'i, 't>(
1033            context: &ParserContext,
1034            input: &mut Parser<'i, 't>,
1035        ) -> Result<SpecifiedValue, ParseError<'i>> {
1036            <specified::BackgroundRepeat as crate::parser::Parse>::parse(context, input)
1037        }
1038    
1039        
1040        }
1041
1042        /// The definition of the computed value for background-repeat.
1043        pub mod computed_value {
1044            #[allow(unused_imports)]
1045            use crate::values::animated::ToAnimatedValue;
1046            #[allow(unused_imports)]
1047            use crate::values::resolved::ToResolvedValue;
1048            pub use super::single_value::computed_value as single_value;
1049            pub use self::single_value::T as SingleComputedValue;
1050            use smallvec::SmallVec;
1051            use crate::values::computed::ComputedVecIter;
1052
1053            
1054
1055            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
1056            // something for transition-name, which is the only remaining user
1057            // of NotInitial.
1058            pub type UnderlyingList<T> =
1059                    SmallVec<[T; 1]>;
1060
1061            pub type UnderlyingOwnedList<T> =
1062                    SmallVec<[T; 1]>;
1063
1064
1065            /// The generic type defining the animated and resolved values for
1066            /// this property.
1067            ///
1068            /// Making this type generic allows the compiler to figure out the
1069            /// animated value for us, instead of having to implement it
1070            /// manually for every type we care about.
1071            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
1072            #[css(comma)]
1073            pub struct OwnedList<T>(
1074                #[css(iterable)]
1075                pub UnderlyingOwnedList<T>,
1076            );
1077
1078            /// The computed value for this property.
1079            pub type ComputedList = OwnedList<single_value::T>;
1080            pub use self::OwnedList as List;
1081
1082
1083
1084            /// The computed value, effectively a list of single values.
1085            pub use self::ComputedList as T;
1086
1087            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
1088        }
1089
1090        /// The specified value of background-repeat.
1091        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
1092        #[css(comma)]
1093        pub struct SpecifiedValue(
1094            #[css(iterable)]
1095            pub crate::OwnedSlice<single_value::SpecifiedValue>,
1096        );
1097
1098        pub fn get_initial_value() -> computed_value::T {
1099                let mut v = SmallVec::new();
1100                v.push(single_value::get_initial_value());
1101                computed_value::List(v)
1102        }
1103
1104        pub fn parse<'i, 't>(
1105            context: &ParserContext,
1106            input: &mut Parser<'i, 't>,
1107        ) -> Result<SpecifiedValue, ParseError<'i>> {
1108            use style_traits::Separator;
1109
1110
1111            let v = style_traits::Comma::parse(input, |parser| {
1112                single_value::parse(context, parser)
1113            })?;
1114            Ok(SpecifiedValue(v.into()))
1115        }
1116
1117        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
1118
1119
1120        impl ToComputedValue for SpecifiedValue {
1121            type ComputedValue = computed_value::T;
1122
1123            #[inline]
1124            fn to_computed_value(&self, context: &Context) -> computed_value::T {
1125                use std::iter::FromIterator;
1126                computed_value::List(computed_value::UnderlyingList::from_iter(
1127                    self.0.iter().map(|i| i.to_computed_value(context))
1128                ))
1129            }
1130
1131            #[inline]
1132            fn from_computed_value(computed: &computed_value::T) -> Self {
1133                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
1134                SpecifiedValue(iter.collect())
1135            }
1136        }
1137    
1138        #[allow(unused_variables)]
1139        pub unsafe fn cascade_property(
1140            declaration: &PropertyDeclaration,
1141            context: &mut computed::Context,
1142        ) {
1143            context.for_non_inherited_property = true;
1144            debug_assert_eq!(
1145                declaration.id().as_longhand().unwrap(),
1146                LonghandId::BackgroundRepeat,
1147            );
1148            let specified_value = match *declaration {
1149                PropertyDeclaration::CSSWideKeyword(ref wk) => {
1150                    match wk.keyword {
1151                        CSSWideKeyword::Unset |
1152                        CSSWideKeyword::Initial => {
1153                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
1154                        },
1155                        CSSWideKeyword::Inherit => {
1156                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
1157                                context.builder.inherit_background_repeat();
1158                        }
1159                        CSSWideKeyword::RevertLayer |
1160                        CSSWideKeyword::Revert => {
1161                            declaration.debug_crash("Found revert/revert-layer not dealt with");
1162                        },
1163                    }
1164                    return;
1165                },
1166                #[cfg(debug_assertions)]
1167                PropertyDeclaration::WithVariables(..) => {
1168                    declaration.debug_crash("Found variables not substituted");
1169                    return;
1170                },
1171                _ => unsafe {
1172                    declaration.unchecked_value_as::<longhands::background_repeat::SpecifiedValue>()
1173                },
1174            };
1175
1176
1177                let computed = specified_value.to_computed_value(context);
1178                context.builder.set_background_repeat(computed)
1179        }
1180
1181        pub fn parse_declared<'i, 't>(
1182            context: &ParserContext,
1183            input: &mut Parser<'i, 't>,
1184        ) -> Result<PropertyDeclaration, ParseError<'i>> {
1185                parse(context, input)
1186                .map(PropertyDeclaration::BackgroundRepeat)
1187        }
1188    }
1189
1190
1191
1192
1193
1194    
1195
1196    
1197        
1198    
1199    
1200    /// https://drafts.csswg.org/css-backgrounds/#the-background-attachment
1201    pub mod background_attachment {
1202        #[allow(unused_imports)]
1203        use cssparser::{Parser, BasicParseError, Token};
1204        #[allow(unused_imports)]
1205        use crate::parser::{Parse, ParserContext};
1206        #[allow(unused_imports)]
1207        use crate::properties::{UnparsedValue, ShorthandId};
1208        #[allow(unused_imports)]
1209        use crate::error_reporting::ParseErrorReporter;
1210        #[allow(unused_imports)]
1211        use crate::properties::longhands;
1212        #[allow(unused_imports)]
1213        use crate::properties::{LonghandId, LonghandIdSet};
1214        #[allow(unused_imports)]
1215        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
1216        #[allow(unused_imports)]
1217        use crate::properties::style_structs;
1218        #[allow(unused_imports)]
1219        use selectors::parser::SelectorParseErrorKind;
1220        #[allow(unused_imports)]
1221        use servo_arc::Arc;
1222        #[allow(unused_imports)]
1223        use style_traits::{ParseError, StyleParseErrorKind};
1224        #[allow(unused_imports)]
1225        use crate::values::computed::{Context, ToComputedValue};
1226        #[allow(unused_imports)]
1227        use crate::values::{computed, generics, specified};
1228        #[allow(unused_imports)]
1229        use crate::Atom;
1230        
1231        #[allow(unused_imports)]
1232        use smallvec::SmallVec;
1233
1234        pub mod single_value {
1235            #[allow(unused_imports)]
1236            use cssparser::{Parser, BasicParseError};
1237            #[allow(unused_imports)]
1238            use crate::parser::{Parse, ParserContext};
1239            #[allow(unused_imports)]
1240            use crate::properties::ShorthandId;
1241            #[allow(unused_imports)]
1242            use selectors::parser::SelectorParseErrorKind;
1243            #[allow(unused_imports)]
1244            use style_traits::{ParseError, StyleParseErrorKind};
1245            #[allow(unused_imports)]
1246            use crate::values::computed::{Context, ToComputedValue};
1247            #[allow(unused_imports)]
1248            use crate::values::{computed, specified};
1249            
1250            
1251        pub use self::computed_value::T as SpecifiedValue;
1252        pub mod computed_value {
1253            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
1254            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
1255            pub enum T {
1256            
1257            Scroll,
1258            
1259            Fixed,
1260            }
1261        }
1262        #[inline]
1263        pub fn get_initial_value() -> computed_value::T {
1264            computed_value::T::Scroll
1265        }
1266        #[inline]
1267        pub fn get_initial_specified_value() -> SpecifiedValue {
1268            SpecifiedValue::Scroll
1269        }
1270        #[inline]
1271        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
1272                             -> Result<SpecifiedValue, ParseError<'i>> {
1273            SpecifiedValue::parse(input)
1274        }
1275
1276    
1277        
1278        }
1279
1280        /// The definition of the computed value for background-attachment.
1281        pub mod computed_value {
1282            #[allow(unused_imports)]
1283            use crate::values::animated::ToAnimatedValue;
1284            #[allow(unused_imports)]
1285            use crate::values::resolved::ToResolvedValue;
1286            pub use super::single_value::computed_value as single_value;
1287            pub use self::single_value::T as SingleComputedValue;
1288            use smallvec::SmallVec;
1289            use crate::values::computed::ComputedVecIter;
1290
1291            
1292
1293            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
1294            // something for transition-name, which is the only remaining user
1295            // of NotInitial.
1296            pub type UnderlyingList<T> =
1297                    SmallVec<[T; 1]>;
1298
1299            pub type UnderlyingOwnedList<T> =
1300                    SmallVec<[T; 1]>;
1301
1302
1303            /// The generic type defining the animated and resolved values for
1304            /// this property.
1305            ///
1306            /// Making this type generic allows the compiler to figure out the
1307            /// animated value for us, instead of having to implement it
1308            /// manually for every type we care about.
1309            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
1310            #[css(comma)]
1311            pub struct OwnedList<T>(
1312                #[css(iterable)]
1313                pub UnderlyingOwnedList<T>,
1314            );
1315
1316            /// The computed value for this property.
1317            pub type ComputedList = OwnedList<single_value::T>;
1318            pub use self::OwnedList as List;
1319
1320
1321
1322            /// The computed value, effectively a list of single values.
1323            pub use self::ComputedList as T;
1324
1325            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
1326        }
1327
1328        /// The specified value of background-attachment.
1329        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
1330        #[css(comma)]
1331        pub struct SpecifiedValue(
1332            #[css(iterable)]
1333            pub crate::OwnedSlice<single_value::SpecifiedValue>,
1334        );
1335
1336        pub fn get_initial_value() -> computed_value::T {
1337                let mut v = SmallVec::new();
1338                v.push(single_value::get_initial_value());
1339                computed_value::List(v)
1340        }
1341
1342        pub fn parse<'i, 't>(
1343            context: &ParserContext,
1344            input: &mut Parser<'i, 't>,
1345        ) -> Result<SpecifiedValue, ParseError<'i>> {
1346            use style_traits::Separator;
1347
1348
1349            let v = style_traits::Comma::parse(input, |parser| {
1350                single_value::parse(context, parser)
1351            })?;
1352            Ok(SpecifiedValue(v.into()))
1353        }
1354
1355        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
1356
1357
1358        impl ToComputedValue for SpecifiedValue {
1359            type ComputedValue = computed_value::T;
1360
1361            #[inline]
1362            fn to_computed_value(&self, context: &Context) -> computed_value::T {
1363                use std::iter::FromIterator;
1364                computed_value::List(computed_value::UnderlyingList::from_iter(
1365                    self.0.iter().map(|i| i.to_computed_value(context))
1366                ))
1367            }
1368
1369            #[inline]
1370            fn from_computed_value(computed: &computed_value::T) -> Self {
1371                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
1372                SpecifiedValue(iter.collect())
1373            }
1374        }
1375    
1376        #[allow(unused_variables)]
1377        pub unsafe fn cascade_property(
1378            declaration: &PropertyDeclaration,
1379            context: &mut computed::Context,
1380        ) {
1381            context.for_non_inherited_property = true;
1382            debug_assert_eq!(
1383                declaration.id().as_longhand().unwrap(),
1384                LonghandId::BackgroundAttachment,
1385            );
1386            let specified_value = match *declaration {
1387                PropertyDeclaration::CSSWideKeyword(ref wk) => {
1388                    match wk.keyword {
1389                        CSSWideKeyword::Unset |
1390                        CSSWideKeyword::Initial => {
1391                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
1392                        },
1393                        CSSWideKeyword::Inherit => {
1394                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
1395                                context.builder.inherit_background_attachment();
1396                        }
1397                        CSSWideKeyword::RevertLayer |
1398                        CSSWideKeyword::Revert => {
1399                            declaration.debug_crash("Found revert/revert-layer not dealt with");
1400                        },
1401                    }
1402                    return;
1403                },
1404                #[cfg(debug_assertions)]
1405                PropertyDeclaration::WithVariables(..) => {
1406                    declaration.debug_crash("Found variables not substituted");
1407                    return;
1408                },
1409                _ => unsafe {
1410                    declaration.unchecked_value_as::<longhands::background_attachment::SpecifiedValue>()
1411                },
1412            };
1413
1414
1415                let computed = specified_value.to_computed_value(context);
1416                context.builder.set_background_attachment(computed)
1417        }
1418
1419        pub fn parse_declared<'i, 't>(
1420            context: &ParserContext,
1421            input: &mut Parser<'i, 't>,
1422        ) -> Result<PropertyDeclaration, ParseError<'i>> {
1423                parse(context, input)
1424                .map(PropertyDeclaration::BackgroundAttachment)
1425        }
1426    }
1427
1428
1429
1430
1431
1432    
1433
1434    
1435        
1436    
1437    
1438    /// https://drafts.csswg.org/css-backgrounds/#the-background-clip
1439    pub mod background_clip {
1440        #[allow(unused_imports)]
1441        use cssparser::{Parser, BasicParseError, Token};
1442        #[allow(unused_imports)]
1443        use crate::parser::{Parse, ParserContext};
1444        #[allow(unused_imports)]
1445        use crate::properties::{UnparsedValue, ShorthandId};
1446        #[allow(unused_imports)]
1447        use crate::error_reporting::ParseErrorReporter;
1448        #[allow(unused_imports)]
1449        use crate::properties::longhands;
1450        #[allow(unused_imports)]
1451        use crate::properties::{LonghandId, LonghandIdSet};
1452        #[allow(unused_imports)]
1453        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
1454        #[allow(unused_imports)]
1455        use crate::properties::style_structs;
1456        #[allow(unused_imports)]
1457        use selectors::parser::SelectorParseErrorKind;
1458        #[allow(unused_imports)]
1459        use servo_arc::Arc;
1460        #[allow(unused_imports)]
1461        use style_traits::{ParseError, StyleParseErrorKind};
1462        #[allow(unused_imports)]
1463        use crate::values::computed::{Context, ToComputedValue};
1464        #[allow(unused_imports)]
1465        use crate::values::{computed, generics, specified};
1466        #[allow(unused_imports)]
1467        use crate::Atom;
1468        
1469        #[allow(unused_imports)]
1470        use smallvec::SmallVec;
1471
1472        pub mod single_value {
1473            #[allow(unused_imports)]
1474            use cssparser::{Parser, BasicParseError};
1475            #[allow(unused_imports)]
1476            use crate::parser::{Parse, ParserContext};
1477            #[allow(unused_imports)]
1478            use crate::properties::ShorthandId;
1479            #[allow(unused_imports)]
1480            use selectors::parser::SelectorParseErrorKind;
1481            #[allow(unused_imports)]
1482            use style_traits::{ParseError, StyleParseErrorKind};
1483            #[allow(unused_imports)]
1484            use crate::values::computed::{Context, ToComputedValue};
1485            #[allow(unused_imports)]
1486            use crate::values::{computed, specified};
1487            
1488            
1489        pub use self::computed_value::T as SpecifiedValue;
1490        pub mod computed_value {
1491            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
1492            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
1493            pub enum T {
1494            
1495            BorderBox,
1496            
1497            PaddingBox,
1498            
1499            ContentBox,
1500            }
1501        }
1502        #[inline]
1503        pub fn get_initial_value() -> computed_value::T {
1504            computed_value::T::BorderBox
1505        }
1506        #[inline]
1507        pub fn get_initial_specified_value() -> SpecifiedValue {
1508            SpecifiedValue::BorderBox
1509        }
1510        #[inline]
1511        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
1512                             -> Result<SpecifiedValue, ParseError<'i>> {
1513            SpecifiedValue::parse(input)
1514        }
1515
1516    
1517        
1518        }
1519
1520        /// The definition of the computed value for background-clip.
1521        pub mod computed_value {
1522            #[allow(unused_imports)]
1523            use crate::values::animated::ToAnimatedValue;
1524            #[allow(unused_imports)]
1525            use crate::values::resolved::ToResolvedValue;
1526            pub use super::single_value::computed_value as single_value;
1527            pub use self::single_value::T as SingleComputedValue;
1528            use smallvec::SmallVec;
1529            use crate::values::computed::ComputedVecIter;
1530
1531            
1532
1533            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
1534            // something for transition-name, which is the only remaining user
1535            // of NotInitial.
1536            pub type UnderlyingList<T> =
1537                    SmallVec<[T; 1]>;
1538
1539            pub type UnderlyingOwnedList<T> =
1540                    SmallVec<[T; 1]>;
1541
1542
1543            /// The generic type defining the animated and resolved values for
1544            /// this property.
1545            ///
1546            /// Making this type generic allows the compiler to figure out the
1547            /// animated value for us, instead of having to implement it
1548            /// manually for every type we care about.
1549            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
1550            #[css(comma)]
1551            pub struct OwnedList<T>(
1552                #[css(iterable)]
1553                pub UnderlyingOwnedList<T>,
1554            );
1555
1556            /// The computed value for this property.
1557            pub type ComputedList = OwnedList<single_value::T>;
1558            pub use self::OwnedList as List;
1559
1560
1561
1562            /// The computed value, effectively a list of single values.
1563            pub use self::ComputedList as T;
1564
1565            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
1566        }
1567
1568        /// The specified value of background-clip.
1569        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
1570        #[css(comma)]
1571        pub struct SpecifiedValue(
1572            #[css(iterable)]
1573            pub crate::OwnedSlice<single_value::SpecifiedValue>,
1574        );
1575
1576        pub fn get_initial_value() -> computed_value::T {
1577                let mut v = SmallVec::new();
1578                v.push(single_value::get_initial_value());
1579                computed_value::List(v)
1580        }
1581
1582        pub fn parse<'i, 't>(
1583            context: &ParserContext,
1584            input: &mut Parser<'i, 't>,
1585        ) -> Result<SpecifiedValue, ParseError<'i>> {
1586            use style_traits::Separator;
1587
1588
1589            let v = style_traits::Comma::parse(input, |parser| {
1590                single_value::parse(context, parser)
1591            })?;
1592            Ok(SpecifiedValue(v.into()))
1593        }
1594
1595        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
1596
1597
1598        impl ToComputedValue for SpecifiedValue {
1599            type ComputedValue = computed_value::T;
1600
1601            #[inline]
1602            fn to_computed_value(&self, context: &Context) -> computed_value::T {
1603                use std::iter::FromIterator;
1604                computed_value::List(computed_value::UnderlyingList::from_iter(
1605                    self.0.iter().map(|i| i.to_computed_value(context))
1606                ))
1607            }
1608
1609            #[inline]
1610            fn from_computed_value(computed: &computed_value::T) -> Self {
1611                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
1612                SpecifiedValue(iter.collect())
1613            }
1614        }
1615    
1616        #[allow(unused_variables)]
1617        pub unsafe fn cascade_property(
1618            declaration: &PropertyDeclaration,
1619            context: &mut computed::Context,
1620        ) {
1621            context.for_non_inherited_property = true;
1622            debug_assert_eq!(
1623                declaration.id().as_longhand().unwrap(),
1624                LonghandId::BackgroundClip,
1625            );
1626            let specified_value = match *declaration {
1627                PropertyDeclaration::CSSWideKeyword(ref wk) => {
1628                    match wk.keyword {
1629                        CSSWideKeyword::Unset |
1630                        CSSWideKeyword::Initial => {
1631                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
1632                        },
1633                        CSSWideKeyword::Inherit => {
1634                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
1635                                context.builder.inherit_background_clip();
1636                        }
1637                        CSSWideKeyword::RevertLayer |
1638                        CSSWideKeyword::Revert => {
1639                            declaration.debug_crash("Found revert/revert-layer not dealt with");
1640                        },
1641                    }
1642                    return;
1643                },
1644                #[cfg(debug_assertions)]
1645                PropertyDeclaration::WithVariables(..) => {
1646                    declaration.debug_crash("Found variables not substituted");
1647                    return;
1648                },
1649                _ => unsafe {
1650                    declaration.unchecked_value_as::<longhands::background_clip::SpecifiedValue>()
1651                },
1652            };
1653
1654
1655                let computed = specified_value.to_computed_value(context);
1656                context.builder.set_background_clip(computed)
1657        }
1658
1659        pub fn parse_declared<'i, 't>(
1660            context: &ParserContext,
1661            input: &mut Parser<'i, 't>,
1662        ) -> Result<PropertyDeclaration, ParseError<'i>> {
1663                parse(context, input)
1664                .map(PropertyDeclaration::BackgroundClip)
1665        }
1666    }
1667
1668
1669
1670
1671
1672    
1673
1674    
1675        
1676    
1677    
1678    /// https://drafts.csswg.org/css-backgrounds/#the-background-origin
1679    pub mod background_origin {
1680        #[allow(unused_imports)]
1681        use cssparser::{Parser, BasicParseError, Token};
1682        #[allow(unused_imports)]
1683        use crate::parser::{Parse, ParserContext};
1684        #[allow(unused_imports)]
1685        use crate::properties::{UnparsedValue, ShorthandId};
1686        #[allow(unused_imports)]
1687        use crate::error_reporting::ParseErrorReporter;
1688        #[allow(unused_imports)]
1689        use crate::properties::longhands;
1690        #[allow(unused_imports)]
1691        use crate::properties::{LonghandId, LonghandIdSet};
1692        #[allow(unused_imports)]
1693        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
1694        #[allow(unused_imports)]
1695        use crate::properties::style_structs;
1696        #[allow(unused_imports)]
1697        use selectors::parser::SelectorParseErrorKind;
1698        #[allow(unused_imports)]
1699        use servo_arc::Arc;
1700        #[allow(unused_imports)]
1701        use style_traits::{ParseError, StyleParseErrorKind};
1702        #[allow(unused_imports)]
1703        use crate::values::computed::{Context, ToComputedValue};
1704        #[allow(unused_imports)]
1705        use crate::values::{computed, generics, specified};
1706        #[allow(unused_imports)]
1707        use crate::Atom;
1708        
1709        #[allow(unused_imports)]
1710        use smallvec::SmallVec;
1711
1712        pub mod single_value {
1713            #[allow(unused_imports)]
1714            use cssparser::{Parser, BasicParseError};
1715            #[allow(unused_imports)]
1716            use crate::parser::{Parse, ParserContext};
1717            #[allow(unused_imports)]
1718            use crate::properties::ShorthandId;
1719            #[allow(unused_imports)]
1720            use selectors::parser::SelectorParseErrorKind;
1721            #[allow(unused_imports)]
1722            use style_traits::{ParseError, StyleParseErrorKind};
1723            #[allow(unused_imports)]
1724            use crate::values::computed::{Context, ToComputedValue};
1725            #[allow(unused_imports)]
1726            use crate::values::{computed, specified};
1727            
1728            
1729        pub use self::computed_value::T as SpecifiedValue;
1730        pub mod computed_value {
1731            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
1732            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
1733            pub enum T {
1734            
1735            PaddingBox,
1736            
1737            BorderBox,
1738            
1739            ContentBox,
1740            }
1741        }
1742        #[inline]
1743        pub fn get_initial_value() -> computed_value::T {
1744            computed_value::T::PaddingBox
1745        }
1746        #[inline]
1747        pub fn get_initial_specified_value() -> SpecifiedValue {
1748            SpecifiedValue::PaddingBox
1749        }
1750        #[inline]
1751        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
1752                             -> Result<SpecifiedValue, ParseError<'i>> {
1753            SpecifiedValue::parse(input)
1754        }
1755
1756    
1757        
1758        }
1759
1760        /// The definition of the computed value for background-origin.
1761        pub mod computed_value {
1762            #[allow(unused_imports)]
1763            use crate::values::animated::ToAnimatedValue;
1764            #[allow(unused_imports)]
1765            use crate::values::resolved::ToResolvedValue;
1766            pub use super::single_value::computed_value as single_value;
1767            pub use self::single_value::T as SingleComputedValue;
1768            use smallvec::SmallVec;
1769            use crate::values::computed::ComputedVecIter;
1770
1771            
1772
1773            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
1774            // something for transition-name, which is the only remaining user
1775            // of NotInitial.
1776            pub type UnderlyingList<T> =
1777                    SmallVec<[T; 1]>;
1778
1779            pub type UnderlyingOwnedList<T> =
1780                    SmallVec<[T; 1]>;
1781
1782
1783            /// The generic type defining the animated and resolved values for
1784            /// this property.
1785            ///
1786            /// Making this type generic allows the compiler to figure out the
1787            /// animated value for us, instead of having to implement it
1788            /// manually for every type we care about.
1789            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
1790            #[css(comma)]
1791            pub struct OwnedList<T>(
1792                #[css(iterable)]
1793                pub UnderlyingOwnedList<T>,
1794            );
1795
1796            /// The computed value for this property.
1797            pub type ComputedList = OwnedList<single_value::T>;
1798            pub use self::OwnedList as List;
1799
1800
1801
1802            /// The computed value, effectively a list of single values.
1803            pub use self::ComputedList as T;
1804
1805            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
1806        }
1807
1808        /// The specified value of background-origin.
1809        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
1810        #[css(comma)]
1811        pub struct SpecifiedValue(
1812            #[css(iterable)]
1813            pub crate::OwnedSlice<single_value::SpecifiedValue>,
1814        );
1815
1816        pub fn get_initial_value() -> computed_value::T {
1817                let mut v = SmallVec::new();
1818                v.push(single_value::get_initial_value());
1819                computed_value::List(v)
1820        }
1821
1822        pub fn parse<'i, 't>(
1823            context: &ParserContext,
1824            input: &mut Parser<'i, 't>,
1825        ) -> Result<SpecifiedValue, ParseError<'i>> {
1826            use style_traits::Separator;
1827
1828
1829            let v = style_traits::Comma::parse(input, |parser| {
1830                single_value::parse(context, parser)
1831            })?;
1832            Ok(SpecifiedValue(v.into()))
1833        }
1834
1835        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
1836
1837
1838        impl ToComputedValue for SpecifiedValue {
1839            type ComputedValue = computed_value::T;
1840
1841            #[inline]
1842            fn to_computed_value(&self, context: &Context) -> computed_value::T {
1843                use std::iter::FromIterator;
1844                computed_value::List(computed_value::UnderlyingList::from_iter(
1845                    self.0.iter().map(|i| i.to_computed_value(context))
1846                ))
1847            }
1848
1849            #[inline]
1850            fn from_computed_value(computed: &computed_value::T) -> Self {
1851                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
1852                SpecifiedValue(iter.collect())
1853            }
1854        }
1855    
1856        #[allow(unused_variables)]
1857        pub unsafe fn cascade_property(
1858            declaration: &PropertyDeclaration,
1859            context: &mut computed::Context,
1860        ) {
1861            context.for_non_inherited_property = true;
1862            debug_assert_eq!(
1863                declaration.id().as_longhand().unwrap(),
1864                LonghandId::BackgroundOrigin,
1865            );
1866            let specified_value = match *declaration {
1867                PropertyDeclaration::CSSWideKeyword(ref wk) => {
1868                    match wk.keyword {
1869                        CSSWideKeyword::Unset |
1870                        CSSWideKeyword::Initial => {
1871                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
1872                        },
1873                        CSSWideKeyword::Inherit => {
1874                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
1875                                context.builder.inherit_background_origin();
1876                        }
1877                        CSSWideKeyword::RevertLayer |
1878                        CSSWideKeyword::Revert => {
1879                            declaration.debug_crash("Found revert/revert-layer not dealt with");
1880                        },
1881                    }
1882                    return;
1883                },
1884                #[cfg(debug_assertions)]
1885                PropertyDeclaration::WithVariables(..) => {
1886                    declaration.debug_crash("Found variables not substituted");
1887                    return;
1888                },
1889                _ => unsafe {
1890                    declaration.unchecked_value_as::<longhands::background_origin::SpecifiedValue>()
1891                },
1892            };
1893
1894
1895                let computed = specified_value.to_computed_value(context);
1896                context.builder.set_background_origin(computed)
1897        }
1898
1899        pub fn parse_declared<'i, 't>(
1900            context: &ParserContext,
1901            input: &mut Parser<'i, 't>,
1902        ) -> Result<PropertyDeclaration, ParseError<'i>> {
1903                parse(context, input)
1904                .map(PropertyDeclaration::BackgroundOrigin)
1905        }
1906    }
1907
1908
1909
1910
1911
1912    
1913        
1914    
1915    
1916    /// https://drafts.csswg.org/css-backgrounds/#the-background-size
1917    pub mod background_size {
1918        #[allow(unused_imports)]
1919        use cssparser::{Parser, BasicParseError, Token};
1920        #[allow(unused_imports)]
1921        use crate::parser::{Parse, ParserContext};
1922        #[allow(unused_imports)]
1923        use crate::properties::{UnparsedValue, ShorthandId};
1924        #[allow(unused_imports)]
1925        use crate::error_reporting::ParseErrorReporter;
1926        #[allow(unused_imports)]
1927        use crate::properties::longhands;
1928        #[allow(unused_imports)]
1929        use crate::properties::{LonghandId, LonghandIdSet};
1930        #[allow(unused_imports)]
1931        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
1932        #[allow(unused_imports)]
1933        use crate::properties::style_structs;
1934        #[allow(unused_imports)]
1935        use selectors::parser::SelectorParseErrorKind;
1936        #[allow(unused_imports)]
1937        use servo_arc::Arc;
1938        #[allow(unused_imports)]
1939        use style_traits::{ParseError, StyleParseErrorKind};
1940        #[allow(unused_imports)]
1941        use crate::values::computed::{Context, ToComputedValue};
1942        #[allow(unused_imports)]
1943        use crate::values::{computed, generics, specified};
1944        #[allow(unused_imports)]
1945        use crate::Atom;
1946        
1947        #[allow(unused_imports)]
1948        use smallvec::SmallVec;
1949
1950        pub mod single_value {
1951            #[allow(unused_imports)]
1952            use cssparser::{Parser, BasicParseError};
1953            #[allow(unused_imports)]
1954            use crate::parser::{Parse, ParserContext};
1955            #[allow(unused_imports)]
1956            use crate::properties::ShorthandId;
1957            #[allow(unused_imports)]
1958            use selectors::parser::SelectorParseErrorKind;
1959            #[allow(unused_imports)]
1960            use style_traits::{ParseError, StyleParseErrorKind};
1961            #[allow(unused_imports)]
1962            use crate::values::computed::{Context, ToComputedValue};
1963            #[allow(unused_imports)]
1964            use crate::values::{computed, specified};
1965            
1966            
1967        #[allow(unused_imports)]
1968        use app_units::Au;
1969        #[allow(unused_imports)]
1970        use crate::values::specified::AllowQuirks;
1971        #[allow(unused_imports)]
1972        use crate::Zero;
1973        #[allow(unused_imports)]
1974        use smallvec::SmallVec;
1975        pub use crate::values::specified::BackgroundSize as SpecifiedValue;
1976        pub mod computed_value {
1977            pub use crate::values::computed::BackgroundSize as T;
1978        }
1979        #[inline] pub fn get_initial_value() -> computed_value::T { computed::BackgroundSize::auto() }
1980        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::BackgroundSize::auto() }
1981        #[allow(unused_variables)]
1982        #[inline]
1983        pub fn parse<'i, 't>(
1984            context: &ParserContext,
1985            input: &mut Parser<'i, 't>,
1986        ) -> Result<SpecifiedValue, ParseError<'i>> {
1987            <specified::BackgroundSize as crate::parser::Parse>::parse(context, input)
1988        }
1989    
1990        
1991        }
1992
1993        /// The definition of the computed value for background-size.
1994        pub mod computed_value {
1995            #[allow(unused_imports)]
1996            use crate::values::animated::ToAnimatedValue;
1997            #[allow(unused_imports)]
1998            use crate::values::resolved::ToResolvedValue;
1999            pub use super::single_value::computed_value as single_value;
2000            pub use self::single_value::T as SingleComputedValue;
2001            use smallvec::SmallVec;
2002            use crate::values::computed::ComputedVecIter;
2003
2004            
2005
2006            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
2007            // something for transition-name, which is the only remaining user
2008            // of NotInitial.
2009            pub type UnderlyingList<T> =
2010                    SmallVec<[T; 1]>;
2011
2012            pub type UnderlyingOwnedList<T> =
2013                    SmallVec<[T; 1]>;
2014
2015
2016            /// The generic type defining the animated and resolved values for
2017            /// this property.
2018            ///
2019            /// Making this type generic allows the compiler to figure out the
2020            /// animated value for us, instead of having to implement it
2021            /// manually for every type we care about.
2022            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
2023            #[css(comma)]
2024            pub struct OwnedList<T>(
2025                #[css(iterable)]
2026                pub UnderlyingOwnedList<T>,
2027            );
2028
2029            /// The computed value for this property.
2030            pub type ComputedList = OwnedList<single_value::T>;
2031            pub use self::OwnedList as List;
2032
2033
2034            use crate::values::animated::{Animate, ToAnimatedZero, Procedure, lists};
2035            use crate::values::distance::{SquaredDistance, ComputeSquaredDistance};
2036
2037            // FIXME(emilio): For some reason rust thinks that this alias is
2038            // unused, even though it's clearly used below?
2039            #[allow(unused)]
2040            type AnimatedList = <OwnedList<single_value::T> as ToAnimatedValue>::AnimatedValue;
2041
2042            impl ToAnimatedZero for AnimatedList {
2043                fn to_animated_zero(&self) -> Result<Self, ()> { Err(()) }
2044            }
2045
2046            impl Animate for AnimatedList {
2047                fn animate(
2048                    &self,
2049                    other: &Self,
2050                    procedure: Procedure,
2051                ) -> Result<Self, ()> {
2052                    Ok(OwnedList(
2053                        lists::repeatable_list::animate(&self.0, &other.0, procedure)?
2054                    ))
2055                }
2056            }
2057            impl ComputeSquaredDistance for AnimatedList {
2058                fn compute_squared_distance(
2059                    &self,
2060                    other: &Self,
2061                ) -> Result<SquaredDistance, ()> {
2062                    lists::repeatable_list::squared_distance(&self.0, &other.0)
2063                }
2064            }
2065
2066            /// The computed value, effectively a list of single values.
2067            pub use self::ComputedList as T;
2068
2069            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
2070        }
2071
2072        /// The specified value of background-size.
2073        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
2074        #[css(comma)]
2075        pub struct SpecifiedValue(
2076            #[css(iterable)]
2077            pub crate::OwnedSlice<single_value::SpecifiedValue>,
2078        );
2079
2080        pub fn get_initial_value() -> computed_value::T {
2081                let mut v = SmallVec::new();
2082                v.push(single_value::get_initial_value());
2083                computed_value::List(v)
2084        }
2085
2086        pub fn parse<'i, 't>(
2087            context: &ParserContext,
2088            input: &mut Parser<'i, 't>,
2089        ) -> Result<SpecifiedValue, ParseError<'i>> {
2090            use style_traits::Separator;
2091
2092
2093            let v = style_traits::Comma::parse(input, |parser| {
2094                single_value::parse(context, parser)
2095            })?;
2096            Ok(SpecifiedValue(v.into()))
2097        }
2098
2099        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
2100
2101
2102        impl ToComputedValue for SpecifiedValue {
2103            type ComputedValue = computed_value::T;
2104
2105            #[inline]
2106            fn to_computed_value(&self, context: &Context) -> computed_value::T {
2107                use std::iter::FromIterator;
2108                computed_value::List(computed_value::UnderlyingList::from_iter(
2109                    self.0.iter().map(|i| i.to_computed_value(context))
2110                ))
2111            }
2112
2113            #[inline]
2114            fn from_computed_value(computed: &computed_value::T) -> Self {
2115                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
2116                SpecifiedValue(iter.collect())
2117            }
2118        }
2119    
2120        #[allow(unused_variables)]
2121        pub unsafe fn cascade_property(
2122            declaration: &PropertyDeclaration,
2123            context: &mut computed::Context,
2124        ) {
2125            context.for_non_inherited_property = true;
2126            debug_assert_eq!(
2127                declaration.id().as_longhand().unwrap(),
2128                LonghandId::BackgroundSize,
2129            );
2130            let specified_value = match *declaration {
2131                PropertyDeclaration::CSSWideKeyword(ref wk) => {
2132                    match wk.keyword {
2133                        CSSWideKeyword::Unset |
2134                        CSSWideKeyword::Initial => {
2135                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
2136                        },
2137                        CSSWideKeyword::Inherit => {
2138                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
2139                                context.builder.inherit_background_size();
2140                        }
2141                        CSSWideKeyword::RevertLayer |
2142                        CSSWideKeyword::Revert => {
2143                            declaration.debug_crash("Found revert/revert-layer not dealt with");
2144                        },
2145                    }
2146                    return;
2147                },
2148                #[cfg(debug_assertions)]
2149                PropertyDeclaration::WithVariables(..) => {
2150                    declaration.debug_crash("Found variables not substituted");
2151                    return;
2152                },
2153                _ => unsafe {
2154                    declaration.unchecked_value_as::<longhands::background_size::SpecifiedValue>()
2155                },
2156            };
2157
2158
2159                let computed = specified_value.to_computed_value(context);
2160                context.builder.set_background_size(computed)
2161        }
2162
2163        pub fn parse_declared<'i, 't>(
2164            context: &ParserContext,
2165            input: &mut Parser<'i, 't>,
2166        ) -> Result<PropertyDeclaration, ParseError<'i>> {
2167                parse(context, input)
2168                .map(PropertyDeclaration::BackgroundSize)
2169        }
2170    }
2171
2172
2173
2174
2175// https://drafts.fxtf.org/compositing/#background-blend-mode
2176
2177    
2178
2179    
2180        
2181    
2182    
2183
2184
2185
2186    
2187    /* This Source Code Form is subject to the terms of the Mozilla Public
2188 * License, v. 2.0. If a copy of the MPL was not distributed with this
2189 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
2190
2191
2192
2193
2194
2195    
2196    
2197    
2198        
2199    
2200    /// https://drafts.csswg.org/css-backgrounds/#border-top-color
2201    pub mod border_top_color {
2202        #[allow(unused_imports)]
2203        use cssparser::{Parser, BasicParseError, Token};
2204        #[allow(unused_imports)]
2205        use crate::parser::{Parse, ParserContext};
2206        #[allow(unused_imports)]
2207        use crate::properties::{UnparsedValue, ShorthandId};
2208        #[allow(unused_imports)]
2209        use crate::error_reporting::ParseErrorReporter;
2210        #[allow(unused_imports)]
2211        use crate::properties::longhands;
2212        #[allow(unused_imports)]
2213        use crate::properties::{LonghandId, LonghandIdSet};
2214        #[allow(unused_imports)]
2215        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
2216        #[allow(unused_imports)]
2217        use crate::properties::style_structs;
2218        #[allow(unused_imports)]
2219        use selectors::parser::SelectorParseErrorKind;
2220        #[allow(unused_imports)]
2221        use servo_arc::Arc;
2222        #[allow(unused_imports)]
2223        use style_traits::{ParseError, StyleParseErrorKind};
2224        #[allow(unused_imports)]
2225        use crate::values::computed::{Context, ToComputedValue};
2226        #[allow(unused_imports)]
2227        use crate::values::{computed, generics, specified};
2228        #[allow(unused_imports)]
2229        use crate::Atom;
2230        
2231            
2232        #[allow(unused_imports)]
2233        use app_units::Au;
2234        #[allow(unused_imports)]
2235        use crate::values::specified::AllowQuirks;
2236        #[allow(unused_imports)]
2237        use crate::Zero;
2238        #[allow(unused_imports)]
2239        use smallvec::SmallVec;
2240        pub use crate::values::specified::Color as SpecifiedValue;
2241        pub mod computed_value {
2242            pub use crate::values::computed::Color as T;
2243        }
2244        #[inline] pub fn get_initial_value() -> computed_value::T { computed_value::T::currentcolor() }
2245        #[allow(unused_variables)]
2246        #[inline]
2247        pub fn parse<'i, 't>(
2248            context: &ParserContext,
2249            input: &mut Parser<'i, 't>,
2250        ) -> Result<SpecifiedValue, ParseError<'i>> {
2251            specified::Color::parse_quirky(context, input, AllowQuirks::Yes)
2252        }
2253    
2254        
2255        #[allow(unused_variables)]
2256        pub unsafe fn cascade_property(
2257            declaration: &PropertyDeclaration,
2258            context: &mut computed::Context,
2259        ) {
2260            context.for_non_inherited_property = true;
2261            debug_assert_eq!(
2262                declaration.id().as_longhand().unwrap().logical_group(),
2263                LonghandId::BorderTopColor.logical_group(),
2264            );
2265            let specified_value = match *declaration {
2266                PropertyDeclaration::CSSWideKeyword(ref wk) => {
2267                    match wk.keyword {
2268                        CSSWideKeyword::Unset |
2269                        CSSWideKeyword::Initial => {
2270                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
2271                        },
2272                        CSSWideKeyword::Inherit => {
2273                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
2274                                context.builder.inherit_border_top_color();
2275                        }
2276                        CSSWideKeyword::RevertLayer |
2277                        CSSWideKeyword::Revert => {
2278                            declaration.debug_crash("Found revert/revert-layer not dealt with");
2279                        },
2280                    }
2281                    return;
2282                },
2283                #[cfg(debug_assertions)]
2284                PropertyDeclaration::WithVariables(..) => {
2285                    declaration.debug_crash("Found variables not substituted");
2286                    return;
2287                },
2288                _ => unsafe {
2289                    declaration.unchecked_value_as::<crate::values::specified::Color>()
2290                },
2291            };
2292
2293
2294                let computed = specified_value.to_computed_value(context);
2295                context.builder.set_border_top_color(computed)
2296        }
2297
2298        pub fn parse_declared<'i, 't>(
2299            context: &ParserContext,
2300            input: &mut Parser<'i, 't>,
2301        ) -> Result<PropertyDeclaration, ParseError<'i>> {
2302                parse(context, input)
2303                .map(PropertyDeclaration::BorderTopColor)
2304        }
2305    }
2306
2307
2308
2309    
2310    
2311        
2312    
2313    /// https://drafts.csswg.org/css-backgrounds/#border-top-style
2314    pub mod border_top_style {
2315        #[allow(unused_imports)]
2316        use cssparser::{Parser, BasicParseError, Token};
2317        #[allow(unused_imports)]
2318        use crate::parser::{Parse, ParserContext};
2319        #[allow(unused_imports)]
2320        use crate::properties::{UnparsedValue, ShorthandId};
2321        #[allow(unused_imports)]
2322        use crate::error_reporting::ParseErrorReporter;
2323        #[allow(unused_imports)]
2324        use crate::properties::longhands;
2325        #[allow(unused_imports)]
2326        use crate::properties::{LonghandId, LonghandIdSet};
2327        #[allow(unused_imports)]
2328        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
2329        #[allow(unused_imports)]
2330        use crate::properties::style_structs;
2331        #[allow(unused_imports)]
2332        use selectors::parser::SelectorParseErrorKind;
2333        #[allow(unused_imports)]
2334        use servo_arc::Arc;
2335        #[allow(unused_imports)]
2336        use style_traits::{ParseError, StyleParseErrorKind};
2337        #[allow(unused_imports)]
2338        use crate::values::computed::{Context, ToComputedValue};
2339        #[allow(unused_imports)]
2340        use crate::values::{computed, generics, specified};
2341        #[allow(unused_imports)]
2342        use crate::Atom;
2343        
2344            
2345        #[allow(unused_imports)]
2346        use app_units::Au;
2347        #[allow(unused_imports)]
2348        use crate::values::specified::AllowQuirks;
2349        #[allow(unused_imports)]
2350        use crate::Zero;
2351        #[allow(unused_imports)]
2352        use smallvec::SmallVec;
2353        pub use crate::values::specified::BorderStyle as SpecifiedValue;
2354        pub mod computed_value {
2355            pub use crate::values::computed::BorderStyle as T;
2356        }
2357        #[inline] pub fn get_initial_value() -> computed_value::T { specified::BorderStyle::None }
2358        #[allow(unused_variables)]
2359        #[inline]
2360        pub fn parse<'i, 't>(
2361            context: &ParserContext,
2362            input: &mut Parser<'i, 't>,
2363        ) -> Result<SpecifiedValue, ParseError<'i>> {
2364            <specified::BorderStyle as crate::parser::Parse>::parse(context, input)
2365        }
2366    
2367        
2368        #[allow(unused_variables)]
2369        pub unsafe fn cascade_property(
2370            declaration: &PropertyDeclaration,
2371            context: &mut computed::Context,
2372        ) {
2373            context.for_non_inherited_property = true;
2374            debug_assert_eq!(
2375                declaration.id().as_longhand().unwrap().logical_group(),
2376                LonghandId::BorderTopStyle.logical_group(),
2377            );
2378            let specified_value = match *declaration {
2379                PropertyDeclaration::CSSWideKeyword(ref wk) => {
2380                    match wk.keyword {
2381                        CSSWideKeyword::Unset |
2382                        CSSWideKeyword::Initial => {
2383                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
2384                        },
2385                        CSSWideKeyword::Inherit => {
2386                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
2387                                context.builder.inherit_border_top_style();
2388                        }
2389                        CSSWideKeyword::RevertLayer |
2390                        CSSWideKeyword::Revert => {
2391                            declaration.debug_crash("Found revert/revert-layer not dealt with");
2392                        },
2393                    }
2394                    return;
2395                },
2396                #[cfg(debug_assertions)]
2397                PropertyDeclaration::WithVariables(..) => {
2398                    declaration.debug_crash("Found variables not substituted");
2399                    return;
2400                },
2401                _ => unsafe {
2402                    declaration.unchecked_value_as::<crate::values::specified::BorderStyle>()
2403                },
2404            };
2405
2406
2407                let computed = specified_value.to_computed_value(context);
2408                context.builder.set_border_top_style(computed)
2409        }
2410
2411        pub fn parse_declared<'i, 't>(
2412            context: &ParserContext,
2413            input: &mut Parser<'i, 't>,
2414        ) -> Result<PropertyDeclaration, ParseError<'i>> {
2415                parse(context, input)
2416                .map(PropertyDeclaration::BorderTopStyle)
2417        }
2418    }
2419
2420
2421
2422    
2423    
2424        
2425    
2426    /// https://drafts.csswg.org/css-backgrounds/#border-top-width
2427    pub mod border_top_width {
2428        #[allow(unused_imports)]
2429        use cssparser::{Parser, BasicParseError, Token};
2430        #[allow(unused_imports)]
2431        use crate::parser::{Parse, ParserContext};
2432        #[allow(unused_imports)]
2433        use crate::properties::{UnparsedValue, ShorthandId};
2434        #[allow(unused_imports)]
2435        use crate::error_reporting::ParseErrorReporter;
2436        #[allow(unused_imports)]
2437        use crate::properties::longhands;
2438        #[allow(unused_imports)]
2439        use crate::properties::{LonghandId, LonghandIdSet};
2440        #[allow(unused_imports)]
2441        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
2442        #[allow(unused_imports)]
2443        use crate::properties::style_structs;
2444        #[allow(unused_imports)]
2445        use selectors::parser::SelectorParseErrorKind;
2446        #[allow(unused_imports)]
2447        use servo_arc::Arc;
2448        #[allow(unused_imports)]
2449        use style_traits::{ParseError, StyleParseErrorKind};
2450        #[allow(unused_imports)]
2451        use crate::values::computed::{Context, ToComputedValue};
2452        #[allow(unused_imports)]
2453        use crate::values::{computed, generics, specified};
2454        #[allow(unused_imports)]
2455        use crate::Atom;
2456        
2457            
2458        #[allow(unused_imports)]
2459        use app_units::Au;
2460        #[allow(unused_imports)]
2461        use crate::values::specified::AllowQuirks;
2462        #[allow(unused_imports)]
2463        use crate::Zero;
2464        #[allow(unused_imports)]
2465        use smallvec::SmallVec;
2466        pub use crate::values::specified::BorderSideWidth as SpecifiedValue;
2467        pub mod computed_value {
2468            pub use crate::values::computed::BorderSideWidth as T;
2469        }
2470        #[inline] pub fn get_initial_value() -> computed_value::T { app_units::Au::from_px(3) }
2471        #[allow(unused_variables)]
2472        #[inline]
2473        pub fn parse<'i, 't>(
2474            context: &ParserContext,
2475            input: &mut Parser<'i, 't>,
2476        ) -> Result<SpecifiedValue, ParseError<'i>> {
2477            specified::BorderSideWidth::parse_quirky(context, input, AllowQuirks::Yes)
2478        }
2479    
2480        
2481        #[allow(unused_variables)]
2482        pub unsafe fn cascade_property(
2483            declaration: &PropertyDeclaration,
2484            context: &mut computed::Context,
2485        ) {
2486            context.for_non_inherited_property = true;
2487            debug_assert_eq!(
2488                declaration.id().as_longhand().unwrap().logical_group(),
2489                LonghandId::BorderTopWidth.logical_group(),
2490            );
2491            let specified_value = match *declaration {
2492                PropertyDeclaration::CSSWideKeyword(ref wk) => {
2493                    match wk.keyword {
2494                        CSSWideKeyword::Unset |
2495                        CSSWideKeyword::Initial => {
2496                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
2497                        },
2498                        CSSWideKeyword::Inherit => {
2499                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
2500                                context.builder.inherit_border_top_width();
2501                        }
2502                        CSSWideKeyword::RevertLayer |
2503                        CSSWideKeyword::Revert => {
2504                            declaration.debug_crash("Found revert/revert-layer not dealt with");
2505                        },
2506                    }
2507                    return;
2508                },
2509                #[cfg(debug_assertions)]
2510                PropertyDeclaration::WithVariables(..) => {
2511                    declaration.debug_crash("Found variables not substituted");
2512                    return;
2513                },
2514                _ => unsafe {
2515                    declaration.unchecked_value_as::<crate::values::specified::BorderSideWidth>()
2516                },
2517            };
2518
2519
2520                let computed = specified_value.to_computed_value(context);
2521                context.builder.set_border_top_width(computed)
2522        }
2523
2524        pub fn parse_declared<'i, 't>(
2525            context: &ParserContext,
2526            input: &mut Parser<'i, 't>,
2527        ) -> Result<PropertyDeclaration, ParseError<'i>> {
2528                parse(context, input)
2529                .map(PropertyDeclaration::BorderTopWidth)
2530        }
2531    }
2532
2533
2534    
2535    
2536    
2537        
2538    
2539    /// https://drafts.csswg.org/css-backgrounds/#border-right-color
2540    pub mod border_right_color {
2541        #[allow(unused_imports)]
2542        use cssparser::{Parser, BasicParseError, Token};
2543        #[allow(unused_imports)]
2544        use crate::parser::{Parse, ParserContext};
2545        #[allow(unused_imports)]
2546        use crate::properties::{UnparsedValue, ShorthandId};
2547        #[allow(unused_imports)]
2548        use crate::error_reporting::ParseErrorReporter;
2549        #[allow(unused_imports)]
2550        use crate::properties::longhands;
2551        #[allow(unused_imports)]
2552        use crate::properties::{LonghandId, LonghandIdSet};
2553        #[allow(unused_imports)]
2554        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
2555        #[allow(unused_imports)]
2556        use crate::properties::style_structs;
2557        #[allow(unused_imports)]
2558        use selectors::parser::SelectorParseErrorKind;
2559        #[allow(unused_imports)]
2560        use servo_arc::Arc;
2561        #[allow(unused_imports)]
2562        use style_traits::{ParseError, StyleParseErrorKind};
2563        #[allow(unused_imports)]
2564        use crate::values::computed::{Context, ToComputedValue};
2565        #[allow(unused_imports)]
2566        use crate::values::{computed, generics, specified};
2567        #[allow(unused_imports)]
2568        use crate::Atom;
2569        
2570            
2571        #[allow(unused_imports)]
2572        use app_units::Au;
2573        #[allow(unused_imports)]
2574        use crate::values::specified::AllowQuirks;
2575        #[allow(unused_imports)]
2576        use crate::Zero;
2577        #[allow(unused_imports)]
2578        use smallvec::SmallVec;
2579        pub use crate::values::specified::Color as SpecifiedValue;
2580        pub mod computed_value {
2581            pub use crate::values::computed::Color as T;
2582        }
2583        #[inline] pub fn get_initial_value() -> computed_value::T { computed_value::T::currentcolor() }
2584        #[allow(unused_variables)]
2585        #[inline]
2586        pub fn parse<'i, 't>(
2587            context: &ParserContext,
2588            input: &mut Parser<'i, 't>,
2589        ) -> Result<SpecifiedValue, ParseError<'i>> {
2590            specified::Color::parse_quirky(context, input, AllowQuirks::Yes)
2591        }
2592    
2593        
2594        #[allow(unused_variables)]
2595        pub unsafe fn cascade_property(
2596            declaration: &PropertyDeclaration,
2597            context: &mut computed::Context,
2598        ) {
2599            context.for_non_inherited_property = true;
2600            debug_assert_eq!(
2601                declaration.id().as_longhand().unwrap().logical_group(),
2602                LonghandId::BorderRightColor.logical_group(),
2603            );
2604            let specified_value = match *declaration {
2605                PropertyDeclaration::CSSWideKeyword(ref wk) => {
2606                    match wk.keyword {
2607                        CSSWideKeyword::Unset |
2608                        CSSWideKeyword::Initial => {
2609                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
2610                        },
2611                        CSSWideKeyword::Inherit => {
2612                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
2613                                context.builder.inherit_border_right_color();
2614                        }
2615                        CSSWideKeyword::RevertLayer |
2616                        CSSWideKeyword::Revert => {
2617                            declaration.debug_crash("Found revert/revert-layer not dealt with");
2618                        },
2619                    }
2620                    return;
2621                },
2622                #[cfg(debug_assertions)]
2623                PropertyDeclaration::WithVariables(..) => {
2624                    declaration.debug_crash("Found variables not substituted");
2625                    return;
2626                },
2627                _ => unsafe {
2628                    declaration.unchecked_value_as::<crate::values::specified::Color>()
2629                },
2630            };
2631
2632
2633                let computed = specified_value.to_computed_value(context);
2634                context.builder.set_border_right_color(computed)
2635        }
2636
2637        pub fn parse_declared<'i, 't>(
2638            context: &ParserContext,
2639            input: &mut Parser<'i, 't>,
2640        ) -> Result<PropertyDeclaration, ParseError<'i>> {
2641                parse(context, input)
2642                .map(PropertyDeclaration::BorderRightColor)
2643        }
2644    }
2645
2646
2647
2648    
2649    
2650        
2651    
2652    /// https://drafts.csswg.org/css-backgrounds/#border-right-style
2653    pub mod border_right_style {
2654        #[allow(unused_imports)]
2655        use cssparser::{Parser, BasicParseError, Token};
2656        #[allow(unused_imports)]
2657        use crate::parser::{Parse, ParserContext};
2658        #[allow(unused_imports)]
2659        use crate::properties::{UnparsedValue, ShorthandId};
2660        #[allow(unused_imports)]
2661        use crate::error_reporting::ParseErrorReporter;
2662        #[allow(unused_imports)]
2663        use crate::properties::longhands;
2664        #[allow(unused_imports)]
2665        use crate::properties::{LonghandId, LonghandIdSet};
2666        #[allow(unused_imports)]
2667        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
2668        #[allow(unused_imports)]
2669        use crate::properties::style_structs;
2670        #[allow(unused_imports)]
2671        use selectors::parser::SelectorParseErrorKind;
2672        #[allow(unused_imports)]
2673        use servo_arc::Arc;
2674        #[allow(unused_imports)]
2675        use style_traits::{ParseError, StyleParseErrorKind};
2676        #[allow(unused_imports)]
2677        use crate::values::computed::{Context, ToComputedValue};
2678        #[allow(unused_imports)]
2679        use crate::values::{computed, generics, specified};
2680        #[allow(unused_imports)]
2681        use crate::Atom;
2682        
2683            
2684        #[allow(unused_imports)]
2685        use app_units::Au;
2686        #[allow(unused_imports)]
2687        use crate::values::specified::AllowQuirks;
2688        #[allow(unused_imports)]
2689        use crate::Zero;
2690        #[allow(unused_imports)]
2691        use smallvec::SmallVec;
2692        pub use crate::values::specified::BorderStyle as SpecifiedValue;
2693        pub mod computed_value {
2694            pub use crate::values::computed::BorderStyle as T;
2695        }
2696        #[inline] pub fn get_initial_value() -> computed_value::T { specified::BorderStyle::None }
2697        #[allow(unused_variables)]
2698        #[inline]
2699        pub fn parse<'i, 't>(
2700            context: &ParserContext,
2701            input: &mut Parser<'i, 't>,
2702        ) -> Result<SpecifiedValue, ParseError<'i>> {
2703            <specified::BorderStyle as crate::parser::Parse>::parse(context, input)
2704        }
2705    
2706        
2707        #[allow(unused_variables)]
2708        pub unsafe fn cascade_property(
2709            declaration: &PropertyDeclaration,
2710            context: &mut computed::Context,
2711        ) {
2712            context.for_non_inherited_property = true;
2713            debug_assert_eq!(
2714                declaration.id().as_longhand().unwrap().logical_group(),
2715                LonghandId::BorderRightStyle.logical_group(),
2716            );
2717            let specified_value = match *declaration {
2718                PropertyDeclaration::CSSWideKeyword(ref wk) => {
2719                    match wk.keyword {
2720                        CSSWideKeyword::Unset |
2721                        CSSWideKeyword::Initial => {
2722                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
2723                        },
2724                        CSSWideKeyword::Inherit => {
2725                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
2726                                context.builder.inherit_border_right_style();
2727                        }
2728                        CSSWideKeyword::RevertLayer |
2729                        CSSWideKeyword::Revert => {
2730                            declaration.debug_crash("Found revert/revert-layer not dealt with");
2731                        },
2732                    }
2733                    return;
2734                },
2735                #[cfg(debug_assertions)]
2736                PropertyDeclaration::WithVariables(..) => {
2737                    declaration.debug_crash("Found variables not substituted");
2738                    return;
2739                },
2740                _ => unsafe {
2741                    declaration.unchecked_value_as::<crate::values::specified::BorderStyle>()
2742                },
2743            };
2744
2745
2746                let computed = specified_value.to_computed_value(context);
2747                context.builder.set_border_right_style(computed)
2748        }
2749
2750        pub fn parse_declared<'i, 't>(
2751            context: &ParserContext,
2752            input: &mut Parser<'i, 't>,
2753        ) -> Result<PropertyDeclaration, ParseError<'i>> {
2754                parse(context, input)
2755                .map(PropertyDeclaration::BorderRightStyle)
2756        }
2757    }
2758
2759
2760
2761    
2762    
2763        
2764    
2765    /// https://drafts.csswg.org/css-backgrounds/#border-right-width
2766    pub mod border_right_width {
2767        #[allow(unused_imports)]
2768        use cssparser::{Parser, BasicParseError, Token};
2769        #[allow(unused_imports)]
2770        use crate::parser::{Parse, ParserContext};
2771        #[allow(unused_imports)]
2772        use crate::properties::{UnparsedValue, ShorthandId};
2773        #[allow(unused_imports)]
2774        use crate::error_reporting::ParseErrorReporter;
2775        #[allow(unused_imports)]
2776        use crate::properties::longhands;
2777        #[allow(unused_imports)]
2778        use crate::properties::{LonghandId, LonghandIdSet};
2779        #[allow(unused_imports)]
2780        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
2781        #[allow(unused_imports)]
2782        use crate::properties::style_structs;
2783        #[allow(unused_imports)]
2784        use selectors::parser::SelectorParseErrorKind;
2785        #[allow(unused_imports)]
2786        use servo_arc::Arc;
2787        #[allow(unused_imports)]
2788        use style_traits::{ParseError, StyleParseErrorKind};
2789        #[allow(unused_imports)]
2790        use crate::values::computed::{Context, ToComputedValue};
2791        #[allow(unused_imports)]
2792        use crate::values::{computed, generics, specified};
2793        #[allow(unused_imports)]
2794        use crate::Atom;
2795        
2796            
2797        #[allow(unused_imports)]
2798        use app_units::Au;
2799        #[allow(unused_imports)]
2800        use crate::values::specified::AllowQuirks;
2801        #[allow(unused_imports)]
2802        use crate::Zero;
2803        #[allow(unused_imports)]
2804        use smallvec::SmallVec;
2805        pub use crate::values::specified::BorderSideWidth as SpecifiedValue;
2806        pub mod computed_value {
2807            pub use crate::values::computed::BorderSideWidth as T;
2808        }
2809        #[inline] pub fn get_initial_value() -> computed_value::T { app_units::Au::from_px(3) }
2810        #[allow(unused_variables)]
2811        #[inline]
2812        pub fn parse<'i, 't>(
2813            context: &ParserContext,
2814            input: &mut Parser<'i, 't>,
2815        ) -> Result<SpecifiedValue, ParseError<'i>> {
2816            specified::BorderSideWidth::parse_quirky(context, input, AllowQuirks::Yes)
2817        }
2818    
2819        
2820        #[allow(unused_variables)]
2821        pub unsafe fn cascade_property(
2822            declaration: &PropertyDeclaration,
2823            context: &mut computed::Context,
2824        ) {
2825            context.for_non_inherited_property = true;
2826            debug_assert_eq!(
2827                declaration.id().as_longhand().unwrap().logical_group(),
2828                LonghandId::BorderRightWidth.logical_group(),
2829            );
2830            let specified_value = match *declaration {
2831                PropertyDeclaration::CSSWideKeyword(ref wk) => {
2832                    match wk.keyword {
2833                        CSSWideKeyword::Unset |
2834                        CSSWideKeyword::Initial => {
2835                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
2836                        },
2837                        CSSWideKeyword::Inherit => {
2838                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
2839                                context.builder.inherit_border_right_width();
2840                        }
2841                        CSSWideKeyword::RevertLayer |
2842                        CSSWideKeyword::Revert => {
2843                            declaration.debug_crash("Found revert/revert-layer not dealt with");
2844                        },
2845                    }
2846                    return;
2847                },
2848                #[cfg(debug_assertions)]
2849                PropertyDeclaration::WithVariables(..) => {
2850                    declaration.debug_crash("Found variables not substituted");
2851                    return;
2852                },
2853                _ => unsafe {
2854                    declaration.unchecked_value_as::<crate::values::specified::BorderSideWidth>()
2855                },
2856            };
2857
2858
2859                let computed = specified_value.to_computed_value(context);
2860                context.builder.set_border_right_width(computed)
2861        }
2862
2863        pub fn parse_declared<'i, 't>(
2864            context: &ParserContext,
2865            input: &mut Parser<'i, 't>,
2866        ) -> Result<PropertyDeclaration, ParseError<'i>> {
2867                parse(context, input)
2868                .map(PropertyDeclaration::BorderRightWidth)
2869        }
2870    }
2871
2872
2873    
2874    
2875    
2876        
2877    
2878    /// https://drafts.csswg.org/css-backgrounds/#border-bottom-color
2879    pub mod border_bottom_color {
2880        #[allow(unused_imports)]
2881        use cssparser::{Parser, BasicParseError, Token};
2882        #[allow(unused_imports)]
2883        use crate::parser::{Parse, ParserContext};
2884        #[allow(unused_imports)]
2885        use crate::properties::{UnparsedValue, ShorthandId};
2886        #[allow(unused_imports)]
2887        use crate::error_reporting::ParseErrorReporter;
2888        #[allow(unused_imports)]
2889        use crate::properties::longhands;
2890        #[allow(unused_imports)]
2891        use crate::properties::{LonghandId, LonghandIdSet};
2892        #[allow(unused_imports)]
2893        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
2894        #[allow(unused_imports)]
2895        use crate::properties::style_structs;
2896        #[allow(unused_imports)]
2897        use selectors::parser::SelectorParseErrorKind;
2898        #[allow(unused_imports)]
2899        use servo_arc::Arc;
2900        #[allow(unused_imports)]
2901        use style_traits::{ParseError, StyleParseErrorKind};
2902        #[allow(unused_imports)]
2903        use crate::values::computed::{Context, ToComputedValue};
2904        #[allow(unused_imports)]
2905        use crate::values::{computed, generics, specified};
2906        #[allow(unused_imports)]
2907        use crate::Atom;
2908        
2909            
2910        #[allow(unused_imports)]
2911        use app_units::Au;
2912        #[allow(unused_imports)]
2913        use crate::values::specified::AllowQuirks;
2914        #[allow(unused_imports)]
2915        use crate::Zero;
2916        #[allow(unused_imports)]
2917        use smallvec::SmallVec;
2918        pub use crate::values::specified::Color as SpecifiedValue;
2919        pub mod computed_value {
2920            pub use crate::values::computed::Color as T;
2921        }
2922        #[inline] pub fn get_initial_value() -> computed_value::T { computed_value::T::currentcolor() }
2923        #[allow(unused_variables)]
2924        #[inline]
2925        pub fn parse<'i, 't>(
2926            context: &ParserContext,
2927            input: &mut Parser<'i, 't>,
2928        ) -> Result<SpecifiedValue, ParseError<'i>> {
2929            specified::Color::parse_quirky(context, input, AllowQuirks::Yes)
2930        }
2931    
2932        
2933        #[allow(unused_variables)]
2934        pub unsafe fn cascade_property(
2935            declaration: &PropertyDeclaration,
2936            context: &mut computed::Context,
2937        ) {
2938            context.for_non_inherited_property = true;
2939            debug_assert_eq!(
2940                declaration.id().as_longhand().unwrap().logical_group(),
2941                LonghandId::BorderBottomColor.logical_group(),
2942            );
2943            let specified_value = match *declaration {
2944                PropertyDeclaration::CSSWideKeyword(ref wk) => {
2945                    match wk.keyword {
2946                        CSSWideKeyword::Unset |
2947                        CSSWideKeyword::Initial => {
2948                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
2949                        },
2950                        CSSWideKeyword::Inherit => {
2951                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
2952                                context.builder.inherit_border_bottom_color();
2953                        }
2954                        CSSWideKeyword::RevertLayer |
2955                        CSSWideKeyword::Revert => {
2956                            declaration.debug_crash("Found revert/revert-layer not dealt with");
2957                        },
2958                    }
2959                    return;
2960                },
2961                #[cfg(debug_assertions)]
2962                PropertyDeclaration::WithVariables(..) => {
2963                    declaration.debug_crash("Found variables not substituted");
2964                    return;
2965                },
2966                _ => unsafe {
2967                    declaration.unchecked_value_as::<crate::values::specified::Color>()
2968                },
2969            };
2970
2971
2972                let computed = specified_value.to_computed_value(context);
2973                context.builder.set_border_bottom_color(computed)
2974        }
2975
2976        pub fn parse_declared<'i, 't>(
2977            context: &ParserContext,
2978            input: &mut Parser<'i, 't>,
2979        ) -> Result<PropertyDeclaration, ParseError<'i>> {
2980                parse(context, input)
2981                .map(PropertyDeclaration::BorderBottomColor)
2982        }
2983    }
2984
2985
2986
2987    
2988    
2989        
2990    
2991    /// https://drafts.csswg.org/css-backgrounds/#border-bottom-style
2992    pub mod border_bottom_style {
2993        #[allow(unused_imports)]
2994        use cssparser::{Parser, BasicParseError, Token};
2995        #[allow(unused_imports)]
2996        use crate::parser::{Parse, ParserContext};
2997        #[allow(unused_imports)]
2998        use crate::properties::{UnparsedValue, ShorthandId};
2999        #[allow(unused_imports)]
3000        use crate::error_reporting::ParseErrorReporter;
3001        #[allow(unused_imports)]
3002        use crate::properties::longhands;
3003        #[allow(unused_imports)]
3004        use crate::properties::{LonghandId, LonghandIdSet};
3005        #[allow(unused_imports)]
3006        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
3007        #[allow(unused_imports)]
3008        use crate::properties::style_structs;
3009        #[allow(unused_imports)]
3010        use selectors::parser::SelectorParseErrorKind;
3011        #[allow(unused_imports)]
3012        use servo_arc::Arc;
3013        #[allow(unused_imports)]
3014        use style_traits::{ParseError, StyleParseErrorKind};
3015        #[allow(unused_imports)]
3016        use crate::values::computed::{Context, ToComputedValue};
3017        #[allow(unused_imports)]
3018        use crate::values::{computed, generics, specified};
3019        #[allow(unused_imports)]
3020        use crate::Atom;
3021        
3022            
3023        #[allow(unused_imports)]
3024        use app_units::Au;
3025        #[allow(unused_imports)]
3026        use crate::values::specified::AllowQuirks;
3027        #[allow(unused_imports)]
3028        use crate::Zero;
3029        #[allow(unused_imports)]
3030        use smallvec::SmallVec;
3031        pub use crate::values::specified::BorderStyle as SpecifiedValue;
3032        pub mod computed_value {
3033            pub use crate::values::computed::BorderStyle as T;
3034        }
3035        #[inline] pub fn get_initial_value() -> computed_value::T { specified::BorderStyle::None }
3036        #[allow(unused_variables)]
3037        #[inline]
3038        pub fn parse<'i, 't>(
3039            context: &ParserContext,
3040            input: &mut Parser<'i, 't>,
3041        ) -> Result<SpecifiedValue, ParseError<'i>> {
3042            <specified::BorderStyle as crate::parser::Parse>::parse(context, input)
3043        }
3044    
3045        
3046        #[allow(unused_variables)]
3047        pub unsafe fn cascade_property(
3048            declaration: &PropertyDeclaration,
3049            context: &mut computed::Context,
3050        ) {
3051            context.for_non_inherited_property = true;
3052            debug_assert_eq!(
3053                declaration.id().as_longhand().unwrap().logical_group(),
3054                LonghandId::BorderBottomStyle.logical_group(),
3055            );
3056            let specified_value = match *declaration {
3057                PropertyDeclaration::CSSWideKeyword(ref wk) => {
3058                    match wk.keyword {
3059                        CSSWideKeyword::Unset |
3060                        CSSWideKeyword::Initial => {
3061                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
3062                        },
3063                        CSSWideKeyword::Inherit => {
3064                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
3065                                context.builder.inherit_border_bottom_style();
3066                        }
3067                        CSSWideKeyword::RevertLayer |
3068                        CSSWideKeyword::Revert => {
3069                            declaration.debug_crash("Found revert/revert-layer not dealt with");
3070                        },
3071                    }
3072                    return;
3073                },
3074                #[cfg(debug_assertions)]
3075                PropertyDeclaration::WithVariables(..) => {
3076                    declaration.debug_crash("Found variables not substituted");
3077                    return;
3078                },
3079                _ => unsafe {
3080                    declaration.unchecked_value_as::<crate::values::specified::BorderStyle>()
3081                },
3082            };
3083
3084
3085                let computed = specified_value.to_computed_value(context);
3086                context.builder.set_border_bottom_style(computed)
3087        }
3088
3089        pub fn parse_declared<'i, 't>(
3090            context: &ParserContext,
3091            input: &mut Parser<'i, 't>,
3092        ) -> Result<PropertyDeclaration, ParseError<'i>> {
3093                parse(context, input)
3094                .map(PropertyDeclaration::BorderBottomStyle)
3095        }
3096    }
3097
3098
3099
3100    
3101    
3102        
3103    
3104    /// https://drafts.csswg.org/css-backgrounds/#border-bottom-width
3105    pub mod border_bottom_width {
3106        #[allow(unused_imports)]
3107        use cssparser::{Parser, BasicParseError, Token};
3108        #[allow(unused_imports)]
3109        use crate::parser::{Parse, ParserContext};
3110        #[allow(unused_imports)]
3111        use crate::properties::{UnparsedValue, ShorthandId};
3112        #[allow(unused_imports)]
3113        use crate::error_reporting::ParseErrorReporter;
3114        #[allow(unused_imports)]
3115        use crate::properties::longhands;
3116        #[allow(unused_imports)]
3117        use crate::properties::{LonghandId, LonghandIdSet};
3118        #[allow(unused_imports)]
3119        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
3120        #[allow(unused_imports)]
3121        use crate::properties::style_structs;
3122        #[allow(unused_imports)]
3123        use selectors::parser::SelectorParseErrorKind;
3124        #[allow(unused_imports)]
3125        use servo_arc::Arc;
3126        #[allow(unused_imports)]
3127        use style_traits::{ParseError, StyleParseErrorKind};
3128        #[allow(unused_imports)]
3129        use crate::values::computed::{Context, ToComputedValue};
3130        #[allow(unused_imports)]
3131        use crate::values::{computed, generics, specified};
3132        #[allow(unused_imports)]
3133        use crate::Atom;
3134        
3135            
3136        #[allow(unused_imports)]
3137        use app_units::Au;
3138        #[allow(unused_imports)]
3139        use crate::values::specified::AllowQuirks;
3140        #[allow(unused_imports)]
3141        use crate::Zero;
3142        #[allow(unused_imports)]
3143        use smallvec::SmallVec;
3144        pub use crate::values::specified::BorderSideWidth as SpecifiedValue;
3145        pub mod computed_value {
3146            pub use crate::values::computed::BorderSideWidth as T;
3147        }
3148        #[inline] pub fn get_initial_value() -> computed_value::T { app_units::Au::from_px(3) }
3149        #[allow(unused_variables)]
3150        #[inline]
3151        pub fn parse<'i, 't>(
3152            context: &ParserContext,
3153            input: &mut Parser<'i, 't>,
3154        ) -> Result<SpecifiedValue, ParseError<'i>> {
3155            specified::BorderSideWidth::parse_quirky(context, input, AllowQuirks::Yes)
3156        }
3157    
3158        
3159        #[allow(unused_variables)]
3160        pub unsafe fn cascade_property(
3161            declaration: &PropertyDeclaration,
3162            context: &mut computed::Context,
3163        ) {
3164            context.for_non_inherited_property = true;
3165            debug_assert_eq!(
3166                declaration.id().as_longhand().unwrap().logical_group(),
3167                LonghandId::BorderBottomWidth.logical_group(),
3168            );
3169            let specified_value = match *declaration {
3170                PropertyDeclaration::CSSWideKeyword(ref wk) => {
3171                    match wk.keyword {
3172                        CSSWideKeyword::Unset |
3173                        CSSWideKeyword::Initial => {
3174                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
3175                        },
3176                        CSSWideKeyword::Inherit => {
3177                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
3178                                context.builder.inherit_border_bottom_width();
3179                        }
3180                        CSSWideKeyword::RevertLayer |
3181                        CSSWideKeyword::Revert => {
3182                            declaration.debug_crash("Found revert/revert-layer not dealt with");
3183                        },
3184                    }
3185                    return;
3186                },
3187                #[cfg(debug_assertions)]
3188                PropertyDeclaration::WithVariables(..) => {
3189                    declaration.debug_crash("Found variables not substituted");
3190                    return;
3191                },
3192                _ => unsafe {
3193                    declaration.unchecked_value_as::<crate::values::specified::BorderSideWidth>()
3194                },
3195            };
3196
3197
3198                let computed = specified_value.to_computed_value(context);
3199                context.builder.set_border_bottom_width(computed)
3200        }
3201
3202        pub fn parse_declared<'i, 't>(
3203            context: &ParserContext,
3204            input: &mut Parser<'i, 't>,
3205        ) -> Result<PropertyDeclaration, ParseError<'i>> {
3206                parse(context, input)
3207                .map(PropertyDeclaration::BorderBottomWidth)
3208        }
3209    }
3210
3211
3212    
3213    
3214    
3215        
3216    
3217    /// https://drafts.csswg.org/css-backgrounds/#border-left-color
3218    pub mod border_left_color {
3219        #[allow(unused_imports)]
3220        use cssparser::{Parser, BasicParseError, Token};
3221        #[allow(unused_imports)]
3222        use crate::parser::{Parse, ParserContext};
3223        #[allow(unused_imports)]
3224        use crate::properties::{UnparsedValue, ShorthandId};
3225        #[allow(unused_imports)]
3226        use crate::error_reporting::ParseErrorReporter;
3227        #[allow(unused_imports)]
3228        use crate::properties::longhands;
3229        #[allow(unused_imports)]
3230        use crate::properties::{LonghandId, LonghandIdSet};
3231        #[allow(unused_imports)]
3232        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
3233        #[allow(unused_imports)]
3234        use crate::properties::style_structs;
3235        #[allow(unused_imports)]
3236        use selectors::parser::SelectorParseErrorKind;
3237        #[allow(unused_imports)]
3238        use servo_arc::Arc;
3239        #[allow(unused_imports)]
3240        use style_traits::{ParseError, StyleParseErrorKind};
3241        #[allow(unused_imports)]
3242        use crate::values::computed::{Context, ToComputedValue};
3243        #[allow(unused_imports)]
3244        use crate::values::{computed, generics, specified};
3245        #[allow(unused_imports)]
3246        use crate::Atom;
3247        
3248            
3249        #[allow(unused_imports)]
3250        use app_units::Au;
3251        #[allow(unused_imports)]
3252        use crate::values::specified::AllowQuirks;
3253        #[allow(unused_imports)]
3254        use crate::Zero;
3255        #[allow(unused_imports)]
3256        use smallvec::SmallVec;
3257        pub use crate::values::specified::Color as SpecifiedValue;
3258        pub mod computed_value {
3259            pub use crate::values::computed::Color as T;
3260        }
3261        #[inline] pub fn get_initial_value() -> computed_value::T { computed_value::T::currentcolor() }
3262        #[allow(unused_variables)]
3263        #[inline]
3264        pub fn parse<'i, 't>(
3265            context: &ParserContext,
3266            input: &mut Parser<'i, 't>,
3267        ) -> Result<SpecifiedValue, ParseError<'i>> {
3268            specified::Color::parse_quirky(context, input, AllowQuirks::Yes)
3269        }
3270    
3271        
3272        #[allow(unused_variables)]
3273        pub unsafe fn cascade_property(
3274            declaration: &PropertyDeclaration,
3275            context: &mut computed::Context,
3276        ) {
3277            context.for_non_inherited_property = true;
3278            debug_assert_eq!(
3279                declaration.id().as_longhand().unwrap().logical_group(),
3280                LonghandId::BorderLeftColor.logical_group(),
3281            );
3282            let specified_value = match *declaration {
3283                PropertyDeclaration::CSSWideKeyword(ref wk) => {
3284                    match wk.keyword {
3285                        CSSWideKeyword::Unset |
3286                        CSSWideKeyword::Initial => {
3287                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
3288                        },
3289                        CSSWideKeyword::Inherit => {
3290                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
3291                                context.builder.inherit_border_left_color();
3292                        }
3293                        CSSWideKeyword::RevertLayer |
3294                        CSSWideKeyword::Revert => {
3295                            declaration.debug_crash("Found revert/revert-layer not dealt with");
3296                        },
3297                    }
3298                    return;
3299                },
3300                #[cfg(debug_assertions)]
3301                PropertyDeclaration::WithVariables(..) => {
3302                    declaration.debug_crash("Found variables not substituted");
3303                    return;
3304                },
3305                _ => unsafe {
3306                    declaration.unchecked_value_as::<crate::values::specified::Color>()
3307                },
3308            };
3309
3310
3311                let computed = specified_value.to_computed_value(context);
3312                context.builder.set_border_left_color(computed)
3313        }
3314
3315        pub fn parse_declared<'i, 't>(
3316            context: &ParserContext,
3317            input: &mut Parser<'i, 't>,
3318        ) -> Result<PropertyDeclaration, ParseError<'i>> {
3319                parse(context, input)
3320                .map(PropertyDeclaration::BorderLeftColor)
3321        }
3322    }
3323
3324
3325
3326    
3327    
3328        
3329    
3330    /// https://drafts.csswg.org/css-backgrounds/#border-left-style
3331    pub mod border_left_style {
3332        #[allow(unused_imports)]
3333        use cssparser::{Parser, BasicParseError, Token};
3334        #[allow(unused_imports)]
3335        use crate::parser::{Parse, ParserContext};
3336        #[allow(unused_imports)]
3337        use crate::properties::{UnparsedValue, ShorthandId};
3338        #[allow(unused_imports)]
3339        use crate::error_reporting::ParseErrorReporter;
3340        #[allow(unused_imports)]
3341        use crate::properties::longhands;
3342        #[allow(unused_imports)]
3343        use crate::properties::{LonghandId, LonghandIdSet};
3344        #[allow(unused_imports)]
3345        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
3346        #[allow(unused_imports)]
3347        use crate::properties::style_structs;
3348        #[allow(unused_imports)]
3349        use selectors::parser::SelectorParseErrorKind;
3350        #[allow(unused_imports)]
3351        use servo_arc::Arc;
3352        #[allow(unused_imports)]
3353        use style_traits::{ParseError, StyleParseErrorKind};
3354        #[allow(unused_imports)]
3355        use crate::values::computed::{Context, ToComputedValue};
3356        #[allow(unused_imports)]
3357        use crate::values::{computed, generics, specified};
3358        #[allow(unused_imports)]
3359        use crate::Atom;
3360        
3361            
3362        #[allow(unused_imports)]
3363        use app_units::Au;
3364        #[allow(unused_imports)]
3365        use crate::values::specified::AllowQuirks;
3366        #[allow(unused_imports)]
3367        use crate::Zero;
3368        #[allow(unused_imports)]
3369        use smallvec::SmallVec;
3370        pub use crate::values::specified::BorderStyle as SpecifiedValue;
3371        pub mod computed_value {
3372            pub use crate::values::computed::BorderStyle as T;
3373        }
3374        #[inline] pub fn get_initial_value() -> computed_value::T { specified::BorderStyle::None }
3375        #[allow(unused_variables)]
3376        #[inline]
3377        pub fn parse<'i, 't>(
3378            context: &ParserContext,
3379            input: &mut Parser<'i, 't>,
3380        ) -> Result<SpecifiedValue, ParseError<'i>> {
3381            <specified::BorderStyle as crate::parser::Parse>::parse(context, input)
3382        }
3383    
3384        
3385        #[allow(unused_variables)]
3386        pub unsafe fn cascade_property(
3387            declaration: &PropertyDeclaration,
3388            context: &mut computed::Context,
3389        ) {
3390            context.for_non_inherited_property = true;
3391            debug_assert_eq!(
3392                declaration.id().as_longhand().unwrap().logical_group(),
3393                LonghandId::BorderLeftStyle.logical_group(),
3394            );
3395            let specified_value = match *declaration {
3396                PropertyDeclaration::CSSWideKeyword(ref wk) => {
3397                    match wk.keyword {
3398                        CSSWideKeyword::Unset |
3399                        CSSWideKeyword::Initial => {
3400                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
3401                        },
3402                        CSSWideKeyword::Inherit => {
3403                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
3404                                context.builder.inherit_border_left_style();
3405                        }
3406                        CSSWideKeyword::RevertLayer |
3407                        CSSWideKeyword::Revert => {
3408                            declaration.debug_crash("Found revert/revert-layer not dealt with");
3409                        },
3410                    }
3411                    return;
3412                },
3413                #[cfg(debug_assertions)]
3414                PropertyDeclaration::WithVariables(..) => {
3415                    declaration.debug_crash("Found variables not substituted");
3416                    return;
3417                },
3418                _ => unsafe {
3419                    declaration.unchecked_value_as::<crate::values::specified::BorderStyle>()
3420                },
3421            };
3422
3423
3424                let computed = specified_value.to_computed_value(context);
3425                context.builder.set_border_left_style(computed)
3426        }
3427
3428        pub fn parse_declared<'i, 't>(
3429            context: &ParserContext,
3430            input: &mut Parser<'i, 't>,
3431        ) -> Result<PropertyDeclaration, ParseError<'i>> {
3432                parse(context, input)
3433                .map(PropertyDeclaration::BorderLeftStyle)
3434        }
3435    }
3436
3437
3438
3439    
3440    
3441        
3442    
3443    /// https://drafts.csswg.org/css-backgrounds/#border-left-width
3444    pub mod border_left_width {
3445        #[allow(unused_imports)]
3446        use cssparser::{Parser, BasicParseError, Token};
3447        #[allow(unused_imports)]
3448        use crate::parser::{Parse, ParserContext};
3449        #[allow(unused_imports)]
3450        use crate::properties::{UnparsedValue, ShorthandId};
3451        #[allow(unused_imports)]
3452        use crate::error_reporting::ParseErrorReporter;
3453        #[allow(unused_imports)]
3454        use crate::properties::longhands;
3455        #[allow(unused_imports)]
3456        use crate::properties::{LonghandId, LonghandIdSet};
3457        #[allow(unused_imports)]
3458        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
3459        #[allow(unused_imports)]
3460        use crate::properties::style_structs;
3461        #[allow(unused_imports)]
3462        use selectors::parser::SelectorParseErrorKind;
3463        #[allow(unused_imports)]
3464        use servo_arc::Arc;
3465        #[allow(unused_imports)]
3466        use style_traits::{ParseError, StyleParseErrorKind};
3467        #[allow(unused_imports)]
3468        use crate::values::computed::{Context, ToComputedValue};
3469        #[allow(unused_imports)]
3470        use crate::values::{computed, generics, specified};
3471        #[allow(unused_imports)]
3472        use crate::Atom;
3473        
3474            
3475        #[allow(unused_imports)]
3476        use app_units::Au;
3477        #[allow(unused_imports)]
3478        use crate::values::specified::AllowQuirks;
3479        #[allow(unused_imports)]
3480        use crate::Zero;
3481        #[allow(unused_imports)]
3482        use smallvec::SmallVec;
3483        pub use crate::values::specified::BorderSideWidth as SpecifiedValue;
3484        pub mod computed_value {
3485            pub use crate::values::computed::BorderSideWidth as T;
3486        }
3487        #[inline] pub fn get_initial_value() -> computed_value::T { app_units::Au::from_px(3) }
3488        #[allow(unused_variables)]
3489        #[inline]
3490        pub fn parse<'i, 't>(
3491            context: &ParserContext,
3492            input: &mut Parser<'i, 't>,
3493        ) -> Result<SpecifiedValue, ParseError<'i>> {
3494            specified::BorderSideWidth::parse_quirky(context, input, AllowQuirks::Yes)
3495        }
3496    
3497        
3498        #[allow(unused_variables)]
3499        pub unsafe fn cascade_property(
3500            declaration: &PropertyDeclaration,
3501            context: &mut computed::Context,
3502        ) {
3503            context.for_non_inherited_property = true;
3504            debug_assert_eq!(
3505                declaration.id().as_longhand().unwrap().logical_group(),
3506                LonghandId::BorderLeftWidth.logical_group(),
3507            );
3508            let specified_value = match *declaration {
3509                PropertyDeclaration::CSSWideKeyword(ref wk) => {
3510                    match wk.keyword {
3511                        CSSWideKeyword::Unset |
3512                        CSSWideKeyword::Initial => {
3513                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
3514                        },
3515                        CSSWideKeyword::Inherit => {
3516                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
3517                                context.builder.inherit_border_left_width();
3518                        }
3519                        CSSWideKeyword::RevertLayer |
3520                        CSSWideKeyword::Revert => {
3521                            declaration.debug_crash("Found revert/revert-layer not dealt with");
3522                        },
3523                    }
3524                    return;
3525                },
3526                #[cfg(debug_assertions)]
3527                PropertyDeclaration::WithVariables(..) => {
3528                    declaration.debug_crash("Found variables not substituted");
3529                    return;
3530                },
3531                _ => unsafe {
3532                    declaration.unchecked_value_as::<crate::values::specified::BorderSideWidth>()
3533                },
3534            };
3535
3536
3537                let computed = specified_value.to_computed_value(context);
3538                context.builder.set_border_left_width(computed)
3539        }
3540
3541        pub fn parse_declared<'i, 't>(
3542            context: &ParserContext,
3543            input: &mut Parser<'i, 't>,
3544        ) -> Result<PropertyDeclaration, ParseError<'i>> {
3545                parse(context, input)
3546                .map(PropertyDeclaration::BorderLeftWidth)
3547        }
3548    }
3549
3550
3551    
3552    
3553    
3554        
3555    
3556    /// https://drafts.csswg.org/css-logical-props/#propdef-border-block-start-color
3557    pub mod border_block_start_color {
3558        #[allow(unused_imports)]
3559        use cssparser::{Parser, BasicParseError, Token};
3560        #[allow(unused_imports)]
3561        use crate::parser::{Parse, ParserContext};
3562        #[allow(unused_imports)]
3563        use crate::properties::{UnparsedValue, ShorthandId};
3564        #[allow(unused_imports)]
3565        use crate::error_reporting::ParseErrorReporter;
3566        #[allow(unused_imports)]
3567        use crate::properties::longhands;
3568        #[allow(unused_imports)]
3569        use crate::properties::{LonghandId, LonghandIdSet};
3570        #[allow(unused_imports)]
3571        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
3572        #[allow(unused_imports)]
3573        use crate::properties::style_structs;
3574        #[allow(unused_imports)]
3575        use selectors::parser::SelectorParseErrorKind;
3576        #[allow(unused_imports)]
3577        use servo_arc::Arc;
3578        #[allow(unused_imports)]
3579        use style_traits::{ParseError, StyleParseErrorKind};
3580        #[allow(unused_imports)]
3581        use crate::values::computed::{Context, ToComputedValue};
3582        #[allow(unused_imports)]
3583        use crate::values::{computed, generics, specified};
3584        #[allow(unused_imports)]
3585        use crate::Atom;
3586        
3587            
3588        #[allow(unused_imports)]
3589        use app_units::Au;
3590        #[allow(unused_imports)]
3591        use crate::values::specified::AllowQuirks;
3592        #[allow(unused_imports)]
3593        use crate::Zero;
3594        #[allow(unused_imports)]
3595        use smallvec::SmallVec;
3596        pub use crate::values::specified::Color as SpecifiedValue;
3597        pub mod computed_value {
3598            pub use crate::values::computed::Color as T;
3599        }
3600        #[inline] pub fn get_initial_value() -> computed_value::T { computed_value::T::currentcolor() }
3601        #[allow(unused_variables)]
3602        #[inline]
3603        pub fn parse<'i, 't>(
3604            context: &ParserContext,
3605            input: &mut Parser<'i, 't>,
3606        ) -> Result<SpecifiedValue, ParseError<'i>> {
3607            <specified::Color as crate::parser::Parse>::parse(context, input)
3608        }
3609    
3610        
3611        #[allow(unused_variables)]
3612        pub unsafe fn cascade_property(
3613            declaration: &PropertyDeclaration,
3614            context: &mut computed::Context,
3615        ) {
3616            declaration.debug_crash("Should physicalize before entering here");
3617        }
3618
3619        pub fn parse_declared<'i, 't>(
3620            context: &ParserContext,
3621            input: &mut Parser<'i, 't>,
3622        ) -> Result<PropertyDeclaration, ParseError<'i>> {
3623                parse(context, input)
3624                .map(PropertyDeclaration::BorderBlockStartColor)
3625        }
3626    }
3627
3628
3629
3630    
3631    
3632        
3633    
3634    /// https://drafts.csswg.org/css-logical-props/#propdef-border-block-start-style
3635    pub mod border_block_start_style {
3636        #[allow(unused_imports)]
3637        use cssparser::{Parser, BasicParseError, Token};
3638        #[allow(unused_imports)]
3639        use crate::parser::{Parse, ParserContext};
3640        #[allow(unused_imports)]
3641        use crate::properties::{UnparsedValue, ShorthandId};
3642        #[allow(unused_imports)]
3643        use crate::error_reporting::ParseErrorReporter;
3644        #[allow(unused_imports)]
3645        use crate::properties::longhands;
3646        #[allow(unused_imports)]
3647        use crate::properties::{LonghandId, LonghandIdSet};
3648        #[allow(unused_imports)]
3649        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
3650        #[allow(unused_imports)]
3651        use crate::properties::style_structs;
3652        #[allow(unused_imports)]
3653        use selectors::parser::SelectorParseErrorKind;
3654        #[allow(unused_imports)]
3655        use servo_arc::Arc;
3656        #[allow(unused_imports)]
3657        use style_traits::{ParseError, StyleParseErrorKind};
3658        #[allow(unused_imports)]
3659        use crate::values::computed::{Context, ToComputedValue};
3660        #[allow(unused_imports)]
3661        use crate::values::{computed, generics, specified};
3662        #[allow(unused_imports)]
3663        use crate::Atom;
3664        
3665            
3666        #[allow(unused_imports)]
3667        use app_units::Au;
3668        #[allow(unused_imports)]
3669        use crate::values::specified::AllowQuirks;
3670        #[allow(unused_imports)]
3671        use crate::Zero;
3672        #[allow(unused_imports)]
3673        use smallvec::SmallVec;
3674        pub use crate::values::specified::BorderStyle as SpecifiedValue;
3675        pub mod computed_value {
3676            pub use crate::values::computed::BorderStyle as T;
3677        }
3678        #[inline] pub fn get_initial_value() -> computed_value::T { specified::BorderStyle::None }
3679        #[allow(unused_variables)]
3680        #[inline]
3681        pub fn parse<'i, 't>(
3682            context: &ParserContext,
3683            input: &mut Parser<'i, 't>,
3684        ) -> Result<SpecifiedValue, ParseError<'i>> {
3685            <specified::BorderStyle as crate::parser::Parse>::parse(context, input)
3686        }
3687    
3688        
3689        #[allow(unused_variables)]
3690        pub unsafe fn cascade_property(
3691            declaration: &PropertyDeclaration,
3692            context: &mut computed::Context,
3693        ) {
3694            declaration.debug_crash("Should physicalize before entering here");
3695        }
3696
3697        pub fn parse_declared<'i, 't>(
3698            context: &ParserContext,
3699            input: &mut Parser<'i, 't>,
3700        ) -> Result<PropertyDeclaration, ParseError<'i>> {
3701                parse(context, input)
3702                .map(PropertyDeclaration::BorderBlockStartStyle)
3703        }
3704    }
3705
3706
3707
3708    
3709    
3710        
3711    
3712    /// https://drafts.csswg.org/css-logical-props/#propdef-border-block-start-width
3713    pub mod border_block_start_width {
3714        #[allow(unused_imports)]
3715        use cssparser::{Parser, BasicParseError, Token};
3716        #[allow(unused_imports)]
3717        use crate::parser::{Parse, ParserContext};
3718        #[allow(unused_imports)]
3719        use crate::properties::{UnparsedValue, ShorthandId};
3720        #[allow(unused_imports)]
3721        use crate::error_reporting::ParseErrorReporter;
3722        #[allow(unused_imports)]
3723        use crate::properties::longhands;
3724        #[allow(unused_imports)]
3725        use crate::properties::{LonghandId, LonghandIdSet};
3726        #[allow(unused_imports)]
3727        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
3728        #[allow(unused_imports)]
3729        use crate::properties::style_structs;
3730        #[allow(unused_imports)]
3731        use selectors::parser::SelectorParseErrorKind;
3732        #[allow(unused_imports)]
3733        use servo_arc::Arc;
3734        #[allow(unused_imports)]
3735        use style_traits::{ParseError, StyleParseErrorKind};
3736        #[allow(unused_imports)]
3737        use crate::values::computed::{Context, ToComputedValue};
3738        #[allow(unused_imports)]
3739        use crate::values::{computed, generics, specified};
3740        #[allow(unused_imports)]
3741        use crate::Atom;
3742        
3743            
3744        #[allow(unused_imports)]
3745        use app_units::Au;
3746        #[allow(unused_imports)]
3747        use crate::values::specified::AllowQuirks;
3748        #[allow(unused_imports)]
3749        use crate::Zero;
3750        #[allow(unused_imports)]
3751        use smallvec::SmallVec;
3752        pub use crate::values::specified::BorderSideWidth as SpecifiedValue;
3753        pub mod computed_value {
3754            pub use crate::values::computed::BorderSideWidth as T;
3755        }
3756        #[inline] pub fn get_initial_value() -> computed_value::T { app_units::Au::from_px(3) }
3757        #[allow(unused_variables)]
3758        #[inline]
3759        pub fn parse<'i, 't>(
3760            context: &ParserContext,
3761            input: &mut Parser<'i, 't>,
3762        ) -> Result<SpecifiedValue, ParseError<'i>> {
3763            <specified::BorderSideWidth as crate::parser::Parse>::parse(context, input)
3764        }
3765    
3766        
3767        #[allow(unused_variables)]
3768        pub unsafe fn cascade_property(
3769            declaration: &PropertyDeclaration,
3770            context: &mut computed::Context,
3771        ) {
3772            declaration.debug_crash("Should physicalize before entering here");
3773        }
3774
3775        pub fn parse_declared<'i, 't>(
3776            context: &ParserContext,
3777            input: &mut Parser<'i, 't>,
3778        ) -> Result<PropertyDeclaration, ParseError<'i>> {
3779                parse(context, input)
3780                .map(PropertyDeclaration::BorderBlockStartWidth)
3781        }
3782    }
3783
3784
3785    
3786    
3787    
3788        
3789    
3790    /// https://drafts.csswg.org/css-logical-props/#propdef-border-block-end-color
3791    pub mod border_block_end_color {
3792        #[allow(unused_imports)]
3793        use cssparser::{Parser, BasicParseError, Token};
3794        #[allow(unused_imports)]
3795        use crate::parser::{Parse, ParserContext};
3796        #[allow(unused_imports)]
3797        use crate::properties::{UnparsedValue, ShorthandId};
3798        #[allow(unused_imports)]
3799        use crate::error_reporting::ParseErrorReporter;
3800        #[allow(unused_imports)]
3801        use crate::properties::longhands;
3802        #[allow(unused_imports)]
3803        use crate::properties::{LonghandId, LonghandIdSet};
3804        #[allow(unused_imports)]
3805        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
3806        #[allow(unused_imports)]
3807        use crate::properties::style_structs;
3808        #[allow(unused_imports)]
3809        use selectors::parser::SelectorParseErrorKind;
3810        #[allow(unused_imports)]
3811        use servo_arc::Arc;
3812        #[allow(unused_imports)]
3813        use style_traits::{ParseError, StyleParseErrorKind};
3814        #[allow(unused_imports)]
3815        use crate::values::computed::{Context, ToComputedValue};
3816        #[allow(unused_imports)]
3817        use crate::values::{computed, generics, specified};
3818        #[allow(unused_imports)]
3819        use crate::Atom;
3820        
3821            
3822        #[allow(unused_imports)]
3823        use app_units::Au;
3824        #[allow(unused_imports)]
3825        use crate::values::specified::AllowQuirks;
3826        #[allow(unused_imports)]
3827        use crate::Zero;
3828        #[allow(unused_imports)]
3829        use smallvec::SmallVec;
3830        pub use crate::values::specified::Color as SpecifiedValue;
3831        pub mod computed_value {
3832            pub use crate::values::computed::Color as T;
3833        }
3834        #[inline] pub fn get_initial_value() -> computed_value::T { computed_value::T::currentcolor() }
3835        #[allow(unused_variables)]
3836        #[inline]
3837        pub fn parse<'i, 't>(
3838            context: &ParserContext,
3839            input: &mut Parser<'i, 't>,
3840        ) -> Result<SpecifiedValue, ParseError<'i>> {
3841            <specified::Color as crate::parser::Parse>::parse(context, input)
3842        }
3843    
3844        
3845        #[allow(unused_variables)]
3846        pub unsafe fn cascade_property(
3847            declaration: &PropertyDeclaration,
3848            context: &mut computed::Context,
3849        ) {
3850            declaration.debug_crash("Should physicalize before entering here");
3851        }
3852
3853        pub fn parse_declared<'i, 't>(
3854            context: &ParserContext,
3855            input: &mut Parser<'i, 't>,
3856        ) -> Result<PropertyDeclaration, ParseError<'i>> {
3857                parse(context, input)
3858                .map(PropertyDeclaration::BorderBlockEndColor)
3859        }
3860    }
3861
3862
3863
3864    
3865    
3866        
3867    
3868    /// https://drafts.csswg.org/css-logical-props/#propdef-border-block-end-style
3869    pub mod border_block_end_style {
3870        #[allow(unused_imports)]
3871        use cssparser::{Parser, BasicParseError, Token};
3872        #[allow(unused_imports)]
3873        use crate::parser::{Parse, ParserContext};
3874        #[allow(unused_imports)]
3875        use crate::properties::{UnparsedValue, ShorthandId};
3876        #[allow(unused_imports)]
3877        use crate::error_reporting::ParseErrorReporter;
3878        #[allow(unused_imports)]
3879        use crate::properties::longhands;
3880        #[allow(unused_imports)]
3881        use crate::properties::{LonghandId, LonghandIdSet};
3882        #[allow(unused_imports)]
3883        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
3884        #[allow(unused_imports)]
3885        use crate::properties::style_structs;
3886        #[allow(unused_imports)]
3887        use selectors::parser::SelectorParseErrorKind;
3888        #[allow(unused_imports)]
3889        use servo_arc::Arc;
3890        #[allow(unused_imports)]
3891        use style_traits::{ParseError, StyleParseErrorKind};
3892        #[allow(unused_imports)]
3893        use crate::values::computed::{Context, ToComputedValue};
3894        #[allow(unused_imports)]
3895        use crate::values::{computed, generics, specified};
3896        #[allow(unused_imports)]
3897        use crate::Atom;
3898        
3899            
3900        #[allow(unused_imports)]
3901        use app_units::Au;
3902        #[allow(unused_imports)]
3903        use crate::values::specified::AllowQuirks;
3904        #[allow(unused_imports)]
3905        use crate::Zero;
3906        #[allow(unused_imports)]
3907        use smallvec::SmallVec;
3908        pub use crate::values::specified::BorderStyle as SpecifiedValue;
3909        pub mod computed_value {
3910            pub use crate::values::computed::BorderStyle as T;
3911        }
3912        #[inline] pub fn get_initial_value() -> computed_value::T { specified::BorderStyle::None }
3913        #[allow(unused_variables)]
3914        #[inline]
3915        pub fn parse<'i, 't>(
3916            context: &ParserContext,
3917            input: &mut Parser<'i, 't>,
3918        ) -> Result<SpecifiedValue, ParseError<'i>> {
3919            <specified::BorderStyle as crate::parser::Parse>::parse(context, input)
3920        }
3921    
3922        
3923        #[allow(unused_variables)]
3924        pub unsafe fn cascade_property(
3925            declaration: &PropertyDeclaration,
3926            context: &mut computed::Context,
3927        ) {
3928            declaration.debug_crash("Should physicalize before entering here");
3929        }
3930
3931        pub fn parse_declared<'i, 't>(
3932            context: &ParserContext,
3933            input: &mut Parser<'i, 't>,
3934        ) -> Result<PropertyDeclaration, ParseError<'i>> {
3935                parse(context, input)
3936                .map(PropertyDeclaration::BorderBlockEndStyle)
3937        }
3938    }
3939
3940
3941
3942    
3943    
3944        
3945    
3946    /// https://drafts.csswg.org/css-logical-props/#propdef-border-block-end-width
3947    pub mod border_block_end_width {
3948        #[allow(unused_imports)]
3949        use cssparser::{Parser, BasicParseError, Token};
3950        #[allow(unused_imports)]
3951        use crate::parser::{Parse, ParserContext};
3952        #[allow(unused_imports)]
3953        use crate::properties::{UnparsedValue, ShorthandId};
3954        #[allow(unused_imports)]
3955        use crate::error_reporting::ParseErrorReporter;
3956        #[allow(unused_imports)]
3957        use crate::properties::longhands;
3958        #[allow(unused_imports)]
3959        use crate::properties::{LonghandId, LonghandIdSet};
3960        #[allow(unused_imports)]
3961        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
3962        #[allow(unused_imports)]
3963        use crate::properties::style_structs;
3964        #[allow(unused_imports)]
3965        use selectors::parser::SelectorParseErrorKind;
3966        #[allow(unused_imports)]
3967        use servo_arc::Arc;
3968        #[allow(unused_imports)]
3969        use style_traits::{ParseError, StyleParseErrorKind};
3970        #[allow(unused_imports)]
3971        use crate::values::computed::{Context, ToComputedValue};
3972        #[allow(unused_imports)]
3973        use crate::values::{computed, generics, specified};
3974        #[allow(unused_imports)]
3975        use crate::Atom;
3976        
3977            
3978        #[allow(unused_imports)]
3979        use app_units::Au;
3980        #[allow(unused_imports)]
3981        use crate::values::specified::AllowQuirks;
3982        #[allow(unused_imports)]
3983        use crate::Zero;
3984        #[allow(unused_imports)]
3985        use smallvec::SmallVec;
3986        pub use crate::values::specified::BorderSideWidth as SpecifiedValue;
3987        pub mod computed_value {
3988            pub use crate::values::computed::BorderSideWidth as T;
3989        }
3990        #[inline] pub fn get_initial_value() -> computed_value::T { app_units::Au::from_px(3) }
3991        #[allow(unused_variables)]
3992        #[inline]
3993        pub fn parse<'i, 't>(
3994            context: &ParserContext,
3995            input: &mut Parser<'i, 't>,
3996        ) -> Result<SpecifiedValue, ParseError<'i>> {
3997            <specified::BorderSideWidth as crate::parser::Parse>::parse(context, input)
3998        }
3999    
4000        
4001        #[allow(unused_variables)]
4002        pub unsafe fn cascade_property(
4003            declaration: &PropertyDeclaration,
4004            context: &mut computed::Context,
4005        ) {
4006            declaration.debug_crash("Should physicalize before entering here");
4007        }
4008
4009        pub fn parse_declared<'i, 't>(
4010            context: &ParserContext,
4011            input: &mut Parser<'i, 't>,
4012        ) -> Result<PropertyDeclaration, ParseError<'i>> {
4013                parse(context, input)
4014                .map(PropertyDeclaration::BorderBlockEndWidth)
4015        }
4016    }
4017
4018
4019    
4020    
4021    
4022        
4023    
4024    /// https://drafts.csswg.org/css-logical-props/#propdef-border-inline-start-color
4025    pub mod border_inline_start_color {
4026        #[allow(unused_imports)]
4027        use cssparser::{Parser, BasicParseError, Token};
4028        #[allow(unused_imports)]
4029        use crate::parser::{Parse, ParserContext};
4030        #[allow(unused_imports)]
4031        use crate::properties::{UnparsedValue, ShorthandId};
4032        #[allow(unused_imports)]
4033        use crate::error_reporting::ParseErrorReporter;
4034        #[allow(unused_imports)]
4035        use crate::properties::longhands;
4036        #[allow(unused_imports)]
4037        use crate::properties::{LonghandId, LonghandIdSet};
4038        #[allow(unused_imports)]
4039        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
4040        #[allow(unused_imports)]
4041        use crate::properties::style_structs;
4042        #[allow(unused_imports)]
4043        use selectors::parser::SelectorParseErrorKind;
4044        #[allow(unused_imports)]
4045        use servo_arc::Arc;
4046        #[allow(unused_imports)]
4047        use style_traits::{ParseError, StyleParseErrorKind};
4048        #[allow(unused_imports)]
4049        use crate::values::computed::{Context, ToComputedValue};
4050        #[allow(unused_imports)]
4051        use crate::values::{computed, generics, specified};
4052        #[allow(unused_imports)]
4053        use crate::Atom;
4054        
4055            
4056        #[allow(unused_imports)]
4057        use app_units::Au;
4058        #[allow(unused_imports)]
4059        use crate::values::specified::AllowQuirks;
4060        #[allow(unused_imports)]
4061        use crate::Zero;
4062        #[allow(unused_imports)]
4063        use smallvec::SmallVec;
4064        pub use crate::values::specified::Color as SpecifiedValue;
4065        pub mod computed_value {
4066            pub use crate::values::computed::Color as T;
4067        }
4068        #[inline] pub fn get_initial_value() -> computed_value::T { computed_value::T::currentcolor() }
4069        #[allow(unused_variables)]
4070        #[inline]
4071        pub fn parse<'i, 't>(
4072            context: &ParserContext,
4073            input: &mut Parser<'i, 't>,
4074        ) -> Result<SpecifiedValue, ParseError<'i>> {
4075            <specified::Color as crate::parser::Parse>::parse(context, input)
4076        }
4077    
4078        
4079        #[allow(unused_variables)]
4080        pub unsafe fn cascade_property(
4081            declaration: &PropertyDeclaration,
4082            context: &mut computed::Context,
4083        ) {
4084            declaration.debug_crash("Should physicalize before entering here");
4085        }
4086
4087        pub fn parse_declared<'i, 't>(
4088            context: &ParserContext,
4089            input: &mut Parser<'i, 't>,
4090        ) -> Result<PropertyDeclaration, ParseError<'i>> {
4091                parse(context, input)
4092                .map(PropertyDeclaration::BorderInlineStartColor)
4093        }
4094    }
4095
4096
4097
4098    
4099    
4100        
4101    
4102    /// https://drafts.csswg.org/css-logical-props/#propdef-border-inline-start-style
4103    pub mod border_inline_start_style {
4104        #[allow(unused_imports)]
4105        use cssparser::{Parser, BasicParseError, Token};
4106        #[allow(unused_imports)]
4107        use crate::parser::{Parse, ParserContext};
4108        #[allow(unused_imports)]
4109        use crate::properties::{UnparsedValue, ShorthandId};
4110        #[allow(unused_imports)]
4111        use crate::error_reporting::ParseErrorReporter;
4112        #[allow(unused_imports)]
4113        use crate::properties::longhands;
4114        #[allow(unused_imports)]
4115        use crate::properties::{LonghandId, LonghandIdSet};
4116        #[allow(unused_imports)]
4117        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
4118        #[allow(unused_imports)]
4119        use crate::properties::style_structs;
4120        #[allow(unused_imports)]
4121        use selectors::parser::SelectorParseErrorKind;
4122        #[allow(unused_imports)]
4123        use servo_arc::Arc;
4124        #[allow(unused_imports)]
4125        use style_traits::{ParseError, StyleParseErrorKind};
4126        #[allow(unused_imports)]
4127        use crate::values::computed::{Context, ToComputedValue};
4128        #[allow(unused_imports)]
4129        use crate::values::{computed, generics, specified};
4130        #[allow(unused_imports)]
4131        use crate::Atom;
4132        
4133            
4134        #[allow(unused_imports)]
4135        use app_units::Au;
4136        #[allow(unused_imports)]
4137        use crate::values::specified::AllowQuirks;
4138        #[allow(unused_imports)]
4139        use crate::Zero;
4140        #[allow(unused_imports)]
4141        use smallvec::SmallVec;
4142        pub use crate::values::specified::BorderStyle as SpecifiedValue;
4143        pub mod computed_value {
4144            pub use crate::values::computed::BorderStyle as T;
4145        }
4146        #[inline] pub fn get_initial_value() -> computed_value::T { specified::BorderStyle::None }
4147        #[allow(unused_variables)]
4148        #[inline]
4149        pub fn parse<'i, 't>(
4150            context: &ParserContext,
4151            input: &mut Parser<'i, 't>,
4152        ) -> Result<SpecifiedValue, ParseError<'i>> {
4153            <specified::BorderStyle as crate::parser::Parse>::parse(context, input)
4154        }
4155    
4156        
4157        #[allow(unused_variables)]
4158        pub unsafe fn cascade_property(
4159            declaration: &PropertyDeclaration,
4160            context: &mut computed::Context,
4161        ) {
4162            declaration.debug_crash("Should physicalize before entering here");
4163        }
4164
4165        pub fn parse_declared<'i, 't>(
4166            context: &ParserContext,
4167            input: &mut Parser<'i, 't>,
4168        ) -> Result<PropertyDeclaration, ParseError<'i>> {
4169                parse(context, input)
4170                .map(PropertyDeclaration::BorderInlineStartStyle)
4171        }
4172    }
4173
4174
4175
4176    
4177    
4178        
4179    
4180    /// https://drafts.csswg.org/css-logical-props/#propdef-border-inline-start-width
4181    pub mod border_inline_start_width {
4182        #[allow(unused_imports)]
4183        use cssparser::{Parser, BasicParseError, Token};
4184        #[allow(unused_imports)]
4185        use crate::parser::{Parse, ParserContext};
4186        #[allow(unused_imports)]
4187        use crate::properties::{UnparsedValue, ShorthandId};
4188        #[allow(unused_imports)]
4189        use crate::error_reporting::ParseErrorReporter;
4190        #[allow(unused_imports)]
4191        use crate::properties::longhands;
4192        #[allow(unused_imports)]
4193        use crate::properties::{LonghandId, LonghandIdSet};
4194        #[allow(unused_imports)]
4195        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
4196        #[allow(unused_imports)]
4197        use crate::properties::style_structs;
4198        #[allow(unused_imports)]
4199        use selectors::parser::SelectorParseErrorKind;
4200        #[allow(unused_imports)]
4201        use servo_arc::Arc;
4202        #[allow(unused_imports)]
4203        use style_traits::{ParseError, StyleParseErrorKind};
4204        #[allow(unused_imports)]
4205        use crate::values::computed::{Context, ToComputedValue};
4206        #[allow(unused_imports)]
4207        use crate::values::{computed, generics, specified};
4208        #[allow(unused_imports)]
4209        use crate::Atom;
4210        
4211            
4212        #[allow(unused_imports)]
4213        use app_units::Au;
4214        #[allow(unused_imports)]
4215        use crate::values::specified::AllowQuirks;
4216        #[allow(unused_imports)]
4217        use crate::Zero;
4218        #[allow(unused_imports)]
4219        use smallvec::SmallVec;
4220        pub use crate::values::specified::BorderSideWidth as SpecifiedValue;
4221        pub mod computed_value {
4222            pub use crate::values::computed::BorderSideWidth as T;
4223        }
4224        #[inline] pub fn get_initial_value() -> computed_value::T { app_units::Au::from_px(3) }
4225        #[allow(unused_variables)]
4226        #[inline]
4227        pub fn parse<'i, 't>(
4228            context: &ParserContext,
4229            input: &mut Parser<'i, 't>,
4230        ) -> Result<SpecifiedValue, ParseError<'i>> {
4231            <specified::BorderSideWidth as crate::parser::Parse>::parse(context, input)
4232        }
4233    
4234        
4235        #[allow(unused_variables)]
4236        pub unsafe fn cascade_property(
4237            declaration: &PropertyDeclaration,
4238            context: &mut computed::Context,
4239        ) {
4240            declaration.debug_crash("Should physicalize before entering here");
4241        }
4242
4243        pub fn parse_declared<'i, 't>(
4244            context: &ParserContext,
4245            input: &mut Parser<'i, 't>,
4246        ) -> Result<PropertyDeclaration, ParseError<'i>> {
4247                parse(context, input)
4248                .map(PropertyDeclaration::BorderInlineStartWidth)
4249        }
4250    }
4251
4252
4253    
4254    
4255    
4256        
4257    
4258    /// https://drafts.csswg.org/css-logical-props/#propdef-border-inline-end-color
4259    pub mod border_inline_end_color {
4260        #[allow(unused_imports)]
4261        use cssparser::{Parser, BasicParseError, Token};
4262        #[allow(unused_imports)]
4263        use crate::parser::{Parse, ParserContext};
4264        #[allow(unused_imports)]
4265        use crate::properties::{UnparsedValue, ShorthandId};
4266        #[allow(unused_imports)]
4267        use crate::error_reporting::ParseErrorReporter;
4268        #[allow(unused_imports)]
4269        use crate::properties::longhands;
4270        #[allow(unused_imports)]
4271        use crate::properties::{LonghandId, LonghandIdSet};
4272        #[allow(unused_imports)]
4273        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
4274        #[allow(unused_imports)]
4275        use crate::properties::style_structs;
4276        #[allow(unused_imports)]
4277        use selectors::parser::SelectorParseErrorKind;
4278        #[allow(unused_imports)]
4279        use servo_arc::Arc;
4280        #[allow(unused_imports)]
4281        use style_traits::{ParseError, StyleParseErrorKind};
4282        #[allow(unused_imports)]
4283        use crate::values::computed::{Context, ToComputedValue};
4284        #[allow(unused_imports)]
4285        use crate::values::{computed, generics, specified};
4286        #[allow(unused_imports)]
4287        use crate::Atom;
4288        
4289            
4290        #[allow(unused_imports)]
4291        use app_units::Au;
4292        #[allow(unused_imports)]
4293        use crate::values::specified::AllowQuirks;
4294        #[allow(unused_imports)]
4295        use crate::Zero;
4296        #[allow(unused_imports)]
4297        use smallvec::SmallVec;
4298        pub use crate::values::specified::Color as SpecifiedValue;
4299        pub mod computed_value {
4300            pub use crate::values::computed::Color as T;
4301        }
4302        #[inline] pub fn get_initial_value() -> computed_value::T { computed_value::T::currentcolor() }
4303        #[allow(unused_variables)]
4304        #[inline]
4305        pub fn parse<'i, 't>(
4306            context: &ParserContext,
4307            input: &mut Parser<'i, 't>,
4308        ) -> Result<SpecifiedValue, ParseError<'i>> {
4309            <specified::Color as crate::parser::Parse>::parse(context, input)
4310        }
4311    
4312        
4313        #[allow(unused_variables)]
4314        pub unsafe fn cascade_property(
4315            declaration: &PropertyDeclaration,
4316            context: &mut computed::Context,
4317        ) {
4318            declaration.debug_crash("Should physicalize before entering here");
4319        }
4320
4321        pub fn parse_declared<'i, 't>(
4322            context: &ParserContext,
4323            input: &mut Parser<'i, 't>,
4324        ) -> Result<PropertyDeclaration, ParseError<'i>> {
4325                parse(context, input)
4326                .map(PropertyDeclaration::BorderInlineEndColor)
4327        }
4328    }
4329
4330
4331
4332    
4333    
4334        
4335    
4336    /// https://drafts.csswg.org/css-logical-props/#propdef-border-inline-end-style
4337    pub mod border_inline_end_style {
4338        #[allow(unused_imports)]
4339        use cssparser::{Parser, BasicParseError, Token};
4340        #[allow(unused_imports)]
4341        use crate::parser::{Parse, ParserContext};
4342        #[allow(unused_imports)]
4343        use crate::properties::{UnparsedValue, ShorthandId};
4344        #[allow(unused_imports)]
4345        use crate::error_reporting::ParseErrorReporter;
4346        #[allow(unused_imports)]
4347        use crate::properties::longhands;
4348        #[allow(unused_imports)]
4349        use crate::properties::{LonghandId, LonghandIdSet};
4350        #[allow(unused_imports)]
4351        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
4352        #[allow(unused_imports)]
4353        use crate::properties::style_structs;
4354        #[allow(unused_imports)]
4355        use selectors::parser::SelectorParseErrorKind;
4356        #[allow(unused_imports)]
4357        use servo_arc::Arc;
4358        #[allow(unused_imports)]
4359        use style_traits::{ParseError, StyleParseErrorKind};
4360        #[allow(unused_imports)]
4361        use crate::values::computed::{Context, ToComputedValue};
4362        #[allow(unused_imports)]
4363        use crate::values::{computed, generics, specified};
4364        #[allow(unused_imports)]
4365        use crate::Atom;
4366        
4367            
4368        #[allow(unused_imports)]
4369        use app_units::Au;
4370        #[allow(unused_imports)]
4371        use crate::values::specified::AllowQuirks;
4372        #[allow(unused_imports)]
4373        use crate::Zero;
4374        #[allow(unused_imports)]
4375        use smallvec::SmallVec;
4376        pub use crate::values::specified::BorderStyle as SpecifiedValue;
4377        pub mod computed_value {
4378            pub use crate::values::computed::BorderStyle as T;
4379        }
4380        #[inline] pub fn get_initial_value() -> computed_value::T { specified::BorderStyle::None }
4381        #[allow(unused_variables)]
4382        #[inline]
4383        pub fn parse<'i, 't>(
4384            context: &ParserContext,
4385            input: &mut Parser<'i, 't>,
4386        ) -> Result<SpecifiedValue, ParseError<'i>> {
4387            <specified::BorderStyle as crate::parser::Parse>::parse(context, input)
4388        }
4389    
4390        
4391        #[allow(unused_variables)]
4392        pub unsafe fn cascade_property(
4393            declaration: &PropertyDeclaration,
4394            context: &mut computed::Context,
4395        ) {
4396            declaration.debug_crash("Should physicalize before entering here");
4397        }
4398
4399        pub fn parse_declared<'i, 't>(
4400            context: &ParserContext,
4401            input: &mut Parser<'i, 't>,
4402        ) -> Result<PropertyDeclaration, ParseError<'i>> {
4403                parse(context, input)
4404                .map(PropertyDeclaration::BorderInlineEndStyle)
4405        }
4406    }
4407
4408
4409
4410    
4411    
4412        
4413    
4414    /// https://drafts.csswg.org/css-logical-props/#propdef-border-inline-end-width
4415    pub mod border_inline_end_width {
4416        #[allow(unused_imports)]
4417        use cssparser::{Parser, BasicParseError, Token};
4418        #[allow(unused_imports)]
4419        use crate::parser::{Parse, ParserContext};
4420        #[allow(unused_imports)]
4421        use crate::properties::{UnparsedValue, ShorthandId};
4422        #[allow(unused_imports)]
4423        use crate::error_reporting::ParseErrorReporter;
4424        #[allow(unused_imports)]
4425        use crate::properties::longhands;
4426        #[allow(unused_imports)]
4427        use crate::properties::{LonghandId, LonghandIdSet};
4428        #[allow(unused_imports)]
4429        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
4430        #[allow(unused_imports)]
4431        use crate::properties::style_structs;
4432        #[allow(unused_imports)]
4433        use selectors::parser::SelectorParseErrorKind;
4434        #[allow(unused_imports)]
4435        use servo_arc::Arc;
4436        #[allow(unused_imports)]
4437        use style_traits::{ParseError, StyleParseErrorKind};
4438        #[allow(unused_imports)]
4439        use crate::values::computed::{Context, ToComputedValue};
4440        #[allow(unused_imports)]
4441        use crate::values::{computed, generics, specified};
4442        #[allow(unused_imports)]
4443        use crate::Atom;
4444        
4445            
4446        #[allow(unused_imports)]
4447        use app_units::Au;
4448        #[allow(unused_imports)]
4449        use crate::values::specified::AllowQuirks;
4450        #[allow(unused_imports)]
4451        use crate::Zero;
4452        #[allow(unused_imports)]
4453        use smallvec::SmallVec;
4454        pub use crate::values::specified::BorderSideWidth as SpecifiedValue;
4455        pub mod computed_value {
4456            pub use crate::values::computed::BorderSideWidth as T;
4457        }
4458        #[inline] pub fn get_initial_value() -> computed_value::T { app_units::Au::from_px(3) }
4459        #[allow(unused_variables)]
4460        #[inline]
4461        pub fn parse<'i, 't>(
4462            context: &ParserContext,
4463            input: &mut Parser<'i, 't>,
4464        ) -> Result<SpecifiedValue, ParseError<'i>> {
4465            <specified::BorderSideWidth as crate::parser::Parse>::parse(context, input)
4466        }
4467    
4468        
4469        #[allow(unused_variables)]
4470        pub unsafe fn cascade_property(
4471            declaration: &PropertyDeclaration,
4472            context: &mut computed::Context,
4473        ) {
4474            declaration.debug_crash("Should physicalize before entering here");
4475        }
4476
4477        pub fn parse_declared<'i, 't>(
4478            context: &ParserContext,
4479            input: &mut Parser<'i, 't>,
4480        ) -> Result<PropertyDeclaration, ParseError<'i>> {
4481                parse(context, input)
4482                .map(PropertyDeclaration::BorderInlineEndWidth)
4483        }
4484    }
4485
4486
4487
4488    
4489    
4490    
4491        
4492    
4493    /// https://drafts.csswg.org/css-backgrounds/#border-top-left-radius
4494    pub mod border_top_left_radius {
4495        #[allow(unused_imports)]
4496        use cssparser::{Parser, BasicParseError, Token};
4497        #[allow(unused_imports)]
4498        use crate::parser::{Parse, ParserContext};
4499        #[allow(unused_imports)]
4500        use crate::properties::{UnparsedValue, ShorthandId};
4501        #[allow(unused_imports)]
4502        use crate::error_reporting::ParseErrorReporter;
4503        #[allow(unused_imports)]
4504        use crate::properties::longhands;
4505        #[allow(unused_imports)]
4506        use crate::properties::{LonghandId, LonghandIdSet};
4507        #[allow(unused_imports)]
4508        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
4509        #[allow(unused_imports)]
4510        use crate::properties::style_structs;
4511        #[allow(unused_imports)]
4512        use selectors::parser::SelectorParseErrorKind;
4513        #[allow(unused_imports)]
4514        use servo_arc::Arc;
4515        #[allow(unused_imports)]
4516        use style_traits::{ParseError, StyleParseErrorKind};
4517        #[allow(unused_imports)]
4518        use crate::values::computed::{Context, ToComputedValue};
4519        #[allow(unused_imports)]
4520        use crate::values::{computed, generics, specified};
4521        #[allow(unused_imports)]
4522        use crate::Atom;
4523        
4524            
4525        #[allow(unused_imports)]
4526        use app_units::Au;
4527        #[allow(unused_imports)]
4528        use crate::values::specified::AllowQuirks;
4529        #[allow(unused_imports)]
4530        use crate::Zero;
4531        #[allow(unused_imports)]
4532        use smallvec::SmallVec;
4533        pub use crate::values::specified::BorderCornerRadius as SpecifiedValue;
4534        pub mod computed_value {
4535            pub use crate::values::computed::BorderCornerRadius as T;
4536        }
4537        #[inline] pub fn get_initial_value() -> computed_value::T { computed::BorderCornerRadius::zero() }
4538        #[allow(unused_variables)]
4539        #[inline]
4540        pub fn parse<'i, 't>(
4541            context: &ParserContext,
4542            input: &mut Parser<'i, 't>,
4543        ) -> Result<SpecifiedValue, ParseError<'i>> {
4544            <specified::BorderCornerRadius as crate::parser::Parse>::parse(context, input)
4545        }
4546    
4547        
4548        #[allow(unused_variables)]
4549        pub unsafe fn cascade_property(
4550            declaration: &PropertyDeclaration,
4551            context: &mut computed::Context,
4552        ) {
4553            context.for_non_inherited_property = true;
4554            debug_assert_eq!(
4555                declaration.id().as_longhand().unwrap().logical_group(),
4556                LonghandId::BorderTopLeftRadius.logical_group(),
4557            );
4558            let specified_value = match *declaration {
4559                PropertyDeclaration::CSSWideKeyword(ref wk) => {
4560                    match wk.keyword {
4561                        CSSWideKeyword::Unset |
4562                        CSSWideKeyword::Initial => {
4563                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
4564                        },
4565                        CSSWideKeyword::Inherit => {
4566                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
4567                                context.builder.inherit_border_top_left_radius();
4568                        }
4569                        CSSWideKeyword::RevertLayer |
4570                        CSSWideKeyword::Revert => {
4571                            declaration.debug_crash("Found revert/revert-layer not dealt with");
4572                        },
4573                    }
4574                    return;
4575                },
4576                #[cfg(debug_assertions)]
4577                PropertyDeclaration::WithVariables(..) => {
4578                    declaration.debug_crash("Found variables not substituted");
4579                    return;
4580                },
4581                _ => unsafe {
4582                    declaration.unchecked_value_as::<Box<crate::values::specified::BorderCornerRadius>>()
4583                },
4584            };
4585
4586
4587                let computed = (**specified_value).to_computed_value(context);
4588                context.builder.set_border_top_left_radius(computed)
4589        }
4590
4591        pub fn parse_declared<'i, 't>(
4592            context: &ParserContext,
4593            input: &mut Parser<'i, 't>,
4594        ) -> Result<PropertyDeclaration, ParseError<'i>> {
4595                parse(context, input)
4596                .map(Box::new)
4597                .map(PropertyDeclaration::BorderTopLeftRadius)
4598        }
4599    }
4600
4601
4602    
4603    
4604    
4605        
4606    
4607    /// https://drafts.csswg.org/css-backgrounds/#border-top-right-radius
4608    pub mod border_top_right_radius {
4609        #[allow(unused_imports)]
4610        use cssparser::{Parser, BasicParseError, Token};
4611        #[allow(unused_imports)]
4612        use crate::parser::{Parse, ParserContext};
4613        #[allow(unused_imports)]
4614        use crate::properties::{UnparsedValue, ShorthandId};
4615        #[allow(unused_imports)]
4616        use crate::error_reporting::ParseErrorReporter;
4617        #[allow(unused_imports)]
4618        use crate::properties::longhands;
4619        #[allow(unused_imports)]
4620        use crate::properties::{LonghandId, LonghandIdSet};
4621        #[allow(unused_imports)]
4622        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
4623        #[allow(unused_imports)]
4624        use crate::properties::style_structs;
4625        #[allow(unused_imports)]
4626        use selectors::parser::SelectorParseErrorKind;
4627        #[allow(unused_imports)]
4628        use servo_arc::Arc;
4629        #[allow(unused_imports)]
4630        use style_traits::{ParseError, StyleParseErrorKind};
4631        #[allow(unused_imports)]
4632        use crate::values::computed::{Context, ToComputedValue};
4633        #[allow(unused_imports)]
4634        use crate::values::{computed, generics, specified};
4635        #[allow(unused_imports)]
4636        use crate::Atom;
4637        
4638            
4639        #[allow(unused_imports)]
4640        use app_units::Au;
4641        #[allow(unused_imports)]
4642        use crate::values::specified::AllowQuirks;
4643        #[allow(unused_imports)]
4644        use crate::Zero;
4645        #[allow(unused_imports)]
4646        use smallvec::SmallVec;
4647        pub use crate::values::specified::BorderCornerRadius as SpecifiedValue;
4648        pub mod computed_value {
4649            pub use crate::values::computed::BorderCornerRadius as T;
4650        }
4651        #[inline] pub fn get_initial_value() -> computed_value::T { computed::BorderCornerRadius::zero() }
4652        #[allow(unused_variables)]
4653        #[inline]
4654        pub fn parse<'i, 't>(
4655            context: &ParserContext,
4656            input: &mut Parser<'i, 't>,
4657        ) -> Result<SpecifiedValue, ParseError<'i>> {
4658            <specified::BorderCornerRadius as crate::parser::Parse>::parse(context, input)
4659        }
4660    
4661        
4662        #[allow(unused_variables)]
4663        pub unsafe fn cascade_property(
4664            declaration: &PropertyDeclaration,
4665            context: &mut computed::Context,
4666        ) {
4667            context.for_non_inherited_property = true;
4668            debug_assert_eq!(
4669                declaration.id().as_longhand().unwrap().logical_group(),
4670                LonghandId::BorderTopRightRadius.logical_group(),
4671            );
4672            let specified_value = match *declaration {
4673                PropertyDeclaration::CSSWideKeyword(ref wk) => {
4674                    match wk.keyword {
4675                        CSSWideKeyword::Unset |
4676                        CSSWideKeyword::Initial => {
4677                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
4678                        },
4679                        CSSWideKeyword::Inherit => {
4680                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
4681                                context.builder.inherit_border_top_right_radius();
4682                        }
4683                        CSSWideKeyword::RevertLayer |
4684                        CSSWideKeyword::Revert => {
4685                            declaration.debug_crash("Found revert/revert-layer not dealt with");
4686                        },
4687                    }
4688                    return;
4689                },
4690                #[cfg(debug_assertions)]
4691                PropertyDeclaration::WithVariables(..) => {
4692                    declaration.debug_crash("Found variables not substituted");
4693                    return;
4694                },
4695                _ => unsafe {
4696                    declaration.unchecked_value_as::<Box<crate::values::specified::BorderCornerRadius>>()
4697                },
4698            };
4699
4700
4701                let computed = (**specified_value).to_computed_value(context);
4702                context.builder.set_border_top_right_radius(computed)
4703        }
4704
4705        pub fn parse_declared<'i, 't>(
4706            context: &ParserContext,
4707            input: &mut Parser<'i, 't>,
4708        ) -> Result<PropertyDeclaration, ParseError<'i>> {
4709                parse(context, input)
4710                .map(Box::new)
4711                .map(PropertyDeclaration::BorderTopRightRadius)
4712        }
4713    }
4714
4715
4716    
4717    
4718    
4719        
4720    
4721    /// https://drafts.csswg.org/css-backgrounds/#border-bottom-right-radius
4722    pub mod border_bottom_right_radius {
4723        #[allow(unused_imports)]
4724        use cssparser::{Parser, BasicParseError, Token};
4725        #[allow(unused_imports)]
4726        use crate::parser::{Parse, ParserContext};
4727        #[allow(unused_imports)]
4728        use crate::properties::{UnparsedValue, ShorthandId};
4729        #[allow(unused_imports)]
4730        use crate::error_reporting::ParseErrorReporter;
4731        #[allow(unused_imports)]
4732        use crate::properties::longhands;
4733        #[allow(unused_imports)]
4734        use crate::properties::{LonghandId, LonghandIdSet};
4735        #[allow(unused_imports)]
4736        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
4737        #[allow(unused_imports)]
4738        use crate::properties::style_structs;
4739        #[allow(unused_imports)]
4740        use selectors::parser::SelectorParseErrorKind;
4741        #[allow(unused_imports)]
4742        use servo_arc::Arc;
4743        #[allow(unused_imports)]
4744        use style_traits::{ParseError, StyleParseErrorKind};
4745        #[allow(unused_imports)]
4746        use crate::values::computed::{Context, ToComputedValue};
4747        #[allow(unused_imports)]
4748        use crate::values::{computed, generics, specified};
4749        #[allow(unused_imports)]
4750        use crate::Atom;
4751        
4752            
4753        #[allow(unused_imports)]
4754        use app_units::Au;
4755        #[allow(unused_imports)]
4756        use crate::values::specified::AllowQuirks;
4757        #[allow(unused_imports)]
4758        use crate::Zero;
4759        #[allow(unused_imports)]
4760        use smallvec::SmallVec;
4761        pub use crate::values::specified::BorderCornerRadius as SpecifiedValue;
4762        pub mod computed_value {
4763            pub use crate::values::computed::BorderCornerRadius as T;
4764        }
4765        #[inline] pub fn get_initial_value() -> computed_value::T { computed::BorderCornerRadius::zero() }
4766        #[allow(unused_variables)]
4767        #[inline]
4768        pub fn parse<'i, 't>(
4769            context: &ParserContext,
4770            input: &mut Parser<'i, 't>,
4771        ) -> Result<SpecifiedValue, ParseError<'i>> {
4772            <specified::BorderCornerRadius as crate::parser::Parse>::parse(context, input)
4773        }
4774    
4775        
4776        #[allow(unused_variables)]
4777        pub unsafe fn cascade_property(
4778            declaration: &PropertyDeclaration,
4779            context: &mut computed::Context,
4780        ) {
4781            context.for_non_inherited_property = true;
4782            debug_assert_eq!(
4783                declaration.id().as_longhand().unwrap().logical_group(),
4784                LonghandId::BorderBottomRightRadius.logical_group(),
4785            );
4786            let specified_value = match *declaration {
4787                PropertyDeclaration::CSSWideKeyword(ref wk) => {
4788                    match wk.keyword {
4789                        CSSWideKeyword::Unset |
4790                        CSSWideKeyword::Initial => {
4791                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
4792                        },
4793                        CSSWideKeyword::Inherit => {
4794                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
4795                                context.builder.inherit_border_bottom_right_radius();
4796                        }
4797                        CSSWideKeyword::RevertLayer |
4798                        CSSWideKeyword::Revert => {
4799                            declaration.debug_crash("Found revert/revert-layer not dealt with");
4800                        },
4801                    }
4802                    return;
4803                },
4804                #[cfg(debug_assertions)]
4805                PropertyDeclaration::WithVariables(..) => {
4806                    declaration.debug_crash("Found variables not substituted");
4807                    return;
4808                },
4809                _ => unsafe {
4810                    declaration.unchecked_value_as::<Box<crate::values::specified::BorderCornerRadius>>()
4811                },
4812            };
4813
4814
4815                let computed = (**specified_value).to_computed_value(context);
4816                context.builder.set_border_bottom_right_radius(computed)
4817        }
4818
4819        pub fn parse_declared<'i, 't>(
4820            context: &ParserContext,
4821            input: &mut Parser<'i, 't>,
4822        ) -> Result<PropertyDeclaration, ParseError<'i>> {
4823                parse(context, input)
4824                .map(Box::new)
4825                .map(PropertyDeclaration::BorderBottomRightRadius)
4826        }
4827    }
4828
4829
4830    
4831    
4832    
4833        
4834    
4835    /// https://drafts.csswg.org/css-backgrounds/#border-bottom-left-radius
4836    pub mod border_bottom_left_radius {
4837        #[allow(unused_imports)]
4838        use cssparser::{Parser, BasicParseError, Token};
4839        #[allow(unused_imports)]
4840        use crate::parser::{Parse, ParserContext};
4841        #[allow(unused_imports)]
4842        use crate::properties::{UnparsedValue, ShorthandId};
4843        #[allow(unused_imports)]
4844        use crate::error_reporting::ParseErrorReporter;
4845        #[allow(unused_imports)]
4846        use crate::properties::longhands;
4847        #[allow(unused_imports)]
4848        use crate::properties::{LonghandId, LonghandIdSet};
4849        #[allow(unused_imports)]
4850        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
4851        #[allow(unused_imports)]
4852        use crate::properties::style_structs;
4853        #[allow(unused_imports)]
4854        use selectors::parser::SelectorParseErrorKind;
4855        #[allow(unused_imports)]
4856        use servo_arc::Arc;
4857        #[allow(unused_imports)]
4858        use style_traits::{ParseError, StyleParseErrorKind};
4859        #[allow(unused_imports)]
4860        use crate::values::computed::{Context, ToComputedValue};
4861        #[allow(unused_imports)]
4862        use crate::values::{computed, generics, specified};
4863        #[allow(unused_imports)]
4864        use crate::Atom;
4865        
4866            
4867        #[allow(unused_imports)]
4868        use app_units::Au;
4869        #[allow(unused_imports)]
4870        use crate::values::specified::AllowQuirks;
4871        #[allow(unused_imports)]
4872        use crate::Zero;
4873        #[allow(unused_imports)]
4874        use smallvec::SmallVec;
4875        pub use crate::values::specified::BorderCornerRadius as SpecifiedValue;
4876        pub mod computed_value {
4877            pub use crate::values::computed::BorderCornerRadius as T;
4878        }
4879        #[inline] pub fn get_initial_value() -> computed_value::T { computed::BorderCornerRadius::zero() }
4880        #[allow(unused_variables)]
4881        #[inline]
4882        pub fn parse<'i, 't>(
4883            context: &ParserContext,
4884            input: &mut Parser<'i, 't>,
4885        ) -> Result<SpecifiedValue, ParseError<'i>> {
4886            <specified::BorderCornerRadius as crate::parser::Parse>::parse(context, input)
4887        }
4888    
4889        
4890        #[allow(unused_variables)]
4891        pub unsafe fn cascade_property(
4892            declaration: &PropertyDeclaration,
4893            context: &mut computed::Context,
4894        ) {
4895            context.for_non_inherited_property = true;
4896            debug_assert_eq!(
4897                declaration.id().as_longhand().unwrap().logical_group(),
4898                LonghandId::BorderBottomLeftRadius.logical_group(),
4899            );
4900            let specified_value = match *declaration {
4901                PropertyDeclaration::CSSWideKeyword(ref wk) => {
4902                    match wk.keyword {
4903                        CSSWideKeyword::Unset |
4904                        CSSWideKeyword::Initial => {
4905                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
4906                        },
4907                        CSSWideKeyword::Inherit => {
4908                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
4909                                context.builder.inherit_border_bottom_left_radius();
4910                        }
4911                        CSSWideKeyword::RevertLayer |
4912                        CSSWideKeyword::Revert => {
4913                            declaration.debug_crash("Found revert/revert-layer not dealt with");
4914                        },
4915                    }
4916                    return;
4917                },
4918                #[cfg(debug_assertions)]
4919                PropertyDeclaration::WithVariables(..) => {
4920                    declaration.debug_crash("Found variables not substituted");
4921                    return;
4922                },
4923                _ => unsafe {
4924                    declaration.unchecked_value_as::<Box<crate::values::specified::BorderCornerRadius>>()
4925                },
4926            };
4927
4928
4929                let computed = (**specified_value).to_computed_value(context);
4930                context.builder.set_border_bottom_left_radius(computed)
4931        }
4932
4933        pub fn parse_declared<'i, 't>(
4934            context: &ParserContext,
4935            input: &mut Parser<'i, 't>,
4936        ) -> Result<PropertyDeclaration, ParseError<'i>> {
4937                parse(context, input)
4938                .map(Box::new)
4939                .map(PropertyDeclaration::BorderBottomLeftRadius)
4940        }
4941    }
4942
4943
4944    
4945    
4946    
4947        
4948    
4949    /// https://drafts.csswg.org/css-logical-props/#propdef-border-start-start-radius
4950    pub mod border_start_start_radius {
4951        #[allow(unused_imports)]
4952        use cssparser::{Parser, BasicParseError, Token};
4953        #[allow(unused_imports)]
4954        use crate::parser::{Parse, ParserContext};
4955        #[allow(unused_imports)]
4956        use crate::properties::{UnparsedValue, ShorthandId};
4957        #[allow(unused_imports)]
4958        use crate::error_reporting::ParseErrorReporter;
4959        #[allow(unused_imports)]
4960        use crate::properties::longhands;
4961        #[allow(unused_imports)]
4962        use crate::properties::{LonghandId, LonghandIdSet};
4963        #[allow(unused_imports)]
4964        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
4965        #[allow(unused_imports)]
4966        use crate::properties::style_structs;
4967        #[allow(unused_imports)]
4968        use selectors::parser::SelectorParseErrorKind;
4969        #[allow(unused_imports)]
4970        use servo_arc::Arc;
4971        #[allow(unused_imports)]
4972        use style_traits::{ParseError, StyleParseErrorKind};
4973        #[allow(unused_imports)]
4974        use crate::values::computed::{Context, ToComputedValue};
4975        #[allow(unused_imports)]
4976        use crate::values::{computed, generics, specified};
4977        #[allow(unused_imports)]
4978        use crate::Atom;
4979        
4980            
4981        #[allow(unused_imports)]
4982        use app_units::Au;
4983        #[allow(unused_imports)]
4984        use crate::values::specified::AllowQuirks;
4985        #[allow(unused_imports)]
4986        use crate::Zero;
4987        #[allow(unused_imports)]
4988        use smallvec::SmallVec;
4989        pub use crate::values::specified::BorderCornerRadius as SpecifiedValue;
4990        pub mod computed_value {
4991            pub use crate::values::computed::BorderCornerRadius as T;
4992        }
4993        #[inline] pub fn get_initial_value() -> computed_value::T { computed::BorderCornerRadius::zero() }
4994        #[allow(unused_variables)]
4995        #[inline]
4996        pub fn parse<'i, 't>(
4997            context: &ParserContext,
4998            input: &mut Parser<'i, 't>,
4999        ) -> Result<SpecifiedValue, ParseError<'i>> {
5000            <specified::BorderCornerRadius as crate::parser::Parse>::parse(context, input)
5001        }
5002    
5003        
5004        #[allow(unused_variables)]
5005        pub unsafe fn cascade_property(
5006            declaration: &PropertyDeclaration,
5007            context: &mut computed::Context,
5008        ) {
5009            declaration.debug_crash("Should physicalize before entering here");
5010        }
5011
5012        pub fn parse_declared<'i, 't>(
5013            context: &ParserContext,
5014            input: &mut Parser<'i, 't>,
5015        ) -> Result<PropertyDeclaration, ParseError<'i>> {
5016                parse(context, input)
5017                .map(Box::new)
5018                .map(PropertyDeclaration::BorderStartStartRadius)
5019        }
5020    }
5021
5022
5023    
5024    
5025    
5026        
5027    
5028    /// https://drafts.csswg.org/css-logical-props/#propdef-border-start-end-radius
5029    pub mod border_start_end_radius {
5030        #[allow(unused_imports)]
5031        use cssparser::{Parser, BasicParseError, Token};
5032        #[allow(unused_imports)]
5033        use crate::parser::{Parse, ParserContext};
5034        #[allow(unused_imports)]
5035        use crate::properties::{UnparsedValue, ShorthandId};
5036        #[allow(unused_imports)]
5037        use crate::error_reporting::ParseErrorReporter;
5038        #[allow(unused_imports)]
5039        use crate::properties::longhands;
5040        #[allow(unused_imports)]
5041        use crate::properties::{LonghandId, LonghandIdSet};
5042        #[allow(unused_imports)]
5043        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
5044        #[allow(unused_imports)]
5045        use crate::properties::style_structs;
5046        #[allow(unused_imports)]
5047        use selectors::parser::SelectorParseErrorKind;
5048        #[allow(unused_imports)]
5049        use servo_arc::Arc;
5050        #[allow(unused_imports)]
5051        use style_traits::{ParseError, StyleParseErrorKind};
5052        #[allow(unused_imports)]
5053        use crate::values::computed::{Context, ToComputedValue};
5054        #[allow(unused_imports)]
5055        use crate::values::{computed, generics, specified};
5056        #[allow(unused_imports)]
5057        use crate::Atom;
5058        
5059            
5060        #[allow(unused_imports)]
5061        use app_units::Au;
5062        #[allow(unused_imports)]
5063        use crate::values::specified::AllowQuirks;
5064        #[allow(unused_imports)]
5065        use crate::Zero;
5066        #[allow(unused_imports)]
5067        use smallvec::SmallVec;
5068        pub use crate::values::specified::BorderCornerRadius as SpecifiedValue;
5069        pub mod computed_value {
5070            pub use crate::values::computed::BorderCornerRadius as T;
5071        }
5072        #[inline] pub fn get_initial_value() -> computed_value::T { computed::BorderCornerRadius::zero() }
5073        #[allow(unused_variables)]
5074        #[inline]
5075        pub fn parse<'i, 't>(
5076            context: &ParserContext,
5077            input: &mut Parser<'i, 't>,
5078        ) -> Result<SpecifiedValue, ParseError<'i>> {
5079            <specified::BorderCornerRadius as crate::parser::Parse>::parse(context, input)
5080        }
5081    
5082        
5083        #[allow(unused_variables)]
5084        pub unsafe fn cascade_property(
5085            declaration: &PropertyDeclaration,
5086            context: &mut computed::Context,
5087        ) {
5088            declaration.debug_crash("Should physicalize before entering here");
5089        }
5090
5091        pub fn parse_declared<'i, 't>(
5092            context: &ParserContext,
5093            input: &mut Parser<'i, 't>,
5094        ) -> Result<PropertyDeclaration, ParseError<'i>> {
5095                parse(context, input)
5096                .map(Box::new)
5097                .map(PropertyDeclaration::BorderStartEndRadius)
5098        }
5099    }
5100
5101
5102    
5103    
5104    
5105        
5106    
5107    /// https://drafts.csswg.org/css-logical-props/#propdef-border-end-start-radius
5108    pub mod border_end_start_radius {
5109        #[allow(unused_imports)]
5110        use cssparser::{Parser, BasicParseError, Token};
5111        #[allow(unused_imports)]
5112        use crate::parser::{Parse, ParserContext};
5113        #[allow(unused_imports)]
5114        use crate::properties::{UnparsedValue, ShorthandId};
5115        #[allow(unused_imports)]
5116        use crate::error_reporting::ParseErrorReporter;
5117        #[allow(unused_imports)]
5118        use crate::properties::longhands;
5119        #[allow(unused_imports)]
5120        use crate::properties::{LonghandId, LonghandIdSet};
5121        #[allow(unused_imports)]
5122        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
5123        #[allow(unused_imports)]
5124        use crate::properties::style_structs;
5125        #[allow(unused_imports)]
5126        use selectors::parser::SelectorParseErrorKind;
5127        #[allow(unused_imports)]
5128        use servo_arc::Arc;
5129        #[allow(unused_imports)]
5130        use style_traits::{ParseError, StyleParseErrorKind};
5131        #[allow(unused_imports)]
5132        use crate::values::computed::{Context, ToComputedValue};
5133        #[allow(unused_imports)]
5134        use crate::values::{computed, generics, specified};
5135        #[allow(unused_imports)]
5136        use crate::Atom;
5137        
5138            
5139        #[allow(unused_imports)]
5140        use app_units::Au;
5141        #[allow(unused_imports)]
5142        use crate::values::specified::AllowQuirks;
5143        #[allow(unused_imports)]
5144        use crate::Zero;
5145        #[allow(unused_imports)]
5146        use smallvec::SmallVec;
5147        pub use crate::values::specified::BorderCornerRadius as SpecifiedValue;
5148        pub mod computed_value {
5149            pub use crate::values::computed::BorderCornerRadius as T;
5150        }
5151        #[inline] pub fn get_initial_value() -> computed_value::T { computed::BorderCornerRadius::zero() }
5152        #[allow(unused_variables)]
5153        #[inline]
5154        pub fn parse<'i, 't>(
5155            context: &ParserContext,
5156            input: &mut Parser<'i, 't>,
5157        ) -> Result<SpecifiedValue, ParseError<'i>> {
5158            <specified::BorderCornerRadius as crate::parser::Parse>::parse(context, input)
5159        }
5160    
5161        
5162        #[allow(unused_variables)]
5163        pub unsafe fn cascade_property(
5164            declaration: &PropertyDeclaration,
5165            context: &mut computed::Context,
5166        ) {
5167            declaration.debug_crash("Should physicalize before entering here");
5168        }
5169
5170        pub fn parse_declared<'i, 't>(
5171            context: &ParserContext,
5172            input: &mut Parser<'i, 't>,
5173        ) -> Result<PropertyDeclaration, ParseError<'i>> {
5174                parse(context, input)
5175                .map(Box::new)
5176                .map(PropertyDeclaration::BorderEndStartRadius)
5177        }
5178    }
5179
5180
5181    
5182    
5183    
5184        
5185    
5186    /// https://drafts.csswg.org/css-logical-props/#propdef-border-end-end-radius
5187    pub mod border_end_end_radius {
5188        #[allow(unused_imports)]
5189        use cssparser::{Parser, BasicParseError, Token};
5190        #[allow(unused_imports)]
5191        use crate::parser::{Parse, ParserContext};
5192        #[allow(unused_imports)]
5193        use crate::properties::{UnparsedValue, ShorthandId};
5194        #[allow(unused_imports)]
5195        use crate::error_reporting::ParseErrorReporter;
5196        #[allow(unused_imports)]
5197        use crate::properties::longhands;
5198        #[allow(unused_imports)]
5199        use crate::properties::{LonghandId, LonghandIdSet};
5200        #[allow(unused_imports)]
5201        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
5202        #[allow(unused_imports)]
5203        use crate::properties::style_structs;
5204        #[allow(unused_imports)]
5205        use selectors::parser::SelectorParseErrorKind;
5206        #[allow(unused_imports)]
5207        use servo_arc::Arc;
5208        #[allow(unused_imports)]
5209        use style_traits::{ParseError, StyleParseErrorKind};
5210        #[allow(unused_imports)]
5211        use crate::values::computed::{Context, ToComputedValue};
5212        #[allow(unused_imports)]
5213        use crate::values::{computed, generics, specified};
5214        #[allow(unused_imports)]
5215        use crate::Atom;
5216        
5217            
5218        #[allow(unused_imports)]
5219        use app_units::Au;
5220        #[allow(unused_imports)]
5221        use crate::values::specified::AllowQuirks;
5222        #[allow(unused_imports)]
5223        use crate::Zero;
5224        #[allow(unused_imports)]
5225        use smallvec::SmallVec;
5226        pub use crate::values::specified::BorderCornerRadius as SpecifiedValue;
5227        pub mod computed_value {
5228            pub use crate::values::computed::BorderCornerRadius as T;
5229        }
5230        #[inline] pub fn get_initial_value() -> computed_value::T { computed::BorderCornerRadius::zero() }
5231        #[allow(unused_variables)]
5232        #[inline]
5233        pub fn parse<'i, 't>(
5234            context: &ParserContext,
5235            input: &mut Parser<'i, 't>,
5236        ) -> Result<SpecifiedValue, ParseError<'i>> {
5237            <specified::BorderCornerRadius as crate::parser::Parse>::parse(context, input)
5238        }
5239    
5240        
5241        #[allow(unused_variables)]
5242        pub unsafe fn cascade_property(
5243            declaration: &PropertyDeclaration,
5244            context: &mut computed::Context,
5245        ) {
5246            declaration.debug_crash("Should physicalize before entering here");
5247        }
5248
5249        pub fn parse_declared<'i, 't>(
5250            context: &ParserContext,
5251            input: &mut Parser<'i, 't>,
5252        ) -> Result<PropertyDeclaration, ParseError<'i>> {
5253                parse(context, input)
5254                .map(Box::new)
5255                .map(PropertyDeclaration::BorderEndEndRadius)
5256        }
5257    }
5258
5259
5260
5261
5262    
5263
5264    
5265        
5266    
5267
5268
5269
5270    
5271
5272    
5273        
5274    
5275
5276
5277
5278    
5279        
5280    
5281    /// https://drafts.csswg.org/css-backgrounds/#the-background-image
5282    pub mod border_image_source {
5283        #[allow(unused_imports)]
5284        use cssparser::{Parser, BasicParseError, Token};
5285        #[allow(unused_imports)]
5286        use crate::parser::{Parse, ParserContext};
5287        #[allow(unused_imports)]
5288        use crate::properties::{UnparsedValue, ShorthandId};
5289        #[allow(unused_imports)]
5290        use crate::error_reporting::ParseErrorReporter;
5291        #[allow(unused_imports)]
5292        use crate::properties::longhands;
5293        #[allow(unused_imports)]
5294        use crate::properties::{LonghandId, LonghandIdSet};
5295        #[allow(unused_imports)]
5296        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
5297        #[allow(unused_imports)]
5298        use crate::properties::style_structs;
5299        #[allow(unused_imports)]
5300        use selectors::parser::SelectorParseErrorKind;
5301        #[allow(unused_imports)]
5302        use servo_arc::Arc;
5303        #[allow(unused_imports)]
5304        use style_traits::{ParseError, StyleParseErrorKind};
5305        #[allow(unused_imports)]
5306        use crate::values::computed::{Context, ToComputedValue};
5307        #[allow(unused_imports)]
5308        use crate::values::{computed, generics, specified};
5309        #[allow(unused_imports)]
5310        use crate::Atom;
5311        
5312            
5313        #[allow(unused_imports)]
5314        use app_units::Au;
5315        #[allow(unused_imports)]
5316        use crate::values::specified::AllowQuirks;
5317        #[allow(unused_imports)]
5318        use crate::Zero;
5319        #[allow(unused_imports)]
5320        use smallvec::SmallVec;
5321        pub use crate::values::specified::Image as SpecifiedValue;
5322        pub mod computed_value {
5323            pub use crate::values::computed::Image as T;
5324        }
5325        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Image::None }
5326        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::Image::None }
5327        #[allow(unused_variables)]
5328        #[inline]
5329        pub fn parse<'i, 't>(
5330            context: &ParserContext,
5331            input: &mut Parser<'i, 't>,
5332        ) -> Result<SpecifiedValue, ParseError<'i>> {
5333            <specified::Image as crate::parser::Parse>::parse(context, input)
5334        }
5335    
5336        
5337        #[allow(unused_variables)]
5338        pub unsafe fn cascade_property(
5339            declaration: &PropertyDeclaration,
5340            context: &mut computed::Context,
5341        ) {
5342            context.for_non_inherited_property = true;
5343            debug_assert_eq!(
5344                declaration.id().as_longhand().unwrap(),
5345                LonghandId::BorderImageSource,
5346            );
5347            let specified_value = match *declaration {
5348                PropertyDeclaration::CSSWideKeyword(ref wk) => {
5349                    match wk.keyword {
5350                        CSSWideKeyword::Unset |
5351                        CSSWideKeyword::Initial => {
5352                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
5353                        },
5354                        CSSWideKeyword::Inherit => {
5355                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
5356                                context.builder.inherit_border_image_source();
5357                        }
5358                        CSSWideKeyword::RevertLayer |
5359                        CSSWideKeyword::Revert => {
5360                            declaration.debug_crash("Found revert/revert-layer not dealt with");
5361                        },
5362                    }
5363                    return;
5364                },
5365                #[cfg(debug_assertions)]
5366                PropertyDeclaration::WithVariables(..) => {
5367                    declaration.debug_crash("Found variables not substituted");
5368                    return;
5369                },
5370                _ => unsafe {
5371                    declaration.unchecked_value_as::<crate::values::specified::Image>()
5372                },
5373            };
5374
5375
5376                let computed = specified_value.to_computed_value(context);
5377                context.builder.set_border_image_source(computed)
5378        }
5379
5380        pub fn parse_declared<'i, 't>(
5381            context: &ParserContext,
5382            input: &mut Parser<'i, 't>,
5383        ) -> Result<PropertyDeclaration, ParseError<'i>> {
5384                parse(context, input)
5385                .map(PropertyDeclaration::BorderImageSource)
5386        }
5387    }
5388
5389
5390
5391
5392    
5393        
5394    
5395    /// https://drafts.csswg.org/css-backgrounds/#border-image-outset
5396    pub mod border_image_outset {
5397        #[allow(unused_imports)]
5398        use cssparser::{Parser, BasicParseError, Token};
5399        #[allow(unused_imports)]
5400        use crate::parser::{Parse, ParserContext};
5401        #[allow(unused_imports)]
5402        use crate::properties::{UnparsedValue, ShorthandId};
5403        #[allow(unused_imports)]
5404        use crate::error_reporting::ParseErrorReporter;
5405        #[allow(unused_imports)]
5406        use crate::properties::longhands;
5407        #[allow(unused_imports)]
5408        use crate::properties::{LonghandId, LonghandIdSet};
5409        #[allow(unused_imports)]
5410        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
5411        #[allow(unused_imports)]
5412        use crate::properties::style_structs;
5413        #[allow(unused_imports)]
5414        use selectors::parser::SelectorParseErrorKind;
5415        #[allow(unused_imports)]
5416        use servo_arc::Arc;
5417        #[allow(unused_imports)]
5418        use style_traits::{ParseError, StyleParseErrorKind};
5419        #[allow(unused_imports)]
5420        use crate::values::computed::{Context, ToComputedValue};
5421        #[allow(unused_imports)]
5422        use crate::values::{computed, generics, specified};
5423        #[allow(unused_imports)]
5424        use crate::Atom;
5425        
5426            
5427        #[allow(unused_imports)]
5428        use app_units::Au;
5429        #[allow(unused_imports)]
5430        use crate::values::specified::AllowQuirks;
5431        #[allow(unused_imports)]
5432        use crate::Zero;
5433        #[allow(unused_imports)]
5434        use smallvec::SmallVec;
5435        pub use crate::values::specified::NonNegativeLengthOrNumberRect as SpecifiedValue;
5436        pub mod computed_value {
5437            pub use crate::values::computed::NonNegativeLengthOrNumberRect as T;
5438        }
5439        #[inline] pub fn get_initial_value() -> computed_value::T { generics::rect::Rect::all(computed::NonNegativeLengthOrNumber::zero()) }
5440        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { generics::rect::Rect::all(specified::NonNegativeLengthOrNumber::zero()) }
5441        #[allow(unused_variables)]
5442        #[inline]
5443        pub fn parse<'i, 't>(
5444            context: &ParserContext,
5445            input: &mut Parser<'i, 't>,
5446        ) -> Result<SpecifiedValue, ParseError<'i>> {
5447            <specified::NonNegativeLengthOrNumberRect as crate::parser::Parse>::parse(context, input)
5448        }
5449    
5450        
5451        #[allow(unused_variables)]
5452        pub unsafe fn cascade_property(
5453            declaration: &PropertyDeclaration,
5454            context: &mut computed::Context,
5455        ) {
5456            context.for_non_inherited_property = true;
5457            debug_assert_eq!(
5458                declaration.id().as_longhand().unwrap(),
5459                LonghandId::BorderImageOutset,
5460            );
5461            let specified_value = match *declaration {
5462                PropertyDeclaration::CSSWideKeyword(ref wk) => {
5463                    match wk.keyword {
5464                        CSSWideKeyword::Unset |
5465                        CSSWideKeyword::Initial => {
5466                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
5467                        },
5468                        CSSWideKeyword::Inherit => {
5469                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
5470                                if !context.builder.effective_zoom_for_inheritance.is_one() {
5471                                    let old_zoom = context.builder.effective_zoom;
5472                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
5473                                    let computed = context.builder.inherited_style.clone_border_image_outset();
5474                                    let specified = ToComputedValue::from_computed_value(&computed);
5475                                    let specified = Box::new(specified);
5476                                    let decl = PropertyDeclaration::BorderImageOutset(specified);
5477                                    cascade_property(&decl, context);
5478                                    context.builder.effective_zoom = old_zoom;
5479                                    return;
5480                                }
5481                                context.builder.inherit_border_image_outset();
5482                        }
5483                        CSSWideKeyword::RevertLayer |
5484                        CSSWideKeyword::Revert => {
5485                            declaration.debug_crash("Found revert/revert-layer not dealt with");
5486                        },
5487                    }
5488                    return;
5489                },
5490                #[cfg(debug_assertions)]
5491                PropertyDeclaration::WithVariables(..) => {
5492                    declaration.debug_crash("Found variables not substituted");
5493                    return;
5494                },
5495                _ => unsafe {
5496                    declaration.unchecked_value_as::<Box<crate::values::specified::NonNegativeLengthOrNumberRect>>()
5497                },
5498            };
5499
5500
5501                let computed = (**specified_value).to_computed_value(context);
5502                context.builder.set_border_image_outset(computed)
5503        }
5504
5505        pub fn parse_declared<'i, 't>(
5506            context: &ParserContext,
5507            input: &mut Parser<'i, 't>,
5508        ) -> Result<PropertyDeclaration, ParseError<'i>> {
5509                parse(context, input)
5510                .map(Box::new)
5511                .map(PropertyDeclaration::BorderImageOutset)
5512        }
5513    }
5514
5515
5516
5517
5518    
5519        
5520    
5521    /// https://drafts.csswg.org/css-backgrounds/#the-border-image-repeat
5522    pub mod border_image_repeat {
5523        #[allow(unused_imports)]
5524        use cssparser::{Parser, BasicParseError, Token};
5525        #[allow(unused_imports)]
5526        use crate::parser::{Parse, ParserContext};
5527        #[allow(unused_imports)]
5528        use crate::properties::{UnparsedValue, ShorthandId};
5529        #[allow(unused_imports)]
5530        use crate::error_reporting::ParseErrorReporter;
5531        #[allow(unused_imports)]
5532        use crate::properties::longhands;
5533        #[allow(unused_imports)]
5534        use crate::properties::{LonghandId, LonghandIdSet};
5535        #[allow(unused_imports)]
5536        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
5537        #[allow(unused_imports)]
5538        use crate::properties::style_structs;
5539        #[allow(unused_imports)]
5540        use selectors::parser::SelectorParseErrorKind;
5541        #[allow(unused_imports)]
5542        use servo_arc::Arc;
5543        #[allow(unused_imports)]
5544        use style_traits::{ParseError, StyleParseErrorKind};
5545        #[allow(unused_imports)]
5546        use crate::values::computed::{Context, ToComputedValue};
5547        #[allow(unused_imports)]
5548        use crate::values::{computed, generics, specified};
5549        #[allow(unused_imports)]
5550        use crate::Atom;
5551        
5552            
5553        #[allow(unused_imports)]
5554        use app_units::Au;
5555        #[allow(unused_imports)]
5556        use crate::values::specified::AllowQuirks;
5557        #[allow(unused_imports)]
5558        use crate::Zero;
5559        #[allow(unused_imports)]
5560        use smallvec::SmallVec;
5561        pub use crate::values::specified::BorderImageRepeat as SpecifiedValue;
5562        pub mod computed_value {
5563            pub use crate::values::computed::BorderImageRepeat as T;
5564        }
5565        #[inline] pub fn get_initial_value() -> computed_value::T { computed::BorderImageRepeat::stretch() }
5566        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::BorderImageRepeat::stretch() }
5567        #[allow(unused_variables)]
5568        #[inline]
5569        pub fn parse<'i, 't>(
5570            context: &ParserContext,
5571            input: &mut Parser<'i, 't>,
5572        ) -> Result<SpecifiedValue, ParseError<'i>> {
5573            <specified::BorderImageRepeat as crate::parser::Parse>::parse(context, input)
5574        }
5575    
5576        
5577        #[allow(unused_variables)]
5578        pub unsafe fn cascade_property(
5579            declaration: &PropertyDeclaration,
5580            context: &mut computed::Context,
5581        ) {
5582            context.for_non_inherited_property = true;
5583            debug_assert_eq!(
5584                declaration.id().as_longhand().unwrap(),
5585                LonghandId::BorderImageRepeat,
5586            );
5587            let specified_value = match *declaration {
5588                PropertyDeclaration::CSSWideKeyword(ref wk) => {
5589                    match wk.keyword {
5590                        CSSWideKeyword::Unset |
5591                        CSSWideKeyword::Initial => {
5592                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
5593                        },
5594                        CSSWideKeyword::Inherit => {
5595                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
5596                                context.builder.inherit_border_image_repeat();
5597                        }
5598                        CSSWideKeyword::RevertLayer |
5599                        CSSWideKeyword::Revert => {
5600                            declaration.debug_crash("Found revert/revert-layer not dealt with");
5601                        },
5602                    }
5603                    return;
5604                },
5605                #[cfg(debug_assertions)]
5606                PropertyDeclaration::WithVariables(..) => {
5607                    declaration.debug_crash("Found variables not substituted");
5608                    return;
5609                },
5610                _ => unsafe {
5611                    declaration.unchecked_value_as::<crate::values::specified::BorderImageRepeat>()
5612                },
5613            };
5614
5615
5616                let computed = specified_value.to_computed_value(context);
5617                context.builder.set_border_image_repeat(computed)
5618        }
5619
5620        pub fn parse_declared<'i, 't>(
5621            context: &ParserContext,
5622            input: &mut Parser<'i, 't>,
5623        ) -> Result<PropertyDeclaration, ParseError<'i>> {
5624                parse(context, input)
5625                .map(PropertyDeclaration::BorderImageRepeat)
5626        }
5627    }
5628
5629
5630
5631
5632    
5633        
5634    
5635    /// https://drafts.csswg.org/css-backgrounds/#border-image-width
5636    pub mod border_image_width {
5637        #[allow(unused_imports)]
5638        use cssparser::{Parser, BasicParseError, Token};
5639        #[allow(unused_imports)]
5640        use crate::parser::{Parse, ParserContext};
5641        #[allow(unused_imports)]
5642        use crate::properties::{UnparsedValue, ShorthandId};
5643        #[allow(unused_imports)]
5644        use crate::error_reporting::ParseErrorReporter;
5645        #[allow(unused_imports)]
5646        use crate::properties::longhands;
5647        #[allow(unused_imports)]
5648        use crate::properties::{LonghandId, LonghandIdSet};
5649        #[allow(unused_imports)]
5650        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
5651        #[allow(unused_imports)]
5652        use crate::properties::style_structs;
5653        #[allow(unused_imports)]
5654        use selectors::parser::SelectorParseErrorKind;
5655        #[allow(unused_imports)]
5656        use servo_arc::Arc;
5657        #[allow(unused_imports)]
5658        use style_traits::{ParseError, StyleParseErrorKind};
5659        #[allow(unused_imports)]
5660        use crate::values::computed::{Context, ToComputedValue};
5661        #[allow(unused_imports)]
5662        use crate::values::{computed, generics, specified};
5663        #[allow(unused_imports)]
5664        use crate::Atom;
5665        
5666            
5667        #[allow(unused_imports)]
5668        use app_units::Au;
5669        #[allow(unused_imports)]
5670        use crate::values::specified::AllowQuirks;
5671        #[allow(unused_imports)]
5672        use crate::Zero;
5673        #[allow(unused_imports)]
5674        use smallvec::SmallVec;
5675        pub use crate::values::specified::BorderImageWidth as SpecifiedValue;
5676        pub mod computed_value {
5677            pub use crate::values::computed::BorderImageWidth as T;
5678        }
5679        #[inline] pub fn get_initial_value() -> computed_value::T { computed::BorderImageWidth::all(computed::BorderImageSideWidth::one()) }
5680        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::BorderImageWidth::all(specified::BorderImageSideWidth::one()) }
5681        #[allow(unused_variables)]
5682        #[inline]
5683        pub fn parse<'i, 't>(
5684            context: &ParserContext,
5685            input: &mut Parser<'i, 't>,
5686        ) -> Result<SpecifiedValue, ParseError<'i>> {
5687            <specified::BorderImageWidth as crate::parser::Parse>::parse(context, input)
5688        }
5689    
5690        
5691        #[allow(unused_variables)]
5692        pub unsafe fn cascade_property(
5693            declaration: &PropertyDeclaration,
5694            context: &mut computed::Context,
5695        ) {
5696            context.for_non_inherited_property = true;
5697            debug_assert_eq!(
5698                declaration.id().as_longhand().unwrap(),
5699                LonghandId::BorderImageWidth,
5700            );
5701            let specified_value = match *declaration {
5702                PropertyDeclaration::CSSWideKeyword(ref wk) => {
5703                    match wk.keyword {
5704                        CSSWideKeyword::Unset |
5705                        CSSWideKeyword::Initial => {
5706                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
5707                        },
5708                        CSSWideKeyword::Inherit => {
5709                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
5710                                context.builder.inherit_border_image_width();
5711                        }
5712                        CSSWideKeyword::RevertLayer |
5713                        CSSWideKeyword::Revert => {
5714                            declaration.debug_crash("Found revert/revert-layer not dealt with");
5715                        },
5716                    }
5717                    return;
5718                },
5719                #[cfg(debug_assertions)]
5720                PropertyDeclaration::WithVariables(..) => {
5721                    declaration.debug_crash("Found variables not substituted");
5722                    return;
5723                },
5724                _ => unsafe {
5725                    declaration.unchecked_value_as::<Box<crate::values::specified::BorderImageWidth>>()
5726                },
5727            };
5728
5729
5730                let computed = (**specified_value).to_computed_value(context);
5731                context.builder.set_border_image_width(computed)
5732        }
5733
5734        pub fn parse_declared<'i, 't>(
5735            context: &ParserContext,
5736            input: &mut Parser<'i, 't>,
5737        ) -> Result<PropertyDeclaration, ParseError<'i>> {
5738                parse(context, input)
5739                .map(Box::new)
5740                .map(PropertyDeclaration::BorderImageWidth)
5741        }
5742    }
5743
5744
5745
5746
5747    
5748        
5749    
5750    /// https://drafts.csswg.org/css-backgrounds/#border-image-slice
5751    pub mod border_image_slice {
5752        #[allow(unused_imports)]
5753        use cssparser::{Parser, BasicParseError, Token};
5754        #[allow(unused_imports)]
5755        use crate::parser::{Parse, ParserContext};
5756        #[allow(unused_imports)]
5757        use crate::properties::{UnparsedValue, ShorthandId};
5758        #[allow(unused_imports)]
5759        use crate::error_reporting::ParseErrorReporter;
5760        #[allow(unused_imports)]
5761        use crate::properties::longhands;
5762        #[allow(unused_imports)]
5763        use crate::properties::{LonghandId, LonghandIdSet};
5764        #[allow(unused_imports)]
5765        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
5766        #[allow(unused_imports)]
5767        use crate::properties::style_structs;
5768        #[allow(unused_imports)]
5769        use selectors::parser::SelectorParseErrorKind;
5770        #[allow(unused_imports)]
5771        use servo_arc::Arc;
5772        #[allow(unused_imports)]
5773        use style_traits::{ParseError, StyleParseErrorKind};
5774        #[allow(unused_imports)]
5775        use crate::values::computed::{Context, ToComputedValue};
5776        #[allow(unused_imports)]
5777        use crate::values::{computed, generics, specified};
5778        #[allow(unused_imports)]
5779        use crate::Atom;
5780        
5781            
5782        #[allow(unused_imports)]
5783        use app_units::Au;
5784        #[allow(unused_imports)]
5785        use crate::values::specified::AllowQuirks;
5786        #[allow(unused_imports)]
5787        use crate::Zero;
5788        #[allow(unused_imports)]
5789        use smallvec::SmallVec;
5790        pub use crate::values::specified::BorderImageSlice as SpecifiedValue;
5791        pub mod computed_value {
5792            pub use crate::values::computed::BorderImageSlice as T;
5793        }
5794        #[inline] pub fn get_initial_value() -> computed_value::T { computed::BorderImageSlice::hundred_percent() }
5795        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::BorderImageSlice::hundred_percent() }
5796        #[allow(unused_variables)]
5797        #[inline]
5798        pub fn parse<'i, 't>(
5799            context: &ParserContext,
5800            input: &mut Parser<'i, 't>,
5801        ) -> Result<SpecifiedValue, ParseError<'i>> {
5802            <specified::BorderImageSlice as crate::parser::Parse>::parse(context, input)
5803        }
5804    
5805        
5806        #[allow(unused_variables)]
5807        pub unsafe fn cascade_property(
5808            declaration: &PropertyDeclaration,
5809            context: &mut computed::Context,
5810        ) {
5811            context.for_non_inherited_property = true;
5812            debug_assert_eq!(
5813                declaration.id().as_longhand().unwrap(),
5814                LonghandId::BorderImageSlice,
5815            );
5816            let specified_value = match *declaration {
5817                PropertyDeclaration::CSSWideKeyword(ref wk) => {
5818                    match wk.keyword {
5819                        CSSWideKeyword::Unset |
5820                        CSSWideKeyword::Initial => {
5821                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
5822                        },
5823                        CSSWideKeyword::Inherit => {
5824                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
5825                                context.builder.inherit_border_image_slice();
5826                        }
5827                        CSSWideKeyword::RevertLayer |
5828                        CSSWideKeyword::Revert => {
5829                            declaration.debug_crash("Found revert/revert-layer not dealt with");
5830                        },
5831                    }
5832                    return;
5833                },
5834                #[cfg(debug_assertions)]
5835                PropertyDeclaration::WithVariables(..) => {
5836                    declaration.debug_crash("Found variables not substituted");
5837                    return;
5838                },
5839                _ => unsafe {
5840                    declaration.unchecked_value_as::<Box<crate::values::specified::BorderImageSlice>>()
5841                },
5842            };
5843
5844
5845                let computed = (**specified_value).to_computed_value(context);
5846                context.builder.set_border_image_slice(computed)
5847        }
5848
5849        pub fn parse_declared<'i, 't>(
5850            context: &ParserContext,
5851            input: &mut Parser<'i, 't>,
5852        ) -> Result<PropertyDeclaration, ParseError<'i>> {
5853                parse(context, input)
5854                .map(Box::new)
5855                .map(PropertyDeclaration::BorderImageSlice)
5856        }
5857    }
5858
5859
5860
5861    
5862    /* This Source Code Form is subject to the terms of the Mozilla Public
5863 * License, v. 2.0. If a copy of the MPL was not distributed with this
5864 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
5865
5866
5867
5868
5869
5870    
5871        
5872    
5873    /// https://drafts.csswg.org/css-display/#propdef-display
5874    pub mod display {
5875        #[allow(unused_imports)]
5876        use cssparser::{Parser, BasicParseError, Token};
5877        #[allow(unused_imports)]
5878        use crate::parser::{Parse, ParserContext};
5879        #[allow(unused_imports)]
5880        use crate::properties::{UnparsedValue, ShorthandId};
5881        #[allow(unused_imports)]
5882        use crate::error_reporting::ParseErrorReporter;
5883        #[allow(unused_imports)]
5884        use crate::properties::longhands;
5885        #[allow(unused_imports)]
5886        use crate::properties::{LonghandId, LonghandIdSet};
5887        #[allow(unused_imports)]
5888        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
5889        #[allow(unused_imports)]
5890        use crate::properties::style_structs;
5891        #[allow(unused_imports)]
5892        use selectors::parser::SelectorParseErrorKind;
5893        #[allow(unused_imports)]
5894        use servo_arc::Arc;
5895        #[allow(unused_imports)]
5896        use style_traits::{ParseError, StyleParseErrorKind};
5897        #[allow(unused_imports)]
5898        use crate::values::computed::{Context, ToComputedValue};
5899        #[allow(unused_imports)]
5900        use crate::values::{computed, generics, specified};
5901        #[allow(unused_imports)]
5902        use crate::Atom;
5903        
5904            
5905        #[allow(unused_imports)]
5906        use app_units::Au;
5907        #[allow(unused_imports)]
5908        use crate::values::specified::AllowQuirks;
5909        #[allow(unused_imports)]
5910        use crate::Zero;
5911        #[allow(unused_imports)]
5912        use smallvec::SmallVec;
5913        pub use crate::values::specified::Display as SpecifiedValue;
5914        pub mod computed_value {
5915            pub use crate::values::computed::Display as T;
5916        }
5917        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Display::inline() }
5918        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::Display::inline() }
5919        #[allow(unused_variables)]
5920        #[inline]
5921        pub fn parse<'i, 't>(
5922            context: &ParserContext,
5923            input: &mut Parser<'i, 't>,
5924        ) -> Result<SpecifiedValue, ParseError<'i>> {
5925            <specified::Display as crate::parser::Parse>::parse(context, input)
5926        }
5927    
5928        
5929        #[allow(unused_variables)]
5930        pub unsafe fn cascade_property(
5931            declaration: &PropertyDeclaration,
5932            context: &mut computed::Context,
5933        ) {
5934            context.for_non_inherited_property = true;
5935            debug_assert_eq!(
5936                declaration.id().as_longhand().unwrap(),
5937                LonghandId::Display,
5938            );
5939            let specified_value = match *declaration {
5940                PropertyDeclaration::CSSWideKeyword(ref wk) => {
5941                    match wk.keyword {
5942                        CSSWideKeyword::Unset |
5943                        CSSWideKeyword::Initial => {
5944                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
5945                        },
5946                        CSSWideKeyword::Inherit => {
5947                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
5948                                context.builder.inherit_display();
5949                        }
5950                        CSSWideKeyword::RevertLayer |
5951                        CSSWideKeyword::Revert => {
5952                            declaration.debug_crash("Found revert/revert-layer not dealt with");
5953                        },
5954                    }
5955                    return;
5956                },
5957                #[cfg(debug_assertions)]
5958                PropertyDeclaration::WithVariables(..) => {
5959                    declaration.debug_crash("Found variables not substituted");
5960                    return;
5961                },
5962                _ => unsafe {
5963                    declaration.unchecked_value_as::<crate::values::specified::Display>()
5964                },
5965            };
5966
5967
5968                let computed = specified_value.to_computed_value(context);
5969                context.builder.set_display(computed)
5970        }
5971
5972        pub fn parse_declared<'i, 't>(
5973            context: &ParserContext,
5974            input: &mut Parser<'i, 't>,
5975        ) -> Result<PropertyDeclaration, ParseError<'i>> {
5976                parse(context, input)
5977                .map(PropertyDeclaration::Display)
5978        }
5979    }
5980
5981
5982
5983
5984    
5985
5986    
5987        
5988    
5989
5990
5991// An internal-only property for elements in a top layer
5992// https://fullscreen.spec.whatwg.org/#top-layer
5993
5994    
5995
5996    
5997        
5998    
5999    /// Internal (not web-exposed)
6000    pub mod _servo_top_layer {
6001        #[allow(unused_imports)]
6002        use cssparser::{Parser, BasicParseError, Token};
6003        #[allow(unused_imports)]
6004        use crate::parser::{Parse, ParserContext};
6005        #[allow(unused_imports)]
6006        use crate::properties::{UnparsedValue, ShorthandId};
6007        #[allow(unused_imports)]
6008        use crate::error_reporting::ParseErrorReporter;
6009        #[allow(unused_imports)]
6010        use crate::properties::longhands;
6011        #[allow(unused_imports)]
6012        use crate::properties::{LonghandId, LonghandIdSet};
6013        #[allow(unused_imports)]
6014        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
6015        #[allow(unused_imports)]
6016        use crate::properties::style_structs;
6017        #[allow(unused_imports)]
6018        use selectors::parser::SelectorParseErrorKind;
6019        #[allow(unused_imports)]
6020        use servo_arc::Arc;
6021        #[allow(unused_imports)]
6022        use style_traits::{ParseError, StyleParseErrorKind};
6023        #[allow(unused_imports)]
6024        use crate::values::computed::{Context, ToComputedValue};
6025        #[allow(unused_imports)]
6026        use crate::values::{computed, generics, specified};
6027        #[allow(unused_imports)]
6028        use crate::Atom;
6029        
6030            
6031        pub use self::computed_value::T as SpecifiedValue;
6032        pub mod computed_value {
6033            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
6034            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
6035            pub enum T {
6036            
6037            None,
6038            
6039            Top,
6040            }
6041        }
6042        #[inline]
6043        pub fn get_initial_value() -> computed_value::T {
6044            computed_value::T::None
6045        }
6046        #[inline]
6047        pub fn get_initial_specified_value() -> SpecifiedValue {
6048            SpecifiedValue::None
6049        }
6050        #[inline]
6051        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
6052                             -> Result<SpecifiedValue, ParseError<'i>> {
6053            SpecifiedValue::parse(input)
6054        }
6055
6056    
6057        
6058        #[allow(unused_variables)]
6059        pub unsafe fn cascade_property(
6060            declaration: &PropertyDeclaration,
6061            context: &mut computed::Context,
6062        ) {
6063            context.for_non_inherited_property = true;
6064            debug_assert_eq!(
6065                declaration.id().as_longhand().unwrap(),
6066                LonghandId::ServoTopLayer,
6067            );
6068            let specified_value = match *declaration {
6069                PropertyDeclaration::CSSWideKeyword(ref wk) => {
6070                    match wk.keyword {
6071                        CSSWideKeyword::Unset |
6072                        CSSWideKeyword::Initial => {
6073                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
6074                        },
6075                        CSSWideKeyword::Inherit => {
6076                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
6077                                context.builder.inherit__servo_top_layer();
6078                        }
6079                        CSSWideKeyword::RevertLayer |
6080                        CSSWideKeyword::Revert => {
6081                            declaration.debug_crash("Found revert/revert-layer not dealt with");
6082                        },
6083                    }
6084                    return;
6085                },
6086                #[cfg(debug_assertions)]
6087                PropertyDeclaration::WithVariables(..) => {
6088                    declaration.debug_crash("Found variables not substituted");
6089                    return;
6090                },
6091                _ => unsafe {
6092                    declaration.unchecked_value_as::<longhands::_servo_top_layer::SpecifiedValue>()
6093                },
6094            };
6095
6096
6097                let computed = specified_value.to_computed_value(context);
6098                context.builder.set__servo_top_layer(computed)
6099        }
6100
6101        pub fn parse_declared<'i, 't>(
6102            context: &ParserContext,
6103            input: &mut Parser<'i, 't>,
6104        ) -> Result<PropertyDeclaration, ParseError<'i>> {
6105                parse(context, input)
6106                .map(PropertyDeclaration::ServoTopLayer)
6107        }
6108    }
6109
6110
6111
6112
6113    
6114        
6115    
6116    /// https://drafts.csswg.org/css-position/#position-property
6117    pub mod position {
6118        #[allow(unused_imports)]
6119        use cssparser::{Parser, BasicParseError, Token};
6120        #[allow(unused_imports)]
6121        use crate::parser::{Parse, ParserContext};
6122        #[allow(unused_imports)]
6123        use crate::properties::{UnparsedValue, ShorthandId};
6124        #[allow(unused_imports)]
6125        use crate::error_reporting::ParseErrorReporter;
6126        #[allow(unused_imports)]
6127        use crate::properties::longhands;
6128        #[allow(unused_imports)]
6129        use crate::properties::{LonghandId, LonghandIdSet};
6130        #[allow(unused_imports)]
6131        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
6132        #[allow(unused_imports)]
6133        use crate::properties::style_structs;
6134        #[allow(unused_imports)]
6135        use selectors::parser::SelectorParseErrorKind;
6136        #[allow(unused_imports)]
6137        use servo_arc::Arc;
6138        #[allow(unused_imports)]
6139        use style_traits::{ParseError, StyleParseErrorKind};
6140        #[allow(unused_imports)]
6141        use crate::values::computed::{Context, ToComputedValue};
6142        #[allow(unused_imports)]
6143        use crate::values::{computed, generics, specified};
6144        #[allow(unused_imports)]
6145        use crate::Atom;
6146        
6147            
6148        #[allow(unused_imports)]
6149        use app_units::Au;
6150        #[allow(unused_imports)]
6151        use crate::values::specified::AllowQuirks;
6152        #[allow(unused_imports)]
6153        use crate::Zero;
6154        #[allow(unused_imports)]
6155        use smallvec::SmallVec;
6156        pub use crate::values::specified::PositionProperty as SpecifiedValue;
6157        pub mod computed_value {
6158            pub use crate::values::computed::PositionProperty as T;
6159        }
6160        #[inline] pub fn get_initial_value() -> computed_value::T { computed::PositionProperty::Static }
6161        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::PositionProperty::Static }
6162        #[allow(unused_variables)]
6163        #[inline]
6164        pub fn parse<'i, 't>(
6165            context: &ParserContext,
6166            input: &mut Parser<'i, 't>,
6167        ) -> Result<SpecifiedValue, ParseError<'i>> {
6168            <specified::PositionProperty as crate::parser::Parse>::parse(context, input)
6169        }
6170    
6171        
6172        #[allow(unused_variables)]
6173        pub unsafe fn cascade_property(
6174            declaration: &PropertyDeclaration,
6175            context: &mut computed::Context,
6176        ) {
6177            context.for_non_inherited_property = true;
6178            debug_assert_eq!(
6179                declaration.id().as_longhand().unwrap(),
6180                LonghandId::Position,
6181            );
6182            let specified_value = match *declaration {
6183                PropertyDeclaration::CSSWideKeyword(ref wk) => {
6184                    match wk.keyword {
6185                        CSSWideKeyword::Unset |
6186                        CSSWideKeyword::Initial => {
6187                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
6188                        },
6189                        CSSWideKeyword::Inherit => {
6190                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
6191                                context.builder.inherit_position();
6192                        }
6193                        CSSWideKeyword::RevertLayer |
6194                        CSSWideKeyword::Revert => {
6195                            declaration.debug_crash("Found revert/revert-layer not dealt with");
6196                        },
6197                    }
6198                    return;
6199                },
6200                #[cfg(debug_assertions)]
6201                PropertyDeclaration::WithVariables(..) => {
6202                    declaration.debug_crash("Found variables not substituted");
6203                    return;
6204                },
6205                _ => unsafe {
6206                    declaration.unchecked_value_as::<crate::values::specified::PositionProperty>()
6207                },
6208            };
6209
6210
6211                let computed = specified_value.to_computed_value(context);
6212                context.builder.set_position(computed)
6213        }
6214
6215        pub fn parse_declared<'i, 't>(
6216            context: &ParserContext,
6217            input: &mut Parser<'i, 't>,
6218        ) -> Result<PropertyDeclaration, ParseError<'i>> {
6219                parse(context, input)
6220                .map(PropertyDeclaration::Position)
6221        }
6222    }
6223
6224
6225
6226// Changes do not invalidate our element. We handle notify/invalidating
6227// elements that reference anchor-name elsewhere.
6228
6229    
6230        
6231    
6232
6233
6234// Changes do not invalidate our element. We handle notify/invalidating
6235// any affected descendants elsewhere.
6236
6237    
6238        
6239    
6240
6241
6242
6243    
6244        
6245    
6246    /// https://drafts.csswg.org/css-box/#propdef-float
6247    pub mod float {
6248        #[allow(unused_imports)]
6249        use cssparser::{Parser, BasicParseError, Token};
6250        #[allow(unused_imports)]
6251        use crate::parser::{Parse, ParserContext};
6252        #[allow(unused_imports)]
6253        use crate::properties::{UnparsedValue, ShorthandId};
6254        #[allow(unused_imports)]
6255        use crate::error_reporting::ParseErrorReporter;
6256        #[allow(unused_imports)]
6257        use crate::properties::longhands;
6258        #[allow(unused_imports)]
6259        use crate::properties::{LonghandId, LonghandIdSet};
6260        #[allow(unused_imports)]
6261        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
6262        #[allow(unused_imports)]
6263        use crate::properties::style_structs;
6264        #[allow(unused_imports)]
6265        use selectors::parser::SelectorParseErrorKind;
6266        #[allow(unused_imports)]
6267        use servo_arc::Arc;
6268        #[allow(unused_imports)]
6269        use style_traits::{ParseError, StyleParseErrorKind};
6270        #[allow(unused_imports)]
6271        use crate::values::computed::{Context, ToComputedValue};
6272        #[allow(unused_imports)]
6273        use crate::values::{computed, generics, specified};
6274        #[allow(unused_imports)]
6275        use crate::Atom;
6276        
6277            
6278        #[allow(unused_imports)]
6279        use app_units::Au;
6280        #[allow(unused_imports)]
6281        use crate::values::specified::AllowQuirks;
6282        #[allow(unused_imports)]
6283        use crate::Zero;
6284        #[allow(unused_imports)]
6285        use smallvec::SmallVec;
6286        pub use crate::values::specified::Float as SpecifiedValue;
6287        pub mod computed_value {
6288            pub use crate::values::computed::Float as T;
6289        }
6290        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Float::None }
6291        #[allow(unused_variables)]
6292        #[inline]
6293        pub fn parse<'i, 't>(
6294            context: &ParserContext,
6295            input: &mut Parser<'i, 't>,
6296        ) -> Result<SpecifiedValue, ParseError<'i>> {
6297            <specified::Float as crate::parser::Parse>::parse(context, input)
6298        }
6299    
6300        
6301        #[allow(unused_variables)]
6302        pub unsafe fn cascade_property(
6303            declaration: &PropertyDeclaration,
6304            context: &mut computed::Context,
6305        ) {
6306            context.for_non_inherited_property = true;
6307            debug_assert_eq!(
6308                declaration.id().as_longhand().unwrap(),
6309                LonghandId::Float,
6310            );
6311            let specified_value = match *declaration {
6312                PropertyDeclaration::CSSWideKeyword(ref wk) => {
6313                    match wk.keyword {
6314                        CSSWideKeyword::Unset |
6315                        CSSWideKeyword::Initial => {
6316                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
6317                        },
6318                        CSSWideKeyword::Inherit => {
6319                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
6320                                context.builder.inherit_float();
6321                        }
6322                        CSSWideKeyword::RevertLayer |
6323                        CSSWideKeyword::Revert => {
6324                            declaration.debug_crash("Found revert/revert-layer not dealt with");
6325                        },
6326                    }
6327                    return;
6328                },
6329                #[cfg(debug_assertions)]
6330                PropertyDeclaration::WithVariables(..) => {
6331                    declaration.debug_crash("Found variables not substituted");
6332                    return;
6333                },
6334                _ => unsafe {
6335                    declaration.unchecked_value_as::<crate::values::specified::Float>()
6336                },
6337            };
6338
6339
6340                let computed = specified_value.to_computed_value(context);
6341                context.builder.set_float(computed)
6342        }
6343
6344        pub fn parse_declared<'i, 't>(
6345            context: &ParserContext,
6346            input: &mut Parser<'i, 't>,
6347        ) -> Result<PropertyDeclaration, ParseError<'i>> {
6348                parse(context, input)
6349                .map(PropertyDeclaration::Float)
6350        }
6351    }
6352
6353
6354
6355
6356    
6357        
6358    
6359    /// https://drafts.csswg.org/css2/#propdef-clear
6360    pub mod clear {
6361        #[allow(unused_imports)]
6362        use cssparser::{Parser, BasicParseError, Token};
6363        #[allow(unused_imports)]
6364        use crate::parser::{Parse, ParserContext};
6365        #[allow(unused_imports)]
6366        use crate::properties::{UnparsedValue, ShorthandId};
6367        #[allow(unused_imports)]
6368        use crate::error_reporting::ParseErrorReporter;
6369        #[allow(unused_imports)]
6370        use crate::properties::longhands;
6371        #[allow(unused_imports)]
6372        use crate::properties::{LonghandId, LonghandIdSet};
6373        #[allow(unused_imports)]
6374        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
6375        #[allow(unused_imports)]
6376        use crate::properties::style_structs;
6377        #[allow(unused_imports)]
6378        use selectors::parser::SelectorParseErrorKind;
6379        #[allow(unused_imports)]
6380        use servo_arc::Arc;
6381        #[allow(unused_imports)]
6382        use style_traits::{ParseError, StyleParseErrorKind};
6383        #[allow(unused_imports)]
6384        use crate::values::computed::{Context, ToComputedValue};
6385        #[allow(unused_imports)]
6386        use crate::values::{computed, generics, specified};
6387        #[allow(unused_imports)]
6388        use crate::Atom;
6389        
6390            
6391        #[allow(unused_imports)]
6392        use app_units::Au;
6393        #[allow(unused_imports)]
6394        use crate::values::specified::AllowQuirks;
6395        #[allow(unused_imports)]
6396        use crate::Zero;
6397        #[allow(unused_imports)]
6398        use smallvec::SmallVec;
6399        pub use crate::values::specified::Clear as SpecifiedValue;
6400        pub mod computed_value {
6401            pub use crate::values::computed::Clear as T;
6402        }
6403        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Clear::None }
6404        #[allow(unused_variables)]
6405        #[inline]
6406        pub fn parse<'i, 't>(
6407            context: &ParserContext,
6408            input: &mut Parser<'i, 't>,
6409        ) -> Result<SpecifiedValue, ParseError<'i>> {
6410            <specified::Clear as crate::parser::Parse>::parse(context, input)
6411        }
6412    
6413        
6414        #[allow(unused_variables)]
6415        pub unsafe fn cascade_property(
6416            declaration: &PropertyDeclaration,
6417            context: &mut computed::Context,
6418        ) {
6419            context.for_non_inherited_property = true;
6420            debug_assert_eq!(
6421                declaration.id().as_longhand().unwrap(),
6422                LonghandId::Clear,
6423            );
6424            let specified_value = match *declaration {
6425                PropertyDeclaration::CSSWideKeyword(ref wk) => {
6426                    match wk.keyword {
6427                        CSSWideKeyword::Unset |
6428                        CSSWideKeyword::Initial => {
6429                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
6430                        },
6431                        CSSWideKeyword::Inherit => {
6432                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
6433                                context.builder.inherit_clear();
6434                        }
6435                        CSSWideKeyword::RevertLayer |
6436                        CSSWideKeyword::Revert => {
6437                            declaration.debug_crash("Found revert/revert-layer not dealt with");
6438                        },
6439                    }
6440                    return;
6441                },
6442                #[cfg(debug_assertions)]
6443                PropertyDeclaration::WithVariables(..) => {
6444                    declaration.debug_crash("Found variables not substituted");
6445                    return;
6446                },
6447                _ => unsafe {
6448                    declaration.unchecked_value_as::<crate::values::specified::Clear>()
6449                },
6450            };
6451
6452
6453                let computed = specified_value.to_computed_value(context);
6454                context.builder.set_clear(computed)
6455        }
6456
6457        pub fn parse_declared<'i, 't>(
6458            context: &ParserContext,
6459            input: &mut Parser<'i, 't>,
6460        ) -> Result<PropertyDeclaration, ParseError<'i>> {
6461                parse(context, input)
6462                .map(PropertyDeclaration::Clear)
6463        }
6464    }
6465
6466
6467
6468
6469    
6470        
6471    
6472    /// https://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align
6473    pub mod vertical_align {
6474        #[allow(unused_imports)]
6475        use cssparser::{Parser, BasicParseError, Token};
6476        #[allow(unused_imports)]
6477        use crate::parser::{Parse, ParserContext};
6478        #[allow(unused_imports)]
6479        use crate::properties::{UnparsedValue, ShorthandId};
6480        #[allow(unused_imports)]
6481        use crate::error_reporting::ParseErrorReporter;
6482        #[allow(unused_imports)]
6483        use crate::properties::longhands;
6484        #[allow(unused_imports)]
6485        use crate::properties::{LonghandId, LonghandIdSet};
6486        #[allow(unused_imports)]
6487        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
6488        #[allow(unused_imports)]
6489        use crate::properties::style_structs;
6490        #[allow(unused_imports)]
6491        use selectors::parser::SelectorParseErrorKind;
6492        #[allow(unused_imports)]
6493        use servo_arc::Arc;
6494        #[allow(unused_imports)]
6495        use style_traits::{ParseError, StyleParseErrorKind};
6496        #[allow(unused_imports)]
6497        use crate::values::computed::{Context, ToComputedValue};
6498        #[allow(unused_imports)]
6499        use crate::values::{computed, generics, specified};
6500        #[allow(unused_imports)]
6501        use crate::Atom;
6502        
6503            
6504        #[allow(unused_imports)]
6505        use app_units::Au;
6506        #[allow(unused_imports)]
6507        use crate::values::specified::AllowQuirks;
6508        #[allow(unused_imports)]
6509        use crate::Zero;
6510        #[allow(unused_imports)]
6511        use smallvec::SmallVec;
6512        pub use crate::values::specified::VerticalAlign as SpecifiedValue;
6513        pub mod computed_value {
6514            pub use crate::values::computed::VerticalAlign as T;
6515        }
6516        #[inline] pub fn get_initial_value() -> computed_value::T { computed::VerticalAlign::baseline() }
6517        #[allow(unused_variables)]
6518        #[inline]
6519        pub fn parse<'i, 't>(
6520            context: &ParserContext,
6521            input: &mut Parser<'i, 't>,
6522        ) -> Result<SpecifiedValue, ParseError<'i>> {
6523            <specified::VerticalAlign as crate::parser::Parse>::parse(context, input)
6524        }
6525    
6526        
6527        #[allow(unused_variables)]
6528        pub unsafe fn cascade_property(
6529            declaration: &PropertyDeclaration,
6530            context: &mut computed::Context,
6531        ) {
6532            context.for_non_inherited_property = true;
6533            debug_assert_eq!(
6534                declaration.id().as_longhand().unwrap(),
6535                LonghandId::VerticalAlign,
6536            );
6537            let specified_value = match *declaration {
6538                PropertyDeclaration::CSSWideKeyword(ref wk) => {
6539                    match wk.keyword {
6540                        CSSWideKeyword::Unset |
6541                        CSSWideKeyword::Initial => {
6542                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
6543                        },
6544                        CSSWideKeyword::Inherit => {
6545                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
6546                                context.builder.inherit_vertical_align();
6547                        }
6548                        CSSWideKeyword::RevertLayer |
6549                        CSSWideKeyword::Revert => {
6550                            declaration.debug_crash("Found revert/revert-layer not dealt with");
6551                        },
6552                    }
6553                    return;
6554                },
6555                #[cfg(debug_assertions)]
6556                PropertyDeclaration::WithVariables(..) => {
6557                    declaration.debug_crash("Found variables not substituted");
6558                    return;
6559                },
6560                _ => unsafe {
6561                    declaration.unchecked_value_as::<crate::values::specified::VerticalAlign>()
6562                },
6563            };
6564
6565
6566                let computed = specified_value.to_computed_value(context);
6567                context.builder.set_vertical_align(computed)
6568        }
6569
6570        pub fn parse_declared<'i, 't>(
6571            context: &ParserContext,
6572            input: &mut Parser<'i, 't>,
6573        ) -> Result<PropertyDeclaration, ParseError<'i>> {
6574                parse(context, input)
6575                .map(PropertyDeclaration::VerticalAlign)
6576        }
6577    }
6578
6579
6580
6581
6582    
6583        
6584    
6585    /// https://drafts.csswg.org/css-inline-3/#baseline-source
6586    pub mod baseline_source {
6587        #[allow(unused_imports)]
6588        use cssparser::{Parser, BasicParseError, Token};
6589        #[allow(unused_imports)]
6590        use crate::parser::{Parse, ParserContext};
6591        #[allow(unused_imports)]
6592        use crate::properties::{UnparsedValue, ShorthandId};
6593        #[allow(unused_imports)]
6594        use crate::error_reporting::ParseErrorReporter;
6595        #[allow(unused_imports)]
6596        use crate::properties::longhands;
6597        #[allow(unused_imports)]
6598        use crate::properties::{LonghandId, LonghandIdSet};
6599        #[allow(unused_imports)]
6600        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
6601        #[allow(unused_imports)]
6602        use crate::properties::style_structs;
6603        #[allow(unused_imports)]
6604        use selectors::parser::SelectorParseErrorKind;
6605        #[allow(unused_imports)]
6606        use servo_arc::Arc;
6607        #[allow(unused_imports)]
6608        use style_traits::{ParseError, StyleParseErrorKind};
6609        #[allow(unused_imports)]
6610        use crate::values::computed::{Context, ToComputedValue};
6611        #[allow(unused_imports)]
6612        use crate::values::{computed, generics, specified};
6613        #[allow(unused_imports)]
6614        use crate::Atom;
6615        
6616            
6617        #[allow(unused_imports)]
6618        use app_units::Au;
6619        #[allow(unused_imports)]
6620        use crate::values::specified::AllowQuirks;
6621        #[allow(unused_imports)]
6622        use crate::Zero;
6623        #[allow(unused_imports)]
6624        use smallvec::SmallVec;
6625        pub use crate::values::specified::BaselineSource as SpecifiedValue;
6626        pub mod computed_value {
6627            pub use crate::values::computed::BaselineSource as T;
6628        }
6629        #[inline] pub fn get_initial_value() -> computed_value::T { computed::BaselineSource::Auto }
6630        #[allow(unused_variables)]
6631        #[inline]
6632        pub fn parse<'i, 't>(
6633            context: &ParserContext,
6634            input: &mut Parser<'i, 't>,
6635        ) -> Result<SpecifiedValue, ParseError<'i>> {
6636            <specified::BaselineSource as crate::parser::Parse>::parse(context, input)
6637        }
6638    
6639        
6640        #[allow(unused_variables)]
6641        pub unsafe fn cascade_property(
6642            declaration: &PropertyDeclaration,
6643            context: &mut computed::Context,
6644        ) {
6645            context.for_non_inherited_property = true;
6646            debug_assert_eq!(
6647                declaration.id().as_longhand().unwrap(),
6648                LonghandId::BaselineSource,
6649            );
6650            let specified_value = match *declaration {
6651                PropertyDeclaration::CSSWideKeyword(ref wk) => {
6652                    match wk.keyword {
6653                        CSSWideKeyword::Unset |
6654                        CSSWideKeyword::Initial => {
6655                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
6656                        },
6657                        CSSWideKeyword::Inherit => {
6658                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
6659                                context.builder.inherit_baseline_source();
6660                        }
6661                        CSSWideKeyword::RevertLayer |
6662                        CSSWideKeyword::Revert => {
6663                            declaration.debug_crash("Found revert/revert-layer not dealt with");
6664                        },
6665                    }
6666                    return;
6667                },
6668                #[cfg(debug_assertions)]
6669                PropertyDeclaration::WithVariables(..) => {
6670                    declaration.debug_crash("Found variables not substituted");
6671                    return;
6672                },
6673                _ => unsafe {
6674                    declaration.unchecked_value_as::<crate::values::specified::BaselineSource>()
6675                },
6676            };
6677
6678
6679                let computed = specified_value.to_computed_value(context);
6680                context.builder.set_baseline_source(computed)
6681        }
6682
6683        pub fn parse_declared<'i, 't>(
6684            context: &ParserContext,
6685            input: &mut Parser<'i, 't>,
6686        ) -> Result<PropertyDeclaration, ParseError<'i>> {
6687                parse(context, input)
6688                .map(PropertyDeclaration::BaselineSource)
6689        }
6690    }
6691
6692
6693
6694// CSS 2.1, Section 11 - Visual effects
6695
6696
6697    
6698
6699    
6700        
6701    
6702    /// Internal, not web-exposed,           may be standardized in the future (https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-clip-box)
6703    pub mod _servo_overflow_clip_box {
6704        #[allow(unused_imports)]
6705        use cssparser::{Parser, BasicParseError, Token};
6706        #[allow(unused_imports)]
6707        use crate::parser::{Parse, ParserContext};
6708        #[allow(unused_imports)]
6709        use crate::properties::{UnparsedValue, ShorthandId};
6710        #[allow(unused_imports)]
6711        use crate::error_reporting::ParseErrorReporter;
6712        #[allow(unused_imports)]
6713        use crate::properties::longhands;
6714        #[allow(unused_imports)]
6715        use crate::properties::{LonghandId, LonghandIdSet};
6716        #[allow(unused_imports)]
6717        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
6718        #[allow(unused_imports)]
6719        use crate::properties::style_structs;
6720        #[allow(unused_imports)]
6721        use selectors::parser::SelectorParseErrorKind;
6722        #[allow(unused_imports)]
6723        use servo_arc::Arc;
6724        #[allow(unused_imports)]
6725        use style_traits::{ParseError, StyleParseErrorKind};
6726        #[allow(unused_imports)]
6727        use crate::values::computed::{Context, ToComputedValue};
6728        #[allow(unused_imports)]
6729        use crate::values::{computed, generics, specified};
6730        #[allow(unused_imports)]
6731        use crate::Atom;
6732        
6733            
6734        pub use self::computed_value::T as SpecifiedValue;
6735        pub mod computed_value {
6736            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
6737            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
6738            pub enum T {
6739            
6740            PaddingBox,
6741            
6742            ContentBox,
6743            }
6744        }
6745        #[inline]
6746        pub fn get_initial_value() -> computed_value::T {
6747            computed_value::T::PaddingBox
6748        }
6749        #[inline]
6750        pub fn get_initial_specified_value() -> SpecifiedValue {
6751            SpecifiedValue::PaddingBox
6752        }
6753        #[inline]
6754        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
6755                             -> Result<SpecifiedValue, ParseError<'i>> {
6756            SpecifiedValue::parse(input)
6757        }
6758
6759    
6760        
6761        #[allow(unused_variables)]
6762        pub unsafe fn cascade_property(
6763            declaration: &PropertyDeclaration,
6764            context: &mut computed::Context,
6765        ) {
6766            context.for_non_inherited_property = true;
6767            debug_assert_eq!(
6768                declaration.id().as_longhand().unwrap(),
6769                LonghandId::ServoOverflowClipBox,
6770            );
6771            let specified_value = match *declaration {
6772                PropertyDeclaration::CSSWideKeyword(ref wk) => {
6773                    match wk.keyword {
6774                        CSSWideKeyword::Unset |
6775                        CSSWideKeyword::Initial => {
6776                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
6777                        },
6778                        CSSWideKeyword::Inherit => {
6779                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
6780                                context.builder.inherit__servo_overflow_clip_box();
6781                        }
6782                        CSSWideKeyword::RevertLayer |
6783                        CSSWideKeyword::Revert => {
6784                            declaration.debug_crash("Found revert/revert-layer not dealt with");
6785                        },
6786                    }
6787                    return;
6788                },
6789                #[cfg(debug_assertions)]
6790                PropertyDeclaration::WithVariables(..) => {
6791                    declaration.debug_crash("Found variables not substituted");
6792                    return;
6793                },
6794                _ => unsafe {
6795                    declaration.unchecked_value_as::<longhands::_servo_overflow_clip_box::SpecifiedValue>()
6796                },
6797            };
6798
6799
6800                let computed = specified_value.to_computed_value(context);
6801                context.builder.set__servo_overflow_clip_box(computed)
6802        }
6803
6804        pub fn parse_declared<'i, 't>(
6805            context: &ParserContext,
6806            input: &mut Parser<'i, 't>,
6807        ) -> Result<PropertyDeclaration, ParseError<'i>> {
6808                parse(context, input)
6809                .map(PropertyDeclaration::ServoOverflowClipBox)
6810        }
6811    }
6812
6813
6814
6815    
6816    
6817        
6818    
6819
6820    
6821    
6822        
6823    
6824
6825
6826    
6827    
6828    
6829        
6830    
6831    /// https://drafts.csswg.org/css-overflow-3/#propdef-overflow-y
6832    pub mod overflow_y {
6833        #[allow(unused_imports)]
6834        use cssparser::{Parser, BasicParseError, Token};
6835        #[allow(unused_imports)]
6836        use crate::parser::{Parse, ParserContext};
6837        #[allow(unused_imports)]
6838        use crate::properties::{UnparsedValue, ShorthandId};
6839        #[allow(unused_imports)]
6840        use crate::error_reporting::ParseErrorReporter;
6841        #[allow(unused_imports)]
6842        use crate::properties::longhands;
6843        #[allow(unused_imports)]
6844        use crate::properties::{LonghandId, LonghandIdSet};
6845        #[allow(unused_imports)]
6846        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
6847        #[allow(unused_imports)]
6848        use crate::properties::style_structs;
6849        #[allow(unused_imports)]
6850        use selectors::parser::SelectorParseErrorKind;
6851        #[allow(unused_imports)]
6852        use servo_arc::Arc;
6853        #[allow(unused_imports)]
6854        use style_traits::{ParseError, StyleParseErrorKind};
6855        #[allow(unused_imports)]
6856        use crate::values::computed::{Context, ToComputedValue};
6857        #[allow(unused_imports)]
6858        use crate::values::{computed, generics, specified};
6859        #[allow(unused_imports)]
6860        use crate::Atom;
6861        
6862            
6863        #[allow(unused_imports)]
6864        use app_units::Au;
6865        #[allow(unused_imports)]
6866        use crate::values::specified::AllowQuirks;
6867        #[allow(unused_imports)]
6868        use crate::Zero;
6869        #[allow(unused_imports)]
6870        use smallvec::SmallVec;
6871        pub use crate::values::specified::Overflow as SpecifiedValue;
6872        pub mod computed_value {
6873            pub use crate::values::computed::Overflow as T;
6874        }
6875        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Overflow::Visible }
6876        #[allow(unused_variables)]
6877        #[inline]
6878        pub fn parse<'i, 't>(
6879            context: &ParserContext,
6880            input: &mut Parser<'i, 't>,
6881        ) -> Result<SpecifiedValue, ParseError<'i>> {
6882            <specified::Overflow as crate::parser::Parse>::parse(context, input)
6883        }
6884    
6885        
6886        #[allow(unused_variables)]
6887        pub unsafe fn cascade_property(
6888            declaration: &PropertyDeclaration,
6889            context: &mut computed::Context,
6890        ) {
6891            context.for_non_inherited_property = true;
6892            debug_assert_eq!(
6893                declaration.id().as_longhand().unwrap().logical_group(),
6894                LonghandId::OverflowY.logical_group(),
6895            );
6896            let specified_value = match *declaration {
6897                PropertyDeclaration::CSSWideKeyword(ref wk) => {
6898                    match wk.keyword {
6899                        CSSWideKeyword::Unset |
6900                        CSSWideKeyword::Initial => {
6901                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
6902                        },
6903                        CSSWideKeyword::Inherit => {
6904                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
6905                                context.builder.inherit_overflow_y();
6906                        }
6907                        CSSWideKeyword::RevertLayer |
6908                        CSSWideKeyword::Revert => {
6909                            declaration.debug_crash("Found revert/revert-layer not dealt with");
6910                        },
6911                    }
6912                    return;
6913                },
6914                #[cfg(debug_assertions)]
6915                PropertyDeclaration::WithVariables(..) => {
6916                    declaration.debug_crash("Found variables not substituted");
6917                    return;
6918                },
6919                _ => unsafe {
6920                    declaration.unchecked_value_as::<crate::values::specified::Overflow>()
6921                },
6922            };
6923
6924
6925                let computed = specified_value.to_computed_value(context);
6926                context.builder.set_overflow_y(computed)
6927        }
6928
6929        pub fn parse_declared<'i, 't>(
6930            context: &ParserContext,
6931            input: &mut Parser<'i, 't>,
6932        ) -> Result<PropertyDeclaration, ParseError<'i>> {
6933                parse(context, input)
6934                .map(PropertyDeclaration::OverflowY)
6935        }
6936    }
6937
6938
6939    
6940    
6941    
6942        
6943    
6944    /// https://drafts.csswg.org/css-overflow-3/#propdef-overflow-x
6945    pub mod overflow_x {
6946        #[allow(unused_imports)]
6947        use cssparser::{Parser, BasicParseError, Token};
6948        #[allow(unused_imports)]
6949        use crate::parser::{Parse, ParserContext};
6950        #[allow(unused_imports)]
6951        use crate::properties::{UnparsedValue, ShorthandId};
6952        #[allow(unused_imports)]
6953        use crate::error_reporting::ParseErrorReporter;
6954        #[allow(unused_imports)]
6955        use crate::properties::longhands;
6956        #[allow(unused_imports)]
6957        use crate::properties::{LonghandId, LonghandIdSet};
6958        #[allow(unused_imports)]
6959        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
6960        #[allow(unused_imports)]
6961        use crate::properties::style_structs;
6962        #[allow(unused_imports)]
6963        use selectors::parser::SelectorParseErrorKind;
6964        #[allow(unused_imports)]
6965        use servo_arc::Arc;
6966        #[allow(unused_imports)]
6967        use style_traits::{ParseError, StyleParseErrorKind};
6968        #[allow(unused_imports)]
6969        use crate::values::computed::{Context, ToComputedValue};
6970        #[allow(unused_imports)]
6971        use crate::values::{computed, generics, specified};
6972        #[allow(unused_imports)]
6973        use crate::Atom;
6974        
6975            
6976        #[allow(unused_imports)]
6977        use app_units::Au;
6978        #[allow(unused_imports)]
6979        use crate::values::specified::AllowQuirks;
6980        #[allow(unused_imports)]
6981        use crate::Zero;
6982        #[allow(unused_imports)]
6983        use smallvec::SmallVec;
6984        pub use crate::values::specified::Overflow as SpecifiedValue;
6985        pub mod computed_value {
6986            pub use crate::values::computed::Overflow as T;
6987        }
6988        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Overflow::Visible }
6989        #[allow(unused_variables)]
6990        #[inline]
6991        pub fn parse<'i, 't>(
6992            context: &ParserContext,
6993            input: &mut Parser<'i, 't>,
6994        ) -> Result<SpecifiedValue, ParseError<'i>> {
6995            <specified::Overflow as crate::parser::Parse>::parse(context, input)
6996        }
6997    
6998        
6999        #[allow(unused_variables)]
7000        pub unsafe fn cascade_property(
7001            declaration: &PropertyDeclaration,
7002            context: &mut computed::Context,
7003        ) {
7004            context.for_non_inherited_property = true;
7005            debug_assert_eq!(
7006                declaration.id().as_longhand().unwrap().logical_group(),
7007                LonghandId::OverflowX.logical_group(),
7008            );
7009            let specified_value = match *declaration {
7010                PropertyDeclaration::CSSWideKeyword(ref wk) => {
7011                    match wk.keyword {
7012                        CSSWideKeyword::Unset |
7013                        CSSWideKeyword::Initial => {
7014                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
7015                        },
7016                        CSSWideKeyword::Inherit => {
7017                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
7018                                context.builder.inherit_overflow_x();
7019                        }
7020                        CSSWideKeyword::RevertLayer |
7021                        CSSWideKeyword::Revert => {
7022                            declaration.debug_crash("Found revert/revert-layer not dealt with");
7023                        },
7024                    }
7025                    return;
7026                },
7027                #[cfg(debug_assertions)]
7028                PropertyDeclaration::WithVariables(..) => {
7029                    declaration.debug_crash("Found variables not substituted");
7030                    return;
7031                },
7032                _ => unsafe {
7033                    declaration.unchecked_value_as::<crate::values::specified::Overflow>()
7034                },
7035            };
7036
7037
7038                let computed = specified_value.to_computed_value(context);
7039                context.builder.set_overflow_x(computed)
7040        }
7041
7042        pub fn parse_declared<'i, 't>(
7043            context: &ParserContext,
7044            input: &mut Parser<'i, 't>,
7045        ) -> Result<PropertyDeclaration, ParseError<'i>> {
7046                parse(context, input)
7047                .map(PropertyDeclaration::OverflowX)
7048        }
7049    }
7050
7051
7052    
7053    
7054    
7055        
7056    
7057    /// https://drafts.csswg.org/css-overflow-3/#propdef-overflow-block
7058    pub mod overflow_block {
7059        #[allow(unused_imports)]
7060        use cssparser::{Parser, BasicParseError, Token};
7061        #[allow(unused_imports)]
7062        use crate::parser::{Parse, ParserContext};
7063        #[allow(unused_imports)]
7064        use crate::properties::{UnparsedValue, ShorthandId};
7065        #[allow(unused_imports)]
7066        use crate::error_reporting::ParseErrorReporter;
7067        #[allow(unused_imports)]
7068        use crate::properties::longhands;
7069        #[allow(unused_imports)]
7070        use crate::properties::{LonghandId, LonghandIdSet};
7071        #[allow(unused_imports)]
7072        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
7073        #[allow(unused_imports)]
7074        use crate::properties::style_structs;
7075        #[allow(unused_imports)]
7076        use selectors::parser::SelectorParseErrorKind;
7077        #[allow(unused_imports)]
7078        use servo_arc::Arc;
7079        #[allow(unused_imports)]
7080        use style_traits::{ParseError, StyleParseErrorKind};
7081        #[allow(unused_imports)]
7082        use crate::values::computed::{Context, ToComputedValue};
7083        #[allow(unused_imports)]
7084        use crate::values::{computed, generics, specified};
7085        #[allow(unused_imports)]
7086        use crate::Atom;
7087        
7088            
7089        #[allow(unused_imports)]
7090        use app_units::Au;
7091        #[allow(unused_imports)]
7092        use crate::values::specified::AllowQuirks;
7093        #[allow(unused_imports)]
7094        use crate::Zero;
7095        #[allow(unused_imports)]
7096        use smallvec::SmallVec;
7097        pub use crate::values::specified::Overflow as SpecifiedValue;
7098        pub mod computed_value {
7099            pub use crate::values::computed::Overflow as T;
7100        }
7101        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Overflow::Visible }
7102        #[allow(unused_variables)]
7103        #[inline]
7104        pub fn parse<'i, 't>(
7105            context: &ParserContext,
7106            input: &mut Parser<'i, 't>,
7107        ) -> Result<SpecifiedValue, ParseError<'i>> {
7108            <specified::Overflow as crate::parser::Parse>::parse(context, input)
7109        }
7110    
7111        
7112        #[allow(unused_variables)]
7113        pub unsafe fn cascade_property(
7114            declaration: &PropertyDeclaration,
7115            context: &mut computed::Context,
7116        ) {
7117            declaration.debug_crash("Should physicalize before entering here");
7118        }
7119
7120        pub fn parse_declared<'i, 't>(
7121            context: &ParserContext,
7122            input: &mut Parser<'i, 't>,
7123        ) -> Result<PropertyDeclaration, ParseError<'i>> {
7124                parse(context, input)
7125                .map(PropertyDeclaration::OverflowBlock)
7126        }
7127    }
7128
7129
7130    
7131    
7132    
7133        
7134    
7135    /// https://drafts.csswg.org/css-overflow-3/#propdef-overflow-inline
7136    pub mod overflow_inline {
7137        #[allow(unused_imports)]
7138        use cssparser::{Parser, BasicParseError, Token};
7139        #[allow(unused_imports)]
7140        use crate::parser::{Parse, ParserContext};
7141        #[allow(unused_imports)]
7142        use crate::properties::{UnparsedValue, ShorthandId};
7143        #[allow(unused_imports)]
7144        use crate::error_reporting::ParseErrorReporter;
7145        #[allow(unused_imports)]
7146        use crate::properties::longhands;
7147        #[allow(unused_imports)]
7148        use crate::properties::{LonghandId, LonghandIdSet};
7149        #[allow(unused_imports)]
7150        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
7151        #[allow(unused_imports)]
7152        use crate::properties::style_structs;
7153        #[allow(unused_imports)]
7154        use selectors::parser::SelectorParseErrorKind;
7155        #[allow(unused_imports)]
7156        use servo_arc::Arc;
7157        #[allow(unused_imports)]
7158        use style_traits::{ParseError, StyleParseErrorKind};
7159        #[allow(unused_imports)]
7160        use crate::values::computed::{Context, ToComputedValue};
7161        #[allow(unused_imports)]
7162        use crate::values::{computed, generics, specified};
7163        #[allow(unused_imports)]
7164        use crate::Atom;
7165        
7166            
7167        #[allow(unused_imports)]
7168        use app_units::Au;
7169        #[allow(unused_imports)]
7170        use crate::values::specified::AllowQuirks;
7171        #[allow(unused_imports)]
7172        use crate::Zero;
7173        #[allow(unused_imports)]
7174        use smallvec::SmallVec;
7175        pub use crate::values::specified::Overflow as SpecifiedValue;
7176        pub mod computed_value {
7177            pub use crate::values::computed::Overflow as T;
7178        }
7179        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Overflow::Visible }
7180        #[allow(unused_variables)]
7181        #[inline]
7182        pub fn parse<'i, 't>(
7183            context: &ParserContext,
7184            input: &mut Parser<'i, 't>,
7185        ) -> Result<SpecifiedValue, ParseError<'i>> {
7186            <specified::Overflow as crate::parser::Parse>::parse(context, input)
7187        }
7188    
7189        
7190        #[allow(unused_variables)]
7191        pub unsafe fn cascade_property(
7192            declaration: &PropertyDeclaration,
7193            context: &mut computed::Context,
7194        ) {
7195            declaration.debug_crash("Should physicalize before entering here");
7196        }
7197
7198        pub fn parse_declared<'i, 't>(
7199            context: &ParserContext,
7200            input: &mut Parser<'i, 't>,
7201        ) -> Result<PropertyDeclaration, ParseError<'i>> {
7202                parse(context, input)
7203                .map(PropertyDeclaration::OverflowInline)
7204        }
7205    }
7206
7207
7208
7209
7210    
7211        
7212    
7213
7214
7215
7216
7217
7218    
7219        
7220    
7221    /// https://drafts.csswg.org/css-transforms/#propdef-transform
7222    pub mod transform {
7223        #[allow(unused_imports)]
7224        use cssparser::{Parser, BasicParseError, Token};
7225        #[allow(unused_imports)]
7226        use crate::parser::{Parse, ParserContext};
7227        #[allow(unused_imports)]
7228        use crate::properties::{UnparsedValue, ShorthandId};
7229        #[allow(unused_imports)]
7230        use crate::error_reporting::ParseErrorReporter;
7231        #[allow(unused_imports)]
7232        use crate::properties::longhands;
7233        #[allow(unused_imports)]
7234        use crate::properties::{LonghandId, LonghandIdSet};
7235        #[allow(unused_imports)]
7236        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
7237        #[allow(unused_imports)]
7238        use crate::properties::style_structs;
7239        #[allow(unused_imports)]
7240        use selectors::parser::SelectorParseErrorKind;
7241        #[allow(unused_imports)]
7242        use servo_arc::Arc;
7243        #[allow(unused_imports)]
7244        use style_traits::{ParseError, StyleParseErrorKind};
7245        #[allow(unused_imports)]
7246        use crate::values::computed::{Context, ToComputedValue};
7247        #[allow(unused_imports)]
7248        use crate::values::{computed, generics, specified};
7249        #[allow(unused_imports)]
7250        use crate::Atom;
7251        
7252            
7253        #[allow(unused_imports)]
7254        use app_units::Au;
7255        #[allow(unused_imports)]
7256        use crate::values::specified::AllowQuirks;
7257        #[allow(unused_imports)]
7258        use crate::Zero;
7259        #[allow(unused_imports)]
7260        use smallvec::SmallVec;
7261        pub use crate::values::specified::Transform as SpecifiedValue;
7262        pub mod computed_value {
7263            pub use crate::values::computed::Transform as T;
7264        }
7265        #[inline] pub fn get_initial_value() -> computed_value::T { generics::transform::Transform::none() }
7266        #[allow(unused_variables)]
7267        #[inline]
7268        pub fn parse<'i, 't>(
7269            context: &ParserContext,
7270            input: &mut Parser<'i, 't>,
7271        ) -> Result<SpecifiedValue, ParseError<'i>> {
7272            <specified::Transform as crate::parser::Parse>::parse(context, input)
7273        }
7274    
7275        
7276        #[allow(unused_variables)]
7277        pub unsafe fn cascade_property(
7278            declaration: &PropertyDeclaration,
7279            context: &mut computed::Context,
7280        ) {
7281            context.for_non_inherited_property = true;
7282            debug_assert_eq!(
7283                declaration.id().as_longhand().unwrap(),
7284                LonghandId::Transform,
7285            );
7286            let specified_value = match *declaration {
7287                PropertyDeclaration::CSSWideKeyword(ref wk) => {
7288                    match wk.keyword {
7289                        CSSWideKeyword::Unset |
7290                        CSSWideKeyword::Initial => {
7291                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
7292                        },
7293                        CSSWideKeyword::Inherit => {
7294                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
7295                                context.builder.inherit_transform();
7296                        }
7297                        CSSWideKeyword::RevertLayer |
7298                        CSSWideKeyword::Revert => {
7299                            declaration.debug_crash("Found revert/revert-layer not dealt with");
7300                        },
7301                    }
7302                    return;
7303                },
7304                #[cfg(debug_assertions)]
7305                PropertyDeclaration::WithVariables(..) => {
7306                    declaration.debug_crash("Found variables not substituted");
7307                    return;
7308                },
7309                _ => unsafe {
7310                    declaration.unchecked_value_as::<crate::values::specified::Transform>()
7311                },
7312            };
7313
7314
7315                let computed = specified_value.to_computed_value(context);
7316                context.builder.set_transform(computed)
7317        }
7318
7319        pub fn parse_declared<'i, 't>(
7320            context: &ParserContext,
7321            input: &mut Parser<'i, 't>,
7322        ) -> Result<PropertyDeclaration, ParseError<'i>> {
7323                parse(context, input)
7324                .map(PropertyDeclaration::Transform)
7325        }
7326    }
7327
7328
7329
7330
7331    
7332        
7333    
7334    /// https://drafts.csswg.org/css-transforms-2/#individual-transforms
7335    pub mod rotate {
7336        #[allow(unused_imports)]
7337        use cssparser::{Parser, BasicParseError, Token};
7338        #[allow(unused_imports)]
7339        use crate::parser::{Parse, ParserContext};
7340        #[allow(unused_imports)]
7341        use crate::properties::{UnparsedValue, ShorthandId};
7342        #[allow(unused_imports)]
7343        use crate::error_reporting::ParseErrorReporter;
7344        #[allow(unused_imports)]
7345        use crate::properties::longhands;
7346        #[allow(unused_imports)]
7347        use crate::properties::{LonghandId, LonghandIdSet};
7348        #[allow(unused_imports)]
7349        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
7350        #[allow(unused_imports)]
7351        use crate::properties::style_structs;
7352        #[allow(unused_imports)]
7353        use selectors::parser::SelectorParseErrorKind;
7354        #[allow(unused_imports)]
7355        use servo_arc::Arc;
7356        #[allow(unused_imports)]
7357        use style_traits::{ParseError, StyleParseErrorKind};
7358        #[allow(unused_imports)]
7359        use crate::values::computed::{Context, ToComputedValue};
7360        #[allow(unused_imports)]
7361        use crate::values::{computed, generics, specified};
7362        #[allow(unused_imports)]
7363        use crate::Atom;
7364        
7365            
7366        #[allow(unused_imports)]
7367        use app_units::Au;
7368        #[allow(unused_imports)]
7369        use crate::values::specified::AllowQuirks;
7370        #[allow(unused_imports)]
7371        use crate::Zero;
7372        #[allow(unused_imports)]
7373        use smallvec::SmallVec;
7374        pub use crate::values::specified::Rotate as SpecifiedValue;
7375        pub mod computed_value {
7376            pub use crate::values::computed::Rotate as T;
7377        }
7378        #[inline] pub fn get_initial_value() -> computed_value::T { generics::transform::Rotate::None }
7379        #[allow(unused_variables)]
7380        #[inline]
7381        pub fn parse<'i, 't>(
7382            context: &ParserContext,
7383            input: &mut Parser<'i, 't>,
7384        ) -> Result<SpecifiedValue, ParseError<'i>> {
7385            <specified::Rotate as crate::parser::Parse>::parse(context, input)
7386        }
7387    
7388        
7389        #[allow(unused_variables)]
7390        pub unsafe fn cascade_property(
7391            declaration: &PropertyDeclaration,
7392            context: &mut computed::Context,
7393        ) {
7394            context.for_non_inherited_property = true;
7395            debug_assert_eq!(
7396                declaration.id().as_longhand().unwrap(),
7397                LonghandId::Rotate,
7398            );
7399            let specified_value = match *declaration {
7400                PropertyDeclaration::CSSWideKeyword(ref wk) => {
7401                    match wk.keyword {
7402                        CSSWideKeyword::Unset |
7403                        CSSWideKeyword::Initial => {
7404                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
7405                        },
7406                        CSSWideKeyword::Inherit => {
7407                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
7408                                context.builder.inherit_rotate();
7409                        }
7410                        CSSWideKeyword::RevertLayer |
7411                        CSSWideKeyword::Revert => {
7412                            declaration.debug_crash("Found revert/revert-layer not dealt with");
7413                        },
7414                    }
7415                    return;
7416                },
7417                #[cfg(debug_assertions)]
7418                PropertyDeclaration::WithVariables(..) => {
7419                    declaration.debug_crash("Found variables not substituted");
7420                    return;
7421                },
7422                _ => unsafe {
7423                    declaration.unchecked_value_as::<Box<crate::values::specified::Rotate>>()
7424                },
7425            };
7426
7427
7428                let computed = (**specified_value).to_computed_value(context);
7429                context.builder.set_rotate(computed)
7430        }
7431
7432        pub fn parse_declared<'i, 't>(
7433            context: &ParserContext,
7434            input: &mut Parser<'i, 't>,
7435        ) -> Result<PropertyDeclaration, ParseError<'i>> {
7436                parse(context, input)
7437                .map(Box::new)
7438                .map(PropertyDeclaration::Rotate)
7439        }
7440    }
7441
7442
7443
7444
7445    
7446        
7447    
7448    /// https://drafts.csswg.org/css-transforms-2/#individual-transforms
7449    pub mod scale {
7450        #[allow(unused_imports)]
7451        use cssparser::{Parser, BasicParseError, Token};
7452        #[allow(unused_imports)]
7453        use crate::parser::{Parse, ParserContext};
7454        #[allow(unused_imports)]
7455        use crate::properties::{UnparsedValue, ShorthandId};
7456        #[allow(unused_imports)]
7457        use crate::error_reporting::ParseErrorReporter;
7458        #[allow(unused_imports)]
7459        use crate::properties::longhands;
7460        #[allow(unused_imports)]
7461        use crate::properties::{LonghandId, LonghandIdSet};
7462        #[allow(unused_imports)]
7463        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
7464        #[allow(unused_imports)]
7465        use crate::properties::style_structs;
7466        #[allow(unused_imports)]
7467        use selectors::parser::SelectorParseErrorKind;
7468        #[allow(unused_imports)]
7469        use servo_arc::Arc;
7470        #[allow(unused_imports)]
7471        use style_traits::{ParseError, StyleParseErrorKind};
7472        #[allow(unused_imports)]
7473        use crate::values::computed::{Context, ToComputedValue};
7474        #[allow(unused_imports)]
7475        use crate::values::{computed, generics, specified};
7476        #[allow(unused_imports)]
7477        use crate::Atom;
7478        
7479            
7480        #[allow(unused_imports)]
7481        use app_units::Au;
7482        #[allow(unused_imports)]
7483        use crate::values::specified::AllowQuirks;
7484        #[allow(unused_imports)]
7485        use crate::Zero;
7486        #[allow(unused_imports)]
7487        use smallvec::SmallVec;
7488        pub use crate::values::specified::Scale as SpecifiedValue;
7489        pub mod computed_value {
7490            pub use crate::values::computed::Scale as T;
7491        }
7492        #[inline] pub fn get_initial_value() -> computed_value::T { generics::transform::Scale::None }
7493        #[allow(unused_variables)]
7494        #[inline]
7495        pub fn parse<'i, 't>(
7496            context: &ParserContext,
7497            input: &mut Parser<'i, 't>,
7498        ) -> Result<SpecifiedValue, ParseError<'i>> {
7499            <specified::Scale as crate::parser::Parse>::parse(context, input)
7500        }
7501    
7502        
7503        #[allow(unused_variables)]
7504        pub unsafe fn cascade_property(
7505            declaration: &PropertyDeclaration,
7506            context: &mut computed::Context,
7507        ) {
7508            context.for_non_inherited_property = true;
7509            debug_assert_eq!(
7510                declaration.id().as_longhand().unwrap(),
7511                LonghandId::Scale,
7512            );
7513            let specified_value = match *declaration {
7514                PropertyDeclaration::CSSWideKeyword(ref wk) => {
7515                    match wk.keyword {
7516                        CSSWideKeyword::Unset |
7517                        CSSWideKeyword::Initial => {
7518                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
7519                        },
7520                        CSSWideKeyword::Inherit => {
7521                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
7522                                context.builder.inherit_scale();
7523                        }
7524                        CSSWideKeyword::RevertLayer |
7525                        CSSWideKeyword::Revert => {
7526                            declaration.debug_crash("Found revert/revert-layer not dealt with");
7527                        },
7528                    }
7529                    return;
7530                },
7531                #[cfg(debug_assertions)]
7532                PropertyDeclaration::WithVariables(..) => {
7533                    declaration.debug_crash("Found variables not substituted");
7534                    return;
7535                },
7536                _ => unsafe {
7537                    declaration.unchecked_value_as::<Box<crate::values::specified::Scale>>()
7538                },
7539            };
7540
7541
7542                let computed = (**specified_value).to_computed_value(context);
7543                context.builder.set_scale(computed)
7544        }
7545
7546        pub fn parse_declared<'i, 't>(
7547            context: &ParserContext,
7548            input: &mut Parser<'i, 't>,
7549        ) -> Result<PropertyDeclaration, ParseError<'i>> {
7550                parse(context, input)
7551                .map(Box::new)
7552                .map(PropertyDeclaration::Scale)
7553        }
7554    }
7555
7556
7557
7558
7559    
7560        
7561    
7562    /// https://drafts.csswg.org/css-transforms-2/#individual-transforms
7563    pub mod translate {
7564        #[allow(unused_imports)]
7565        use cssparser::{Parser, BasicParseError, Token};
7566        #[allow(unused_imports)]
7567        use crate::parser::{Parse, ParserContext};
7568        #[allow(unused_imports)]
7569        use crate::properties::{UnparsedValue, ShorthandId};
7570        #[allow(unused_imports)]
7571        use crate::error_reporting::ParseErrorReporter;
7572        #[allow(unused_imports)]
7573        use crate::properties::longhands;
7574        #[allow(unused_imports)]
7575        use crate::properties::{LonghandId, LonghandIdSet};
7576        #[allow(unused_imports)]
7577        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
7578        #[allow(unused_imports)]
7579        use crate::properties::style_structs;
7580        #[allow(unused_imports)]
7581        use selectors::parser::SelectorParseErrorKind;
7582        #[allow(unused_imports)]
7583        use servo_arc::Arc;
7584        #[allow(unused_imports)]
7585        use style_traits::{ParseError, StyleParseErrorKind};
7586        #[allow(unused_imports)]
7587        use crate::values::computed::{Context, ToComputedValue};
7588        #[allow(unused_imports)]
7589        use crate::values::{computed, generics, specified};
7590        #[allow(unused_imports)]
7591        use crate::Atom;
7592        
7593            
7594        #[allow(unused_imports)]
7595        use app_units::Au;
7596        #[allow(unused_imports)]
7597        use crate::values::specified::AllowQuirks;
7598        #[allow(unused_imports)]
7599        use crate::Zero;
7600        #[allow(unused_imports)]
7601        use smallvec::SmallVec;
7602        pub use crate::values::specified::Translate as SpecifiedValue;
7603        pub mod computed_value {
7604            pub use crate::values::computed::Translate as T;
7605        }
7606        #[inline] pub fn get_initial_value() -> computed_value::T { generics::transform::Translate::None }
7607        #[allow(unused_variables)]
7608        #[inline]
7609        pub fn parse<'i, 't>(
7610            context: &ParserContext,
7611            input: &mut Parser<'i, 't>,
7612        ) -> Result<SpecifiedValue, ParseError<'i>> {
7613            <specified::Translate as crate::parser::Parse>::parse(context, input)
7614        }
7615    
7616        
7617        #[allow(unused_variables)]
7618        pub unsafe fn cascade_property(
7619            declaration: &PropertyDeclaration,
7620            context: &mut computed::Context,
7621        ) {
7622            context.for_non_inherited_property = true;
7623            debug_assert_eq!(
7624                declaration.id().as_longhand().unwrap(),
7625                LonghandId::Translate,
7626            );
7627            let specified_value = match *declaration {
7628                PropertyDeclaration::CSSWideKeyword(ref wk) => {
7629                    match wk.keyword {
7630                        CSSWideKeyword::Unset |
7631                        CSSWideKeyword::Initial => {
7632                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
7633                        },
7634                        CSSWideKeyword::Inherit => {
7635                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
7636                                context.builder.inherit_translate();
7637                        }
7638                        CSSWideKeyword::RevertLayer |
7639                        CSSWideKeyword::Revert => {
7640                            declaration.debug_crash("Found revert/revert-layer not dealt with");
7641                        },
7642                    }
7643                    return;
7644                },
7645                #[cfg(debug_assertions)]
7646                PropertyDeclaration::WithVariables(..) => {
7647                    declaration.debug_crash("Found variables not substituted");
7648                    return;
7649                },
7650                _ => unsafe {
7651                    declaration.unchecked_value_as::<Box<crate::values::specified::Translate>>()
7652                },
7653            };
7654
7655
7656                let computed = (**specified_value).to_computed_value(context);
7657                context.builder.set_translate(computed)
7658        }
7659
7660        pub fn parse_declared<'i, 't>(
7661            context: &ParserContext,
7662            input: &mut Parser<'i, 't>,
7663        ) -> Result<PropertyDeclaration, ParseError<'i>> {
7664                parse(context, input)
7665                .map(Box::new)
7666                .map(PropertyDeclaration::Translate)
7667        }
7668    }
7669
7670
7671
7672// Motion Path Module Level 1
7673
7674    
7675        
7676    
7677    /// https://drafts.fxtf.org/motion-1/#offset-path-property
7678    pub mod offset_path {
7679        #[allow(unused_imports)]
7680        use cssparser::{Parser, BasicParseError, Token};
7681        #[allow(unused_imports)]
7682        use crate::parser::{Parse, ParserContext};
7683        #[allow(unused_imports)]
7684        use crate::properties::{UnparsedValue, ShorthandId};
7685        #[allow(unused_imports)]
7686        use crate::error_reporting::ParseErrorReporter;
7687        #[allow(unused_imports)]
7688        use crate::properties::longhands;
7689        #[allow(unused_imports)]
7690        use crate::properties::{LonghandId, LonghandIdSet};
7691        #[allow(unused_imports)]
7692        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
7693        #[allow(unused_imports)]
7694        use crate::properties::style_structs;
7695        #[allow(unused_imports)]
7696        use selectors::parser::SelectorParseErrorKind;
7697        #[allow(unused_imports)]
7698        use servo_arc::Arc;
7699        #[allow(unused_imports)]
7700        use style_traits::{ParseError, StyleParseErrorKind};
7701        #[allow(unused_imports)]
7702        use crate::values::computed::{Context, ToComputedValue};
7703        #[allow(unused_imports)]
7704        use crate::values::{computed, generics, specified};
7705        #[allow(unused_imports)]
7706        use crate::Atom;
7707        
7708            
7709        #[allow(unused_imports)]
7710        use app_units::Au;
7711        #[allow(unused_imports)]
7712        use crate::values::specified::AllowQuirks;
7713        #[allow(unused_imports)]
7714        use crate::Zero;
7715        #[allow(unused_imports)]
7716        use smallvec::SmallVec;
7717        pub use crate::values::specified::OffsetPath as SpecifiedValue;
7718        pub mod computed_value {
7719            pub use crate::values::computed::OffsetPath as T;
7720        }
7721        #[inline] pub fn get_initial_value() -> computed_value::T { computed::OffsetPath::none() }
7722        #[allow(unused_variables)]
7723        #[inline]
7724        pub fn parse<'i, 't>(
7725            context: &ParserContext,
7726            input: &mut Parser<'i, 't>,
7727        ) -> Result<SpecifiedValue, ParseError<'i>> {
7728            <specified::OffsetPath as crate::parser::Parse>::parse(context, input)
7729        }
7730    
7731        
7732        #[allow(unused_variables)]
7733        pub unsafe fn cascade_property(
7734            declaration: &PropertyDeclaration,
7735            context: &mut computed::Context,
7736        ) {
7737            context.for_non_inherited_property = true;
7738            debug_assert_eq!(
7739                declaration.id().as_longhand().unwrap(),
7740                LonghandId::OffsetPath,
7741            );
7742            let specified_value = match *declaration {
7743                PropertyDeclaration::CSSWideKeyword(ref wk) => {
7744                    match wk.keyword {
7745                        CSSWideKeyword::Unset |
7746                        CSSWideKeyword::Initial => {
7747                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
7748                        },
7749                        CSSWideKeyword::Inherit => {
7750                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
7751                                context.builder.inherit_offset_path();
7752                        }
7753                        CSSWideKeyword::RevertLayer |
7754                        CSSWideKeyword::Revert => {
7755                            declaration.debug_crash("Found revert/revert-layer not dealt with");
7756                        },
7757                    }
7758                    return;
7759                },
7760                #[cfg(debug_assertions)]
7761                PropertyDeclaration::WithVariables(..) => {
7762                    declaration.debug_crash("Found variables not substituted");
7763                    return;
7764                },
7765                _ => unsafe {
7766                    declaration.unchecked_value_as::<crate::values::specified::OffsetPath>()
7767                },
7768            };
7769
7770
7771                let computed = specified_value.to_computed_value(context);
7772                context.builder.set_offset_path(computed)
7773        }
7774
7775        pub fn parse_declared<'i, 't>(
7776            context: &ParserContext,
7777            input: &mut Parser<'i, 't>,
7778        ) -> Result<PropertyDeclaration, ParseError<'i>> {
7779                parse(context, input)
7780                .map(PropertyDeclaration::OffsetPath)
7781        }
7782    }
7783
7784
7785
7786// Motion Path Module Level 1
7787
7788    
7789        
7790    
7791
7792
7793// Motion Path Module Level 1
7794
7795    
7796        
7797    
7798
7799
7800// Motion Path Module Level 1
7801
7802    
7803        
7804    
7805
7806
7807// Motion Path Module Level 1
7808
7809    
7810        
7811    
7812
7813
7814// CSSOM View Module
7815// https://www.w3.org/TR/cssom-view-1/
7816
7817    
7818
7819    
7820        
7821    
7822
7823
7824
7825    
7826        
7827    
7828
7829
7830
7831    
7832        
7833    
7834
7835
7836
7837    
7838        
7839    
7840
7841
7842    
7843    
7844        
7845    
7846
7847    
7848    
7849        
7850    
7851
7852    
7853    
7854        
7855    
7856
7857    
7858    
7859        
7860    
7861
7862
7863// Compositing and Blending Level 1
7864// http://www.w3.org/TR/compositing-1/
7865
7866    
7867
7868    
7869        
7870    
7871    /// https://drafts.fxtf.org/compositing/#isolation
7872    pub mod isolation {
7873        #[allow(unused_imports)]
7874        use cssparser::{Parser, BasicParseError, Token};
7875        #[allow(unused_imports)]
7876        use crate::parser::{Parse, ParserContext};
7877        #[allow(unused_imports)]
7878        use crate::properties::{UnparsedValue, ShorthandId};
7879        #[allow(unused_imports)]
7880        use crate::error_reporting::ParseErrorReporter;
7881        #[allow(unused_imports)]
7882        use crate::properties::longhands;
7883        #[allow(unused_imports)]
7884        use crate::properties::{LonghandId, LonghandIdSet};
7885        #[allow(unused_imports)]
7886        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
7887        #[allow(unused_imports)]
7888        use crate::properties::style_structs;
7889        #[allow(unused_imports)]
7890        use selectors::parser::SelectorParseErrorKind;
7891        #[allow(unused_imports)]
7892        use servo_arc::Arc;
7893        #[allow(unused_imports)]
7894        use style_traits::{ParseError, StyleParseErrorKind};
7895        #[allow(unused_imports)]
7896        use crate::values::computed::{Context, ToComputedValue};
7897        #[allow(unused_imports)]
7898        use crate::values::{computed, generics, specified};
7899        #[allow(unused_imports)]
7900        use crate::Atom;
7901        
7902            
7903        pub use self::computed_value::T as SpecifiedValue;
7904        pub mod computed_value {
7905            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
7906            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
7907            pub enum T {
7908            
7909            Auto,
7910            
7911            Isolate,
7912            }
7913        }
7914        #[inline]
7915        pub fn get_initial_value() -> computed_value::T {
7916            computed_value::T::Auto
7917        }
7918        #[inline]
7919        pub fn get_initial_specified_value() -> SpecifiedValue {
7920            SpecifiedValue::Auto
7921        }
7922        #[inline]
7923        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
7924                             -> Result<SpecifiedValue, ParseError<'i>> {
7925            SpecifiedValue::parse(input)
7926        }
7927
7928    
7929        
7930        #[allow(unused_variables)]
7931        pub unsafe fn cascade_property(
7932            declaration: &PropertyDeclaration,
7933            context: &mut computed::Context,
7934        ) {
7935            context.for_non_inherited_property = true;
7936            debug_assert_eq!(
7937                declaration.id().as_longhand().unwrap(),
7938                LonghandId::Isolation,
7939            );
7940            let specified_value = match *declaration {
7941                PropertyDeclaration::CSSWideKeyword(ref wk) => {
7942                    match wk.keyword {
7943                        CSSWideKeyword::Unset |
7944                        CSSWideKeyword::Initial => {
7945                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
7946                        },
7947                        CSSWideKeyword::Inherit => {
7948                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
7949                                context.builder.inherit_isolation();
7950                        }
7951                        CSSWideKeyword::RevertLayer |
7952                        CSSWideKeyword::Revert => {
7953                            declaration.debug_crash("Found revert/revert-layer not dealt with");
7954                        },
7955                    }
7956                    return;
7957                },
7958                #[cfg(debug_assertions)]
7959                PropertyDeclaration::WithVariables(..) => {
7960                    declaration.debug_crash("Found variables not substituted");
7961                    return;
7962                },
7963                _ => unsafe {
7964                    declaration.unchecked_value_as::<longhands::isolation::SpecifiedValue>()
7965                },
7966            };
7967
7968
7969                let computed = specified_value.to_computed_value(context);
7970                context.builder.set_isolation(computed)
7971        }
7972
7973        pub fn parse_declared<'i, 't>(
7974            context: &ParserContext,
7975            input: &mut Parser<'i, 't>,
7976        ) -> Result<PropertyDeclaration, ParseError<'i>> {
7977                parse(context, input)
7978                .map(PropertyDeclaration::Isolation)
7979        }
7980    }
7981
7982
7983
7984
7985    
7986        
7987    
7988
7989
7990
7991    
7992        
7993    
7994
7995
7996
7997    
7998        
7999    
8000
8001
8002// CSS Basic User Interface Module Level 3
8003// http://dev.w3.org/csswg/css-ui
8004
8005    
8006        
8007    
8008
8009
8010
8011    
8012        
8013    
8014    /// https://drafts.csswg.org/css-transforms/#perspective
8015    pub mod perspective {
8016        #[allow(unused_imports)]
8017        use cssparser::{Parser, BasicParseError, Token};
8018        #[allow(unused_imports)]
8019        use crate::parser::{Parse, ParserContext};
8020        #[allow(unused_imports)]
8021        use crate::properties::{UnparsedValue, ShorthandId};
8022        #[allow(unused_imports)]
8023        use crate::error_reporting::ParseErrorReporter;
8024        #[allow(unused_imports)]
8025        use crate::properties::longhands;
8026        #[allow(unused_imports)]
8027        use crate::properties::{LonghandId, LonghandIdSet};
8028        #[allow(unused_imports)]
8029        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
8030        #[allow(unused_imports)]
8031        use crate::properties::style_structs;
8032        #[allow(unused_imports)]
8033        use selectors::parser::SelectorParseErrorKind;
8034        #[allow(unused_imports)]
8035        use servo_arc::Arc;
8036        #[allow(unused_imports)]
8037        use style_traits::{ParseError, StyleParseErrorKind};
8038        #[allow(unused_imports)]
8039        use crate::values::computed::{Context, ToComputedValue};
8040        #[allow(unused_imports)]
8041        use crate::values::{computed, generics, specified};
8042        #[allow(unused_imports)]
8043        use crate::Atom;
8044        
8045            
8046        #[allow(unused_imports)]
8047        use app_units::Au;
8048        #[allow(unused_imports)]
8049        use crate::values::specified::AllowQuirks;
8050        #[allow(unused_imports)]
8051        use crate::Zero;
8052        #[allow(unused_imports)]
8053        use smallvec::SmallVec;
8054        pub use crate::values::specified::Perspective as SpecifiedValue;
8055        pub mod computed_value {
8056            pub use crate::values::computed::Perspective as T;
8057        }
8058        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Perspective::none() }
8059        #[allow(unused_variables)]
8060        #[inline]
8061        pub fn parse<'i, 't>(
8062            context: &ParserContext,
8063            input: &mut Parser<'i, 't>,
8064        ) -> Result<SpecifiedValue, ParseError<'i>> {
8065            <specified::Perspective as crate::parser::Parse>::parse(context, input)
8066        }
8067    
8068        
8069        #[allow(unused_variables)]
8070        pub unsafe fn cascade_property(
8071            declaration: &PropertyDeclaration,
8072            context: &mut computed::Context,
8073        ) {
8074            context.for_non_inherited_property = true;
8075            debug_assert_eq!(
8076                declaration.id().as_longhand().unwrap(),
8077                LonghandId::Perspective,
8078            );
8079            let specified_value = match *declaration {
8080                PropertyDeclaration::CSSWideKeyword(ref wk) => {
8081                    match wk.keyword {
8082                        CSSWideKeyword::Unset |
8083                        CSSWideKeyword::Initial => {
8084                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
8085                        },
8086                        CSSWideKeyword::Inherit => {
8087                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
8088                                context.builder.inherit_perspective();
8089                        }
8090                        CSSWideKeyword::RevertLayer |
8091                        CSSWideKeyword::Revert => {
8092                            declaration.debug_crash("Found revert/revert-layer not dealt with");
8093                        },
8094                    }
8095                    return;
8096                },
8097                #[cfg(debug_assertions)]
8098                PropertyDeclaration::WithVariables(..) => {
8099                    declaration.debug_crash("Found variables not substituted");
8100                    return;
8101                },
8102                _ => unsafe {
8103                    declaration.unchecked_value_as::<crate::values::specified::Perspective>()
8104                },
8105            };
8106
8107
8108                let computed = specified_value.to_computed_value(context);
8109                context.builder.set_perspective(computed)
8110        }
8111
8112        pub fn parse_declared<'i, 't>(
8113            context: &ParserContext,
8114            input: &mut Parser<'i, 't>,
8115        ) -> Result<PropertyDeclaration, ParseError<'i>> {
8116                parse(context, input)
8117                .map(PropertyDeclaration::Perspective)
8118        }
8119    }
8120
8121
8122
8123
8124    
8125        
8126    
8127    /// https://drafts.csswg.org/css-transforms-2/#perspective-origin-property
8128    pub mod perspective_origin {
8129        #[allow(unused_imports)]
8130        use cssparser::{Parser, BasicParseError, Token};
8131        #[allow(unused_imports)]
8132        use crate::parser::{Parse, ParserContext};
8133        #[allow(unused_imports)]
8134        use crate::properties::{UnparsedValue, ShorthandId};
8135        #[allow(unused_imports)]
8136        use crate::error_reporting::ParseErrorReporter;
8137        #[allow(unused_imports)]
8138        use crate::properties::longhands;
8139        #[allow(unused_imports)]
8140        use crate::properties::{LonghandId, LonghandIdSet};
8141        #[allow(unused_imports)]
8142        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
8143        #[allow(unused_imports)]
8144        use crate::properties::style_structs;
8145        #[allow(unused_imports)]
8146        use selectors::parser::SelectorParseErrorKind;
8147        #[allow(unused_imports)]
8148        use servo_arc::Arc;
8149        #[allow(unused_imports)]
8150        use style_traits::{ParseError, StyleParseErrorKind};
8151        #[allow(unused_imports)]
8152        use crate::values::computed::{Context, ToComputedValue};
8153        #[allow(unused_imports)]
8154        use crate::values::{computed, generics, specified};
8155        #[allow(unused_imports)]
8156        use crate::Atom;
8157        
8158            
8159        #[allow(unused_imports)]
8160        use app_units::Au;
8161        #[allow(unused_imports)]
8162        use crate::values::specified::AllowQuirks;
8163        #[allow(unused_imports)]
8164        use crate::Zero;
8165        #[allow(unused_imports)]
8166        use smallvec::SmallVec;
8167        pub use crate::values::specified::Position as SpecifiedValue;
8168        pub mod computed_value {
8169            pub use crate::values::computed::Position as T;
8170        }
8171        #[inline] pub fn get_initial_value() -> computed_value::T { computed::position::Position::center() }
8172        #[allow(unused_variables)]
8173        #[inline]
8174        pub fn parse<'i, 't>(
8175            context: &ParserContext,
8176            input: &mut Parser<'i, 't>,
8177        ) -> Result<SpecifiedValue, ParseError<'i>> {
8178            <specified::Position as crate::parser::Parse>::parse(context, input)
8179        }
8180    
8181        
8182        #[allow(unused_variables)]
8183        pub unsafe fn cascade_property(
8184            declaration: &PropertyDeclaration,
8185            context: &mut computed::Context,
8186        ) {
8187            context.for_non_inherited_property = true;
8188            debug_assert_eq!(
8189                declaration.id().as_longhand().unwrap(),
8190                LonghandId::PerspectiveOrigin,
8191            );
8192            let specified_value = match *declaration {
8193                PropertyDeclaration::CSSWideKeyword(ref wk) => {
8194                    match wk.keyword {
8195                        CSSWideKeyword::Unset |
8196                        CSSWideKeyword::Initial => {
8197                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
8198                        },
8199                        CSSWideKeyword::Inherit => {
8200                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
8201                                if !context.builder.effective_zoom_for_inheritance.is_one() {
8202                                    let old_zoom = context.builder.effective_zoom;
8203                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
8204                                    let computed = context.builder.inherited_style.clone_perspective_origin();
8205                                    let specified = ToComputedValue::from_computed_value(&computed);
8206                                    let specified = Box::new(specified);
8207                                    let decl = PropertyDeclaration::PerspectiveOrigin(specified);
8208                                    cascade_property(&decl, context);
8209                                    context.builder.effective_zoom = old_zoom;
8210                                    return;
8211                                }
8212                                context.builder.inherit_perspective_origin();
8213                        }
8214                        CSSWideKeyword::RevertLayer |
8215                        CSSWideKeyword::Revert => {
8216                            declaration.debug_crash("Found revert/revert-layer not dealt with");
8217                        },
8218                    }
8219                    return;
8220                },
8221                #[cfg(debug_assertions)]
8222                PropertyDeclaration::WithVariables(..) => {
8223                    declaration.debug_crash("Found variables not substituted");
8224                    return;
8225                },
8226                _ => unsafe {
8227                    declaration.unchecked_value_as::<Box<crate::values::specified::Position>>()
8228                },
8229            };
8230
8231
8232                let computed = (**specified_value).to_computed_value(context);
8233                context.builder.set_perspective_origin(computed)
8234        }
8235
8236        pub fn parse_declared<'i, 't>(
8237            context: &ParserContext,
8238            input: &mut Parser<'i, 't>,
8239        ) -> Result<PropertyDeclaration, ParseError<'i>> {
8240                parse(context, input)
8241                .map(Box::new)
8242                .map(PropertyDeclaration::PerspectiveOrigin)
8243        }
8244    }
8245
8246
8247
8248
8249    
8250
8251    
8252        
8253    
8254    /// https://drafts.csswg.org/css-transforms/#backface-visibility-property
8255    pub mod backface_visibility {
8256        #[allow(unused_imports)]
8257        use cssparser::{Parser, BasicParseError, Token};
8258        #[allow(unused_imports)]
8259        use crate::parser::{Parse, ParserContext};
8260        #[allow(unused_imports)]
8261        use crate::properties::{UnparsedValue, ShorthandId};
8262        #[allow(unused_imports)]
8263        use crate::error_reporting::ParseErrorReporter;
8264        #[allow(unused_imports)]
8265        use crate::properties::longhands;
8266        #[allow(unused_imports)]
8267        use crate::properties::{LonghandId, LonghandIdSet};
8268        #[allow(unused_imports)]
8269        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
8270        #[allow(unused_imports)]
8271        use crate::properties::style_structs;
8272        #[allow(unused_imports)]
8273        use selectors::parser::SelectorParseErrorKind;
8274        #[allow(unused_imports)]
8275        use servo_arc::Arc;
8276        #[allow(unused_imports)]
8277        use style_traits::{ParseError, StyleParseErrorKind};
8278        #[allow(unused_imports)]
8279        use crate::values::computed::{Context, ToComputedValue};
8280        #[allow(unused_imports)]
8281        use crate::values::{computed, generics, specified};
8282        #[allow(unused_imports)]
8283        use crate::Atom;
8284        
8285            
8286        pub use self::computed_value::T as SpecifiedValue;
8287        pub mod computed_value {
8288            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
8289            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
8290            pub enum T {
8291            
8292            Visible,
8293            
8294            Hidden,
8295            }
8296        }
8297        #[inline]
8298        pub fn get_initial_value() -> computed_value::T {
8299            computed_value::T::Visible
8300        }
8301        #[inline]
8302        pub fn get_initial_specified_value() -> SpecifiedValue {
8303            SpecifiedValue::Visible
8304        }
8305        #[inline]
8306        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
8307                             -> Result<SpecifiedValue, ParseError<'i>> {
8308            SpecifiedValue::parse(input)
8309        }
8310
8311    
8312        
8313        #[allow(unused_variables)]
8314        pub unsafe fn cascade_property(
8315            declaration: &PropertyDeclaration,
8316            context: &mut computed::Context,
8317        ) {
8318            context.for_non_inherited_property = true;
8319            debug_assert_eq!(
8320                declaration.id().as_longhand().unwrap(),
8321                LonghandId::BackfaceVisibility,
8322            );
8323            let specified_value = match *declaration {
8324                PropertyDeclaration::CSSWideKeyword(ref wk) => {
8325                    match wk.keyword {
8326                        CSSWideKeyword::Unset |
8327                        CSSWideKeyword::Initial => {
8328                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
8329                        },
8330                        CSSWideKeyword::Inherit => {
8331                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
8332                                context.builder.inherit_backface_visibility();
8333                        }
8334                        CSSWideKeyword::RevertLayer |
8335                        CSSWideKeyword::Revert => {
8336                            declaration.debug_crash("Found revert/revert-layer not dealt with");
8337                        },
8338                    }
8339                    return;
8340                },
8341                #[cfg(debug_assertions)]
8342                PropertyDeclaration::WithVariables(..) => {
8343                    declaration.debug_crash("Found variables not substituted");
8344                    return;
8345                },
8346                _ => unsafe {
8347                    declaration.unchecked_value_as::<longhands::backface_visibility::SpecifiedValue>()
8348                },
8349            };
8350
8351
8352                let computed = specified_value.to_computed_value(context);
8353                context.builder.set_backface_visibility(computed)
8354        }
8355
8356        pub fn parse_declared<'i, 't>(
8357            context: &ParserContext,
8358            input: &mut Parser<'i, 't>,
8359        ) -> Result<PropertyDeclaration, ParseError<'i>> {
8360                parse(context, input)
8361                .map(PropertyDeclaration::BackfaceVisibility)
8362        }
8363    }
8364
8365
8366
8367
8368    
8369        
8370    
8371
8372
8373
8374    
8375        
8376    
8377    /// https://drafts.csswg.org/css-transforms-2/#transform-style-property
8378    pub mod transform_style {
8379        #[allow(unused_imports)]
8380        use cssparser::{Parser, BasicParseError, Token};
8381        #[allow(unused_imports)]
8382        use crate::parser::{Parse, ParserContext};
8383        #[allow(unused_imports)]
8384        use crate::properties::{UnparsedValue, ShorthandId};
8385        #[allow(unused_imports)]
8386        use crate::error_reporting::ParseErrorReporter;
8387        #[allow(unused_imports)]
8388        use crate::properties::longhands;
8389        #[allow(unused_imports)]
8390        use crate::properties::{LonghandId, LonghandIdSet};
8391        #[allow(unused_imports)]
8392        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
8393        #[allow(unused_imports)]
8394        use crate::properties::style_structs;
8395        #[allow(unused_imports)]
8396        use selectors::parser::SelectorParseErrorKind;
8397        #[allow(unused_imports)]
8398        use servo_arc::Arc;
8399        #[allow(unused_imports)]
8400        use style_traits::{ParseError, StyleParseErrorKind};
8401        #[allow(unused_imports)]
8402        use crate::values::computed::{Context, ToComputedValue};
8403        #[allow(unused_imports)]
8404        use crate::values::{computed, generics, specified};
8405        #[allow(unused_imports)]
8406        use crate::Atom;
8407        
8408            
8409        #[allow(unused_imports)]
8410        use app_units::Au;
8411        #[allow(unused_imports)]
8412        use crate::values::specified::AllowQuirks;
8413        #[allow(unused_imports)]
8414        use crate::Zero;
8415        #[allow(unused_imports)]
8416        use smallvec::SmallVec;
8417        pub use crate::values::specified::TransformStyle as SpecifiedValue;
8418        pub mod computed_value {
8419            pub use crate::values::computed::TransformStyle as T;
8420        }
8421        #[inline] pub fn get_initial_value() -> computed_value::T { computed::TransformStyle::Flat }
8422        #[allow(unused_variables)]
8423        #[inline]
8424        pub fn parse<'i, 't>(
8425            context: &ParserContext,
8426            input: &mut Parser<'i, 't>,
8427        ) -> Result<SpecifiedValue, ParseError<'i>> {
8428            <specified::TransformStyle as crate::parser::Parse>::parse(context, input)
8429        }
8430    
8431        
8432        #[allow(unused_variables)]
8433        pub unsafe fn cascade_property(
8434            declaration: &PropertyDeclaration,
8435            context: &mut computed::Context,
8436        ) {
8437            context.for_non_inherited_property = true;
8438            debug_assert_eq!(
8439                declaration.id().as_longhand().unwrap(),
8440                LonghandId::TransformStyle,
8441            );
8442            let specified_value = match *declaration {
8443                PropertyDeclaration::CSSWideKeyword(ref wk) => {
8444                    match wk.keyword {
8445                        CSSWideKeyword::Unset |
8446                        CSSWideKeyword::Initial => {
8447                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
8448                        },
8449                        CSSWideKeyword::Inherit => {
8450                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
8451                                context.builder.inherit_transform_style();
8452                        }
8453                        CSSWideKeyword::RevertLayer |
8454                        CSSWideKeyword::Revert => {
8455                            declaration.debug_crash("Found revert/revert-layer not dealt with");
8456                        },
8457                    }
8458                    return;
8459                },
8460                #[cfg(debug_assertions)]
8461                PropertyDeclaration::WithVariables(..) => {
8462                    declaration.debug_crash("Found variables not substituted");
8463                    return;
8464                },
8465                _ => unsafe {
8466                    declaration.unchecked_value_as::<crate::values::specified::TransformStyle>()
8467                },
8468            };
8469
8470
8471                let computed = specified_value.to_computed_value(context);
8472                context.builder.set_transform_style(computed)
8473        }
8474
8475        pub fn parse_declared<'i, 't>(
8476            context: &ParserContext,
8477            input: &mut Parser<'i, 't>,
8478        ) -> Result<PropertyDeclaration, ParseError<'i>> {
8479                parse(context, input)
8480                .map(PropertyDeclaration::TransformStyle)
8481        }
8482    }
8483
8484
8485
8486
8487    
8488        
8489    
8490    /// https://drafts.csswg.org/css-transforms/#transform-origin-property
8491    pub mod transform_origin {
8492        #[allow(unused_imports)]
8493        use cssparser::{Parser, BasicParseError, Token};
8494        #[allow(unused_imports)]
8495        use crate::parser::{Parse, ParserContext};
8496        #[allow(unused_imports)]
8497        use crate::properties::{UnparsedValue, ShorthandId};
8498        #[allow(unused_imports)]
8499        use crate::error_reporting::ParseErrorReporter;
8500        #[allow(unused_imports)]
8501        use crate::properties::longhands;
8502        #[allow(unused_imports)]
8503        use crate::properties::{LonghandId, LonghandIdSet};
8504        #[allow(unused_imports)]
8505        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
8506        #[allow(unused_imports)]
8507        use crate::properties::style_structs;
8508        #[allow(unused_imports)]
8509        use selectors::parser::SelectorParseErrorKind;
8510        #[allow(unused_imports)]
8511        use servo_arc::Arc;
8512        #[allow(unused_imports)]
8513        use style_traits::{ParseError, StyleParseErrorKind};
8514        #[allow(unused_imports)]
8515        use crate::values::computed::{Context, ToComputedValue};
8516        #[allow(unused_imports)]
8517        use crate::values::{computed, generics, specified};
8518        #[allow(unused_imports)]
8519        use crate::Atom;
8520        
8521            
8522        #[allow(unused_imports)]
8523        use app_units::Au;
8524        #[allow(unused_imports)]
8525        use crate::values::specified::AllowQuirks;
8526        #[allow(unused_imports)]
8527        use crate::Zero;
8528        #[allow(unused_imports)]
8529        use smallvec::SmallVec;
8530        pub use crate::values::specified::TransformOrigin as SpecifiedValue;
8531        pub mod computed_value {
8532            pub use crate::values::computed::TransformOrigin as T;
8533        }
8534        #[inline] pub fn get_initial_value() -> computed_value::T { computed::TransformOrigin::initial_value() }
8535        #[allow(unused_variables)]
8536        #[inline]
8537        pub fn parse<'i, 't>(
8538            context: &ParserContext,
8539            input: &mut Parser<'i, 't>,
8540        ) -> Result<SpecifiedValue, ParseError<'i>> {
8541            <specified::TransformOrigin as crate::parser::Parse>::parse(context, input)
8542        }
8543    
8544        
8545        #[allow(unused_variables)]
8546        pub unsafe fn cascade_property(
8547            declaration: &PropertyDeclaration,
8548            context: &mut computed::Context,
8549        ) {
8550            context.for_non_inherited_property = true;
8551            debug_assert_eq!(
8552                declaration.id().as_longhand().unwrap(),
8553                LonghandId::TransformOrigin,
8554            );
8555            let specified_value = match *declaration {
8556                PropertyDeclaration::CSSWideKeyword(ref wk) => {
8557                    match wk.keyword {
8558                        CSSWideKeyword::Unset |
8559                        CSSWideKeyword::Initial => {
8560                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
8561                        },
8562                        CSSWideKeyword::Inherit => {
8563                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
8564                                context.builder.inherit_transform_origin();
8565                        }
8566                        CSSWideKeyword::RevertLayer |
8567                        CSSWideKeyword::Revert => {
8568                            declaration.debug_crash("Found revert/revert-layer not dealt with");
8569                        },
8570                    }
8571                    return;
8572                },
8573                #[cfg(debug_assertions)]
8574                PropertyDeclaration::WithVariables(..) => {
8575                    declaration.debug_crash("Found variables not substituted");
8576                    return;
8577                },
8578                _ => unsafe {
8579                    declaration.unchecked_value_as::<Box<crate::values::specified::TransformOrigin>>()
8580                },
8581            };
8582
8583
8584                let computed = (**specified_value).to_computed_value(context);
8585                context.builder.set_transform_origin(computed)
8586        }
8587
8588        pub fn parse_declared<'i, 't>(
8589            context: &ParserContext,
8590            input: &mut Parser<'i, 't>,
8591        ) -> Result<PropertyDeclaration, ParseError<'i>> {
8592                parse(context, input)
8593                .map(Box::new)
8594                .map(PropertyDeclaration::TransformOrigin)
8595        }
8596    }
8597
8598
8599
8600
8601    
8602        
8603    
8604    /// https://drafts.csswg.org/css-contain/#contain-property
8605    pub mod contain {
8606        #[allow(unused_imports)]
8607        use cssparser::{Parser, BasicParseError, Token};
8608        #[allow(unused_imports)]
8609        use crate::parser::{Parse, ParserContext};
8610        #[allow(unused_imports)]
8611        use crate::properties::{UnparsedValue, ShorthandId};
8612        #[allow(unused_imports)]
8613        use crate::error_reporting::ParseErrorReporter;
8614        #[allow(unused_imports)]
8615        use crate::properties::longhands;
8616        #[allow(unused_imports)]
8617        use crate::properties::{LonghandId, LonghandIdSet};
8618        #[allow(unused_imports)]
8619        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
8620        #[allow(unused_imports)]
8621        use crate::properties::style_structs;
8622        #[allow(unused_imports)]
8623        use selectors::parser::SelectorParseErrorKind;
8624        #[allow(unused_imports)]
8625        use servo_arc::Arc;
8626        #[allow(unused_imports)]
8627        use style_traits::{ParseError, StyleParseErrorKind};
8628        #[allow(unused_imports)]
8629        use crate::values::computed::{Context, ToComputedValue};
8630        #[allow(unused_imports)]
8631        use crate::values::{computed, generics, specified};
8632        #[allow(unused_imports)]
8633        use crate::Atom;
8634        
8635            
8636        #[allow(unused_imports)]
8637        use app_units::Au;
8638        #[allow(unused_imports)]
8639        use crate::values::specified::AllowQuirks;
8640        #[allow(unused_imports)]
8641        use crate::Zero;
8642        #[allow(unused_imports)]
8643        use smallvec::SmallVec;
8644        pub use crate::values::specified::Contain as SpecifiedValue;
8645        pub mod computed_value {
8646            pub use crate::values::computed::Contain as T;
8647        }
8648        #[inline] pub fn get_initial_value() -> computed_value::T { specified::Contain::empty() }
8649        #[allow(unused_variables)]
8650        #[inline]
8651        pub fn parse<'i, 't>(
8652            context: &ParserContext,
8653            input: &mut Parser<'i, 't>,
8654        ) -> Result<SpecifiedValue, ParseError<'i>> {
8655            <specified::Contain as crate::parser::Parse>::parse(context, input)
8656        }
8657    
8658        
8659        #[allow(unused_variables)]
8660        pub unsafe fn cascade_property(
8661            declaration: &PropertyDeclaration,
8662            context: &mut computed::Context,
8663        ) {
8664            context.for_non_inherited_property = true;
8665            debug_assert_eq!(
8666                declaration.id().as_longhand().unwrap(),
8667                LonghandId::Contain,
8668            );
8669            let specified_value = match *declaration {
8670                PropertyDeclaration::CSSWideKeyword(ref wk) => {
8671                    match wk.keyword {
8672                        CSSWideKeyword::Unset |
8673                        CSSWideKeyword::Initial => {
8674                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
8675                        },
8676                        CSSWideKeyword::Inherit => {
8677                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
8678                                context.builder.inherit_contain();
8679                        }
8680                        CSSWideKeyword::RevertLayer |
8681                        CSSWideKeyword::Revert => {
8682                            declaration.debug_crash("Found revert/revert-layer not dealt with");
8683                        },
8684                    }
8685                    return;
8686                },
8687                #[cfg(debug_assertions)]
8688                PropertyDeclaration::WithVariables(..) => {
8689                    declaration.debug_crash("Found variables not substituted");
8690                    return;
8691                },
8692                _ => unsafe {
8693                    declaration.unchecked_value_as::<crate::values::specified::Contain>()
8694                },
8695            };
8696
8697
8698                let computed = specified_value.to_computed_value(context);
8699                context.builder.set_contain(computed)
8700        }
8701
8702        pub fn parse_declared<'i, 't>(
8703            context: &ParserContext,
8704            input: &mut Parser<'i, 't>,
8705        ) -> Result<PropertyDeclaration, ParseError<'i>> {
8706                parse(context, input)
8707                .map(PropertyDeclaration::Contain)
8708        }
8709    }
8710
8711
8712
8713
8714    
8715        
8716    
8717
8718
8719
8720    
8721        
8722    
8723    /// https://drafts.csswg.org/css-contain-3/#container-type
8724    pub mod container_type {
8725        #[allow(unused_imports)]
8726        use cssparser::{Parser, BasicParseError, Token};
8727        #[allow(unused_imports)]
8728        use crate::parser::{Parse, ParserContext};
8729        #[allow(unused_imports)]
8730        use crate::properties::{UnparsedValue, ShorthandId};
8731        #[allow(unused_imports)]
8732        use crate::error_reporting::ParseErrorReporter;
8733        #[allow(unused_imports)]
8734        use crate::properties::longhands;
8735        #[allow(unused_imports)]
8736        use crate::properties::{LonghandId, LonghandIdSet};
8737        #[allow(unused_imports)]
8738        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
8739        #[allow(unused_imports)]
8740        use crate::properties::style_structs;
8741        #[allow(unused_imports)]
8742        use selectors::parser::SelectorParseErrorKind;
8743        #[allow(unused_imports)]
8744        use servo_arc::Arc;
8745        #[allow(unused_imports)]
8746        use style_traits::{ParseError, StyleParseErrorKind};
8747        #[allow(unused_imports)]
8748        use crate::values::computed::{Context, ToComputedValue};
8749        #[allow(unused_imports)]
8750        use crate::values::{computed, generics, specified};
8751        #[allow(unused_imports)]
8752        use crate::Atom;
8753        
8754            
8755        #[allow(unused_imports)]
8756        use app_units::Au;
8757        #[allow(unused_imports)]
8758        use crate::values::specified::AllowQuirks;
8759        #[allow(unused_imports)]
8760        use crate::Zero;
8761        #[allow(unused_imports)]
8762        use smallvec::SmallVec;
8763        pub use crate::values::specified::ContainerType as SpecifiedValue;
8764        pub mod computed_value {
8765            pub use crate::values::computed::ContainerType as T;
8766        }
8767        #[inline] pub fn get_initial_value() -> computed_value::T { computed::ContainerType::NORMAL }
8768        #[allow(unused_variables)]
8769        #[inline]
8770        pub fn parse<'i, 't>(
8771            context: &ParserContext,
8772            input: &mut Parser<'i, 't>,
8773        ) -> Result<SpecifiedValue, ParseError<'i>> {
8774            <specified::ContainerType as crate::parser::Parse>::parse(context, input)
8775        }
8776    
8777        
8778        #[allow(unused_variables)]
8779        pub unsafe fn cascade_property(
8780            declaration: &PropertyDeclaration,
8781            context: &mut computed::Context,
8782        ) {
8783            context.for_non_inherited_property = true;
8784            debug_assert_eq!(
8785                declaration.id().as_longhand().unwrap(),
8786                LonghandId::ContainerType,
8787            );
8788            let specified_value = match *declaration {
8789                PropertyDeclaration::CSSWideKeyword(ref wk) => {
8790                    match wk.keyword {
8791                        CSSWideKeyword::Unset |
8792                        CSSWideKeyword::Initial => {
8793                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
8794                        },
8795                        CSSWideKeyword::Inherit => {
8796                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
8797                                context.builder.inherit_container_type();
8798                        }
8799                        CSSWideKeyword::RevertLayer |
8800                        CSSWideKeyword::Revert => {
8801                            declaration.debug_crash("Found revert/revert-layer not dealt with");
8802                        },
8803                    }
8804                    return;
8805                },
8806                #[cfg(debug_assertions)]
8807                PropertyDeclaration::WithVariables(..) => {
8808                    declaration.debug_crash("Found variables not substituted");
8809                    return;
8810                },
8811                _ => unsafe {
8812                    declaration.unchecked_value_as::<crate::values::specified::ContainerType>()
8813                },
8814            };
8815
8816
8817                let computed = specified_value.to_computed_value(context);
8818                context.builder.set_container_type(computed)
8819        }
8820
8821        pub fn parse_declared<'i, 't>(
8822            context: &ParserContext,
8823            input: &mut Parser<'i, 't>,
8824        ) -> Result<PropertyDeclaration, ParseError<'i>> {
8825                parse(context, input)
8826                .map(PropertyDeclaration::ContainerType)
8827        }
8828    }
8829
8830
8831
8832
8833    
8834        
8835    
8836    /// https://drafts.csswg.org/css-contain-3/#container-name
8837    pub mod container_name {
8838        #[allow(unused_imports)]
8839        use cssparser::{Parser, BasicParseError, Token};
8840        #[allow(unused_imports)]
8841        use crate::parser::{Parse, ParserContext};
8842        #[allow(unused_imports)]
8843        use crate::properties::{UnparsedValue, ShorthandId};
8844        #[allow(unused_imports)]
8845        use crate::error_reporting::ParseErrorReporter;
8846        #[allow(unused_imports)]
8847        use crate::properties::longhands;
8848        #[allow(unused_imports)]
8849        use crate::properties::{LonghandId, LonghandIdSet};
8850        #[allow(unused_imports)]
8851        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
8852        #[allow(unused_imports)]
8853        use crate::properties::style_structs;
8854        #[allow(unused_imports)]
8855        use selectors::parser::SelectorParseErrorKind;
8856        #[allow(unused_imports)]
8857        use servo_arc::Arc;
8858        #[allow(unused_imports)]
8859        use style_traits::{ParseError, StyleParseErrorKind};
8860        #[allow(unused_imports)]
8861        use crate::values::computed::{Context, ToComputedValue};
8862        #[allow(unused_imports)]
8863        use crate::values::{computed, generics, specified};
8864        #[allow(unused_imports)]
8865        use crate::Atom;
8866        
8867            
8868        #[allow(unused_imports)]
8869        use app_units::Au;
8870        #[allow(unused_imports)]
8871        use crate::values::specified::AllowQuirks;
8872        #[allow(unused_imports)]
8873        use crate::Zero;
8874        #[allow(unused_imports)]
8875        use smallvec::SmallVec;
8876        pub use crate::values::specified::ContainerName as SpecifiedValue;
8877        pub mod computed_value {
8878            pub use crate::values::computed::ContainerName as T;
8879        }
8880        #[inline] pub fn get_initial_value() -> computed_value::T { computed::ContainerName::none() }
8881        #[allow(unused_variables)]
8882        #[inline]
8883        pub fn parse<'i, 't>(
8884            context: &ParserContext,
8885            input: &mut Parser<'i, 't>,
8886        ) -> Result<SpecifiedValue, ParseError<'i>> {
8887            <specified::ContainerName as crate::parser::Parse>::parse(context, input)
8888        }
8889    
8890        
8891        #[allow(unused_variables)]
8892        pub unsafe fn cascade_property(
8893            declaration: &PropertyDeclaration,
8894            context: &mut computed::Context,
8895        ) {
8896            context.for_non_inherited_property = true;
8897            debug_assert_eq!(
8898                declaration.id().as_longhand().unwrap(),
8899                LonghandId::ContainerName,
8900            );
8901            let specified_value = match *declaration {
8902                PropertyDeclaration::CSSWideKeyword(ref wk) => {
8903                    match wk.keyword {
8904                        CSSWideKeyword::Unset |
8905                        CSSWideKeyword::Initial => {
8906                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
8907                        },
8908                        CSSWideKeyword::Inherit => {
8909                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
8910                                context.builder.inherit_container_name();
8911                        }
8912                        CSSWideKeyword::RevertLayer |
8913                        CSSWideKeyword::Revert => {
8914                            declaration.debug_crash("Found revert/revert-layer not dealt with");
8915                        },
8916                    }
8917                    return;
8918                },
8919                #[cfg(debug_assertions)]
8920                PropertyDeclaration::WithVariables(..) => {
8921                    declaration.debug_crash("Found variables not substituted");
8922                    return;
8923                },
8924                _ => unsafe {
8925                    declaration.unchecked_value_as::<crate::values::specified::ContainerName>()
8926                },
8927            };
8928
8929
8930                let computed = specified_value.to_computed_value(context);
8931                context.builder.set_container_name(computed)
8932        }
8933
8934        pub fn parse_declared<'i, 't>(
8935            context: &ParserContext,
8936            input: &mut Parser<'i, 't>,
8937        ) -> Result<PropertyDeclaration, ParseError<'i>> {
8938                parse(context, input)
8939                .map(PropertyDeclaration::ContainerName)
8940        }
8941    }
8942
8943
8944
8945
8946    
8947        
8948    
8949
8950
8951// The inherent widget type of an element, selected by specifying
8952// `appearance: auto`.
8953
8954    
8955        
8956    
8957
8958
8959
8960    
8961
8962    
8963        
8964    
8965
8966
8967
8968    
8969        
8970    
8971    /// https://drafts.csswg.org/css-will-change/#will-change
8972    pub mod will_change {
8973        #[allow(unused_imports)]
8974        use cssparser::{Parser, BasicParseError, Token};
8975        #[allow(unused_imports)]
8976        use crate::parser::{Parse, ParserContext};
8977        #[allow(unused_imports)]
8978        use crate::properties::{UnparsedValue, ShorthandId};
8979        #[allow(unused_imports)]
8980        use crate::error_reporting::ParseErrorReporter;
8981        #[allow(unused_imports)]
8982        use crate::properties::longhands;
8983        #[allow(unused_imports)]
8984        use crate::properties::{LonghandId, LonghandIdSet};
8985        #[allow(unused_imports)]
8986        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
8987        #[allow(unused_imports)]
8988        use crate::properties::style_structs;
8989        #[allow(unused_imports)]
8990        use selectors::parser::SelectorParseErrorKind;
8991        #[allow(unused_imports)]
8992        use servo_arc::Arc;
8993        #[allow(unused_imports)]
8994        use style_traits::{ParseError, StyleParseErrorKind};
8995        #[allow(unused_imports)]
8996        use crate::values::computed::{Context, ToComputedValue};
8997        #[allow(unused_imports)]
8998        use crate::values::{computed, generics, specified};
8999        #[allow(unused_imports)]
9000        use crate::Atom;
9001        
9002            
9003        #[allow(unused_imports)]
9004        use app_units::Au;
9005        #[allow(unused_imports)]
9006        use crate::values::specified::AllowQuirks;
9007        #[allow(unused_imports)]
9008        use crate::Zero;
9009        #[allow(unused_imports)]
9010        use smallvec::SmallVec;
9011        pub use crate::values::specified::WillChange as SpecifiedValue;
9012        pub mod computed_value {
9013            pub use crate::values::computed::WillChange as T;
9014        }
9015        #[inline] pub fn get_initial_value() -> computed_value::T { computed::WillChange::auto() }
9016        #[allow(unused_variables)]
9017        #[inline]
9018        pub fn parse<'i, 't>(
9019            context: &ParserContext,
9020            input: &mut Parser<'i, 't>,
9021        ) -> Result<SpecifiedValue, ParseError<'i>> {
9022            <specified::WillChange as crate::parser::Parse>::parse(context, input)
9023        }
9024    
9025        
9026        #[allow(unused_variables)]
9027        pub unsafe fn cascade_property(
9028            declaration: &PropertyDeclaration,
9029            context: &mut computed::Context,
9030        ) {
9031            context.for_non_inherited_property = true;
9032            debug_assert_eq!(
9033                declaration.id().as_longhand().unwrap(),
9034                LonghandId::WillChange,
9035            );
9036            let specified_value = match *declaration {
9037                PropertyDeclaration::CSSWideKeyword(ref wk) => {
9038                    match wk.keyword {
9039                        CSSWideKeyword::Unset |
9040                        CSSWideKeyword::Initial => {
9041                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
9042                        },
9043                        CSSWideKeyword::Inherit => {
9044                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
9045                                context.builder.inherit_will_change();
9046                        }
9047                        CSSWideKeyword::RevertLayer |
9048                        CSSWideKeyword::Revert => {
9049                            declaration.debug_crash("Found revert/revert-layer not dealt with");
9050                        },
9051                    }
9052                    return;
9053                },
9054                #[cfg(debug_assertions)]
9055                PropertyDeclaration::WithVariables(..) => {
9056                    declaration.debug_crash("Found variables not substituted");
9057                    return;
9058                },
9059                _ => unsafe {
9060                    declaration.unchecked_value_as::<crate::values::specified::WillChange>()
9061                },
9062            };
9063
9064
9065                let computed = specified_value.to_computed_value(context);
9066                context.builder.set_will_change(computed)
9067        }
9068
9069        pub fn parse_declared<'i, 't>(
9070            context: &ParserContext,
9071            input: &mut Parser<'i, 't>,
9072        ) -> Result<PropertyDeclaration, ParseError<'i>> {
9073                parse(context, input)
9074                .map(PropertyDeclaration::WillChange)
9075        }
9076    }
9077
9078
9079
9080// The spec issue for the parse_method: https://github.com/w3c/csswg-drafts/issues/4102.
9081
9082    
9083        
9084    
9085
9086
9087
9088    
9089        
9090    
9091
9092
9093
9094    
9095        
9096    
9097
9098
9099
9100    
9101        
9102    
9103
9104
9105
9106    
9107        
9108    
9109
9110
9111
9112    
9113        
9114    
9115
9116
9117
9118    
9119        
9120    
9121    /// Non-standard (https://github.com/atanassov/css-zoom/ is the closest)
9122    pub mod zoom {
9123        #[allow(unused_imports)]
9124        use cssparser::{Parser, BasicParseError, Token};
9125        #[allow(unused_imports)]
9126        use crate::parser::{Parse, ParserContext};
9127        #[allow(unused_imports)]
9128        use crate::properties::{UnparsedValue, ShorthandId};
9129        #[allow(unused_imports)]
9130        use crate::error_reporting::ParseErrorReporter;
9131        #[allow(unused_imports)]
9132        use crate::properties::longhands;
9133        #[allow(unused_imports)]
9134        use crate::properties::{LonghandId, LonghandIdSet};
9135        #[allow(unused_imports)]
9136        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
9137        #[allow(unused_imports)]
9138        use crate::properties::style_structs;
9139        #[allow(unused_imports)]
9140        use selectors::parser::SelectorParseErrorKind;
9141        #[allow(unused_imports)]
9142        use servo_arc::Arc;
9143        #[allow(unused_imports)]
9144        use style_traits::{ParseError, StyleParseErrorKind};
9145        #[allow(unused_imports)]
9146        use crate::values::computed::{Context, ToComputedValue};
9147        #[allow(unused_imports)]
9148        use crate::values::{computed, generics, specified};
9149        #[allow(unused_imports)]
9150        use crate::Atom;
9151        
9152            
9153        #[allow(unused_imports)]
9154        use app_units::Au;
9155        #[allow(unused_imports)]
9156        use crate::values::specified::AllowQuirks;
9157        #[allow(unused_imports)]
9158        use crate::Zero;
9159        #[allow(unused_imports)]
9160        use smallvec::SmallVec;
9161        pub use crate::values::specified::Zoom as SpecifiedValue;
9162        pub mod computed_value {
9163            pub use crate::values::computed::Zoom as T;
9164        }
9165        #[inline] pub fn get_initial_value() -> computed_value::T { computed::box_::Zoom::ONE }
9166        #[allow(unused_variables)]
9167        #[inline]
9168        pub fn parse<'i, 't>(
9169            context: &ParserContext,
9170            input: &mut Parser<'i, 't>,
9171        ) -> Result<SpecifiedValue, ParseError<'i>> {
9172            <specified::Zoom as crate::parser::Parse>::parse(context, input)
9173        }
9174    
9175        
9176        #[allow(unused_variables)]
9177        pub unsafe fn cascade_property(
9178            declaration: &PropertyDeclaration,
9179            context: &mut computed::Context,
9180        ) {
9181            context.for_non_inherited_property = true;
9182            debug_assert_eq!(
9183                declaration.id().as_longhand().unwrap(),
9184                LonghandId::Zoom,
9185            );
9186            let specified_value = match *declaration {
9187                PropertyDeclaration::CSSWideKeyword(ref wk) => {
9188                    match wk.keyword {
9189                        CSSWideKeyword::Unset |
9190                        CSSWideKeyword::Initial => {
9191                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
9192                        },
9193                        CSSWideKeyword::Inherit => {
9194                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
9195                                context.builder.inherit_zoom();
9196                        }
9197                        CSSWideKeyword::RevertLayer |
9198                        CSSWideKeyword::Revert => {
9199                            declaration.debug_crash("Found revert/revert-layer not dealt with");
9200                        },
9201                    }
9202                    return;
9203                },
9204                #[cfg(debug_assertions)]
9205                PropertyDeclaration::WithVariables(..) => {
9206                    declaration.debug_crash("Found variables not substituted");
9207                    return;
9208                },
9209                _ => unsafe {
9210                    declaration.unchecked_value_as::<crate::values::specified::Zoom>()
9211                },
9212            };
9213
9214
9215                let computed = specified_value.to_computed_value(context);
9216                context.builder.set_zoom(computed)
9217        }
9218
9219        pub fn parse_declared<'i, 't>(
9220            context: &ParserContext,
9221            input: &mut Parser<'i, 't>,
9222        ) -> Result<PropertyDeclaration, ParseError<'i>> {
9223                parse(context, input)
9224                .map(PropertyDeclaration::Zoom)
9225        }
9226    }
9227
9228
9229
9230    
9231    /* This Source Code Form is subject to the terms of the Mozilla Public
9232 * License, v. 2.0. If a copy of the MPL was not distributed with this
9233 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
9234
9235
9236
9237
9238    
9239        
9240    
9241    /// https://drafts.csswg.org/css-multicol/#propdef-column-width
9242    pub mod column_width {
9243        #[allow(unused_imports)]
9244        use cssparser::{Parser, BasicParseError, Token};
9245        #[allow(unused_imports)]
9246        use crate::parser::{Parse, ParserContext};
9247        #[allow(unused_imports)]
9248        use crate::properties::{UnparsedValue, ShorthandId};
9249        #[allow(unused_imports)]
9250        use crate::error_reporting::ParseErrorReporter;
9251        #[allow(unused_imports)]
9252        use crate::properties::longhands;
9253        #[allow(unused_imports)]
9254        use crate::properties::{LonghandId, LonghandIdSet};
9255        #[allow(unused_imports)]
9256        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
9257        #[allow(unused_imports)]
9258        use crate::properties::style_structs;
9259        #[allow(unused_imports)]
9260        use selectors::parser::SelectorParseErrorKind;
9261        #[allow(unused_imports)]
9262        use servo_arc::Arc;
9263        #[allow(unused_imports)]
9264        use style_traits::{ParseError, StyleParseErrorKind};
9265        #[allow(unused_imports)]
9266        use crate::values::computed::{Context, ToComputedValue};
9267        #[allow(unused_imports)]
9268        use crate::values::{computed, generics, specified};
9269        #[allow(unused_imports)]
9270        use crate::Atom;
9271        
9272            
9273        #[allow(unused_imports)]
9274        use app_units::Au;
9275        #[allow(unused_imports)]
9276        use crate::values::specified::AllowQuirks;
9277        #[allow(unused_imports)]
9278        use crate::Zero;
9279        #[allow(unused_imports)]
9280        use smallvec::SmallVec;
9281        pub use crate::values::specified::length::NonNegativeLengthOrAuto as SpecifiedValue;
9282        pub mod computed_value {
9283            pub use crate::values::computed::length::NonNegativeLengthOrAuto as T;
9284        }
9285        #[inline] pub fn get_initial_value() -> computed_value::T { computed::length::NonNegativeLengthOrAuto::auto() }
9286        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::length::NonNegativeLengthOrAuto::auto() }
9287        #[allow(unused_variables)]
9288        #[inline]
9289        pub fn parse<'i, 't>(
9290            context: &ParserContext,
9291            input: &mut Parser<'i, 't>,
9292        ) -> Result<SpecifiedValue, ParseError<'i>> {
9293            <specified::length::NonNegativeLengthOrAuto as crate::parser::Parse>::parse(context, input)
9294        }
9295    
9296        
9297        #[allow(unused_variables)]
9298        pub unsafe fn cascade_property(
9299            declaration: &PropertyDeclaration,
9300            context: &mut computed::Context,
9301        ) {
9302            context.for_non_inherited_property = true;
9303            debug_assert_eq!(
9304                declaration.id().as_longhand().unwrap(),
9305                LonghandId::ColumnWidth,
9306            );
9307            let specified_value = match *declaration {
9308                PropertyDeclaration::CSSWideKeyword(ref wk) => {
9309                    match wk.keyword {
9310                        CSSWideKeyword::Unset |
9311                        CSSWideKeyword::Initial => {
9312                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
9313                        },
9314                        CSSWideKeyword::Inherit => {
9315                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
9316                                context.builder.inherit_column_width();
9317                        }
9318                        CSSWideKeyword::RevertLayer |
9319                        CSSWideKeyword::Revert => {
9320                            declaration.debug_crash("Found revert/revert-layer not dealt with");
9321                        },
9322                    }
9323                    return;
9324                },
9325                #[cfg(debug_assertions)]
9326                PropertyDeclaration::WithVariables(..) => {
9327                    declaration.debug_crash("Found variables not substituted");
9328                    return;
9329                },
9330                _ => unsafe {
9331                    declaration.unchecked_value_as::<crate::values::specified::length::NonNegativeLengthOrAuto>()
9332                },
9333            };
9334
9335
9336                let computed = specified_value.to_computed_value(context);
9337                context.builder.set_column_width(computed)
9338        }
9339
9340        pub fn parse_declared<'i, 't>(
9341            context: &ParserContext,
9342            input: &mut Parser<'i, 't>,
9343        ) -> Result<PropertyDeclaration, ParseError<'i>> {
9344                parse(context, input)
9345                .map(PropertyDeclaration::ColumnWidth)
9346        }
9347    }
9348
9349
9350
9351
9352    
9353        
9354    
9355    /// https://drafts.csswg.org/css-multicol/#propdef-column-count
9356    pub mod column_count {
9357        #[allow(unused_imports)]
9358        use cssparser::{Parser, BasicParseError, Token};
9359        #[allow(unused_imports)]
9360        use crate::parser::{Parse, ParserContext};
9361        #[allow(unused_imports)]
9362        use crate::properties::{UnparsedValue, ShorthandId};
9363        #[allow(unused_imports)]
9364        use crate::error_reporting::ParseErrorReporter;
9365        #[allow(unused_imports)]
9366        use crate::properties::longhands;
9367        #[allow(unused_imports)]
9368        use crate::properties::{LonghandId, LonghandIdSet};
9369        #[allow(unused_imports)]
9370        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
9371        #[allow(unused_imports)]
9372        use crate::properties::style_structs;
9373        #[allow(unused_imports)]
9374        use selectors::parser::SelectorParseErrorKind;
9375        #[allow(unused_imports)]
9376        use servo_arc::Arc;
9377        #[allow(unused_imports)]
9378        use style_traits::{ParseError, StyleParseErrorKind};
9379        #[allow(unused_imports)]
9380        use crate::values::computed::{Context, ToComputedValue};
9381        #[allow(unused_imports)]
9382        use crate::values::{computed, generics, specified};
9383        #[allow(unused_imports)]
9384        use crate::Atom;
9385        
9386            
9387        #[allow(unused_imports)]
9388        use app_units::Au;
9389        #[allow(unused_imports)]
9390        use crate::values::specified::AllowQuirks;
9391        #[allow(unused_imports)]
9392        use crate::Zero;
9393        #[allow(unused_imports)]
9394        use smallvec::SmallVec;
9395        pub use crate::values::specified::ColumnCount as SpecifiedValue;
9396        pub mod computed_value {
9397            pub use crate::values::computed::ColumnCount as T;
9398        }
9399        #[inline] pub fn get_initial_value() -> computed_value::T { computed::ColumnCount::Auto }
9400        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::ColumnCount::Auto }
9401        #[allow(unused_variables)]
9402        #[inline]
9403        pub fn parse<'i, 't>(
9404            context: &ParserContext,
9405            input: &mut Parser<'i, 't>,
9406        ) -> Result<SpecifiedValue, ParseError<'i>> {
9407            <specified::ColumnCount as crate::parser::Parse>::parse(context, input)
9408        }
9409    
9410        
9411        #[allow(unused_variables)]
9412        pub unsafe fn cascade_property(
9413            declaration: &PropertyDeclaration,
9414            context: &mut computed::Context,
9415        ) {
9416            context.for_non_inherited_property = true;
9417            debug_assert_eq!(
9418                declaration.id().as_longhand().unwrap(),
9419                LonghandId::ColumnCount,
9420            );
9421            let specified_value = match *declaration {
9422                PropertyDeclaration::CSSWideKeyword(ref wk) => {
9423                    match wk.keyword {
9424                        CSSWideKeyword::Unset |
9425                        CSSWideKeyword::Initial => {
9426                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
9427                        },
9428                        CSSWideKeyword::Inherit => {
9429                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
9430                                context.builder.inherit_column_count();
9431                        }
9432                        CSSWideKeyword::RevertLayer |
9433                        CSSWideKeyword::Revert => {
9434                            declaration.debug_crash("Found revert/revert-layer not dealt with");
9435                        },
9436                    }
9437                    return;
9438                },
9439                #[cfg(debug_assertions)]
9440                PropertyDeclaration::WithVariables(..) => {
9441                    declaration.debug_crash("Found variables not substituted");
9442                    return;
9443                },
9444                _ => unsafe {
9445                    declaration.unchecked_value_as::<crate::values::specified::ColumnCount>()
9446                },
9447            };
9448
9449
9450                let computed = specified_value.to_computed_value(context);
9451                context.builder.set_column_count(computed)
9452        }
9453
9454        pub fn parse_declared<'i, 't>(
9455            context: &ParserContext,
9456            input: &mut Parser<'i, 't>,
9457        ) -> Result<PropertyDeclaration, ParseError<'i>> {
9458                parse(context, input)
9459                .map(PropertyDeclaration::ColumnCount)
9460        }
9461    }
9462
9463
9464
9465
9466    
9467
9468    
9469        
9470    
9471
9472
9473
9474    
9475        
9476    
9477
9478
9479// https://drafts.csswg.org/css-multicol-1/#crc
9480
9481    
9482        
9483    
9484
9485
9486
9487    
9488
9489    
9490        
9491    
9492    /// https://drafts.csswg.org/css-multicol/#propdef-column-span
9493    pub mod column_span {
9494        #[allow(unused_imports)]
9495        use cssparser::{Parser, BasicParseError, Token};
9496        #[allow(unused_imports)]
9497        use crate::parser::{Parse, ParserContext};
9498        #[allow(unused_imports)]
9499        use crate::properties::{UnparsedValue, ShorthandId};
9500        #[allow(unused_imports)]
9501        use crate::error_reporting::ParseErrorReporter;
9502        #[allow(unused_imports)]
9503        use crate::properties::longhands;
9504        #[allow(unused_imports)]
9505        use crate::properties::{LonghandId, LonghandIdSet};
9506        #[allow(unused_imports)]
9507        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
9508        #[allow(unused_imports)]
9509        use crate::properties::style_structs;
9510        #[allow(unused_imports)]
9511        use selectors::parser::SelectorParseErrorKind;
9512        #[allow(unused_imports)]
9513        use servo_arc::Arc;
9514        #[allow(unused_imports)]
9515        use style_traits::{ParseError, StyleParseErrorKind};
9516        #[allow(unused_imports)]
9517        use crate::values::computed::{Context, ToComputedValue};
9518        #[allow(unused_imports)]
9519        use crate::values::{computed, generics, specified};
9520        #[allow(unused_imports)]
9521        use crate::Atom;
9522        
9523            
9524        pub use self::computed_value::T as SpecifiedValue;
9525        pub mod computed_value {
9526            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
9527            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
9528            pub enum T {
9529            
9530            None,
9531            
9532            All,
9533            }
9534        }
9535        #[inline]
9536        pub fn get_initial_value() -> computed_value::T {
9537            computed_value::T::None
9538        }
9539        #[inline]
9540        pub fn get_initial_specified_value() -> SpecifiedValue {
9541            SpecifiedValue::None
9542        }
9543        #[inline]
9544        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
9545                             -> Result<SpecifiedValue, ParseError<'i>> {
9546            SpecifiedValue::parse(input)
9547        }
9548
9549    
9550        
9551        #[allow(unused_variables)]
9552        pub unsafe fn cascade_property(
9553            declaration: &PropertyDeclaration,
9554            context: &mut computed::Context,
9555        ) {
9556            context.for_non_inherited_property = true;
9557            debug_assert_eq!(
9558                declaration.id().as_longhand().unwrap(),
9559                LonghandId::ColumnSpan,
9560            );
9561            let specified_value = match *declaration {
9562                PropertyDeclaration::CSSWideKeyword(ref wk) => {
9563                    match wk.keyword {
9564                        CSSWideKeyword::Unset |
9565                        CSSWideKeyword::Initial => {
9566                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
9567                        },
9568                        CSSWideKeyword::Inherit => {
9569                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
9570                                context.builder.inherit_column_span();
9571                        }
9572                        CSSWideKeyword::RevertLayer |
9573                        CSSWideKeyword::Revert => {
9574                            declaration.debug_crash("Found revert/revert-layer not dealt with");
9575                        },
9576                    }
9577                    return;
9578                },
9579                #[cfg(debug_assertions)]
9580                PropertyDeclaration::WithVariables(..) => {
9581                    declaration.debug_crash("Found variables not substituted");
9582                    return;
9583                },
9584                _ => unsafe {
9585                    declaration.unchecked_value_as::<longhands::column_span::SpecifiedValue>()
9586                },
9587            };
9588
9589
9590                let computed = specified_value.to_computed_value(context);
9591                context.builder.set_column_span(computed)
9592        }
9593
9594        pub fn parse_declared<'i, 't>(
9595            context: &ParserContext,
9596            input: &mut Parser<'i, 't>,
9597        ) -> Result<PropertyDeclaration, ParseError<'i>> {
9598                parse(context, input)
9599                .map(PropertyDeclaration::ColumnSpan)
9600        }
9601    }
9602
9603
9604
9605
9606    
9607        
9608    
9609
9610
9611    
9612    /* This Source Code Form is subject to the terms of the Mozilla Public
9613 * License, v. 2.0. If a copy of the MPL was not distributed with this
9614 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
9615
9616
9617
9618
9619    
9620        
9621    
9622    /// https://drafts.csswg.org/css-content/#propdef-content
9623    pub mod content {
9624        #[allow(unused_imports)]
9625        use cssparser::{Parser, BasicParseError, Token};
9626        #[allow(unused_imports)]
9627        use crate::parser::{Parse, ParserContext};
9628        #[allow(unused_imports)]
9629        use crate::properties::{UnparsedValue, ShorthandId};
9630        #[allow(unused_imports)]
9631        use crate::error_reporting::ParseErrorReporter;
9632        #[allow(unused_imports)]
9633        use crate::properties::longhands;
9634        #[allow(unused_imports)]
9635        use crate::properties::{LonghandId, LonghandIdSet};
9636        #[allow(unused_imports)]
9637        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
9638        #[allow(unused_imports)]
9639        use crate::properties::style_structs;
9640        #[allow(unused_imports)]
9641        use selectors::parser::SelectorParseErrorKind;
9642        #[allow(unused_imports)]
9643        use servo_arc::Arc;
9644        #[allow(unused_imports)]
9645        use style_traits::{ParseError, StyleParseErrorKind};
9646        #[allow(unused_imports)]
9647        use crate::values::computed::{Context, ToComputedValue};
9648        #[allow(unused_imports)]
9649        use crate::values::{computed, generics, specified};
9650        #[allow(unused_imports)]
9651        use crate::Atom;
9652        
9653            
9654        #[allow(unused_imports)]
9655        use app_units::Au;
9656        #[allow(unused_imports)]
9657        use crate::values::specified::AllowQuirks;
9658        #[allow(unused_imports)]
9659        use crate::Zero;
9660        #[allow(unused_imports)]
9661        use smallvec::SmallVec;
9662        pub use crate::values::specified::Content as SpecifiedValue;
9663        pub mod computed_value {
9664            pub use crate::values::computed::Content as T;
9665        }
9666        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Content::normal() }
9667        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::Content::normal() }
9668        #[allow(unused_variables)]
9669        #[inline]
9670        pub fn parse<'i, 't>(
9671            context: &ParserContext,
9672            input: &mut Parser<'i, 't>,
9673        ) -> Result<SpecifiedValue, ParseError<'i>> {
9674            <specified::Content as crate::parser::Parse>::parse(context, input)
9675        }
9676    
9677        
9678        #[allow(unused_variables)]
9679        pub unsafe fn cascade_property(
9680            declaration: &PropertyDeclaration,
9681            context: &mut computed::Context,
9682        ) {
9683            context.for_non_inherited_property = true;
9684            debug_assert_eq!(
9685                declaration.id().as_longhand().unwrap(),
9686                LonghandId::Content,
9687            );
9688            let specified_value = match *declaration {
9689                PropertyDeclaration::CSSWideKeyword(ref wk) => {
9690                    match wk.keyword {
9691                        CSSWideKeyword::Unset |
9692                        CSSWideKeyword::Initial => {
9693                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
9694                        },
9695                        CSSWideKeyword::Inherit => {
9696                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
9697                                context.builder.inherit_content();
9698                        }
9699                        CSSWideKeyword::RevertLayer |
9700                        CSSWideKeyword::Revert => {
9701                            declaration.debug_crash("Found revert/revert-layer not dealt with");
9702                        },
9703                    }
9704                    return;
9705                },
9706                #[cfg(debug_assertions)]
9707                PropertyDeclaration::WithVariables(..) => {
9708                    declaration.debug_crash("Found variables not substituted");
9709                    return;
9710                },
9711                _ => unsafe {
9712                    declaration.unchecked_value_as::<crate::values::specified::Content>()
9713                },
9714            };
9715
9716
9717                let computed = specified_value.to_computed_value(context);
9718                context.builder.set_content(computed)
9719        }
9720
9721        pub fn parse_declared<'i, 't>(
9722            context: &ParserContext,
9723            input: &mut Parser<'i, 't>,
9724        ) -> Result<PropertyDeclaration, ParseError<'i>> {
9725                parse(context, input)
9726                .map(PropertyDeclaration::Content)
9727        }
9728    }
9729
9730
9731
9732
9733    
9734        
9735    
9736    /// https://drafts.csswg.org/css-lists/#propdef-counter-increment
9737    pub mod counter_increment {
9738        #[allow(unused_imports)]
9739        use cssparser::{Parser, BasicParseError, Token};
9740        #[allow(unused_imports)]
9741        use crate::parser::{Parse, ParserContext};
9742        #[allow(unused_imports)]
9743        use crate::properties::{UnparsedValue, ShorthandId};
9744        #[allow(unused_imports)]
9745        use crate::error_reporting::ParseErrorReporter;
9746        #[allow(unused_imports)]
9747        use crate::properties::longhands;
9748        #[allow(unused_imports)]
9749        use crate::properties::{LonghandId, LonghandIdSet};
9750        #[allow(unused_imports)]
9751        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
9752        #[allow(unused_imports)]
9753        use crate::properties::style_structs;
9754        #[allow(unused_imports)]
9755        use selectors::parser::SelectorParseErrorKind;
9756        #[allow(unused_imports)]
9757        use servo_arc::Arc;
9758        #[allow(unused_imports)]
9759        use style_traits::{ParseError, StyleParseErrorKind};
9760        #[allow(unused_imports)]
9761        use crate::values::computed::{Context, ToComputedValue};
9762        #[allow(unused_imports)]
9763        use crate::values::{computed, generics, specified};
9764        #[allow(unused_imports)]
9765        use crate::Atom;
9766        
9767            
9768        #[allow(unused_imports)]
9769        use app_units::Au;
9770        #[allow(unused_imports)]
9771        use crate::values::specified::AllowQuirks;
9772        #[allow(unused_imports)]
9773        use crate::Zero;
9774        #[allow(unused_imports)]
9775        use smallvec::SmallVec;
9776        pub use crate::values::specified::CounterIncrement as SpecifiedValue;
9777        pub mod computed_value {
9778            pub use crate::values::computed::CounterIncrement as T;
9779        }
9780        #[inline] pub fn get_initial_value() -> computed_value::T { Default::default() }
9781        #[allow(unused_variables)]
9782        #[inline]
9783        pub fn parse<'i, 't>(
9784            context: &ParserContext,
9785            input: &mut Parser<'i, 't>,
9786        ) -> Result<SpecifiedValue, ParseError<'i>> {
9787            <specified::CounterIncrement as crate::parser::Parse>::parse(context, input)
9788        }
9789    
9790        
9791        #[allow(unused_variables)]
9792        pub unsafe fn cascade_property(
9793            declaration: &PropertyDeclaration,
9794            context: &mut computed::Context,
9795        ) {
9796            context.for_non_inherited_property = true;
9797            debug_assert_eq!(
9798                declaration.id().as_longhand().unwrap(),
9799                LonghandId::CounterIncrement,
9800            );
9801            let specified_value = match *declaration {
9802                PropertyDeclaration::CSSWideKeyword(ref wk) => {
9803                    match wk.keyword {
9804                        CSSWideKeyword::Unset |
9805                        CSSWideKeyword::Initial => {
9806                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
9807                        },
9808                        CSSWideKeyword::Inherit => {
9809                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
9810                                context.builder.inherit_counter_increment();
9811                        }
9812                        CSSWideKeyword::RevertLayer |
9813                        CSSWideKeyword::Revert => {
9814                            declaration.debug_crash("Found revert/revert-layer not dealt with");
9815                        },
9816                    }
9817                    return;
9818                },
9819                #[cfg(debug_assertions)]
9820                PropertyDeclaration::WithVariables(..) => {
9821                    declaration.debug_crash("Found variables not substituted");
9822                    return;
9823                },
9824                _ => unsafe {
9825                    declaration.unchecked_value_as::<crate::values::specified::CounterIncrement>()
9826                },
9827            };
9828
9829
9830                let computed = specified_value.to_computed_value(context);
9831                context.builder.set_counter_increment(computed)
9832        }
9833
9834        pub fn parse_declared<'i, 't>(
9835            context: &ParserContext,
9836            input: &mut Parser<'i, 't>,
9837        ) -> Result<PropertyDeclaration, ParseError<'i>> {
9838                parse(context, input)
9839                .map(PropertyDeclaration::CounterIncrement)
9840        }
9841    }
9842
9843
9844
9845
9846    
9847        
9848    
9849    /// https://drafts.csswg.org/css-lists-3/#propdef-counter-reset
9850    pub mod counter_reset {
9851        #[allow(unused_imports)]
9852        use cssparser::{Parser, BasicParseError, Token};
9853        #[allow(unused_imports)]
9854        use crate::parser::{Parse, ParserContext};
9855        #[allow(unused_imports)]
9856        use crate::properties::{UnparsedValue, ShorthandId};
9857        #[allow(unused_imports)]
9858        use crate::error_reporting::ParseErrorReporter;
9859        #[allow(unused_imports)]
9860        use crate::properties::longhands;
9861        #[allow(unused_imports)]
9862        use crate::properties::{LonghandId, LonghandIdSet};
9863        #[allow(unused_imports)]
9864        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
9865        #[allow(unused_imports)]
9866        use crate::properties::style_structs;
9867        #[allow(unused_imports)]
9868        use selectors::parser::SelectorParseErrorKind;
9869        #[allow(unused_imports)]
9870        use servo_arc::Arc;
9871        #[allow(unused_imports)]
9872        use style_traits::{ParseError, StyleParseErrorKind};
9873        #[allow(unused_imports)]
9874        use crate::values::computed::{Context, ToComputedValue};
9875        #[allow(unused_imports)]
9876        use crate::values::{computed, generics, specified};
9877        #[allow(unused_imports)]
9878        use crate::Atom;
9879        
9880            
9881        #[allow(unused_imports)]
9882        use app_units::Au;
9883        #[allow(unused_imports)]
9884        use crate::values::specified::AllowQuirks;
9885        #[allow(unused_imports)]
9886        use crate::Zero;
9887        #[allow(unused_imports)]
9888        use smallvec::SmallVec;
9889        pub use crate::values::specified::CounterReset as SpecifiedValue;
9890        pub mod computed_value {
9891            pub use crate::values::computed::CounterReset as T;
9892        }
9893        #[inline] pub fn get_initial_value() -> computed_value::T { Default::default() }
9894        #[allow(unused_variables)]
9895        #[inline]
9896        pub fn parse<'i, 't>(
9897            context: &ParserContext,
9898            input: &mut Parser<'i, 't>,
9899        ) -> Result<SpecifiedValue, ParseError<'i>> {
9900            <specified::CounterReset as crate::parser::Parse>::parse(context, input)
9901        }
9902    
9903        
9904        #[allow(unused_variables)]
9905        pub unsafe fn cascade_property(
9906            declaration: &PropertyDeclaration,
9907            context: &mut computed::Context,
9908        ) {
9909            context.for_non_inherited_property = true;
9910            debug_assert_eq!(
9911                declaration.id().as_longhand().unwrap(),
9912                LonghandId::CounterReset,
9913            );
9914            let specified_value = match *declaration {
9915                PropertyDeclaration::CSSWideKeyword(ref wk) => {
9916                    match wk.keyword {
9917                        CSSWideKeyword::Unset |
9918                        CSSWideKeyword::Initial => {
9919                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
9920                        },
9921                        CSSWideKeyword::Inherit => {
9922                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
9923                                context.builder.inherit_counter_reset();
9924                        }
9925                        CSSWideKeyword::RevertLayer |
9926                        CSSWideKeyword::Revert => {
9927                            declaration.debug_crash("Found revert/revert-layer not dealt with");
9928                        },
9929                    }
9930                    return;
9931                },
9932                #[cfg(debug_assertions)]
9933                PropertyDeclaration::WithVariables(..) => {
9934                    declaration.debug_crash("Found variables not substituted");
9935                    return;
9936                },
9937                _ => unsafe {
9938                    declaration.unchecked_value_as::<crate::values::specified::CounterReset>()
9939                },
9940            };
9941
9942
9943                let computed = specified_value.to_computed_value(context);
9944                context.builder.set_counter_reset(computed)
9945        }
9946
9947        pub fn parse_declared<'i, 't>(
9948            context: &ParserContext,
9949            input: &mut Parser<'i, 't>,
9950        ) -> Result<PropertyDeclaration, ParseError<'i>> {
9951                parse(context, input)
9952                .map(PropertyDeclaration::CounterReset)
9953        }
9954    }
9955
9956
9957
9958
9959    
9960        
9961    
9962
9963
9964    
9965    /* This Source Code Form is subject to the terms of the Mozilla Public
9966 * License, v. 2.0. If a copy of the MPL was not distributed with this
9967 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
9968
9969
9970
9971
9972    
9973        
9974    
9975    /// https://drafts.csswg.org/css-color/#transparency
9976    pub mod opacity {
9977        #[allow(unused_imports)]
9978        use cssparser::{Parser, BasicParseError, Token};
9979        #[allow(unused_imports)]
9980        use crate::parser::{Parse, ParserContext};
9981        #[allow(unused_imports)]
9982        use crate::properties::{UnparsedValue, ShorthandId};
9983        #[allow(unused_imports)]
9984        use crate::error_reporting::ParseErrorReporter;
9985        #[allow(unused_imports)]
9986        use crate::properties::longhands;
9987        #[allow(unused_imports)]
9988        use crate::properties::{LonghandId, LonghandIdSet};
9989        #[allow(unused_imports)]
9990        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
9991        #[allow(unused_imports)]
9992        use crate::properties::style_structs;
9993        #[allow(unused_imports)]
9994        use selectors::parser::SelectorParseErrorKind;
9995        #[allow(unused_imports)]
9996        use servo_arc::Arc;
9997        #[allow(unused_imports)]
9998        use style_traits::{ParseError, StyleParseErrorKind};
9999        #[allow(unused_imports)]
10000        use crate::values::computed::{Context, ToComputedValue};
10001        #[allow(unused_imports)]
10002        use crate::values::{computed, generics, specified};
10003        #[allow(unused_imports)]
10004        use crate::Atom;
10005        
10006            
10007        #[allow(unused_imports)]
10008        use app_units::Au;
10009        #[allow(unused_imports)]
10010        use crate::values::specified::AllowQuirks;
10011        #[allow(unused_imports)]
10012        use crate::Zero;
10013        #[allow(unused_imports)]
10014        use smallvec::SmallVec;
10015        pub use crate::values::specified::Opacity as SpecifiedValue;
10016        pub mod computed_value {
10017            pub use crate::values::computed::Opacity as T;
10018        }
10019        #[inline] pub fn get_initial_value() -> computed_value::T { 1.0 }
10020        #[allow(unused_variables)]
10021        #[inline]
10022        pub fn parse<'i, 't>(
10023            context: &ParserContext,
10024            input: &mut Parser<'i, 't>,
10025        ) -> Result<SpecifiedValue, ParseError<'i>> {
10026            <specified::Opacity as crate::parser::Parse>::parse(context, input)
10027        }
10028    
10029        
10030        #[allow(unused_variables)]
10031        pub unsafe fn cascade_property(
10032            declaration: &PropertyDeclaration,
10033            context: &mut computed::Context,
10034        ) {
10035            context.for_non_inherited_property = true;
10036            debug_assert_eq!(
10037                declaration.id().as_longhand().unwrap(),
10038                LonghandId::Opacity,
10039            );
10040            let specified_value = match *declaration {
10041                PropertyDeclaration::CSSWideKeyword(ref wk) => {
10042                    match wk.keyword {
10043                        CSSWideKeyword::Unset |
10044                        CSSWideKeyword::Initial => {
10045                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
10046                        },
10047                        CSSWideKeyword::Inherit => {
10048                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
10049                                context.builder.inherit_opacity();
10050                        }
10051                        CSSWideKeyword::RevertLayer |
10052                        CSSWideKeyword::Revert => {
10053                            declaration.debug_crash("Found revert/revert-layer not dealt with");
10054                        },
10055                    }
10056                    return;
10057                },
10058                #[cfg(debug_assertions)]
10059                PropertyDeclaration::WithVariables(..) => {
10060                    declaration.debug_crash("Found variables not substituted");
10061                    return;
10062                },
10063                _ => unsafe {
10064                    declaration.unchecked_value_as::<crate::values::specified::Opacity>()
10065                },
10066            };
10067
10068
10069                let computed = specified_value.to_computed_value(context);
10070                context.builder.set_opacity(computed)
10071        }
10072
10073        pub fn parse_declared<'i, 't>(
10074            context: &ParserContext,
10075            input: &mut Parser<'i, 't>,
10076        ) -> Result<PropertyDeclaration, ParseError<'i>> {
10077                parse(context, input)
10078                .map(PropertyDeclaration::Opacity)
10079        }
10080    }
10081
10082
10083
10084
10085    
10086        
10087    
10088    
10089    /// https://drafts.csswg.org/css-backgrounds/#box-shadow
10090    pub mod box_shadow {
10091        #[allow(unused_imports)]
10092        use cssparser::{Parser, BasicParseError, Token};
10093        #[allow(unused_imports)]
10094        use crate::parser::{Parse, ParserContext};
10095        #[allow(unused_imports)]
10096        use crate::properties::{UnparsedValue, ShorthandId};
10097        #[allow(unused_imports)]
10098        use crate::error_reporting::ParseErrorReporter;
10099        #[allow(unused_imports)]
10100        use crate::properties::longhands;
10101        #[allow(unused_imports)]
10102        use crate::properties::{LonghandId, LonghandIdSet};
10103        #[allow(unused_imports)]
10104        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
10105        #[allow(unused_imports)]
10106        use crate::properties::style_structs;
10107        #[allow(unused_imports)]
10108        use selectors::parser::SelectorParseErrorKind;
10109        #[allow(unused_imports)]
10110        use servo_arc::Arc;
10111        #[allow(unused_imports)]
10112        use style_traits::{ParseError, StyleParseErrorKind};
10113        #[allow(unused_imports)]
10114        use crate::values::computed::{Context, ToComputedValue};
10115        #[allow(unused_imports)]
10116        use crate::values::{computed, generics, specified};
10117        #[allow(unused_imports)]
10118        use crate::Atom;
10119        
10120        #[allow(unused_imports)]
10121        use smallvec::SmallVec;
10122
10123        pub mod single_value {
10124            #[allow(unused_imports)]
10125            use cssparser::{Parser, BasicParseError};
10126            #[allow(unused_imports)]
10127            use crate::parser::{Parse, ParserContext};
10128            #[allow(unused_imports)]
10129            use crate::properties::ShorthandId;
10130            #[allow(unused_imports)]
10131            use selectors::parser::SelectorParseErrorKind;
10132            #[allow(unused_imports)]
10133            use style_traits::{ParseError, StyleParseErrorKind};
10134            #[allow(unused_imports)]
10135            use crate::values::computed::{Context, ToComputedValue};
10136            #[allow(unused_imports)]
10137            use crate::values::{computed, specified};
10138            
10139            
10140        #[allow(unused_imports)]
10141        use app_units::Au;
10142        #[allow(unused_imports)]
10143        use crate::values::specified::AllowQuirks;
10144        #[allow(unused_imports)]
10145        use crate::Zero;
10146        #[allow(unused_imports)]
10147        use smallvec::SmallVec;
10148        pub use crate::values::specified::BoxShadow as SpecifiedValue;
10149        pub mod computed_value {
10150            pub use crate::values::computed::BoxShadow as T;
10151        }
10152        #[allow(unused_variables)]
10153        #[inline]
10154        pub fn parse<'i, 't>(
10155            context: &ParserContext,
10156            input: &mut Parser<'i, 't>,
10157        ) -> Result<SpecifiedValue, ParseError<'i>> {
10158            <specified::BoxShadow as crate::parser::Parse>::parse(context, input)
10159        }
10160    
10161        
10162        }
10163
10164        /// The definition of the computed value for box-shadow.
10165        pub mod computed_value {
10166            #[allow(unused_imports)]
10167            use crate::values::animated::ToAnimatedValue;
10168            #[allow(unused_imports)]
10169            use crate::values::resolved::ToResolvedValue;
10170            pub use super::single_value::computed_value as single_value;
10171            pub use self::single_value::T as SingleComputedValue;
10172            use crate::values::computed::ComputedVecIter;
10173
10174            
10175
10176            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
10177            // something for transition-name, which is the only remaining user
10178            // of NotInitial.
10179            pub type UnderlyingList<T> =
10180                    crate::OwnedSlice<T>;
10181
10182            pub type UnderlyingOwnedList<T> =
10183                    crate::OwnedSlice<T>;
10184
10185
10186            /// The generic type defining the animated and resolved values for
10187            /// this property.
10188            ///
10189            /// Making this type generic allows the compiler to figure out the
10190            /// animated value for us, instead of having to implement it
10191            /// manually for every type we care about.
10192            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
10193            #[css(comma)]
10194            pub struct OwnedList<T>(
10195                #[css(if_empty = "none", iterable)]
10196                pub UnderlyingOwnedList<T>,
10197            );
10198
10199            /// The computed value for this property.
10200            pub type ComputedList = OwnedList<single_value::T>;
10201            pub use self::OwnedList as List;
10202
10203            impl From<ComputedList> for UnderlyingList<single_value::T> {
10204                #[inline]
10205                fn from(l: ComputedList) -> Self {
10206                    l.0
10207                }
10208            }
10209            impl From<UnderlyingList<single_value::T>> for ComputedList {
10210                #[inline]
10211                fn from(l: UnderlyingList<single_value::T>) -> Self {
10212                    List(l)
10213                }
10214            }
10215
10216            use crate::values::animated::{Animate, ToAnimatedZero, Procedure, lists};
10217            use crate::values::distance::{SquaredDistance, ComputeSquaredDistance};
10218
10219            // FIXME(emilio): For some reason rust thinks that this alias is
10220            // unused, even though it's clearly used below?
10221            #[allow(unused)]
10222            type AnimatedList = <OwnedList<single_value::T> as ToAnimatedValue>::AnimatedValue;
10223
10224            impl ToAnimatedZero for AnimatedList {
10225                fn to_animated_zero(&self) -> Result<Self, ()> { Err(()) }
10226            }
10227
10228            impl Animate for AnimatedList {
10229                fn animate(
10230                    &self,
10231                    other: &Self,
10232                    procedure: Procedure,
10233                ) -> Result<Self, ()> {
10234                    Ok(OwnedList(
10235                        lists::with_zero::animate(&self.0, &other.0, procedure)?
10236                    ))
10237                }
10238            }
10239            impl ComputeSquaredDistance for AnimatedList {
10240                fn compute_squared_distance(
10241                    &self,
10242                    other: &Self,
10243                ) -> Result<SquaredDistance, ()> {
10244                    lists::with_zero::squared_distance(&self.0, &other.0)
10245                }
10246            }
10247
10248            /// The computed value, effectively a list of single values.
10249            pub use self::ComputedList as T;
10250
10251            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
10252        }
10253
10254        /// The specified value of box-shadow.
10255        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
10256        #[css(comma)]
10257        pub struct SpecifiedValue(
10258            #[css(if_empty = "none", iterable)]
10259            pub crate::OwnedSlice<single_value::SpecifiedValue>,
10260        );
10261
10262        pub fn get_initial_value() -> computed_value::T {
10263                computed_value::List(Default::default())
10264        }
10265
10266        pub fn parse<'i, 't>(
10267            context: &ParserContext,
10268            input: &mut Parser<'i, 't>,
10269        ) -> Result<SpecifiedValue, ParseError<'i>> {
10270            use style_traits::Separator;
10271
10272            if input.try_parse(|input| input.expect_ident_matching("none")).is_ok() {
10273                return Ok(SpecifiedValue(Default::default()))
10274            }
10275
10276            let v = style_traits::Comma::parse(input, |parser| {
10277                single_value::parse(context, parser)
10278            })?;
10279            Ok(SpecifiedValue(v.into()))
10280        }
10281
10282        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
10283
10284
10285        impl ToComputedValue for SpecifiedValue {
10286            type ComputedValue = computed_value::T;
10287
10288            #[inline]
10289            fn to_computed_value(&self, context: &Context) -> computed_value::T {
10290                use std::iter::FromIterator;
10291                computed_value::List(computed_value::UnderlyingList::from_iter(
10292                    self.0.iter().map(|i| i.to_computed_value(context))
10293                ))
10294            }
10295
10296            #[inline]
10297            fn from_computed_value(computed: &computed_value::T) -> Self {
10298                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
10299                SpecifiedValue(iter.collect())
10300            }
10301        }
10302    
10303        #[allow(unused_variables)]
10304        pub unsafe fn cascade_property(
10305            declaration: &PropertyDeclaration,
10306            context: &mut computed::Context,
10307        ) {
10308            context.for_non_inherited_property = true;
10309            debug_assert_eq!(
10310                declaration.id().as_longhand().unwrap(),
10311                LonghandId::BoxShadow,
10312            );
10313            let specified_value = match *declaration {
10314                PropertyDeclaration::CSSWideKeyword(ref wk) => {
10315                    match wk.keyword {
10316                        CSSWideKeyword::Unset |
10317                        CSSWideKeyword::Initial => {
10318                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
10319                        },
10320                        CSSWideKeyword::Inherit => {
10321                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
10322                                context.builder.inherit_box_shadow();
10323                        }
10324                        CSSWideKeyword::RevertLayer |
10325                        CSSWideKeyword::Revert => {
10326                            declaration.debug_crash("Found revert/revert-layer not dealt with");
10327                        },
10328                    }
10329                    return;
10330                },
10331                #[cfg(debug_assertions)]
10332                PropertyDeclaration::WithVariables(..) => {
10333                    declaration.debug_crash("Found variables not substituted");
10334                    return;
10335                },
10336                _ => unsafe {
10337                    declaration.unchecked_value_as::<longhands::box_shadow::SpecifiedValue>()
10338                },
10339            };
10340
10341
10342                let computed = specified_value.to_computed_value(context);
10343                context.builder.set_box_shadow(computed)
10344        }
10345
10346        pub fn parse_declared<'i, 't>(
10347            context: &ParserContext,
10348            input: &mut Parser<'i, 't>,
10349        ) -> Result<PropertyDeclaration, ParseError<'i>> {
10350                parse(context, input)
10351                .map(PropertyDeclaration::BoxShadow)
10352        }
10353    }
10354
10355
10356
10357
10358
10359    
10360        
10361    
10362    /// https://drafts.fxtf.org/css-masking/#clip-property
10363    pub mod clip {
10364        #[allow(unused_imports)]
10365        use cssparser::{Parser, BasicParseError, Token};
10366        #[allow(unused_imports)]
10367        use crate::parser::{Parse, ParserContext};
10368        #[allow(unused_imports)]
10369        use crate::properties::{UnparsedValue, ShorthandId};
10370        #[allow(unused_imports)]
10371        use crate::error_reporting::ParseErrorReporter;
10372        #[allow(unused_imports)]
10373        use crate::properties::longhands;
10374        #[allow(unused_imports)]
10375        use crate::properties::{LonghandId, LonghandIdSet};
10376        #[allow(unused_imports)]
10377        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
10378        #[allow(unused_imports)]
10379        use crate::properties::style_structs;
10380        #[allow(unused_imports)]
10381        use selectors::parser::SelectorParseErrorKind;
10382        #[allow(unused_imports)]
10383        use servo_arc::Arc;
10384        #[allow(unused_imports)]
10385        use style_traits::{ParseError, StyleParseErrorKind};
10386        #[allow(unused_imports)]
10387        use crate::values::computed::{Context, ToComputedValue};
10388        #[allow(unused_imports)]
10389        use crate::values::{computed, generics, specified};
10390        #[allow(unused_imports)]
10391        use crate::Atom;
10392        
10393            
10394        #[allow(unused_imports)]
10395        use app_units::Au;
10396        #[allow(unused_imports)]
10397        use crate::values::specified::AllowQuirks;
10398        #[allow(unused_imports)]
10399        use crate::Zero;
10400        #[allow(unused_imports)]
10401        use smallvec::SmallVec;
10402        pub use crate::values::specified::ClipRectOrAuto as SpecifiedValue;
10403        pub mod computed_value {
10404            pub use crate::values::computed::ClipRectOrAuto as T;
10405        }
10406        #[inline] pub fn get_initial_value() -> computed_value::T { computed::ClipRectOrAuto::auto() }
10407        #[allow(unused_variables)]
10408        #[inline]
10409        pub fn parse<'i, 't>(
10410            context: &ParserContext,
10411            input: &mut Parser<'i, 't>,
10412        ) -> Result<SpecifiedValue, ParseError<'i>> {
10413            specified::ClipRectOrAuto::parse_quirky(context, input, AllowQuirks::Yes)
10414        }
10415    
10416        
10417        #[allow(unused_variables)]
10418        pub unsafe fn cascade_property(
10419            declaration: &PropertyDeclaration,
10420            context: &mut computed::Context,
10421        ) {
10422            context.for_non_inherited_property = true;
10423            debug_assert_eq!(
10424                declaration.id().as_longhand().unwrap(),
10425                LonghandId::Clip,
10426            );
10427            let specified_value = match *declaration {
10428                PropertyDeclaration::CSSWideKeyword(ref wk) => {
10429                    match wk.keyword {
10430                        CSSWideKeyword::Unset |
10431                        CSSWideKeyword::Initial => {
10432                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
10433                        },
10434                        CSSWideKeyword::Inherit => {
10435                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
10436                                context.builder.inherit_clip();
10437                        }
10438                        CSSWideKeyword::RevertLayer |
10439                        CSSWideKeyword::Revert => {
10440                            declaration.debug_crash("Found revert/revert-layer not dealt with");
10441                        },
10442                    }
10443                    return;
10444                },
10445                #[cfg(debug_assertions)]
10446                PropertyDeclaration::WithVariables(..) => {
10447                    declaration.debug_crash("Found variables not substituted");
10448                    return;
10449                },
10450                _ => unsafe {
10451                    declaration.unchecked_value_as::<Box<crate::values::specified::ClipRectOrAuto>>()
10452                },
10453            };
10454
10455
10456                let computed = (**specified_value).to_computed_value(context);
10457                context.builder.set_clip(computed)
10458        }
10459
10460        pub fn parse_declared<'i, 't>(
10461            context: &ParserContext,
10462            input: &mut Parser<'i, 't>,
10463        ) -> Result<PropertyDeclaration, ParseError<'i>> {
10464                parse(context, input)
10465                .map(Box::new)
10466                .map(PropertyDeclaration::Clip)
10467        }
10468    }
10469
10470
10471
10472
10473    
10474        
10475    
10476    
10477    /// https://drafts.fxtf.org/filters/#propdef-filter
10478    pub mod filter {
10479        #[allow(unused_imports)]
10480        use cssparser::{Parser, BasicParseError, Token};
10481        #[allow(unused_imports)]
10482        use crate::parser::{Parse, ParserContext};
10483        #[allow(unused_imports)]
10484        use crate::properties::{UnparsedValue, ShorthandId};
10485        #[allow(unused_imports)]
10486        use crate::error_reporting::ParseErrorReporter;
10487        #[allow(unused_imports)]
10488        use crate::properties::longhands;
10489        #[allow(unused_imports)]
10490        use crate::properties::{LonghandId, LonghandIdSet};
10491        #[allow(unused_imports)]
10492        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
10493        #[allow(unused_imports)]
10494        use crate::properties::style_structs;
10495        #[allow(unused_imports)]
10496        use selectors::parser::SelectorParseErrorKind;
10497        #[allow(unused_imports)]
10498        use servo_arc::Arc;
10499        #[allow(unused_imports)]
10500        use style_traits::{ParseError, StyleParseErrorKind};
10501        #[allow(unused_imports)]
10502        use crate::values::computed::{Context, ToComputedValue};
10503        #[allow(unused_imports)]
10504        use crate::values::{computed, generics, specified};
10505        #[allow(unused_imports)]
10506        use crate::Atom;
10507        
10508        #[allow(unused_imports)]
10509        use smallvec::SmallVec;
10510
10511        pub mod single_value {
10512            #[allow(unused_imports)]
10513            use cssparser::{Parser, BasicParseError};
10514            #[allow(unused_imports)]
10515            use crate::parser::{Parse, ParserContext};
10516            #[allow(unused_imports)]
10517            use crate::properties::ShorthandId;
10518            #[allow(unused_imports)]
10519            use selectors::parser::SelectorParseErrorKind;
10520            #[allow(unused_imports)]
10521            use style_traits::{ParseError, StyleParseErrorKind};
10522            #[allow(unused_imports)]
10523            use crate::values::computed::{Context, ToComputedValue};
10524            #[allow(unused_imports)]
10525            use crate::values::{computed, specified};
10526            
10527            
10528        #[allow(unused_imports)]
10529        use app_units::Au;
10530        #[allow(unused_imports)]
10531        use crate::values::specified::AllowQuirks;
10532        #[allow(unused_imports)]
10533        use crate::Zero;
10534        #[allow(unused_imports)]
10535        use smallvec::SmallVec;
10536        pub use crate::values::specified::Filter as SpecifiedValue;
10537        pub mod computed_value {
10538            pub use crate::values::computed::Filter as T;
10539        }
10540        #[allow(unused_variables)]
10541        #[inline]
10542        pub fn parse<'i, 't>(
10543            context: &ParserContext,
10544            input: &mut Parser<'i, 't>,
10545        ) -> Result<SpecifiedValue, ParseError<'i>> {
10546            <specified::Filter as crate::parser::Parse>::parse(context, input)
10547        }
10548    
10549        
10550        }
10551
10552        /// The definition of the computed value for filter.
10553        pub mod computed_value {
10554            #[allow(unused_imports)]
10555            use crate::values::animated::ToAnimatedValue;
10556            #[allow(unused_imports)]
10557            use crate::values::resolved::ToResolvedValue;
10558            pub use super::single_value::computed_value as single_value;
10559            pub use self::single_value::T as SingleComputedValue;
10560            use crate::values::computed::ComputedVecIter;
10561
10562            
10563
10564            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
10565            // something for transition-name, which is the only remaining user
10566            // of NotInitial.
10567            pub type UnderlyingList<T> =
10568                    crate::OwnedSlice<T>;
10569
10570            pub type UnderlyingOwnedList<T> =
10571                    crate::OwnedSlice<T>;
10572
10573
10574            /// The generic type defining the animated and resolved values for
10575            /// this property.
10576            ///
10577            /// Making this type generic allows the compiler to figure out the
10578            /// animated value for us, instead of having to implement it
10579            /// manually for every type we care about.
10580            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
10581            pub struct OwnedList<T>(
10582                #[css(if_empty = "none", iterable)]
10583                pub UnderlyingOwnedList<T>,
10584            );
10585
10586            /// The computed value for this property.
10587            pub type ComputedList = OwnedList<single_value::T>;
10588            pub use self::OwnedList as List;
10589
10590            impl From<ComputedList> for UnderlyingList<single_value::T> {
10591                #[inline]
10592                fn from(l: ComputedList) -> Self {
10593                    l.0
10594                }
10595            }
10596            impl From<UnderlyingList<single_value::T>> for ComputedList {
10597                #[inline]
10598                fn from(l: UnderlyingList<single_value::T>) -> Self {
10599                    List(l)
10600                }
10601            }
10602
10603            use crate::values::animated::{Animate, ToAnimatedZero, Procedure, lists};
10604            use crate::values::distance::{SquaredDistance, ComputeSquaredDistance};
10605
10606            // FIXME(emilio): For some reason rust thinks that this alias is
10607            // unused, even though it's clearly used below?
10608            #[allow(unused)]
10609            type AnimatedList = <OwnedList<single_value::T> as ToAnimatedValue>::AnimatedValue;
10610
10611            impl ToAnimatedZero for AnimatedList {
10612                fn to_animated_zero(&self) -> Result<Self, ()> { Err(()) }
10613            }
10614
10615            impl Animate for AnimatedList {
10616                fn animate(
10617                    &self,
10618                    other: &Self,
10619                    procedure: Procedure,
10620                ) -> Result<Self, ()> {
10621                    Ok(OwnedList(
10622                        lists::with_zero::animate(&self.0, &other.0, procedure)?
10623                    ))
10624                }
10625            }
10626            impl ComputeSquaredDistance for AnimatedList {
10627                fn compute_squared_distance(
10628                    &self,
10629                    other: &Self,
10630                ) -> Result<SquaredDistance, ()> {
10631                    lists::with_zero::squared_distance(&self.0, &other.0)
10632                }
10633            }
10634
10635            /// The computed value, effectively a list of single values.
10636            pub use self::ComputedList as T;
10637
10638            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
10639        }
10640
10641        /// The specified value of filter.
10642        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
10643        pub struct SpecifiedValue(
10644            #[css(if_empty = "none", iterable)]
10645            pub crate::OwnedSlice<single_value::SpecifiedValue>,
10646        );
10647
10648        pub fn get_initial_value() -> computed_value::T {
10649                computed_value::List(Default::default())
10650        }
10651
10652        pub fn parse<'i, 't>(
10653            context: &ParserContext,
10654            input: &mut Parser<'i, 't>,
10655        ) -> Result<SpecifiedValue, ParseError<'i>> {
10656            use style_traits::Separator;
10657
10658            if input.try_parse(|input| input.expect_ident_matching("none")).is_ok() {
10659                return Ok(SpecifiedValue(Default::default()))
10660            }
10661
10662            let v = style_traits::Space::parse(input, |parser| {
10663                single_value::parse(context, parser)
10664            })?;
10665            Ok(SpecifiedValue(v.into()))
10666        }
10667
10668        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
10669
10670
10671        impl ToComputedValue for SpecifiedValue {
10672            type ComputedValue = computed_value::T;
10673
10674            #[inline]
10675            fn to_computed_value(&self, context: &Context) -> computed_value::T {
10676                use std::iter::FromIterator;
10677                computed_value::List(computed_value::UnderlyingList::from_iter(
10678                    self.0.iter().map(|i| i.to_computed_value(context))
10679                ))
10680            }
10681
10682            #[inline]
10683            fn from_computed_value(computed: &computed_value::T) -> Self {
10684                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
10685                SpecifiedValue(iter.collect())
10686            }
10687        }
10688    
10689        #[allow(unused_variables)]
10690        pub unsafe fn cascade_property(
10691            declaration: &PropertyDeclaration,
10692            context: &mut computed::Context,
10693        ) {
10694            context.for_non_inherited_property = true;
10695            debug_assert_eq!(
10696                declaration.id().as_longhand().unwrap(),
10697                LonghandId::Filter,
10698            );
10699            let specified_value = match *declaration {
10700                PropertyDeclaration::CSSWideKeyword(ref wk) => {
10701                    match wk.keyword {
10702                        CSSWideKeyword::Unset |
10703                        CSSWideKeyword::Initial => {
10704                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
10705                        },
10706                        CSSWideKeyword::Inherit => {
10707                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
10708                                context.builder.inherit_filter();
10709                        }
10710                        CSSWideKeyword::RevertLayer |
10711                        CSSWideKeyword::Revert => {
10712                            declaration.debug_crash("Found revert/revert-layer not dealt with");
10713                        },
10714                    }
10715                    return;
10716                },
10717                #[cfg(debug_assertions)]
10718                PropertyDeclaration::WithVariables(..) => {
10719                    declaration.debug_crash("Found variables not substituted");
10720                    return;
10721                },
10722                _ => unsafe {
10723                    declaration.unchecked_value_as::<longhands::filter::SpecifiedValue>()
10724                },
10725            };
10726
10727
10728                let computed = specified_value.to_computed_value(context);
10729                context.builder.set_filter(computed)
10730        }
10731
10732        pub fn parse_declared<'i, 't>(
10733            context: &ParserContext,
10734            input: &mut Parser<'i, 't>,
10735        ) -> Result<PropertyDeclaration, ParseError<'i>> {
10736                parse(context, input)
10737                .map(PropertyDeclaration::Filter)
10738        }
10739    }
10740
10741
10742
10743
10744
10745    
10746        
10747    
10748    
10749    /// https://drafts.fxtf.org/filter-effects-2/#propdef-backdrop-filter
10750    pub mod backdrop_filter {
10751        #[allow(unused_imports)]
10752        use cssparser::{Parser, BasicParseError, Token};
10753        #[allow(unused_imports)]
10754        use crate::parser::{Parse, ParserContext};
10755        #[allow(unused_imports)]
10756        use crate::properties::{UnparsedValue, ShorthandId};
10757        #[allow(unused_imports)]
10758        use crate::error_reporting::ParseErrorReporter;
10759        #[allow(unused_imports)]
10760        use crate::properties::longhands;
10761        #[allow(unused_imports)]
10762        use crate::properties::{LonghandId, LonghandIdSet};
10763        #[allow(unused_imports)]
10764        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
10765        #[allow(unused_imports)]
10766        use crate::properties::style_structs;
10767        #[allow(unused_imports)]
10768        use selectors::parser::SelectorParseErrorKind;
10769        #[allow(unused_imports)]
10770        use servo_arc::Arc;
10771        #[allow(unused_imports)]
10772        use style_traits::{ParseError, StyleParseErrorKind};
10773        #[allow(unused_imports)]
10774        use crate::values::computed::{Context, ToComputedValue};
10775        #[allow(unused_imports)]
10776        use crate::values::{computed, generics, specified};
10777        #[allow(unused_imports)]
10778        use crate::Atom;
10779        
10780        #[allow(unused_imports)]
10781        use smallvec::SmallVec;
10782
10783        pub mod single_value {
10784            #[allow(unused_imports)]
10785            use cssparser::{Parser, BasicParseError};
10786            #[allow(unused_imports)]
10787            use crate::parser::{Parse, ParserContext};
10788            #[allow(unused_imports)]
10789            use crate::properties::ShorthandId;
10790            #[allow(unused_imports)]
10791            use selectors::parser::SelectorParseErrorKind;
10792            #[allow(unused_imports)]
10793            use style_traits::{ParseError, StyleParseErrorKind};
10794            #[allow(unused_imports)]
10795            use crate::values::computed::{Context, ToComputedValue};
10796            #[allow(unused_imports)]
10797            use crate::values::{computed, specified};
10798            
10799            
10800        #[allow(unused_imports)]
10801        use app_units::Au;
10802        #[allow(unused_imports)]
10803        use crate::values::specified::AllowQuirks;
10804        #[allow(unused_imports)]
10805        use crate::Zero;
10806        #[allow(unused_imports)]
10807        use smallvec::SmallVec;
10808        pub use crate::values::specified::Filter as SpecifiedValue;
10809        pub mod computed_value {
10810            pub use crate::values::computed::Filter as T;
10811        }
10812        #[allow(unused_variables)]
10813        #[inline]
10814        pub fn parse<'i, 't>(
10815            context: &ParserContext,
10816            input: &mut Parser<'i, 't>,
10817        ) -> Result<SpecifiedValue, ParseError<'i>> {
10818            <specified::Filter as crate::parser::Parse>::parse(context, input)
10819        }
10820    
10821        
10822        }
10823
10824        /// The definition of the computed value for backdrop-filter.
10825        pub mod computed_value {
10826            #[allow(unused_imports)]
10827            use crate::values::animated::ToAnimatedValue;
10828            #[allow(unused_imports)]
10829            use crate::values::resolved::ToResolvedValue;
10830            pub use super::single_value::computed_value as single_value;
10831            pub use self::single_value::T as SingleComputedValue;
10832            use crate::values::computed::ComputedVecIter;
10833
10834            
10835
10836            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
10837            // something for transition-name, which is the only remaining user
10838            // of NotInitial.
10839            pub type UnderlyingList<T> =
10840                    crate::OwnedSlice<T>;
10841
10842            pub type UnderlyingOwnedList<T> =
10843                    crate::OwnedSlice<T>;
10844
10845
10846            /// The generic type defining the animated and resolved values for
10847            /// this property.
10848            ///
10849            /// Making this type generic allows the compiler to figure out the
10850            /// animated value for us, instead of having to implement it
10851            /// manually for every type we care about.
10852            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
10853            pub struct OwnedList<T>(
10854                #[css(if_empty = "none", iterable)]
10855                pub UnderlyingOwnedList<T>,
10856            );
10857
10858            /// The computed value for this property.
10859            pub type ComputedList = OwnedList<single_value::T>;
10860            pub use self::OwnedList as List;
10861
10862            impl From<ComputedList> for UnderlyingList<single_value::T> {
10863                #[inline]
10864                fn from(l: ComputedList) -> Self {
10865                    l.0
10866                }
10867            }
10868            impl From<UnderlyingList<single_value::T>> for ComputedList {
10869                #[inline]
10870                fn from(l: UnderlyingList<single_value::T>) -> Self {
10871                    List(l)
10872                }
10873            }
10874
10875            use crate::values::animated::{Animate, ToAnimatedZero, Procedure, lists};
10876            use crate::values::distance::{SquaredDistance, ComputeSquaredDistance};
10877
10878            // FIXME(emilio): For some reason rust thinks that this alias is
10879            // unused, even though it's clearly used below?
10880            #[allow(unused)]
10881            type AnimatedList = <OwnedList<single_value::T> as ToAnimatedValue>::AnimatedValue;
10882
10883            impl ToAnimatedZero for AnimatedList {
10884                fn to_animated_zero(&self) -> Result<Self, ()> { Err(()) }
10885            }
10886
10887            impl Animate for AnimatedList {
10888                fn animate(
10889                    &self,
10890                    other: &Self,
10891                    procedure: Procedure,
10892                ) -> Result<Self, ()> {
10893                    Ok(OwnedList(
10894                        lists::with_zero::animate(&self.0, &other.0, procedure)?
10895                    ))
10896                }
10897            }
10898            impl ComputeSquaredDistance for AnimatedList {
10899                fn compute_squared_distance(
10900                    &self,
10901                    other: &Self,
10902                ) -> Result<SquaredDistance, ()> {
10903                    lists::with_zero::squared_distance(&self.0, &other.0)
10904                }
10905            }
10906
10907            /// The computed value, effectively a list of single values.
10908            pub use self::ComputedList as T;
10909
10910            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
10911        }
10912
10913        /// The specified value of backdrop-filter.
10914        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
10915        pub struct SpecifiedValue(
10916            #[css(if_empty = "none", iterable)]
10917            pub crate::OwnedSlice<single_value::SpecifiedValue>,
10918        );
10919
10920        pub fn get_initial_value() -> computed_value::T {
10921                computed_value::List(Default::default())
10922        }
10923
10924        pub fn parse<'i, 't>(
10925            context: &ParserContext,
10926            input: &mut Parser<'i, 't>,
10927        ) -> Result<SpecifiedValue, ParseError<'i>> {
10928            use style_traits::Separator;
10929
10930            if input.try_parse(|input| input.expect_ident_matching("none")).is_ok() {
10931                return Ok(SpecifiedValue(Default::default()))
10932            }
10933
10934            let v = style_traits::Space::parse(input, |parser| {
10935                single_value::parse(context, parser)
10936            })?;
10937            Ok(SpecifiedValue(v.into()))
10938        }
10939
10940        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
10941
10942
10943        impl ToComputedValue for SpecifiedValue {
10944            type ComputedValue = computed_value::T;
10945
10946            #[inline]
10947            fn to_computed_value(&self, context: &Context) -> computed_value::T {
10948                use std::iter::FromIterator;
10949                computed_value::List(computed_value::UnderlyingList::from_iter(
10950                    self.0.iter().map(|i| i.to_computed_value(context))
10951                ))
10952            }
10953
10954            #[inline]
10955            fn from_computed_value(computed: &computed_value::T) -> Self {
10956                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
10957                SpecifiedValue(iter.collect())
10958            }
10959        }
10960    
10961        #[allow(unused_variables)]
10962        pub unsafe fn cascade_property(
10963            declaration: &PropertyDeclaration,
10964            context: &mut computed::Context,
10965        ) {
10966            context.for_non_inherited_property = true;
10967            debug_assert_eq!(
10968                declaration.id().as_longhand().unwrap(),
10969                LonghandId::BackdropFilter,
10970            );
10971            let specified_value = match *declaration {
10972                PropertyDeclaration::CSSWideKeyword(ref wk) => {
10973                    match wk.keyword {
10974                        CSSWideKeyword::Unset |
10975                        CSSWideKeyword::Initial => {
10976                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
10977                        },
10978                        CSSWideKeyword::Inherit => {
10979                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
10980                                context.builder.inherit_backdrop_filter();
10981                        }
10982                        CSSWideKeyword::RevertLayer |
10983                        CSSWideKeyword::Revert => {
10984                            declaration.debug_crash("Found revert/revert-layer not dealt with");
10985                        },
10986                    }
10987                    return;
10988                },
10989                #[cfg(debug_assertions)]
10990                PropertyDeclaration::WithVariables(..) => {
10991                    declaration.debug_crash("Found variables not substituted");
10992                    return;
10993                },
10994                _ => unsafe {
10995                    declaration.unchecked_value_as::<longhands::backdrop_filter::SpecifiedValue>()
10996                },
10997            };
10998
10999
11000                let computed = specified_value.to_computed_value(context);
11001                context.builder.set_backdrop_filter(computed)
11002        }
11003
11004        pub fn parse_declared<'i, 't>(
11005            context: &ParserContext,
11006            input: &mut Parser<'i, 't>,
11007        ) -> Result<PropertyDeclaration, ParseError<'i>> {
11008                parse(context, input)
11009                .map(PropertyDeclaration::BackdropFilter)
11010        }
11011    }
11012
11013
11014
11015
11016
11017    
11018
11019    
11020        
11021    
11022    /// https://drafts.fxtf.org/compositing/#propdef-mix-blend-mode
11023    pub mod mix_blend_mode {
11024        #[allow(unused_imports)]
11025        use cssparser::{Parser, BasicParseError, Token};
11026        #[allow(unused_imports)]
11027        use crate::parser::{Parse, ParserContext};
11028        #[allow(unused_imports)]
11029        use crate::properties::{UnparsedValue, ShorthandId};
11030        #[allow(unused_imports)]
11031        use crate::error_reporting::ParseErrorReporter;
11032        #[allow(unused_imports)]
11033        use crate::properties::longhands;
11034        #[allow(unused_imports)]
11035        use crate::properties::{LonghandId, LonghandIdSet};
11036        #[allow(unused_imports)]
11037        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
11038        #[allow(unused_imports)]
11039        use crate::properties::style_structs;
11040        #[allow(unused_imports)]
11041        use selectors::parser::SelectorParseErrorKind;
11042        #[allow(unused_imports)]
11043        use servo_arc::Arc;
11044        #[allow(unused_imports)]
11045        use style_traits::{ParseError, StyleParseErrorKind};
11046        #[allow(unused_imports)]
11047        use crate::values::computed::{Context, ToComputedValue};
11048        #[allow(unused_imports)]
11049        use crate::values::{computed, generics, specified};
11050        #[allow(unused_imports)]
11051        use crate::Atom;
11052        
11053            
11054        pub use self::computed_value::T as SpecifiedValue;
11055        pub mod computed_value {
11056            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
11057            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
11058            pub enum T {
11059            
11060            Normal,
11061            
11062            Multiply,
11063            
11064            Screen,
11065            
11066            Overlay,
11067            
11068            Darken,
11069            
11070            Lighten,
11071            
11072            ColorDodge,
11073            
11074            ColorBurn,
11075            
11076            HardLight,
11077            
11078            SoftLight,
11079            
11080            Difference,
11081            
11082            Exclusion,
11083            
11084            Hue,
11085            
11086            Saturation,
11087            
11088            Color,
11089            
11090            Luminosity,
11091            
11092            PlusLighter,
11093            }
11094        }
11095        #[inline]
11096        pub fn get_initial_value() -> computed_value::T {
11097            computed_value::T::Normal
11098        }
11099        #[inline]
11100        pub fn get_initial_specified_value() -> SpecifiedValue {
11101            SpecifiedValue::Normal
11102        }
11103        #[inline]
11104        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
11105                             -> Result<SpecifiedValue, ParseError<'i>> {
11106            SpecifiedValue::parse(input)
11107        }
11108
11109    
11110        
11111        #[allow(unused_variables)]
11112        pub unsafe fn cascade_property(
11113            declaration: &PropertyDeclaration,
11114            context: &mut computed::Context,
11115        ) {
11116            context.for_non_inherited_property = true;
11117            debug_assert_eq!(
11118                declaration.id().as_longhand().unwrap(),
11119                LonghandId::MixBlendMode,
11120            );
11121            let specified_value = match *declaration {
11122                PropertyDeclaration::CSSWideKeyword(ref wk) => {
11123                    match wk.keyword {
11124                        CSSWideKeyword::Unset |
11125                        CSSWideKeyword::Initial => {
11126                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
11127                        },
11128                        CSSWideKeyword::Inherit => {
11129                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
11130                                context.builder.inherit_mix_blend_mode();
11131                        }
11132                        CSSWideKeyword::RevertLayer |
11133                        CSSWideKeyword::Revert => {
11134                            declaration.debug_crash("Found revert/revert-layer not dealt with");
11135                        },
11136                    }
11137                    return;
11138                },
11139                #[cfg(debug_assertions)]
11140                PropertyDeclaration::WithVariables(..) => {
11141                    declaration.debug_crash("Found variables not substituted");
11142                    return;
11143                },
11144                _ => unsafe {
11145                    declaration.unchecked_value_as::<longhands::mix_blend_mode::SpecifiedValue>()
11146                },
11147            };
11148
11149
11150                let computed = specified_value.to_computed_value(context);
11151                context.builder.set_mix_blend_mode(computed)
11152        }
11153
11154        pub fn parse_declared<'i, 't>(
11155            context: &ParserContext,
11156            input: &mut Parser<'i, 't>,
11157        ) -> Result<PropertyDeclaration, ParseError<'i>> {
11158                parse(context, input)
11159                .map(PropertyDeclaration::MixBlendMode)
11160        }
11161    }
11162
11163
11164
11165    
11166    /* This Source Code Form is subject to the terms of the Mozilla Public
11167 * License, v. 2.0. If a copy of the MPL was not distributed with this
11168 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
11169
11170
11171
11172
11173
11174    
11175        
11176    
11177    /// https://drafts.csswg.org/css-fonts/#propdef-font-family
11178    pub mod font_family {
11179        #[allow(unused_imports)]
11180        use cssparser::{Parser, BasicParseError, Token};
11181        #[allow(unused_imports)]
11182        use crate::parser::{Parse, ParserContext};
11183        #[allow(unused_imports)]
11184        use crate::properties::{UnparsedValue, ShorthandId};
11185        #[allow(unused_imports)]
11186        use crate::error_reporting::ParseErrorReporter;
11187        #[allow(unused_imports)]
11188        use crate::properties::longhands;
11189        #[allow(unused_imports)]
11190        use crate::properties::{LonghandId, LonghandIdSet};
11191        #[allow(unused_imports)]
11192        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
11193        #[allow(unused_imports)]
11194        use crate::properties::style_structs;
11195        #[allow(unused_imports)]
11196        use selectors::parser::SelectorParseErrorKind;
11197        #[allow(unused_imports)]
11198        use servo_arc::Arc;
11199        #[allow(unused_imports)]
11200        use style_traits::{ParseError, StyleParseErrorKind};
11201        #[allow(unused_imports)]
11202        use crate::values::computed::{Context, ToComputedValue};
11203        #[allow(unused_imports)]
11204        use crate::values::{computed, generics, specified};
11205        #[allow(unused_imports)]
11206        use crate::Atom;
11207        
11208            
11209        #[allow(unused_imports)]
11210        use app_units::Au;
11211        #[allow(unused_imports)]
11212        use crate::values::specified::AllowQuirks;
11213        #[allow(unused_imports)]
11214        use crate::Zero;
11215        #[allow(unused_imports)]
11216        use smallvec::SmallVec;
11217        pub use crate::values::specified::FontFamily as SpecifiedValue;
11218        pub mod computed_value {
11219            pub use crate::values::computed::FontFamily as T;
11220        }
11221        #[inline] pub fn get_initial_value() -> computed_value::T { computed::FontFamily::serif() }
11222        #[allow(unused_variables)]
11223        #[inline]
11224        pub fn parse<'i, 't>(
11225            context: &ParserContext,
11226            input: &mut Parser<'i, 't>,
11227        ) -> Result<SpecifiedValue, ParseError<'i>> {
11228            <specified::FontFamily as crate::parser::Parse>::parse(context, input)
11229        }
11230    
11231        
11232        #[allow(unused_variables)]
11233        pub unsafe fn cascade_property(
11234            declaration: &PropertyDeclaration,
11235            context: &mut computed::Context,
11236        ) {
11237            context.for_non_inherited_property = false;
11238            debug_assert_eq!(
11239                declaration.id().as_longhand().unwrap(),
11240                LonghandId::FontFamily,
11241            );
11242            let specified_value = match *declaration {
11243                PropertyDeclaration::CSSWideKeyword(ref wk) => {
11244                    match wk.keyword {
11245                        CSSWideKeyword::Initial => {
11246                                context.builder.reset_font_family();
11247                        },
11248                        CSSWideKeyword::Unset |
11249                        CSSWideKeyword::Inherit => {
11250                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
11251                        }
11252                        CSSWideKeyword::RevertLayer |
11253                        CSSWideKeyword::Revert => {
11254                            declaration.debug_crash("Found revert/revert-layer not dealt with");
11255                        },
11256                    }
11257                    return;
11258                },
11259                #[cfg(debug_assertions)]
11260                PropertyDeclaration::WithVariables(..) => {
11261                    declaration.debug_crash("Found variables not substituted");
11262                    return;
11263                },
11264                _ => unsafe {
11265                    declaration.unchecked_value_as::<crate::values::specified::FontFamily>()
11266                },
11267            };
11268
11269
11270                let computed = specified_value.to_computed_value(context);
11271                context.builder.set_font_family(computed)
11272        }
11273
11274        pub fn parse_declared<'i, 't>(
11275            context: &ParserContext,
11276            input: &mut Parser<'i, 't>,
11277        ) -> Result<PropertyDeclaration, ParseError<'i>> {
11278                parse(context, input)
11279                .map(PropertyDeclaration::FontFamily)
11280        }
11281    }
11282
11283
11284
11285
11286    
11287        
11288    
11289    /// https://drafts.csswg.org/css-fonts/#propdef-font-style
11290    pub mod font_style {
11291        #[allow(unused_imports)]
11292        use cssparser::{Parser, BasicParseError, Token};
11293        #[allow(unused_imports)]
11294        use crate::parser::{Parse, ParserContext};
11295        #[allow(unused_imports)]
11296        use crate::properties::{UnparsedValue, ShorthandId};
11297        #[allow(unused_imports)]
11298        use crate::error_reporting::ParseErrorReporter;
11299        #[allow(unused_imports)]
11300        use crate::properties::longhands;
11301        #[allow(unused_imports)]
11302        use crate::properties::{LonghandId, LonghandIdSet};
11303        #[allow(unused_imports)]
11304        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
11305        #[allow(unused_imports)]
11306        use crate::properties::style_structs;
11307        #[allow(unused_imports)]
11308        use selectors::parser::SelectorParseErrorKind;
11309        #[allow(unused_imports)]
11310        use servo_arc::Arc;
11311        #[allow(unused_imports)]
11312        use style_traits::{ParseError, StyleParseErrorKind};
11313        #[allow(unused_imports)]
11314        use crate::values::computed::{Context, ToComputedValue};
11315        #[allow(unused_imports)]
11316        use crate::values::{computed, generics, specified};
11317        #[allow(unused_imports)]
11318        use crate::Atom;
11319        
11320            
11321        #[allow(unused_imports)]
11322        use app_units::Au;
11323        #[allow(unused_imports)]
11324        use crate::values::specified::AllowQuirks;
11325        #[allow(unused_imports)]
11326        use crate::Zero;
11327        #[allow(unused_imports)]
11328        use smallvec::SmallVec;
11329        pub use crate::values::specified::FontStyle as SpecifiedValue;
11330        pub mod computed_value {
11331            pub use crate::values::computed::FontStyle as T;
11332        }
11333        #[inline] pub fn get_initial_value() -> computed_value::T { computed::FontStyle::normal() }
11334        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::FontStyle::normal() }
11335        #[allow(unused_variables)]
11336        #[inline]
11337        pub fn parse<'i, 't>(
11338            context: &ParserContext,
11339            input: &mut Parser<'i, 't>,
11340        ) -> Result<SpecifiedValue, ParseError<'i>> {
11341            <specified::FontStyle as crate::parser::Parse>::parse(context, input)
11342        }
11343    
11344        
11345        #[allow(unused_variables)]
11346        pub unsafe fn cascade_property(
11347            declaration: &PropertyDeclaration,
11348            context: &mut computed::Context,
11349        ) {
11350            context.for_non_inherited_property = false;
11351            debug_assert_eq!(
11352                declaration.id().as_longhand().unwrap(),
11353                LonghandId::FontStyle,
11354            );
11355            let specified_value = match *declaration {
11356                PropertyDeclaration::CSSWideKeyword(ref wk) => {
11357                    match wk.keyword {
11358                        CSSWideKeyword::Initial => {
11359                                context.builder.reset_font_style();
11360                        },
11361                        CSSWideKeyword::Unset |
11362                        CSSWideKeyword::Inherit => {
11363                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
11364                        }
11365                        CSSWideKeyword::RevertLayer |
11366                        CSSWideKeyword::Revert => {
11367                            declaration.debug_crash("Found revert/revert-layer not dealt with");
11368                        },
11369                    }
11370                    return;
11371                },
11372                #[cfg(debug_assertions)]
11373                PropertyDeclaration::WithVariables(..) => {
11374                    declaration.debug_crash("Found variables not substituted");
11375                    return;
11376                },
11377                _ => unsafe {
11378                    declaration.unchecked_value_as::<crate::values::specified::FontStyle>()
11379                },
11380            };
11381
11382
11383                let computed = specified_value.to_computed_value(context);
11384                context.builder.set_font_style(computed)
11385        }
11386
11387        pub fn parse_declared<'i, 't>(
11388            context: &ParserContext,
11389            input: &mut Parser<'i, 't>,
11390        ) -> Result<PropertyDeclaration, ParseError<'i>> {
11391                parse(context, input)
11392                .map(PropertyDeclaration::FontStyle)
11393        }
11394    }
11395
11396
11397
11398
11399
11400
11401    
11402
11403    
11404        
11405    
11406    /// https://drafts.csswg.org/css-fonts/#propdef-font-variant-caps
11407    pub mod font_variant_caps {
11408        #[allow(unused_imports)]
11409        use cssparser::{Parser, BasicParseError, Token};
11410        #[allow(unused_imports)]
11411        use crate::parser::{Parse, ParserContext};
11412        #[allow(unused_imports)]
11413        use crate::properties::{UnparsedValue, ShorthandId};
11414        #[allow(unused_imports)]
11415        use crate::error_reporting::ParseErrorReporter;
11416        #[allow(unused_imports)]
11417        use crate::properties::longhands;
11418        #[allow(unused_imports)]
11419        use crate::properties::{LonghandId, LonghandIdSet};
11420        #[allow(unused_imports)]
11421        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
11422        #[allow(unused_imports)]
11423        use crate::properties::style_structs;
11424        #[allow(unused_imports)]
11425        use selectors::parser::SelectorParseErrorKind;
11426        #[allow(unused_imports)]
11427        use servo_arc::Arc;
11428        #[allow(unused_imports)]
11429        use style_traits::{ParseError, StyleParseErrorKind};
11430        #[allow(unused_imports)]
11431        use crate::values::computed::{Context, ToComputedValue};
11432        #[allow(unused_imports)]
11433        use crate::values::{computed, generics, specified};
11434        #[allow(unused_imports)]
11435        use crate::Atom;
11436        
11437            
11438        pub use self::computed_value::T as SpecifiedValue;
11439        pub mod computed_value {
11440            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
11441            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
11442            pub enum T {
11443            
11444            Normal,
11445            
11446            SmallCaps,
11447            }
11448        }
11449        #[inline]
11450        pub fn get_initial_value() -> computed_value::T {
11451            computed_value::T::Normal
11452        }
11453        #[inline]
11454        pub fn get_initial_specified_value() -> SpecifiedValue {
11455            SpecifiedValue::Normal
11456        }
11457        #[inline]
11458        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
11459                             -> Result<SpecifiedValue, ParseError<'i>> {
11460            SpecifiedValue::parse(input)
11461        }
11462
11463    
11464        
11465        #[allow(unused_variables)]
11466        pub unsafe fn cascade_property(
11467            declaration: &PropertyDeclaration,
11468            context: &mut computed::Context,
11469        ) {
11470            context.for_non_inherited_property = false;
11471            debug_assert_eq!(
11472                declaration.id().as_longhand().unwrap(),
11473                LonghandId::FontVariantCaps,
11474            );
11475            let specified_value = match *declaration {
11476                PropertyDeclaration::CSSWideKeyword(ref wk) => {
11477                    match wk.keyword {
11478                        CSSWideKeyword::Initial => {
11479                                context.builder.reset_font_variant_caps();
11480                        },
11481                        CSSWideKeyword::Unset |
11482                        CSSWideKeyword::Inherit => {
11483                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
11484                        }
11485                        CSSWideKeyword::RevertLayer |
11486                        CSSWideKeyword::Revert => {
11487                            declaration.debug_crash("Found revert/revert-layer not dealt with");
11488                        },
11489                    }
11490                    return;
11491                },
11492                #[cfg(debug_assertions)]
11493                PropertyDeclaration::WithVariables(..) => {
11494                    declaration.debug_crash("Found variables not substituted");
11495                    return;
11496                },
11497                _ => unsafe {
11498                    declaration.unchecked_value_as::<longhands::font_variant_caps::SpecifiedValue>()
11499                },
11500            };
11501
11502
11503                let computed = specified_value.to_computed_value(context);
11504                context.builder.set_font_variant_caps(computed)
11505        }
11506
11507        pub fn parse_declared<'i, 't>(
11508            context: &ParserContext,
11509            input: &mut Parser<'i, 't>,
11510        ) -> Result<PropertyDeclaration, ParseError<'i>> {
11511                parse(context, input)
11512                .map(PropertyDeclaration::FontVariantCaps)
11513        }
11514    }
11515
11516
11517
11518
11519    
11520        
11521    
11522    /// https://drafts.csswg.org/css-fonts/#propdef-font-weight
11523    pub mod font_weight {
11524        #[allow(unused_imports)]
11525        use cssparser::{Parser, BasicParseError, Token};
11526        #[allow(unused_imports)]
11527        use crate::parser::{Parse, ParserContext};
11528        #[allow(unused_imports)]
11529        use crate::properties::{UnparsedValue, ShorthandId};
11530        #[allow(unused_imports)]
11531        use crate::error_reporting::ParseErrorReporter;
11532        #[allow(unused_imports)]
11533        use crate::properties::longhands;
11534        #[allow(unused_imports)]
11535        use crate::properties::{LonghandId, LonghandIdSet};
11536        #[allow(unused_imports)]
11537        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
11538        #[allow(unused_imports)]
11539        use crate::properties::style_structs;
11540        #[allow(unused_imports)]
11541        use selectors::parser::SelectorParseErrorKind;
11542        #[allow(unused_imports)]
11543        use servo_arc::Arc;
11544        #[allow(unused_imports)]
11545        use style_traits::{ParseError, StyleParseErrorKind};
11546        #[allow(unused_imports)]
11547        use crate::values::computed::{Context, ToComputedValue};
11548        #[allow(unused_imports)]
11549        use crate::values::{computed, generics, specified};
11550        #[allow(unused_imports)]
11551        use crate::Atom;
11552        
11553            
11554        #[allow(unused_imports)]
11555        use app_units::Au;
11556        #[allow(unused_imports)]
11557        use crate::values::specified::AllowQuirks;
11558        #[allow(unused_imports)]
11559        use crate::Zero;
11560        #[allow(unused_imports)]
11561        use smallvec::SmallVec;
11562        pub use crate::values::specified::FontWeight as SpecifiedValue;
11563        pub mod computed_value {
11564            pub use crate::values::computed::FontWeight as T;
11565        }
11566        #[inline] pub fn get_initial_value() -> computed_value::T { computed::FontWeight::normal() }
11567        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::FontWeight::normal() }
11568        #[allow(unused_variables)]
11569        #[inline]
11570        pub fn parse<'i, 't>(
11571            context: &ParserContext,
11572            input: &mut Parser<'i, 't>,
11573        ) -> Result<SpecifiedValue, ParseError<'i>> {
11574            <specified::FontWeight as crate::parser::Parse>::parse(context, input)
11575        }
11576    
11577        
11578        #[allow(unused_variables)]
11579        pub unsafe fn cascade_property(
11580            declaration: &PropertyDeclaration,
11581            context: &mut computed::Context,
11582        ) {
11583            context.for_non_inherited_property = false;
11584            debug_assert_eq!(
11585                declaration.id().as_longhand().unwrap(),
11586                LonghandId::FontWeight,
11587            );
11588            let specified_value = match *declaration {
11589                PropertyDeclaration::CSSWideKeyword(ref wk) => {
11590                    match wk.keyword {
11591                        CSSWideKeyword::Initial => {
11592                                context.builder.reset_font_weight();
11593                        },
11594                        CSSWideKeyword::Unset |
11595                        CSSWideKeyword::Inherit => {
11596                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
11597                        }
11598                        CSSWideKeyword::RevertLayer |
11599                        CSSWideKeyword::Revert => {
11600                            declaration.debug_crash("Found revert/revert-layer not dealt with");
11601                        },
11602                    }
11603                    return;
11604                },
11605                #[cfg(debug_assertions)]
11606                PropertyDeclaration::WithVariables(..) => {
11607                    declaration.debug_crash("Found variables not substituted");
11608                    return;
11609                },
11610                _ => unsafe {
11611                    declaration.unchecked_value_as::<crate::values::specified::FontWeight>()
11612                },
11613            };
11614
11615
11616                let computed = specified_value.to_computed_value(context);
11617                context.builder.set_font_weight(computed)
11618        }
11619
11620        pub fn parse_declared<'i, 't>(
11621            context: &ParserContext,
11622            input: &mut Parser<'i, 't>,
11623        ) -> Result<PropertyDeclaration, ParseError<'i>> {
11624                parse(context, input)
11625                .map(PropertyDeclaration::FontWeight)
11626        }
11627    }
11628
11629
11630
11631
11632    
11633        
11634    
11635    /// https://drafts.csswg.org/css-fonts/#propdef-font-size
11636    pub mod font_size {
11637        #[allow(unused_imports)]
11638        use cssparser::{Parser, BasicParseError, Token};
11639        #[allow(unused_imports)]
11640        use crate::parser::{Parse, ParserContext};
11641        #[allow(unused_imports)]
11642        use crate::properties::{UnparsedValue, ShorthandId};
11643        #[allow(unused_imports)]
11644        use crate::error_reporting::ParseErrorReporter;
11645        #[allow(unused_imports)]
11646        use crate::properties::longhands;
11647        #[allow(unused_imports)]
11648        use crate::properties::{LonghandId, LonghandIdSet};
11649        #[allow(unused_imports)]
11650        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
11651        #[allow(unused_imports)]
11652        use crate::properties::style_structs;
11653        #[allow(unused_imports)]
11654        use selectors::parser::SelectorParseErrorKind;
11655        #[allow(unused_imports)]
11656        use servo_arc::Arc;
11657        #[allow(unused_imports)]
11658        use style_traits::{ParseError, StyleParseErrorKind};
11659        #[allow(unused_imports)]
11660        use crate::values::computed::{Context, ToComputedValue};
11661        #[allow(unused_imports)]
11662        use crate::values::{computed, generics, specified};
11663        #[allow(unused_imports)]
11664        use crate::Atom;
11665        
11666            
11667        #[allow(unused_imports)]
11668        use app_units::Au;
11669        #[allow(unused_imports)]
11670        use crate::values::specified::AllowQuirks;
11671        #[allow(unused_imports)]
11672        use crate::Zero;
11673        #[allow(unused_imports)]
11674        use smallvec::SmallVec;
11675        pub use crate::values::specified::FontSize as SpecifiedValue;
11676        pub mod computed_value {
11677            pub use crate::values::computed::FontSize as T;
11678        }
11679        #[inline] pub fn get_initial_value() -> computed_value::T { computed::FontSize::medium() }
11680        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::FontSize::medium() }
11681        #[allow(unused_variables)]
11682        #[inline]
11683        pub fn parse<'i, 't>(
11684            context: &ParserContext,
11685            input: &mut Parser<'i, 't>,
11686        ) -> Result<SpecifiedValue, ParseError<'i>> {
11687            specified::FontSize::parse_quirky(context, input, AllowQuirks::Yes)
11688        }
11689    
11690        
11691        #[allow(unused_variables)]
11692        pub unsafe fn cascade_property(
11693            declaration: &PropertyDeclaration,
11694            context: &mut computed::Context,
11695        ) {
11696            context.for_non_inherited_property = false;
11697            debug_assert_eq!(
11698                declaration.id().as_longhand().unwrap(),
11699                LonghandId::FontSize,
11700            );
11701            let specified_value = match *declaration {
11702                PropertyDeclaration::CSSWideKeyword(ref wk) => {
11703                    match wk.keyword {
11704                        CSSWideKeyword::Initial => {
11705                                context.builder.reset_font_size();
11706                        },
11707                        CSSWideKeyword::Unset |
11708                        CSSWideKeyword::Inherit => {
11709                                if !context.builder.effective_zoom_for_inheritance.is_one() {
11710                                    let old_zoom = context.builder.effective_zoom;
11711                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
11712                                    let computed = context.builder.inherited_style.clone_font_size();
11713                                    let specified = ToComputedValue::from_computed_value(&computed);
11714                                    let decl = PropertyDeclaration::FontSize(specified);
11715                                    cascade_property(&decl, context);
11716                                    context.builder.effective_zoom = old_zoom;
11717                                    return;
11718                                }
11719                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
11720                        }
11721                        CSSWideKeyword::RevertLayer |
11722                        CSSWideKeyword::Revert => {
11723                            declaration.debug_crash("Found revert/revert-layer not dealt with");
11724                        },
11725                    }
11726                    return;
11727                },
11728                #[cfg(debug_assertions)]
11729                PropertyDeclaration::WithVariables(..) => {
11730                    declaration.debug_crash("Found variables not substituted");
11731                    return;
11732                },
11733                _ => unsafe {
11734                    declaration.unchecked_value_as::<crate::values::specified::FontSize>()
11735                },
11736            };
11737
11738
11739                let computed = specified_value.to_computed_value(context);
11740                context.builder.set_font_size(computed)
11741        }
11742
11743        pub fn parse_declared<'i, 't>(
11744            context: &ParserContext,
11745            input: &mut Parser<'i, 't>,
11746        ) -> Result<PropertyDeclaration, ParseError<'i>> {
11747                parse(context, input)
11748                .map(PropertyDeclaration::FontSize)
11749        }
11750    }
11751
11752
11753
11754
11755    
11756        
11757    
11758
11759
11760
11761    
11762        
11763    
11764
11765
11766
11767    
11768        
11769    
11770
11771
11772
11773    
11774        
11775    
11776
11777
11778
11779    
11780        
11781    
11782
11783
11784
11785    
11786        
11787    
11788    /// https://drafts.csswg.org/css-fonts/#propdef-font-stretch
11789    pub mod font_stretch {
11790        #[allow(unused_imports)]
11791        use cssparser::{Parser, BasicParseError, Token};
11792        #[allow(unused_imports)]
11793        use crate::parser::{Parse, ParserContext};
11794        #[allow(unused_imports)]
11795        use crate::properties::{UnparsedValue, ShorthandId};
11796        #[allow(unused_imports)]
11797        use crate::error_reporting::ParseErrorReporter;
11798        #[allow(unused_imports)]
11799        use crate::properties::longhands;
11800        #[allow(unused_imports)]
11801        use crate::properties::{LonghandId, LonghandIdSet};
11802        #[allow(unused_imports)]
11803        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
11804        #[allow(unused_imports)]
11805        use crate::properties::style_structs;
11806        #[allow(unused_imports)]
11807        use selectors::parser::SelectorParseErrorKind;
11808        #[allow(unused_imports)]
11809        use servo_arc::Arc;
11810        #[allow(unused_imports)]
11811        use style_traits::{ParseError, StyleParseErrorKind};
11812        #[allow(unused_imports)]
11813        use crate::values::computed::{Context, ToComputedValue};
11814        #[allow(unused_imports)]
11815        use crate::values::{computed, generics, specified};
11816        #[allow(unused_imports)]
11817        use crate::Atom;
11818        
11819            
11820        #[allow(unused_imports)]
11821        use app_units::Au;
11822        #[allow(unused_imports)]
11823        use crate::values::specified::AllowQuirks;
11824        #[allow(unused_imports)]
11825        use crate::Zero;
11826        #[allow(unused_imports)]
11827        use smallvec::SmallVec;
11828        pub use crate::values::specified::FontStretch as SpecifiedValue;
11829        pub mod computed_value {
11830            pub use crate::values::computed::FontStretch as T;
11831        }
11832        #[inline] pub fn get_initial_value() -> computed_value::T { computed::FontStretch::hundred() }
11833        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::FontStretch::normal() }
11834        #[allow(unused_variables)]
11835        #[inline]
11836        pub fn parse<'i, 't>(
11837            context: &ParserContext,
11838            input: &mut Parser<'i, 't>,
11839        ) -> Result<SpecifiedValue, ParseError<'i>> {
11840            <specified::FontStretch as crate::parser::Parse>::parse(context, input)
11841        }
11842    
11843        
11844        #[allow(unused_variables)]
11845        pub unsafe fn cascade_property(
11846            declaration: &PropertyDeclaration,
11847            context: &mut computed::Context,
11848        ) {
11849            context.for_non_inherited_property = false;
11850            debug_assert_eq!(
11851                declaration.id().as_longhand().unwrap(),
11852                LonghandId::FontStretch,
11853            );
11854            let specified_value = match *declaration {
11855                PropertyDeclaration::CSSWideKeyword(ref wk) => {
11856                    match wk.keyword {
11857                        CSSWideKeyword::Initial => {
11858                                context.builder.reset_font_stretch();
11859                        },
11860                        CSSWideKeyword::Unset |
11861                        CSSWideKeyword::Inherit => {
11862                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
11863                        }
11864                        CSSWideKeyword::RevertLayer |
11865                        CSSWideKeyword::Revert => {
11866                            declaration.debug_crash("Found revert/revert-layer not dealt with");
11867                        },
11868                    }
11869                    return;
11870                },
11871                #[cfg(debug_assertions)]
11872                PropertyDeclaration::WithVariables(..) => {
11873                    declaration.debug_crash("Found variables not substituted");
11874                    return;
11875                },
11876                _ => unsafe {
11877                    declaration.unchecked_value_as::<crate::values::specified::FontStretch>()
11878                },
11879            };
11880
11881
11882                let computed = specified_value.to_computed_value(context);
11883                context.builder.set_font_stretch(computed)
11884        }
11885
11886        pub fn parse_declared<'i, 't>(
11887            context: &ParserContext,
11888            input: &mut Parser<'i, 't>,
11889        ) -> Result<PropertyDeclaration, ParseError<'i>> {
11890                parse(context, input)
11891                .map(PropertyDeclaration::FontStretch)
11892        }
11893    }
11894
11895
11896
11897
11898    
11899
11900    
11901        
11902    
11903
11904
11905
11906    
11907        
11908    
11909
11910
11911
11912    
11913        
11914    
11915
11916
11917
11918    
11919
11920    
11921        
11922    
11923
11924
11925
11926    
11927        
11928    
11929
11930
11931
11932    
11933        
11934    
11935
11936
11937
11938    
11939
11940    
11941        
11942    
11943
11944
11945
11946    
11947        
11948    
11949
11950
11951
11952    
11953        
11954    
11955    /// https://drafts.csswg.org/css-fonts-4/#propdef-font-variation-settings
11956    pub mod font_variation_settings {
11957        #[allow(unused_imports)]
11958        use cssparser::{Parser, BasicParseError, Token};
11959        #[allow(unused_imports)]
11960        use crate::parser::{Parse, ParserContext};
11961        #[allow(unused_imports)]
11962        use crate::properties::{UnparsedValue, ShorthandId};
11963        #[allow(unused_imports)]
11964        use crate::error_reporting::ParseErrorReporter;
11965        #[allow(unused_imports)]
11966        use crate::properties::longhands;
11967        #[allow(unused_imports)]
11968        use crate::properties::{LonghandId, LonghandIdSet};
11969        #[allow(unused_imports)]
11970        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
11971        #[allow(unused_imports)]
11972        use crate::properties::style_structs;
11973        #[allow(unused_imports)]
11974        use selectors::parser::SelectorParseErrorKind;
11975        #[allow(unused_imports)]
11976        use servo_arc::Arc;
11977        #[allow(unused_imports)]
11978        use style_traits::{ParseError, StyleParseErrorKind};
11979        #[allow(unused_imports)]
11980        use crate::values::computed::{Context, ToComputedValue};
11981        #[allow(unused_imports)]
11982        use crate::values::{computed, generics, specified};
11983        #[allow(unused_imports)]
11984        use crate::Atom;
11985        
11986            
11987        #[allow(unused_imports)]
11988        use app_units::Au;
11989        #[allow(unused_imports)]
11990        use crate::values::specified::AllowQuirks;
11991        #[allow(unused_imports)]
11992        use crate::Zero;
11993        #[allow(unused_imports)]
11994        use smallvec::SmallVec;
11995        pub use crate::values::specified::FontVariationSettings as SpecifiedValue;
11996        pub mod computed_value {
11997            pub use crate::values::computed::FontVariationSettings as T;
11998        }
11999        #[inline] pub fn get_initial_value() -> computed_value::T { computed::FontVariationSettings::normal() }
12000        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::FontVariationSettings::normal() }
12001        #[allow(unused_variables)]
12002        #[inline]
12003        pub fn parse<'i, 't>(
12004            context: &ParserContext,
12005            input: &mut Parser<'i, 't>,
12006        ) -> Result<SpecifiedValue, ParseError<'i>> {
12007            <specified::FontVariationSettings as crate::parser::Parse>::parse(context, input)
12008        }
12009    
12010        
12011        #[allow(unused_variables)]
12012        pub unsafe fn cascade_property(
12013            declaration: &PropertyDeclaration,
12014            context: &mut computed::Context,
12015        ) {
12016            context.for_non_inherited_property = false;
12017            debug_assert_eq!(
12018                declaration.id().as_longhand().unwrap(),
12019                LonghandId::FontVariationSettings,
12020            );
12021            let specified_value = match *declaration {
12022                PropertyDeclaration::CSSWideKeyword(ref wk) => {
12023                    match wk.keyword {
12024                        CSSWideKeyword::Initial => {
12025                                context.builder.reset_font_variation_settings();
12026                        },
12027                        CSSWideKeyword::Unset |
12028                        CSSWideKeyword::Inherit => {
12029                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
12030                        }
12031                        CSSWideKeyword::RevertLayer |
12032                        CSSWideKeyword::Revert => {
12033                            declaration.debug_crash("Found revert/revert-layer not dealt with");
12034                        },
12035                    }
12036                    return;
12037                },
12038                #[cfg(debug_assertions)]
12039                PropertyDeclaration::WithVariables(..) => {
12040                    declaration.debug_crash("Found variables not substituted");
12041                    return;
12042                },
12043                _ => unsafe {
12044                    declaration.unchecked_value_as::<crate::values::specified::FontVariationSettings>()
12045                },
12046            };
12047
12048
12049                let computed = specified_value.to_computed_value(context);
12050                context.builder.set_font_variation_settings(computed)
12051        }
12052
12053        pub fn parse_declared<'i, 't>(
12054            context: &ParserContext,
12055            input: &mut Parser<'i, 't>,
12056        ) -> Result<PropertyDeclaration, ParseError<'i>> {
12057                parse(context, input)
12058                .map(PropertyDeclaration::FontVariationSettings)
12059        }
12060    }
12061
12062
12063
12064
12065    
12066        
12067    
12068    /// https://drafts.csswg.org/css-fonts-3/#propdef-font-language-override
12069    pub mod font_language_override {
12070        #[allow(unused_imports)]
12071        use cssparser::{Parser, BasicParseError, Token};
12072        #[allow(unused_imports)]
12073        use crate::parser::{Parse, ParserContext};
12074        #[allow(unused_imports)]
12075        use crate::properties::{UnparsedValue, ShorthandId};
12076        #[allow(unused_imports)]
12077        use crate::error_reporting::ParseErrorReporter;
12078        #[allow(unused_imports)]
12079        use crate::properties::longhands;
12080        #[allow(unused_imports)]
12081        use crate::properties::{LonghandId, LonghandIdSet};
12082        #[allow(unused_imports)]
12083        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
12084        #[allow(unused_imports)]
12085        use crate::properties::style_structs;
12086        #[allow(unused_imports)]
12087        use selectors::parser::SelectorParseErrorKind;
12088        #[allow(unused_imports)]
12089        use servo_arc::Arc;
12090        #[allow(unused_imports)]
12091        use style_traits::{ParseError, StyleParseErrorKind};
12092        #[allow(unused_imports)]
12093        use crate::values::computed::{Context, ToComputedValue};
12094        #[allow(unused_imports)]
12095        use crate::values::{computed, generics, specified};
12096        #[allow(unused_imports)]
12097        use crate::Atom;
12098        
12099            
12100        #[allow(unused_imports)]
12101        use app_units::Au;
12102        #[allow(unused_imports)]
12103        use crate::values::specified::AllowQuirks;
12104        #[allow(unused_imports)]
12105        use crate::Zero;
12106        #[allow(unused_imports)]
12107        use smallvec::SmallVec;
12108        pub use crate::values::specified::FontLanguageOverride as SpecifiedValue;
12109        pub mod computed_value {
12110            pub use crate::values::computed::FontLanguageOverride as T;
12111        }
12112        #[inline] pub fn get_initial_value() -> computed_value::T { computed::FontLanguageOverride::normal() }
12113        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::FontLanguageOverride::normal() }
12114        #[allow(unused_variables)]
12115        #[inline]
12116        pub fn parse<'i, 't>(
12117            context: &ParserContext,
12118            input: &mut Parser<'i, 't>,
12119        ) -> Result<SpecifiedValue, ParseError<'i>> {
12120            <specified::FontLanguageOverride as crate::parser::Parse>::parse(context, input)
12121        }
12122    
12123        
12124        #[allow(unused_variables)]
12125        pub unsafe fn cascade_property(
12126            declaration: &PropertyDeclaration,
12127            context: &mut computed::Context,
12128        ) {
12129            context.for_non_inherited_property = false;
12130            debug_assert_eq!(
12131                declaration.id().as_longhand().unwrap(),
12132                LonghandId::FontLanguageOverride,
12133            );
12134            let specified_value = match *declaration {
12135                PropertyDeclaration::CSSWideKeyword(ref wk) => {
12136                    match wk.keyword {
12137                        CSSWideKeyword::Initial => {
12138                                context.builder.reset_font_language_override();
12139                        },
12140                        CSSWideKeyword::Unset |
12141                        CSSWideKeyword::Inherit => {
12142                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
12143                        }
12144                        CSSWideKeyword::RevertLayer |
12145                        CSSWideKeyword::Revert => {
12146                            declaration.debug_crash("Found revert/revert-layer not dealt with");
12147                        },
12148                    }
12149                    return;
12150                },
12151                #[cfg(debug_assertions)]
12152                PropertyDeclaration::WithVariables(..) => {
12153                    declaration.debug_crash("Found variables not substituted");
12154                    return;
12155                },
12156                _ => unsafe {
12157                    declaration.unchecked_value_as::<crate::values::specified::FontLanguageOverride>()
12158                },
12159            };
12160
12161
12162                let computed = specified_value.to_computed_value(context);
12163                context.builder.set_font_language_override(computed)
12164        }
12165
12166        pub fn parse_declared<'i, 't>(
12167            context: &ParserContext,
12168            input: &mut Parser<'i, 't>,
12169        ) -> Result<PropertyDeclaration, ParseError<'i>> {
12170                parse(context, input)
12171                .map(PropertyDeclaration::FontLanguageOverride)
12172        }
12173    }
12174
12175
12176
12177
12178    
12179
12180    
12181        
12182    
12183
12184
12185
12186    
12187        
12188    
12189
12190
12191
12192    
12193        
12194    
12195    /// Internal (not web-exposed)
12196    pub mod _x_lang {
12197        #[allow(unused_imports)]
12198        use cssparser::{Parser, BasicParseError, Token};
12199        #[allow(unused_imports)]
12200        use crate::parser::{Parse, ParserContext};
12201        #[allow(unused_imports)]
12202        use crate::properties::{UnparsedValue, ShorthandId};
12203        #[allow(unused_imports)]
12204        use crate::error_reporting::ParseErrorReporter;
12205        #[allow(unused_imports)]
12206        use crate::properties::longhands;
12207        #[allow(unused_imports)]
12208        use crate::properties::{LonghandId, LonghandIdSet};
12209        #[allow(unused_imports)]
12210        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
12211        #[allow(unused_imports)]
12212        use crate::properties::style_structs;
12213        #[allow(unused_imports)]
12214        use selectors::parser::SelectorParseErrorKind;
12215        #[allow(unused_imports)]
12216        use servo_arc::Arc;
12217        #[allow(unused_imports)]
12218        use style_traits::{ParseError, StyleParseErrorKind};
12219        #[allow(unused_imports)]
12220        use crate::values::computed::{Context, ToComputedValue};
12221        #[allow(unused_imports)]
12222        use crate::values::{computed, generics, specified};
12223        #[allow(unused_imports)]
12224        use crate::Atom;
12225        
12226            
12227        #[allow(unused_imports)]
12228        use app_units::Au;
12229        #[allow(unused_imports)]
12230        use crate::values::specified::AllowQuirks;
12231        #[allow(unused_imports)]
12232        use crate::Zero;
12233        #[allow(unused_imports)]
12234        use smallvec::SmallVec;
12235        pub use crate::values::specified::XLang as SpecifiedValue;
12236        pub mod computed_value {
12237            pub use crate::values::computed::XLang as T;
12238        }
12239        #[inline] pub fn get_initial_value() -> computed_value::T { computed::XLang::get_initial_value() }
12240        #[allow(unused_variables)]
12241        #[inline]
12242        pub fn parse<'i, 't>(
12243            context: &ParserContext,
12244            input: &mut Parser<'i, 't>,
12245        ) -> Result<SpecifiedValue, ParseError<'i>> {
12246            <specified::XLang as crate::parser::Parse>::parse(context, input)
12247        }
12248    
12249        
12250        #[allow(unused_variables)]
12251        pub unsafe fn cascade_property(
12252            declaration: &PropertyDeclaration,
12253            context: &mut computed::Context,
12254        ) {
12255            context.for_non_inherited_property = false;
12256            debug_assert_eq!(
12257                declaration.id().as_longhand().unwrap(),
12258                LonghandId::XLang,
12259            );
12260            let specified_value = match *declaration {
12261                PropertyDeclaration::CSSWideKeyword(ref wk) => {
12262                    match wk.keyword {
12263                        CSSWideKeyword::Initial => {
12264                                context.builder.reset__x_lang();
12265                        },
12266                        CSSWideKeyword::Unset |
12267                        CSSWideKeyword::Inherit => {
12268                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
12269                        }
12270                        CSSWideKeyword::RevertLayer |
12271                        CSSWideKeyword::Revert => {
12272                            declaration.debug_crash("Found revert/revert-layer not dealt with");
12273                        },
12274                    }
12275                    return;
12276                },
12277                #[cfg(debug_assertions)]
12278                PropertyDeclaration::WithVariables(..) => {
12279                    declaration.debug_crash("Found variables not substituted");
12280                    return;
12281                },
12282                _ => unsafe {
12283                    declaration.unchecked_value_as::<crate::values::specified::XLang>()
12284                },
12285            };
12286
12287
12288                let computed = specified_value.to_computed_value(context);
12289                context.builder.set__x_lang(computed)
12290        }
12291
12292        pub fn parse_declared<'i, 't>(
12293            context: &ParserContext,
12294            input: &mut Parser<'i, 't>,
12295        ) -> Result<PropertyDeclaration, ParseError<'i>> {
12296                parse(context, input)
12297                .map(PropertyDeclaration::XLang)
12298        }
12299    }
12300
12301
12302
12303
12304    
12305        
12306    
12307
12308
12309
12310    
12311
12312    
12313        
12314    
12315
12316
12317
12318    
12319
12320    
12321        
12322    
12323
12324
12325
12326    
12327        
12328    
12329
12330
12331
12332    
12333        
12334    
12335    /// https://drafts.csswg.org/css2/visudet.html#propdef-line-height
12336    pub mod line_height {
12337        #[allow(unused_imports)]
12338        use cssparser::{Parser, BasicParseError, Token};
12339        #[allow(unused_imports)]
12340        use crate::parser::{Parse, ParserContext};
12341        #[allow(unused_imports)]
12342        use crate::properties::{UnparsedValue, ShorthandId};
12343        #[allow(unused_imports)]
12344        use crate::error_reporting::ParseErrorReporter;
12345        #[allow(unused_imports)]
12346        use crate::properties::longhands;
12347        #[allow(unused_imports)]
12348        use crate::properties::{LonghandId, LonghandIdSet};
12349        #[allow(unused_imports)]
12350        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
12351        #[allow(unused_imports)]
12352        use crate::properties::style_structs;
12353        #[allow(unused_imports)]
12354        use selectors::parser::SelectorParseErrorKind;
12355        #[allow(unused_imports)]
12356        use servo_arc::Arc;
12357        #[allow(unused_imports)]
12358        use style_traits::{ParseError, StyleParseErrorKind};
12359        #[allow(unused_imports)]
12360        use crate::values::computed::{Context, ToComputedValue};
12361        #[allow(unused_imports)]
12362        use crate::values::{computed, generics, specified};
12363        #[allow(unused_imports)]
12364        use crate::Atom;
12365        
12366            
12367        #[allow(unused_imports)]
12368        use app_units::Au;
12369        #[allow(unused_imports)]
12370        use crate::values::specified::AllowQuirks;
12371        #[allow(unused_imports)]
12372        use crate::Zero;
12373        #[allow(unused_imports)]
12374        use smallvec::SmallVec;
12375        pub use crate::values::specified::LineHeight as SpecifiedValue;
12376        pub mod computed_value {
12377            pub use crate::values::computed::LineHeight as T;
12378        }
12379        #[inline] pub fn get_initial_value() -> computed_value::T { computed::LineHeight::normal() }
12380        #[allow(unused_variables)]
12381        #[inline]
12382        pub fn parse<'i, 't>(
12383            context: &ParserContext,
12384            input: &mut Parser<'i, 't>,
12385        ) -> Result<SpecifiedValue, ParseError<'i>> {
12386            <specified::LineHeight as crate::parser::Parse>::parse(context, input)
12387        }
12388    
12389        
12390        #[allow(unused_variables)]
12391        pub unsafe fn cascade_property(
12392            declaration: &PropertyDeclaration,
12393            context: &mut computed::Context,
12394        ) {
12395            context.for_non_inherited_property = false;
12396            debug_assert_eq!(
12397                declaration.id().as_longhand().unwrap(),
12398                LonghandId::LineHeight,
12399            );
12400            let specified_value = match *declaration {
12401                PropertyDeclaration::CSSWideKeyword(ref wk) => {
12402                    match wk.keyword {
12403                        CSSWideKeyword::Initial => {
12404                                context.builder.reset_line_height();
12405                        },
12406                        CSSWideKeyword::Unset |
12407                        CSSWideKeyword::Inherit => {
12408                                if !context.builder.effective_zoom_for_inheritance.is_one() {
12409                                    let old_zoom = context.builder.effective_zoom;
12410                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
12411                                    let computed = context.builder.inherited_style.clone_line_height();
12412                                    let specified = ToComputedValue::from_computed_value(&computed);
12413                                    let decl = PropertyDeclaration::LineHeight(specified);
12414                                    cascade_property(&decl, context);
12415                                    context.builder.effective_zoom = old_zoom;
12416                                    return;
12417                                }
12418                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
12419                        }
12420                        CSSWideKeyword::RevertLayer |
12421                        CSSWideKeyword::Revert => {
12422                            declaration.debug_crash("Found revert/revert-layer not dealt with");
12423                        },
12424                    }
12425                    return;
12426                },
12427                #[cfg(debug_assertions)]
12428                PropertyDeclaration::WithVariables(..) => {
12429                    declaration.debug_crash("Found variables not substituted");
12430                    return;
12431                },
12432                _ => unsafe {
12433                    declaration.unchecked_value_as::<crate::values::specified::LineHeight>()
12434                },
12435            };
12436
12437
12438                let computed = specified_value.to_computed_value(context);
12439                context.builder.set_line_height(computed)
12440        }
12441
12442        pub fn parse_declared<'i, 't>(
12443            context: &ParserContext,
12444            input: &mut Parser<'i, 't>,
12445        ) -> Result<PropertyDeclaration, ParseError<'i>> {
12446                parse(context, input)
12447                .map(PropertyDeclaration::LineHeight)
12448        }
12449    }
12450
12451
12452
12453
12454
12455    
12456
12457    
12458        
12459    
12460
12461
12462
12463    
12464        
12465    
12466
12467
12468    
12469    /* This Source Code Form is subject to the terms of the Mozilla Public
12470 * License, v. 2.0. If a copy of the MPL was not distributed with this
12471 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
12472
12473
12474
12475// TODO: collapse. Well, do tables first.
12476
12477    
12478
12479    
12480        
12481    
12482    /// https://drafts.csswg.org/css-box/#propdef-visibility
12483    pub mod visibility {
12484        #[allow(unused_imports)]
12485        use cssparser::{Parser, BasicParseError, Token};
12486        #[allow(unused_imports)]
12487        use crate::parser::{Parse, ParserContext};
12488        #[allow(unused_imports)]
12489        use crate::properties::{UnparsedValue, ShorthandId};
12490        #[allow(unused_imports)]
12491        use crate::error_reporting::ParseErrorReporter;
12492        #[allow(unused_imports)]
12493        use crate::properties::longhands;
12494        #[allow(unused_imports)]
12495        use crate::properties::{LonghandId, LonghandIdSet};
12496        #[allow(unused_imports)]
12497        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
12498        #[allow(unused_imports)]
12499        use crate::properties::style_structs;
12500        #[allow(unused_imports)]
12501        use selectors::parser::SelectorParseErrorKind;
12502        #[allow(unused_imports)]
12503        use servo_arc::Arc;
12504        #[allow(unused_imports)]
12505        use style_traits::{ParseError, StyleParseErrorKind};
12506        #[allow(unused_imports)]
12507        use crate::values::computed::{Context, ToComputedValue};
12508        #[allow(unused_imports)]
12509        use crate::values::{computed, generics, specified};
12510        #[allow(unused_imports)]
12511        use crate::Atom;
12512        
12513            
12514        pub use self::computed_value::T as SpecifiedValue;
12515        pub mod computed_value {
12516            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
12517            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
12518            pub enum T {
12519            
12520            Visible,
12521            
12522            Hidden,
12523            
12524            Collapse,
12525            }
12526        }
12527        #[inline]
12528        pub fn get_initial_value() -> computed_value::T {
12529            computed_value::T::Visible
12530        }
12531        #[inline]
12532        pub fn get_initial_specified_value() -> SpecifiedValue {
12533            SpecifiedValue::Visible
12534        }
12535        #[inline]
12536        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
12537                             -> Result<SpecifiedValue, ParseError<'i>> {
12538            SpecifiedValue::parse(input)
12539        }
12540
12541    
12542        
12543        #[allow(unused_variables)]
12544        pub unsafe fn cascade_property(
12545            declaration: &PropertyDeclaration,
12546            context: &mut computed::Context,
12547        ) {
12548            context.for_non_inherited_property = false;
12549            debug_assert_eq!(
12550                declaration.id().as_longhand().unwrap(),
12551                LonghandId::Visibility,
12552            );
12553            let specified_value = match *declaration {
12554                PropertyDeclaration::CSSWideKeyword(ref wk) => {
12555                    match wk.keyword {
12556                        CSSWideKeyword::Initial => {
12557                                context.builder.reset_visibility();
12558                        },
12559                        CSSWideKeyword::Unset |
12560                        CSSWideKeyword::Inherit => {
12561                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
12562                        }
12563                        CSSWideKeyword::RevertLayer |
12564                        CSSWideKeyword::Revert => {
12565                            declaration.debug_crash("Found revert/revert-layer not dealt with");
12566                        },
12567                    }
12568                    return;
12569                },
12570                #[cfg(debug_assertions)]
12571                PropertyDeclaration::WithVariables(..) => {
12572                    declaration.debug_crash("Found variables not substituted");
12573                    return;
12574                },
12575                _ => unsafe {
12576                    declaration.unchecked_value_as::<longhands::visibility::SpecifiedValue>()
12577                },
12578            };
12579
12580
12581                let computed = specified_value.to_computed_value(context);
12582                context.builder.set_visibility(computed)
12583        }
12584
12585        pub fn parse_declared<'i, 't>(
12586            context: &ParserContext,
12587            input: &mut Parser<'i, 't>,
12588        ) -> Result<PropertyDeclaration, ParseError<'i>> {
12589                parse(context, input)
12590                .map(PropertyDeclaration::Visibility)
12591        }
12592    }
12593
12594
12595
12596// CSS Writing Modes Level 3
12597// https://drafts.csswg.org/css-writing-modes-3
12598
12599    
12600        
12601    
12602    /// https://drafts.csswg.org/css-writing-modes/#propdef-writing-mode
12603    pub mod writing_mode {
12604        #[allow(unused_imports)]
12605        use cssparser::{Parser, BasicParseError, Token};
12606        #[allow(unused_imports)]
12607        use crate::parser::{Parse, ParserContext};
12608        #[allow(unused_imports)]
12609        use crate::properties::{UnparsedValue, ShorthandId};
12610        #[allow(unused_imports)]
12611        use crate::error_reporting::ParseErrorReporter;
12612        #[allow(unused_imports)]
12613        use crate::properties::longhands;
12614        #[allow(unused_imports)]
12615        use crate::properties::{LonghandId, LonghandIdSet};
12616        #[allow(unused_imports)]
12617        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
12618        #[allow(unused_imports)]
12619        use crate::properties::style_structs;
12620        #[allow(unused_imports)]
12621        use selectors::parser::SelectorParseErrorKind;
12622        #[allow(unused_imports)]
12623        use servo_arc::Arc;
12624        #[allow(unused_imports)]
12625        use style_traits::{ParseError, StyleParseErrorKind};
12626        #[allow(unused_imports)]
12627        use crate::values::computed::{Context, ToComputedValue};
12628        #[allow(unused_imports)]
12629        use crate::values::{computed, generics, specified};
12630        #[allow(unused_imports)]
12631        use crate::Atom;
12632        
12633            
12634        #[allow(unused_imports)]
12635        use app_units::Au;
12636        #[allow(unused_imports)]
12637        use crate::values::specified::AllowQuirks;
12638        #[allow(unused_imports)]
12639        use crate::Zero;
12640        #[allow(unused_imports)]
12641        use smallvec::SmallVec;
12642        pub use crate::values::specified::WritingModeProperty as SpecifiedValue;
12643        pub mod computed_value {
12644            pub use crate::values::computed::WritingModeProperty as T;
12645        }
12646        #[inline] pub fn get_initial_value() -> computed_value::T { computed::WritingModeProperty::HorizontalTb }
12647        #[allow(unused_variables)]
12648        #[inline]
12649        pub fn parse<'i, 't>(
12650            context: &ParserContext,
12651            input: &mut Parser<'i, 't>,
12652        ) -> Result<SpecifiedValue, ParseError<'i>> {
12653            <specified::WritingModeProperty as crate::parser::Parse>::parse(context, input)
12654        }
12655    
12656        
12657        #[allow(unused_variables)]
12658        pub unsafe fn cascade_property(
12659            declaration: &PropertyDeclaration,
12660            context: &mut computed::Context,
12661        ) {
12662            context.for_non_inherited_property = false;
12663            debug_assert_eq!(
12664                declaration.id().as_longhand().unwrap(),
12665                LonghandId::WritingMode,
12666            );
12667            let specified_value = match *declaration {
12668                PropertyDeclaration::CSSWideKeyword(ref wk) => {
12669                    match wk.keyword {
12670                        CSSWideKeyword::Initial => {
12671                                context.builder.reset_writing_mode();
12672                        },
12673                        CSSWideKeyword::Unset |
12674                        CSSWideKeyword::Inherit => {
12675                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
12676                        }
12677                        CSSWideKeyword::RevertLayer |
12678                        CSSWideKeyword::Revert => {
12679                            declaration.debug_crash("Found revert/revert-layer not dealt with");
12680                        },
12681                    }
12682                    return;
12683                },
12684                #[cfg(debug_assertions)]
12685                PropertyDeclaration::WithVariables(..) => {
12686                    declaration.debug_crash("Found variables not substituted");
12687                    return;
12688                },
12689                _ => unsafe {
12690                    declaration.unchecked_value_as::<crate::values::specified::WritingModeProperty>()
12691                },
12692            };
12693
12694
12695                let computed = specified_value.to_computed_value(context);
12696                context.builder.set_writing_mode(computed)
12697        }
12698
12699        pub fn parse_declared<'i, 't>(
12700            context: &ParserContext,
12701            input: &mut Parser<'i, 't>,
12702        ) -> Result<PropertyDeclaration, ParseError<'i>> {
12703                parse(context, input)
12704                .map(PropertyDeclaration::WritingMode)
12705        }
12706    }
12707
12708
12709
12710
12711    
12712
12713    
12714        
12715    
12716    /// https://drafts.csswg.org/css-writing-modes/#propdef-direction
12717    pub mod direction {
12718        #[allow(unused_imports)]
12719        use cssparser::{Parser, BasicParseError, Token};
12720        #[allow(unused_imports)]
12721        use crate::parser::{Parse, ParserContext};
12722        #[allow(unused_imports)]
12723        use crate::properties::{UnparsedValue, ShorthandId};
12724        #[allow(unused_imports)]
12725        use crate::error_reporting::ParseErrorReporter;
12726        #[allow(unused_imports)]
12727        use crate::properties::longhands;
12728        #[allow(unused_imports)]
12729        use crate::properties::{LonghandId, LonghandIdSet};
12730        #[allow(unused_imports)]
12731        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
12732        #[allow(unused_imports)]
12733        use crate::properties::style_structs;
12734        #[allow(unused_imports)]
12735        use selectors::parser::SelectorParseErrorKind;
12736        #[allow(unused_imports)]
12737        use servo_arc::Arc;
12738        #[allow(unused_imports)]
12739        use style_traits::{ParseError, StyleParseErrorKind};
12740        #[allow(unused_imports)]
12741        use crate::values::computed::{Context, ToComputedValue};
12742        #[allow(unused_imports)]
12743        use crate::values::{computed, generics, specified};
12744        #[allow(unused_imports)]
12745        use crate::Atom;
12746        
12747            
12748        pub use self::computed_value::T as SpecifiedValue;
12749        pub mod computed_value {
12750            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
12751            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
12752            pub enum T {
12753            
12754            Ltr,
12755            
12756            Rtl,
12757            }
12758        }
12759        #[inline]
12760        pub fn get_initial_value() -> computed_value::T {
12761            computed_value::T::Ltr
12762        }
12763        #[inline]
12764        pub fn get_initial_specified_value() -> SpecifiedValue {
12765            SpecifiedValue::Ltr
12766        }
12767        #[inline]
12768        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
12769                             -> Result<SpecifiedValue, ParseError<'i>> {
12770            SpecifiedValue::parse(input)
12771        }
12772
12773    
12774        
12775        #[allow(unused_variables)]
12776        pub unsafe fn cascade_property(
12777            declaration: &PropertyDeclaration,
12778            context: &mut computed::Context,
12779        ) {
12780            context.for_non_inherited_property = false;
12781            debug_assert_eq!(
12782                declaration.id().as_longhand().unwrap(),
12783                LonghandId::Direction,
12784            );
12785            let specified_value = match *declaration {
12786                PropertyDeclaration::CSSWideKeyword(ref wk) => {
12787                    match wk.keyword {
12788                        CSSWideKeyword::Initial => {
12789                                context.builder.reset_direction();
12790                        },
12791                        CSSWideKeyword::Unset |
12792                        CSSWideKeyword::Inherit => {
12793                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
12794                        }
12795                        CSSWideKeyword::RevertLayer |
12796                        CSSWideKeyword::Revert => {
12797                            declaration.debug_crash("Found revert/revert-layer not dealt with");
12798                        },
12799                    }
12800                    return;
12801                },
12802                #[cfg(debug_assertions)]
12803                PropertyDeclaration::WithVariables(..) => {
12804                    declaration.debug_crash("Found variables not substituted");
12805                    return;
12806                },
12807                _ => unsafe {
12808                    declaration.unchecked_value_as::<longhands::direction::SpecifiedValue>()
12809                },
12810            };
12811
12812
12813                let computed = specified_value.to_computed_value(context);
12814                context.builder.set_direction(computed)
12815        }
12816
12817        pub fn parse_declared<'i, 't>(
12818            context: &ParserContext,
12819            input: &mut Parser<'i, 't>,
12820        ) -> Result<PropertyDeclaration, ParseError<'i>> {
12821                parse(context, input)
12822                .map(PropertyDeclaration::Direction)
12823        }
12824    }
12825
12826
12827
12828
12829    
12830
12831    
12832        
12833    
12834
12835
12836
12837    
12838
12839    
12840        
12841    
12842
12843
12844
12845    
12846        
12847    
12848
12849
12850// According to to CSS-IMAGES-3, `optimizespeed` and `optimizequality` are synonyms for `auto`
12851// And, firefox doesn't support `pixelated` yet (https://bugzilla.mozilla.org/show_bug.cgi?id=856337)
12852
12853    
12854        
12855    
12856    /// https://drafts.csswg.org/css-images/#propdef-image-rendering
12857    pub mod image_rendering {
12858        #[allow(unused_imports)]
12859        use cssparser::{Parser, BasicParseError, Token};
12860        #[allow(unused_imports)]
12861        use crate::parser::{Parse, ParserContext};
12862        #[allow(unused_imports)]
12863        use crate::properties::{UnparsedValue, ShorthandId};
12864        #[allow(unused_imports)]
12865        use crate::error_reporting::ParseErrorReporter;
12866        #[allow(unused_imports)]
12867        use crate::properties::longhands;
12868        #[allow(unused_imports)]
12869        use crate::properties::{LonghandId, LonghandIdSet};
12870        #[allow(unused_imports)]
12871        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
12872        #[allow(unused_imports)]
12873        use crate::properties::style_structs;
12874        #[allow(unused_imports)]
12875        use selectors::parser::SelectorParseErrorKind;
12876        #[allow(unused_imports)]
12877        use servo_arc::Arc;
12878        #[allow(unused_imports)]
12879        use style_traits::{ParseError, StyleParseErrorKind};
12880        #[allow(unused_imports)]
12881        use crate::values::computed::{Context, ToComputedValue};
12882        #[allow(unused_imports)]
12883        use crate::values::{computed, generics, specified};
12884        #[allow(unused_imports)]
12885        use crate::Atom;
12886        
12887            
12888        #[allow(unused_imports)]
12889        use app_units::Au;
12890        #[allow(unused_imports)]
12891        use crate::values::specified::AllowQuirks;
12892        #[allow(unused_imports)]
12893        use crate::Zero;
12894        #[allow(unused_imports)]
12895        use smallvec::SmallVec;
12896        pub use crate::values::specified::ImageRendering as SpecifiedValue;
12897        pub mod computed_value {
12898            pub use crate::values::computed::ImageRendering as T;
12899        }
12900        #[inline] pub fn get_initial_value() -> computed_value::T { computed::ImageRendering::Auto }
12901        #[allow(unused_variables)]
12902        #[inline]
12903        pub fn parse<'i, 't>(
12904            context: &ParserContext,
12905            input: &mut Parser<'i, 't>,
12906        ) -> Result<SpecifiedValue, ParseError<'i>> {
12907            <specified::ImageRendering as crate::parser::Parse>::parse(context, input)
12908        }
12909    
12910        
12911        #[allow(unused_variables)]
12912        pub unsafe fn cascade_property(
12913            declaration: &PropertyDeclaration,
12914            context: &mut computed::Context,
12915        ) {
12916            context.for_non_inherited_property = false;
12917            debug_assert_eq!(
12918                declaration.id().as_longhand().unwrap(),
12919                LonghandId::ImageRendering,
12920            );
12921            let specified_value = match *declaration {
12922                PropertyDeclaration::CSSWideKeyword(ref wk) => {
12923                    match wk.keyword {
12924                        CSSWideKeyword::Initial => {
12925                                context.builder.reset_image_rendering();
12926                        },
12927                        CSSWideKeyword::Unset |
12928                        CSSWideKeyword::Inherit => {
12929                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
12930                        }
12931                        CSSWideKeyword::RevertLayer |
12932                        CSSWideKeyword::Revert => {
12933                            declaration.debug_crash("Found revert/revert-layer not dealt with");
12934                        },
12935                    }
12936                    return;
12937                },
12938                #[cfg(debug_assertions)]
12939                PropertyDeclaration::WithVariables(..) => {
12940                    declaration.debug_crash("Found variables not substituted");
12941                    return;
12942                },
12943                _ => unsafe {
12944                    declaration.unchecked_value_as::<crate::values::specified::ImageRendering>()
12945                },
12946            };
12947
12948
12949                let computed = specified_value.to_computed_value(context);
12950                context.builder.set_image_rendering(computed)
12951        }
12952
12953        pub fn parse_declared<'i, 't>(
12954            context: &ParserContext,
12955            input: &mut Parser<'i, 't>,
12956        ) -> Result<PropertyDeclaration, ParseError<'i>> {
12957                parse(context, input)
12958                .map(PropertyDeclaration::ImageRendering)
12959        }
12960    }
12961
12962
12963
12964
12965    
12966
12967    
12968        
12969    
12970
12971
12972    
12973    /* This Source Code Form is subject to the terms of the Mozilla Public
12974 * License, v. 2.0. If a copy of the MPL was not distributed with this
12975 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
12976
12977
12978
12979// Section 10 - Text
12980
12981
12982    
12983
12984    
12985        
12986    
12987
12988
12989
12990    
12991
12992    
12993        
12994    
12995
12996
12997// Section 11 - Painting: Filling, Stroking and Marker Symbols
12998
12999    
13000
13001    
13002        
13003    
13004
13005
13006
13007    
13008
13009    
13010        
13011    
13012
13013
13014
13015    
13016        
13017    
13018
13019
13020
13021    
13022        
13023    
13024
13025
13026
13027    
13028        
13029    
13030
13031
13032
13033    
13034
13035    
13036        
13037    
13038
13039
13040
13041    
13042        
13043    
13044
13045
13046
13047    
13048        
13049    
13050
13051
13052
13053    
13054
13055    
13056        
13057    
13058
13059
13060
13061    
13062
13063    
13064        
13065    
13066
13067
13068
13069    
13070        
13071    
13072
13073
13074
13075    
13076        
13077    
13078
13079
13080
13081    
13082        
13083    
13084
13085
13086
13087    
13088        
13089    
13090
13091
13092// Section 14 - Clipping, Masking and Compositing
13093
13094    
13095        
13096    
13097
13098
13099
13100    
13101        
13102    
13103
13104
13105
13106    
13107        
13108    
13109
13110
13111
13112    
13113        
13114    
13115
13116
13117
13118    
13119        
13120    
13121
13122
13123
13124    
13125        
13126    
13127
13128
13129    
13130    /* This Source Code Form is subject to the terms of the Mozilla Public
13131 * License, v. 2.0. If a copy of the MPL was not distributed with this
13132 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
13133
13134
13135
13136
13137    
13138
13139    
13140        
13141    
13142    /// https://drafts.csswg.org/css-tables/#propdef-border-collapse
13143    pub mod border_collapse {
13144        #[allow(unused_imports)]
13145        use cssparser::{Parser, BasicParseError, Token};
13146        #[allow(unused_imports)]
13147        use crate::parser::{Parse, ParserContext};
13148        #[allow(unused_imports)]
13149        use crate::properties::{UnparsedValue, ShorthandId};
13150        #[allow(unused_imports)]
13151        use crate::error_reporting::ParseErrorReporter;
13152        #[allow(unused_imports)]
13153        use crate::properties::longhands;
13154        #[allow(unused_imports)]
13155        use crate::properties::{LonghandId, LonghandIdSet};
13156        #[allow(unused_imports)]
13157        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
13158        #[allow(unused_imports)]
13159        use crate::properties::style_structs;
13160        #[allow(unused_imports)]
13161        use selectors::parser::SelectorParseErrorKind;
13162        #[allow(unused_imports)]
13163        use servo_arc::Arc;
13164        #[allow(unused_imports)]
13165        use style_traits::{ParseError, StyleParseErrorKind};
13166        #[allow(unused_imports)]
13167        use crate::values::computed::{Context, ToComputedValue};
13168        #[allow(unused_imports)]
13169        use crate::values::{computed, generics, specified};
13170        #[allow(unused_imports)]
13171        use crate::Atom;
13172        
13173            
13174        pub use self::computed_value::T as SpecifiedValue;
13175        pub mod computed_value {
13176            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
13177            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
13178            pub enum T {
13179            
13180            Separate,
13181            
13182            Collapse,
13183            }
13184        }
13185        #[inline]
13186        pub fn get_initial_value() -> computed_value::T {
13187            computed_value::T::Separate
13188        }
13189        #[inline]
13190        pub fn get_initial_specified_value() -> SpecifiedValue {
13191            SpecifiedValue::Separate
13192        }
13193        #[inline]
13194        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
13195                             -> Result<SpecifiedValue, ParseError<'i>> {
13196            SpecifiedValue::parse(input)
13197        }
13198
13199    
13200        
13201        #[allow(unused_variables)]
13202        pub unsafe fn cascade_property(
13203            declaration: &PropertyDeclaration,
13204            context: &mut computed::Context,
13205        ) {
13206            context.for_non_inherited_property = false;
13207            debug_assert_eq!(
13208                declaration.id().as_longhand().unwrap(),
13209                LonghandId::BorderCollapse,
13210            );
13211            let specified_value = match *declaration {
13212                PropertyDeclaration::CSSWideKeyword(ref wk) => {
13213                    match wk.keyword {
13214                        CSSWideKeyword::Initial => {
13215                                context.builder.reset_border_collapse();
13216                        },
13217                        CSSWideKeyword::Unset |
13218                        CSSWideKeyword::Inherit => {
13219                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
13220                        }
13221                        CSSWideKeyword::RevertLayer |
13222                        CSSWideKeyword::Revert => {
13223                            declaration.debug_crash("Found revert/revert-layer not dealt with");
13224                        },
13225                    }
13226                    return;
13227                },
13228                #[cfg(debug_assertions)]
13229                PropertyDeclaration::WithVariables(..) => {
13230                    declaration.debug_crash("Found variables not substituted");
13231                    return;
13232                },
13233                _ => unsafe {
13234                    declaration.unchecked_value_as::<longhands::border_collapse::SpecifiedValue>()
13235                },
13236            };
13237
13238
13239                let computed = specified_value.to_computed_value(context);
13240                context.builder.set_border_collapse(computed)
13241        }
13242
13243        pub fn parse_declared<'i, 't>(
13244            context: &ParserContext,
13245            input: &mut Parser<'i, 't>,
13246        ) -> Result<PropertyDeclaration, ParseError<'i>> {
13247                parse(context, input)
13248                .map(PropertyDeclaration::BorderCollapse)
13249        }
13250    }
13251
13252
13253
13254
13255    
13256
13257    
13258        
13259    
13260    /// https://drafts.csswg.org/css-tables/#propdef-empty-cells
13261    pub mod empty_cells {
13262        #[allow(unused_imports)]
13263        use cssparser::{Parser, BasicParseError, Token};
13264        #[allow(unused_imports)]
13265        use crate::parser::{Parse, ParserContext};
13266        #[allow(unused_imports)]
13267        use crate::properties::{UnparsedValue, ShorthandId};
13268        #[allow(unused_imports)]
13269        use crate::error_reporting::ParseErrorReporter;
13270        #[allow(unused_imports)]
13271        use crate::properties::longhands;
13272        #[allow(unused_imports)]
13273        use crate::properties::{LonghandId, LonghandIdSet};
13274        #[allow(unused_imports)]
13275        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
13276        #[allow(unused_imports)]
13277        use crate::properties::style_structs;
13278        #[allow(unused_imports)]
13279        use selectors::parser::SelectorParseErrorKind;
13280        #[allow(unused_imports)]
13281        use servo_arc::Arc;
13282        #[allow(unused_imports)]
13283        use style_traits::{ParseError, StyleParseErrorKind};
13284        #[allow(unused_imports)]
13285        use crate::values::computed::{Context, ToComputedValue};
13286        #[allow(unused_imports)]
13287        use crate::values::{computed, generics, specified};
13288        #[allow(unused_imports)]
13289        use crate::Atom;
13290        
13291            
13292        pub use self::computed_value::T as SpecifiedValue;
13293        pub mod computed_value {
13294            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
13295            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
13296            pub enum T {
13297            
13298            Show,
13299            
13300            Hide,
13301            }
13302        }
13303        #[inline]
13304        pub fn get_initial_value() -> computed_value::T {
13305            computed_value::T::Show
13306        }
13307        #[inline]
13308        pub fn get_initial_specified_value() -> SpecifiedValue {
13309            SpecifiedValue::Show
13310        }
13311        #[inline]
13312        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
13313                             -> Result<SpecifiedValue, ParseError<'i>> {
13314            SpecifiedValue::parse(input)
13315        }
13316
13317    
13318        
13319        #[allow(unused_variables)]
13320        pub unsafe fn cascade_property(
13321            declaration: &PropertyDeclaration,
13322            context: &mut computed::Context,
13323        ) {
13324            context.for_non_inherited_property = false;
13325            debug_assert_eq!(
13326                declaration.id().as_longhand().unwrap(),
13327                LonghandId::EmptyCells,
13328            );
13329            let specified_value = match *declaration {
13330                PropertyDeclaration::CSSWideKeyword(ref wk) => {
13331                    match wk.keyword {
13332                        CSSWideKeyword::Initial => {
13333                                context.builder.reset_empty_cells();
13334                        },
13335                        CSSWideKeyword::Unset |
13336                        CSSWideKeyword::Inherit => {
13337                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
13338                        }
13339                        CSSWideKeyword::RevertLayer |
13340                        CSSWideKeyword::Revert => {
13341                            declaration.debug_crash("Found revert/revert-layer not dealt with");
13342                        },
13343                    }
13344                    return;
13345                },
13346                #[cfg(debug_assertions)]
13347                PropertyDeclaration::WithVariables(..) => {
13348                    declaration.debug_crash("Found variables not substituted");
13349                    return;
13350                },
13351                _ => unsafe {
13352                    declaration.unchecked_value_as::<longhands::empty_cells::SpecifiedValue>()
13353                },
13354            };
13355
13356
13357                let computed = specified_value.to_computed_value(context);
13358                context.builder.set_empty_cells(computed)
13359        }
13360
13361        pub fn parse_declared<'i, 't>(
13362            context: &ParserContext,
13363            input: &mut Parser<'i, 't>,
13364        ) -> Result<PropertyDeclaration, ParseError<'i>> {
13365                parse(context, input)
13366                .map(PropertyDeclaration::EmptyCells)
13367        }
13368    }
13369
13370
13371
13372
13373    
13374        
13375    
13376    /// https://drafts.csswg.org/css-tables/#propdef-caption-side
13377    pub mod caption_side {
13378        #[allow(unused_imports)]
13379        use cssparser::{Parser, BasicParseError, Token};
13380        #[allow(unused_imports)]
13381        use crate::parser::{Parse, ParserContext};
13382        #[allow(unused_imports)]
13383        use crate::properties::{UnparsedValue, ShorthandId};
13384        #[allow(unused_imports)]
13385        use crate::error_reporting::ParseErrorReporter;
13386        #[allow(unused_imports)]
13387        use crate::properties::longhands;
13388        #[allow(unused_imports)]
13389        use crate::properties::{LonghandId, LonghandIdSet};
13390        #[allow(unused_imports)]
13391        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
13392        #[allow(unused_imports)]
13393        use crate::properties::style_structs;
13394        #[allow(unused_imports)]
13395        use selectors::parser::SelectorParseErrorKind;
13396        #[allow(unused_imports)]
13397        use servo_arc::Arc;
13398        #[allow(unused_imports)]
13399        use style_traits::{ParseError, StyleParseErrorKind};
13400        #[allow(unused_imports)]
13401        use crate::values::computed::{Context, ToComputedValue};
13402        #[allow(unused_imports)]
13403        use crate::values::{computed, generics, specified};
13404        #[allow(unused_imports)]
13405        use crate::Atom;
13406        
13407            
13408        #[allow(unused_imports)]
13409        use app_units::Au;
13410        #[allow(unused_imports)]
13411        use crate::values::specified::AllowQuirks;
13412        #[allow(unused_imports)]
13413        use crate::Zero;
13414        #[allow(unused_imports)]
13415        use smallvec::SmallVec;
13416        pub use crate::values::specified::table::CaptionSide as SpecifiedValue;
13417        pub mod computed_value {
13418            pub use crate::values::computed::table::CaptionSide as T;
13419        }
13420        #[inline] pub fn get_initial_value() -> computed_value::T { computed::table::CaptionSide::Top }
13421        #[allow(unused_variables)]
13422        #[inline]
13423        pub fn parse<'i, 't>(
13424            context: &ParserContext,
13425            input: &mut Parser<'i, 't>,
13426        ) -> Result<SpecifiedValue, ParseError<'i>> {
13427            <specified::table::CaptionSide as crate::parser::Parse>::parse(context, input)
13428        }
13429    
13430        
13431        #[allow(unused_variables)]
13432        pub unsafe fn cascade_property(
13433            declaration: &PropertyDeclaration,
13434            context: &mut computed::Context,
13435        ) {
13436            context.for_non_inherited_property = false;
13437            debug_assert_eq!(
13438                declaration.id().as_longhand().unwrap(),
13439                LonghandId::CaptionSide,
13440            );
13441            let specified_value = match *declaration {
13442                PropertyDeclaration::CSSWideKeyword(ref wk) => {
13443                    match wk.keyword {
13444                        CSSWideKeyword::Initial => {
13445                                context.builder.reset_caption_side();
13446                        },
13447                        CSSWideKeyword::Unset |
13448                        CSSWideKeyword::Inherit => {
13449                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
13450                        }
13451                        CSSWideKeyword::RevertLayer |
13452                        CSSWideKeyword::Revert => {
13453                            declaration.debug_crash("Found revert/revert-layer not dealt with");
13454                        },
13455                    }
13456                    return;
13457                },
13458                #[cfg(debug_assertions)]
13459                PropertyDeclaration::WithVariables(..) => {
13460                    declaration.debug_crash("Found variables not substituted");
13461                    return;
13462                },
13463                _ => unsafe {
13464                    declaration.unchecked_value_as::<crate::values::specified::table::CaptionSide>()
13465                },
13466            };
13467
13468
13469                let computed = specified_value.to_computed_value(context);
13470                context.builder.set_caption_side(computed)
13471        }
13472
13473        pub fn parse_declared<'i, 't>(
13474            context: &ParserContext,
13475            input: &mut Parser<'i, 't>,
13476        ) -> Result<PropertyDeclaration, ParseError<'i>> {
13477                parse(context, input)
13478                .map(PropertyDeclaration::CaptionSide)
13479        }
13480    }
13481
13482
13483
13484
13485    
13486        
13487    
13488    /// https://drafts.csswg.org/css-tables/#propdef-border-spacing
13489    pub mod border_spacing {
13490        #[allow(unused_imports)]
13491        use cssparser::{Parser, BasicParseError, Token};
13492        #[allow(unused_imports)]
13493        use crate::parser::{Parse, ParserContext};
13494        #[allow(unused_imports)]
13495        use crate::properties::{UnparsedValue, ShorthandId};
13496        #[allow(unused_imports)]
13497        use crate::error_reporting::ParseErrorReporter;
13498        #[allow(unused_imports)]
13499        use crate::properties::longhands;
13500        #[allow(unused_imports)]
13501        use crate::properties::{LonghandId, LonghandIdSet};
13502        #[allow(unused_imports)]
13503        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
13504        #[allow(unused_imports)]
13505        use crate::properties::style_structs;
13506        #[allow(unused_imports)]
13507        use selectors::parser::SelectorParseErrorKind;
13508        #[allow(unused_imports)]
13509        use servo_arc::Arc;
13510        #[allow(unused_imports)]
13511        use style_traits::{ParseError, StyleParseErrorKind};
13512        #[allow(unused_imports)]
13513        use crate::values::computed::{Context, ToComputedValue};
13514        #[allow(unused_imports)]
13515        use crate::values::{computed, generics, specified};
13516        #[allow(unused_imports)]
13517        use crate::Atom;
13518        
13519            
13520        #[allow(unused_imports)]
13521        use app_units::Au;
13522        #[allow(unused_imports)]
13523        use crate::values::specified::AllowQuirks;
13524        #[allow(unused_imports)]
13525        use crate::Zero;
13526        #[allow(unused_imports)]
13527        use smallvec::SmallVec;
13528        pub use crate::values::specified::BorderSpacing as SpecifiedValue;
13529        pub mod computed_value {
13530            pub use crate::values::computed::BorderSpacing as T;
13531        }
13532        #[inline] pub fn get_initial_value() -> computed_value::T { computed::BorderSpacing::zero() }
13533        #[allow(unused_variables)]
13534        #[inline]
13535        pub fn parse<'i, 't>(
13536            context: &ParserContext,
13537            input: &mut Parser<'i, 't>,
13538        ) -> Result<SpecifiedValue, ParseError<'i>> {
13539            <specified::BorderSpacing as crate::parser::Parse>::parse(context, input)
13540        }
13541    
13542        
13543        #[allow(unused_variables)]
13544        pub unsafe fn cascade_property(
13545            declaration: &PropertyDeclaration,
13546            context: &mut computed::Context,
13547        ) {
13548            context.for_non_inherited_property = false;
13549            debug_assert_eq!(
13550                declaration.id().as_longhand().unwrap(),
13551                LonghandId::BorderSpacing,
13552            );
13553            let specified_value = match *declaration {
13554                PropertyDeclaration::CSSWideKeyword(ref wk) => {
13555                    match wk.keyword {
13556                        CSSWideKeyword::Initial => {
13557                                context.builder.reset_border_spacing();
13558                        },
13559                        CSSWideKeyword::Unset |
13560                        CSSWideKeyword::Inherit => {
13561                                if !context.builder.effective_zoom_for_inheritance.is_one() {
13562                                    let old_zoom = context.builder.effective_zoom;
13563                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
13564                                    let computed = context.builder.inherited_style.clone_border_spacing();
13565                                    let specified = ToComputedValue::from_computed_value(&computed);
13566                                    let specified = Box::new(specified);
13567                                    let decl = PropertyDeclaration::BorderSpacing(specified);
13568                                    cascade_property(&decl, context);
13569                                    context.builder.effective_zoom = old_zoom;
13570                                    return;
13571                                }
13572                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
13573                        }
13574                        CSSWideKeyword::RevertLayer |
13575                        CSSWideKeyword::Revert => {
13576                            declaration.debug_crash("Found revert/revert-layer not dealt with");
13577                        },
13578                    }
13579                    return;
13580                },
13581                #[cfg(debug_assertions)]
13582                PropertyDeclaration::WithVariables(..) => {
13583                    declaration.debug_crash("Found variables not substituted");
13584                    return;
13585                },
13586                _ => unsafe {
13587                    declaration.unchecked_value_as::<Box<crate::values::specified::BorderSpacing>>()
13588                },
13589            };
13590
13591
13592                let computed = (**specified_value).to_computed_value(context);
13593                context.builder.set_border_spacing(computed)
13594        }
13595
13596        pub fn parse_declared<'i, 't>(
13597            context: &ParserContext,
13598            input: &mut Parser<'i, 't>,
13599        ) -> Result<PropertyDeclaration, ParseError<'i>> {
13600                parse(context, input)
13601                .map(Box::new)
13602                .map(PropertyDeclaration::BorderSpacing)
13603        }
13604    }
13605
13606
13607
13608    
13609    /* This Source Code Form is subject to the terms of the Mozilla Public
13610 * License, v. 2.0. If a copy of the MPL was not distributed with this
13611 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
13612
13613
13614
13615
13616    
13617        
13618    
13619    /// https://drafts.csswg.org/css-color/#color
13620    pub mod color {
13621        #[allow(unused_imports)]
13622        use cssparser::{Parser, BasicParseError, Token};
13623        #[allow(unused_imports)]
13624        use crate::parser::{Parse, ParserContext};
13625        #[allow(unused_imports)]
13626        use crate::properties::{UnparsedValue, ShorthandId};
13627        #[allow(unused_imports)]
13628        use crate::error_reporting::ParseErrorReporter;
13629        #[allow(unused_imports)]
13630        use crate::properties::longhands;
13631        #[allow(unused_imports)]
13632        use crate::properties::{LonghandId, LonghandIdSet};
13633        #[allow(unused_imports)]
13634        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
13635        #[allow(unused_imports)]
13636        use crate::properties::style_structs;
13637        #[allow(unused_imports)]
13638        use selectors::parser::SelectorParseErrorKind;
13639        #[allow(unused_imports)]
13640        use servo_arc::Arc;
13641        #[allow(unused_imports)]
13642        use style_traits::{ParseError, StyleParseErrorKind};
13643        #[allow(unused_imports)]
13644        use crate::values::computed::{Context, ToComputedValue};
13645        #[allow(unused_imports)]
13646        use crate::values::{computed, generics, specified};
13647        #[allow(unused_imports)]
13648        use crate::Atom;
13649        
13650            
13651        #[allow(unused_imports)]
13652        use app_units::Au;
13653        #[allow(unused_imports)]
13654        use crate::values::specified::AllowQuirks;
13655        #[allow(unused_imports)]
13656        use crate::Zero;
13657        #[allow(unused_imports)]
13658        use smallvec::SmallVec;
13659        pub use crate::values::specified::ColorPropertyValue as SpecifiedValue;
13660        pub mod computed_value {
13661            pub use crate::values::computed::ColorPropertyValue as T;
13662        }
13663        #[inline] pub fn get_initial_value() -> computed_value::T { crate::color::AbsoluteColor::BLACK }
13664        #[allow(unused_variables)]
13665        #[inline]
13666        pub fn parse<'i, 't>(
13667            context: &ParserContext,
13668            input: &mut Parser<'i, 't>,
13669        ) -> Result<SpecifiedValue, ParseError<'i>> {
13670            <specified::ColorPropertyValue as crate::parser::Parse>::parse(context, input)
13671        }
13672    
13673        
13674        #[allow(unused_variables)]
13675        pub unsafe fn cascade_property(
13676            declaration: &PropertyDeclaration,
13677            context: &mut computed::Context,
13678        ) {
13679            context.for_non_inherited_property = false;
13680            debug_assert_eq!(
13681                declaration.id().as_longhand().unwrap(),
13682                LonghandId::Color,
13683            );
13684            let specified_value = match *declaration {
13685                PropertyDeclaration::CSSWideKeyword(ref wk) => {
13686                    match wk.keyword {
13687                        CSSWideKeyword::Initial => {
13688                                context.builder.reset_color();
13689                        },
13690                        CSSWideKeyword::Unset |
13691                        CSSWideKeyword::Inherit => {
13692                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
13693                        }
13694                        CSSWideKeyword::RevertLayer |
13695                        CSSWideKeyword::Revert => {
13696                            declaration.debug_crash("Found revert/revert-layer not dealt with");
13697                        },
13698                    }
13699                    return;
13700                },
13701                #[cfg(debug_assertions)]
13702                PropertyDeclaration::WithVariables(..) => {
13703                    declaration.debug_crash("Found variables not substituted");
13704                    return;
13705                },
13706                _ => unsafe {
13707                    declaration.unchecked_value_as::<crate::values::specified::ColorPropertyValue>()
13708                },
13709            };
13710
13711
13712                let computed = specified_value.to_computed_value(context);
13713                context.builder.set_color(computed)
13714        }
13715
13716        pub fn parse_declared<'i, 't>(
13717            context: &ParserContext,
13718            input: &mut Parser<'i, 't>,
13719        ) -> Result<PropertyDeclaration, ParseError<'i>> {
13720                parse(context, input)
13721                .map(PropertyDeclaration::Color)
13722        }
13723    }
13724
13725
13726
13727// CSS Text Module Level 3
13728
13729
13730    
13731        
13732    
13733    /// https://drafts.csswg.org/css-text/#propdef-text-transform
13734    pub mod text_transform {
13735        #[allow(unused_imports)]
13736        use cssparser::{Parser, BasicParseError, Token};
13737        #[allow(unused_imports)]
13738        use crate::parser::{Parse, ParserContext};
13739        #[allow(unused_imports)]
13740        use crate::properties::{UnparsedValue, ShorthandId};
13741        #[allow(unused_imports)]
13742        use crate::error_reporting::ParseErrorReporter;
13743        #[allow(unused_imports)]
13744        use crate::properties::longhands;
13745        #[allow(unused_imports)]
13746        use crate::properties::{LonghandId, LonghandIdSet};
13747        #[allow(unused_imports)]
13748        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
13749        #[allow(unused_imports)]
13750        use crate::properties::style_structs;
13751        #[allow(unused_imports)]
13752        use selectors::parser::SelectorParseErrorKind;
13753        #[allow(unused_imports)]
13754        use servo_arc::Arc;
13755        #[allow(unused_imports)]
13756        use style_traits::{ParseError, StyleParseErrorKind};
13757        #[allow(unused_imports)]
13758        use crate::values::computed::{Context, ToComputedValue};
13759        #[allow(unused_imports)]
13760        use crate::values::{computed, generics, specified};
13761        #[allow(unused_imports)]
13762        use crate::Atom;
13763        
13764            
13765        #[allow(unused_imports)]
13766        use app_units::Au;
13767        #[allow(unused_imports)]
13768        use crate::values::specified::AllowQuirks;
13769        #[allow(unused_imports)]
13770        use crate::Zero;
13771        #[allow(unused_imports)]
13772        use smallvec::SmallVec;
13773        pub use crate::values::specified::TextTransform as SpecifiedValue;
13774        pub mod computed_value {
13775            pub use crate::values::computed::TextTransform as T;
13776        }
13777        #[inline] pub fn get_initial_value() -> computed_value::T { computed::TextTransform::none() }
13778        #[allow(unused_variables)]
13779        #[inline]
13780        pub fn parse<'i, 't>(
13781            context: &ParserContext,
13782            input: &mut Parser<'i, 't>,
13783        ) -> Result<SpecifiedValue, ParseError<'i>> {
13784            <specified::TextTransform as crate::parser::Parse>::parse(context, input)
13785        }
13786    
13787        
13788        #[allow(unused_variables)]
13789        pub unsafe fn cascade_property(
13790            declaration: &PropertyDeclaration,
13791            context: &mut computed::Context,
13792        ) {
13793            context.for_non_inherited_property = false;
13794            debug_assert_eq!(
13795                declaration.id().as_longhand().unwrap(),
13796                LonghandId::TextTransform,
13797            );
13798            let specified_value = match *declaration {
13799                PropertyDeclaration::CSSWideKeyword(ref wk) => {
13800                    match wk.keyword {
13801                        CSSWideKeyword::Initial => {
13802                                context.builder.reset_text_transform();
13803                        },
13804                        CSSWideKeyword::Unset |
13805                        CSSWideKeyword::Inherit => {
13806                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
13807                        }
13808                        CSSWideKeyword::RevertLayer |
13809                        CSSWideKeyword::Revert => {
13810                            declaration.debug_crash("Found revert/revert-layer not dealt with");
13811                        },
13812                    }
13813                    return;
13814                },
13815                #[cfg(debug_assertions)]
13816                PropertyDeclaration::WithVariables(..) => {
13817                    declaration.debug_crash("Found variables not substituted");
13818                    return;
13819                },
13820                _ => unsafe {
13821                    declaration.unchecked_value_as::<crate::values::specified::TextTransform>()
13822                },
13823            };
13824
13825
13826                let computed = specified_value.to_computed_value(context);
13827                context.builder.set_text_transform(computed)
13828        }
13829
13830        pub fn parse_declared<'i, 't>(
13831            context: &ParserContext,
13832            input: &mut Parser<'i, 't>,
13833        ) -> Result<PropertyDeclaration, ParseError<'i>> {
13834                parse(context, input)
13835                .map(PropertyDeclaration::TextTransform)
13836        }
13837    }
13838
13839
13840
13841
13842    
13843
13844    
13845        
13846    
13847
13848
13849// TODO: Support <percentage>
13850
13851    
13852
13853    
13854        
13855    
13856
13857
13858
13859    
13860        
13861    
13862    /// https://drafts.csswg.org/css-text/#propdef-text-indent
13863    pub mod text_indent {
13864        #[allow(unused_imports)]
13865        use cssparser::{Parser, BasicParseError, Token};
13866        #[allow(unused_imports)]
13867        use crate::parser::{Parse, ParserContext};
13868        #[allow(unused_imports)]
13869        use crate::properties::{UnparsedValue, ShorthandId};
13870        #[allow(unused_imports)]
13871        use crate::error_reporting::ParseErrorReporter;
13872        #[allow(unused_imports)]
13873        use crate::properties::longhands;
13874        #[allow(unused_imports)]
13875        use crate::properties::{LonghandId, LonghandIdSet};
13876        #[allow(unused_imports)]
13877        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
13878        #[allow(unused_imports)]
13879        use crate::properties::style_structs;
13880        #[allow(unused_imports)]
13881        use selectors::parser::SelectorParseErrorKind;
13882        #[allow(unused_imports)]
13883        use servo_arc::Arc;
13884        #[allow(unused_imports)]
13885        use style_traits::{ParseError, StyleParseErrorKind};
13886        #[allow(unused_imports)]
13887        use crate::values::computed::{Context, ToComputedValue};
13888        #[allow(unused_imports)]
13889        use crate::values::{computed, generics, specified};
13890        #[allow(unused_imports)]
13891        use crate::Atom;
13892        
13893            
13894        #[allow(unused_imports)]
13895        use app_units::Au;
13896        #[allow(unused_imports)]
13897        use crate::values::specified::AllowQuirks;
13898        #[allow(unused_imports)]
13899        use crate::Zero;
13900        #[allow(unused_imports)]
13901        use smallvec::SmallVec;
13902        pub use crate::values::specified::TextIndent as SpecifiedValue;
13903        pub mod computed_value {
13904            pub use crate::values::computed::TextIndent as T;
13905        }
13906        #[inline] pub fn get_initial_value() -> computed_value::T { computed::TextIndent::zero() }
13907        #[allow(unused_variables)]
13908        #[inline]
13909        pub fn parse<'i, 't>(
13910            context: &ParserContext,
13911            input: &mut Parser<'i, 't>,
13912        ) -> Result<SpecifiedValue, ParseError<'i>> {
13913            <specified::TextIndent as crate::parser::Parse>::parse(context, input)
13914        }
13915    
13916        
13917        #[allow(unused_variables)]
13918        pub unsafe fn cascade_property(
13919            declaration: &PropertyDeclaration,
13920            context: &mut computed::Context,
13921        ) {
13922            context.for_non_inherited_property = false;
13923            debug_assert_eq!(
13924                declaration.id().as_longhand().unwrap(),
13925                LonghandId::TextIndent,
13926            );
13927            let specified_value = match *declaration {
13928                PropertyDeclaration::CSSWideKeyword(ref wk) => {
13929                    match wk.keyword {
13930                        CSSWideKeyword::Initial => {
13931                                context.builder.reset_text_indent();
13932                        },
13933                        CSSWideKeyword::Unset |
13934                        CSSWideKeyword::Inherit => {
13935                                if !context.builder.effective_zoom_for_inheritance.is_one() {
13936                                    let old_zoom = context.builder.effective_zoom;
13937                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
13938                                    let computed = context.builder.inherited_style.clone_text_indent();
13939                                    let specified = ToComputedValue::from_computed_value(&computed);
13940                                    let decl = PropertyDeclaration::TextIndent(specified);
13941                                    cascade_property(&decl, context);
13942                                    context.builder.effective_zoom = old_zoom;
13943                                    return;
13944                                }
13945                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
13946                        }
13947                        CSSWideKeyword::RevertLayer |
13948                        CSSWideKeyword::Revert => {
13949                            declaration.debug_crash("Found revert/revert-layer not dealt with");
13950                        },
13951                    }
13952                    return;
13953                },
13954                #[cfg(debug_assertions)]
13955                PropertyDeclaration::WithVariables(..) => {
13956                    declaration.debug_crash("Found variables not substituted");
13957                    return;
13958                },
13959                _ => unsafe {
13960                    declaration.unchecked_value_as::<crate::values::specified::TextIndent>()
13961                },
13962            };
13963
13964
13965                let computed = specified_value.to_computed_value(context);
13966                context.builder.set_text_indent(computed)
13967        }
13968
13969        pub fn parse_declared<'i, 't>(
13970            context: &ParserContext,
13971            input: &mut Parser<'i, 't>,
13972        ) -> Result<PropertyDeclaration, ParseError<'i>> {
13973                parse(context, input)
13974                .map(PropertyDeclaration::TextIndent)
13975        }
13976    }
13977
13978
13979
13980// Also known as "word-wrap" (which is more popular because of IE), but this is
13981// the preferred name per CSS-TEXT 6.2.
13982
13983    
13984        
13985    
13986    /// https://drafts.csswg.org/css-text/#propdef-overflow-wrap
13987    pub mod overflow_wrap {
13988        #[allow(unused_imports)]
13989        use cssparser::{Parser, BasicParseError, Token};
13990        #[allow(unused_imports)]
13991        use crate::parser::{Parse, ParserContext};
13992        #[allow(unused_imports)]
13993        use crate::properties::{UnparsedValue, ShorthandId};
13994        #[allow(unused_imports)]
13995        use crate::error_reporting::ParseErrorReporter;
13996        #[allow(unused_imports)]
13997        use crate::properties::longhands;
13998        #[allow(unused_imports)]
13999        use crate::properties::{LonghandId, LonghandIdSet};
14000        #[allow(unused_imports)]
14001        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
14002        #[allow(unused_imports)]
14003        use crate::properties::style_structs;
14004        #[allow(unused_imports)]
14005        use selectors::parser::SelectorParseErrorKind;
14006        #[allow(unused_imports)]
14007        use servo_arc::Arc;
14008        #[allow(unused_imports)]
14009        use style_traits::{ParseError, StyleParseErrorKind};
14010        #[allow(unused_imports)]
14011        use crate::values::computed::{Context, ToComputedValue};
14012        #[allow(unused_imports)]
14013        use crate::values::{computed, generics, specified};
14014        #[allow(unused_imports)]
14015        use crate::Atom;
14016        
14017            
14018        #[allow(unused_imports)]
14019        use app_units::Au;
14020        #[allow(unused_imports)]
14021        use crate::values::specified::AllowQuirks;
14022        #[allow(unused_imports)]
14023        use crate::Zero;
14024        #[allow(unused_imports)]
14025        use smallvec::SmallVec;
14026        pub use crate::values::specified::OverflowWrap as SpecifiedValue;
14027        pub mod computed_value {
14028            pub use crate::values::computed::OverflowWrap as T;
14029        }
14030        #[inline] pub fn get_initial_value() -> computed_value::T { computed::OverflowWrap::Normal }
14031        #[allow(unused_variables)]
14032        #[inline]
14033        pub fn parse<'i, 't>(
14034            context: &ParserContext,
14035            input: &mut Parser<'i, 't>,
14036        ) -> Result<SpecifiedValue, ParseError<'i>> {
14037            <specified::OverflowWrap as crate::parser::Parse>::parse(context, input)
14038        }
14039    
14040        
14041        #[allow(unused_variables)]
14042        pub unsafe fn cascade_property(
14043            declaration: &PropertyDeclaration,
14044            context: &mut computed::Context,
14045        ) {
14046            context.for_non_inherited_property = false;
14047            debug_assert_eq!(
14048                declaration.id().as_longhand().unwrap(),
14049                LonghandId::OverflowWrap,
14050            );
14051            let specified_value = match *declaration {
14052                PropertyDeclaration::CSSWideKeyword(ref wk) => {
14053                    match wk.keyword {
14054                        CSSWideKeyword::Initial => {
14055                                context.builder.reset_overflow_wrap();
14056                        },
14057                        CSSWideKeyword::Unset |
14058                        CSSWideKeyword::Inherit => {
14059                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
14060                        }
14061                        CSSWideKeyword::RevertLayer |
14062                        CSSWideKeyword::Revert => {
14063                            declaration.debug_crash("Found revert/revert-layer not dealt with");
14064                        },
14065                    }
14066                    return;
14067                },
14068                #[cfg(debug_assertions)]
14069                PropertyDeclaration::WithVariables(..) => {
14070                    declaration.debug_crash("Found variables not substituted");
14071                    return;
14072                },
14073                _ => unsafe {
14074                    declaration.unchecked_value_as::<crate::values::specified::OverflowWrap>()
14075                },
14076            };
14077
14078
14079                let computed = specified_value.to_computed_value(context);
14080                context.builder.set_overflow_wrap(computed)
14081        }
14082
14083        pub fn parse_declared<'i, 't>(
14084            context: &ParserContext,
14085            input: &mut Parser<'i, 't>,
14086        ) -> Result<PropertyDeclaration, ParseError<'i>> {
14087                parse(context, input)
14088                .map(PropertyDeclaration::OverflowWrap)
14089        }
14090    }
14091
14092
14093
14094
14095    
14096        
14097    
14098    /// https://drafts.csswg.org/css-text/#propdef-word-break
14099    pub mod word_break {
14100        #[allow(unused_imports)]
14101        use cssparser::{Parser, BasicParseError, Token};
14102        #[allow(unused_imports)]
14103        use crate::parser::{Parse, ParserContext};
14104        #[allow(unused_imports)]
14105        use crate::properties::{UnparsedValue, ShorthandId};
14106        #[allow(unused_imports)]
14107        use crate::error_reporting::ParseErrorReporter;
14108        #[allow(unused_imports)]
14109        use crate::properties::longhands;
14110        #[allow(unused_imports)]
14111        use crate::properties::{LonghandId, LonghandIdSet};
14112        #[allow(unused_imports)]
14113        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
14114        #[allow(unused_imports)]
14115        use crate::properties::style_structs;
14116        #[allow(unused_imports)]
14117        use selectors::parser::SelectorParseErrorKind;
14118        #[allow(unused_imports)]
14119        use servo_arc::Arc;
14120        #[allow(unused_imports)]
14121        use style_traits::{ParseError, StyleParseErrorKind};
14122        #[allow(unused_imports)]
14123        use crate::values::computed::{Context, ToComputedValue};
14124        #[allow(unused_imports)]
14125        use crate::values::{computed, generics, specified};
14126        #[allow(unused_imports)]
14127        use crate::Atom;
14128        
14129            
14130        #[allow(unused_imports)]
14131        use app_units::Au;
14132        #[allow(unused_imports)]
14133        use crate::values::specified::AllowQuirks;
14134        #[allow(unused_imports)]
14135        use crate::Zero;
14136        #[allow(unused_imports)]
14137        use smallvec::SmallVec;
14138        pub use crate::values::specified::WordBreak as SpecifiedValue;
14139        pub mod computed_value {
14140            pub use crate::values::computed::WordBreak as T;
14141        }
14142        #[inline] pub fn get_initial_value() -> computed_value::T { computed::WordBreak::Normal }
14143        #[allow(unused_variables)]
14144        #[inline]
14145        pub fn parse<'i, 't>(
14146            context: &ParserContext,
14147            input: &mut Parser<'i, 't>,
14148        ) -> Result<SpecifiedValue, ParseError<'i>> {
14149            <specified::WordBreak as crate::parser::Parse>::parse(context, input)
14150        }
14151    
14152        
14153        #[allow(unused_variables)]
14154        pub unsafe fn cascade_property(
14155            declaration: &PropertyDeclaration,
14156            context: &mut computed::Context,
14157        ) {
14158            context.for_non_inherited_property = false;
14159            debug_assert_eq!(
14160                declaration.id().as_longhand().unwrap(),
14161                LonghandId::WordBreak,
14162            );
14163            let specified_value = match *declaration {
14164                PropertyDeclaration::CSSWideKeyword(ref wk) => {
14165                    match wk.keyword {
14166                        CSSWideKeyword::Initial => {
14167                                context.builder.reset_word_break();
14168                        },
14169                        CSSWideKeyword::Unset |
14170                        CSSWideKeyword::Inherit => {
14171                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
14172                        }
14173                        CSSWideKeyword::RevertLayer |
14174                        CSSWideKeyword::Revert => {
14175                            declaration.debug_crash("Found revert/revert-layer not dealt with");
14176                        },
14177                    }
14178                    return;
14179                },
14180                #[cfg(debug_assertions)]
14181                PropertyDeclaration::WithVariables(..) => {
14182                    declaration.debug_crash("Found variables not substituted");
14183                    return;
14184                },
14185                _ => unsafe {
14186                    declaration.unchecked_value_as::<crate::values::specified::WordBreak>()
14187                },
14188            };
14189
14190
14191                let computed = specified_value.to_computed_value(context);
14192                context.builder.set_word_break(computed)
14193        }
14194
14195        pub fn parse_declared<'i, 't>(
14196            context: &ParserContext,
14197            input: &mut Parser<'i, 't>,
14198        ) -> Result<PropertyDeclaration, ParseError<'i>> {
14199                parse(context, input)
14200                .map(PropertyDeclaration::WordBreak)
14201        }
14202    }
14203
14204
14205
14206
14207    
14208        
14209    
14210    /// https://drafts.csswg.org/css-text/#propdef-text-justify
14211    pub mod text_justify {
14212        #[allow(unused_imports)]
14213        use cssparser::{Parser, BasicParseError, Token};
14214        #[allow(unused_imports)]
14215        use crate::parser::{Parse, ParserContext};
14216        #[allow(unused_imports)]
14217        use crate::properties::{UnparsedValue, ShorthandId};
14218        #[allow(unused_imports)]
14219        use crate::error_reporting::ParseErrorReporter;
14220        #[allow(unused_imports)]
14221        use crate::properties::longhands;
14222        #[allow(unused_imports)]
14223        use crate::properties::{LonghandId, LonghandIdSet};
14224        #[allow(unused_imports)]
14225        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
14226        #[allow(unused_imports)]
14227        use crate::properties::style_structs;
14228        #[allow(unused_imports)]
14229        use selectors::parser::SelectorParseErrorKind;
14230        #[allow(unused_imports)]
14231        use servo_arc::Arc;
14232        #[allow(unused_imports)]
14233        use style_traits::{ParseError, StyleParseErrorKind};
14234        #[allow(unused_imports)]
14235        use crate::values::computed::{Context, ToComputedValue};
14236        #[allow(unused_imports)]
14237        use crate::values::{computed, generics, specified};
14238        #[allow(unused_imports)]
14239        use crate::Atom;
14240        
14241            
14242        #[allow(unused_imports)]
14243        use app_units::Au;
14244        #[allow(unused_imports)]
14245        use crate::values::specified::AllowQuirks;
14246        #[allow(unused_imports)]
14247        use crate::Zero;
14248        #[allow(unused_imports)]
14249        use smallvec::SmallVec;
14250        pub use crate::values::specified::TextJustify as SpecifiedValue;
14251        pub mod computed_value {
14252            pub use crate::values::computed::TextJustify as T;
14253        }
14254        #[inline] pub fn get_initial_value() -> computed_value::T { computed::TextJustify::Auto }
14255        #[allow(unused_variables)]
14256        #[inline]
14257        pub fn parse<'i, 't>(
14258            context: &ParserContext,
14259            input: &mut Parser<'i, 't>,
14260        ) -> Result<SpecifiedValue, ParseError<'i>> {
14261            <specified::TextJustify as crate::parser::Parse>::parse(context, input)
14262        }
14263    
14264        
14265        #[allow(unused_variables)]
14266        pub unsafe fn cascade_property(
14267            declaration: &PropertyDeclaration,
14268            context: &mut computed::Context,
14269        ) {
14270            context.for_non_inherited_property = false;
14271            debug_assert_eq!(
14272                declaration.id().as_longhand().unwrap(),
14273                LonghandId::TextJustify,
14274            );
14275            let specified_value = match *declaration {
14276                PropertyDeclaration::CSSWideKeyword(ref wk) => {
14277                    match wk.keyword {
14278                        CSSWideKeyword::Initial => {
14279                                context.builder.reset_text_justify();
14280                        },
14281                        CSSWideKeyword::Unset |
14282                        CSSWideKeyword::Inherit => {
14283                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
14284                        }
14285                        CSSWideKeyword::RevertLayer |
14286                        CSSWideKeyword::Revert => {
14287                            declaration.debug_crash("Found revert/revert-layer not dealt with");
14288                        },
14289                    }
14290                    return;
14291                },
14292                #[cfg(debug_assertions)]
14293                PropertyDeclaration::WithVariables(..) => {
14294                    declaration.debug_crash("Found variables not substituted");
14295                    return;
14296                },
14297                _ => unsafe {
14298                    declaration.unchecked_value_as::<crate::values::specified::TextJustify>()
14299                },
14300            };
14301
14302
14303                let computed = specified_value.to_computed_value(context);
14304                context.builder.set_text_justify(computed)
14305        }
14306
14307        pub fn parse_declared<'i, 't>(
14308            context: &ParserContext,
14309            input: &mut Parser<'i, 't>,
14310        ) -> Result<PropertyDeclaration, ParseError<'i>> {
14311                parse(context, input)
14312                .map(PropertyDeclaration::TextJustify)
14313        }
14314    }
14315
14316
14317
14318
14319    
14320        
14321    
14322    /// https://drafts.csswg.org/css-text/#propdef-text-align-last
14323    pub mod text_align_last {
14324        #[allow(unused_imports)]
14325        use cssparser::{Parser, BasicParseError, Token};
14326        #[allow(unused_imports)]
14327        use crate::parser::{Parse, ParserContext};
14328        #[allow(unused_imports)]
14329        use crate::properties::{UnparsedValue, ShorthandId};
14330        #[allow(unused_imports)]
14331        use crate::error_reporting::ParseErrorReporter;
14332        #[allow(unused_imports)]
14333        use crate::properties::longhands;
14334        #[allow(unused_imports)]
14335        use crate::properties::{LonghandId, LonghandIdSet};
14336        #[allow(unused_imports)]
14337        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
14338        #[allow(unused_imports)]
14339        use crate::properties::style_structs;
14340        #[allow(unused_imports)]
14341        use selectors::parser::SelectorParseErrorKind;
14342        #[allow(unused_imports)]
14343        use servo_arc::Arc;
14344        #[allow(unused_imports)]
14345        use style_traits::{ParseError, StyleParseErrorKind};
14346        #[allow(unused_imports)]
14347        use crate::values::computed::{Context, ToComputedValue};
14348        #[allow(unused_imports)]
14349        use crate::values::{computed, generics, specified};
14350        #[allow(unused_imports)]
14351        use crate::Atom;
14352        
14353            
14354        #[allow(unused_imports)]
14355        use app_units::Au;
14356        #[allow(unused_imports)]
14357        use crate::values::specified::AllowQuirks;
14358        #[allow(unused_imports)]
14359        use crate::Zero;
14360        #[allow(unused_imports)]
14361        use smallvec::SmallVec;
14362        pub use crate::values::specified::TextAlignLast as SpecifiedValue;
14363        pub mod computed_value {
14364            pub use crate::values::computed::TextAlignLast as T;
14365        }
14366        #[inline] pub fn get_initial_value() -> computed_value::T { computed::text::TextAlignLast::Auto }
14367        #[allow(unused_variables)]
14368        #[inline]
14369        pub fn parse<'i, 't>(
14370            context: &ParserContext,
14371            input: &mut Parser<'i, 't>,
14372        ) -> Result<SpecifiedValue, ParseError<'i>> {
14373            <specified::TextAlignLast as crate::parser::Parse>::parse(context, input)
14374        }
14375    
14376        
14377        #[allow(unused_variables)]
14378        pub unsafe fn cascade_property(
14379            declaration: &PropertyDeclaration,
14380            context: &mut computed::Context,
14381        ) {
14382            context.for_non_inherited_property = false;
14383            debug_assert_eq!(
14384                declaration.id().as_longhand().unwrap(),
14385                LonghandId::TextAlignLast,
14386            );
14387            let specified_value = match *declaration {
14388                PropertyDeclaration::CSSWideKeyword(ref wk) => {
14389                    match wk.keyword {
14390                        CSSWideKeyword::Initial => {
14391                                context.builder.reset_text_align_last();
14392                        },
14393                        CSSWideKeyword::Unset |
14394                        CSSWideKeyword::Inherit => {
14395                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
14396                        }
14397                        CSSWideKeyword::RevertLayer |
14398                        CSSWideKeyword::Revert => {
14399                            declaration.debug_crash("Found revert/revert-layer not dealt with");
14400                        },
14401                    }
14402                    return;
14403                },
14404                #[cfg(debug_assertions)]
14405                PropertyDeclaration::WithVariables(..) => {
14406                    declaration.debug_crash("Found variables not substituted");
14407                    return;
14408                },
14409                _ => unsafe {
14410                    declaration.unchecked_value_as::<crate::values::specified::TextAlignLast>()
14411                },
14412            };
14413
14414
14415                let computed = specified_value.to_computed_value(context);
14416                context.builder.set_text_align_last(computed)
14417        }
14418
14419        pub fn parse_declared<'i, 't>(
14420            context: &ParserContext,
14421            input: &mut Parser<'i, 't>,
14422        ) -> Result<PropertyDeclaration, ParseError<'i>> {
14423                parse(context, input)
14424                .map(PropertyDeclaration::TextAlignLast)
14425        }
14426    }
14427
14428
14429
14430// TODO make this a shorthand and implement text-align-last/text-align-all
14431
14432    
14433        
14434    
14435    /// https://drafts.csswg.org/css-text/#propdef-text-align
14436    pub mod text_align {
14437        #[allow(unused_imports)]
14438        use cssparser::{Parser, BasicParseError, Token};
14439        #[allow(unused_imports)]
14440        use crate::parser::{Parse, ParserContext};
14441        #[allow(unused_imports)]
14442        use crate::properties::{UnparsedValue, ShorthandId};
14443        #[allow(unused_imports)]
14444        use crate::error_reporting::ParseErrorReporter;
14445        #[allow(unused_imports)]
14446        use crate::properties::longhands;
14447        #[allow(unused_imports)]
14448        use crate::properties::{LonghandId, LonghandIdSet};
14449        #[allow(unused_imports)]
14450        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
14451        #[allow(unused_imports)]
14452        use crate::properties::style_structs;
14453        #[allow(unused_imports)]
14454        use selectors::parser::SelectorParseErrorKind;
14455        #[allow(unused_imports)]
14456        use servo_arc::Arc;
14457        #[allow(unused_imports)]
14458        use style_traits::{ParseError, StyleParseErrorKind};
14459        #[allow(unused_imports)]
14460        use crate::values::computed::{Context, ToComputedValue};
14461        #[allow(unused_imports)]
14462        use crate::values::{computed, generics, specified};
14463        #[allow(unused_imports)]
14464        use crate::Atom;
14465        
14466            
14467        #[allow(unused_imports)]
14468        use app_units::Au;
14469        #[allow(unused_imports)]
14470        use crate::values::specified::AllowQuirks;
14471        #[allow(unused_imports)]
14472        use crate::Zero;
14473        #[allow(unused_imports)]
14474        use smallvec::SmallVec;
14475        pub use crate::values::specified::TextAlign as SpecifiedValue;
14476        pub mod computed_value {
14477            pub use crate::values::computed::TextAlign as T;
14478        }
14479        #[inline] pub fn get_initial_value() -> computed_value::T { computed::TextAlign::Start }
14480        #[allow(unused_variables)]
14481        #[inline]
14482        pub fn parse<'i, 't>(
14483            context: &ParserContext,
14484            input: &mut Parser<'i, 't>,
14485        ) -> Result<SpecifiedValue, ParseError<'i>> {
14486            <specified::TextAlign as crate::parser::Parse>::parse(context, input)
14487        }
14488    
14489        
14490        #[allow(unused_variables)]
14491        pub unsafe fn cascade_property(
14492            declaration: &PropertyDeclaration,
14493            context: &mut computed::Context,
14494        ) {
14495            context.for_non_inherited_property = false;
14496            debug_assert_eq!(
14497                declaration.id().as_longhand().unwrap(),
14498                LonghandId::TextAlign,
14499            );
14500            let specified_value = match *declaration {
14501                PropertyDeclaration::CSSWideKeyword(ref wk) => {
14502                    match wk.keyword {
14503                        CSSWideKeyword::Initial => {
14504                                context.builder.reset_text_align();
14505                        },
14506                        CSSWideKeyword::Unset |
14507                        CSSWideKeyword::Inherit => {
14508                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
14509                        }
14510                        CSSWideKeyword::RevertLayer |
14511                        CSSWideKeyword::Revert => {
14512                            declaration.debug_crash("Found revert/revert-layer not dealt with");
14513                        },
14514                    }
14515                    return;
14516                },
14517                #[cfg(debug_assertions)]
14518                PropertyDeclaration::WithVariables(..) => {
14519                    declaration.debug_crash("Found variables not substituted");
14520                    return;
14521                },
14522                _ => unsafe {
14523                    declaration.unchecked_value_as::<crate::values::specified::TextAlign>()
14524                },
14525            };
14526
14527
14528                let computed = specified_value.to_computed_value(context);
14529                context.builder.set_text_align(computed)
14530        }
14531
14532        pub fn parse_declared<'i, 't>(
14533            context: &ParserContext,
14534            input: &mut Parser<'i, 't>,
14535        ) -> Result<PropertyDeclaration, ParseError<'i>> {
14536                parse(context, input)
14537                .map(PropertyDeclaration::TextAlign)
14538        }
14539    }
14540
14541
14542
14543
14544    
14545        
14546    
14547    /// https://drafts.csswg.org/css-text/#propdef-letter-spacing
14548    pub mod letter_spacing {
14549        #[allow(unused_imports)]
14550        use cssparser::{Parser, BasicParseError, Token};
14551        #[allow(unused_imports)]
14552        use crate::parser::{Parse, ParserContext};
14553        #[allow(unused_imports)]
14554        use crate::properties::{UnparsedValue, ShorthandId};
14555        #[allow(unused_imports)]
14556        use crate::error_reporting::ParseErrorReporter;
14557        #[allow(unused_imports)]
14558        use crate::properties::longhands;
14559        #[allow(unused_imports)]
14560        use crate::properties::{LonghandId, LonghandIdSet};
14561        #[allow(unused_imports)]
14562        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
14563        #[allow(unused_imports)]
14564        use crate::properties::style_structs;
14565        #[allow(unused_imports)]
14566        use selectors::parser::SelectorParseErrorKind;
14567        #[allow(unused_imports)]
14568        use servo_arc::Arc;
14569        #[allow(unused_imports)]
14570        use style_traits::{ParseError, StyleParseErrorKind};
14571        #[allow(unused_imports)]
14572        use crate::values::computed::{Context, ToComputedValue};
14573        #[allow(unused_imports)]
14574        use crate::values::{computed, generics, specified};
14575        #[allow(unused_imports)]
14576        use crate::Atom;
14577        
14578            
14579        #[allow(unused_imports)]
14580        use app_units::Au;
14581        #[allow(unused_imports)]
14582        use crate::values::specified::AllowQuirks;
14583        #[allow(unused_imports)]
14584        use crate::Zero;
14585        #[allow(unused_imports)]
14586        use smallvec::SmallVec;
14587        pub use crate::values::specified::LetterSpacing as SpecifiedValue;
14588        pub mod computed_value {
14589            pub use crate::values::computed::LetterSpacing as T;
14590        }
14591        #[inline] pub fn get_initial_value() -> computed_value::T { computed::LetterSpacing::normal() }
14592        #[allow(unused_variables)]
14593        #[inline]
14594        pub fn parse<'i, 't>(
14595            context: &ParserContext,
14596            input: &mut Parser<'i, 't>,
14597        ) -> Result<SpecifiedValue, ParseError<'i>> {
14598            <specified::LetterSpacing as crate::parser::Parse>::parse(context, input)
14599        }
14600    
14601        
14602        #[allow(unused_variables)]
14603        pub unsafe fn cascade_property(
14604            declaration: &PropertyDeclaration,
14605            context: &mut computed::Context,
14606        ) {
14607            context.for_non_inherited_property = false;
14608            debug_assert_eq!(
14609                declaration.id().as_longhand().unwrap(),
14610                LonghandId::LetterSpacing,
14611            );
14612            let specified_value = match *declaration {
14613                PropertyDeclaration::CSSWideKeyword(ref wk) => {
14614                    match wk.keyword {
14615                        CSSWideKeyword::Initial => {
14616                                context.builder.reset_letter_spacing();
14617                        },
14618                        CSSWideKeyword::Unset |
14619                        CSSWideKeyword::Inherit => {
14620                                if !context.builder.effective_zoom_for_inheritance.is_one() {
14621                                    let old_zoom = context.builder.effective_zoom;
14622                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
14623                                    let computed = context.builder.inherited_style.clone_letter_spacing();
14624                                    let specified = ToComputedValue::from_computed_value(&computed);
14625                                    let decl = PropertyDeclaration::LetterSpacing(specified);
14626                                    cascade_property(&decl, context);
14627                                    context.builder.effective_zoom = old_zoom;
14628                                    return;
14629                                }
14630                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
14631                        }
14632                        CSSWideKeyword::RevertLayer |
14633                        CSSWideKeyword::Revert => {
14634                            declaration.debug_crash("Found revert/revert-layer not dealt with");
14635                        },
14636                    }
14637                    return;
14638                },
14639                #[cfg(debug_assertions)]
14640                PropertyDeclaration::WithVariables(..) => {
14641                    declaration.debug_crash("Found variables not substituted");
14642                    return;
14643                },
14644                _ => unsafe {
14645                    declaration.unchecked_value_as::<crate::values::specified::LetterSpacing>()
14646                },
14647            };
14648
14649
14650                let computed = specified_value.to_computed_value(context);
14651                context.builder.set_letter_spacing(computed)
14652        }
14653
14654        pub fn parse_declared<'i, 't>(
14655            context: &ParserContext,
14656            input: &mut Parser<'i, 't>,
14657        ) -> Result<PropertyDeclaration, ParseError<'i>> {
14658                parse(context, input)
14659                .map(PropertyDeclaration::LetterSpacing)
14660        }
14661    }
14662
14663
14664
14665
14666    
14667        
14668    
14669    /// https://drafts.csswg.org/css-text/#propdef-word-spacing
14670    pub mod word_spacing {
14671        #[allow(unused_imports)]
14672        use cssparser::{Parser, BasicParseError, Token};
14673        #[allow(unused_imports)]
14674        use crate::parser::{Parse, ParserContext};
14675        #[allow(unused_imports)]
14676        use crate::properties::{UnparsedValue, ShorthandId};
14677        #[allow(unused_imports)]
14678        use crate::error_reporting::ParseErrorReporter;
14679        #[allow(unused_imports)]
14680        use crate::properties::longhands;
14681        #[allow(unused_imports)]
14682        use crate::properties::{LonghandId, LonghandIdSet};
14683        #[allow(unused_imports)]
14684        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
14685        #[allow(unused_imports)]
14686        use crate::properties::style_structs;
14687        #[allow(unused_imports)]
14688        use selectors::parser::SelectorParseErrorKind;
14689        #[allow(unused_imports)]
14690        use servo_arc::Arc;
14691        #[allow(unused_imports)]
14692        use style_traits::{ParseError, StyleParseErrorKind};
14693        #[allow(unused_imports)]
14694        use crate::values::computed::{Context, ToComputedValue};
14695        #[allow(unused_imports)]
14696        use crate::values::{computed, generics, specified};
14697        #[allow(unused_imports)]
14698        use crate::Atom;
14699        
14700            
14701        #[allow(unused_imports)]
14702        use app_units::Au;
14703        #[allow(unused_imports)]
14704        use crate::values::specified::AllowQuirks;
14705        #[allow(unused_imports)]
14706        use crate::Zero;
14707        #[allow(unused_imports)]
14708        use smallvec::SmallVec;
14709        pub use crate::values::specified::WordSpacing as SpecifiedValue;
14710        pub mod computed_value {
14711            pub use crate::values::computed::WordSpacing as T;
14712        }
14713        #[inline] pub fn get_initial_value() -> computed_value::T { computed::WordSpacing::zero() }
14714        #[allow(unused_variables)]
14715        #[inline]
14716        pub fn parse<'i, 't>(
14717            context: &ParserContext,
14718            input: &mut Parser<'i, 't>,
14719        ) -> Result<SpecifiedValue, ParseError<'i>> {
14720            <specified::WordSpacing as crate::parser::Parse>::parse(context, input)
14721        }
14722    
14723        
14724        #[allow(unused_variables)]
14725        pub unsafe fn cascade_property(
14726            declaration: &PropertyDeclaration,
14727            context: &mut computed::Context,
14728        ) {
14729            context.for_non_inherited_property = false;
14730            debug_assert_eq!(
14731                declaration.id().as_longhand().unwrap(),
14732                LonghandId::WordSpacing,
14733            );
14734            let specified_value = match *declaration {
14735                PropertyDeclaration::CSSWideKeyword(ref wk) => {
14736                    match wk.keyword {
14737                        CSSWideKeyword::Initial => {
14738                                context.builder.reset_word_spacing();
14739                        },
14740                        CSSWideKeyword::Unset |
14741                        CSSWideKeyword::Inherit => {
14742                                if !context.builder.effective_zoom_for_inheritance.is_one() {
14743                                    let old_zoom = context.builder.effective_zoom;
14744                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
14745                                    let computed = context.builder.inherited_style.clone_word_spacing();
14746                                    let specified = ToComputedValue::from_computed_value(&computed);
14747                                    let decl = PropertyDeclaration::WordSpacing(specified);
14748                                    cascade_property(&decl, context);
14749                                    context.builder.effective_zoom = old_zoom;
14750                                    return;
14751                                }
14752                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
14753                        }
14754                        CSSWideKeyword::RevertLayer |
14755                        CSSWideKeyword::Revert => {
14756                            declaration.debug_crash("Found revert/revert-layer not dealt with");
14757                        },
14758                    }
14759                    return;
14760                },
14761                #[cfg(debug_assertions)]
14762                PropertyDeclaration::WithVariables(..) => {
14763                    declaration.debug_crash("Found variables not substituted");
14764                    return;
14765                },
14766                _ => unsafe {
14767                    declaration.unchecked_value_as::<crate::values::specified::WordSpacing>()
14768                },
14769            };
14770
14771
14772                let computed = specified_value.to_computed_value(context);
14773                context.builder.set_word_spacing(computed)
14774        }
14775
14776        pub fn parse_declared<'i, 't>(
14777            context: &ParserContext,
14778            input: &mut Parser<'i, 't>,
14779        ) -> Result<PropertyDeclaration, ParseError<'i>> {
14780                parse(context, input)
14781                .map(PropertyDeclaration::WordSpacing)
14782        }
14783    }
14784
14785
14786
14787// TODO: `white-space-collapse: discard` not yet supported
14788
14789    
14790
14791    
14792        
14793    
14794    /// https://drafts.csswg.org/css-text-4/#propdef-white-space-collapse
14795    pub mod white_space_collapse {
14796        #[allow(unused_imports)]
14797        use cssparser::{Parser, BasicParseError, Token};
14798        #[allow(unused_imports)]
14799        use crate::parser::{Parse, ParserContext};
14800        #[allow(unused_imports)]
14801        use crate::properties::{UnparsedValue, ShorthandId};
14802        #[allow(unused_imports)]
14803        use crate::error_reporting::ParseErrorReporter;
14804        #[allow(unused_imports)]
14805        use crate::properties::longhands;
14806        #[allow(unused_imports)]
14807        use crate::properties::{LonghandId, LonghandIdSet};
14808        #[allow(unused_imports)]
14809        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
14810        #[allow(unused_imports)]
14811        use crate::properties::style_structs;
14812        #[allow(unused_imports)]
14813        use selectors::parser::SelectorParseErrorKind;
14814        #[allow(unused_imports)]
14815        use servo_arc::Arc;
14816        #[allow(unused_imports)]
14817        use style_traits::{ParseError, StyleParseErrorKind};
14818        #[allow(unused_imports)]
14819        use crate::values::computed::{Context, ToComputedValue};
14820        #[allow(unused_imports)]
14821        use crate::values::{computed, generics, specified};
14822        #[allow(unused_imports)]
14823        use crate::Atom;
14824        
14825            
14826        pub use self::computed_value::T as SpecifiedValue;
14827        pub mod computed_value {
14828            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
14829            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
14830            pub enum T {
14831            
14832            Collapse,
14833            
14834            Preserve,
14835            
14836            PreserveBreaks,
14837            
14838            BreakSpaces,
14839            }
14840        }
14841        #[inline]
14842        pub fn get_initial_value() -> computed_value::T {
14843            computed_value::T::Collapse
14844        }
14845        #[inline]
14846        pub fn get_initial_specified_value() -> SpecifiedValue {
14847            SpecifiedValue::Collapse
14848        }
14849        #[inline]
14850        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
14851                             -> Result<SpecifiedValue, ParseError<'i>> {
14852            SpecifiedValue::parse(input)
14853        }
14854
14855    
14856        
14857        #[allow(unused_variables)]
14858        pub unsafe fn cascade_property(
14859            declaration: &PropertyDeclaration,
14860            context: &mut computed::Context,
14861        ) {
14862            context.for_non_inherited_property = false;
14863            debug_assert_eq!(
14864                declaration.id().as_longhand().unwrap(),
14865                LonghandId::WhiteSpaceCollapse,
14866            );
14867            let specified_value = match *declaration {
14868                PropertyDeclaration::CSSWideKeyword(ref wk) => {
14869                    match wk.keyword {
14870                        CSSWideKeyword::Initial => {
14871                                context.builder.reset_white_space_collapse();
14872                        },
14873                        CSSWideKeyword::Unset |
14874                        CSSWideKeyword::Inherit => {
14875                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
14876                        }
14877                        CSSWideKeyword::RevertLayer |
14878                        CSSWideKeyword::Revert => {
14879                            declaration.debug_crash("Found revert/revert-layer not dealt with");
14880                        },
14881                    }
14882                    return;
14883                },
14884                #[cfg(debug_assertions)]
14885                PropertyDeclaration::WithVariables(..) => {
14886                    declaration.debug_crash("Found variables not substituted");
14887                    return;
14888                },
14889                _ => unsafe {
14890                    declaration.unchecked_value_as::<longhands::white_space_collapse::SpecifiedValue>()
14891                },
14892            };
14893
14894
14895                let computed = specified_value.to_computed_value(context);
14896                context.builder.set_white_space_collapse(computed)
14897        }
14898
14899        pub fn parse_declared<'i, 't>(
14900            context: &ParserContext,
14901            input: &mut Parser<'i, 't>,
14902        ) -> Result<PropertyDeclaration, ParseError<'i>> {
14903                parse(context, input)
14904                .map(PropertyDeclaration::WhiteSpaceCollapse)
14905        }
14906    }
14907
14908
14909
14910
14911    
14912        
14913    
14914    
14915    /// https://drafts.csswg.org/css-text-decor-3/#text-shadow-property
14916    pub mod text_shadow {
14917        #[allow(unused_imports)]
14918        use cssparser::{Parser, BasicParseError, Token};
14919        #[allow(unused_imports)]
14920        use crate::parser::{Parse, ParserContext};
14921        #[allow(unused_imports)]
14922        use crate::properties::{UnparsedValue, ShorthandId};
14923        #[allow(unused_imports)]
14924        use crate::error_reporting::ParseErrorReporter;
14925        #[allow(unused_imports)]
14926        use crate::properties::longhands;
14927        #[allow(unused_imports)]
14928        use crate::properties::{LonghandId, LonghandIdSet};
14929        #[allow(unused_imports)]
14930        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
14931        #[allow(unused_imports)]
14932        use crate::properties::style_structs;
14933        #[allow(unused_imports)]
14934        use selectors::parser::SelectorParseErrorKind;
14935        #[allow(unused_imports)]
14936        use servo_arc::Arc;
14937        #[allow(unused_imports)]
14938        use style_traits::{ParseError, StyleParseErrorKind};
14939        #[allow(unused_imports)]
14940        use crate::values::computed::{Context, ToComputedValue};
14941        #[allow(unused_imports)]
14942        use crate::values::{computed, generics, specified};
14943        #[allow(unused_imports)]
14944        use crate::Atom;
14945        
14946        #[allow(unused_imports)]
14947        use smallvec::SmallVec;
14948
14949        pub mod single_value {
14950            #[allow(unused_imports)]
14951            use cssparser::{Parser, BasicParseError};
14952            #[allow(unused_imports)]
14953            use crate::parser::{Parse, ParserContext};
14954            #[allow(unused_imports)]
14955            use crate::properties::ShorthandId;
14956            #[allow(unused_imports)]
14957            use selectors::parser::SelectorParseErrorKind;
14958            #[allow(unused_imports)]
14959            use style_traits::{ParseError, StyleParseErrorKind};
14960            #[allow(unused_imports)]
14961            use crate::values::computed::{Context, ToComputedValue};
14962            #[allow(unused_imports)]
14963            use crate::values::{computed, specified};
14964            
14965            
14966        #[allow(unused_imports)]
14967        use app_units::Au;
14968        #[allow(unused_imports)]
14969        use crate::values::specified::AllowQuirks;
14970        #[allow(unused_imports)]
14971        use crate::Zero;
14972        #[allow(unused_imports)]
14973        use smallvec::SmallVec;
14974        pub use crate::values::specified::SimpleShadow as SpecifiedValue;
14975        pub mod computed_value {
14976            pub use crate::values::computed::SimpleShadow as T;
14977        }
14978        #[allow(unused_variables)]
14979        #[inline]
14980        pub fn parse<'i, 't>(
14981            context: &ParserContext,
14982            input: &mut Parser<'i, 't>,
14983        ) -> Result<SpecifiedValue, ParseError<'i>> {
14984            <specified::SimpleShadow as crate::parser::Parse>::parse(context, input)
14985        }
14986    
14987        
14988        }
14989
14990        /// The definition of the computed value for text-shadow.
14991        pub mod computed_value {
14992            #[allow(unused_imports)]
14993            use crate::values::animated::ToAnimatedValue;
14994            #[allow(unused_imports)]
14995            use crate::values::resolved::ToResolvedValue;
14996            pub use super::single_value::computed_value as single_value;
14997            pub use self::single_value::T as SingleComputedValue;
14998            use crate::values::computed::ComputedVecIter;
14999
15000            
15001
15002            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
15003            // something for transition-name, which is the only remaining user
15004            // of NotInitial.
15005            pub type UnderlyingList<T> =
15006                    crate::ArcSlice<T>;
15007
15008            pub type UnderlyingOwnedList<T> =
15009                    crate::OwnedSlice<T>;
15010
15011
15012            /// The generic type defining the animated and resolved values for
15013            /// this property.
15014            ///
15015            /// Making this type generic allows the compiler to figure out the
15016            /// animated value for us, instead of having to implement it
15017            /// manually for every type we care about.
15018            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
15019            #[css(comma)]
15020            pub struct OwnedList<T>(
15021                #[css(if_empty = "none", iterable)]
15022                pub UnderlyingOwnedList<T>,
15023            );
15024
15025            /// The computed value for this property.
15026            pub use self::ComputedList as List;
15027
15028            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToCss)]
15029            #[css(comma)]
15030            pub struct ComputedList(
15031                #[css(if_empty = "none", iterable)]
15032                #[ignore_malloc_size_of = "Arc"]
15033                pub UnderlyingList<single_value::T>,
15034            );
15035
15036            type ResolvedList = <OwnedList<single_value::T> as ToResolvedValue>::ResolvedValue;
15037            impl ToResolvedValue for ComputedList {
15038                type ResolvedValue = ResolvedList;
15039
15040                fn to_resolved_value(self, context: &crate::values::resolved::Context) -> Self::ResolvedValue {
15041                    OwnedList(
15042                        self.0
15043                            .iter()
15044                            .cloned()
15045                            .map(|v| v.to_resolved_value(context))
15046                            .collect()
15047                    )
15048                }
15049
15050                fn from_resolved_value(resolved: Self::ResolvedValue) -> Self {
15051                    let iter =
15052                        resolved.0.into_iter().map(ToResolvedValue::from_resolved_value);
15053                    ComputedList(UnderlyingList::from_iter(iter))
15054                }
15055            }
15056
15057            impl From<ComputedList> for UnderlyingList<single_value::T> {
15058                #[inline]
15059                fn from(l: ComputedList) -> Self {
15060                    l.0
15061                }
15062            }
15063            impl From<UnderlyingList<single_value::T>> for ComputedList {
15064                #[inline]
15065                fn from(l: UnderlyingList<single_value::T>) -> Self {
15066                    List(l)
15067                }
15068            }
15069
15070            use crate::values::animated::{Animate, ToAnimatedZero, Procedure, lists};
15071            use crate::values::distance::{SquaredDistance, ComputeSquaredDistance};
15072
15073            // FIXME(emilio): For some reason rust thinks that this alias is
15074            // unused, even though it's clearly used below?
15075            #[allow(unused)]
15076            type AnimatedList = <OwnedList<single_value::T> as ToAnimatedValue>::AnimatedValue;
15077            impl ToAnimatedValue for ComputedList {
15078                type AnimatedValue = AnimatedList;
15079
15080                fn to_animated_value(self, context: &crate::values::animated::Context) -> Self::AnimatedValue {
15081                    OwnedList(
15082                        self.0.iter().map(|v| v.clone().to_animated_value(context)).collect()
15083                    )
15084                }
15085
15086                fn from_animated_value(animated: Self::AnimatedValue) -> Self {
15087                    let iter =
15088                        animated.0.into_iter().map(ToAnimatedValue::from_animated_value);
15089                    ComputedList(UnderlyingList::from_iter(iter))
15090                }
15091            }
15092
15093            impl ToAnimatedZero for AnimatedList {
15094                fn to_animated_zero(&self) -> Result<Self, ()> { Err(()) }
15095            }
15096
15097            impl Animate for AnimatedList {
15098                fn animate(
15099                    &self,
15100                    other: &Self,
15101                    procedure: Procedure,
15102                ) -> Result<Self, ()> {
15103                    Ok(OwnedList(
15104                        lists::with_zero::animate(&self.0, &other.0, procedure)?
15105                    ))
15106                }
15107            }
15108            impl ComputeSquaredDistance for AnimatedList {
15109                fn compute_squared_distance(
15110                    &self,
15111                    other: &Self,
15112                ) -> Result<SquaredDistance, ()> {
15113                    lists::with_zero::squared_distance(&self.0, &other.0)
15114                }
15115            }
15116
15117            /// The computed value, effectively a list of single values.
15118            pub use self::ComputedList as T;
15119
15120            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
15121        }
15122
15123        /// The specified value of text-shadow.
15124        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
15125        #[css(comma)]
15126        pub struct SpecifiedValue(
15127            #[css(if_empty = "none", iterable)]
15128            pub crate::OwnedSlice<single_value::SpecifiedValue>,
15129        );
15130
15131        pub fn get_initial_value() -> computed_value::T {
15132                computed_value::List(Default::default())
15133        }
15134
15135        pub fn parse<'i, 't>(
15136            context: &ParserContext,
15137            input: &mut Parser<'i, 't>,
15138        ) -> Result<SpecifiedValue, ParseError<'i>> {
15139            use style_traits::Separator;
15140
15141            if input.try_parse(|input| input.expect_ident_matching("none")).is_ok() {
15142                return Ok(SpecifiedValue(Default::default()))
15143            }
15144
15145            let v = style_traits::Comma::parse(input, |parser| {
15146                single_value::parse(context, parser)
15147            })?;
15148            Ok(SpecifiedValue(v.into()))
15149        }
15150
15151        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
15152
15153
15154        impl ToComputedValue for SpecifiedValue {
15155            type ComputedValue = computed_value::T;
15156
15157            #[inline]
15158            fn to_computed_value(&self, context: &Context) -> computed_value::T {
15159                computed_value::List(computed_value::UnderlyingList::from_iter(
15160                    self.0.iter().map(|i| i.to_computed_value(context))
15161                ))
15162            }
15163
15164            #[inline]
15165            fn from_computed_value(computed: &computed_value::T) -> Self {
15166                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
15167                SpecifiedValue(iter.collect())
15168            }
15169        }
15170    
15171        #[allow(unused_variables)]
15172        pub unsafe fn cascade_property(
15173            declaration: &PropertyDeclaration,
15174            context: &mut computed::Context,
15175        ) {
15176            context.for_non_inherited_property = false;
15177            debug_assert_eq!(
15178                declaration.id().as_longhand().unwrap(),
15179                LonghandId::TextShadow,
15180            );
15181            let specified_value = match *declaration {
15182                PropertyDeclaration::CSSWideKeyword(ref wk) => {
15183                    match wk.keyword {
15184                        CSSWideKeyword::Initial => {
15185                                context.builder.reset_text_shadow();
15186                        },
15187                        CSSWideKeyword::Unset |
15188                        CSSWideKeyword::Inherit => {
15189                                if !context.builder.effective_zoom_for_inheritance.is_one() {
15190                                    let old_zoom = context.builder.effective_zoom;
15191                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
15192                                    let computed = context.builder.inherited_style.clone_text_shadow();
15193                                    let specified = ToComputedValue::from_computed_value(&computed);
15194                                    let decl = PropertyDeclaration::TextShadow(specified);
15195                                    cascade_property(&decl, context);
15196                                    context.builder.effective_zoom = old_zoom;
15197                                    return;
15198                                }
15199                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
15200                        }
15201                        CSSWideKeyword::RevertLayer |
15202                        CSSWideKeyword::Revert => {
15203                            declaration.debug_crash("Found revert/revert-layer not dealt with");
15204                        },
15205                    }
15206                    return;
15207                },
15208                #[cfg(debug_assertions)]
15209                PropertyDeclaration::WithVariables(..) => {
15210                    declaration.debug_crash("Found variables not substituted");
15211                    return;
15212                },
15213                _ => unsafe {
15214                    declaration.unchecked_value_as::<longhands::text_shadow::SpecifiedValue>()
15215                },
15216            };
15217
15218
15219                let computed = specified_value.to_computed_value(context);
15220                context.builder.set_text_shadow(computed)
15221        }
15222
15223        pub fn parse_declared<'i, 't>(
15224            context: &ParserContext,
15225            input: &mut Parser<'i, 't>,
15226        ) -> Result<PropertyDeclaration, ParseError<'i>> {
15227                parse(context, input)
15228                .map(PropertyDeclaration::TextShadow)
15229        }
15230    }
15231
15232
15233
15234
15235
15236    
15237        
15238    
15239
15240
15241
15242    
15243        
15244    
15245
15246
15247
15248    
15249        
15250    
15251
15252
15253
15254    
15255        
15256    
15257
15258
15259
15260    
15261        
15262    
15263
15264
15265// CSS Compatibility
15266// https://compat.spec.whatwg.org
15267
15268    
15269        
15270    
15271
15272
15273
15274    
15275        
15276    
15277
15278
15279
15280    
15281        
15282    
15283
15284
15285// CSS Ruby Layout Module Level 1
15286// https://drafts.csswg.org/css-ruby/
15287
15288    
15289
15290    
15291        
15292    
15293
15294
15295
15296    
15297        
15298    
15299
15300
15301// CSS Writing Modes Module Level 3
15302// https://drafts.csswg.org/css-writing-modes-3/
15303
15304
15305    
15306
15307    
15308        
15309    
15310
15311
15312// SVG 2: Section 13 - Painting: Filling, Stroking and Marker Symbols
15313
15314    
15315
15316    
15317        
15318    
15319    /// https://svgwg.org/svg2-draft/painting.html#TextRenderingProperty
15320    pub mod text_rendering {
15321        #[allow(unused_imports)]
15322        use cssparser::{Parser, BasicParseError, Token};
15323        #[allow(unused_imports)]
15324        use crate::parser::{Parse, ParserContext};
15325        #[allow(unused_imports)]
15326        use crate::properties::{UnparsedValue, ShorthandId};
15327        #[allow(unused_imports)]
15328        use crate::error_reporting::ParseErrorReporter;
15329        #[allow(unused_imports)]
15330        use crate::properties::longhands;
15331        #[allow(unused_imports)]
15332        use crate::properties::{LonghandId, LonghandIdSet};
15333        #[allow(unused_imports)]
15334        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
15335        #[allow(unused_imports)]
15336        use crate::properties::style_structs;
15337        #[allow(unused_imports)]
15338        use selectors::parser::SelectorParseErrorKind;
15339        #[allow(unused_imports)]
15340        use servo_arc::Arc;
15341        #[allow(unused_imports)]
15342        use style_traits::{ParseError, StyleParseErrorKind};
15343        #[allow(unused_imports)]
15344        use crate::values::computed::{Context, ToComputedValue};
15345        #[allow(unused_imports)]
15346        use crate::values::{computed, generics, specified};
15347        #[allow(unused_imports)]
15348        use crate::Atom;
15349        
15350            
15351        pub use self::computed_value::T as SpecifiedValue;
15352        pub mod computed_value {
15353            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
15354            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
15355            pub enum T {
15356            
15357            Auto,
15358            
15359            Optimizespeed,
15360            
15361            Optimizelegibility,
15362            
15363            Geometricprecision,
15364            }
15365        }
15366        #[inline]
15367        pub fn get_initial_value() -> computed_value::T {
15368            computed_value::T::Auto
15369        }
15370        #[inline]
15371        pub fn get_initial_specified_value() -> SpecifiedValue {
15372            SpecifiedValue::Auto
15373        }
15374        #[inline]
15375        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
15376                             -> Result<SpecifiedValue, ParseError<'i>> {
15377            SpecifiedValue::parse(input)
15378        }
15379
15380    
15381        
15382        #[allow(unused_variables)]
15383        pub unsafe fn cascade_property(
15384            declaration: &PropertyDeclaration,
15385            context: &mut computed::Context,
15386        ) {
15387            context.for_non_inherited_property = false;
15388            debug_assert_eq!(
15389                declaration.id().as_longhand().unwrap(),
15390                LonghandId::TextRendering,
15391            );
15392            let specified_value = match *declaration {
15393                PropertyDeclaration::CSSWideKeyword(ref wk) => {
15394                    match wk.keyword {
15395                        CSSWideKeyword::Initial => {
15396                                context.builder.reset_text_rendering();
15397                        },
15398                        CSSWideKeyword::Unset |
15399                        CSSWideKeyword::Inherit => {
15400                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
15401                        }
15402                        CSSWideKeyword::RevertLayer |
15403                        CSSWideKeyword::Revert => {
15404                            declaration.debug_crash("Found revert/revert-layer not dealt with");
15405                        },
15406                    }
15407                    return;
15408                },
15409                #[cfg(debug_assertions)]
15410                PropertyDeclaration::WithVariables(..) => {
15411                    declaration.debug_crash("Found variables not substituted");
15412                    return;
15413                },
15414                _ => unsafe {
15415                    declaration.unchecked_value_as::<longhands::text_rendering::SpecifiedValue>()
15416                },
15417            };
15418
15419
15420                let computed = specified_value.to_computed_value(context);
15421                context.builder.set_text_rendering(computed)
15422        }
15423
15424        pub fn parse_declared<'i, 't>(
15425            context: &ParserContext,
15426            input: &mut Parser<'i, 't>,
15427        ) -> Result<PropertyDeclaration, ParseError<'i>> {
15428                parse(context, input)
15429                .map(PropertyDeclaration::TextRendering)
15430        }
15431    }
15432
15433
15434
15435
15436    
15437        
15438    
15439
15440
15441// text underline offset
15442
15443    
15444        
15445    
15446
15447
15448// text underline position
15449
15450    
15451        
15452    
15453
15454
15455// text decoration skip ink
15456
15457    
15458        
15459    
15460
15461
15462// hyphenation character
15463
15464    
15465        
15466    
15467
15468
15469
15470    
15471        
15472    
15473
15474
15475
15476    
15477
15478    
15479        
15480    
15481
15482
15483
15484    
15485
15486    
15487        
15488    
15489    /// https://drafts.csswg.org/css-text-4/#propdef-text-wrap-mode
15490    pub mod text_wrap_mode {
15491        #[allow(unused_imports)]
15492        use cssparser::{Parser, BasicParseError, Token};
15493        #[allow(unused_imports)]
15494        use crate::parser::{Parse, ParserContext};
15495        #[allow(unused_imports)]
15496        use crate::properties::{UnparsedValue, ShorthandId};
15497        #[allow(unused_imports)]
15498        use crate::error_reporting::ParseErrorReporter;
15499        #[allow(unused_imports)]
15500        use crate::properties::longhands;
15501        #[allow(unused_imports)]
15502        use crate::properties::{LonghandId, LonghandIdSet};
15503        #[allow(unused_imports)]
15504        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
15505        #[allow(unused_imports)]
15506        use crate::properties::style_structs;
15507        #[allow(unused_imports)]
15508        use selectors::parser::SelectorParseErrorKind;
15509        #[allow(unused_imports)]
15510        use servo_arc::Arc;
15511        #[allow(unused_imports)]
15512        use style_traits::{ParseError, StyleParseErrorKind};
15513        #[allow(unused_imports)]
15514        use crate::values::computed::{Context, ToComputedValue};
15515        #[allow(unused_imports)]
15516        use crate::values::{computed, generics, specified};
15517        #[allow(unused_imports)]
15518        use crate::Atom;
15519        
15520            
15521        pub use self::computed_value::T as SpecifiedValue;
15522        pub mod computed_value {
15523            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
15524            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
15525            pub enum T {
15526            
15527            Wrap,
15528            
15529            Nowrap,
15530            }
15531        }
15532        #[inline]
15533        pub fn get_initial_value() -> computed_value::T {
15534            computed_value::T::Wrap
15535        }
15536        #[inline]
15537        pub fn get_initial_specified_value() -> SpecifiedValue {
15538            SpecifiedValue::Wrap
15539        }
15540        #[inline]
15541        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
15542                             -> Result<SpecifiedValue, ParseError<'i>> {
15543            SpecifiedValue::parse(input)
15544        }
15545
15546    
15547        
15548        #[allow(unused_variables)]
15549        pub unsafe fn cascade_property(
15550            declaration: &PropertyDeclaration,
15551            context: &mut computed::Context,
15552        ) {
15553            context.for_non_inherited_property = false;
15554            debug_assert_eq!(
15555                declaration.id().as_longhand().unwrap(),
15556                LonghandId::TextWrapMode,
15557            );
15558            let specified_value = match *declaration {
15559                PropertyDeclaration::CSSWideKeyword(ref wk) => {
15560                    match wk.keyword {
15561                        CSSWideKeyword::Initial => {
15562                                context.builder.reset_text_wrap_mode();
15563                        },
15564                        CSSWideKeyword::Unset |
15565                        CSSWideKeyword::Inherit => {
15566                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
15567                        }
15568                        CSSWideKeyword::RevertLayer |
15569                        CSSWideKeyword::Revert => {
15570                            declaration.debug_crash("Found revert/revert-layer not dealt with");
15571                        },
15572                    }
15573                    return;
15574                },
15575                #[cfg(debug_assertions)]
15576                PropertyDeclaration::WithVariables(..) => {
15577                    declaration.debug_crash("Found variables not substituted");
15578                    return;
15579                },
15580                _ => unsafe {
15581                    declaration.unchecked_value_as::<longhands::text_wrap_mode::SpecifiedValue>()
15582                },
15583            };
15584
15585
15586                let computed = specified_value.to_computed_value(context);
15587                context.builder.set_text_wrap_mode(computed)
15588        }
15589
15590        pub fn parse_declared<'i, 't>(
15591            context: &ParserContext,
15592            input: &mut Parser<'i, 't>,
15593        ) -> Result<PropertyDeclaration, ParseError<'i>> {
15594                parse(context, input)
15595                .map(PropertyDeclaration::TextWrapMode)
15596        }
15597    }
15598
15599
15600
15601// hyphenation length thresholds
15602
15603    
15604        
15605    
15606
15607
15608
15609    
15610
15611    
15612        
15613    
15614
15615
15616    
15617    /* This Source Code Form is subject to the terms of the Mozilla Public
15618 * License, v. 2.0. If a copy of the MPL was not distributed with this
15619 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
15620
15621
15622
15623
15624    
15625        
15626    
15627    /// https://drafts.csswg.org/css-ui/#cursor
15628    pub mod cursor {
15629        #[allow(unused_imports)]
15630        use cssparser::{Parser, BasicParseError, Token};
15631        #[allow(unused_imports)]
15632        use crate::parser::{Parse, ParserContext};
15633        #[allow(unused_imports)]
15634        use crate::properties::{UnparsedValue, ShorthandId};
15635        #[allow(unused_imports)]
15636        use crate::error_reporting::ParseErrorReporter;
15637        #[allow(unused_imports)]
15638        use crate::properties::longhands;
15639        #[allow(unused_imports)]
15640        use crate::properties::{LonghandId, LonghandIdSet};
15641        #[allow(unused_imports)]
15642        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
15643        #[allow(unused_imports)]
15644        use crate::properties::style_structs;
15645        #[allow(unused_imports)]
15646        use selectors::parser::SelectorParseErrorKind;
15647        #[allow(unused_imports)]
15648        use servo_arc::Arc;
15649        #[allow(unused_imports)]
15650        use style_traits::{ParseError, StyleParseErrorKind};
15651        #[allow(unused_imports)]
15652        use crate::values::computed::{Context, ToComputedValue};
15653        #[allow(unused_imports)]
15654        use crate::values::{computed, generics, specified};
15655        #[allow(unused_imports)]
15656        use crate::Atom;
15657        
15658            
15659        #[allow(unused_imports)]
15660        use app_units::Au;
15661        #[allow(unused_imports)]
15662        use crate::values::specified::AllowQuirks;
15663        #[allow(unused_imports)]
15664        use crate::Zero;
15665        #[allow(unused_imports)]
15666        use smallvec::SmallVec;
15667        pub use crate::values::specified::Cursor as SpecifiedValue;
15668        pub mod computed_value {
15669            pub use crate::values::computed::Cursor as T;
15670        }
15671        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Cursor::auto() }
15672        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::Cursor::auto() }
15673        #[allow(unused_variables)]
15674        #[inline]
15675        pub fn parse<'i, 't>(
15676            context: &ParserContext,
15677            input: &mut Parser<'i, 't>,
15678        ) -> Result<SpecifiedValue, ParseError<'i>> {
15679            <specified::Cursor as crate::parser::Parse>::parse(context, input)
15680        }
15681    
15682        
15683        #[allow(unused_variables)]
15684        pub unsafe fn cascade_property(
15685            declaration: &PropertyDeclaration,
15686            context: &mut computed::Context,
15687        ) {
15688            context.for_non_inherited_property = false;
15689            debug_assert_eq!(
15690                declaration.id().as_longhand().unwrap(),
15691                LonghandId::Cursor,
15692            );
15693            let specified_value = match *declaration {
15694                PropertyDeclaration::CSSWideKeyword(ref wk) => {
15695                    match wk.keyword {
15696                        CSSWideKeyword::Initial => {
15697                                context.builder.reset_cursor();
15698                        },
15699                        CSSWideKeyword::Unset |
15700                        CSSWideKeyword::Inherit => {
15701                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
15702                        }
15703                        CSSWideKeyword::RevertLayer |
15704                        CSSWideKeyword::Revert => {
15705                            declaration.debug_crash("Found revert/revert-layer not dealt with");
15706                        },
15707                    }
15708                    return;
15709                },
15710                #[cfg(debug_assertions)]
15711                PropertyDeclaration::WithVariables(..) => {
15712                    declaration.debug_crash("Found variables not substituted");
15713                    return;
15714                },
15715                _ => unsafe {
15716                    declaration.unchecked_value_as::<crate::values::specified::Cursor>()
15717                },
15718            };
15719
15720
15721                let computed = specified_value.to_computed_value(context);
15722                context.builder.set_cursor(computed)
15723        }
15724
15725        pub fn parse_declared<'i, 't>(
15726            context: &ParserContext,
15727            input: &mut Parser<'i, 't>,
15728        ) -> Result<PropertyDeclaration, ParseError<'i>> {
15729                parse(context, input)
15730                .map(PropertyDeclaration::Cursor)
15731        }
15732    }
15733
15734
15735
15736
15737    
15738        
15739    
15740    /// https://svgwg.org/svg2-draft/interact.html#PointerEventsProperty
15741    pub mod pointer_events {
15742        #[allow(unused_imports)]
15743        use cssparser::{Parser, BasicParseError, Token};
15744        #[allow(unused_imports)]
15745        use crate::parser::{Parse, ParserContext};
15746        #[allow(unused_imports)]
15747        use crate::properties::{UnparsedValue, ShorthandId};
15748        #[allow(unused_imports)]
15749        use crate::error_reporting::ParseErrorReporter;
15750        #[allow(unused_imports)]
15751        use crate::properties::longhands;
15752        #[allow(unused_imports)]
15753        use crate::properties::{LonghandId, LonghandIdSet};
15754        #[allow(unused_imports)]
15755        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
15756        #[allow(unused_imports)]
15757        use crate::properties::style_structs;
15758        #[allow(unused_imports)]
15759        use selectors::parser::SelectorParseErrorKind;
15760        #[allow(unused_imports)]
15761        use servo_arc::Arc;
15762        #[allow(unused_imports)]
15763        use style_traits::{ParseError, StyleParseErrorKind};
15764        #[allow(unused_imports)]
15765        use crate::values::computed::{Context, ToComputedValue};
15766        #[allow(unused_imports)]
15767        use crate::values::{computed, generics, specified};
15768        #[allow(unused_imports)]
15769        use crate::Atom;
15770        
15771            
15772        #[allow(unused_imports)]
15773        use app_units::Au;
15774        #[allow(unused_imports)]
15775        use crate::values::specified::AllowQuirks;
15776        #[allow(unused_imports)]
15777        use crate::Zero;
15778        #[allow(unused_imports)]
15779        use smallvec::SmallVec;
15780        pub use crate::values::specified::PointerEvents as SpecifiedValue;
15781        pub mod computed_value {
15782            pub use crate::values::computed::PointerEvents as T;
15783        }
15784        #[inline] pub fn get_initial_value() -> computed_value::T { specified::PointerEvents::Auto }
15785        #[allow(unused_variables)]
15786        #[inline]
15787        pub fn parse<'i, 't>(
15788            context: &ParserContext,
15789            input: &mut Parser<'i, 't>,
15790        ) -> Result<SpecifiedValue, ParseError<'i>> {
15791            <specified::PointerEvents as crate::parser::Parse>::parse(context, input)
15792        }
15793    
15794        
15795        #[allow(unused_variables)]
15796        pub unsafe fn cascade_property(
15797            declaration: &PropertyDeclaration,
15798            context: &mut computed::Context,
15799        ) {
15800            context.for_non_inherited_property = false;
15801            debug_assert_eq!(
15802                declaration.id().as_longhand().unwrap(),
15803                LonghandId::PointerEvents,
15804            );
15805            let specified_value = match *declaration {
15806                PropertyDeclaration::CSSWideKeyword(ref wk) => {
15807                    match wk.keyword {
15808                        CSSWideKeyword::Initial => {
15809                                context.builder.reset_pointer_events();
15810                        },
15811                        CSSWideKeyword::Unset |
15812                        CSSWideKeyword::Inherit => {
15813                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
15814                        }
15815                        CSSWideKeyword::RevertLayer |
15816                        CSSWideKeyword::Revert => {
15817                            declaration.debug_crash("Found revert/revert-layer not dealt with");
15818                        },
15819                    }
15820                    return;
15821                },
15822                #[cfg(debug_assertions)]
15823                PropertyDeclaration::WithVariables(..) => {
15824                    declaration.debug_crash("Found variables not substituted");
15825                    return;
15826                },
15827                _ => unsafe {
15828                    declaration.unchecked_value_as::<crate::values::specified::PointerEvents>()
15829                },
15830            };
15831
15832
15833                let computed = specified_value.to_computed_value(context);
15834                context.builder.set_pointer_events(computed)
15835        }
15836
15837        pub fn parse_declared<'i, 't>(
15838            context: &ParserContext,
15839            input: &mut Parser<'i, 't>,
15840        ) -> Result<PropertyDeclaration, ParseError<'i>> {
15841                parse(context, input)
15842                .map(PropertyDeclaration::PointerEvents)
15843        }
15844    }
15845
15846
15847
15848
15849    
15850        
15851    
15852
15853
15854
15855    
15856        
15857    
15858
15859
15860
15861    
15862        
15863    
15864
15865
15866
15867    
15868        
15869    
15870
15871
15872
15873    
15874        
15875    
15876
15877
15878
15879    
15880        
15881    
15882    /// https://drafts.csswg.org/css-color-adjust/#color-scheme-prop
15883    pub mod color_scheme {
15884        #[allow(unused_imports)]
15885        use cssparser::{Parser, BasicParseError, Token};
15886        #[allow(unused_imports)]
15887        use crate::parser::{Parse, ParserContext};
15888        #[allow(unused_imports)]
15889        use crate::properties::{UnparsedValue, ShorthandId};
15890        #[allow(unused_imports)]
15891        use crate::error_reporting::ParseErrorReporter;
15892        #[allow(unused_imports)]
15893        use crate::properties::longhands;
15894        #[allow(unused_imports)]
15895        use crate::properties::{LonghandId, LonghandIdSet};
15896        #[allow(unused_imports)]
15897        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
15898        #[allow(unused_imports)]
15899        use crate::properties::style_structs;
15900        #[allow(unused_imports)]
15901        use selectors::parser::SelectorParseErrorKind;
15902        #[allow(unused_imports)]
15903        use servo_arc::Arc;
15904        #[allow(unused_imports)]
15905        use style_traits::{ParseError, StyleParseErrorKind};
15906        #[allow(unused_imports)]
15907        use crate::values::computed::{Context, ToComputedValue};
15908        #[allow(unused_imports)]
15909        use crate::values::{computed, generics, specified};
15910        #[allow(unused_imports)]
15911        use crate::Atom;
15912        
15913            
15914        #[allow(unused_imports)]
15915        use app_units::Au;
15916        #[allow(unused_imports)]
15917        use crate::values::specified::AllowQuirks;
15918        #[allow(unused_imports)]
15919        use crate::Zero;
15920        #[allow(unused_imports)]
15921        use smallvec::SmallVec;
15922        pub use crate::values::specified::ColorScheme as SpecifiedValue;
15923        pub mod computed_value {
15924            pub use crate::values::computed::ColorScheme as T;
15925        }
15926        #[inline] pub fn get_initial_value() -> computed_value::T { specified::color::ColorScheme::normal() }
15927        #[allow(unused_variables)]
15928        #[inline]
15929        pub fn parse<'i, 't>(
15930            context: &ParserContext,
15931            input: &mut Parser<'i, 't>,
15932        ) -> Result<SpecifiedValue, ParseError<'i>> {
15933            <specified::ColorScheme as crate::parser::Parse>::parse(context, input)
15934        }
15935    
15936        
15937        #[allow(unused_variables)]
15938        pub unsafe fn cascade_property(
15939            declaration: &PropertyDeclaration,
15940            context: &mut computed::Context,
15941        ) {
15942            context.for_non_inherited_property = false;
15943            debug_assert_eq!(
15944                declaration.id().as_longhand().unwrap(),
15945                LonghandId::ColorScheme,
15946            );
15947            let specified_value = match *declaration {
15948                PropertyDeclaration::CSSWideKeyword(ref wk) => {
15949                    match wk.keyword {
15950                        CSSWideKeyword::Initial => {
15951                                context.builder.reset_color_scheme();
15952                        },
15953                        CSSWideKeyword::Unset |
15954                        CSSWideKeyword::Inherit => {
15955                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
15956                        }
15957                        CSSWideKeyword::RevertLayer |
15958                        CSSWideKeyword::Revert => {
15959                            declaration.debug_crash("Found revert/revert-layer not dealt with");
15960                        },
15961                    }
15962                    return;
15963                },
15964                #[cfg(debug_assertions)]
15965                PropertyDeclaration::WithVariables(..) => {
15966                    declaration.debug_crash("Found variables not substituted");
15967                    return;
15968                },
15969                _ => unsafe {
15970                    declaration.unchecked_value_as::<crate::values::specified::ColorScheme>()
15971                },
15972            };
15973
15974
15975                let computed = specified_value.to_computed_value(context);
15976                context.builder.set_color_scheme(computed)
15977        }
15978
15979        pub fn parse_declared<'i, 't>(
15980            context: &ParserContext,
15981            input: &mut Parser<'i, 't>,
15982        ) -> Result<PropertyDeclaration, ParseError<'i>> {
15983                parse(context, input)
15984                .map(PropertyDeclaration::ColorScheme)
15985        }
15986    }
15987
15988
15989
15990
15991    
15992        
15993    
15994
15995
15996
15997    
15998        
15999    
16000
16001
16002    
16003    /* This Source Code Form is subject to the terms of the Mozilla Public
16004 * License, v. 2.0. If a copy of the MPL was not distributed with this
16005 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
16006
16007
16008
16009
16010    
16011
16012    
16013        
16014    
16015    /// https://drafts.csswg.org/css-lists/#propdef-list-style-position
16016    pub mod list_style_position {
16017        #[allow(unused_imports)]
16018        use cssparser::{Parser, BasicParseError, Token};
16019        #[allow(unused_imports)]
16020        use crate::parser::{Parse, ParserContext};
16021        #[allow(unused_imports)]
16022        use crate::properties::{UnparsedValue, ShorthandId};
16023        #[allow(unused_imports)]
16024        use crate::error_reporting::ParseErrorReporter;
16025        #[allow(unused_imports)]
16026        use crate::properties::longhands;
16027        #[allow(unused_imports)]
16028        use crate::properties::{LonghandId, LonghandIdSet};
16029        #[allow(unused_imports)]
16030        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
16031        #[allow(unused_imports)]
16032        use crate::properties::style_structs;
16033        #[allow(unused_imports)]
16034        use selectors::parser::SelectorParseErrorKind;
16035        #[allow(unused_imports)]
16036        use servo_arc::Arc;
16037        #[allow(unused_imports)]
16038        use style_traits::{ParseError, StyleParseErrorKind};
16039        #[allow(unused_imports)]
16040        use crate::values::computed::{Context, ToComputedValue};
16041        #[allow(unused_imports)]
16042        use crate::values::{computed, generics, specified};
16043        #[allow(unused_imports)]
16044        use crate::Atom;
16045        
16046            
16047        pub use self::computed_value::T as SpecifiedValue;
16048        pub mod computed_value {
16049            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
16050            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
16051            pub enum T {
16052            
16053            Outside,
16054            
16055            Inside,
16056            }
16057        }
16058        #[inline]
16059        pub fn get_initial_value() -> computed_value::T {
16060            computed_value::T::Outside
16061        }
16062        #[inline]
16063        pub fn get_initial_specified_value() -> SpecifiedValue {
16064            SpecifiedValue::Outside
16065        }
16066        #[inline]
16067        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
16068                             -> Result<SpecifiedValue, ParseError<'i>> {
16069            SpecifiedValue::parse(input)
16070        }
16071
16072    
16073        
16074        #[allow(unused_variables)]
16075        pub unsafe fn cascade_property(
16076            declaration: &PropertyDeclaration,
16077            context: &mut computed::Context,
16078        ) {
16079            context.for_non_inherited_property = false;
16080            debug_assert_eq!(
16081                declaration.id().as_longhand().unwrap(),
16082                LonghandId::ListStylePosition,
16083            );
16084            let specified_value = match *declaration {
16085                PropertyDeclaration::CSSWideKeyword(ref wk) => {
16086                    match wk.keyword {
16087                        CSSWideKeyword::Initial => {
16088                                context.builder.reset_list_style_position();
16089                        },
16090                        CSSWideKeyword::Unset |
16091                        CSSWideKeyword::Inherit => {
16092                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
16093                        }
16094                        CSSWideKeyword::RevertLayer |
16095                        CSSWideKeyword::Revert => {
16096                            declaration.debug_crash("Found revert/revert-layer not dealt with");
16097                        },
16098                    }
16099                    return;
16100                },
16101                #[cfg(debug_assertions)]
16102                PropertyDeclaration::WithVariables(..) => {
16103                    declaration.debug_crash("Found variables not substituted");
16104                    return;
16105                },
16106                _ => unsafe {
16107                    declaration.unchecked_value_as::<longhands::list_style_position::SpecifiedValue>()
16108                },
16109            };
16110
16111
16112                let computed = specified_value.to_computed_value(context);
16113                context.builder.set_list_style_position(computed)
16114        }
16115
16116        pub fn parse_declared<'i, 't>(
16117            context: &ParserContext,
16118            input: &mut Parser<'i, 't>,
16119        ) -> Result<PropertyDeclaration, ParseError<'i>> {
16120                parse(context, input)
16121                .map(PropertyDeclaration::ListStylePosition)
16122        }
16123    }
16124
16125
16126
16127// TODO(pcwalton): Implement the full set of counter styles per CSS-COUNTER-STYLES [1] 6.1:
16128//
16129//     decimal-leading-zero, armenian, upper-armenian, lower-armenian, georgian, lower-roman,
16130//     upper-roman
16131//
16132// [1]: http://dev.w3.org/csswg/css-counter-styles/
16133    
16134    
16135
16136    
16137        
16138    
16139    /// https://drafts.csswg.org/css-lists/#propdef-list-style-type
16140    pub mod list_style_type {
16141        #[allow(unused_imports)]
16142        use cssparser::{Parser, BasicParseError, Token};
16143        #[allow(unused_imports)]
16144        use crate::parser::{Parse, ParserContext};
16145        #[allow(unused_imports)]
16146        use crate::properties::{UnparsedValue, ShorthandId};
16147        #[allow(unused_imports)]
16148        use crate::error_reporting::ParseErrorReporter;
16149        #[allow(unused_imports)]
16150        use crate::properties::longhands;
16151        #[allow(unused_imports)]
16152        use crate::properties::{LonghandId, LonghandIdSet};
16153        #[allow(unused_imports)]
16154        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
16155        #[allow(unused_imports)]
16156        use crate::properties::style_structs;
16157        #[allow(unused_imports)]
16158        use selectors::parser::SelectorParseErrorKind;
16159        #[allow(unused_imports)]
16160        use servo_arc::Arc;
16161        #[allow(unused_imports)]
16162        use style_traits::{ParseError, StyleParseErrorKind};
16163        #[allow(unused_imports)]
16164        use crate::values::computed::{Context, ToComputedValue};
16165        #[allow(unused_imports)]
16166        use crate::values::{computed, generics, specified};
16167        #[allow(unused_imports)]
16168        use crate::Atom;
16169        
16170            
16171        pub use self::computed_value::T as SpecifiedValue;
16172        pub mod computed_value {
16173            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
16174            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
16175            pub enum T {
16176            
16177            Disc,
16178            
16179            None,
16180            
16181            Circle,
16182            
16183            Square,
16184            
16185            DisclosureOpen,
16186            
16187            DisclosureClosed,
16188            
16189            Decimal,
16190            
16191            LowerAlpha,
16192            
16193            UpperAlpha,
16194            
16195            ArabicIndic,
16196            
16197            Bengali,
16198            
16199            Cambodian,
16200            
16201            CjkDecimal,
16202            
16203            Devanagari,
16204            
16205            Gujarati,
16206            
16207            Gurmukhi,
16208            
16209            Kannada,
16210            
16211            Khmer,
16212            
16213            Lao,
16214            
16215            Malayalam,
16216            
16217            Mongolian,
16218            
16219            Myanmar,
16220            
16221            Oriya,
16222            
16223            Persian,
16224            
16225            Telugu,
16226            
16227            Thai,
16228            
16229            Tibetan,
16230            
16231            CjkEarthlyBranch,
16232            
16233            CjkHeavenlyStem,
16234            
16235            LowerGreek,
16236            
16237            Hiragana,
16238            
16239            HiraganaIroha,
16240            
16241            Katakana,
16242            
16243            KatakanaIroha,
16244            }
16245        }
16246        #[inline]
16247        pub fn get_initial_value() -> computed_value::T {
16248            computed_value::T::Disc
16249        }
16250        #[inline]
16251        pub fn get_initial_specified_value() -> SpecifiedValue {
16252            SpecifiedValue::Disc
16253        }
16254        #[inline]
16255        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
16256                             -> Result<SpecifiedValue, ParseError<'i>> {
16257            SpecifiedValue::parse(input)
16258        }
16259
16260    
16261        
16262        #[allow(unused_variables)]
16263        pub unsafe fn cascade_property(
16264            declaration: &PropertyDeclaration,
16265            context: &mut computed::Context,
16266        ) {
16267            context.for_non_inherited_property = false;
16268            debug_assert_eq!(
16269                declaration.id().as_longhand().unwrap(),
16270                LonghandId::ListStyleType,
16271            );
16272            let specified_value = match *declaration {
16273                PropertyDeclaration::CSSWideKeyword(ref wk) => {
16274                    match wk.keyword {
16275                        CSSWideKeyword::Initial => {
16276                                context.builder.reset_list_style_type();
16277                        },
16278                        CSSWideKeyword::Unset |
16279                        CSSWideKeyword::Inherit => {
16280                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
16281                        }
16282                        CSSWideKeyword::RevertLayer |
16283                        CSSWideKeyword::Revert => {
16284                            declaration.debug_crash("Found revert/revert-layer not dealt with");
16285                        },
16286                    }
16287                    return;
16288                },
16289                #[cfg(debug_assertions)]
16290                PropertyDeclaration::WithVariables(..) => {
16291                    declaration.debug_crash("Found variables not substituted");
16292                    return;
16293                },
16294                _ => unsafe {
16295                    declaration.unchecked_value_as::<longhands::list_style_type::SpecifiedValue>()
16296                },
16297            };
16298
16299
16300                let computed = specified_value.to_computed_value(context);
16301                context.builder.set_list_style_type(computed)
16302        }
16303
16304        pub fn parse_declared<'i, 't>(
16305            context: &ParserContext,
16306            input: &mut Parser<'i, 't>,
16307        ) -> Result<PropertyDeclaration, ParseError<'i>> {
16308                parse(context, input)
16309                .map(PropertyDeclaration::ListStyleType)
16310        }
16311    }
16312
16313
16314
16315
16316    
16317        
16318    
16319    /// https://drafts.csswg.org/css-lists/#propdef-list-style-image
16320    pub mod list_style_image {
16321        #[allow(unused_imports)]
16322        use cssparser::{Parser, BasicParseError, Token};
16323        #[allow(unused_imports)]
16324        use crate::parser::{Parse, ParserContext};
16325        #[allow(unused_imports)]
16326        use crate::properties::{UnparsedValue, ShorthandId};
16327        #[allow(unused_imports)]
16328        use crate::error_reporting::ParseErrorReporter;
16329        #[allow(unused_imports)]
16330        use crate::properties::longhands;
16331        #[allow(unused_imports)]
16332        use crate::properties::{LonghandId, LonghandIdSet};
16333        #[allow(unused_imports)]
16334        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
16335        #[allow(unused_imports)]
16336        use crate::properties::style_structs;
16337        #[allow(unused_imports)]
16338        use selectors::parser::SelectorParseErrorKind;
16339        #[allow(unused_imports)]
16340        use servo_arc::Arc;
16341        #[allow(unused_imports)]
16342        use style_traits::{ParseError, StyleParseErrorKind};
16343        #[allow(unused_imports)]
16344        use crate::values::computed::{Context, ToComputedValue};
16345        #[allow(unused_imports)]
16346        use crate::values::{computed, generics, specified};
16347        #[allow(unused_imports)]
16348        use crate::Atom;
16349        
16350            
16351        #[allow(unused_imports)]
16352        use app_units::Au;
16353        #[allow(unused_imports)]
16354        use crate::values::specified::AllowQuirks;
16355        #[allow(unused_imports)]
16356        use crate::Zero;
16357        #[allow(unused_imports)]
16358        use smallvec::SmallVec;
16359        pub use crate::values::specified::Image as SpecifiedValue;
16360        pub mod computed_value {
16361            pub use crate::values::computed::Image as T;
16362        }
16363        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Image::None }
16364        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::Image::None }
16365        #[allow(unused_variables)]
16366        #[inline]
16367        pub fn parse<'i, 't>(
16368            context: &ParserContext,
16369            input: &mut Parser<'i, 't>,
16370        ) -> Result<SpecifiedValue, ParseError<'i>> {
16371            <specified::Image as crate::parser::Parse>::parse(context, input)
16372        }
16373    
16374        
16375        #[allow(unused_variables)]
16376        pub unsafe fn cascade_property(
16377            declaration: &PropertyDeclaration,
16378            context: &mut computed::Context,
16379        ) {
16380            context.for_non_inherited_property = false;
16381            debug_assert_eq!(
16382                declaration.id().as_longhand().unwrap(),
16383                LonghandId::ListStyleImage,
16384            );
16385            let specified_value = match *declaration {
16386                PropertyDeclaration::CSSWideKeyword(ref wk) => {
16387                    match wk.keyword {
16388                        CSSWideKeyword::Initial => {
16389                                context.builder.reset_list_style_image();
16390                        },
16391                        CSSWideKeyword::Unset |
16392                        CSSWideKeyword::Inherit => {
16393                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
16394                        }
16395                        CSSWideKeyword::RevertLayer |
16396                        CSSWideKeyword::Revert => {
16397                            declaration.debug_crash("Found revert/revert-layer not dealt with");
16398                        },
16399                    }
16400                    return;
16401                },
16402                #[cfg(debug_assertions)]
16403                PropertyDeclaration::WithVariables(..) => {
16404                    declaration.debug_crash("Found variables not substituted");
16405                    return;
16406                },
16407                _ => unsafe {
16408                    declaration.unchecked_value_as::<crate::values::specified::Image>()
16409                },
16410            };
16411
16412
16413                let computed = specified_value.to_computed_value(context);
16414                context.builder.set_list_style_image(computed)
16415        }
16416
16417        pub fn parse_declared<'i, 't>(
16418            context: &ParserContext,
16419            input: &mut Parser<'i, 't>,
16420        ) -> Result<PropertyDeclaration, ParseError<'i>> {
16421                parse(context, input)
16422                .map(PropertyDeclaration::ListStyleImage)
16423        }
16424    }
16425
16426
16427
16428
16429    
16430        
16431    
16432    /// https://drafts.csswg.org/css-content/#propdef-quotes
16433    pub mod quotes {
16434        #[allow(unused_imports)]
16435        use cssparser::{Parser, BasicParseError, Token};
16436        #[allow(unused_imports)]
16437        use crate::parser::{Parse, ParserContext};
16438        #[allow(unused_imports)]
16439        use crate::properties::{UnparsedValue, ShorthandId};
16440        #[allow(unused_imports)]
16441        use crate::error_reporting::ParseErrorReporter;
16442        #[allow(unused_imports)]
16443        use crate::properties::longhands;
16444        #[allow(unused_imports)]
16445        use crate::properties::{LonghandId, LonghandIdSet};
16446        #[allow(unused_imports)]
16447        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
16448        #[allow(unused_imports)]
16449        use crate::properties::style_structs;
16450        #[allow(unused_imports)]
16451        use selectors::parser::SelectorParseErrorKind;
16452        #[allow(unused_imports)]
16453        use servo_arc::Arc;
16454        #[allow(unused_imports)]
16455        use style_traits::{ParseError, StyleParseErrorKind};
16456        #[allow(unused_imports)]
16457        use crate::values::computed::{Context, ToComputedValue};
16458        #[allow(unused_imports)]
16459        use crate::values::{computed, generics, specified};
16460        #[allow(unused_imports)]
16461        use crate::Atom;
16462        
16463            
16464        #[allow(unused_imports)]
16465        use app_units::Au;
16466        #[allow(unused_imports)]
16467        use crate::values::specified::AllowQuirks;
16468        #[allow(unused_imports)]
16469        use crate::Zero;
16470        #[allow(unused_imports)]
16471        use smallvec::SmallVec;
16472        pub use crate::values::specified::Quotes as SpecifiedValue;
16473        pub mod computed_value {
16474            pub use crate::values::computed::Quotes as T;
16475        }
16476        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Quotes::get_initial_value() }
16477        #[allow(unused_variables)]
16478        #[inline]
16479        pub fn parse<'i, 't>(
16480            context: &ParserContext,
16481            input: &mut Parser<'i, 't>,
16482        ) -> Result<SpecifiedValue, ParseError<'i>> {
16483            <specified::Quotes as crate::parser::Parse>::parse(context, input)
16484        }
16485    
16486        
16487        #[allow(unused_variables)]
16488        pub unsafe fn cascade_property(
16489            declaration: &PropertyDeclaration,
16490            context: &mut computed::Context,
16491        ) {
16492            context.for_non_inherited_property = false;
16493            debug_assert_eq!(
16494                declaration.id().as_longhand().unwrap(),
16495                LonghandId::Quotes,
16496            );
16497            let specified_value = match *declaration {
16498                PropertyDeclaration::CSSWideKeyword(ref wk) => {
16499                    match wk.keyword {
16500                        CSSWideKeyword::Initial => {
16501                                context.builder.reset_quotes();
16502                        },
16503                        CSSWideKeyword::Unset |
16504                        CSSWideKeyword::Inherit => {
16505                                declaration.debug_crash("Unexpected inherit or unset for non-zoom-dependent inherited property");
16506                        }
16507                        CSSWideKeyword::RevertLayer |
16508                        CSSWideKeyword::Revert => {
16509                            declaration.debug_crash("Found revert/revert-layer not dealt with");
16510                        },
16511                    }
16512                    return;
16513                },
16514                #[cfg(debug_assertions)]
16515                PropertyDeclaration::WithVariables(..) => {
16516                    declaration.debug_crash("Found variables not substituted");
16517                    return;
16518                },
16519                _ => unsafe {
16520                    declaration.unchecked_value_as::<crate::values::specified::Quotes>()
16521                },
16522            };
16523
16524
16525                let computed = specified_value.to_computed_value(context);
16526                context.builder.set_quotes(computed)
16527        }
16528
16529        pub fn parse_declared<'i, 't>(
16530            context: &ParserContext,
16531            input: &mut Parser<'i, 't>,
16532        ) -> Result<PropertyDeclaration, ParseError<'i>> {
16533                parse(context, input)
16534                .map(PropertyDeclaration::Quotes)
16535        }
16536    }
16537
16538
16539
16540    
16541    /* This Source Code Form is subject to the terms of the Mozilla Public
16542 * License, v. 2.0. If a copy of the MPL was not distributed with this
16543 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
16544
16545
16546
16547
16548    
16549    
16550    
16551        
16552    
16553    /// https://drafts.csswg.org/css-box/#propdef-margin-top
16554    pub mod margin_top {
16555        #[allow(unused_imports)]
16556        use cssparser::{Parser, BasicParseError, Token};
16557        #[allow(unused_imports)]
16558        use crate::parser::{Parse, ParserContext};
16559        #[allow(unused_imports)]
16560        use crate::properties::{UnparsedValue, ShorthandId};
16561        #[allow(unused_imports)]
16562        use crate::error_reporting::ParseErrorReporter;
16563        #[allow(unused_imports)]
16564        use crate::properties::longhands;
16565        #[allow(unused_imports)]
16566        use crate::properties::{LonghandId, LonghandIdSet};
16567        #[allow(unused_imports)]
16568        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
16569        #[allow(unused_imports)]
16570        use crate::properties::style_structs;
16571        #[allow(unused_imports)]
16572        use selectors::parser::SelectorParseErrorKind;
16573        #[allow(unused_imports)]
16574        use servo_arc::Arc;
16575        #[allow(unused_imports)]
16576        use style_traits::{ParseError, StyleParseErrorKind};
16577        #[allow(unused_imports)]
16578        use crate::values::computed::{Context, ToComputedValue};
16579        #[allow(unused_imports)]
16580        use crate::values::{computed, generics, specified};
16581        #[allow(unused_imports)]
16582        use crate::Atom;
16583        
16584            
16585        #[allow(unused_imports)]
16586        use app_units::Au;
16587        #[allow(unused_imports)]
16588        use crate::values::specified::AllowQuirks;
16589        #[allow(unused_imports)]
16590        use crate::Zero;
16591        #[allow(unused_imports)]
16592        use smallvec::SmallVec;
16593        pub use crate::values::specified::Margin as SpecifiedValue;
16594        pub mod computed_value {
16595            pub use crate::values::computed::Margin as T;
16596        }
16597        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Margin::zero() }
16598        #[allow(unused_variables)]
16599        #[inline]
16600        pub fn parse<'i, 't>(
16601            context: &ParserContext,
16602            input: &mut Parser<'i, 't>,
16603        ) -> Result<SpecifiedValue, ParseError<'i>> {
16604            specified::Margin::parse_quirky(context, input, AllowQuirks::Yes)
16605        }
16606    
16607        
16608        #[allow(unused_variables)]
16609        pub unsafe fn cascade_property(
16610            declaration: &PropertyDeclaration,
16611            context: &mut computed::Context,
16612        ) {
16613            context.for_non_inherited_property = true;
16614            debug_assert_eq!(
16615                declaration.id().as_longhand().unwrap().logical_group(),
16616                LonghandId::MarginTop.logical_group(),
16617            );
16618            let specified_value = match *declaration {
16619                PropertyDeclaration::CSSWideKeyword(ref wk) => {
16620                    match wk.keyword {
16621                        CSSWideKeyword::Unset |
16622                        CSSWideKeyword::Initial => {
16623                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
16624                        },
16625                        CSSWideKeyword::Inherit => {
16626                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
16627                                context.builder.inherit_margin_top();
16628                        }
16629                        CSSWideKeyword::RevertLayer |
16630                        CSSWideKeyword::Revert => {
16631                            declaration.debug_crash("Found revert/revert-layer not dealt with");
16632                        },
16633                    }
16634                    return;
16635                },
16636                #[cfg(debug_assertions)]
16637                PropertyDeclaration::WithVariables(..) => {
16638                    declaration.debug_crash("Found variables not substituted");
16639                    return;
16640                },
16641                _ => unsafe {
16642                    declaration.unchecked_value_as::<crate::values::specified::Margin>()
16643                },
16644            };
16645
16646
16647                let computed = specified_value.to_computed_value(context);
16648                context.builder.set_margin_top(computed)
16649        }
16650
16651        pub fn parse_declared<'i, 't>(
16652            context: &ParserContext,
16653            input: &mut Parser<'i, 't>,
16654        ) -> Result<PropertyDeclaration, ParseError<'i>> {
16655                parse(context, input)
16656                .map(PropertyDeclaration::MarginTop)
16657        }
16658    }
16659
16660
16661    
16662    
16663    
16664        
16665    
16666    /// https://drafts.csswg.org/css-box/#propdef-margin-right
16667    pub mod margin_right {
16668        #[allow(unused_imports)]
16669        use cssparser::{Parser, BasicParseError, Token};
16670        #[allow(unused_imports)]
16671        use crate::parser::{Parse, ParserContext};
16672        #[allow(unused_imports)]
16673        use crate::properties::{UnparsedValue, ShorthandId};
16674        #[allow(unused_imports)]
16675        use crate::error_reporting::ParseErrorReporter;
16676        #[allow(unused_imports)]
16677        use crate::properties::longhands;
16678        #[allow(unused_imports)]
16679        use crate::properties::{LonghandId, LonghandIdSet};
16680        #[allow(unused_imports)]
16681        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
16682        #[allow(unused_imports)]
16683        use crate::properties::style_structs;
16684        #[allow(unused_imports)]
16685        use selectors::parser::SelectorParseErrorKind;
16686        #[allow(unused_imports)]
16687        use servo_arc::Arc;
16688        #[allow(unused_imports)]
16689        use style_traits::{ParseError, StyleParseErrorKind};
16690        #[allow(unused_imports)]
16691        use crate::values::computed::{Context, ToComputedValue};
16692        #[allow(unused_imports)]
16693        use crate::values::{computed, generics, specified};
16694        #[allow(unused_imports)]
16695        use crate::Atom;
16696        
16697            
16698        #[allow(unused_imports)]
16699        use app_units::Au;
16700        #[allow(unused_imports)]
16701        use crate::values::specified::AllowQuirks;
16702        #[allow(unused_imports)]
16703        use crate::Zero;
16704        #[allow(unused_imports)]
16705        use smallvec::SmallVec;
16706        pub use crate::values::specified::Margin as SpecifiedValue;
16707        pub mod computed_value {
16708            pub use crate::values::computed::Margin as T;
16709        }
16710        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Margin::zero() }
16711        #[allow(unused_variables)]
16712        #[inline]
16713        pub fn parse<'i, 't>(
16714            context: &ParserContext,
16715            input: &mut Parser<'i, 't>,
16716        ) -> Result<SpecifiedValue, ParseError<'i>> {
16717            specified::Margin::parse_quirky(context, input, AllowQuirks::Yes)
16718        }
16719    
16720        
16721        #[allow(unused_variables)]
16722        pub unsafe fn cascade_property(
16723            declaration: &PropertyDeclaration,
16724            context: &mut computed::Context,
16725        ) {
16726            context.for_non_inherited_property = true;
16727            debug_assert_eq!(
16728                declaration.id().as_longhand().unwrap().logical_group(),
16729                LonghandId::MarginRight.logical_group(),
16730            );
16731            let specified_value = match *declaration {
16732                PropertyDeclaration::CSSWideKeyword(ref wk) => {
16733                    match wk.keyword {
16734                        CSSWideKeyword::Unset |
16735                        CSSWideKeyword::Initial => {
16736                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
16737                        },
16738                        CSSWideKeyword::Inherit => {
16739                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
16740                                context.builder.inherit_margin_right();
16741                        }
16742                        CSSWideKeyword::RevertLayer |
16743                        CSSWideKeyword::Revert => {
16744                            declaration.debug_crash("Found revert/revert-layer not dealt with");
16745                        },
16746                    }
16747                    return;
16748                },
16749                #[cfg(debug_assertions)]
16750                PropertyDeclaration::WithVariables(..) => {
16751                    declaration.debug_crash("Found variables not substituted");
16752                    return;
16753                },
16754                _ => unsafe {
16755                    declaration.unchecked_value_as::<crate::values::specified::Margin>()
16756                },
16757            };
16758
16759
16760                let computed = specified_value.to_computed_value(context);
16761                context.builder.set_margin_right(computed)
16762        }
16763
16764        pub fn parse_declared<'i, 't>(
16765            context: &ParserContext,
16766            input: &mut Parser<'i, 't>,
16767        ) -> Result<PropertyDeclaration, ParseError<'i>> {
16768                parse(context, input)
16769                .map(PropertyDeclaration::MarginRight)
16770        }
16771    }
16772
16773
16774    
16775    
16776    
16777        
16778    
16779    /// https://drafts.csswg.org/css-box/#propdef-margin-bottom
16780    pub mod margin_bottom {
16781        #[allow(unused_imports)]
16782        use cssparser::{Parser, BasicParseError, Token};
16783        #[allow(unused_imports)]
16784        use crate::parser::{Parse, ParserContext};
16785        #[allow(unused_imports)]
16786        use crate::properties::{UnparsedValue, ShorthandId};
16787        #[allow(unused_imports)]
16788        use crate::error_reporting::ParseErrorReporter;
16789        #[allow(unused_imports)]
16790        use crate::properties::longhands;
16791        #[allow(unused_imports)]
16792        use crate::properties::{LonghandId, LonghandIdSet};
16793        #[allow(unused_imports)]
16794        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
16795        #[allow(unused_imports)]
16796        use crate::properties::style_structs;
16797        #[allow(unused_imports)]
16798        use selectors::parser::SelectorParseErrorKind;
16799        #[allow(unused_imports)]
16800        use servo_arc::Arc;
16801        #[allow(unused_imports)]
16802        use style_traits::{ParseError, StyleParseErrorKind};
16803        #[allow(unused_imports)]
16804        use crate::values::computed::{Context, ToComputedValue};
16805        #[allow(unused_imports)]
16806        use crate::values::{computed, generics, specified};
16807        #[allow(unused_imports)]
16808        use crate::Atom;
16809        
16810            
16811        #[allow(unused_imports)]
16812        use app_units::Au;
16813        #[allow(unused_imports)]
16814        use crate::values::specified::AllowQuirks;
16815        #[allow(unused_imports)]
16816        use crate::Zero;
16817        #[allow(unused_imports)]
16818        use smallvec::SmallVec;
16819        pub use crate::values::specified::Margin as SpecifiedValue;
16820        pub mod computed_value {
16821            pub use crate::values::computed::Margin as T;
16822        }
16823        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Margin::zero() }
16824        #[allow(unused_variables)]
16825        #[inline]
16826        pub fn parse<'i, 't>(
16827            context: &ParserContext,
16828            input: &mut Parser<'i, 't>,
16829        ) -> Result<SpecifiedValue, ParseError<'i>> {
16830            specified::Margin::parse_quirky(context, input, AllowQuirks::Yes)
16831        }
16832    
16833        
16834        #[allow(unused_variables)]
16835        pub unsafe fn cascade_property(
16836            declaration: &PropertyDeclaration,
16837            context: &mut computed::Context,
16838        ) {
16839            context.for_non_inherited_property = true;
16840            debug_assert_eq!(
16841                declaration.id().as_longhand().unwrap().logical_group(),
16842                LonghandId::MarginBottom.logical_group(),
16843            );
16844            let specified_value = match *declaration {
16845                PropertyDeclaration::CSSWideKeyword(ref wk) => {
16846                    match wk.keyword {
16847                        CSSWideKeyword::Unset |
16848                        CSSWideKeyword::Initial => {
16849                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
16850                        },
16851                        CSSWideKeyword::Inherit => {
16852                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
16853                                context.builder.inherit_margin_bottom();
16854                        }
16855                        CSSWideKeyword::RevertLayer |
16856                        CSSWideKeyword::Revert => {
16857                            declaration.debug_crash("Found revert/revert-layer not dealt with");
16858                        },
16859                    }
16860                    return;
16861                },
16862                #[cfg(debug_assertions)]
16863                PropertyDeclaration::WithVariables(..) => {
16864                    declaration.debug_crash("Found variables not substituted");
16865                    return;
16866                },
16867                _ => unsafe {
16868                    declaration.unchecked_value_as::<crate::values::specified::Margin>()
16869                },
16870            };
16871
16872
16873                let computed = specified_value.to_computed_value(context);
16874                context.builder.set_margin_bottom(computed)
16875        }
16876
16877        pub fn parse_declared<'i, 't>(
16878            context: &ParserContext,
16879            input: &mut Parser<'i, 't>,
16880        ) -> Result<PropertyDeclaration, ParseError<'i>> {
16881                parse(context, input)
16882                .map(PropertyDeclaration::MarginBottom)
16883        }
16884    }
16885
16886
16887    
16888    
16889    
16890        
16891    
16892    /// https://drafts.csswg.org/css-box/#propdef-margin-left
16893    pub mod margin_left {
16894        #[allow(unused_imports)]
16895        use cssparser::{Parser, BasicParseError, Token};
16896        #[allow(unused_imports)]
16897        use crate::parser::{Parse, ParserContext};
16898        #[allow(unused_imports)]
16899        use crate::properties::{UnparsedValue, ShorthandId};
16900        #[allow(unused_imports)]
16901        use crate::error_reporting::ParseErrorReporter;
16902        #[allow(unused_imports)]
16903        use crate::properties::longhands;
16904        #[allow(unused_imports)]
16905        use crate::properties::{LonghandId, LonghandIdSet};
16906        #[allow(unused_imports)]
16907        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
16908        #[allow(unused_imports)]
16909        use crate::properties::style_structs;
16910        #[allow(unused_imports)]
16911        use selectors::parser::SelectorParseErrorKind;
16912        #[allow(unused_imports)]
16913        use servo_arc::Arc;
16914        #[allow(unused_imports)]
16915        use style_traits::{ParseError, StyleParseErrorKind};
16916        #[allow(unused_imports)]
16917        use crate::values::computed::{Context, ToComputedValue};
16918        #[allow(unused_imports)]
16919        use crate::values::{computed, generics, specified};
16920        #[allow(unused_imports)]
16921        use crate::Atom;
16922        
16923            
16924        #[allow(unused_imports)]
16925        use app_units::Au;
16926        #[allow(unused_imports)]
16927        use crate::values::specified::AllowQuirks;
16928        #[allow(unused_imports)]
16929        use crate::Zero;
16930        #[allow(unused_imports)]
16931        use smallvec::SmallVec;
16932        pub use crate::values::specified::Margin as SpecifiedValue;
16933        pub mod computed_value {
16934            pub use crate::values::computed::Margin as T;
16935        }
16936        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Margin::zero() }
16937        #[allow(unused_variables)]
16938        #[inline]
16939        pub fn parse<'i, 't>(
16940            context: &ParserContext,
16941            input: &mut Parser<'i, 't>,
16942        ) -> Result<SpecifiedValue, ParseError<'i>> {
16943            specified::Margin::parse_quirky(context, input, AllowQuirks::Yes)
16944        }
16945    
16946        
16947        #[allow(unused_variables)]
16948        pub unsafe fn cascade_property(
16949            declaration: &PropertyDeclaration,
16950            context: &mut computed::Context,
16951        ) {
16952            context.for_non_inherited_property = true;
16953            debug_assert_eq!(
16954                declaration.id().as_longhand().unwrap().logical_group(),
16955                LonghandId::MarginLeft.logical_group(),
16956            );
16957            let specified_value = match *declaration {
16958                PropertyDeclaration::CSSWideKeyword(ref wk) => {
16959                    match wk.keyword {
16960                        CSSWideKeyword::Unset |
16961                        CSSWideKeyword::Initial => {
16962                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
16963                        },
16964                        CSSWideKeyword::Inherit => {
16965                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
16966                                context.builder.inherit_margin_left();
16967                        }
16968                        CSSWideKeyword::RevertLayer |
16969                        CSSWideKeyword::Revert => {
16970                            declaration.debug_crash("Found revert/revert-layer not dealt with");
16971                        },
16972                    }
16973                    return;
16974                },
16975                #[cfg(debug_assertions)]
16976                PropertyDeclaration::WithVariables(..) => {
16977                    declaration.debug_crash("Found variables not substituted");
16978                    return;
16979                },
16980                _ => unsafe {
16981                    declaration.unchecked_value_as::<crate::values::specified::Margin>()
16982                },
16983            };
16984
16985
16986                let computed = specified_value.to_computed_value(context);
16987                context.builder.set_margin_left(computed)
16988        }
16989
16990        pub fn parse_declared<'i, 't>(
16991            context: &ParserContext,
16992            input: &mut Parser<'i, 't>,
16993        ) -> Result<PropertyDeclaration, ParseError<'i>> {
16994                parse(context, input)
16995                .map(PropertyDeclaration::MarginLeft)
16996        }
16997    }
16998
16999
17000    
17001    
17002    
17003        
17004    
17005    /// https://drafts.csswg.org/css-logical-props/#propdef-margin-True
17006    pub mod margin_block_start {
17007        #[allow(unused_imports)]
17008        use cssparser::{Parser, BasicParseError, Token};
17009        #[allow(unused_imports)]
17010        use crate::parser::{Parse, ParserContext};
17011        #[allow(unused_imports)]
17012        use crate::properties::{UnparsedValue, ShorthandId};
17013        #[allow(unused_imports)]
17014        use crate::error_reporting::ParseErrorReporter;
17015        #[allow(unused_imports)]
17016        use crate::properties::longhands;
17017        #[allow(unused_imports)]
17018        use crate::properties::{LonghandId, LonghandIdSet};
17019        #[allow(unused_imports)]
17020        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
17021        #[allow(unused_imports)]
17022        use crate::properties::style_structs;
17023        #[allow(unused_imports)]
17024        use selectors::parser::SelectorParseErrorKind;
17025        #[allow(unused_imports)]
17026        use servo_arc::Arc;
17027        #[allow(unused_imports)]
17028        use style_traits::{ParseError, StyleParseErrorKind};
17029        #[allow(unused_imports)]
17030        use crate::values::computed::{Context, ToComputedValue};
17031        #[allow(unused_imports)]
17032        use crate::values::{computed, generics, specified};
17033        #[allow(unused_imports)]
17034        use crate::Atom;
17035        
17036            
17037        #[allow(unused_imports)]
17038        use app_units::Au;
17039        #[allow(unused_imports)]
17040        use crate::values::specified::AllowQuirks;
17041        #[allow(unused_imports)]
17042        use crate::Zero;
17043        #[allow(unused_imports)]
17044        use smallvec::SmallVec;
17045        pub use crate::values::specified::Margin as SpecifiedValue;
17046        pub mod computed_value {
17047            pub use crate::values::computed::Margin as T;
17048        }
17049        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Margin::zero() }
17050        #[allow(unused_variables)]
17051        #[inline]
17052        pub fn parse<'i, 't>(
17053            context: &ParserContext,
17054            input: &mut Parser<'i, 't>,
17055        ) -> Result<SpecifiedValue, ParseError<'i>> {
17056            <specified::Margin as crate::parser::Parse>::parse(context, input)
17057        }
17058    
17059        
17060        #[allow(unused_variables)]
17061        pub unsafe fn cascade_property(
17062            declaration: &PropertyDeclaration,
17063            context: &mut computed::Context,
17064        ) {
17065            declaration.debug_crash("Should physicalize before entering here");
17066        }
17067
17068        pub fn parse_declared<'i, 't>(
17069            context: &ParserContext,
17070            input: &mut Parser<'i, 't>,
17071        ) -> Result<PropertyDeclaration, ParseError<'i>> {
17072                parse(context, input)
17073                .map(PropertyDeclaration::MarginBlockStart)
17074        }
17075    }
17076
17077
17078    
17079    
17080    
17081        
17082    
17083    /// https://drafts.csswg.org/css-logical-props/#propdef-margin-True
17084    pub mod margin_block_end {
17085        #[allow(unused_imports)]
17086        use cssparser::{Parser, BasicParseError, Token};
17087        #[allow(unused_imports)]
17088        use crate::parser::{Parse, ParserContext};
17089        #[allow(unused_imports)]
17090        use crate::properties::{UnparsedValue, ShorthandId};
17091        #[allow(unused_imports)]
17092        use crate::error_reporting::ParseErrorReporter;
17093        #[allow(unused_imports)]
17094        use crate::properties::longhands;
17095        #[allow(unused_imports)]
17096        use crate::properties::{LonghandId, LonghandIdSet};
17097        #[allow(unused_imports)]
17098        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
17099        #[allow(unused_imports)]
17100        use crate::properties::style_structs;
17101        #[allow(unused_imports)]
17102        use selectors::parser::SelectorParseErrorKind;
17103        #[allow(unused_imports)]
17104        use servo_arc::Arc;
17105        #[allow(unused_imports)]
17106        use style_traits::{ParseError, StyleParseErrorKind};
17107        #[allow(unused_imports)]
17108        use crate::values::computed::{Context, ToComputedValue};
17109        #[allow(unused_imports)]
17110        use crate::values::{computed, generics, specified};
17111        #[allow(unused_imports)]
17112        use crate::Atom;
17113        
17114            
17115        #[allow(unused_imports)]
17116        use app_units::Au;
17117        #[allow(unused_imports)]
17118        use crate::values::specified::AllowQuirks;
17119        #[allow(unused_imports)]
17120        use crate::Zero;
17121        #[allow(unused_imports)]
17122        use smallvec::SmallVec;
17123        pub use crate::values::specified::Margin as SpecifiedValue;
17124        pub mod computed_value {
17125            pub use crate::values::computed::Margin as T;
17126        }
17127        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Margin::zero() }
17128        #[allow(unused_variables)]
17129        #[inline]
17130        pub fn parse<'i, 't>(
17131            context: &ParserContext,
17132            input: &mut Parser<'i, 't>,
17133        ) -> Result<SpecifiedValue, ParseError<'i>> {
17134            <specified::Margin as crate::parser::Parse>::parse(context, input)
17135        }
17136    
17137        
17138        #[allow(unused_variables)]
17139        pub unsafe fn cascade_property(
17140            declaration: &PropertyDeclaration,
17141            context: &mut computed::Context,
17142        ) {
17143            declaration.debug_crash("Should physicalize before entering here");
17144        }
17145
17146        pub fn parse_declared<'i, 't>(
17147            context: &ParserContext,
17148            input: &mut Parser<'i, 't>,
17149        ) -> Result<PropertyDeclaration, ParseError<'i>> {
17150                parse(context, input)
17151                .map(PropertyDeclaration::MarginBlockEnd)
17152        }
17153    }
17154
17155
17156    
17157    
17158    
17159        
17160    
17161    /// https://drafts.csswg.org/css-logical-props/#propdef-margin-True
17162    pub mod margin_inline_start {
17163        #[allow(unused_imports)]
17164        use cssparser::{Parser, BasicParseError, Token};
17165        #[allow(unused_imports)]
17166        use crate::parser::{Parse, ParserContext};
17167        #[allow(unused_imports)]
17168        use crate::properties::{UnparsedValue, ShorthandId};
17169        #[allow(unused_imports)]
17170        use crate::error_reporting::ParseErrorReporter;
17171        #[allow(unused_imports)]
17172        use crate::properties::longhands;
17173        #[allow(unused_imports)]
17174        use crate::properties::{LonghandId, LonghandIdSet};
17175        #[allow(unused_imports)]
17176        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
17177        #[allow(unused_imports)]
17178        use crate::properties::style_structs;
17179        #[allow(unused_imports)]
17180        use selectors::parser::SelectorParseErrorKind;
17181        #[allow(unused_imports)]
17182        use servo_arc::Arc;
17183        #[allow(unused_imports)]
17184        use style_traits::{ParseError, StyleParseErrorKind};
17185        #[allow(unused_imports)]
17186        use crate::values::computed::{Context, ToComputedValue};
17187        #[allow(unused_imports)]
17188        use crate::values::{computed, generics, specified};
17189        #[allow(unused_imports)]
17190        use crate::Atom;
17191        
17192            
17193        #[allow(unused_imports)]
17194        use app_units::Au;
17195        #[allow(unused_imports)]
17196        use crate::values::specified::AllowQuirks;
17197        #[allow(unused_imports)]
17198        use crate::Zero;
17199        #[allow(unused_imports)]
17200        use smallvec::SmallVec;
17201        pub use crate::values::specified::Margin as SpecifiedValue;
17202        pub mod computed_value {
17203            pub use crate::values::computed::Margin as T;
17204        }
17205        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Margin::zero() }
17206        #[allow(unused_variables)]
17207        #[inline]
17208        pub fn parse<'i, 't>(
17209            context: &ParserContext,
17210            input: &mut Parser<'i, 't>,
17211        ) -> Result<SpecifiedValue, ParseError<'i>> {
17212            <specified::Margin as crate::parser::Parse>::parse(context, input)
17213        }
17214    
17215        
17216        #[allow(unused_variables)]
17217        pub unsafe fn cascade_property(
17218            declaration: &PropertyDeclaration,
17219            context: &mut computed::Context,
17220        ) {
17221            declaration.debug_crash("Should physicalize before entering here");
17222        }
17223
17224        pub fn parse_declared<'i, 't>(
17225            context: &ParserContext,
17226            input: &mut Parser<'i, 't>,
17227        ) -> Result<PropertyDeclaration, ParseError<'i>> {
17228                parse(context, input)
17229                .map(PropertyDeclaration::MarginInlineStart)
17230        }
17231    }
17232
17233
17234    
17235    
17236    
17237        
17238    
17239    /// https://drafts.csswg.org/css-logical-props/#propdef-margin-True
17240    pub mod margin_inline_end {
17241        #[allow(unused_imports)]
17242        use cssparser::{Parser, BasicParseError, Token};
17243        #[allow(unused_imports)]
17244        use crate::parser::{Parse, ParserContext};
17245        #[allow(unused_imports)]
17246        use crate::properties::{UnparsedValue, ShorthandId};
17247        #[allow(unused_imports)]
17248        use crate::error_reporting::ParseErrorReporter;
17249        #[allow(unused_imports)]
17250        use crate::properties::longhands;
17251        #[allow(unused_imports)]
17252        use crate::properties::{LonghandId, LonghandIdSet};
17253        #[allow(unused_imports)]
17254        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
17255        #[allow(unused_imports)]
17256        use crate::properties::style_structs;
17257        #[allow(unused_imports)]
17258        use selectors::parser::SelectorParseErrorKind;
17259        #[allow(unused_imports)]
17260        use servo_arc::Arc;
17261        #[allow(unused_imports)]
17262        use style_traits::{ParseError, StyleParseErrorKind};
17263        #[allow(unused_imports)]
17264        use crate::values::computed::{Context, ToComputedValue};
17265        #[allow(unused_imports)]
17266        use crate::values::{computed, generics, specified};
17267        #[allow(unused_imports)]
17268        use crate::Atom;
17269        
17270            
17271        #[allow(unused_imports)]
17272        use app_units::Au;
17273        #[allow(unused_imports)]
17274        use crate::values::specified::AllowQuirks;
17275        #[allow(unused_imports)]
17276        use crate::Zero;
17277        #[allow(unused_imports)]
17278        use smallvec::SmallVec;
17279        pub use crate::values::specified::Margin as SpecifiedValue;
17280        pub mod computed_value {
17281            pub use crate::values::computed::Margin as T;
17282        }
17283        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Margin::zero() }
17284        #[allow(unused_variables)]
17285        #[inline]
17286        pub fn parse<'i, 't>(
17287            context: &ParserContext,
17288            input: &mut Parser<'i, 't>,
17289        ) -> Result<SpecifiedValue, ParseError<'i>> {
17290            <specified::Margin as crate::parser::Parse>::parse(context, input)
17291        }
17292    
17293        
17294        #[allow(unused_variables)]
17295        pub unsafe fn cascade_property(
17296            declaration: &PropertyDeclaration,
17297            context: &mut computed::Context,
17298        ) {
17299            declaration.debug_crash("Should physicalize before entering here");
17300        }
17301
17302        pub fn parse_declared<'i, 't>(
17303            context: &ParserContext,
17304            input: &mut Parser<'i, 't>,
17305        ) -> Result<PropertyDeclaration, ParseError<'i>> {
17306                parse(context, input)
17307                .map(PropertyDeclaration::MarginInlineEnd)
17308        }
17309    }
17310
17311
17312
17313
17314    
17315        
17316    
17317    /// https://drafts.csswg.org/css-overflow/#propdef-overflow-clip-margin
17318    pub mod overflow_clip_margin {
17319        #[allow(unused_imports)]
17320        use cssparser::{Parser, BasicParseError, Token};
17321        #[allow(unused_imports)]
17322        use crate::parser::{Parse, ParserContext};
17323        #[allow(unused_imports)]
17324        use crate::properties::{UnparsedValue, ShorthandId};
17325        #[allow(unused_imports)]
17326        use crate::error_reporting::ParseErrorReporter;
17327        #[allow(unused_imports)]
17328        use crate::properties::longhands;
17329        #[allow(unused_imports)]
17330        use crate::properties::{LonghandId, LonghandIdSet};
17331        #[allow(unused_imports)]
17332        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
17333        #[allow(unused_imports)]
17334        use crate::properties::style_structs;
17335        #[allow(unused_imports)]
17336        use selectors::parser::SelectorParseErrorKind;
17337        #[allow(unused_imports)]
17338        use servo_arc::Arc;
17339        #[allow(unused_imports)]
17340        use style_traits::{ParseError, StyleParseErrorKind};
17341        #[allow(unused_imports)]
17342        use crate::values::computed::{Context, ToComputedValue};
17343        #[allow(unused_imports)]
17344        use crate::values::{computed, generics, specified};
17345        #[allow(unused_imports)]
17346        use crate::Atom;
17347        
17348            
17349        #[allow(unused_imports)]
17350        use app_units::Au;
17351        #[allow(unused_imports)]
17352        use crate::values::specified::AllowQuirks;
17353        #[allow(unused_imports)]
17354        use crate::Zero;
17355        #[allow(unused_imports)]
17356        use smallvec::SmallVec;
17357        pub use crate::values::specified::Length as SpecifiedValue;
17358        pub mod computed_value {
17359            pub use crate::values::computed::Length as T;
17360        }
17361        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Length::zero() }
17362        #[allow(unused_variables)]
17363        #[inline]
17364        pub fn parse<'i, 't>(
17365            context: &ParserContext,
17366            input: &mut Parser<'i, 't>,
17367        ) -> Result<SpecifiedValue, ParseError<'i>> {
17368            specified::Length::parse_non_negative(context, input)
17369        }
17370    
17371        
17372        #[allow(unused_variables)]
17373        pub unsafe fn cascade_property(
17374            declaration: &PropertyDeclaration,
17375            context: &mut computed::Context,
17376        ) {
17377            context.for_non_inherited_property = true;
17378            debug_assert_eq!(
17379                declaration.id().as_longhand().unwrap(),
17380                LonghandId::OverflowClipMargin,
17381            );
17382            let specified_value = match *declaration {
17383                PropertyDeclaration::CSSWideKeyword(ref wk) => {
17384                    match wk.keyword {
17385                        CSSWideKeyword::Unset |
17386                        CSSWideKeyword::Initial => {
17387                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
17388                        },
17389                        CSSWideKeyword::Inherit => {
17390                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
17391                                if !context.builder.effective_zoom_for_inheritance.is_one() {
17392                                    let old_zoom = context.builder.effective_zoom;
17393                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
17394                                    let computed = context.builder.inherited_style.clone_overflow_clip_margin();
17395                                    let specified = ToComputedValue::from_computed_value(&computed);
17396                                    let decl = PropertyDeclaration::OverflowClipMargin(specified);
17397                                    cascade_property(&decl, context);
17398                                    context.builder.effective_zoom = old_zoom;
17399                                    return;
17400                                }
17401                                context.builder.inherit_overflow_clip_margin();
17402                        }
17403                        CSSWideKeyword::RevertLayer |
17404                        CSSWideKeyword::Revert => {
17405                            declaration.debug_crash("Found revert/revert-layer not dealt with");
17406                        },
17407                    }
17408                    return;
17409                },
17410                #[cfg(debug_assertions)]
17411                PropertyDeclaration::WithVariables(..) => {
17412                    declaration.debug_crash("Found variables not substituted");
17413                    return;
17414                },
17415                _ => unsafe {
17416                    declaration.unchecked_value_as::<crate::values::specified::Length>()
17417                },
17418            };
17419
17420
17421                let computed = specified_value.to_computed_value(context);
17422                context.builder.set_overflow_clip_margin(computed)
17423        }
17424
17425        pub fn parse_declared<'i, 't>(
17426            context: &ParserContext,
17427            input: &mut Parser<'i, 't>,
17428        ) -> Result<PropertyDeclaration, ParseError<'i>> {
17429                parse(context, input)
17430                .map(PropertyDeclaration::OverflowClipMargin)
17431        }
17432    }
17433
17434
17435
17436    
17437    
17438        
17439    
17440
17441    
17442    
17443        
17444    
17445
17446    
17447    
17448        
17449    
17450
17451    
17452    
17453        
17454    
17455
17456    
17457    
17458        
17459    
17460
17461    
17462    
17463        
17464    
17465
17466    
17467    
17468        
17469    
17470
17471    
17472    
17473        
17474    
17475
17476
17477    
17478    /* This Source Code Form is subject to the terms of the Mozilla Public
17479 * License, v. 2.0. If a copy of the MPL was not distributed with this
17480 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
17481
17482
17483
17484
17485    
17486        
17487    
17488    /// https://drafts.csswg.org/css-ui/#propdef-outline-color
17489    pub mod outline_color {
17490        #[allow(unused_imports)]
17491        use cssparser::{Parser, BasicParseError, Token};
17492        #[allow(unused_imports)]
17493        use crate::parser::{Parse, ParserContext};
17494        #[allow(unused_imports)]
17495        use crate::properties::{UnparsedValue, ShorthandId};
17496        #[allow(unused_imports)]
17497        use crate::error_reporting::ParseErrorReporter;
17498        #[allow(unused_imports)]
17499        use crate::properties::longhands;
17500        #[allow(unused_imports)]
17501        use crate::properties::{LonghandId, LonghandIdSet};
17502        #[allow(unused_imports)]
17503        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
17504        #[allow(unused_imports)]
17505        use crate::properties::style_structs;
17506        #[allow(unused_imports)]
17507        use selectors::parser::SelectorParseErrorKind;
17508        #[allow(unused_imports)]
17509        use servo_arc::Arc;
17510        #[allow(unused_imports)]
17511        use style_traits::{ParseError, StyleParseErrorKind};
17512        #[allow(unused_imports)]
17513        use crate::values::computed::{Context, ToComputedValue};
17514        #[allow(unused_imports)]
17515        use crate::values::{computed, generics, specified};
17516        #[allow(unused_imports)]
17517        use crate::Atom;
17518        
17519            
17520        #[allow(unused_imports)]
17521        use app_units::Au;
17522        #[allow(unused_imports)]
17523        use crate::values::specified::AllowQuirks;
17524        #[allow(unused_imports)]
17525        use crate::Zero;
17526        #[allow(unused_imports)]
17527        use smallvec::SmallVec;
17528        pub use crate::values::specified::Color as SpecifiedValue;
17529        pub mod computed_value {
17530            pub use crate::values::computed::Color as T;
17531        }
17532        #[inline] pub fn get_initial_value() -> computed_value::T { computed_value::T::currentcolor() }
17533        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::Color::currentcolor() }
17534        #[allow(unused_variables)]
17535        #[inline]
17536        pub fn parse<'i, 't>(
17537            context: &ParserContext,
17538            input: &mut Parser<'i, 't>,
17539        ) -> Result<SpecifiedValue, ParseError<'i>> {
17540            <specified::Color as crate::parser::Parse>::parse(context, input)
17541        }
17542    
17543        
17544        #[allow(unused_variables)]
17545        pub unsafe fn cascade_property(
17546            declaration: &PropertyDeclaration,
17547            context: &mut computed::Context,
17548        ) {
17549            context.for_non_inherited_property = true;
17550            debug_assert_eq!(
17551                declaration.id().as_longhand().unwrap(),
17552                LonghandId::OutlineColor,
17553            );
17554            let specified_value = match *declaration {
17555                PropertyDeclaration::CSSWideKeyword(ref wk) => {
17556                    match wk.keyword {
17557                        CSSWideKeyword::Unset |
17558                        CSSWideKeyword::Initial => {
17559                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
17560                        },
17561                        CSSWideKeyword::Inherit => {
17562                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
17563                                context.builder.inherit_outline_color();
17564                        }
17565                        CSSWideKeyword::RevertLayer |
17566                        CSSWideKeyword::Revert => {
17567                            declaration.debug_crash("Found revert/revert-layer not dealt with");
17568                        },
17569                    }
17570                    return;
17571                },
17572                #[cfg(debug_assertions)]
17573                PropertyDeclaration::WithVariables(..) => {
17574                    declaration.debug_crash("Found variables not substituted");
17575                    return;
17576                },
17577                _ => unsafe {
17578                    declaration.unchecked_value_as::<crate::values::specified::Color>()
17579                },
17580            };
17581
17582
17583                let computed = specified_value.to_computed_value(context);
17584                context.builder.set_outline_color(computed)
17585        }
17586
17587        pub fn parse_declared<'i, 't>(
17588            context: &ParserContext,
17589            input: &mut Parser<'i, 't>,
17590        ) -> Result<PropertyDeclaration, ParseError<'i>> {
17591                parse(context, input)
17592                .map(PropertyDeclaration::OutlineColor)
17593        }
17594    }
17595
17596
17597
17598
17599    
17600        
17601    
17602    /// https://drafts.csswg.org/css-ui/#propdef-outline-style
17603    pub mod outline_style {
17604        #[allow(unused_imports)]
17605        use cssparser::{Parser, BasicParseError, Token};
17606        #[allow(unused_imports)]
17607        use crate::parser::{Parse, ParserContext};
17608        #[allow(unused_imports)]
17609        use crate::properties::{UnparsedValue, ShorthandId};
17610        #[allow(unused_imports)]
17611        use crate::error_reporting::ParseErrorReporter;
17612        #[allow(unused_imports)]
17613        use crate::properties::longhands;
17614        #[allow(unused_imports)]
17615        use crate::properties::{LonghandId, LonghandIdSet};
17616        #[allow(unused_imports)]
17617        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
17618        #[allow(unused_imports)]
17619        use crate::properties::style_structs;
17620        #[allow(unused_imports)]
17621        use selectors::parser::SelectorParseErrorKind;
17622        #[allow(unused_imports)]
17623        use servo_arc::Arc;
17624        #[allow(unused_imports)]
17625        use style_traits::{ParseError, StyleParseErrorKind};
17626        #[allow(unused_imports)]
17627        use crate::values::computed::{Context, ToComputedValue};
17628        #[allow(unused_imports)]
17629        use crate::values::{computed, generics, specified};
17630        #[allow(unused_imports)]
17631        use crate::Atom;
17632        
17633            
17634        #[allow(unused_imports)]
17635        use app_units::Au;
17636        #[allow(unused_imports)]
17637        use crate::values::specified::AllowQuirks;
17638        #[allow(unused_imports)]
17639        use crate::Zero;
17640        #[allow(unused_imports)]
17641        use smallvec::SmallVec;
17642        pub use crate::values::specified::OutlineStyle as SpecifiedValue;
17643        pub mod computed_value {
17644            pub use crate::values::computed::OutlineStyle as T;
17645        }
17646        #[inline] pub fn get_initial_value() -> computed_value::T { computed::OutlineStyle::none() }
17647        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::OutlineStyle::none() }
17648        #[allow(unused_variables)]
17649        #[inline]
17650        pub fn parse<'i, 't>(
17651            context: &ParserContext,
17652            input: &mut Parser<'i, 't>,
17653        ) -> Result<SpecifiedValue, ParseError<'i>> {
17654            <specified::OutlineStyle as crate::parser::Parse>::parse(context, input)
17655        }
17656    
17657        
17658        #[allow(unused_variables)]
17659        pub unsafe fn cascade_property(
17660            declaration: &PropertyDeclaration,
17661            context: &mut computed::Context,
17662        ) {
17663            context.for_non_inherited_property = true;
17664            debug_assert_eq!(
17665                declaration.id().as_longhand().unwrap(),
17666                LonghandId::OutlineStyle,
17667            );
17668            let specified_value = match *declaration {
17669                PropertyDeclaration::CSSWideKeyword(ref wk) => {
17670                    match wk.keyword {
17671                        CSSWideKeyword::Unset |
17672                        CSSWideKeyword::Initial => {
17673                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
17674                        },
17675                        CSSWideKeyword::Inherit => {
17676                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
17677                                context.builder.inherit_outline_style();
17678                        }
17679                        CSSWideKeyword::RevertLayer |
17680                        CSSWideKeyword::Revert => {
17681                            declaration.debug_crash("Found revert/revert-layer not dealt with");
17682                        },
17683                    }
17684                    return;
17685                },
17686                #[cfg(debug_assertions)]
17687                PropertyDeclaration::WithVariables(..) => {
17688                    declaration.debug_crash("Found variables not substituted");
17689                    return;
17690                },
17691                _ => unsafe {
17692                    declaration.unchecked_value_as::<crate::values::specified::OutlineStyle>()
17693                },
17694            };
17695
17696
17697                let computed = specified_value.to_computed_value(context);
17698                context.builder.set_outline_style(computed)
17699        }
17700
17701        pub fn parse_declared<'i, 't>(
17702            context: &ParserContext,
17703            input: &mut Parser<'i, 't>,
17704        ) -> Result<PropertyDeclaration, ParseError<'i>> {
17705                parse(context, input)
17706                .map(PropertyDeclaration::OutlineStyle)
17707        }
17708    }
17709
17710
17711
17712
17713    
17714        
17715    
17716    /// https://drafts.csswg.org/css-ui/#propdef-outline-width
17717    pub mod outline_width {
17718        #[allow(unused_imports)]
17719        use cssparser::{Parser, BasicParseError, Token};
17720        #[allow(unused_imports)]
17721        use crate::parser::{Parse, ParserContext};
17722        #[allow(unused_imports)]
17723        use crate::properties::{UnparsedValue, ShorthandId};
17724        #[allow(unused_imports)]
17725        use crate::error_reporting::ParseErrorReporter;
17726        #[allow(unused_imports)]
17727        use crate::properties::longhands;
17728        #[allow(unused_imports)]
17729        use crate::properties::{LonghandId, LonghandIdSet};
17730        #[allow(unused_imports)]
17731        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
17732        #[allow(unused_imports)]
17733        use crate::properties::style_structs;
17734        #[allow(unused_imports)]
17735        use selectors::parser::SelectorParseErrorKind;
17736        #[allow(unused_imports)]
17737        use servo_arc::Arc;
17738        #[allow(unused_imports)]
17739        use style_traits::{ParseError, StyleParseErrorKind};
17740        #[allow(unused_imports)]
17741        use crate::values::computed::{Context, ToComputedValue};
17742        #[allow(unused_imports)]
17743        use crate::values::{computed, generics, specified};
17744        #[allow(unused_imports)]
17745        use crate::Atom;
17746        
17747            
17748        #[allow(unused_imports)]
17749        use app_units::Au;
17750        #[allow(unused_imports)]
17751        use crate::values::specified::AllowQuirks;
17752        #[allow(unused_imports)]
17753        use crate::Zero;
17754        #[allow(unused_imports)]
17755        use smallvec::SmallVec;
17756        pub use crate::values::specified::BorderSideWidth as SpecifiedValue;
17757        pub mod computed_value {
17758            pub use crate::values::computed::BorderSideWidth as T;
17759        }
17760        #[inline] pub fn get_initial_value() -> computed_value::T { app_units::Au::from_px(3) }
17761        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::BorderSideWidth::medium() }
17762        #[allow(unused_variables)]
17763        #[inline]
17764        pub fn parse<'i, 't>(
17765            context: &ParserContext,
17766            input: &mut Parser<'i, 't>,
17767        ) -> Result<SpecifiedValue, ParseError<'i>> {
17768            <specified::BorderSideWidth as crate::parser::Parse>::parse(context, input)
17769        }
17770    
17771        
17772        #[allow(unused_variables)]
17773        pub unsafe fn cascade_property(
17774            declaration: &PropertyDeclaration,
17775            context: &mut computed::Context,
17776        ) {
17777            context.for_non_inherited_property = true;
17778            debug_assert_eq!(
17779                declaration.id().as_longhand().unwrap(),
17780                LonghandId::OutlineWidth,
17781            );
17782            let specified_value = match *declaration {
17783                PropertyDeclaration::CSSWideKeyword(ref wk) => {
17784                    match wk.keyword {
17785                        CSSWideKeyword::Unset |
17786                        CSSWideKeyword::Initial => {
17787                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
17788                        },
17789                        CSSWideKeyword::Inherit => {
17790                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
17791                                context.builder.inherit_outline_width();
17792                        }
17793                        CSSWideKeyword::RevertLayer |
17794                        CSSWideKeyword::Revert => {
17795                            declaration.debug_crash("Found revert/revert-layer not dealt with");
17796                        },
17797                    }
17798                    return;
17799                },
17800                #[cfg(debug_assertions)]
17801                PropertyDeclaration::WithVariables(..) => {
17802                    declaration.debug_crash("Found variables not substituted");
17803                    return;
17804                },
17805                _ => unsafe {
17806                    declaration.unchecked_value_as::<crate::values::specified::BorderSideWidth>()
17807                },
17808            };
17809
17810
17811                let computed = specified_value.to_computed_value(context);
17812                context.builder.set_outline_width(computed)
17813        }
17814
17815        pub fn parse_declared<'i, 't>(
17816            context: &ParserContext,
17817            input: &mut Parser<'i, 't>,
17818        ) -> Result<PropertyDeclaration, ParseError<'i>> {
17819                parse(context, input)
17820                .map(PropertyDeclaration::OutlineWidth)
17821        }
17822    }
17823
17824
17825
17826
17827    
17828        
17829    
17830    /// https://drafts.csswg.org/css-ui/#propdef-outline-offset
17831    pub mod outline_offset {
17832        #[allow(unused_imports)]
17833        use cssparser::{Parser, BasicParseError, Token};
17834        #[allow(unused_imports)]
17835        use crate::parser::{Parse, ParserContext};
17836        #[allow(unused_imports)]
17837        use crate::properties::{UnparsedValue, ShorthandId};
17838        #[allow(unused_imports)]
17839        use crate::error_reporting::ParseErrorReporter;
17840        #[allow(unused_imports)]
17841        use crate::properties::longhands;
17842        #[allow(unused_imports)]
17843        use crate::properties::{LonghandId, LonghandIdSet};
17844        #[allow(unused_imports)]
17845        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
17846        #[allow(unused_imports)]
17847        use crate::properties::style_structs;
17848        #[allow(unused_imports)]
17849        use selectors::parser::SelectorParseErrorKind;
17850        #[allow(unused_imports)]
17851        use servo_arc::Arc;
17852        #[allow(unused_imports)]
17853        use style_traits::{ParseError, StyleParseErrorKind};
17854        #[allow(unused_imports)]
17855        use crate::values::computed::{Context, ToComputedValue};
17856        #[allow(unused_imports)]
17857        use crate::values::{computed, generics, specified};
17858        #[allow(unused_imports)]
17859        use crate::Atom;
17860        
17861            
17862        #[allow(unused_imports)]
17863        use app_units::Au;
17864        #[allow(unused_imports)]
17865        use crate::values::specified::AllowQuirks;
17866        #[allow(unused_imports)]
17867        use crate::Zero;
17868        #[allow(unused_imports)]
17869        use smallvec::SmallVec;
17870        pub use crate::values::specified::Length as SpecifiedValue;
17871        pub mod computed_value {
17872            pub use crate::values::computed::Length as T;
17873        }
17874        #[inline] pub fn get_initial_value() -> computed_value::T { crate::values::computed::Length::new(0.) }
17875        #[allow(unused_variables)]
17876        #[inline]
17877        pub fn parse<'i, 't>(
17878            context: &ParserContext,
17879            input: &mut Parser<'i, 't>,
17880        ) -> Result<SpecifiedValue, ParseError<'i>> {
17881            <specified::Length as crate::parser::Parse>::parse(context, input)
17882        }
17883    
17884        
17885        #[allow(unused_variables)]
17886        pub unsafe fn cascade_property(
17887            declaration: &PropertyDeclaration,
17888            context: &mut computed::Context,
17889        ) {
17890            context.for_non_inherited_property = true;
17891            debug_assert_eq!(
17892                declaration.id().as_longhand().unwrap(),
17893                LonghandId::OutlineOffset,
17894            );
17895            let specified_value = match *declaration {
17896                PropertyDeclaration::CSSWideKeyword(ref wk) => {
17897                    match wk.keyword {
17898                        CSSWideKeyword::Unset |
17899                        CSSWideKeyword::Initial => {
17900                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
17901                        },
17902                        CSSWideKeyword::Inherit => {
17903                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
17904                                if !context.builder.effective_zoom_for_inheritance.is_one() {
17905                                    let old_zoom = context.builder.effective_zoom;
17906                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
17907                                    let computed = context.builder.inherited_style.clone_outline_offset();
17908                                    let specified = ToComputedValue::from_computed_value(&computed);
17909                                    let decl = PropertyDeclaration::OutlineOffset(specified);
17910                                    cascade_property(&decl, context);
17911                                    context.builder.effective_zoom = old_zoom;
17912                                    return;
17913                                }
17914                                context.builder.inherit_outline_offset();
17915                        }
17916                        CSSWideKeyword::RevertLayer |
17917                        CSSWideKeyword::Revert => {
17918                            declaration.debug_crash("Found revert/revert-layer not dealt with");
17919                        },
17920                    }
17921                    return;
17922                },
17923                #[cfg(debug_assertions)]
17924                PropertyDeclaration::WithVariables(..) => {
17925                    declaration.debug_crash("Found variables not substituted");
17926                    return;
17927                },
17928                _ => unsafe {
17929                    declaration.unchecked_value_as::<crate::values::specified::Length>()
17930                },
17931            };
17932
17933
17934                let computed = specified_value.to_computed_value(context);
17935                context.builder.set_outline_offset(computed)
17936        }
17937
17938        pub fn parse_declared<'i, 't>(
17939            context: &ParserContext,
17940            input: &mut Parser<'i, 't>,
17941        ) -> Result<PropertyDeclaration, ParseError<'i>> {
17942                parse(context, input)
17943                .map(PropertyDeclaration::OutlineOffset)
17944        }
17945    }
17946
17947
17948
17949    
17950    /* This Source Code Form is subject to the terms of the Mozilla Public
17951 * License, v. 2.0. If a copy of the MPL was not distributed with this
17952 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
17953
17954
17955
17956
17957    
17958    
17959    
17960        
17961    
17962    /// https://drafts.csswg.org/css-box/#propdef-padding-top
17963    pub mod padding_top {
17964        #[allow(unused_imports)]
17965        use cssparser::{Parser, BasicParseError, Token};
17966        #[allow(unused_imports)]
17967        use crate::parser::{Parse, ParserContext};
17968        #[allow(unused_imports)]
17969        use crate::properties::{UnparsedValue, ShorthandId};
17970        #[allow(unused_imports)]
17971        use crate::error_reporting::ParseErrorReporter;
17972        #[allow(unused_imports)]
17973        use crate::properties::longhands;
17974        #[allow(unused_imports)]
17975        use crate::properties::{LonghandId, LonghandIdSet};
17976        #[allow(unused_imports)]
17977        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
17978        #[allow(unused_imports)]
17979        use crate::properties::style_structs;
17980        #[allow(unused_imports)]
17981        use selectors::parser::SelectorParseErrorKind;
17982        #[allow(unused_imports)]
17983        use servo_arc::Arc;
17984        #[allow(unused_imports)]
17985        use style_traits::{ParseError, StyleParseErrorKind};
17986        #[allow(unused_imports)]
17987        use crate::values::computed::{Context, ToComputedValue};
17988        #[allow(unused_imports)]
17989        use crate::values::{computed, generics, specified};
17990        #[allow(unused_imports)]
17991        use crate::Atom;
17992        
17993            
17994        #[allow(unused_imports)]
17995        use app_units::Au;
17996        #[allow(unused_imports)]
17997        use crate::values::specified::AllowQuirks;
17998        #[allow(unused_imports)]
17999        use crate::Zero;
18000        #[allow(unused_imports)]
18001        use smallvec::SmallVec;
18002        pub use crate::values::specified::NonNegativeLengthPercentage as SpecifiedValue;
18003        pub mod computed_value {
18004            pub use crate::values::computed::NonNegativeLengthPercentage as T;
18005        }
18006        #[inline] pub fn get_initial_value() -> computed_value::T { computed::NonNegativeLengthPercentage::zero() }
18007        #[allow(unused_variables)]
18008        #[inline]
18009        pub fn parse<'i, 't>(
18010            context: &ParserContext,
18011            input: &mut Parser<'i, 't>,
18012        ) -> Result<SpecifiedValue, ParseError<'i>> {
18013            specified::NonNegativeLengthPercentage::parse_quirky(context, input, AllowQuirks::Yes)
18014        }
18015    
18016        
18017        #[allow(unused_variables)]
18018        pub unsafe fn cascade_property(
18019            declaration: &PropertyDeclaration,
18020            context: &mut computed::Context,
18021        ) {
18022            context.for_non_inherited_property = true;
18023            debug_assert_eq!(
18024                declaration.id().as_longhand().unwrap().logical_group(),
18025                LonghandId::PaddingTop.logical_group(),
18026            );
18027            let specified_value = match *declaration {
18028                PropertyDeclaration::CSSWideKeyword(ref wk) => {
18029                    match wk.keyword {
18030                        CSSWideKeyword::Unset |
18031                        CSSWideKeyword::Initial => {
18032                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
18033                        },
18034                        CSSWideKeyword::Inherit => {
18035                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
18036                                if !context.builder.effective_zoom_for_inheritance.is_one() {
18037                                    let old_zoom = context.builder.effective_zoom;
18038                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
18039                                    let computed = context.builder.inherited_style.clone_padding_top();
18040                                    let specified = ToComputedValue::from_computed_value(&computed);
18041                                    let decl = PropertyDeclaration::PaddingTop(specified);
18042                                    cascade_property(&decl, context);
18043                                    context.builder.effective_zoom = old_zoom;
18044                                    return;
18045                                }
18046                                context.builder.inherit_padding_top();
18047                        }
18048                        CSSWideKeyword::RevertLayer |
18049                        CSSWideKeyword::Revert => {
18050                            declaration.debug_crash("Found revert/revert-layer not dealt with");
18051                        },
18052                    }
18053                    return;
18054                },
18055                #[cfg(debug_assertions)]
18056                PropertyDeclaration::WithVariables(..) => {
18057                    declaration.debug_crash("Found variables not substituted");
18058                    return;
18059                },
18060                _ => unsafe {
18061                    declaration.unchecked_value_as::<crate::values::specified::NonNegativeLengthPercentage>()
18062                },
18063            };
18064
18065
18066                let computed = specified_value.to_computed_value(context);
18067                context.builder.set_padding_top(computed)
18068        }
18069
18070        pub fn parse_declared<'i, 't>(
18071            context: &ParserContext,
18072            input: &mut Parser<'i, 't>,
18073        ) -> Result<PropertyDeclaration, ParseError<'i>> {
18074                parse(context, input)
18075                .map(PropertyDeclaration::PaddingTop)
18076        }
18077    }
18078
18079
18080    
18081    
18082    
18083        
18084    
18085    /// https://drafts.csswg.org/css-box/#propdef-padding-right
18086    pub mod padding_right {
18087        #[allow(unused_imports)]
18088        use cssparser::{Parser, BasicParseError, Token};
18089        #[allow(unused_imports)]
18090        use crate::parser::{Parse, ParserContext};
18091        #[allow(unused_imports)]
18092        use crate::properties::{UnparsedValue, ShorthandId};
18093        #[allow(unused_imports)]
18094        use crate::error_reporting::ParseErrorReporter;
18095        #[allow(unused_imports)]
18096        use crate::properties::longhands;
18097        #[allow(unused_imports)]
18098        use crate::properties::{LonghandId, LonghandIdSet};
18099        #[allow(unused_imports)]
18100        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
18101        #[allow(unused_imports)]
18102        use crate::properties::style_structs;
18103        #[allow(unused_imports)]
18104        use selectors::parser::SelectorParseErrorKind;
18105        #[allow(unused_imports)]
18106        use servo_arc::Arc;
18107        #[allow(unused_imports)]
18108        use style_traits::{ParseError, StyleParseErrorKind};
18109        #[allow(unused_imports)]
18110        use crate::values::computed::{Context, ToComputedValue};
18111        #[allow(unused_imports)]
18112        use crate::values::{computed, generics, specified};
18113        #[allow(unused_imports)]
18114        use crate::Atom;
18115        
18116            
18117        #[allow(unused_imports)]
18118        use app_units::Au;
18119        #[allow(unused_imports)]
18120        use crate::values::specified::AllowQuirks;
18121        #[allow(unused_imports)]
18122        use crate::Zero;
18123        #[allow(unused_imports)]
18124        use smallvec::SmallVec;
18125        pub use crate::values::specified::NonNegativeLengthPercentage as SpecifiedValue;
18126        pub mod computed_value {
18127            pub use crate::values::computed::NonNegativeLengthPercentage as T;
18128        }
18129        #[inline] pub fn get_initial_value() -> computed_value::T { computed::NonNegativeLengthPercentage::zero() }
18130        #[allow(unused_variables)]
18131        #[inline]
18132        pub fn parse<'i, 't>(
18133            context: &ParserContext,
18134            input: &mut Parser<'i, 't>,
18135        ) -> Result<SpecifiedValue, ParseError<'i>> {
18136            specified::NonNegativeLengthPercentage::parse_quirky(context, input, AllowQuirks::Yes)
18137        }
18138    
18139        
18140        #[allow(unused_variables)]
18141        pub unsafe fn cascade_property(
18142            declaration: &PropertyDeclaration,
18143            context: &mut computed::Context,
18144        ) {
18145            context.for_non_inherited_property = true;
18146            debug_assert_eq!(
18147                declaration.id().as_longhand().unwrap().logical_group(),
18148                LonghandId::PaddingRight.logical_group(),
18149            );
18150            let specified_value = match *declaration {
18151                PropertyDeclaration::CSSWideKeyword(ref wk) => {
18152                    match wk.keyword {
18153                        CSSWideKeyword::Unset |
18154                        CSSWideKeyword::Initial => {
18155                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
18156                        },
18157                        CSSWideKeyword::Inherit => {
18158                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
18159                                if !context.builder.effective_zoom_for_inheritance.is_one() {
18160                                    let old_zoom = context.builder.effective_zoom;
18161                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
18162                                    let computed = context.builder.inherited_style.clone_padding_right();
18163                                    let specified = ToComputedValue::from_computed_value(&computed);
18164                                    let decl = PropertyDeclaration::PaddingRight(specified);
18165                                    cascade_property(&decl, context);
18166                                    context.builder.effective_zoom = old_zoom;
18167                                    return;
18168                                }
18169                                context.builder.inherit_padding_right();
18170                        }
18171                        CSSWideKeyword::RevertLayer |
18172                        CSSWideKeyword::Revert => {
18173                            declaration.debug_crash("Found revert/revert-layer not dealt with");
18174                        },
18175                    }
18176                    return;
18177                },
18178                #[cfg(debug_assertions)]
18179                PropertyDeclaration::WithVariables(..) => {
18180                    declaration.debug_crash("Found variables not substituted");
18181                    return;
18182                },
18183                _ => unsafe {
18184                    declaration.unchecked_value_as::<crate::values::specified::NonNegativeLengthPercentage>()
18185                },
18186            };
18187
18188
18189                let computed = specified_value.to_computed_value(context);
18190                context.builder.set_padding_right(computed)
18191        }
18192
18193        pub fn parse_declared<'i, 't>(
18194            context: &ParserContext,
18195            input: &mut Parser<'i, 't>,
18196        ) -> Result<PropertyDeclaration, ParseError<'i>> {
18197                parse(context, input)
18198                .map(PropertyDeclaration::PaddingRight)
18199        }
18200    }
18201
18202
18203    
18204    
18205    
18206        
18207    
18208    /// https://drafts.csswg.org/css-box/#propdef-padding-bottom
18209    pub mod padding_bottom {
18210        #[allow(unused_imports)]
18211        use cssparser::{Parser, BasicParseError, Token};
18212        #[allow(unused_imports)]
18213        use crate::parser::{Parse, ParserContext};
18214        #[allow(unused_imports)]
18215        use crate::properties::{UnparsedValue, ShorthandId};
18216        #[allow(unused_imports)]
18217        use crate::error_reporting::ParseErrorReporter;
18218        #[allow(unused_imports)]
18219        use crate::properties::longhands;
18220        #[allow(unused_imports)]
18221        use crate::properties::{LonghandId, LonghandIdSet};
18222        #[allow(unused_imports)]
18223        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
18224        #[allow(unused_imports)]
18225        use crate::properties::style_structs;
18226        #[allow(unused_imports)]
18227        use selectors::parser::SelectorParseErrorKind;
18228        #[allow(unused_imports)]
18229        use servo_arc::Arc;
18230        #[allow(unused_imports)]
18231        use style_traits::{ParseError, StyleParseErrorKind};
18232        #[allow(unused_imports)]
18233        use crate::values::computed::{Context, ToComputedValue};
18234        #[allow(unused_imports)]
18235        use crate::values::{computed, generics, specified};
18236        #[allow(unused_imports)]
18237        use crate::Atom;
18238        
18239            
18240        #[allow(unused_imports)]
18241        use app_units::Au;
18242        #[allow(unused_imports)]
18243        use crate::values::specified::AllowQuirks;
18244        #[allow(unused_imports)]
18245        use crate::Zero;
18246        #[allow(unused_imports)]
18247        use smallvec::SmallVec;
18248        pub use crate::values::specified::NonNegativeLengthPercentage as SpecifiedValue;
18249        pub mod computed_value {
18250            pub use crate::values::computed::NonNegativeLengthPercentage as T;
18251        }
18252        #[inline] pub fn get_initial_value() -> computed_value::T { computed::NonNegativeLengthPercentage::zero() }
18253        #[allow(unused_variables)]
18254        #[inline]
18255        pub fn parse<'i, 't>(
18256            context: &ParserContext,
18257            input: &mut Parser<'i, 't>,
18258        ) -> Result<SpecifiedValue, ParseError<'i>> {
18259            specified::NonNegativeLengthPercentage::parse_quirky(context, input, AllowQuirks::Yes)
18260        }
18261    
18262        
18263        #[allow(unused_variables)]
18264        pub unsafe fn cascade_property(
18265            declaration: &PropertyDeclaration,
18266            context: &mut computed::Context,
18267        ) {
18268            context.for_non_inherited_property = true;
18269            debug_assert_eq!(
18270                declaration.id().as_longhand().unwrap().logical_group(),
18271                LonghandId::PaddingBottom.logical_group(),
18272            );
18273            let specified_value = match *declaration {
18274                PropertyDeclaration::CSSWideKeyword(ref wk) => {
18275                    match wk.keyword {
18276                        CSSWideKeyword::Unset |
18277                        CSSWideKeyword::Initial => {
18278                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
18279                        },
18280                        CSSWideKeyword::Inherit => {
18281                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
18282                                if !context.builder.effective_zoom_for_inheritance.is_one() {
18283                                    let old_zoom = context.builder.effective_zoom;
18284                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
18285                                    let computed = context.builder.inherited_style.clone_padding_bottom();
18286                                    let specified = ToComputedValue::from_computed_value(&computed);
18287                                    let decl = PropertyDeclaration::PaddingBottom(specified);
18288                                    cascade_property(&decl, context);
18289                                    context.builder.effective_zoom = old_zoom;
18290                                    return;
18291                                }
18292                                context.builder.inherit_padding_bottom();
18293                        }
18294                        CSSWideKeyword::RevertLayer |
18295                        CSSWideKeyword::Revert => {
18296                            declaration.debug_crash("Found revert/revert-layer not dealt with");
18297                        },
18298                    }
18299                    return;
18300                },
18301                #[cfg(debug_assertions)]
18302                PropertyDeclaration::WithVariables(..) => {
18303                    declaration.debug_crash("Found variables not substituted");
18304                    return;
18305                },
18306                _ => unsafe {
18307                    declaration.unchecked_value_as::<crate::values::specified::NonNegativeLengthPercentage>()
18308                },
18309            };
18310
18311
18312                let computed = specified_value.to_computed_value(context);
18313                context.builder.set_padding_bottom(computed)
18314        }
18315
18316        pub fn parse_declared<'i, 't>(
18317            context: &ParserContext,
18318            input: &mut Parser<'i, 't>,
18319        ) -> Result<PropertyDeclaration, ParseError<'i>> {
18320                parse(context, input)
18321                .map(PropertyDeclaration::PaddingBottom)
18322        }
18323    }
18324
18325
18326    
18327    
18328    
18329        
18330    
18331    /// https://drafts.csswg.org/css-box/#propdef-padding-left
18332    pub mod padding_left {
18333        #[allow(unused_imports)]
18334        use cssparser::{Parser, BasicParseError, Token};
18335        #[allow(unused_imports)]
18336        use crate::parser::{Parse, ParserContext};
18337        #[allow(unused_imports)]
18338        use crate::properties::{UnparsedValue, ShorthandId};
18339        #[allow(unused_imports)]
18340        use crate::error_reporting::ParseErrorReporter;
18341        #[allow(unused_imports)]
18342        use crate::properties::longhands;
18343        #[allow(unused_imports)]
18344        use crate::properties::{LonghandId, LonghandIdSet};
18345        #[allow(unused_imports)]
18346        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
18347        #[allow(unused_imports)]
18348        use crate::properties::style_structs;
18349        #[allow(unused_imports)]
18350        use selectors::parser::SelectorParseErrorKind;
18351        #[allow(unused_imports)]
18352        use servo_arc::Arc;
18353        #[allow(unused_imports)]
18354        use style_traits::{ParseError, StyleParseErrorKind};
18355        #[allow(unused_imports)]
18356        use crate::values::computed::{Context, ToComputedValue};
18357        #[allow(unused_imports)]
18358        use crate::values::{computed, generics, specified};
18359        #[allow(unused_imports)]
18360        use crate::Atom;
18361        
18362            
18363        #[allow(unused_imports)]
18364        use app_units::Au;
18365        #[allow(unused_imports)]
18366        use crate::values::specified::AllowQuirks;
18367        #[allow(unused_imports)]
18368        use crate::Zero;
18369        #[allow(unused_imports)]
18370        use smallvec::SmallVec;
18371        pub use crate::values::specified::NonNegativeLengthPercentage as SpecifiedValue;
18372        pub mod computed_value {
18373            pub use crate::values::computed::NonNegativeLengthPercentage as T;
18374        }
18375        #[inline] pub fn get_initial_value() -> computed_value::T { computed::NonNegativeLengthPercentage::zero() }
18376        #[allow(unused_variables)]
18377        #[inline]
18378        pub fn parse<'i, 't>(
18379            context: &ParserContext,
18380            input: &mut Parser<'i, 't>,
18381        ) -> Result<SpecifiedValue, ParseError<'i>> {
18382            specified::NonNegativeLengthPercentage::parse_quirky(context, input, AllowQuirks::Yes)
18383        }
18384    
18385        
18386        #[allow(unused_variables)]
18387        pub unsafe fn cascade_property(
18388            declaration: &PropertyDeclaration,
18389            context: &mut computed::Context,
18390        ) {
18391            context.for_non_inherited_property = true;
18392            debug_assert_eq!(
18393                declaration.id().as_longhand().unwrap().logical_group(),
18394                LonghandId::PaddingLeft.logical_group(),
18395            );
18396            let specified_value = match *declaration {
18397                PropertyDeclaration::CSSWideKeyword(ref wk) => {
18398                    match wk.keyword {
18399                        CSSWideKeyword::Unset |
18400                        CSSWideKeyword::Initial => {
18401                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
18402                        },
18403                        CSSWideKeyword::Inherit => {
18404                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
18405                                if !context.builder.effective_zoom_for_inheritance.is_one() {
18406                                    let old_zoom = context.builder.effective_zoom;
18407                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
18408                                    let computed = context.builder.inherited_style.clone_padding_left();
18409                                    let specified = ToComputedValue::from_computed_value(&computed);
18410                                    let decl = PropertyDeclaration::PaddingLeft(specified);
18411                                    cascade_property(&decl, context);
18412                                    context.builder.effective_zoom = old_zoom;
18413                                    return;
18414                                }
18415                                context.builder.inherit_padding_left();
18416                        }
18417                        CSSWideKeyword::RevertLayer |
18418                        CSSWideKeyword::Revert => {
18419                            declaration.debug_crash("Found revert/revert-layer not dealt with");
18420                        },
18421                    }
18422                    return;
18423                },
18424                #[cfg(debug_assertions)]
18425                PropertyDeclaration::WithVariables(..) => {
18426                    declaration.debug_crash("Found variables not substituted");
18427                    return;
18428                },
18429                _ => unsafe {
18430                    declaration.unchecked_value_as::<crate::values::specified::NonNegativeLengthPercentage>()
18431                },
18432            };
18433
18434
18435                let computed = specified_value.to_computed_value(context);
18436                context.builder.set_padding_left(computed)
18437        }
18438
18439        pub fn parse_declared<'i, 't>(
18440            context: &ParserContext,
18441            input: &mut Parser<'i, 't>,
18442        ) -> Result<PropertyDeclaration, ParseError<'i>> {
18443                parse(context, input)
18444                .map(PropertyDeclaration::PaddingLeft)
18445        }
18446    }
18447
18448
18449    
18450    
18451    
18452        
18453    
18454    /// https://drafts.csswg.org/css-logical-props/#propdef-padding-True
18455    pub mod padding_block_start {
18456        #[allow(unused_imports)]
18457        use cssparser::{Parser, BasicParseError, Token};
18458        #[allow(unused_imports)]
18459        use crate::parser::{Parse, ParserContext};
18460        #[allow(unused_imports)]
18461        use crate::properties::{UnparsedValue, ShorthandId};
18462        #[allow(unused_imports)]
18463        use crate::error_reporting::ParseErrorReporter;
18464        #[allow(unused_imports)]
18465        use crate::properties::longhands;
18466        #[allow(unused_imports)]
18467        use crate::properties::{LonghandId, LonghandIdSet};
18468        #[allow(unused_imports)]
18469        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
18470        #[allow(unused_imports)]
18471        use crate::properties::style_structs;
18472        #[allow(unused_imports)]
18473        use selectors::parser::SelectorParseErrorKind;
18474        #[allow(unused_imports)]
18475        use servo_arc::Arc;
18476        #[allow(unused_imports)]
18477        use style_traits::{ParseError, StyleParseErrorKind};
18478        #[allow(unused_imports)]
18479        use crate::values::computed::{Context, ToComputedValue};
18480        #[allow(unused_imports)]
18481        use crate::values::{computed, generics, specified};
18482        #[allow(unused_imports)]
18483        use crate::Atom;
18484        
18485            
18486        #[allow(unused_imports)]
18487        use app_units::Au;
18488        #[allow(unused_imports)]
18489        use crate::values::specified::AllowQuirks;
18490        #[allow(unused_imports)]
18491        use crate::Zero;
18492        #[allow(unused_imports)]
18493        use smallvec::SmallVec;
18494        pub use crate::values::specified::NonNegativeLengthPercentage as SpecifiedValue;
18495        pub mod computed_value {
18496            pub use crate::values::computed::NonNegativeLengthPercentage as T;
18497        }
18498        #[inline] pub fn get_initial_value() -> computed_value::T { computed::NonNegativeLengthPercentage::zero() }
18499        #[allow(unused_variables)]
18500        #[inline]
18501        pub fn parse<'i, 't>(
18502            context: &ParserContext,
18503            input: &mut Parser<'i, 't>,
18504        ) -> Result<SpecifiedValue, ParseError<'i>> {
18505            <specified::NonNegativeLengthPercentage as crate::parser::Parse>::parse(context, input)
18506        }
18507    
18508        
18509        #[allow(unused_variables)]
18510        pub unsafe fn cascade_property(
18511            declaration: &PropertyDeclaration,
18512            context: &mut computed::Context,
18513        ) {
18514            declaration.debug_crash("Should physicalize before entering here");
18515        }
18516
18517        pub fn parse_declared<'i, 't>(
18518            context: &ParserContext,
18519            input: &mut Parser<'i, 't>,
18520        ) -> Result<PropertyDeclaration, ParseError<'i>> {
18521                parse(context, input)
18522                .map(PropertyDeclaration::PaddingBlockStart)
18523        }
18524    }
18525
18526
18527    
18528    
18529    
18530        
18531    
18532    /// https://drafts.csswg.org/css-logical-props/#propdef-padding-True
18533    pub mod padding_block_end {
18534        #[allow(unused_imports)]
18535        use cssparser::{Parser, BasicParseError, Token};
18536        #[allow(unused_imports)]
18537        use crate::parser::{Parse, ParserContext};
18538        #[allow(unused_imports)]
18539        use crate::properties::{UnparsedValue, ShorthandId};
18540        #[allow(unused_imports)]
18541        use crate::error_reporting::ParseErrorReporter;
18542        #[allow(unused_imports)]
18543        use crate::properties::longhands;
18544        #[allow(unused_imports)]
18545        use crate::properties::{LonghandId, LonghandIdSet};
18546        #[allow(unused_imports)]
18547        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
18548        #[allow(unused_imports)]
18549        use crate::properties::style_structs;
18550        #[allow(unused_imports)]
18551        use selectors::parser::SelectorParseErrorKind;
18552        #[allow(unused_imports)]
18553        use servo_arc::Arc;
18554        #[allow(unused_imports)]
18555        use style_traits::{ParseError, StyleParseErrorKind};
18556        #[allow(unused_imports)]
18557        use crate::values::computed::{Context, ToComputedValue};
18558        #[allow(unused_imports)]
18559        use crate::values::{computed, generics, specified};
18560        #[allow(unused_imports)]
18561        use crate::Atom;
18562        
18563            
18564        #[allow(unused_imports)]
18565        use app_units::Au;
18566        #[allow(unused_imports)]
18567        use crate::values::specified::AllowQuirks;
18568        #[allow(unused_imports)]
18569        use crate::Zero;
18570        #[allow(unused_imports)]
18571        use smallvec::SmallVec;
18572        pub use crate::values::specified::NonNegativeLengthPercentage as SpecifiedValue;
18573        pub mod computed_value {
18574            pub use crate::values::computed::NonNegativeLengthPercentage as T;
18575        }
18576        #[inline] pub fn get_initial_value() -> computed_value::T { computed::NonNegativeLengthPercentage::zero() }
18577        #[allow(unused_variables)]
18578        #[inline]
18579        pub fn parse<'i, 't>(
18580            context: &ParserContext,
18581            input: &mut Parser<'i, 't>,
18582        ) -> Result<SpecifiedValue, ParseError<'i>> {
18583            <specified::NonNegativeLengthPercentage as crate::parser::Parse>::parse(context, input)
18584        }
18585    
18586        
18587        #[allow(unused_variables)]
18588        pub unsafe fn cascade_property(
18589            declaration: &PropertyDeclaration,
18590            context: &mut computed::Context,
18591        ) {
18592            declaration.debug_crash("Should physicalize before entering here");
18593        }
18594
18595        pub fn parse_declared<'i, 't>(
18596            context: &ParserContext,
18597            input: &mut Parser<'i, 't>,
18598        ) -> Result<PropertyDeclaration, ParseError<'i>> {
18599                parse(context, input)
18600                .map(PropertyDeclaration::PaddingBlockEnd)
18601        }
18602    }
18603
18604
18605    
18606    
18607    
18608        
18609    
18610    /// https://drafts.csswg.org/css-logical-props/#propdef-padding-True
18611    pub mod padding_inline_start {
18612        #[allow(unused_imports)]
18613        use cssparser::{Parser, BasicParseError, Token};
18614        #[allow(unused_imports)]
18615        use crate::parser::{Parse, ParserContext};
18616        #[allow(unused_imports)]
18617        use crate::properties::{UnparsedValue, ShorthandId};
18618        #[allow(unused_imports)]
18619        use crate::error_reporting::ParseErrorReporter;
18620        #[allow(unused_imports)]
18621        use crate::properties::longhands;
18622        #[allow(unused_imports)]
18623        use crate::properties::{LonghandId, LonghandIdSet};
18624        #[allow(unused_imports)]
18625        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
18626        #[allow(unused_imports)]
18627        use crate::properties::style_structs;
18628        #[allow(unused_imports)]
18629        use selectors::parser::SelectorParseErrorKind;
18630        #[allow(unused_imports)]
18631        use servo_arc::Arc;
18632        #[allow(unused_imports)]
18633        use style_traits::{ParseError, StyleParseErrorKind};
18634        #[allow(unused_imports)]
18635        use crate::values::computed::{Context, ToComputedValue};
18636        #[allow(unused_imports)]
18637        use crate::values::{computed, generics, specified};
18638        #[allow(unused_imports)]
18639        use crate::Atom;
18640        
18641            
18642        #[allow(unused_imports)]
18643        use app_units::Au;
18644        #[allow(unused_imports)]
18645        use crate::values::specified::AllowQuirks;
18646        #[allow(unused_imports)]
18647        use crate::Zero;
18648        #[allow(unused_imports)]
18649        use smallvec::SmallVec;
18650        pub use crate::values::specified::NonNegativeLengthPercentage as SpecifiedValue;
18651        pub mod computed_value {
18652            pub use crate::values::computed::NonNegativeLengthPercentage as T;
18653        }
18654        #[inline] pub fn get_initial_value() -> computed_value::T { computed::NonNegativeLengthPercentage::zero() }
18655        #[allow(unused_variables)]
18656        #[inline]
18657        pub fn parse<'i, 't>(
18658            context: &ParserContext,
18659            input: &mut Parser<'i, 't>,
18660        ) -> Result<SpecifiedValue, ParseError<'i>> {
18661            <specified::NonNegativeLengthPercentage as crate::parser::Parse>::parse(context, input)
18662        }
18663    
18664        
18665        #[allow(unused_variables)]
18666        pub unsafe fn cascade_property(
18667            declaration: &PropertyDeclaration,
18668            context: &mut computed::Context,
18669        ) {
18670            declaration.debug_crash("Should physicalize before entering here");
18671        }
18672
18673        pub fn parse_declared<'i, 't>(
18674            context: &ParserContext,
18675            input: &mut Parser<'i, 't>,
18676        ) -> Result<PropertyDeclaration, ParseError<'i>> {
18677                parse(context, input)
18678                .map(PropertyDeclaration::PaddingInlineStart)
18679        }
18680    }
18681
18682
18683    
18684    
18685    
18686        
18687    
18688    /// https://drafts.csswg.org/css-logical-props/#propdef-padding-True
18689    pub mod padding_inline_end {
18690        #[allow(unused_imports)]
18691        use cssparser::{Parser, BasicParseError, Token};
18692        #[allow(unused_imports)]
18693        use crate::parser::{Parse, ParserContext};
18694        #[allow(unused_imports)]
18695        use crate::properties::{UnparsedValue, ShorthandId};
18696        #[allow(unused_imports)]
18697        use crate::error_reporting::ParseErrorReporter;
18698        #[allow(unused_imports)]
18699        use crate::properties::longhands;
18700        #[allow(unused_imports)]
18701        use crate::properties::{LonghandId, LonghandIdSet};
18702        #[allow(unused_imports)]
18703        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
18704        #[allow(unused_imports)]
18705        use crate::properties::style_structs;
18706        #[allow(unused_imports)]
18707        use selectors::parser::SelectorParseErrorKind;
18708        #[allow(unused_imports)]
18709        use servo_arc::Arc;
18710        #[allow(unused_imports)]
18711        use style_traits::{ParseError, StyleParseErrorKind};
18712        #[allow(unused_imports)]
18713        use crate::values::computed::{Context, ToComputedValue};
18714        #[allow(unused_imports)]
18715        use crate::values::{computed, generics, specified};
18716        #[allow(unused_imports)]
18717        use crate::Atom;
18718        
18719            
18720        #[allow(unused_imports)]
18721        use app_units::Au;
18722        #[allow(unused_imports)]
18723        use crate::values::specified::AllowQuirks;
18724        #[allow(unused_imports)]
18725        use crate::Zero;
18726        #[allow(unused_imports)]
18727        use smallvec::SmallVec;
18728        pub use crate::values::specified::NonNegativeLengthPercentage as SpecifiedValue;
18729        pub mod computed_value {
18730            pub use crate::values::computed::NonNegativeLengthPercentage as T;
18731        }
18732        #[inline] pub fn get_initial_value() -> computed_value::T { computed::NonNegativeLengthPercentage::zero() }
18733        #[allow(unused_variables)]
18734        #[inline]
18735        pub fn parse<'i, 't>(
18736            context: &ParserContext,
18737            input: &mut Parser<'i, 't>,
18738        ) -> Result<SpecifiedValue, ParseError<'i>> {
18739            <specified::NonNegativeLengthPercentage as crate::parser::Parse>::parse(context, input)
18740        }
18741    
18742        
18743        #[allow(unused_variables)]
18744        pub unsafe fn cascade_property(
18745            declaration: &PropertyDeclaration,
18746            context: &mut computed::Context,
18747        ) {
18748            declaration.debug_crash("Should physicalize before entering here");
18749        }
18750
18751        pub fn parse_declared<'i, 't>(
18752            context: &ParserContext,
18753            input: &mut Parser<'i, 't>,
18754        ) -> Result<PropertyDeclaration, ParseError<'i>> {
18755                parse(context, input)
18756                .map(PropertyDeclaration::PaddingInlineEnd)
18757        }
18758    }
18759
18760
18761
18762    
18763    
18764        
18765    
18766
18767    
18768    
18769        
18770    
18771
18772    
18773    
18774        
18775    
18776
18777    
18778    
18779        
18780    
18781
18782    
18783    
18784        
18785    
18786
18787    
18788    
18789        
18790    
18791
18792    
18793    
18794        
18795    
18796
18797    
18798    
18799        
18800    
18801
18802
18803    
18804    /* This Source Code Form is subject to the terms of the Mozilla Public
18805 * License, v. 2.0. If a copy of the MPL was not distributed with this
18806 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
18807
18808
18809
18810
18811
18812    
18813        
18814    
18815
18816
18817
18818    
18819        
18820    
18821
18822
18823
18824    
18825        
18826    
18827
18828
18829    
18830    /* This Source Code Form is subject to the terms of the Mozilla Public
18831 * License, v. 2.0. If a copy of the MPL was not distributed with this
18832 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
18833
18834
18835
18836
18837// "top" / "left" / "bottom" / "right"
18838    
18839    
18840        
18841    
18842    /// https://www.w3.org/TR/CSS2/visuren.html#propdef-top
18843    pub mod top {
18844        #[allow(unused_imports)]
18845        use cssparser::{Parser, BasicParseError, Token};
18846        #[allow(unused_imports)]
18847        use crate::parser::{Parse, ParserContext};
18848        #[allow(unused_imports)]
18849        use crate::properties::{UnparsedValue, ShorthandId};
18850        #[allow(unused_imports)]
18851        use crate::error_reporting::ParseErrorReporter;
18852        #[allow(unused_imports)]
18853        use crate::properties::longhands;
18854        #[allow(unused_imports)]
18855        use crate::properties::{LonghandId, LonghandIdSet};
18856        #[allow(unused_imports)]
18857        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
18858        #[allow(unused_imports)]
18859        use crate::properties::style_structs;
18860        #[allow(unused_imports)]
18861        use selectors::parser::SelectorParseErrorKind;
18862        #[allow(unused_imports)]
18863        use servo_arc::Arc;
18864        #[allow(unused_imports)]
18865        use style_traits::{ParseError, StyleParseErrorKind};
18866        #[allow(unused_imports)]
18867        use crate::values::computed::{Context, ToComputedValue};
18868        #[allow(unused_imports)]
18869        use crate::values::{computed, generics, specified};
18870        #[allow(unused_imports)]
18871        use crate::Atom;
18872        
18873            
18874        #[allow(unused_imports)]
18875        use app_units::Au;
18876        #[allow(unused_imports)]
18877        use crate::values::specified::AllowQuirks;
18878        #[allow(unused_imports)]
18879        use crate::Zero;
18880        #[allow(unused_imports)]
18881        use smallvec::SmallVec;
18882        pub use crate::values::specified::Inset as SpecifiedValue;
18883        pub mod computed_value {
18884            pub use crate::values::computed::Inset as T;
18885        }
18886        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Inset::auto() }
18887        #[allow(unused_variables)]
18888        #[inline]
18889        pub fn parse<'i, 't>(
18890            context: &ParserContext,
18891            input: &mut Parser<'i, 't>,
18892        ) -> Result<SpecifiedValue, ParseError<'i>> {
18893            specified::Inset::parse_quirky(context, input, AllowQuirks::Yes)
18894        }
18895    
18896        
18897        #[allow(unused_variables)]
18898        pub unsafe fn cascade_property(
18899            declaration: &PropertyDeclaration,
18900            context: &mut computed::Context,
18901        ) {
18902            context.for_non_inherited_property = true;
18903            debug_assert_eq!(
18904                declaration.id().as_longhand().unwrap().logical_group(),
18905                LonghandId::Top.logical_group(),
18906            );
18907            let specified_value = match *declaration {
18908                PropertyDeclaration::CSSWideKeyword(ref wk) => {
18909                    match wk.keyword {
18910                        CSSWideKeyword::Unset |
18911                        CSSWideKeyword::Initial => {
18912                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
18913                        },
18914                        CSSWideKeyword::Inherit => {
18915                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
18916                                if !context.builder.effective_zoom_for_inheritance.is_one() {
18917                                    let old_zoom = context.builder.effective_zoom;
18918                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
18919                                    let computed = context.builder.inherited_style.clone_top();
18920                                    let specified = ToComputedValue::from_computed_value(&computed);
18921                                    let decl = PropertyDeclaration::Top(specified);
18922                                    cascade_property(&decl, context);
18923                                    context.builder.effective_zoom = old_zoom;
18924                                    return;
18925                                }
18926                                context.builder.inherit_top();
18927                        }
18928                        CSSWideKeyword::RevertLayer |
18929                        CSSWideKeyword::Revert => {
18930                            declaration.debug_crash("Found revert/revert-layer not dealt with");
18931                        },
18932                    }
18933                    return;
18934                },
18935                #[cfg(debug_assertions)]
18936                PropertyDeclaration::WithVariables(..) => {
18937                    declaration.debug_crash("Found variables not substituted");
18938                    return;
18939                },
18940                _ => unsafe {
18941                    declaration.unchecked_value_as::<crate::values::specified::Inset>()
18942                },
18943            };
18944
18945
18946                let computed = specified_value.to_computed_value(context);
18947                context.builder.set_top(computed)
18948        }
18949
18950        pub fn parse_declared<'i, 't>(
18951            context: &ParserContext,
18952            input: &mut Parser<'i, 't>,
18953        ) -> Result<PropertyDeclaration, ParseError<'i>> {
18954                parse(context, input)
18955                .map(PropertyDeclaration::Top)
18956        }
18957    }
18958
18959
18960    
18961    
18962        
18963    
18964    /// https://www.w3.org/TR/CSS2/visuren.html#propdef-right
18965    pub mod right {
18966        #[allow(unused_imports)]
18967        use cssparser::{Parser, BasicParseError, Token};
18968        #[allow(unused_imports)]
18969        use crate::parser::{Parse, ParserContext};
18970        #[allow(unused_imports)]
18971        use crate::properties::{UnparsedValue, ShorthandId};
18972        #[allow(unused_imports)]
18973        use crate::error_reporting::ParseErrorReporter;
18974        #[allow(unused_imports)]
18975        use crate::properties::longhands;
18976        #[allow(unused_imports)]
18977        use crate::properties::{LonghandId, LonghandIdSet};
18978        #[allow(unused_imports)]
18979        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
18980        #[allow(unused_imports)]
18981        use crate::properties::style_structs;
18982        #[allow(unused_imports)]
18983        use selectors::parser::SelectorParseErrorKind;
18984        #[allow(unused_imports)]
18985        use servo_arc::Arc;
18986        #[allow(unused_imports)]
18987        use style_traits::{ParseError, StyleParseErrorKind};
18988        #[allow(unused_imports)]
18989        use crate::values::computed::{Context, ToComputedValue};
18990        #[allow(unused_imports)]
18991        use crate::values::{computed, generics, specified};
18992        #[allow(unused_imports)]
18993        use crate::Atom;
18994        
18995            
18996        #[allow(unused_imports)]
18997        use app_units::Au;
18998        #[allow(unused_imports)]
18999        use crate::values::specified::AllowQuirks;
19000        #[allow(unused_imports)]
19001        use crate::Zero;
19002        #[allow(unused_imports)]
19003        use smallvec::SmallVec;
19004        pub use crate::values::specified::Inset as SpecifiedValue;
19005        pub mod computed_value {
19006            pub use crate::values::computed::Inset as T;
19007        }
19008        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Inset::auto() }
19009        #[allow(unused_variables)]
19010        #[inline]
19011        pub fn parse<'i, 't>(
19012            context: &ParserContext,
19013            input: &mut Parser<'i, 't>,
19014        ) -> Result<SpecifiedValue, ParseError<'i>> {
19015            specified::Inset::parse_quirky(context, input, AllowQuirks::Yes)
19016        }
19017    
19018        
19019        #[allow(unused_variables)]
19020        pub unsafe fn cascade_property(
19021            declaration: &PropertyDeclaration,
19022            context: &mut computed::Context,
19023        ) {
19024            context.for_non_inherited_property = true;
19025            debug_assert_eq!(
19026                declaration.id().as_longhand().unwrap().logical_group(),
19027                LonghandId::Right.logical_group(),
19028            );
19029            let specified_value = match *declaration {
19030                PropertyDeclaration::CSSWideKeyword(ref wk) => {
19031                    match wk.keyword {
19032                        CSSWideKeyword::Unset |
19033                        CSSWideKeyword::Initial => {
19034                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
19035                        },
19036                        CSSWideKeyword::Inherit => {
19037                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
19038                                if !context.builder.effective_zoom_for_inheritance.is_one() {
19039                                    let old_zoom = context.builder.effective_zoom;
19040                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
19041                                    let computed = context.builder.inherited_style.clone_right();
19042                                    let specified = ToComputedValue::from_computed_value(&computed);
19043                                    let decl = PropertyDeclaration::Right(specified);
19044                                    cascade_property(&decl, context);
19045                                    context.builder.effective_zoom = old_zoom;
19046                                    return;
19047                                }
19048                                context.builder.inherit_right();
19049                        }
19050                        CSSWideKeyword::RevertLayer |
19051                        CSSWideKeyword::Revert => {
19052                            declaration.debug_crash("Found revert/revert-layer not dealt with");
19053                        },
19054                    }
19055                    return;
19056                },
19057                #[cfg(debug_assertions)]
19058                PropertyDeclaration::WithVariables(..) => {
19059                    declaration.debug_crash("Found variables not substituted");
19060                    return;
19061                },
19062                _ => unsafe {
19063                    declaration.unchecked_value_as::<crate::values::specified::Inset>()
19064                },
19065            };
19066
19067
19068                let computed = specified_value.to_computed_value(context);
19069                context.builder.set_right(computed)
19070        }
19071
19072        pub fn parse_declared<'i, 't>(
19073            context: &ParserContext,
19074            input: &mut Parser<'i, 't>,
19075        ) -> Result<PropertyDeclaration, ParseError<'i>> {
19076                parse(context, input)
19077                .map(PropertyDeclaration::Right)
19078        }
19079    }
19080
19081
19082    
19083    
19084        
19085    
19086    /// https://www.w3.org/TR/CSS2/visuren.html#propdef-bottom
19087    pub mod bottom {
19088        #[allow(unused_imports)]
19089        use cssparser::{Parser, BasicParseError, Token};
19090        #[allow(unused_imports)]
19091        use crate::parser::{Parse, ParserContext};
19092        #[allow(unused_imports)]
19093        use crate::properties::{UnparsedValue, ShorthandId};
19094        #[allow(unused_imports)]
19095        use crate::error_reporting::ParseErrorReporter;
19096        #[allow(unused_imports)]
19097        use crate::properties::longhands;
19098        #[allow(unused_imports)]
19099        use crate::properties::{LonghandId, LonghandIdSet};
19100        #[allow(unused_imports)]
19101        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
19102        #[allow(unused_imports)]
19103        use crate::properties::style_structs;
19104        #[allow(unused_imports)]
19105        use selectors::parser::SelectorParseErrorKind;
19106        #[allow(unused_imports)]
19107        use servo_arc::Arc;
19108        #[allow(unused_imports)]
19109        use style_traits::{ParseError, StyleParseErrorKind};
19110        #[allow(unused_imports)]
19111        use crate::values::computed::{Context, ToComputedValue};
19112        #[allow(unused_imports)]
19113        use crate::values::{computed, generics, specified};
19114        #[allow(unused_imports)]
19115        use crate::Atom;
19116        
19117            
19118        #[allow(unused_imports)]
19119        use app_units::Au;
19120        #[allow(unused_imports)]
19121        use crate::values::specified::AllowQuirks;
19122        #[allow(unused_imports)]
19123        use crate::Zero;
19124        #[allow(unused_imports)]
19125        use smallvec::SmallVec;
19126        pub use crate::values::specified::Inset as SpecifiedValue;
19127        pub mod computed_value {
19128            pub use crate::values::computed::Inset as T;
19129        }
19130        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Inset::auto() }
19131        #[allow(unused_variables)]
19132        #[inline]
19133        pub fn parse<'i, 't>(
19134            context: &ParserContext,
19135            input: &mut Parser<'i, 't>,
19136        ) -> Result<SpecifiedValue, ParseError<'i>> {
19137            specified::Inset::parse_quirky(context, input, AllowQuirks::Yes)
19138        }
19139    
19140        
19141        #[allow(unused_variables)]
19142        pub unsafe fn cascade_property(
19143            declaration: &PropertyDeclaration,
19144            context: &mut computed::Context,
19145        ) {
19146            context.for_non_inherited_property = true;
19147            debug_assert_eq!(
19148                declaration.id().as_longhand().unwrap().logical_group(),
19149                LonghandId::Bottom.logical_group(),
19150            );
19151            let specified_value = match *declaration {
19152                PropertyDeclaration::CSSWideKeyword(ref wk) => {
19153                    match wk.keyword {
19154                        CSSWideKeyword::Unset |
19155                        CSSWideKeyword::Initial => {
19156                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
19157                        },
19158                        CSSWideKeyword::Inherit => {
19159                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
19160                                if !context.builder.effective_zoom_for_inheritance.is_one() {
19161                                    let old_zoom = context.builder.effective_zoom;
19162                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
19163                                    let computed = context.builder.inherited_style.clone_bottom();
19164                                    let specified = ToComputedValue::from_computed_value(&computed);
19165                                    let decl = PropertyDeclaration::Bottom(specified);
19166                                    cascade_property(&decl, context);
19167                                    context.builder.effective_zoom = old_zoom;
19168                                    return;
19169                                }
19170                                context.builder.inherit_bottom();
19171                        }
19172                        CSSWideKeyword::RevertLayer |
19173                        CSSWideKeyword::Revert => {
19174                            declaration.debug_crash("Found revert/revert-layer not dealt with");
19175                        },
19176                    }
19177                    return;
19178                },
19179                #[cfg(debug_assertions)]
19180                PropertyDeclaration::WithVariables(..) => {
19181                    declaration.debug_crash("Found variables not substituted");
19182                    return;
19183                },
19184                _ => unsafe {
19185                    declaration.unchecked_value_as::<crate::values::specified::Inset>()
19186                },
19187            };
19188
19189
19190                let computed = specified_value.to_computed_value(context);
19191                context.builder.set_bottom(computed)
19192        }
19193
19194        pub fn parse_declared<'i, 't>(
19195            context: &ParserContext,
19196            input: &mut Parser<'i, 't>,
19197        ) -> Result<PropertyDeclaration, ParseError<'i>> {
19198                parse(context, input)
19199                .map(PropertyDeclaration::Bottom)
19200        }
19201    }
19202
19203
19204    
19205    
19206        
19207    
19208    /// https://www.w3.org/TR/CSS2/visuren.html#propdef-left
19209    pub mod left {
19210        #[allow(unused_imports)]
19211        use cssparser::{Parser, BasicParseError, Token};
19212        #[allow(unused_imports)]
19213        use crate::parser::{Parse, ParserContext};
19214        #[allow(unused_imports)]
19215        use crate::properties::{UnparsedValue, ShorthandId};
19216        #[allow(unused_imports)]
19217        use crate::error_reporting::ParseErrorReporter;
19218        #[allow(unused_imports)]
19219        use crate::properties::longhands;
19220        #[allow(unused_imports)]
19221        use crate::properties::{LonghandId, LonghandIdSet};
19222        #[allow(unused_imports)]
19223        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
19224        #[allow(unused_imports)]
19225        use crate::properties::style_structs;
19226        #[allow(unused_imports)]
19227        use selectors::parser::SelectorParseErrorKind;
19228        #[allow(unused_imports)]
19229        use servo_arc::Arc;
19230        #[allow(unused_imports)]
19231        use style_traits::{ParseError, StyleParseErrorKind};
19232        #[allow(unused_imports)]
19233        use crate::values::computed::{Context, ToComputedValue};
19234        #[allow(unused_imports)]
19235        use crate::values::{computed, generics, specified};
19236        #[allow(unused_imports)]
19237        use crate::Atom;
19238        
19239            
19240        #[allow(unused_imports)]
19241        use app_units::Au;
19242        #[allow(unused_imports)]
19243        use crate::values::specified::AllowQuirks;
19244        #[allow(unused_imports)]
19245        use crate::Zero;
19246        #[allow(unused_imports)]
19247        use smallvec::SmallVec;
19248        pub use crate::values::specified::Inset as SpecifiedValue;
19249        pub mod computed_value {
19250            pub use crate::values::computed::Inset as T;
19251        }
19252        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Inset::auto() }
19253        #[allow(unused_variables)]
19254        #[inline]
19255        pub fn parse<'i, 't>(
19256            context: &ParserContext,
19257            input: &mut Parser<'i, 't>,
19258        ) -> Result<SpecifiedValue, ParseError<'i>> {
19259            specified::Inset::parse_quirky(context, input, AllowQuirks::Yes)
19260        }
19261    
19262        
19263        #[allow(unused_variables)]
19264        pub unsafe fn cascade_property(
19265            declaration: &PropertyDeclaration,
19266            context: &mut computed::Context,
19267        ) {
19268            context.for_non_inherited_property = true;
19269            debug_assert_eq!(
19270                declaration.id().as_longhand().unwrap().logical_group(),
19271                LonghandId::Left.logical_group(),
19272            );
19273            let specified_value = match *declaration {
19274                PropertyDeclaration::CSSWideKeyword(ref wk) => {
19275                    match wk.keyword {
19276                        CSSWideKeyword::Unset |
19277                        CSSWideKeyword::Initial => {
19278                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
19279                        },
19280                        CSSWideKeyword::Inherit => {
19281                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
19282                                if !context.builder.effective_zoom_for_inheritance.is_one() {
19283                                    let old_zoom = context.builder.effective_zoom;
19284                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
19285                                    let computed = context.builder.inherited_style.clone_left();
19286                                    let specified = ToComputedValue::from_computed_value(&computed);
19287                                    let decl = PropertyDeclaration::Left(specified);
19288                                    cascade_property(&decl, context);
19289                                    context.builder.effective_zoom = old_zoom;
19290                                    return;
19291                                }
19292                                context.builder.inherit_left();
19293                        }
19294                        CSSWideKeyword::RevertLayer |
19295                        CSSWideKeyword::Revert => {
19296                            declaration.debug_crash("Found revert/revert-layer not dealt with");
19297                        },
19298                    }
19299                    return;
19300                },
19301                #[cfg(debug_assertions)]
19302                PropertyDeclaration::WithVariables(..) => {
19303                    declaration.debug_crash("Found variables not substituted");
19304                    return;
19305                },
19306                _ => unsafe {
19307                    declaration.unchecked_value_as::<crate::values::specified::Inset>()
19308                },
19309            };
19310
19311
19312                let computed = specified_value.to_computed_value(context);
19313                context.builder.set_left(computed)
19314        }
19315
19316        pub fn parse_declared<'i, 't>(
19317            context: &ParserContext,
19318            input: &mut Parser<'i, 't>,
19319        ) -> Result<PropertyDeclaration, ParseError<'i>> {
19320                parse(context, input)
19321                .map(PropertyDeclaration::Left)
19322        }
19323    }
19324
19325
19326// inset-* logical properties, map to "top" / "left" / "bottom" / "right"
19327    
19328    
19329        
19330    
19331    /// https://drafts.csswg.org/css-logical-props/#propdef-inset-block-start
19332    pub mod inset_block_start {
19333        #[allow(unused_imports)]
19334        use cssparser::{Parser, BasicParseError, Token};
19335        #[allow(unused_imports)]
19336        use crate::parser::{Parse, ParserContext};
19337        #[allow(unused_imports)]
19338        use crate::properties::{UnparsedValue, ShorthandId};
19339        #[allow(unused_imports)]
19340        use crate::error_reporting::ParseErrorReporter;
19341        #[allow(unused_imports)]
19342        use crate::properties::longhands;
19343        #[allow(unused_imports)]
19344        use crate::properties::{LonghandId, LonghandIdSet};
19345        #[allow(unused_imports)]
19346        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
19347        #[allow(unused_imports)]
19348        use crate::properties::style_structs;
19349        #[allow(unused_imports)]
19350        use selectors::parser::SelectorParseErrorKind;
19351        #[allow(unused_imports)]
19352        use servo_arc::Arc;
19353        #[allow(unused_imports)]
19354        use style_traits::{ParseError, StyleParseErrorKind};
19355        #[allow(unused_imports)]
19356        use crate::values::computed::{Context, ToComputedValue};
19357        #[allow(unused_imports)]
19358        use crate::values::{computed, generics, specified};
19359        #[allow(unused_imports)]
19360        use crate::Atom;
19361        
19362            
19363        #[allow(unused_imports)]
19364        use app_units::Au;
19365        #[allow(unused_imports)]
19366        use crate::values::specified::AllowQuirks;
19367        #[allow(unused_imports)]
19368        use crate::Zero;
19369        #[allow(unused_imports)]
19370        use smallvec::SmallVec;
19371        pub use crate::values::specified::Inset as SpecifiedValue;
19372        pub mod computed_value {
19373            pub use crate::values::computed::Inset as T;
19374        }
19375        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Inset::auto() }
19376        #[allow(unused_variables)]
19377        #[inline]
19378        pub fn parse<'i, 't>(
19379            context: &ParserContext,
19380            input: &mut Parser<'i, 't>,
19381        ) -> Result<SpecifiedValue, ParseError<'i>> {
19382            <specified::Inset as crate::parser::Parse>::parse(context, input)
19383        }
19384    
19385        
19386        #[allow(unused_variables)]
19387        pub unsafe fn cascade_property(
19388            declaration: &PropertyDeclaration,
19389            context: &mut computed::Context,
19390        ) {
19391            declaration.debug_crash("Should physicalize before entering here");
19392        }
19393
19394        pub fn parse_declared<'i, 't>(
19395            context: &ParserContext,
19396            input: &mut Parser<'i, 't>,
19397        ) -> Result<PropertyDeclaration, ParseError<'i>> {
19398                parse(context, input)
19399                .map(PropertyDeclaration::InsetBlockStart)
19400        }
19401    }
19402
19403
19404    
19405    
19406        
19407    
19408    /// https://drafts.csswg.org/css-logical-props/#propdef-inset-block-end
19409    pub mod inset_block_end {
19410        #[allow(unused_imports)]
19411        use cssparser::{Parser, BasicParseError, Token};
19412        #[allow(unused_imports)]
19413        use crate::parser::{Parse, ParserContext};
19414        #[allow(unused_imports)]
19415        use crate::properties::{UnparsedValue, ShorthandId};
19416        #[allow(unused_imports)]
19417        use crate::error_reporting::ParseErrorReporter;
19418        #[allow(unused_imports)]
19419        use crate::properties::longhands;
19420        #[allow(unused_imports)]
19421        use crate::properties::{LonghandId, LonghandIdSet};
19422        #[allow(unused_imports)]
19423        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
19424        #[allow(unused_imports)]
19425        use crate::properties::style_structs;
19426        #[allow(unused_imports)]
19427        use selectors::parser::SelectorParseErrorKind;
19428        #[allow(unused_imports)]
19429        use servo_arc::Arc;
19430        #[allow(unused_imports)]
19431        use style_traits::{ParseError, StyleParseErrorKind};
19432        #[allow(unused_imports)]
19433        use crate::values::computed::{Context, ToComputedValue};
19434        #[allow(unused_imports)]
19435        use crate::values::{computed, generics, specified};
19436        #[allow(unused_imports)]
19437        use crate::Atom;
19438        
19439            
19440        #[allow(unused_imports)]
19441        use app_units::Au;
19442        #[allow(unused_imports)]
19443        use crate::values::specified::AllowQuirks;
19444        #[allow(unused_imports)]
19445        use crate::Zero;
19446        #[allow(unused_imports)]
19447        use smallvec::SmallVec;
19448        pub use crate::values::specified::Inset as SpecifiedValue;
19449        pub mod computed_value {
19450            pub use crate::values::computed::Inset as T;
19451        }
19452        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Inset::auto() }
19453        #[allow(unused_variables)]
19454        #[inline]
19455        pub fn parse<'i, 't>(
19456            context: &ParserContext,
19457            input: &mut Parser<'i, 't>,
19458        ) -> Result<SpecifiedValue, ParseError<'i>> {
19459            <specified::Inset as crate::parser::Parse>::parse(context, input)
19460        }
19461    
19462        
19463        #[allow(unused_variables)]
19464        pub unsafe fn cascade_property(
19465            declaration: &PropertyDeclaration,
19466            context: &mut computed::Context,
19467        ) {
19468            declaration.debug_crash("Should physicalize before entering here");
19469        }
19470
19471        pub fn parse_declared<'i, 't>(
19472            context: &ParserContext,
19473            input: &mut Parser<'i, 't>,
19474        ) -> Result<PropertyDeclaration, ParseError<'i>> {
19475                parse(context, input)
19476                .map(PropertyDeclaration::InsetBlockEnd)
19477        }
19478    }
19479
19480
19481    
19482    
19483        
19484    
19485    /// https://drafts.csswg.org/css-logical-props/#propdef-inset-inline-start
19486    pub mod inset_inline_start {
19487        #[allow(unused_imports)]
19488        use cssparser::{Parser, BasicParseError, Token};
19489        #[allow(unused_imports)]
19490        use crate::parser::{Parse, ParserContext};
19491        #[allow(unused_imports)]
19492        use crate::properties::{UnparsedValue, ShorthandId};
19493        #[allow(unused_imports)]
19494        use crate::error_reporting::ParseErrorReporter;
19495        #[allow(unused_imports)]
19496        use crate::properties::longhands;
19497        #[allow(unused_imports)]
19498        use crate::properties::{LonghandId, LonghandIdSet};
19499        #[allow(unused_imports)]
19500        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
19501        #[allow(unused_imports)]
19502        use crate::properties::style_structs;
19503        #[allow(unused_imports)]
19504        use selectors::parser::SelectorParseErrorKind;
19505        #[allow(unused_imports)]
19506        use servo_arc::Arc;
19507        #[allow(unused_imports)]
19508        use style_traits::{ParseError, StyleParseErrorKind};
19509        #[allow(unused_imports)]
19510        use crate::values::computed::{Context, ToComputedValue};
19511        #[allow(unused_imports)]
19512        use crate::values::{computed, generics, specified};
19513        #[allow(unused_imports)]
19514        use crate::Atom;
19515        
19516            
19517        #[allow(unused_imports)]
19518        use app_units::Au;
19519        #[allow(unused_imports)]
19520        use crate::values::specified::AllowQuirks;
19521        #[allow(unused_imports)]
19522        use crate::Zero;
19523        #[allow(unused_imports)]
19524        use smallvec::SmallVec;
19525        pub use crate::values::specified::Inset as SpecifiedValue;
19526        pub mod computed_value {
19527            pub use crate::values::computed::Inset as T;
19528        }
19529        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Inset::auto() }
19530        #[allow(unused_variables)]
19531        #[inline]
19532        pub fn parse<'i, 't>(
19533            context: &ParserContext,
19534            input: &mut Parser<'i, 't>,
19535        ) -> Result<SpecifiedValue, ParseError<'i>> {
19536            <specified::Inset as crate::parser::Parse>::parse(context, input)
19537        }
19538    
19539        
19540        #[allow(unused_variables)]
19541        pub unsafe fn cascade_property(
19542            declaration: &PropertyDeclaration,
19543            context: &mut computed::Context,
19544        ) {
19545            declaration.debug_crash("Should physicalize before entering here");
19546        }
19547
19548        pub fn parse_declared<'i, 't>(
19549            context: &ParserContext,
19550            input: &mut Parser<'i, 't>,
19551        ) -> Result<PropertyDeclaration, ParseError<'i>> {
19552                parse(context, input)
19553                .map(PropertyDeclaration::InsetInlineStart)
19554        }
19555    }
19556
19557
19558    
19559    
19560        
19561    
19562    /// https://drafts.csswg.org/css-logical-props/#propdef-inset-inline-end
19563    pub mod inset_inline_end {
19564        #[allow(unused_imports)]
19565        use cssparser::{Parser, BasicParseError, Token};
19566        #[allow(unused_imports)]
19567        use crate::parser::{Parse, ParserContext};
19568        #[allow(unused_imports)]
19569        use crate::properties::{UnparsedValue, ShorthandId};
19570        #[allow(unused_imports)]
19571        use crate::error_reporting::ParseErrorReporter;
19572        #[allow(unused_imports)]
19573        use crate::properties::longhands;
19574        #[allow(unused_imports)]
19575        use crate::properties::{LonghandId, LonghandIdSet};
19576        #[allow(unused_imports)]
19577        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
19578        #[allow(unused_imports)]
19579        use crate::properties::style_structs;
19580        #[allow(unused_imports)]
19581        use selectors::parser::SelectorParseErrorKind;
19582        #[allow(unused_imports)]
19583        use servo_arc::Arc;
19584        #[allow(unused_imports)]
19585        use style_traits::{ParseError, StyleParseErrorKind};
19586        #[allow(unused_imports)]
19587        use crate::values::computed::{Context, ToComputedValue};
19588        #[allow(unused_imports)]
19589        use crate::values::{computed, generics, specified};
19590        #[allow(unused_imports)]
19591        use crate::Atom;
19592        
19593            
19594        #[allow(unused_imports)]
19595        use app_units::Au;
19596        #[allow(unused_imports)]
19597        use crate::values::specified::AllowQuirks;
19598        #[allow(unused_imports)]
19599        use crate::Zero;
19600        #[allow(unused_imports)]
19601        use smallvec::SmallVec;
19602        pub use crate::values::specified::Inset as SpecifiedValue;
19603        pub mod computed_value {
19604            pub use crate::values::computed::Inset as T;
19605        }
19606        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Inset::auto() }
19607        #[allow(unused_variables)]
19608        #[inline]
19609        pub fn parse<'i, 't>(
19610            context: &ParserContext,
19611            input: &mut Parser<'i, 't>,
19612        ) -> Result<SpecifiedValue, ParseError<'i>> {
19613            <specified::Inset as crate::parser::Parse>::parse(context, input)
19614        }
19615    
19616        
19617        #[allow(unused_variables)]
19618        pub unsafe fn cascade_property(
19619            declaration: &PropertyDeclaration,
19620            context: &mut computed::Context,
19621        ) {
19622            declaration.debug_crash("Should physicalize before entering here");
19623        }
19624
19625        pub fn parse_declared<'i, 't>(
19626            context: &ParserContext,
19627            input: &mut Parser<'i, 't>,
19628        ) -> Result<PropertyDeclaration, ParseError<'i>> {
19629                parse(context, input)
19630                .map(PropertyDeclaration::InsetInlineEnd)
19631        }
19632    }
19633
19634
19635
19636
19637    
19638        
19639    
19640    /// https://www.w3.org/TR/CSS2/visuren.html#z-index
19641    pub mod z_index {
19642        #[allow(unused_imports)]
19643        use cssparser::{Parser, BasicParseError, Token};
19644        #[allow(unused_imports)]
19645        use crate::parser::{Parse, ParserContext};
19646        #[allow(unused_imports)]
19647        use crate::properties::{UnparsedValue, ShorthandId};
19648        #[allow(unused_imports)]
19649        use crate::error_reporting::ParseErrorReporter;
19650        #[allow(unused_imports)]
19651        use crate::properties::longhands;
19652        #[allow(unused_imports)]
19653        use crate::properties::{LonghandId, LonghandIdSet};
19654        #[allow(unused_imports)]
19655        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
19656        #[allow(unused_imports)]
19657        use crate::properties::style_structs;
19658        #[allow(unused_imports)]
19659        use selectors::parser::SelectorParseErrorKind;
19660        #[allow(unused_imports)]
19661        use servo_arc::Arc;
19662        #[allow(unused_imports)]
19663        use style_traits::{ParseError, StyleParseErrorKind};
19664        #[allow(unused_imports)]
19665        use crate::values::computed::{Context, ToComputedValue};
19666        #[allow(unused_imports)]
19667        use crate::values::{computed, generics, specified};
19668        #[allow(unused_imports)]
19669        use crate::Atom;
19670        
19671            
19672        #[allow(unused_imports)]
19673        use app_units::Au;
19674        #[allow(unused_imports)]
19675        use crate::values::specified::AllowQuirks;
19676        #[allow(unused_imports)]
19677        use crate::Zero;
19678        #[allow(unused_imports)]
19679        use smallvec::SmallVec;
19680        pub use crate::values::specified::ZIndex as SpecifiedValue;
19681        pub mod computed_value {
19682            pub use crate::values::computed::ZIndex as T;
19683        }
19684        #[inline] pub fn get_initial_value() -> computed_value::T { computed::ZIndex::auto() }
19685        #[allow(unused_variables)]
19686        #[inline]
19687        pub fn parse<'i, 't>(
19688            context: &ParserContext,
19689            input: &mut Parser<'i, 't>,
19690        ) -> Result<SpecifiedValue, ParseError<'i>> {
19691            <specified::ZIndex as crate::parser::Parse>::parse(context, input)
19692        }
19693    
19694        
19695        #[allow(unused_variables)]
19696        pub unsafe fn cascade_property(
19697            declaration: &PropertyDeclaration,
19698            context: &mut computed::Context,
19699        ) {
19700            context.for_non_inherited_property = true;
19701            debug_assert_eq!(
19702                declaration.id().as_longhand().unwrap(),
19703                LonghandId::ZIndex,
19704            );
19705            let specified_value = match *declaration {
19706                PropertyDeclaration::CSSWideKeyword(ref wk) => {
19707                    match wk.keyword {
19708                        CSSWideKeyword::Unset |
19709                        CSSWideKeyword::Initial => {
19710                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
19711                        },
19712                        CSSWideKeyword::Inherit => {
19713                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
19714                                context.builder.inherit_z_index();
19715                        }
19716                        CSSWideKeyword::RevertLayer |
19717                        CSSWideKeyword::Revert => {
19718                            declaration.debug_crash("Found revert/revert-layer not dealt with");
19719                        },
19720                    }
19721                    return;
19722                },
19723                #[cfg(debug_assertions)]
19724                PropertyDeclaration::WithVariables(..) => {
19725                    declaration.debug_crash("Found variables not substituted");
19726                    return;
19727                },
19728                _ => unsafe {
19729                    declaration.unchecked_value_as::<crate::values::specified::ZIndex>()
19730                },
19731            };
19732
19733
19734                let computed = specified_value.to_computed_value(context);
19735                context.builder.set_z_index(computed)
19736        }
19737
19738        pub fn parse_declared<'i, 't>(
19739            context: &ParserContext,
19740            input: &mut Parser<'i, 't>,
19741        ) -> Result<PropertyDeclaration, ParseError<'i>> {
19742                parse(context, input)
19743                .map(PropertyDeclaration::ZIndex)
19744        }
19745    }
19746
19747
19748
19749// CSS Flexible Box Layout Module Level 1
19750// http://www.w3.org/TR/css3-flexbox/
19751
19752// Flex container properties
19753
19754    
19755
19756    
19757        
19758    
19759    /// https://drafts.csswg.org/css-flexbox/#flex-direction-property
19760    pub mod flex_direction {
19761        #[allow(unused_imports)]
19762        use cssparser::{Parser, BasicParseError, Token};
19763        #[allow(unused_imports)]
19764        use crate::parser::{Parse, ParserContext};
19765        #[allow(unused_imports)]
19766        use crate::properties::{UnparsedValue, ShorthandId};
19767        #[allow(unused_imports)]
19768        use crate::error_reporting::ParseErrorReporter;
19769        #[allow(unused_imports)]
19770        use crate::properties::longhands;
19771        #[allow(unused_imports)]
19772        use crate::properties::{LonghandId, LonghandIdSet};
19773        #[allow(unused_imports)]
19774        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
19775        #[allow(unused_imports)]
19776        use crate::properties::style_structs;
19777        #[allow(unused_imports)]
19778        use selectors::parser::SelectorParseErrorKind;
19779        #[allow(unused_imports)]
19780        use servo_arc::Arc;
19781        #[allow(unused_imports)]
19782        use style_traits::{ParseError, StyleParseErrorKind};
19783        #[allow(unused_imports)]
19784        use crate::values::computed::{Context, ToComputedValue};
19785        #[allow(unused_imports)]
19786        use crate::values::{computed, generics, specified};
19787        #[allow(unused_imports)]
19788        use crate::Atom;
19789        
19790            
19791        pub use self::computed_value::T as SpecifiedValue;
19792        pub mod computed_value {
19793            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
19794            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
19795            pub enum T {
19796            
19797            Row,
19798            
19799            RowReverse,
19800            
19801            Column,
19802            
19803            ColumnReverse,
19804            }
19805        }
19806        #[inline]
19807        pub fn get_initial_value() -> computed_value::T {
19808            computed_value::T::Row
19809        }
19810        #[inline]
19811        pub fn get_initial_specified_value() -> SpecifiedValue {
19812            SpecifiedValue::Row
19813        }
19814        #[inline]
19815        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
19816                             -> Result<SpecifiedValue, ParseError<'i>> {
19817            SpecifiedValue::parse(input)
19818        }
19819
19820    
19821        
19822        #[allow(unused_variables)]
19823        pub unsafe fn cascade_property(
19824            declaration: &PropertyDeclaration,
19825            context: &mut computed::Context,
19826        ) {
19827            context.for_non_inherited_property = true;
19828            debug_assert_eq!(
19829                declaration.id().as_longhand().unwrap(),
19830                LonghandId::FlexDirection,
19831            );
19832            let specified_value = match *declaration {
19833                PropertyDeclaration::CSSWideKeyword(ref wk) => {
19834                    match wk.keyword {
19835                        CSSWideKeyword::Unset |
19836                        CSSWideKeyword::Initial => {
19837                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
19838                        },
19839                        CSSWideKeyword::Inherit => {
19840                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
19841                                context.builder.inherit_flex_direction();
19842                        }
19843                        CSSWideKeyword::RevertLayer |
19844                        CSSWideKeyword::Revert => {
19845                            declaration.debug_crash("Found revert/revert-layer not dealt with");
19846                        },
19847                    }
19848                    return;
19849                },
19850                #[cfg(debug_assertions)]
19851                PropertyDeclaration::WithVariables(..) => {
19852                    declaration.debug_crash("Found variables not substituted");
19853                    return;
19854                },
19855                _ => unsafe {
19856                    declaration.unchecked_value_as::<longhands::flex_direction::SpecifiedValue>()
19857                },
19858            };
19859
19860
19861                let computed = specified_value.to_computed_value(context);
19862                context.builder.set_flex_direction(computed)
19863        }
19864
19865        pub fn parse_declared<'i, 't>(
19866            context: &ParserContext,
19867            input: &mut Parser<'i, 't>,
19868        ) -> Result<PropertyDeclaration, ParseError<'i>> {
19869                parse(context, input)
19870                .map(PropertyDeclaration::FlexDirection)
19871        }
19872    }
19873
19874
19875
19876
19877    
19878
19879    
19880        
19881    
19882    /// https://drafts.csswg.org/css-flexbox/#flex-wrap-property
19883    pub mod flex_wrap {
19884        #[allow(unused_imports)]
19885        use cssparser::{Parser, BasicParseError, Token};
19886        #[allow(unused_imports)]
19887        use crate::parser::{Parse, ParserContext};
19888        #[allow(unused_imports)]
19889        use crate::properties::{UnparsedValue, ShorthandId};
19890        #[allow(unused_imports)]
19891        use crate::error_reporting::ParseErrorReporter;
19892        #[allow(unused_imports)]
19893        use crate::properties::longhands;
19894        #[allow(unused_imports)]
19895        use crate::properties::{LonghandId, LonghandIdSet};
19896        #[allow(unused_imports)]
19897        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
19898        #[allow(unused_imports)]
19899        use crate::properties::style_structs;
19900        #[allow(unused_imports)]
19901        use selectors::parser::SelectorParseErrorKind;
19902        #[allow(unused_imports)]
19903        use servo_arc::Arc;
19904        #[allow(unused_imports)]
19905        use style_traits::{ParseError, StyleParseErrorKind};
19906        #[allow(unused_imports)]
19907        use crate::values::computed::{Context, ToComputedValue};
19908        #[allow(unused_imports)]
19909        use crate::values::{computed, generics, specified};
19910        #[allow(unused_imports)]
19911        use crate::Atom;
19912        
19913            
19914        pub use self::computed_value::T as SpecifiedValue;
19915        pub mod computed_value {
19916            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
19917            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
19918            pub enum T {
19919            
19920            Nowrap,
19921            
19922            Wrap,
19923            
19924            WrapReverse,
19925            }
19926        }
19927        #[inline]
19928        pub fn get_initial_value() -> computed_value::T {
19929            computed_value::T::Nowrap
19930        }
19931        #[inline]
19932        pub fn get_initial_specified_value() -> SpecifiedValue {
19933            SpecifiedValue::Nowrap
19934        }
19935        #[inline]
19936        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
19937                             -> Result<SpecifiedValue, ParseError<'i>> {
19938            SpecifiedValue::parse(input)
19939        }
19940
19941    
19942        
19943        #[allow(unused_variables)]
19944        pub unsafe fn cascade_property(
19945            declaration: &PropertyDeclaration,
19946            context: &mut computed::Context,
19947        ) {
19948            context.for_non_inherited_property = true;
19949            debug_assert_eq!(
19950                declaration.id().as_longhand().unwrap(),
19951                LonghandId::FlexWrap,
19952            );
19953            let specified_value = match *declaration {
19954                PropertyDeclaration::CSSWideKeyword(ref wk) => {
19955                    match wk.keyword {
19956                        CSSWideKeyword::Unset |
19957                        CSSWideKeyword::Initial => {
19958                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
19959                        },
19960                        CSSWideKeyword::Inherit => {
19961                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
19962                                context.builder.inherit_flex_wrap();
19963                        }
19964                        CSSWideKeyword::RevertLayer |
19965                        CSSWideKeyword::Revert => {
19966                            declaration.debug_crash("Found revert/revert-layer not dealt with");
19967                        },
19968                    }
19969                    return;
19970                },
19971                #[cfg(debug_assertions)]
19972                PropertyDeclaration::WithVariables(..) => {
19973                    declaration.debug_crash("Found variables not substituted");
19974                    return;
19975                },
19976                _ => unsafe {
19977                    declaration.unchecked_value_as::<longhands::flex_wrap::SpecifiedValue>()
19978                },
19979            };
19980
19981
19982                let computed = specified_value.to_computed_value(context);
19983                context.builder.set_flex_wrap(computed)
19984        }
19985
19986        pub fn parse_declared<'i, 't>(
19987            context: &ParserContext,
19988            input: &mut Parser<'i, 't>,
19989        ) -> Result<PropertyDeclaration, ParseError<'i>> {
19990                parse(context, input)
19991                .map(PropertyDeclaration::FlexWrap)
19992        }
19993    }
19994
19995
19996
19997
19998    
19999        
20000    
20001    /// https://drafts.csswg.org/css-align/#propdef-justify-content
20002    pub mod justify_content {
20003        #[allow(unused_imports)]
20004        use cssparser::{Parser, BasicParseError, Token};
20005        #[allow(unused_imports)]
20006        use crate::parser::{Parse, ParserContext};
20007        #[allow(unused_imports)]
20008        use crate::properties::{UnparsedValue, ShorthandId};
20009        #[allow(unused_imports)]
20010        use crate::error_reporting::ParseErrorReporter;
20011        #[allow(unused_imports)]
20012        use crate::properties::longhands;
20013        #[allow(unused_imports)]
20014        use crate::properties::{LonghandId, LonghandIdSet};
20015        #[allow(unused_imports)]
20016        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
20017        #[allow(unused_imports)]
20018        use crate::properties::style_structs;
20019        #[allow(unused_imports)]
20020        use selectors::parser::SelectorParseErrorKind;
20021        #[allow(unused_imports)]
20022        use servo_arc::Arc;
20023        #[allow(unused_imports)]
20024        use style_traits::{ParseError, StyleParseErrorKind};
20025        #[allow(unused_imports)]
20026        use crate::values::computed::{Context, ToComputedValue};
20027        #[allow(unused_imports)]
20028        use crate::values::{computed, generics, specified};
20029        #[allow(unused_imports)]
20030        use crate::Atom;
20031        
20032            
20033        #[allow(unused_imports)]
20034        use app_units::Au;
20035        #[allow(unused_imports)]
20036        use crate::values::specified::AllowQuirks;
20037        #[allow(unused_imports)]
20038        use crate::Zero;
20039        #[allow(unused_imports)]
20040        use smallvec::SmallVec;
20041        pub use crate::values::specified::JustifyContent as SpecifiedValue;
20042        pub mod computed_value {
20043            pub use crate::values::computed::JustifyContent as T;
20044        }
20045        #[inline] pub fn get_initial_value() -> computed_value::T { specified::JustifyContent(specified::ContentDistribution::normal()) }
20046        #[allow(unused_variables)]
20047        #[inline]
20048        pub fn parse<'i, 't>(
20049            context: &ParserContext,
20050            input: &mut Parser<'i, 't>,
20051        ) -> Result<SpecifiedValue, ParseError<'i>> {
20052            <specified::JustifyContent as crate::parser::Parse>::parse(context, input)
20053        }
20054    
20055        
20056        #[allow(unused_variables)]
20057        pub unsafe fn cascade_property(
20058            declaration: &PropertyDeclaration,
20059            context: &mut computed::Context,
20060        ) {
20061            context.for_non_inherited_property = true;
20062            debug_assert_eq!(
20063                declaration.id().as_longhand().unwrap(),
20064                LonghandId::JustifyContent,
20065            );
20066            let specified_value = match *declaration {
20067                PropertyDeclaration::CSSWideKeyword(ref wk) => {
20068                    match wk.keyword {
20069                        CSSWideKeyword::Unset |
20070                        CSSWideKeyword::Initial => {
20071                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
20072                        },
20073                        CSSWideKeyword::Inherit => {
20074                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
20075                                context.builder.inherit_justify_content();
20076                        }
20077                        CSSWideKeyword::RevertLayer |
20078                        CSSWideKeyword::Revert => {
20079                            declaration.debug_crash("Found revert/revert-layer not dealt with");
20080                        },
20081                    }
20082                    return;
20083                },
20084                #[cfg(debug_assertions)]
20085                PropertyDeclaration::WithVariables(..) => {
20086                    declaration.debug_crash("Found variables not substituted");
20087                    return;
20088                },
20089                _ => unsafe {
20090                    declaration.unchecked_value_as::<crate::values::specified::JustifyContent>()
20091                },
20092            };
20093
20094
20095                let computed = specified_value.to_computed_value(context);
20096                context.builder.set_justify_content(computed)
20097        }
20098
20099        pub fn parse_declared<'i, 't>(
20100            context: &ParserContext,
20101            input: &mut Parser<'i, 't>,
20102        ) -> Result<PropertyDeclaration, ParseError<'i>> {
20103                parse(context, input)
20104                .map(PropertyDeclaration::JustifyContent)
20105        }
20106    }
20107
20108
20109
20110
20111    
20112        
20113    
20114    /// https://drafts.csswg.org/css-align/#propdef-align-content
20115    pub mod align_content {
20116        #[allow(unused_imports)]
20117        use cssparser::{Parser, BasicParseError, Token};
20118        #[allow(unused_imports)]
20119        use crate::parser::{Parse, ParserContext};
20120        #[allow(unused_imports)]
20121        use crate::properties::{UnparsedValue, ShorthandId};
20122        #[allow(unused_imports)]
20123        use crate::error_reporting::ParseErrorReporter;
20124        #[allow(unused_imports)]
20125        use crate::properties::longhands;
20126        #[allow(unused_imports)]
20127        use crate::properties::{LonghandId, LonghandIdSet};
20128        #[allow(unused_imports)]
20129        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
20130        #[allow(unused_imports)]
20131        use crate::properties::style_structs;
20132        #[allow(unused_imports)]
20133        use selectors::parser::SelectorParseErrorKind;
20134        #[allow(unused_imports)]
20135        use servo_arc::Arc;
20136        #[allow(unused_imports)]
20137        use style_traits::{ParseError, StyleParseErrorKind};
20138        #[allow(unused_imports)]
20139        use crate::values::computed::{Context, ToComputedValue};
20140        #[allow(unused_imports)]
20141        use crate::values::{computed, generics, specified};
20142        #[allow(unused_imports)]
20143        use crate::Atom;
20144        
20145            
20146        #[allow(unused_imports)]
20147        use app_units::Au;
20148        #[allow(unused_imports)]
20149        use crate::values::specified::AllowQuirks;
20150        #[allow(unused_imports)]
20151        use crate::Zero;
20152        #[allow(unused_imports)]
20153        use smallvec::SmallVec;
20154        pub use crate::values::specified::AlignContent as SpecifiedValue;
20155        pub mod computed_value {
20156            pub use crate::values::computed::AlignContent as T;
20157        }
20158        #[inline] pub fn get_initial_value() -> computed_value::T { specified::AlignContent(specified::ContentDistribution::normal()) }
20159        #[allow(unused_variables)]
20160        #[inline]
20161        pub fn parse<'i, 't>(
20162            context: &ParserContext,
20163            input: &mut Parser<'i, 't>,
20164        ) -> Result<SpecifiedValue, ParseError<'i>> {
20165            <specified::AlignContent as crate::parser::Parse>::parse(context, input)
20166        }
20167    
20168        
20169        #[allow(unused_variables)]
20170        pub unsafe fn cascade_property(
20171            declaration: &PropertyDeclaration,
20172            context: &mut computed::Context,
20173        ) {
20174            context.for_non_inherited_property = true;
20175            debug_assert_eq!(
20176                declaration.id().as_longhand().unwrap(),
20177                LonghandId::AlignContent,
20178            );
20179            let specified_value = match *declaration {
20180                PropertyDeclaration::CSSWideKeyword(ref wk) => {
20181                    match wk.keyword {
20182                        CSSWideKeyword::Unset |
20183                        CSSWideKeyword::Initial => {
20184                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
20185                        },
20186                        CSSWideKeyword::Inherit => {
20187                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
20188                                context.builder.inherit_align_content();
20189                        }
20190                        CSSWideKeyword::RevertLayer |
20191                        CSSWideKeyword::Revert => {
20192                            declaration.debug_crash("Found revert/revert-layer not dealt with");
20193                        },
20194                    }
20195                    return;
20196                },
20197                #[cfg(debug_assertions)]
20198                PropertyDeclaration::WithVariables(..) => {
20199                    declaration.debug_crash("Found variables not substituted");
20200                    return;
20201                },
20202                _ => unsafe {
20203                    declaration.unchecked_value_as::<crate::values::specified::AlignContent>()
20204                },
20205            };
20206
20207
20208                let computed = specified_value.to_computed_value(context);
20209                context.builder.set_align_content(computed)
20210        }
20211
20212        pub fn parse_declared<'i, 't>(
20213            context: &ParserContext,
20214            input: &mut Parser<'i, 't>,
20215        ) -> Result<PropertyDeclaration, ParseError<'i>> {
20216                parse(context, input)
20217                .map(PropertyDeclaration::AlignContent)
20218        }
20219    }
20220
20221
20222
20223
20224    
20225        
20226    
20227    /// https://drafts.csswg.org/css-align/#propdef-align-items
20228    pub mod align_items {
20229        #[allow(unused_imports)]
20230        use cssparser::{Parser, BasicParseError, Token};
20231        #[allow(unused_imports)]
20232        use crate::parser::{Parse, ParserContext};
20233        #[allow(unused_imports)]
20234        use crate::properties::{UnparsedValue, ShorthandId};
20235        #[allow(unused_imports)]
20236        use crate::error_reporting::ParseErrorReporter;
20237        #[allow(unused_imports)]
20238        use crate::properties::longhands;
20239        #[allow(unused_imports)]
20240        use crate::properties::{LonghandId, LonghandIdSet};
20241        #[allow(unused_imports)]
20242        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
20243        #[allow(unused_imports)]
20244        use crate::properties::style_structs;
20245        #[allow(unused_imports)]
20246        use selectors::parser::SelectorParseErrorKind;
20247        #[allow(unused_imports)]
20248        use servo_arc::Arc;
20249        #[allow(unused_imports)]
20250        use style_traits::{ParseError, StyleParseErrorKind};
20251        #[allow(unused_imports)]
20252        use crate::values::computed::{Context, ToComputedValue};
20253        #[allow(unused_imports)]
20254        use crate::values::{computed, generics, specified};
20255        #[allow(unused_imports)]
20256        use crate::Atom;
20257        
20258            
20259        #[allow(unused_imports)]
20260        use app_units::Au;
20261        #[allow(unused_imports)]
20262        use crate::values::specified::AllowQuirks;
20263        #[allow(unused_imports)]
20264        use crate::Zero;
20265        #[allow(unused_imports)]
20266        use smallvec::SmallVec;
20267        pub use crate::values::specified::AlignItems as SpecifiedValue;
20268        pub mod computed_value {
20269            pub use crate::values::computed::AlignItems as T;
20270        }
20271        #[inline] pub fn get_initial_value() -> computed_value::T { specified::AlignItems::normal() }
20272        #[allow(unused_variables)]
20273        #[inline]
20274        pub fn parse<'i, 't>(
20275            context: &ParserContext,
20276            input: &mut Parser<'i, 't>,
20277        ) -> Result<SpecifiedValue, ParseError<'i>> {
20278            <specified::AlignItems as crate::parser::Parse>::parse(context, input)
20279        }
20280    
20281        
20282        #[allow(unused_variables)]
20283        pub unsafe fn cascade_property(
20284            declaration: &PropertyDeclaration,
20285            context: &mut computed::Context,
20286        ) {
20287            context.for_non_inherited_property = true;
20288            debug_assert_eq!(
20289                declaration.id().as_longhand().unwrap(),
20290                LonghandId::AlignItems,
20291            );
20292            let specified_value = match *declaration {
20293                PropertyDeclaration::CSSWideKeyword(ref wk) => {
20294                    match wk.keyword {
20295                        CSSWideKeyword::Unset |
20296                        CSSWideKeyword::Initial => {
20297                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
20298                        },
20299                        CSSWideKeyword::Inherit => {
20300                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
20301                                context.builder.inherit_align_items();
20302                        }
20303                        CSSWideKeyword::RevertLayer |
20304                        CSSWideKeyword::Revert => {
20305                            declaration.debug_crash("Found revert/revert-layer not dealt with");
20306                        },
20307                    }
20308                    return;
20309                },
20310                #[cfg(debug_assertions)]
20311                PropertyDeclaration::WithVariables(..) => {
20312                    declaration.debug_crash("Found variables not substituted");
20313                    return;
20314                },
20315                _ => unsafe {
20316                    declaration.unchecked_value_as::<crate::values::specified::AlignItems>()
20317                },
20318            };
20319
20320
20321                let computed = specified_value.to_computed_value(context);
20322                context.builder.set_align_items(computed)
20323        }
20324
20325        pub fn parse_declared<'i, 't>(
20326            context: &ParserContext,
20327            input: &mut Parser<'i, 't>,
20328        ) -> Result<PropertyDeclaration, ParseError<'i>> {
20329                parse(context, input)
20330                .map(PropertyDeclaration::AlignItems)
20331        }
20332    }
20333
20334
20335
20336
20337    
20338        
20339    
20340    /// https://drafts.csswg.org/css-align/#propdef-justify-items
20341    pub mod justify_items {
20342        #[allow(unused_imports)]
20343        use cssparser::{Parser, BasicParseError, Token};
20344        #[allow(unused_imports)]
20345        use crate::parser::{Parse, ParserContext};
20346        #[allow(unused_imports)]
20347        use crate::properties::{UnparsedValue, ShorthandId};
20348        #[allow(unused_imports)]
20349        use crate::error_reporting::ParseErrorReporter;
20350        #[allow(unused_imports)]
20351        use crate::properties::longhands;
20352        #[allow(unused_imports)]
20353        use crate::properties::{LonghandId, LonghandIdSet};
20354        #[allow(unused_imports)]
20355        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
20356        #[allow(unused_imports)]
20357        use crate::properties::style_structs;
20358        #[allow(unused_imports)]
20359        use selectors::parser::SelectorParseErrorKind;
20360        #[allow(unused_imports)]
20361        use servo_arc::Arc;
20362        #[allow(unused_imports)]
20363        use style_traits::{ParseError, StyleParseErrorKind};
20364        #[allow(unused_imports)]
20365        use crate::values::computed::{Context, ToComputedValue};
20366        #[allow(unused_imports)]
20367        use crate::values::{computed, generics, specified};
20368        #[allow(unused_imports)]
20369        use crate::Atom;
20370        
20371            
20372        #[allow(unused_imports)]
20373        use app_units::Au;
20374        #[allow(unused_imports)]
20375        use crate::values::specified::AllowQuirks;
20376        #[allow(unused_imports)]
20377        use crate::Zero;
20378        #[allow(unused_imports)]
20379        use smallvec::SmallVec;
20380        pub use crate::values::specified::JustifyItems as SpecifiedValue;
20381        pub mod computed_value {
20382            pub use crate::values::computed::JustifyItems as T;
20383        }
20384        #[inline] pub fn get_initial_value() -> computed_value::T { computed::JustifyItems::legacy() }
20385        #[allow(unused_variables)]
20386        #[inline]
20387        pub fn parse<'i, 't>(
20388            context: &ParserContext,
20389            input: &mut Parser<'i, 't>,
20390        ) -> Result<SpecifiedValue, ParseError<'i>> {
20391            <specified::JustifyItems as crate::parser::Parse>::parse(context, input)
20392        }
20393    
20394        
20395        #[allow(unused_variables)]
20396        pub unsafe fn cascade_property(
20397            declaration: &PropertyDeclaration,
20398            context: &mut computed::Context,
20399        ) {
20400            context.for_non_inherited_property = true;
20401            debug_assert_eq!(
20402                declaration.id().as_longhand().unwrap(),
20403                LonghandId::JustifyItems,
20404            );
20405            let specified_value = match *declaration {
20406                PropertyDeclaration::CSSWideKeyword(ref wk) => {
20407                    match wk.keyword {
20408                        CSSWideKeyword::Unset |
20409                        CSSWideKeyword::Initial => {
20410                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
20411                        },
20412                        CSSWideKeyword::Inherit => {
20413                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
20414                                context.builder.inherit_justify_items();
20415                        }
20416                        CSSWideKeyword::RevertLayer |
20417                        CSSWideKeyword::Revert => {
20418                            declaration.debug_crash("Found revert/revert-layer not dealt with");
20419                        },
20420                    }
20421                    return;
20422                },
20423                #[cfg(debug_assertions)]
20424                PropertyDeclaration::WithVariables(..) => {
20425                    declaration.debug_crash("Found variables not substituted");
20426                    return;
20427                },
20428                _ => unsafe {
20429                    declaration.unchecked_value_as::<crate::values::specified::JustifyItems>()
20430                },
20431            };
20432
20433
20434                let computed = specified_value.to_computed_value(context);
20435                context.builder.set_justify_items(computed)
20436        }
20437
20438        pub fn parse_declared<'i, 't>(
20439            context: &ParserContext,
20440            input: &mut Parser<'i, 't>,
20441        ) -> Result<PropertyDeclaration, ParseError<'i>> {
20442                parse(context, input)
20443                .map(PropertyDeclaration::JustifyItems)
20444        }
20445    }
20446
20447
20448
20449// Flex item properties
20450
20451    
20452        
20453    
20454    /// https://drafts.csswg.org/css-flexbox/#flex-grow-property
20455    pub mod flex_grow {
20456        #[allow(unused_imports)]
20457        use cssparser::{Parser, BasicParseError, Token};
20458        #[allow(unused_imports)]
20459        use crate::parser::{Parse, ParserContext};
20460        #[allow(unused_imports)]
20461        use crate::properties::{UnparsedValue, ShorthandId};
20462        #[allow(unused_imports)]
20463        use crate::error_reporting::ParseErrorReporter;
20464        #[allow(unused_imports)]
20465        use crate::properties::longhands;
20466        #[allow(unused_imports)]
20467        use crate::properties::{LonghandId, LonghandIdSet};
20468        #[allow(unused_imports)]
20469        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
20470        #[allow(unused_imports)]
20471        use crate::properties::style_structs;
20472        #[allow(unused_imports)]
20473        use selectors::parser::SelectorParseErrorKind;
20474        #[allow(unused_imports)]
20475        use servo_arc::Arc;
20476        #[allow(unused_imports)]
20477        use style_traits::{ParseError, StyleParseErrorKind};
20478        #[allow(unused_imports)]
20479        use crate::values::computed::{Context, ToComputedValue};
20480        #[allow(unused_imports)]
20481        use crate::values::{computed, generics, specified};
20482        #[allow(unused_imports)]
20483        use crate::Atom;
20484        
20485            
20486        #[allow(unused_imports)]
20487        use app_units::Au;
20488        #[allow(unused_imports)]
20489        use crate::values::specified::AllowQuirks;
20490        #[allow(unused_imports)]
20491        use crate::Zero;
20492        #[allow(unused_imports)]
20493        use smallvec::SmallVec;
20494        pub use crate::values::specified::NonNegativeNumber as SpecifiedValue;
20495        pub mod computed_value {
20496            pub use crate::values::computed::NonNegativeNumber as T;
20497        }
20498        #[inline] pub fn get_initial_value() -> computed_value::T { From::from(0.0) }
20499        #[allow(unused_variables)]
20500        #[inline]
20501        pub fn parse<'i, 't>(
20502            context: &ParserContext,
20503            input: &mut Parser<'i, 't>,
20504        ) -> Result<SpecifiedValue, ParseError<'i>> {
20505            <specified::NonNegativeNumber as crate::parser::Parse>::parse(context, input)
20506        }
20507    
20508        
20509        #[allow(unused_variables)]
20510        pub unsafe fn cascade_property(
20511            declaration: &PropertyDeclaration,
20512            context: &mut computed::Context,
20513        ) {
20514            context.for_non_inherited_property = true;
20515            debug_assert_eq!(
20516                declaration.id().as_longhand().unwrap(),
20517                LonghandId::FlexGrow,
20518            );
20519            let specified_value = match *declaration {
20520                PropertyDeclaration::CSSWideKeyword(ref wk) => {
20521                    match wk.keyword {
20522                        CSSWideKeyword::Unset |
20523                        CSSWideKeyword::Initial => {
20524                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
20525                        },
20526                        CSSWideKeyword::Inherit => {
20527                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
20528                                context.builder.inherit_flex_grow();
20529                        }
20530                        CSSWideKeyword::RevertLayer |
20531                        CSSWideKeyword::Revert => {
20532                            declaration.debug_crash("Found revert/revert-layer not dealt with");
20533                        },
20534                    }
20535                    return;
20536                },
20537                #[cfg(debug_assertions)]
20538                PropertyDeclaration::WithVariables(..) => {
20539                    declaration.debug_crash("Found variables not substituted");
20540                    return;
20541                },
20542                _ => unsafe {
20543                    declaration.unchecked_value_as::<crate::values::specified::NonNegativeNumber>()
20544                },
20545            };
20546
20547
20548                let computed = specified_value.to_computed_value(context);
20549                context.builder.set_flex_grow(computed)
20550        }
20551
20552        pub fn parse_declared<'i, 't>(
20553            context: &ParserContext,
20554            input: &mut Parser<'i, 't>,
20555        ) -> Result<PropertyDeclaration, ParseError<'i>> {
20556                parse(context, input)
20557                .map(PropertyDeclaration::FlexGrow)
20558        }
20559    }
20560
20561
20562
20563
20564    
20565        
20566    
20567    /// https://drafts.csswg.org/css-flexbox/#flex-shrink-property
20568    pub mod flex_shrink {
20569        #[allow(unused_imports)]
20570        use cssparser::{Parser, BasicParseError, Token};
20571        #[allow(unused_imports)]
20572        use crate::parser::{Parse, ParserContext};
20573        #[allow(unused_imports)]
20574        use crate::properties::{UnparsedValue, ShorthandId};
20575        #[allow(unused_imports)]
20576        use crate::error_reporting::ParseErrorReporter;
20577        #[allow(unused_imports)]
20578        use crate::properties::longhands;
20579        #[allow(unused_imports)]
20580        use crate::properties::{LonghandId, LonghandIdSet};
20581        #[allow(unused_imports)]
20582        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
20583        #[allow(unused_imports)]
20584        use crate::properties::style_structs;
20585        #[allow(unused_imports)]
20586        use selectors::parser::SelectorParseErrorKind;
20587        #[allow(unused_imports)]
20588        use servo_arc::Arc;
20589        #[allow(unused_imports)]
20590        use style_traits::{ParseError, StyleParseErrorKind};
20591        #[allow(unused_imports)]
20592        use crate::values::computed::{Context, ToComputedValue};
20593        #[allow(unused_imports)]
20594        use crate::values::{computed, generics, specified};
20595        #[allow(unused_imports)]
20596        use crate::Atom;
20597        
20598            
20599        #[allow(unused_imports)]
20600        use app_units::Au;
20601        #[allow(unused_imports)]
20602        use crate::values::specified::AllowQuirks;
20603        #[allow(unused_imports)]
20604        use crate::Zero;
20605        #[allow(unused_imports)]
20606        use smallvec::SmallVec;
20607        pub use crate::values::specified::NonNegativeNumber as SpecifiedValue;
20608        pub mod computed_value {
20609            pub use crate::values::computed::NonNegativeNumber as T;
20610        }
20611        #[inline] pub fn get_initial_value() -> computed_value::T { From::from(1.0) }
20612        #[allow(unused_variables)]
20613        #[inline]
20614        pub fn parse<'i, 't>(
20615            context: &ParserContext,
20616            input: &mut Parser<'i, 't>,
20617        ) -> Result<SpecifiedValue, ParseError<'i>> {
20618            <specified::NonNegativeNumber as crate::parser::Parse>::parse(context, input)
20619        }
20620    
20621        
20622        #[allow(unused_variables)]
20623        pub unsafe fn cascade_property(
20624            declaration: &PropertyDeclaration,
20625            context: &mut computed::Context,
20626        ) {
20627            context.for_non_inherited_property = true;
20628            debug_assert_eq!(
20629                declaration.id().as_longhand().unwrap(),
20630                LonghandId::FlexShrink,
20631            );
20632            let specified_value = match *declaration {
20633                PropertyDeclaration::CSSWideKeyword(ref wk) => {
20634                    match wk.keyword {
20635                        CSSWideKeyword::Unset |
20636                        CSSWideKeyword::Initial => {
20637                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
20638                        },
20639                        CSSWideKeyword::Inherit => {
20640                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
20641                                context.builder.inherit_flex_shrink();
20642                        }
20643                        CSSWideKeyword::RevertLayer |
20644                        CSSWideKeyword::Revert => {
20645                            declaration.debug_crash("Found revert/revert-layer not dealt with");
20646                        },
20647                    }
20648                    return;
20649                },
20650                #[cfg(debug_assertions)]
20651                PropertyDeclaration::WithVariables(..) => {
20652                    declaration.debug_crash("Found variables not substituted");
20653                    return;
20654                },
20655                _ => unsafe {
20656                    declaration.unchecked_value_as::<crate::values::specified::NonNegativeNumber>()
20657                },
20658            };
20659
20660
20661                let computed = specified_value.to_computed_value(context);
20662                context.builder.set_flex_shrink(computed)
20663        }
20664
20665        pub fn parse_declared<'i, 't>(
20666            context: &ParserContext,
20667            input: &mut Parser<'i, 't>,
20668        ) -> Result<PropertyDeclaration, ParseError<'i>> {
20669                parse(context, input)
20670                .map(PropertyDeclaration::FlexShrink)
20671        }
20672    }
20673
20674
20675
20676// https://drafts.csswg.org/css-align/#align-self-property
20677
20678    
20679        
20680    
20681    /// https://drafts.csswg.org/css-align/#align-self-property
20682    pub mod align_self {
20683        #[allow(unused_imports)]
20684        use cssparser::{Parser, BasicParseError, Token};
20685        #[allow(unused_imports)]
20686        use crate::parser::{Parse, ParserContext};
20687        #[allow(unused_imports)]
20688        use crate::properties::{UnparsedValue, ShorthandId};
20689        #[allow(unused_imports)]
20690        use crate::error_reporting::ParseErrorReporter;
20691        #[allow(unused_imports)]
20692        use crate::properties::longhands;
20693        #[allow(unused_imports)]
20694        use crate::properties::{LonghandId, LonghandIdSet};
20695        #[allow(unused_imports)]
20696        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
20697        #[allow(unused_imports)]
20698        use crate::properties::style_structs;
20699        #[allow(unused_imports)]
20700        use selectors::parser::SelectorParseErrorKind;
20701        #[allow(unused_imports)]
20702        use servo_arc::Arc;
20703        #[allow(unused_imports)]
20704        use style_traits::{ParseError, StyleParseErrorKind};
20705        #[allow(unused_imports)]
20706        use crate::values::computed::{Context, ToComputedValue};
20707        #[allow(unused_imports)]
20708        use crate::values::{computed, generics, specified};
20709        #[allow(unused_imports)]
20710        use crate::Atom;
20711        
20712            
20713        #[allow(unused_imports)]
20714        use app_units::Au;
20715        #[allow(unused_imports)]
20716        use crate::values::specified::AllowQuirks;
20717        #[allow(unused_imports)]
20718        use crate::Zero;
20719        #[allow(unused_imports)]
20720        use smallvec::SmallVec;
20721        pub use crate::values::specified::AlignSelf as SpecifiedValue;
20722        pub mod computed_value {
20723            pub use crate::values::computed::AlignSelf as T;
20724        }
20725        #[inline] pub fn get_initial_value() -> computed_value::T { specified::AlignSelf(specified::SelfAlignment::auto()) }
20726        #[allow(unused_variables)]
20727        #[inline]
20728        pub fn parse<'i, 't>(
20729            context: &ParserContext,
20730            input: &mut Parser<'i, 't>,
20731        ) -> Result<SpecifiedValue, ParseError<'i>> {
20732            <specified::AlignSelf as crate::parser::Parse>::parse(context, input)
20733        }
20734    
20735        
20736        #[allow(unused_variables)]
20737        pub unsafe fn cascade_property(
20738            declaration: &PropertyDeclaration,
20739            context: &mut computed::Context,
20740        ) {
20741            context.for_non_inherited_property = true;
20742            debug_assert_eq!(
20743                declaration.id().as_longhand().unwrap(),
20744                LonghandId::AlignSelf,
20745            );
20746            let specified_value = match *declaration {
20747                PropertyDeclaration::CSSWideKeyword(ref wk) => {
20748                    match wk.keyword {
20749                        CSSWideKeyword::Unset |
20750                        CSSWideKeyword::Initial => {
20751                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
20752                        },
20753                        CSSWideKeyword::Inherit => {
20754                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
20755                                context.builder.inherit_align_self();
20756                        }
20757                        CSSWideKeyword::RevertLayer |
20758                        CSSWideKeyword::Revert => {
20759                            declaration.debug_crash("Found revert/revert-layer not dealt with");
20760                        },
20761                    }
20762                    return;
20763                },
20764                #[cfg(debug_assertions)]
20765                PropertyDeclaration::WithVariables(..) => {
20766                    declaration.debug_crash("Found variables not substituted");
20767                    return;
20768                },
20769                _ => unsafe {
20770                    declaration.unchecked_value_as::<crate::values::specified::AlignSelf>()
20771                },
20772            };
20773
20774
20775                let computed = specified_value.to_computed_value(context);
20776                context.builder.set_align_self(computed)
20777        }
20778
20779        pub fn parse_declared<'i, 't>(
20780            context: &ParserContext,
20781            input: &mut Parser<'i, 't>,
20782        ) -> Result<PropertyDeclaration, ParseError<'i>> {
20783                parse(context, input)
20784                .map(PropertyDeclaration::AlignSelf)
20785        }
20786    }
20787
20788
20789
20790    
20791        
20792    
20793    /// https://drafts.csswg.org/css-align/#justify-self-property
20794    pub mod justify_self {
20795        #[allow(unused_imports)]
20796        use cssparser::{Parser, BasicParseError, Token};
20797        #[allow(unused_imports)]
20798        use crate::parser::{Parse, ParserContext};
20799        #[allow(unused_imports)]
20800        use crate::properties::{UnparsedValue, ShorthandId};
20801        #[allow(unused_imports)]
20802        use crate::error_reporting::ParseErrorReporter;
20803        #[allow(unused_imports)]
20804        use crate::properties::longhands;
20805        #[allow(unused_imports)]
20806        use crate::properties::{LonghandId, LonghandIdSet};
20807        #[allow(unused_imports)]
20808        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
20809        #[allow(unused_imports)]
20810        use crate::properties::style_structs;
20811        #[allow(unused_imports)]
20812        use selectors::parser::SelectorParseErrorKind;
20813        #[allow(unused_imports)]
20814        use servo_arc::Arc;
20815        #[allow(unused_imports)]
20816        use style_traits::{ParseError, StyleParseErrorKind};
20817        #[allow(unused_imports)]
20818        use crate::values::computed::{Context, ToComputedValue};
20819        #[allow(unused_imports)]
20820        use crate::values::{computed, generics, specified};
20821        #[allow(unused_imports)]
20822        use crate::Atom;
20823        
20824            
20825        #[allow(unused_imports)]
20826        use app_units::Au;
20827        #[allow(unused_imports)]
20828        use crate::values::specified::AllowQuirks;
20829        #[allow(unused_imports)]
20830        use crate::Zero;
20831        #[allow(unused_imports)]
20832        use smallvec::SmallVec;
20833        pub use crate::values::specified::JustifySelf as SpecifiedValue;
20834        pub mod computed_value {
20835            pub use crate::values::computed::JustifySelf as T;
20836        }
20837        #[inline] pub fn get_initial_value() -> computed_value::T { specified::JustifySelf(specified::SelfAlignment::auto()) }
20838        #[allow(unused_variables)]
20839        #[inline]
20840        pub fn parse<'i, 't>(
20841            context: &ParserContext,
20842            input: &mut Parser<'i, 't>,
20843        ) -> Result<SpecifiedValue, ParseError<'i>> {
20844            <specified::JustifySelf as crate::parser::Parse>::parse(context, input)
20845        }
20846    
20847        
20848        #[allow(unused_variables)]
20849        pub unsafe fn cascade_property(
20850            declaration: &PropertyDeclaration,
20851            context: &mut computed::Context,
20852        ) {
20853            context.for_non_inherited_property = true;
20854            debug_assert_eq!(
20855                declaration.id().as_longhand().unwrap(),
20856                LonghandId::JustifySelf,
20857            );
20858            let specified_value = match *declaration {
20859                PropertyDeclaration::CSSWideKeyword(ref wk) => {
20860                    match wk.keyword {
20861                        CSSWideKeyword::Unset |
20862                        CSSWideKeyword::Initial => {
20863                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
20864                        },
20865                        CSSWideKeyword::Inherit => {
20866                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
20867                                context.builder.inherit_justify_self();
20868                        }
20869                        CSSWideKeyword::RevertLayer |
20870                        CSSWideKeyword::Revert => {
20871                            declaration.debug_crash("Found revert/revert-layer not dealt with");
20872                        },
20873                    }
20874                    return;
20875                },
20876                #[cfg(debug_assertions)]
20877                PropertyDeclaration::WithVariables(..) => {
20878                    declaration.debug_crash("Found variables not substituted");
20879                    return;
20880                },
20881                _ => unsafe {
20882                    declaration.unchecked_value_as::<crate::values::specified::JustifySelf>()
20883                },
20884            };
20885
20886
20887                let computed = specified_value.to_computed_value(context);
20888                context.builder.set_justify_self(computed)
20889        }
20890
20891        pub fn parse_declared<'i, 't>(
20892            context: &ParserContext,
20893            input: &mut Parser<'i, 't>,
20894        ) -> Result<PropertyDeclaration, ParseError<'i>> {
20895                parse(context, input)
20896                .map(PropertyDeclaration::JustifySelf)
20897        }
20898    }
20899
20900
20901
20902// https://drafts.csswg.org/css-flexbox/#propdef-order
20903
20904    
20905        
20906    
20907    /// https://drafts.csswg.org/css-flexbox/#order-property
20908    pub mod order {
20909        #[allow(unused_imports)]
20910        use cssparser::{Parser, BasicParseError, Token};
20911        #[allow(unused_imports)]
20912        use crate::parser::{Parse, ParserContext};
20913        #[allow(unused_imports)]
20914        use crate::properties::{UnparsedValue, ShorthandId};
20915        #[allow(unused_imports)]
20916        use crate::error_reporting::ParseErrorReporter;
20917        #[allow(unused_imports)]
20918        use crate::properties::longhands;
20919        #[allow(unused_imports)]
20920        use crate::properties::{LonghandId, LonghandIdSet};
20921        #[allow(unused_imports)]
20922        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
20923        #[allow(unused_imports)]
20924        use crate::properties::style_structs;
20925        #[allow(unused_imports)]
20926        use selectors::parser::SelectorParseErrorKind;
20927        #[allow(unused_imports)]
20928        use servo_arc::Arc;
20929        #[allow(unused_imports)]
20930        use style_traits::{ParseError, StyleParseErrorKind};
20931        #[allow(unused_imports)]
20932        use crate::values::computed::{Context, ToComputedValue};
20933        #[allow(unused_imports)]
20934        use crate::values::{computed, generics, specified};
20935        #[allow(unused_imports)]
20936        use crate::Atom;
20937        
20938            
20939        #[allow(unused_imports)]
20940        use app_units::Au;
20941        #[allow(unused_imports)]
20942        use crate::values::specified::AllowQuirks;
20943        #[allow(unused_imports)]
20944        use crate::Zero;
20945        #[allow(unused_imports)]
20946        use smallvec::SmallVec;
20947        pub use crate::values::specified::Integer as SpecifiedValue;
20948        pub mod computed_value {
20949            pub use crate::values::computed::Integer as T;
20950        }
20951        #[inline] pub fn get_initial_value() -> computed_value::T { 0 }
20952        #[allow(unused_variables)]
20953        #[inline]
20954        pub fn parse<'i, 't>(
20955            context: &ParserContext,
20956            input: &mut Parser<'i, 't>,
20957        ) -> Result<SpecifiedValue, ParseError<'i>> {
20958            <specified::Integer as crate::parser::Parse>::parse(context, input)
20959        }
20960    
20961        
20962        #[allow(unused_variables)]
20963        pub unsafe fn cascade_property(
20964            declaration: &PropertyDeclaration,
20965            context: &mut computed::Context,
20966        ) {
20967            context.for_non_inherited_property = true;
20968            debug_assert_eq!(
20969                declaration.id().as_longhand().unwrap(),
20970                LonghandId::Order,
20971            );
20972            let specified_value = match *declaration {
20973                PropertyDeclaration::CSSWideKeyword(ref wk) => {
20974                    match wk.keyword {
20975                        CSSWideKeyword::Unset |
20976                        CSSWideKeyword::Initial => {
20977                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
20978                        },
20979                        CSSWideKeyword::Inherit => {
20980                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
20981                                context.builder.inherit_order();
20982                        }
20983                        CSSWideKeyword::RevertLayer |
20984                        CSSWideKeyword::Revert => {
20985                            declaration.debug_crash("Found revert/revert-layer not dealt with");
20986                        },
20987                    }
20988                    return;
20989                },
20990                #[cfg(debug_assertions)]
20991                PropertyDeclaration::WithVariables(..) => {
20992                    declaration.debug_crash("Found variables not substituted");
20993                    return;
20994                },
20995                _ => unsafe {
20996                    declaration.unchecked_value_as::<crate::values::specified::Integer>()
20997                },
20998            };
20999
21000
21001                let computed = specified_value.to_computed_value(context);
21002                context.builder.set_order(computed)
21003        }
21004
21005        pub fn parse_declared<'i, 't>(
21006            context: &ParserContext,
21007            input: &mut Parser<'i, 't>,
21008        ) -> Result<PropertyDeclaration, ParseError<'i>> {
21009                parse(context, input)
21010                .map(PropertyDeclaration::Order)
21011        }
21012    }
21013
21014
21015
21016
21017    
21018        
21019    
21020    /// https://drafts.csswg.org/css-flexbox/#flex-basis-property
21021    pub mod flex_basis {
21022        #[allow(unused_imports)]
21023        use cssparser::{Parser, BasicParseError, Token};
21024        #[allow(unused_imports)]
21025        use crate::parser::{Parse, ParserContext};
21026        #[allow(unused_imports)]
21027        use crate::properties::{UnparsedValue, ShorthandId};
21028        #[allow(unused_imports)]
21029        use crate::error_reporting::ParseErrorReporter;
21030        #[allow(unused_imports)]
21031        use crate::properties::longhands;
21032        #[allow(unused_imports)]
21033        use crate::properties::{LonghandId, LonghandIdSet};
21034        #[allow(unused_imports)]
21035        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
21036        #[allow(unused_imports)]
21037        use crate::properties::style_structs;
21038        #[allow(unused_imports)]
21039        use selectors::parser::SelectorParseErrorKind;
21040        #[allow(unused_imports)]
21041        use servo_arc::Arc;
21042        #[allow(unused_imports)]
21043        use style_traits::{ParseError, StyleParseErrorKind};
21044        #[allow(unused_imports)]
21045        use crate::values::computed::{Context, ToComputedValue};
21046        #[allow(unused_imports)]
21047        use crate::values::{computed, generics, specified};
21048        #[allow(unused_imports)]
21049        use crate::Atom;
21050        
21051            
21052        #[allow(unused_imports)]
21053        use app_units::Au;
21054        #[allow(unused_imports)]
21055        use crate::values::specified::AllowQuirks;
21056        #[allow(unused_imports)]
21057        use crate::Zero;
21058        #[allow(unused_imports)]
21059        use smallvec::SmallVec;
21060        pub use crate::values::specified::FlexBasis as SpecifiedValue;
21061        pub mod computed_value {
21062            pub use crate::values::computed::FlexBasis as T;
21063        }
21064        #[inline] pub fn get_initial_value() -> computed_value::T { computed::FlexBasis::auto() }
21065        #[allow(unused_variables)]
21066        #[inline]
21067        pub fn parse<'i, 't>(
21068            context: &ParserContext,
21069            input: &mut Parser<'i, 't>,
21070        ) -> Result<SpecifiedValue, ParseError<'i>> {
21071            <specified::FlexBasis as crate::parser::Parse>::parse(context, input)
21072        }
21073    
21074        
21075        #[allow(unused_variables)]
21076        pub unsafe fn cascade_property(
21077            declaration: &PropertyDeclaration,
21078            context: &mut computed::Context,
21079        ) {
21080            context.for_non_inherited_property = true;
21081            debug_assert_eq!(
21082                declaration.id().as_longhand().unwrap(),
21083                LonghandId::FlexBasis,
21084            );
21085            let specified_value = match *declaration {
21086                PropertyDeclaration::CSSWideKeyword(ref wk) => {
21087                    match wk.keyword {
21088                        CSSWideKeyword::Unset |
21089                        CSSWideKeyword::Initial => {
21090                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
21091                        },
21092                        CSSWideKeyword::Inherit => {
21093                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
21094                                context.builder.inherit_flex_basis();
21095                        }
21096                        CSSWideKeyword::RevertLayer |
21097                        CSSWideKeyword::Revert => {
21098                            declaration.debug_crash("Found revert/revert-layer not dealt with");
21099                        },
21100                    }
21101                    return;
21102                },
21103                #[cfg(debug_assertions)]
21104                PropertyDeclaration::WithVariables(..) => {
21105                    declaration.debug_crash("Found variables not substituted");
21106                    return;
21107                },
21108                _ => unsafe {
21109                    declaration.unchecked_value_as::<Box<crate::values::specified::FlexBasis>>()
21110                },
21111            };
21112
21113
21114                let computed = (**specified_value).to_computed_value(context);
21115                context.builder.set_flex_basis(computed)
21116        }
21117
21118        pub fn parse_declared<'i, 't>(
21119            context: &ParserContext,
21120            input: &mut Parser<'i, 't>,
21121        ) -> Result<PropertyDeclaration, ParseError<'i>> {
21122                parse(context, input)
21123                .map(Box::new)
21124                .map(PropertyDeclaration::FlexBasis)
21125        }
21126    }
21127
21128
21129
21130    
21131    // width, height, block-size, inline-size
21132    
21133    
21134        
21135    
21136    /// https://drafts.csswg.org/css-box/#propdef-height
21137    pub mod height {
21138        #[allow(unused_imports)]
21139        use cssparser::{Parser, BasicParseError, Token};
21140        #[allow(unused_imports)]
21141        use crate::parser::{Parse, ParserContext};
21142        #[allow(unused_imports)]
21143        use crate::properties::{UnparsedValue, ShorthandId};
21144        #[allow(unused_imports)]
21145        use crate::error_reporting::ParseErrorReporter;
21146        #[allow(unused_imports)]
21147        use crate::properties::longhands;
21148        #[allow(unused_imports)]
21149        use crate::properties::{LonghandId, LonghandIdSet};
21150        #[allow(unused_imports)]
21151        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
21152        #[allow(unused_imports)]
21153        use crate::properties::style_structs;
21154        #[allow(unused_imports)]
21155        use selectors::parser::SelectorParseErrorKind;
21156        #[allow(unused_imports)]
21157        use servo_arc::Arc;
21158        #[allow(unused_imports)]
21159        use style_traits::{ParseError, StyleParseErrorKind};
21160        #[allow(unused_imports)]
21161        use crate::values::computed::{Context, ToComputedValue};
21162        #[allow(unused_imports)]
21163        use crate::values::{computed, generics, specified};
21164        #[allow(unused_imports)]
21165        use crate::Atom;
21166        
21167            
21168        #[allow(unused_imports)]
21169        use app_units::Au;
21170        #[allow(unused_imports)]
21171        use crate::values::specified::AllowQuirks;
21172        #[allow(unused_imports)]
21173        use crate::Zero;
21174        #[allow(unused_imports)]
21175        use smallvec::SmallVec;
21176        pub use crate::values::specified::Size as SpecifiedValue;
21177        pub mod computed_value {
21178            pub use crate::values::computed::Size as T;
21179        }
21180        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Size::auto() }
21181        #[allow(unused_variables)]
21182        #[inline]
21183        pub fn parse<'i, 't>(
21184            context: &ParserContext,
21185            input: &mut Parser<'i, 't>,
21186        ) -> Result<SpecifiedValue, ParseError<'i>> {
21187            specified::Size::parse_quirky(context, input, AllowQuirks::Yes)
21188        }
21189    
21190        
21191        #[allow(unused_variables)]
21192        pub unsafe fn cascade_property(
21193            declaration: &PropertyDeclaration,
21194            context: &mut computed::Context,
21195        ) {
21196            context.for_non_inherited_property = true;
21197            debug_assert_eq!(
21198                declaration.id().as_longhand().unwrap().logical_group(),
21199                LonghandId::Height.logical_group(),
21200            );
21201            let specified_value = match *declaration {
21202                PropertyDeclaration::CSSWideKeyword(ref wk) => {
21203                    match wk.keyword {
21204                        CSSWideKeyword::Unset |
21205                        CSSWideKeyword::Initial => {
21206                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
21207                        },
21208                        CSSWideKeyword::Inherit => {
21209                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
21210                                if !context.builder.effective_zoom_for_inheritance.is_one() {
21211                                    let old_zoom = context.builder.effective_zoom;
21212                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
21213                                    let computed = context.builder.inherited_style.clone_height();
21214                                    let specified = ToComputedValue::from_computed_value(&computed);
21215                                    let decl = PropertyDeclaration::Height(specified);
21216                                    cascade_property(&decl, context);
21217                                    context.builder.effective_zoom = old_zoom;
21218                                    return;
21219                                }
21220                                context.builder.inherit_height();
21221                        }
21222                        CSSWideKeyword::RevertLayer |
21223                        CSSWideKeyword::Revert => {
21224                            declaration.debug_crash("Found revert/revert-layer not dealt with");
21225                        },
21226                    }
21227                    return;
21228                },
21229                #[cfg(debug_assertions)]
21230                PropertyDeclaration::WithVariables(..) => {
21231                    declaration.debug_crash("Found variables not substituted");
21232                    return;
21233                },
21234                _ => unsafe {
21235                    declaration.unchecked_value_as::<crate::values::specified::Size>()
21236                },
21237            };
21238
21239
21240                let computed = specified_value.to_computed_value(context);
21241                context.builder.set_height(computed)
21242        }
21243
21244        pub fn parse_declared<'i, 't>(
21245            context: &ParserContext,
21246            input: &mut Parser<'i, 't>,
21247        ) -> Result<PropertyDeclaration, ParseError<'i>> {
21248                parse(context, input)
21249                .map(PropertyDeclaration::Height)
21250        }
21251    }
21252
21253
21254    // min-width, min-height, min-block-size, min-inline-size
21255    
21256    
21257        
21258    
21259    /// https://drafts.csswg.org/css-box/#propdef-height
21260    pub mod min_height {
21261        #[allow(unused_imports)]
21262        use cssparser::{Parser, BasicParseError, Token};
21263        #[allow(unused_imports)]
21264        use crate::parser::{Parse, ParserContext};
21265        #[allow(unused_imports)]
21266        use crate::properties::{UnparsedValue, ShorthandId};
21267        #[allow(unused_imports)]
21268        use crate::error_reporting::ParseErrorReporter;
21269        #[allow(unused_imports)]
21270        use crate::properties::longhands;
21271        #[allow(unused_imports)]
21272        use crate::properties::{LonghandId, LonghandIdSet};
21273        #[allow(unused_imports)]
21274        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
21275        #[allow(unused_imports)]
21276        use crate::properties::style_structs;
21277        #[allow(unused_imports)]
21278        use selectors::parser::SelectorParseErrorKind;
21279        #[allow(unused_imports)]
21280        use servo_arc::Arc;
21281        #[allow(unused_imports)]
21282        use style_traits::{ParseError, StyleParseErrorKind};
21283        #[allow(unused_imports)]
21284        use crate::values::computed::{Context, ToComputedValue};
21285        #[allow(unused_imports)]
21286        use crate::values::{computed, generics, specified};
21287        #[allow(unused_imports)]
21288        use crate::Atom;
21289        
21290            
21291        #[allow(unused_imports)]
21292        use app_units::Au;
21293        #[allow(unused_imports)]
21294        use crate::values::specified::AllowQuirks;
21295        #[allow(unused_imports)]
21296        use crate::Zero;
21297        #[allow(unused_imports)]
21298        use smallvec::SmallVec;
21299        pub use crate::values::specified::Size as SpecifiedValue;
21300        pub mod computed_value {
21301            pub use crate::values::computed::Size as T;
21302        }
21303        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Size::auto() }
21304        #[allow(unused_variables)]
21305        #[inline]
21306        pub fn parse<'i, 't>(
21307            context: &ParserContext,
21308            input: &mut Parser<'i, 't>,
21309        ) -> Result<SpecifiedValue, ParseError<'i>> {
21310            specified::Size::parse_quirky(context, input, AllowQuirks::Yes)
21311        }
21312    
21313        
21314        #[allow(unused_variables)]
21315        pub unsafe fn cascade_property(
21316            declaration: &PropertyDeclaration,
21317            context: &mut computed::Context,
21318        ) {
21319            context.for_non_inherited_property = true;
21320            debug_assert_eq!(
21321                declaration.id().as_longhand().unwrap().logical_group(),
21322                LonghandId::MinHeight.logical_group(),
21323            );
21324            let specified_value = match *declaration {
21325                PropertyDeclaration::CSSWideKeyword(ref wk) => {
21326                    match wk.keyword {
21327                        CSSWideKeyword::Unset |
21328                        CSSWideKeyword::Initial => {
21329                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
21330                        },
21331                        CSSWideKeyword::Inherit => {
21332                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
21333                                if !context.builder.effective_zoom_for_inheritance.is_one() {
21334                                    let old_zoom = context.builder.effective_zoom;
21335                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
21336                                    let computed = context.builder.inherited_style.clone_min_height();
21337                                    let specified = ToComputedValue::from_computed_value(&computed);
21338                                    let decl = PropertyDeclaration::MinHeight(specified);
21339                                    cascade_property(&decl, context);
21340                                    context.builder.effective_zoom = old_zoom;
21341                                    return;
21342                                }
21343                                context.builder.inherit_min_height();
21344                        }
21345                        CSSWideKeyword::RevertLayer |
21346                        CSSWideKeyword::Revert => {
21347                            declaration.debug_crash("Found revert/revert-layer not dealt with");
21348                        },
21349                    }
21350                    return;
21351                },
21352                #[cfg(debug_assertions)]
21353                PropertyDeclaration::WithVariables(..) => {
21354                    declaration.debug_crash("Found variables not substituted");
21355                    return;
21356                },
21357                _ => unsafe {
21358                    declaration.unchecked_value_as::<crate::values::specified::Size>()
21359                },
21360            };
21361
21362
21363                let computed = specified_value.to_computed_value(context);
21364                context.builder.set_min_height(computed)
21365        }
21366
21367        pub fn parse_declared<'i, 't>(
21368            context: &ParserContext,
21369            input: &mut Parser<'i, 't>,
21370        ) -> Result<PropertyDeclaration, ParseError<'i>> {
21371                parse(context, input)
21372                .map(PropertyDeclaration::MinHeight)
21373        }
21374    }
21375
21376
21377    
21378    
21379        
21380    
21381    /// https://drafts.csswg.org/css-box/#propdef-height
21382    pub mod max_height {
21383        #[allow(unused_imports)]
21384        use cssparser::{Parser, BasicParseError, Token};
21385        #[allow(unused_imports)]
21386        use crate::parser::{Parse, ParserContext};
21387        #[allow(unused_imports)]
21388        use crate::properties::{UnparsedValue, ShorthandId};
21389        #[allow(unused_imports)]
21390        use crate::error_reporting::ParseErrorReporter;
21391        #[allow(unused_imports)]
21392        use crate::properties::longhands;
21393        #[allow(unused_imports)]
21394        use crate::properties::{LonghandId, LonghandIdSet};
21395        #[allow(unused_imports)]
21396        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
21397        #[allow(unused_imports)]
21398        use crate::properties::style_structs;
21399        #[allow(unused_imports)]
21400        use selectors::parser::SelectorParseErrorKind;
21401        #[allow(unused_imports)]
21402        use servo_arc::Arc;
21403        #[allow(unused_imports)]
21404        use style_traits::{ParseError, StyleParseErrorKind};
21405        #[allow(unused_imports)]
21406        use crate::values::computed::{Context, ToComputedValue};
21407        #[allow(unused_imports)]
21408        use crate::values::{computed, generics, specified};
21409        #[allow(unused_imports)]
21410        use crate::Atom;
21411        
21412            
21413        #[allow(unused_imports)]
21414        use app_units::Au;
21415        #[allow(unused_imports)]
21416        use crate::values::specified::AllowQuirks;
21417        #[allow(unused_imports)]
21418        use crate::Zero;
21419        #[allow(unused_imports)]
21420        use smallvec::SmallVec;
21421        pub use crate::values::specified::MaxSize as SpecifiedValue;
21422        pub mod computed_value {
21423            pub use crate::values::computed::MaxSize as T;
21424        }
21425        #[inline] pub fn get_initial_value() -> computed_value::T { computed::MaxSize::none() }
21426        #[allow(unused_variables)]
21427        #[inline]
21428        pub fn parse<'i, 't>(
21429            context: &ParserContext,
21430            input: &mut Parser<'i, 't>,
21431        ) -> Result<SpecifiedValue, ParseError<'i>> {
21432            specified::MaxSize::parse_quirky(context, input, AllowQuirks::Yes)
21433        }
21434    
21435        
21436        #[allow(unused_variables)]
21437        pub unsafe fn cascade_property(
21438            declaration: &PropertyDeclaration,
21439            context: &mut computed::Context,
21440        ) {
21441            context.for_non_inherited_property = true;
21442            debug_assert_eq!(
21443                declaration.id().as_longhand().unwrap().logical_group(),
21444                LonghandId::MaxHeight.logical_group(),
21445            );
21446            let specified_value = match *declaration {
21447                PropertyDeclaration::CSSWideKeyword(ref wk) => {
21448                    match wk.keyword {
21449                        CSSWideKeyword::Unset |
21450                        CSSWideKeyword::Initial => {
21451                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
21452                        },
21453                        CSSWideKeyword::Inherit => {
21454                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
21455                                if !context.builder.effective_zoom_for_inheritance.is_one() {
21456                                    let old_zoom = context.builder.effective_zoom;
21457                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
21458                                    let computed = context.builder.inherited_style.clone_max_height();
21459                                    let specified = ToComputedValue::from_computed_value(&computed);
21460                                    let decl = PropertyDeclaration::MaxHeight(specified);
21461                                    cascade_property(&decl, context);
21462                                    context.builder.effective_zoom = old_zoom;
21463                                    return;
21464                                }
21465                                context.builder.inherit_max_height();
21466                        }
21467                        CSSWideKeyword::RevertLayer |
21468                        CSSWideKeyword::Revert => {
21469                            declaration.debug_crash("Found revert/revert-layer not dealt with");
21470                        },
21471                    }
21472                    return;
21473                },
21474                #[cfg(debug_assertions)]
21475                PropertyDeclaration::WithVariables(..) => {
21476                    declaration.debug_crash("Found variables not substituted");
21477                    return;
21478                },
21479                _ => unsafe {
21480                    declaration.unchecked_value_as::<crate::values::specified::MaxSize>()
21481                },
21482            };
21483
21484
21485                let computed = specified_value.to_computed_value(context);
21486                context.builder.set_max_height(computed)
21487        }
21488
21489        pub fn parse_declared<'i, 't>(
21490            context: &ParserContext,
21491            input: &mut Parser<'i, 't>,
21492        ) -> Result<PropertyDeclaration, ParseError<'i>> {
21493                parse(context, input)
21494                .map(PropertyDeclaration::MaxHeight)
21495        }
21496    }
21497
21498
21499    
21500    // width, height, block-size, inline-size
21501    
21502    
21503        
21504    
21505    /// https://drafts.csswg.org/css-box/#propdef-width
21506    pub mod width {
21507        #[allow(unused_imports)]
21508        use cssparser::{Parser, BasicParseError, Token};
21509        #[allow(unused_imports)]
21510        use crate::parser::{Parse, ParserContext};
21511        #[allow(unused_imports)]
21512        use crate::properties::{UnparsedValue, ShorthandId};
21513        #[allow(unused_imports)]
21514        use crate::error_reporting::ParseErrorReporter;
21515        #[allow(unused_imports)]
21516        use crate::properties::longhands;
21517        #[allow(unused_imports)]
21518        use crate::properties::{LonghandId, LonghandIdSet};
21519        #[allow(unused_imports)]
21520        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
21521        #[allow(unused_imports)]
21522        use crate::properties::style_structs;
21523        #[allow(unused_imports)]
21524        use selectors::parser::SelectorParseErrorKind;
21525        #[allow(unused_imports)]
21526        use servo_arc::Arc;
21527        #[allow(unused_imports)]
21528        use style_traits::{ParseError, StyleParseErrorKind};
21529        #[allow(unused_imports)]
21530        use crate::values::computed::{Context, ToComputedValue};
21531        #[allow(unused_imports)]
21532        use crate::values::{computed, generics, specified};
21533        #[allow(unused_imports)]
21534        use crate::Atom;
21535        
21536            
21537        #[allow(unused_imports)]
21538        use app_units::Au;
21539        #[allow(unused_imports)]
21540        use crate::values::specified::AllowQuirks;
21541        #[allow(unused_imports)]
21542        use crate::Zero;
21543        #[allow(unused_imports)]
21544        use smallvec::SmallVec;
21545        pub use crate::values::specified::Size as SpecifiedValue;
21546        pub mod computed_value {
21547            pub use crate::values::computed::Size as T;
21548        }
21549        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Size::auto() }
21550        #[allow(unused_variables)]
21551        #[inline]
21552        pub fn parse<'i, 't>(
21553            context: &ParserContext,
21554            input: &mut Parser<'i, 't>,
21555        ) -> Result<SpecifiedValue, ParseError<'i>> {
21556            specified::Size::parse_quirky(context, input, AllowQuirks::Yes)
21557        }
21558    
21559        
21560        #[allow(unused_variables)]
21561        pub unsafe fn cascade_property(
21562            declaration: &PropertyDeclaration,
21563            context: &mut computed::Context,
21564        ) {
21565            context.for_non_inherited_property = true;
21566            debug_assert_eq!(
21567                declaration.id().as_longhand().unwrap().logical_group(),
21568                LonghandId::Width.logical_group(),
21569            );
21570            let specified_value = match *declaration {
21571                PropertyDeclaration::CSSWideKeyword(ref wk) => {
21572                    match wk.keyword {
21573                        CSSWideKeyword::Unset |
21574                        CSSWideKeyword::Initial => {
21575                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
21576                        },
21577                        CSSWideKeyword::Inherit => {
21578                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
21579                                if !context.builder.effective_zoom_for_inheritance.is_one() {
21580                                    let old_zoom = context.builder.effective_zoom;
21581                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
21582                                    let computed = context.builder.inherited_style.clone_width();
21583                                    let specified = ToComputedValue::from_computed_value(&computed);
21584                                    let decl = PropertyDeclaration::Width(specified);
21585                                    cascade_property(&decl, context);
21586                                    context.builder.effective_zoom = old_zoom;
21587                                    return;
21588                                }
21589                                context.builder.inherit_width();
21590                        }
21591                        CSSWideKeyword::RevertLayer |
21592                        CSSWideKeyword::Revert => {
21593                            declaration.debug_crash("Found revert/revert-layer not dealt with");
21594                        },
21595                    }
21596                    return;
21597                },
21598                #[cfg(debug_assertions)]
21599                PropertyDeclaration::WithVariables(..) => {
21600                    declaration.debug_crash("Found variables not substituted");
21601                    return;
21602                },
21603                _ => unsafe {
21604                    declaration.unchecked_value_as::<crate::values::specified::Size>()
21605                },
21606            };
21607
21608
21609                let computed = specified_value.to_computed_value(context);
21610                context.builder.set_width(computed)
21611        }
21612
21613        pub fn parse_declared<'i, 't>(
21614            context: &ParserContext,
21615            input: &mut Parser<'i, 't>,
21616        ) -> Result<PropertyDeclaration, ParseError<'i>> {
21617                parse(context, input)
21618                .map(PropertyDeclaration::Width)
21619        }
21620    }
21621
21622
21623    // min-width, min-height, min-block-size, min-inline-size
21624    
21625    
21626        
21627    
21628    /// https://drafts.csswg.org/css-box/#propdef-width
21629    pub mod min_width {
21630        #[allow(unused_imports)]
21631        use cssparser::{Parser, BasicParseError, Token};
21632        #[allow(unused_imports)]
21633        use crate::parser::{Parse, ParserContext};
21634        #[allow(unused_imports)]
21635        use crate::properties::{UnparsedValue, ShorthandId};
21636        #[allow(unused_imports)]
21637        use crate::error_reporting::ParseErrorReporter;
21638        #[allow(unused_imports)]
21639        use crate::properties::longhands;
21640        #[allow(unused_imports)]
21641        use crate::properties::{LonghandId, LonghandIdSet};
21642        #[allow(unused_imports)]
21643        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
21644        #[allow(unused_imports)]
21645        use crate::properties::style_structs;
21646        #[allow(unused_imports)]
21647        use selectors::parser::SelectorParseErrorKind;
21648        #[allow(unused_imports)]
21649        use servo_arc::Arc;
21650        #[allow(unused_imports)]
21651        use style_traits::{ParseError, StyleParseErrorKind};
21652        #[allow(unused_imports)]
21653        use crate::values::computed::{Context, ToComputedValue};
21654        #[allow(unused_imports)]
21655        use crate::values::{computed, generics, specified};
21656        #[allow(unused_imports)]
21657        use crate::Atom;
21658        
21659            
21660        #[allow(unused_imports)]
21661        use app_units::Au;
21662        #[allow(unused_imports)]
21663        use crate::values::specified::AllowQuirks;
21664        #[allow(unused_imports)]
21665        use crate::Zero;
21666        #[allow(unused_imports)]
21667        use smallvec::SmallVec;
21668        pub use crate::values::specified::Size as SpecifiedValue;
21669        pub mod computed_value {
21670            pub use crate::values::computed::Size as T;
21671        }
21672        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Size::auto() }
21673        #[allow(unused_variables)]
21674        #[inline]
21675        pub fn parse<'i, 't>(
21676            context: &ParserContext,
21677            input: &mut Parser<'i, 't>,
21678        ) -> Result<SpecifiedValue, ParseError<'i>> {
21679            specified::Size::parse_quirky(context, input, AllowQuirks::Yes)
21680        }
21681    
21682        
21683        #[allow(unused_variables)]
21684        pub unsafe fn cascade_property(
21685            declaration: &PropertyDeclaration,
21686            context: &mut computed::Context,
21687        ) {
21688            context.for_non_inherited_property = true;
21689            debug_assert_eq!(
21690                declaration.id().as_longhand().unwrap().logical_group(),
21691                LonghandId::MinWidth.logical_group(),
21692            );
21693            let specified_value = match *declaration {
21694                PropertyDeclaration::CSSWideKeyword(ref wk) => {
21695                    match wk.keyword {
21696                        CSSWideKeyword::Unset |
21697                        CSSWideKeyword::Initial => {
21698                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
21699                        },
21700                        CSSWideKeyword::Inherit => {
21701                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
21702                                if !context.builder.effective_zoom_for_inheritance.is_one() {
21703                                    let old_zoom = context.builder.effective_zoom;
21704                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
21705                                    let computed = context.builder.inherited_style.clone_min_width();
21706                                    let specified = ToComputedValue::from_computed_value(&computed);
21707                                    let decl = PropertyDeclaration::MinWidth(specified);
21708                                    cascade_property(&decl, context);
21709                                    context.builder.effective_zoom = old_zoom;
21710                                    return;
21711                                }
21712                                context.builder.inherit_min_width();
21713                        }
21714                        CSSWideKeyword::RevertLayer |
21715                        CSSWideKeyword::Revert => {
21716                            declaration.debug_crash("Found revert/revert-layer not dealt with");
21717                        },
21718                    }
21719                    return;
21720                },
21721                #[cfg(debug_assertions)]
21722                PropertyDeclaration::WithVariables(..) => {
21723                    declaration.debug_crash("Found variables not substituted");
21724                    return;
21725                },
21726                _ => unsafe {
21727                    declaration.unchecked_value_as::<crate::values::specified::Size>()
21728                },
21729            };
21730
21731
21732                let computed = specified_value.to_computed_value(context);
21733                context.builder.set_min_width(computed)
21734        }
21735
21736        pub fn parse_declared<'i, 't>(
21737            context: &ParserContext,
21738            input: &mut Parser<'i, 't>,
21739        ) -> Result<PropertyDeclaration, ParseError<'i>> {
21740                parse(context, input)
21741                .map(PropertyDeclaration::MinWidth)
21742        }
21743    }
21744
21745
21746    
21747    
21748        
21749    
21750    /// https://drafts.csswg.org/css-box/#propdef-width
21751    pub mod max_width {
21752        #[allow(unused_imports)]
21753        use cssparser::{Parser, BasicParseError, Token};
21754        #[allow(unused_imports)]
21755        use crate::parser::{Parse, ParserContext};
21756        #[allow(unused_imports)]
21757        use crate::properties::{UnparsedValue, ShorthandId};
21758        #[allow(unused_imports)]
21759        use crate::error_reporting::ParseErrorReporter;
21760        #[allow(unused_imports)]
21761        use crate::properties::longhands;
21762        #[allow(unused_imports)]
21763        use crate::properties::{LonghandId, LonghandIdSet};
21764        #[allow(unused_imports)]
21765        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
21766        #[allow(unused_imports)]
21767        use crate::properties::style_structs;
21768        #[allow(unused_imports)]
21769        use selectors::parser::SelectorParseErrorKind;
21770        #[allow(unused_imports)]
21771        use servo_arc::Arc;
21772        #[allow(unused_imports)]
21773        use style_traits::{ParseError, StyleParseErrorKind};
21774        #[allow(unused_imports)]
21775        use crate::values::computed::{Context, ToComputedValue};
21776        #[allow(unused_imports)]
21777        use crate::values::{computed, generics, specified};
21778        #[allow(unused_imports)]
21779        use crate::Atom;
21780        
21781            
21782        #[allow(unused_imports)]
21783        use app_units::Au;
21784        #[allow(unused_imports)]
21785        use crate::values::specified::AllowQuirks;
21786        #[allow(unused_imports)]
21787        use crate::Zero;
21788        #[allow(unused_imports)]
21789        use smallvec::SmallVec;
21790        pub use crate::values::specified::MaxSize as SpecifiedValue;
21791        pub mod computed_value {
21792            pub use crate::values::computed::MaxSize as T;
21793        }
21794        #[inline] pub fn get_initial_value() -> computed_value::T { computed::MaxSize::none() }
21795        #[allow(unused_variables)]
21796        #[inline]
21797        pub fn parse<'i, 't>(
21798            context: &ParserContext,
21799            input: &mut Parser<'i, 't>,
21800        ) -> Result<SpecifiedValue, ParseError<'i>> {
21801            specified::MaxSize::parse_quirky(context, input, AllowQuirks::Yes)
21802        }
21803    
21804        
21805        #[allow(unused_variables)]
21806        pub unsafe fn cascade_property(
21807            declaration: &PropertyDeclaration,
21808            context: &mut computed::Context,
21809        ) {
21810            context.for_non_inherited_property = true;
21811            debug_assert_eq!(
21812                declaration.id().as_longhand().unwrap().logical_group(),
21813                LonghandId::MaxWidth.logical_group(),
21814            );
21815            let specified_value = match *declaration {
21816                PropertyDeclaration::CSSWideKeyword(ref wk) => {
21817                    match wk.keyword {
21818                        CSSWideKeyword::Unset |
21819                        CSSWideKeyword::Initial => {
21820                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
21821                        },
21822                        CSSWideKeyword::Inherit => {
21823                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
21824                                if !context.builder.effective_zoom_for_inheritance.is_one() {
21825                                    let old_zoom = context.builder.effective_zoom;
21826                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
21827                                    let computed = context.builder.inherited_style.clone_max_width();
21828                                    let specified = ToComputedValue::from_computed_value(&computed);
21829                                    let decl = PropertyDeclaration::MaxWidth(specified);
21830                                    cascade_property(&decl, context);
21831                                    context.builder.effective_zoom = old_zoom;
21832                                    return;
21833                                }
21834                                context.builder.inherit_max_width();
21835                        }
21836                        CSSWideKeyword::RevertLayer |
21837                        CSSWideKeyword::Revert => {
21838                            declaration.debug_crash("Found revert/revert-layer not dealt with");
21839                        },
21840                    }
21841                    return;
21842                },
21843                #[cfg(debug_assertions)]
21844                PropertyDeclaration::WithVariables(..) => {
21845                    declaration.debug_crash("Found variables not substituted");
21846                    return;
21847                },
21848                _ => unsafe {
21849                    declaration.unchecked_value_as::<crate::values::specified::MaxSize>()
21850                },
21851            };
21852
21853
21854                let computed = specified_value.to_computed_value(context);
21855                context.builder.set_max_width(computed)
21856        }
21857
21858        pub fn parse_declared<'i, 't>(
21859            context: &ParserContext,
21860            input: &mut Parser<'i, 't>,
21861        ) -> Result<PropertyDeclaration, ParseError<'i>> {
21862                parse(context, input)
21863                .map(PropertyDeclaration::MaxWidth)
21864        }
21865    }
21866
21867
21868    
21869    // width, height, block-size, inline-size
21870    
21871    
21872        
21873    
21874    /// https://drafts.csswg.org/css-logical-props/#propdef-block-size
21875    pub mod block_size {
21876        #[allow(unused_imports)]
21877        use cssparser::{Parser, BasicParseError, Token};
21878        #[allow(unused_imports)]
21879        use crate::parser::{Parse, ParserContext};
21880        #[allow(unused_imports)]
21881        use crate::properties::{UnparsedValue, ShorthandId};
21882        #[allow(unused_imports)]
21883        use crate::error_reporting::ParseErrorReporter;
21884        #[allow(unused_imports)]
21885        use crate::properties::longhands;
21886        #[allow(unused_imports)]
21887        use crate::properties::{LonghandId, LonghandIdSet};
21888        #[allow(unused_imports)]
21889        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
21890        #[allow(unused_imports)]
21891        use crate::properties::style_structs;
21892        #[allow(unused_imports)]
21893        use selectors::parser::SelectorParseErrorKind;
21894        #[allow(unused_imports)]
21895        use servo_arc::Arc;
21896        #[allow(unused_imports)]
21897        use style_traits::{ParseError, StyleParseErrorKind};
21898        #[allow(unused_imports)]
21899        use crate::values::computed::{Context, ToComputedValue};
21900        #[allow(unused_imports)]
21901        use crate::values::{computed, generics, specified};
21902        #[allow(unused_imports)]
21903        use crate::Atom;
21904        
21905            
21906        #[allow(unused_imports)]
21907        use app_units::Au;
21908        #[allow(unused_imports)]
21909        use crate::values::specified::AllowQuirks;
21910        #[allow(unused_imports)]
21911        use crate::Zero;
21912        #[allow(unused_imports)]
21913        use smallvec::SmallVec;
21914        pub use crate::values::specified::Size as SpecifiedValue;
21915        pub mod computed_value {
21916            pub use crate::values::computed::Size as T;
21917        }
21918        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Size::auto() }
21919        #[allow(unused_variables)]
21920        #[inline]
21921        pub fn parse<'i, 't>(
21922            context: &ParserContext,
21923            input: &mut Parser<'i, 't>,
21924        ) -> Result<SpecifiedValue, ParseError<'i>> {
21925            <specified::Size as crate::parser::Parse>::parse(context, input)
21926        }
21927    
21928        
21929        #[allow(unused_variables)]
21930        pub unsafe fn cascade_property(
21931            declaration: &PropertyDeclaration,
21932            context: &mut computed::Context,
21933        ) {
21934            declaration.debug_crash("Should physicalize before entering here");
21935        }
21936
21937        pub fn parse_declared<'i, 't>(
21938            context: &ParserContext,
21939            input: &mut Parser<'i, 't>,
21940        ) -> Result<PropertyDeclaration, ParseError<'i>> {
21941                parse(context, input)
21942                .map(PropertyDeclaration::BlockSize)
21943        }
21944    }
21945
21946
21947    // min-width, min-height, min-block-size, min-inline-size
21948    
21949    
21950        
21951    
21952    /// https://drafts.csswg.org/css-logical-props/#propdef-block-size
21953    pub mod min_block_size {
21954        #[allow(unused_imports)]
21955        use cssparser::{Parser, BasicParseError, Token};
21956        #[allow(unused_imports)]
21957        use crate::parser::{Parse, ParserContext};
21958        #[allow(unused_imports)]
21959        use crate::properties::{UnparsedValue, ShorthandId};
21960        #[allow(unused_imports)]
21961        use crate::error_reporting::ParseErrorReporter;
21962        #[allow(unused_imports)]
21963        use crate::properties::longhands;
21964        #[allow(unused_imports)]
21965        use crate::properties::{LonghandId, LonghandIdSet};
21966        #[allow(unused_imports)]
21967        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
21968        #[allow(unused_imports)]
21969        use crate::properties::style_structs;
21970        #[allow(unused_imports)]
21971        use selectors::parser::SelectorParseErrorKind;
21972        #[allow(unused_imports)]
21973        use servo_arc::Arc;
21974        #[allow(unused_imports)]
21975        use style_traits::{ParseError, StyleParseErrorKind};
21976        #[allow(unused_imports)]
21977        use crate::values::computed::{Context, ToComputedValue};
21978        #[allow(unused_imports)]
21979        use crate::values::{computed, generics, specified};
21980        #[allow(unused_imports)]
21981        use crate::Atom;
21982        
21983            
21984        #[allow(unused_imports)]
21985        use app_units::Au;
21986        #[allow(unused_imports)]
21987        use crate::values::specified::AllowQuirks;
21988        #[allow(unused_imports)]
21989        use crate::Zero;
21990        #[allow(unused_imports)]
21991        use smallvec::SmallVec;
21992        pub use crate::values::specified::Size as SpecifiedValue;
21993        pub mod computed_value {
21994            pub use crate::values::computed::Size as T;
21995        }
21996        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Size::auto() }
21997        #[allow(unused_variables)]
21998        #[inline]
21999        pub fn parse<'i, 't>(
22000            context: &ParserContext,
22001            input: &mut Parser<'i, 't>,
22002        ) -> Result<SpecifiedValue, ParseError<'i>> {
22003            <specified::Size as crate::parser::Parse>::parse(context, input)
22004        }
22005    
22006        
22007        #[allow(unused_variables)]
22008        pub unsafe fn cascade_property(
22009            declaration: &PropertyDeclaration,
22010            context: &mut computed::Context,
22011        ) {
22012            declaration.debug_crash("Should physicalize before entering here");
22013        }
22014
22015        pub fn parse_declared<'i, 't>(
22016            context: &ParserContext,
22017            input: &mut Parser<'i, 't>,
22018        ) -> Result<PropertyDeclaration, ParseError<'i>> {
22019                parse(context, input)
22020                .map(PropertyDeclaration::MinBlockSize)
22021        }
22022    }
22023
22024
22025    
22026    
22027        
22028    
22029    /// https://drafts.csswg.org/css-logical-props/#propdef-block-size
22030    pub mod max_block_size {
22031        #[allow(unused_imports)]
22032        use cssparser::{Parser, BasicParseError, Token};
22033        #[allow(unused_imports)]
22034        use crate::parser::{Parse, ParserContext};
22035        #[allow(unused_imports)]
22036        use crate::properties::{UnparsedValue, ShorthandId};
22037        #[allow(unused_imports)]
22038        use crate::error_reporting::ParseErrorReporter;
22039        #[allow(unused_imports)]
22040        use crate::properties::longhands;
22041        #[allow(unused_imports)]
22042        use crate::properties::{LonghandId, LonghandIdSet};
22043        #[allow(unused_imports)]
22044        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
22045        #[allow(unused_imports)]
22046        use crate::properties::style_structs;
22047        #[allow(unused_imports)]
22048        use selectors::parser::SelectorParseErrorKind;
22049        #[allow(unused_imports)]
22050        use servo_arc::Arc;
22051        #[allow(unused_imports)]
22052        use style_traits::{ParseError, StyleParseErrorKind};
22053        #[allow(unused_imports)]
22054        use crate::values::computed::{Context, ToComputedValue};
22055        #[allow(unused_imports)]
22056        use crate::values::{computed, generics, specified};
22057        #[allow(unused_imports)]
22058        use crate::Atom;
22059        
22060            
22061        #[allow(unused_imports)]
22062        use app_units::Au;
22063        #[allow(unused_imports)]
22064        use crate::values::specified::AllowQuirks;
22065        #[allow(unused_imports)]
22066        use crate::Zero;
22067        #[allow(unused_imports)]
22068        use smallvec::SmallVec;
22069        pub use crate::values::specified::MaxSize as SpecifiedValue;
22070        pub mod computed_value {
22071            pub use crate::values::computed::MaxSize as T;
22072        }
22073        #[inline] pub fn get_initial_value() -> computed_value::T { computed::MaxSize::none() }
22074        #[allow(unused_variables)]
22075        #[inline]
22076        pub fn parse<'i, 't>(
22077            context: &ParserContext,
22078            input: &mut Parser<'i, 't>,
22079        ) -> Result<SpecifiedValue, ParseError<'i>> {
22080            <specified::MaxSize as crate::parser::Parse>::parse(context, input)
22081        }
22082    
22083        
22084        #[allow(unused_variables)]
22085        pub unsafe fn cascade_property(
22086            declaration: &PropertyDeclaration,
22087            context: &mut computed::Context,
22088        ) {
22089            declaration.debug_crash("Should physicalize before entering here");
22090        }
22091
22092        pub fn parse_declared<'i, 't>(
22093            context: &ParserContext,
22094            input: &mut Parser<'i, 't>,
22095        ) -> Result<PropertyDeclaration, ParseError<'i>> {
22096                parse(context, input)
22097                .map(PropertyDeclaration::MaxBlockSize)
22098        }
22099    }
22100
22101
22102    
22103    // width, height, block-size, inline-size
22104    
22105    
22106        
22107    
22108    /// https://drafts.csswg.org/css-logical-props/#propdef-inline-size
22109    pub mod inline_size {
22110        #[allow(unused_imports)]
22111        use cssparser::{Parser, BasicParseError, Token};
22112        #[allow(unused_imports)]
22113        use crate::parser::{Parse, ParserContext};
22114        #[allow(unused_imports)]
22115        use crate::properties::{UnparsedValue, ShorthandId};
22116        #[allow(unused_imports)]
22117        use crate::error_reporting::ParseErrorReporter;
22118        #[allow(unused_imports)]
22119        use crate::properties::longhands;
22120        #[allow(unused_imports)]
22121        use crate::properties::{LonghandId, LonghandIdSet};
22122        #[allow(unused_imports)]
22123        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
22124        #[allow(unused_imports)]
22125        use crate::properties::style_structs;
22126        #[allow(unused_imports)]
22127        use selectors::parser::SelectorParseErrorKind;
22128        #[allow(unused_imports)]
22129        use servo_arc::Arc;
22130        #[allow(unused_imports)]
22131        use style_traits::{ParseError, StyleParseErrorKind};
22132        #[allow(unused_imports)]
22133        use crate::values::computed::{Context, ToComputedValue};
22134        #[allow(unused_imports)]
22135        use crate::values::{computed, generics, specified};
22136        #[allow(unused_imports)]
22137        use crate::Atom;
22138        
22139            
22140        #[allow(unused_imports)]
22141        use app_units::Au;
22142        #[allow(unused_imports)]
22143        use crate::values::specified::AllowQuirks;
22144        #[allow(unused_imports)]
22145        use crate::Zero;
22146        #[allow(unused_imports)]
22147        use smallvec::SmallVec;
22148        pub use crate::values::specified::Size as SpecifiedValue;
22149        pub mod computed_value {
22150            pub use crate::values::computed::Size as T;
22151        }
22152        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Size::auto() }
22153        #[allow(unused_variables)]
22154        #[inline]
22155        pub fn parse<'i, 't>(
22156            context: &ParserContext,
22157            input: &mut Parser<'i, 't>,
22158        ) -> Result<SpecifiedValue, ParseError<'i>> {
22159            <specified::Size as crate::parser::Parse>::parse(context, input)
22160        }
22161    
22162        
22163        #[allow(unused_variables)]
22164        pub unsafe fn cascade_property(
22165            declaration: &PropertyDeclaration,
22166            context: &mut computed::Context,
22167        ) {
22168            declaration.debug_crash("Should physicalize before entering here");
22169        }
22170
22171        pub fn parse_declared<'i, 't>(
22172            context: &ParserContext,
22173            input: &mut Parser<'i, 't>,
22174        ) -> Result<PropertyDeclaration, ParseError<'i>> {
22175                parse(context, input)
22176                .map(PropertyDeclaration::InlineSize)
22177        }
22178    }
22179
22180
22181    // min-width, min-height, min-block-size, min-inline-size
22182    
22183    
22184        
22185    
22186    /// https://drafts.csswg.org/css-logical-props/#propdef-inline-size
22187    pub mod min_inline_size {
22188        #[allow(unused_imports)]
22189        use cssparser::{Parser, BasicParseError, Token};
22190        #[allow(unused_imports)]
22191        use crate::parser::{Parse, ParserContext};
22192        #[allow(unused_imports)]
22193        use crate::properties::{UnparsedValue, ShorthandId};
22194        #[allow(unused_imports)]
22195        use crate::error_reporting::ParseErrorReporter;
22196        #[allow(unused_imports)]
22197        use crate::properties::longhands;
22198        #[allow(unused_imports)]
22199        use crate::properties::{LonghandId, LonghandIdSet};
22200        #[allow(unused_imports)]
22201        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
22202        #[allow(unused_imports)]
22203        use crate::properties::style_structs;
22204        #[allow(unused_imports)]
22205        use selectors::parser::SelectorParseErrorKind;
22206        #[allow(unused_imports)]
22207        use servo_arc::Arc;
22208        #[allow(unused_imports)]
22209        use style_traits::{ParseError, StyleParseErrorKind};
22210        #[allow(unused_imports)]
22211        use crate::values::computed::{Context, ToComputedValue};
22212        #[allow(unused_imports)]
22213        use crate::values::{computed, generics, specified};
22214        #[allow(unused_imports)]
22215        use crate::Atom;
22216        
22217            
22218        #[allow(unused_imports)]
22219        use app_units::Au;
22220        #[allow(unused_imports)]
22221        use crate::values::specified::AllowQuirks;
22222        #[allow(unused_imports)]
22223        use crate::Zero;
22224        #[allow(unused_imports)]
22225        use smallvec::SmallVec;
22226        pub use crate::values::specified::Size as SpecifiedValue;
22227        pub mod computed_value {
22228            pub use crate::values::computed::Size as T;
22229        }
22230        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Size::auto() }
22231        #[allow(unused_variables)]
22232        #[inline]
22233        pub fn parse<'i, 't>(
22234            context: &ParserContext,
22235            input: &mut Parser<'i, 't>,
22236        ) -> Result<SpecifiedValue, ParseError<'i>> {
22237            <specified::Size as crate::parser::Parse>::parse(context, input)
22238        }
22239    
22240        
22241        #[allow(unused_variables)]
22242        pub unsafe fn cascade_property(
22243            declaration: &PropertyDeclaration,
22244            context: &mut computed::Context,
22245        ) {
22246            declaration.debug_crash("Should physicalize before entering here");
22247        }
22248
22249        pub fn parse_declared<'i, 't>(
22250            context: &ParserContext,
22251            input: &mut Parser<'i, 't>,
22252        ) -> Result<PropertyDeclaration, ParseError<'i>> {
22253                parse(context, input)
22254                .map(PropertyDeclaration::MinInlineSize)
22255        }
22256    }
22257
22258
22259    
22260    
22261        
22262    
22263    /// https://drafts.csswg.org/css-logical-props/#propdef-inline-size
22264    pub mod max_inline_size {
22265        #[allow(unused_imports)]
22266        use cssparser::{Parser, BasicParseError, Token};
22267        #[allow(unused_imports)]
22268        use crate::parser::{Parse, ParserContext};
22269        #[allow(unused_imports)]
22270        use crate::properties::{UnparsedValue, ShorthandId};
22271        #[allow(unused_imports)]
22272        use crate::error_reporting::ParseErrorReporter;
22273        #[allow(unused_imports)]
22274        use crate::properties::longhands;
22275        #[allow(unused_imports)]
22276        use crate::properties::{LonghandId, LonghandIdSet};
22277        #[allow(unused_imports)]
22278        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
22279        #[allow(unused_imports)]
22280        use crate::properties::style_structs;
22281        #[allow(unused_imports)]
22282        use selectors::parser::SelectorParseErrorKind;
22283        #[allow(unused_imports)]
22284        use servo_arc::Arc;
22285        #[allow(unused_imports)]
22286        use style_traits::{ParseError, StyleParseErrorKind};
22287        #[allow(unused_imports)]
22288        use crate::values::computed::{Context, ToComputedValue};
22289        #[allow(unused_imports)]
22290        use crate::values::{computed, generics, specified};
22291        #[allow(unused_imports)]
22292        use crate::Atom;
22293        
22294            
22295        #[allow(unused_imports)]
22296        use app_units::Au;
22297        #[allow(unused_imports)]
22298        use crate::values::specified::AllowQuirks;
22299        #[allow(unused_imports)]
22300        use crate::Zero;
22301        #[allow(unused_imports)]
22302        use smallvec::SmallVec;
22303        pub use crate::values::specified::MaxSize as SpecifiedValue;
22304        pub mod computed_value {
22305            pub use crate::values::computed::MaxSize as T;
22306        }
22307        #[inline] pub fn get_initial_value() -> computed_value::T { computed::MaxSize::none() }
22308        #[allow(unused_variables)]
22309        #[inline]
22310        pub fn parse<'i, 't>(
22311            context: &ParserContext,
22312            input: &mut Parser<'i, 't>,
22313        ) -> Result<SpecifiedValue, ParseError<'i>> {
22314            <specified::MaxSize as crate::parser::Parse>::parse(context, input)
22315        }
22316    
22317        
22318        #[allow(unused_variables)]
22319        pub unsafe fn cascade_property(
22320            declaration: &PropertyDeclaration,
22321            context: &mut computed::Context,
22322        ) {
22323            declaration.debug_crash("Should physicalize before entering here");
22324        }
22325
22326        pub fn parse_declared<'i, 't>(
22327            context: &ParserContext,
22328            input: &mut Parser<'i, 't>,
22329        ) -> Result<PropertyDeclaration, ParseError<'i>> {
22330                parse(context, input)
22331                .map(PropertyDeclaration::MaxInlineSize)
22332        }
22333    }
22334
22335
22336
22337
22338    
22339        
22340    
22341
22342
22343
22344    
22345        
22346    
22347
22348
22349
22350    
22351        
22352    
22353
22354
22355
22356    
22357        
22358    
22359
22360
22361
22362    
22363        
22364    
22365
22366
22367
22368    
22369
22370    
22371        
22372    
22373    /// https://drafts.csswg.org/css-ui/#propdef-box-sizing
22374    pub mod box_sizing {
22375        #[allow(unused_imports)]
22376        use cssparser::{Parser, BasicParseError, Token};
22377        #[allow(unused_imports)]
22378        use crate::parser::{Parse, ParserContext};
22379        #[allow(unused_imports)]
22380        use crate::properties::{UnparsedValue, ShorthandId};
22381        #[allow(unused_imports)]
22382        use crate::error_reporting::ParseErrorReporter;
22383        #[allow(unused_imports)]
22384        use crate::properties::longhands;
22385        #[allow(unused_imports)]
22386        use crate::properties::{LonghandId, LonghandIdSet};
22387        #[allow(unused_imports)]
22388        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
22389        #[allow(unused_imports)]
22390        use crate::properties::style_structs;
22391        #[allow(unused_imports)]
22392        use selectors::parser::SelectorParseErrorKind;
22393        #[allow(unused_imports)]
22394        use servo_arc::Arc;
22395        #[allow(unused_imports)]
22396        use style_traits::{ParseError, StyleParseErrorKind};
22397        #[allow(unused_imports)]
22398        use crate::values::computed::{Context, ToComputedValue};
22399        #[allow(unused_imports)]
22400        use crate::values::{computed, generics, specified};
22401        #[allow(unused_imports)]
22402        use crate::Atom;
22403        
22404            
22405        pub use self::computed_value::T as SpecifiedValue;
22406        pub mod computed_value {
22407            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
22408            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
22409            pub enum T {
22410            
22411            ContentBox,
22412            
22413            BorderBox,
22414            }
22415        }
22416        #[inline]
22417        pub fn get_initial_value() -> computed_value::T {
22418            computed_value::T::ContentBox
22419        }
22420        #[inline]
22421        pub fn get_initial_specified_value() -> SpecifiedValue {
22422            SpecifiedValue::ContentBox
22423        }
22424        #[inline]
22425        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
22426                             -> Result<SpecifiedValue, ParseError<'i>> {
22427            SpecifiedValue::parse(input)
22428        }
22429
22430    
22431        
22432        #[allow(unused_variables)]
22433        pub unsafe fn cascade_property(
22434            declaration: &PropertyDeclaration,
22435            context: &mut computed::Context,
22436        ) {
22437            context.for_non_inherited_property = true;
22438            debug_assert_eq!(
22439                declaration.id().as_longhand().unwrap(),
22440                LonghandId::BoxSizing,
22441            );
22442            let specified_value = match *declaration {
22443                PropertyDeclaration::CSSWideKeyword(ref wk) => {
22444                    match wk.keyword {
22445                        CSSWideKeyword::Unset |
22446                        CSSWideKeyword::Initial => {
22447                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
22448                        },
22449                        CSSWideKeyword::Inherit => {
22450                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
22451                                context.builder.inherit_box_sizing();
22452                        }
22453                        CSSWideKeyword::RevertLayer |
22454                        CSSWideKeyword::Revert => {
22455                            declaration.debug_crash("Found revert/revert-layer not dealt with");
22456                        },
22457                    }
22458                    return;
22459                },
22460                #[cfg(debug_assertions)]
22461                PropertyDeclaration::WithVariables(..) => {
22462                    declaration.debug_crash("Found variables not substituted");
22463                    return;
22464                },
22465                _ => unsafe {
22466                    declaration.unchecked_value_as::<longhands::box_sizing::SpecifiedValue>()
22467                },
22468            };
22469
22470
22471                let computed = specified_value.to_computed_value(context);
22472                context.builder.set_box_sizing(computed)
22473        }
22474
22475        pub fn parse_declared<'i, 't>(
22476            context: &ParserContext,
22477            input: &mut Parser<'i, 't>,
22478        ) -> Result<PropertyDeclaration, ParseError<'i>> {
22479                parse(context, input)
22480                .map(PropertyDeclaration::BoxSizing)
22481        }
22482    }
22483
22484
22485
22486
22487    
22488
22489    
22490        
22491    
22492    /// https://drafts.csswg.org/css-images/#propdef-object-fit
22493    pub mod object_fit {
22494        #[allow(unused_imports)]
22495        use cssparser::{Parser, BasicParseError, Token};
22496        #[allow(unused_imports)]
22497        use crate::parser::{Parse, ParserContext};
22498        #[allow(unused_imports)]
22499        use crate::properties::{UnparsedValue, ShorthandId};
22500        #[allow(unused_imports)]
22501        use crate::error_reporting::ParseErrorReporter;
22502        #[allow(unused_imports)]
22503        use crate::properties::longhands;
22504        #[allow(unused_imports)]
22505        use crate::properties::{LonghandId, LonghandIdSet};
22506        #[allow(unused_imports)]
22507        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
22508        #[allow(unused_imports)]
22509        use crate::properties::style_structs;
22510        #[allow(unused_imports)]
22511        use selectors::parser::SelectorParseErrorKind;
22512        #[allow(unused_imports)]
22513        use servo_arc::Arc;
22514        #[allow(unused_imports)]
22515        use style_traits::{ParseError, StyleParseErrorKind};
22516        #[allow(unused_imports)]
22517        use crate::values::computed::{Context, ToComputedValue};
22518        #[allow(unused_imports)]
22519        use crate::values::{computed, generics, specified};
22520        #[allow(unused_imports)]
22521        use crate::Atom;
22522        
22523            
22524        pub use self::computed_value::T as SpecifiedValue;
22525        pub mod computed_value {
22526            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
22527            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
22528            pub enum T {
22529            
22530            Fill,
22531            
22532            Contain,
22533            
22534            Cover,
22535            
22536            None,
22537            
22538            ScaleDown,
22539            }
22540        }
22541        #[inline]
22542        pub fn get_initial_value() -> computed_value::T {
22543            computed_value::T::Fill
22544        }
22545        #[inline]
22546        pub fn get_initial_specified_value() -> SpecifiedValue {
22547            SpecifiedValue::Fill
22548        }
22549        #[inline]
22550        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
22551                             -> Result<SpecifiedValue, ParseError<'i>> {
22552            SpecifiedValue::parse(input)
22553        }
22554
22555    
22556        
22557        #[allow(unused_variables)]
22558        pub unsafe fn cascade_property(
22559            declaration: &PropertyDeclaration,
22560            context: &mut computed::Context,
22561        ) {
22562            context.for_non_inherited_property = true;
22563            debug_assert_eq!(
22564                declaration.id().as_longhand().unwrap(),
22565                LonghandId::ObjectFit,
22566            );
22567            let specified_value = match *declaration {
22568                PropertyDeclaration::CSSWideKeyword(ref wk) => {
22569                    match wk.keyword {
22570                        CSSWideKeyword::Unset |
22571                        CSSWideKeyword::Initial => {
22572                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
22573                        },
22574                        CSSWideKeyword::Inherit => {
22575                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
22576                                context.builder.inherit_object_fit();
22577                        }
22578                        CSSWideKeyword::RevertLayer |
22579                        CSSWideKeyword::Revert => {
22580                            declaration.debug_crash("Found revert/revert-layer not dealt with");
22581                        },
22582                    }
22583                    return;
22584                },
22585                #[cfg(debug_assertions)]
22586                PropertyDeclaration::WithVariables(..) => {
22587                    declaration.debug_crash("Found variables not substituted");
22588                    return;
22589                },
22590                _ => unsafe {
22591                    declaration.unchecked_value_as::<longhands::object_fit::SpecifiedValue>()
22592                },
22593            };
22594
22595
22596                let computed = specified_value.to_computed_value(context);
22597                context.builder.set_object_fit(computed)
22598        }
22599
22600        pub fn parse_declared<'i, 't>(
22601            context: &ParserContext,
22602            input: &mut Parser<'i, 't>,
22603        ) -> Result<PropertyDeclaration, ParseError<'i>> {
22604                parse(context, input)
22605                .map(PropertyDeclaration::ObjectFit)
22606        }
22607    }
22608
22609
22610
22611
22612    
22613        
22614    
22615    /// https://drafts.csswg.org/css-images-3/#the-object-position
22616    pub mod object_position {
22617        #[allow(unused_imports)]
22618        use cssparser::{Parser, BasicParseError, Token};
22619        #[allow(unused_imports)]
22620        use crate::parser::{Parse, ParserContext};
22621        #[allow(unused_imports)]
22622        use crate::properties::{UnparsedValue, ShorthandId};
22623        #[allow(unused_imports)]
22624        use crate::error_reporting::ParseErrorReporter;
22625        #[allow(unused_imports)]
22626        use crate::properties::longhands;
22627        #[allow(unused_imports)]
22628        use crate::properties::{LonghandId, LonghandIdSet};
22629        #[allow(unused_imports)]
22630        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
22631        #[allow(unused_imports)]
22632        use crate::properties::style_structs;
22633        #[allow(unused_imports)]
22634        use selectors::parser::SelectorParseErrorKind;
22635        #[allow(unused_imports)]
22636        use servo_arc::Arc;
22637        #[allow(unused_imports)]
22638        use style_traits::{ParseError, StyleParseErrorKind};
22639        #[allow(unused_imports)]
22640        use crate::values::computed::{Context, ToComputedValue};
22641        #[allow(unused_imports)]
22642        use crate::values::{computed, generics, specified};
22643        #[allow(unused_imports)]
22644        use crate::Atom;
22645        
22646            
22647        #[allow(unused_imports)]
22648        use app_units::Au;
22649        #[allow(unused_imports)]
22650        use crate::values::specified::AllowQuirks;
22651        #[allow(unused_imports)]
22652        use crate::Zero;
22653        #[allow(unused_imports)]
22654        use smallvec::SmallVec;
22655        pub use crate::values::specified::Position as SpecifiedValue;
22656        pub mod computed_value {
22657            pub use crate::values::computed::Position as T;
22658        }
22659        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Position::center() }
22660        #[allow(unused_variables)]
22661        #[inline]
22662        pub fn parse<'i, 't>(
22663            context: &ParserContext,
22664            input: &mut Parser<'i, 't>,
22665        ) -> Result<SpecifiedValue, ParseError<'i>> {
22666            <specified::Position as crate::parser::Parse>::parse(context, input)
22667        }
22668    
22669        
22670        #[allow(unused_variables)]
22671        pub unsafe fn cascade_property(
22672            declaration: &PropertyDeclaration,
22673            context: &mut computed::Context,
22674        ) {
22675            context.for_non_inherited_property = true;
22676            debug_assert_eq!(
22677                declaration.id().as_longhand().unwrap(),
22678                LonghandId::ObjectPosition,
22679            );
22680            let specified_value = match *declaration {
22681                PropertyDeclaration::CSSWideKeyword(ref wk) => {
22682                    match wk.keyword {
22683                        CSSWideKeyword::Unset |
22684                        CSSWideKeyword::Initial => {
22685                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
22686                        },
22687                        CSSWideKeyword::Inherit => {
22688                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
22689                                if !context.builder.effective_zoom_for_inheritance.is_one() {
22690                                    let old_zoom = context.builder.effective_zoom;
22691                                    context.builder.effective_zoom = context.builder.effective_zoom_for_inheritance;
22692                                    let computed = context.builder.inherited_style.clone_object_position();
22693                                    let specified = ToComputedValue::from_computed_value(&computed);
22694                                    let specified = Box::new(specified);
22695                                    let decl = PropertyDeclaration::ObjectPosition(specified);
22696                                    cascade_property(&decl, context);
22697                                    context.builder.effective_zoom = old_zoom;
22698                                    return;
22699                                }
22700                                context.builder.inherit_object_position();
22701                        }
22702                        CSSWideKeyword::RevertLayer |
22703                        CSSWideKeyword::Revert => {
22704                            declaration.debug_crash("Found revert/revert-layer not dealt with");
22705                        },
22706                    }
22707                    return;
22708                },
22709                #[cfg(debug_assertions)]
22710                PropertyDeclaration::WithVariables(..) => {
22711                    declaration.debug_crash("Found variables not substituted");
22712                    return;
22713                },
22714                _ => unsafe {
22715                    declaration.unchecked_value_as::<Box<crate::values::specified::Position>>()
22716                },
22717            };
22718
22719
22720                let computed = (**specified_value).to_computed_value(context);
22721                context.builder.set_object_position(computed)
22722        }
22723
22724        pub fn parse_declared<'i, 't>(
22725            context: &ParserContext,
22726            input: &mut Parser<'i, 't>,
22727        ) -> Result<PropertyDeclaration, ParseError<'i>> {
22728                parse(context, input)
22729                .map(Box::new)
22730                .map(PropertyDeclaration::ObjectPosition)
22731        }
22732    }
22733
22734
22735
22736        
22737    
22738        
22739    
22740    /// https://drafts.csswg.org/css-grid/#propdef-grid-row-start
22741    pub mod grid_row_start {
22742        #[allow(unused_imports)]
22743        use cssparser::{Parser, BasicParseError, Token};
22744        #[allow(unused_imports)]
22745        use crate::parser::{Parse, ParserContext};
22746        #[allow(unused_imports)]
22747        use crate::properties::{UnparsedValue, ShorthandId};
22748        #[allow(unused_imports)]
22749        use crate::error_reporting::ParseErrorReporter;
22750        #[allow(unused_imports)]
22751        use crate::properties::longhands;
22752        #[allow(unused_imports)]
22753        use crate::properties::{LonghandId, LonghandIdSet};
22754        #[allow(unused_imports)]
22755        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
22756        #[allow(unused_imports)]
22757        use crate::properties::style_structs;
22758        #[allow(unused_imports)]
22759        use selectors::parser::SelectorParseErrorKind;
22760        #[allow(unused_imports)]
22761        use servo_arc::Arc;
22762        #[allow(unused_imports)]
22763        use style_traits::{ParseError, StyleParseErrorKind};
22764        #[allow(unused_imports)]
22765        use crate::values::computed::{Context, ToComputedValue};
22766        #[allow(unused_imports)]
22767        use crate::values::{computed, generics, specified};
22768        #[allow(unused_imports)]
22769        use crate::Atom;
22770        
22771            
22772        #[allow(unused_imports)]
22773        use app_units::Au;
22774        #[allow(unused_imports)]
22775        use crate::values::specified::AllowQuirks;
22776        #[allow(unused_imports)]
22777        use crate::Zero;
22778        #[allow(unused_imports)]
22779        use smallvec::SmallVec;
22780        pub use crate::values::specified::GridLine as SpecifiedValue;
22781        pub mod computed_value {
22782            pub use crate::values::computed::GridLine as T;
22783        }
22784        #[inline] pub fn get_initial_value() -> computed_value::T { Default::default() }
22785        #[allow(unused_variables)]
22786        #[inline]
22787        pub fn parse<'i, 't>(
22788            context: &ParserContext,
22789            input: &mut Parser<'i, 't>,
22790        ) -> Result<SpecifiedValue, ParseError<'i>> {
22791            <specified::GridLine as crate::parser::Parse>::parse(context, input)
22792        }
22793    
22794        
22795        #[allow(unused_variables)]
22796        pub unsafe fn cascade_property(
22797            declaration: &PropertyDeclaration,
22798            context: &mut computed::Context,
22799        ) {
22800            context.for_non_inherited_property = true;
22801            debug_assert_eq!(
22802                declaration.id().as_longhand().unwrap(),
22803                LonghandId::GridRowStart,
22804            );
22805            let specified_value = match *declaration {
22806                PropertyDeclaration::CSSWideKeyword(ref wk) => {
22807                    match wk.keyword {
22808                        CSSWideKeyword::Unset |
22809                        CSSWideKeyword::Initial => {
22810                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
22811                        },
22812                        CSSWideKeyword::Inherit => {
22813                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
22814                                context.builder.inherit_grid_row_start();
22815                        }
22816                        CSSWideKeyword::RevertLayer |
22817                        CSSWideKeyword::Revert => {
22818                            declaration.debug_crash("Found revert/revert-layer not dealt with");
22819                        },
22820                    }
22821                    return;
22822                },
22823                #[cfg(debug_assertions)]
22824                PropertyDeclaration::WithVariables(..) => {
22825                    declaration.debug_crash("Found variables not substituted");
22826                    return;
22827                },
22828                _ => unsafe {
22829                    declaration.unchecked_value_as::<crate::values::specified::GridLine>()
22830                },
22831            };
22832
22833
22834                let computed = specified_value.to_computed_value(context);
22835                context.builder.set_grid_row_start(computed)
22836        }
22837
22838        pub fn parse_declared<'i, 't>(
22839            context: &ParserContext,
22840            input: &mut Parser<'i, 't>,
22841        ) -> Result<PropertyDeclaration, ParseError<'i>> {
22842                parse(context, input)
22843                .map(PropertyDeclaration::GridRowStart)
22844        }
22845    }
22846
22847
22848        
22849    
22850        
22851    
22852    /// https://drafts.csswg.org/css-grid/#propdef-grid-row-end
22853    pub mod grid_row_end {
22854        #[allow(unused_imports)]
22855        use cssparser::{Parser, BasicParseError, Token};
22856        #[allow(unused_imports)]
22857        use crate::parser::{Parse, ParserContext};
22858        #[allow(unused_imports)]
22859        use crate::properties::{UnparsedValue, ShorthandId};
22860        #[allow(unused_imports)]
22861        use crate::error_reporting::ParseErrorReporter;
22862        #[allow(unused_imports)]
22863        use crate::properties::longhands;
22864        #[allow(unused_imports)]
22865        use crate::properties::{LonghandId, LonghandIdSet};
22866        #[allow(unused_imports)]
22867        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
22868        #[allow(unused_imports)]
22869        use crate::properties::style_structs;
22870        #[allow(unused_imports)]
22871        use selectors::parser::SelectorParseErrorKind;
22872        #[allow(unused_imports)]
22873        use servo_arc::Arc;
22874        #[allow(unused_imports)]
22875        use style_traits::{ParseError, StyleParseErrorKind};
22876        #[allow(unused_imports)]
22877        use crate::values::computed::{Context, ToComputedValue};
22878        #[allow(unused_imports)]
22879        use crate::values::{computed, generics, specified};
22880        #[allow(unused_imports)]
22881        use crate::Atom;
22882        
22883            
22884        #[allow(unused_imports)]
22885        use app_units::Au;
22886        #[allow(unused_imports)]
22887        use crate::values::specified::AllowQuirks;
22888        #[allow(unused_imports)]
22889        use crate::Zero;
22890        #[allow(unused_imports)]
22891        use smallvec::SmallVec;
22892        pub use crate::values::specified::GridLine as SpecifiedValue;
22893        pub mod computed_value {
22894            pub use crate::values::computed::GridLine as T;
22895        }
22896        #[inline] pub fn get_initial_value() -> computed_value::T { Default::default() }
22897        #[allow(unused_variables)]
22898        #[inline]
22899        pub fn parse<'i, 't>(
22900            context: &ParserContext,
22901            input: &mut Parser<'i, 't>,
22902        ) -> Result<SpecifiedValue, ParseError<'i>> {
22903            <specified::GridLine as crate::parser::Parse>::parse(context, input)
22904        }
22905    
22906        
22907        #[allow(unused_variables)]
22908        pub unsafe fn cascade_property(
22909            declaration: &PropertyDeclaration,
22910            context: &mut computed::Context,
22911        ) {
22912            context.for_non_inherited_property = true;
22913            debug_assert_eq!(
22914                declaration.id().as_longhand().unwrap(),
22915                LonghandId::GridRowEnd,
22916            );
22917            let specified_value = match *declaration {
22918                PropertyDeclaration::CSSWideKeyword(ref wk) => {
22919                    match wk.keyword {
22920                        CSSWideKeyword::Unset |
22921                        CSSWideKeyword::Initial => {
22922                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
22923                        },
22924                        CSSWideKeyword::Inherit => {
22925                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
22926                                context.builder.inherit_grid_row_end();
22927                        }
22928                        CSSWideKeyword::RevertLayer |
22929                        CSSWideKeyword::Revert => {
22930                            declaration.debug_crash("Found revert/revert-layer not dealt with");
22931                        },
22932                    }
22933                    return;
22934                },
22935                #[cfg(debug_assertions)]
22936                PropertyDeclaration::WithVariables(..) => {
22937                    declaration.debug_crash("Found variables not substituted");
22938                    return;
22939                },
22940                _ => unsafe {
22941                    declaration.unchecked_value_as::<crate::values::specified::GridLine>()
22942                },
22943            };
22944
22945
22946                let computed = specified_value.to_computed_value(context);
22947                context.builder.set_grid_row_end(computed)
22948        }
22949
22950        pub fn parse_declared<'i, 't>(
22951            context: &ParserContext,
22952            input: &mut Parser<'i, 't>,
22953        ) -> Result<PropertyDeclaration, ParseError<'i>> {
22954                parse(context, input)
22955                .map(PropertyDeclaration::GridRowEnd)
22956        }
22957    }
22958
22959
22960
22961    
22962    
22963        
22964    
22965    /// https://drafts.csswg.org/css-grid/#propdef-grid-auto-rows
22966    pub mod grid_auto_rows {
22967        #[allow(unused_imports)]
22968        use cssparser::{Parser, BasicParseError, Token};
22969        #[allow(unused_imports)]
22970        use crate::parser::{Parse, ParserContext};
22971        #[allow(unused_imports)]
22972        use crate::properties::{UnparsedValue, ShorthandId};
22973        #[allow(unused_imports)]
22974        use crate::error_reporting::ParseErrorReporter;
22975        #[allow(unused_imports)]
22976        use crate::properties::longhands;
22977        #[allow(unused_imports)]
22978        use crate::properties::{LonghandId, LonghandIdSet};
22979        #[allow(unused_imports)]
22980        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
22981        #[allow(unused_imports)]
22982        use crate::properties::style_structs;
22983        #[allow(unused_imports)]
22984        use selectors::parser::SelectorParseErrorKind;
22985        #[allow(unused_imports)]
22986        use servo_arc::Arc;
22987        #[allow(unused_imports)]
22988        use style_traits::{ParseError, StyleParseErrorKind};
22989        #[allow(unused_imports)]
22990        use crate::values::computed::{Context, ToComputedValue};
22991        #[allow(unused_imports)]
22992        use crate::values::{computed, generics, specified};
22993        #[allow(unused_imports)]
22994        use crate::Atom;
22995        
22996            
22997        #[allow(unused_imports)]
22998        use app_units::Au;
22999        #[allow(unused_imports)]
23000        use crate::values::specified::AllowQuirks;
23001        #[allow(unused_imports)]
23002        use crate::Zero;
23003        #[allow(unused_imports)]
23004        use smallvec::SmallVec;
23005        pub use crate::values::specified::ImplicitGridTracks as SpecifiedValue;
23006        pub mod computed_value {
23007            pub use crate::values::computed::ImplicitGridTracks as T;
23008        }
23009        #[inline] pub fn get_initial_value() -> computed_value::T { Default::default() }
23010        #[allow(unused_variables)]
23011        #[inline]
23012        pub fn parse<'i, 't>(
23013            context: &ParserContext,
23014            input: &mut Parser<'i, 't>,
23015        ) -> Result<SpecifiedValue, ParseError<'i>> {
23016            <specified::ImplicitGridTracks as crate::parser::Parse>::parse(context, input)
23017        }
23018    
23019        
23020        #[allow(unused_variables)]
23021        pub unsafe fn cascade_property(
23022            declaration: &PropertyDeclaration,
23023            context: &mut computed::Context,
23024        ) {
23025            context.for_non_inherited_property = true;
23026            debug_assert_eq!(
23027                declaration.id().as_longhand().unwrap(),
23028                LonghandId::GridAutoRows,
23029            );
23030            let specified_value = match *declaration {
23031                PropertyDeclaration::CSSWideKeyword(ref wk) => {
23032                    match wk.keyword {
23033                        CSSWideKeyword::Unset |
23034                        CSSWideKeyword::Initial => {
23035                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
23036                        },
23037                        CSSWideKeyword::Inherit => {
23038                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
23039                                context.builder.inherit_grid_auto_rows();
23040                        }
23041                        CSSWideKeyword::RevertLayer |
23042                        CSSWideKeyword::Revert => {
23043                            declaration.debug_crash("Found revert/revert-layer not dealt with");
23044                        },
23045                    }
23046                    return;
23047                },
23048                #[cfg(debug_assertions)]
23049                PropertyDeclaration::WithVariables(..) => {
23050                    declaration.debug_crash("Found variables not substituted");
23051                    return;
23052                },
23053                _ => unsafe {
23054                    declaration.unchecked_value_as::<crate::values::specified::ImplicitGridTracks>()
23055                },
23056            };
23057
23058
23059                let computed = specified_value.to_computed_value(context);
23060                context.builder.set_grid_auto_rows(computed)
23061        }
23062
23063        pub fn parse_declared<'i, 't>(
23064            context: &ParserContext,
23065            input: &mut Parser<'i, 't>,
23066        ) -> Result<PropertyDeclaration, ParseError<'i>> {
23067                parse(context, input)
23068                .map(PropertyDeclaration::GridAutoRows)
23069        }
23070    }
23071
23072
23073
23074    
23075    
23076        
23077    
23078    /// https://drafts.csswg.org/css-grid/#propdef-grid-template-rows
23079    pub mod grid_template_rows {
23080        #[allow(unused_imports)]
23081        use cssparser::{Parser, BasicParseError, Token};
23082        #[allow(unused_imports)]
23083        use crate::parser::{Parse, ParserContext};
23084        #[allow(unused_imports)]
23085        use crate::properties::{UnparsedValue, ShorthandId};
23086        #[allow(unused_imports)]
23087        use crate::error_reporting::ParseErrorReporter;
23088        #[allow(unused_imports)]
23089        use crate::properties::longhands;
23090        #[allow(unused_imports)]
23091        use crate::properties::{LonghandId, LonghandIdSet};
23092        #[allow(unused_imports)]
23093        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
23094        #[allow(unused_imports)]
23095        use crate::properties::style_structs;
23096        #[allow(unused_imports)]
23097        use selectors::parser::SelectorParseErrorKind;
23098        #[allow(unused_imports)]
23099        use servo_arc::Arc;
23100        #[allow(unused_imports)]
23101        use style_traits::{ParseError, StyleParseErrorKind};
23102        #[allow(unused_imports)]
23103        use crate::values::computed::{Context, ToComputedValue};
23104        #[allow(unused_imports)]
23105        use crate::values::{computed, generics, specified};
23106        #[allow(unused_imports)]
23107        use crate::Atom;
23108        
23109            
23110        #[allow(unused_imports)]
23111        use app_units::Au;
23112        #[allow(unused_imports)]
23113        use crate::values::specified::AllowQuirks;
23114        #[allow(unused_imports)]
23115        use crate::Zero;
23116        #[allow(unused_imports)]
23117        use smallvec::SmallVec;
23118        pub use crate::values::specified::GridTemplateComponent as SpecifiedValue;
23119        pub mod computed_value {
23120            pub use crate::values::computed::GridTemplateComponent as T;
23121        }
23122        #[inline] pub fn get_initial_value() -> computed_value::T { specified::GenericGridTemplateComponent::None }
23123        #[allow(unused_variables)]
23124        #[inline]
23125        pub fn parse<'i, 't>(
23126            context: &ParserContext,
23127            input: &mut Parser<'i, 't>,
23128        ) -> Result<SpecifiedValue, ParseError<'i>> {
23129            <specified::GridTemplateComponent as crate::parser::Parse>::parse(context, input)
23130        }
23131    
23132        
23133        #[allow(unused_variables)]
23134        pub unsafe fn cascade_property(
23135            declaration: &PropertyDeclaration,
23136            context: &mut computed::Context,
23137        ) {
23138            context.for_non_inherited_property = true;
23139            debug_assert_eq!(
23140                declaration.id().as_longhand().unwrap(),
23141                LonghandId::GridTemplateRows,
23142            );
23143            let specified_value = match *declaration {
23144                PropertyDeclaration::CSSWideKeyword(ref wk) => {
23145                    match wk.keyword {
23146                        CSSWideKeyword::Unset |
23147                        CSSWideKeyword::Initial => {
23148                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
23149                        },
23150                        CSSWideKeyword::Inherit => {
23151                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
23152                                context.builder.inherit_grid_template_rows();
23153                        }
23154                        CSSWideKeyword::RevertLayer |
23155                        CSSWideKeyword::Revert => {
23156                            declaration.debug_crash("Found revert/revert-layer not dealt with");
23157                        },
23158                    }
23159                    return;
23160                },
23161                #[cfg(debug_assertions)]
23162                PropertyDeclaration::WithVariables(..) => {
23163                    declaration.debug_crash("Found variables not substituted");
23164                    return;
23165                },
23166                _ => unsafe {
23167                    declaration.unchecked_value_as::<crate::values::specified::GridTemplateComponent>()
23168                },
23169            };
23170
23171
23172                let computed = specified_value.to_computed_value(context);
23173                context.builder.set_grid_template_rows(computed)
23174        }
23175
23176        pub fn parse_declared<'i, 't>(
23177            context: &ParserContext,
23178            input: &mut Parser<'i, 't>,
23179        ) -> Result<PropertyDeclaration, ParseError<'i>> {
23180                parse(context, input)
23181                .map(PropertyDeclaration::GridTemplateRows)
23182        }
23183    }
23184
23185
23186
23187        
23188    
23189        
23190    
23191    /// https://drafts.csswg.org/css-grid/#propdef-grid-column-start
23192    pub mod grid_column_start {
23193        #[allow(unused_imports)]
23194        use cssparser::{Parser, BasicParseError, Token};
23195        #[allow(unused_imports)]
23196        use crate::parser::{Parse, ParserContext};
23197        #[allow(unused_imports)]
23198        use crate::properties::{UnparsedValue, ShorthandId};
23199        #[allow(unused_imports)]
23200        use crate::error_reporting::ParseErrorReporter;
23201        #[allow(unused_imports)]
23202        use crate::properties::longhands;
23203        #[allow(unused_imports)]
23204        use crate::properties::{LonghandId, LonghandIdSet};
23205        #[allow(unused_imports)]
23206        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
23207        #[allow(unused_imports)]
23208        use crate::properties::style_structs;
23209        #[allow(unused_imports)]
23210        use selectors::parser::SelectorParseErrorKind;
23211        #[allow(unused_imports)]
23212        use servo_arc::Arc;
23213        #[allow(unused_imports)]
23214        use style_traits::{ParseError, StyleParseErrorKind};
23215        #[allow(unused_imports)]
23216        use crate::values::computed::{Context, ToComputedValue};
23217        #[allow(unused_imports)]
23218        use crate::values::{computed, generics, specified};
23219        #[allow(unused_imports)]
23220        use crate::Atom;
23221        
23222            
23223        #[allow(unused_imports)]
23224        use app_units::Au;
23225        #[allow(unused_imports)]
23226        use crate::values::specified::AllowQuirks;
23227        #[allow(unused_imports)]
23228        use crate::Zero;
23229        #[allow(unused_imports)]
23230        use smallvec::SmallVec;
23231        pub use crate::values::specified::GridLine as SpecifiedValue;
23232        pub mod computed_value {
23233            pub use crate::values::computed::GridLine as T;
23234        }
23235        #[inline] pub fn get_initial_value() -> computed_value::T { Default::default() }
23236        #[allow(unused_variables)]
23237        #[inline]
23238        pub fn parse<'i, 't>(
23239            context: &ParserContext,
23240            input: &mut Parser<'i, 't>,
23241        ) -> Result<SpecifiedValue, ParseError<'i>> {
23242            <specified::GridLine as crate::parser::Parse>::parse(context, input)
23243        }
23244    
23245        
23246        #[allow(unused_variables)]
23247        pub unsafe fn cascade_property(
23248            declaration: &PropertyDeclaration,
23249            context: &mut computed::Context,
23250        ) {
23251            context.for_non_inherited_property = true;
23252            debug_assert_eq!(
23253                declaration.id().as_longhand().unwrap(),
23254                LonghandId::GridColumnStart,
23255            );
23256            let specified_value = match *declaration {
23257                PropertyDeclaration::CSSWideKeyword(ref wk) => {
23258                    match wk.keyword {
23259                        CSSWideKeyword::Unset |
23260                        CSSWideKeyword::Initial => {
23261                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
23262                        },
23263                        CSSWideKeyword::Inherit => {
23264                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
23265                                context.builder.inherit_grid_column_start();
23266                        }
23267                        CSSWideKeyword::RevertLayer |
23268                        CSSWideKeyword::Revert => {
23269                            declaration.debug_crash("Found revert/revert-layer not dealt with");
23270                        },
23271                    }
23272                    return;
23273                },
23274                #[cfg(debug_assertions)]
23275                PropertyDeclaration::WithVariables(..) => {
23276                    declaration.debug_crash("Found variables not substituted");
23277                    return;
23278                },
23279                _ => unsafe {
23280                    declaration.unchecked_value_as::<crate::values::specified::GridLine>()
23281                },
23282            };
23283
23284
23285                let computed = specified_value.to_computed_value(context);
23286                context.builder.set_grid_column_start(computed)
23287        }
23288
23289        pub fn parse_declared<'i, 't>(
23290            context: &ParserContext,
23291            input: &mut Parser<'i, 't>,
23292        ) -> Result<PropertyDeclaration, ParseError<'i>> {
23293                parse(context, input)
23294                .map(PropertyDeclaration::GridColumnStart)
23295        }
23296    }
23297
23298
23299        
23300    
23301        
23302    
23303    /// https://drafts.csswg.org/css-grid/#propdef-grid-column-end
23304    pub mod grid_column_end {
23305        #[allow(unused_imports)]
23306        use cssparser::{Parser, BasicParseError, Token};
23307        #[allow(unused_imports)]
23308        use crate::parser::{Parse, ParserContext};
23309        #[allow(unused_imports)]
23310        use crate::properties::{UnparsedValue, ShorthandId};
23311        #[allow(unused_imports)]
23312        use crate::error_reporting::ParseErrorReporter;
23313        #[allow(unused_imports)]
23314        use crate::properties::longhands;
23315        #[allow(unused_imports)]
23316        use crate::properties::{LonghandId, LonghandIdSet};
23317        #[allow(unused_imports)]
23318        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
23319        #[allow(unused_imports)]
23320        use crate::properties::style_structs;
23321        #[allow(unused_imports)]
23322        use selectors::parser::SelectorParseErrorKind;
23323        #[allow(unused_imports)]
23324        use servo_arc::Arc;
23325        #[allow(unused_imports)]
23326        use style_traits::{ParseError, StyleParseErrorKind};
23327        #[allow(unused_imports)]
23328        use crate::values::computed::{Context, ToComputedValue};
23329        #[allow(unused_imports)]
23330        use crate::values::{computed, generics, specified};
23331        #[allow(unused_imports)]
23332        use crate::Atom;
23333        
23334            
23335        #[allow(unused_imports)]
23336        use app_units::Au;
23337        #[allow(unused_imports)]
23338        use crate::values::specified::AllowQuirks;
23339        #[allow(unused_imports)]
23340        use crate::Zero;
23341        #[allow(unused_imports)]
23342        use smallvec::SmallVec;
23343        pub use crate::values::specified::GridLine as SpecifiedValue;
23344        pub mod computed_value {
23345            pub use crate::values::computed::GridLine as T;
23346        }
23347        #[inline] pub fn get_initial_value() -> computed_value::T { Default::default() }
23348        #[allow(unused_variables)]
23349        #[inline]
23350        pub fn parse<'i, 't>(
23351            context: &ParserContext,
23352            input: &mut Parser<'i, 't>,
23353        ) -> Result<SpecifiedValue, ParseError<'i>> {
23354            <specified::GridLine as crate::parser::Parse>::parse(context, input)
23355        }
23356    
23357        
23358        #[allow(unused_variables)]
23359        pub unsafe fn cascade_property(
23360            declaration: &PropertyDeclaration,
23361            context: &mut computed::Context,
23362        ) {
23363            context.for_non_inherited_property = true;
23364            debug_assert_eq!(
23365                declaration.id().as_longhand().unwrap(),
23366                LonghandId::GridColumnEnd,
23367            );
23368            let specified_value = match *declaration {
23369                PropertyDeclaration::CSSWideKeyword(ref wk) => {
23370                    match wk.keyword {
23371                        CSSWideKeyword::Unset |
23372                        CSSWideKeyword::Initial => {
23373                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
23374                        },
23375                        CSSWideKeyword::Inherit => {
23376                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
23377                                context.builder.inherit_grid_column_end();
23378                        }
23379                        CSSWideKeyword::RevertLayer |
23380                        CSSWideKeyword::Revert => {
23381                            declaration.debug_crash("Found revert/revert-layer not dealt with");
23382                        },
23383                    }
23384                    return;
23385                },
23386                #[cfg(debug_assertions)]
23387                PropertyDeclaration::WithVariables(..) => {
23388                    declaration.debug_crash("Found variables not substituted");
23389                    return;
23390                },
23391                _ => unsafe {
23392                    declaration.unchecked_value_as::<crate::values::specified::GridLine>()
23393                },
23394            };
23395
23396
23397                let computed = specified_value.to_computed_value(context);
23398                context.builder.set_grid_column_end(computed)
23399        }
23400
23401        pub fn parse_declared<'i, 't>(
23402            context: &ParserContext,
23403            input: &mut Parser<'i, 't>,
23404        ) -> Result<PropertyDeclaration, ParseError<'i>> {
23405                parse(context, input)
23406                .map(PropertyDeclaration::GridColumnEnd)
23407        }
23408    }
23409
23410
23411
23412    
23413    
23414        
23415    
23416    /// https://drafts.csswg.org/css-grid/#propdef-grid-auto-columns
23417    pub mod grid_auto_columns {
23418        #[allow(unused_imports)]
23419        use cssparser::{Parser, BasicParseError, Token};
23420        #[allow(unused_imports)]
23421        use crate::parser::{Parse, ParserContext};
23422        #[allow(unused_imports)]
23423        use crate::properties::{UnparsedValue, ShorthandId};
23424        #[allow(unused_imports)]
23425        use crate::error_reporting::ParseErrorReporter;
23426        #[allow(unused_imports)]
23427        use crate::properties::longhands;
23428        #[allow(unused_imports)]
23429        use crate::properties::{LonghandId, LonghandIdSet};
23430        #[allow(unused_imports)]
23431        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
23432        #[allow(unused_imports)]
23433        use crate::properties::style_structs;
23434        #[allow(unused_imports)]
23435        use selectors::parser::SelectorParseErrorKind;
23436        #[allow(unused_imports)]
23437        use servo_arc::Arc;
23438        #[allow(unused_imports)]
23439        use style_traits::{ParseError, StyleParseErrorKind};
23440        #[allow(unused_imports)]
23441        use crate::values::computed::{Context, ToComputedValue};
23442        #[allow(unused_imports)]
23443        use crate::values::{computed, generics, specified};
23444        #[allow(unused_imports)]
23445        use crate::Atom;
23446        
23447            
23448        #[allow(unused_imports)]
23449        use app_units::Au;
23450        #[allow(unused_imports)]
23451        use crate::values::specified::AllowQuirks;
23452        #[allow(unused_imports)]
23453        use crate::Zero;
23454        #[allow(unused_imports)]
23455        use smallvec::SmallVec;
23456        pub use crate::values::specified::ImplicitGridTracks as SpecifiedValue;
23457        pub mod computed_value {
23458            pub use crate::values::computed::ImplicitGridTracks as T;
23459        }
23460        #[inline] pub fn get_initial_value() -> computed_value::T { Default::default() }
23461        #[allow(unused_variables)]
23462        #[inline]
23463        pub fn parse<'i, 't>(
23464            context: &ParserContext,
23465            input: &mut Parser<'i, 't>,
23466        ) -> Result<SpecifiedValue, ParseError<'i>> {
23467            <specified::ImplicitGridTracks as crate::parser::Parse>::parse(context, input)
23468        }
23469    
23470        
23471        #[allow(unused_variables)]
23472        pub unsafe fn cascade_property(
23473            declaration: &PropertyDeclaration,
23474            context: &mut computed::Context,
23475        ) {
23476            context.for_non_inherited_property = true;
23477            debug_assert_eq!(
23478                declaration.id().as_longhand().unwrap(),
23479                LonghandId::GridAutoColumns,
23480            );
23481            let specified_value = match *declaration {
23482                PropertyDeclaration::CSSWideKeyword(ref wk) => {
23483                    match wk.keyword {
23484                        CSSWideKeyword::Unset |
23485                        CSSWideKeyword::Initial => {
23486                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
23487                        },
23488                        CSSWideKeyword::Inherit => {
23489                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
23490                                context.builder.inherit_grid_auto_columns();
23491                        }
23492                        CSSWideKeyword::RevertLayer |
23493                        CSSWideKeyword::Revert => {
23494                            declaration.debug_crash("Found revert/revert-layer not dealt with");
23495                        },
23496                    }
23497                    return;
23498                },
23499                #[cfg(debug_assertions)]
23500                PropertyDeclaration::WithVariables(..) => {
23501                    declaration.debug_crash("Found variables not substituted");
23502                    return;
23503                },
23504                _ => unsafe {
23505                    declaration.unchecked_value_as::<crate::values::specified::ImplicitGridTracks>()
23506                },
23507            };
23508
23509
23510                let computed = specified_value.to_computed_value(context);
23511                context.builder.set_grid_auto_columns(computed)
23512        }
23513
23514        pub fn parse_declared<'i, 't>(
23515            context: &ParserContext,
23516            input: &mut Parser<'i, 't>,
23517        ) -> Result<PropertyDeclaration, ParseError<'i>> {
23518                parse(context, input)
23519                .map(PropertyDeclaration::GridAutoColumns)
23520        }
23521    }
23522
23523
23524
23525    
23526    
23527        
23528    
23529    /// https://drafts.csswg.org/css-grid/#propdef-grid-template-columns
23530    pub mod grid_template_columns {
23531        #[allow(unused_imports)]
23532        use cssparser::{Parser, BasicParseError, Token};
23533        #[allow(unused_imports)]
23534        use crate::parser::{Parse, ParserContext};
23535        #[allow(unused_imports)]
23536        use crate::properties::{UnparsedValue, ShorthandId};
23537        #[allow(unused_imports)]
23538        use crate::error_reporting::ParseErrorReporter;
23539        #[allow(unused_imports)]
23540        use crate::properties::longhands;
23541        #[allow(unused_imports)]
23542        use crate::properties::{LonghandId, LonghandIdSet};
23543        #[allow(unused_imports)]
23544        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
23545        #[allow(unused_imports)]
23546        use crate::properties::style_structs;
23547        #[allow(unused_imports)]
23548        use selectors::parser::SelectorParseErrorKind;
23549        #[allow(unused_imports)]
23550        use servo_arc::Arc;
23551        #[allow(unused_imports)]
23552        use style_traits::{ParseError, StyleParseErrorKind};
23553        #[allow(unused_imports)]
23554        use crate::values::computed::{Context, ToComputedValue};
23555        #[allow(unused_imports)]
23556        use crate::values::{computed, generics, specified};
23557        #[allow(unused_imports)]
23558        use crate::Atom;
23559        
23560            
23561        #[allow(unused_imports)]
23562        use app_units::Au;
23563        #[allow(unused_imports)]
23564        use crate::values::specified::AllowQuirks;
23565        #[allow(unused_imports)]
23566        use crate::Zero;
23567        #[allow(unused_imports)]
23568        use smallvec::SmallVec;
23569        pub use crate::values::specified::GridTemplateComponent as SpecifiedValue;
23570        pub mod computed_value {
23571            pub use crate::values::computed::GridTemplateComponent as T;
23572        }
23573        #[inline] pub fn get_initial_value() -> computed_value::T { specified::GenericGridTemplateComponent::None }
23574        #[allow(unused_variables)]
23575        #[inline]
23576        pub fn parse<'i, 't>(
23577            context: &ParserContext,
23578            input: &mut Parser<'i, 't>,
23579        ) -> Result<SpecifiedValue, ParseError<'i>> {
23580            <specified::GridTemplateComponent as crate::parser::Parse>::parse(context, input)
23581        }
23582    
23583        
23584        #[allow(unused_variables)]
23585        pub unsafe fn cascade_property(
23586            declaration: &PropertyDeclaration,
23587            context: &mut computed::Context,
23588        ) {
23589            context.for_non_inherited_property = true;
23590            debug_assert_eq!(
23591                declaration.id().as_longhand().unwrap(),
23592                LonghandId::GridTemplateColumns,
23593            );
23594            let specified_value = match *declaration {
23595                PropertyDeclaration::CSSWideKeyword(ref wk) => {
23596                    match wk.keyword {
23597                        CSSWideKeyword::Unset |
23598                        CSSWideKeyword::Initial => {
23599                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
23600                        },
23601                        CSSWideKeyword::Inherit => {
23602                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
23603                                context.builder.inherit_grid_template_columns();
23604                        }
23605                        CSSWideKeyword::RevertLayer |
23606                        CSSWideKeyword::Revert => {
23607                            declaration.debug_crash("Found revert/revert-layer not dealt with");
23608                        },
23609                    }
23610                    return;
23611                },
23612                #[cfg(debug_assertions)]
23613                PropertyDeclaration::WithVariables(..) => {
23614                    declaration.debug_crash("Found variables not substituted");
23615                    return;
23616                },
23617                _ => unsafe {
23618                    declaration.unchecked_value_as::<crate::values::specified::GridTemplateComponent>()
23619                },
23620            };
23621
23622
23623                let computed = specified_value.to_computed_value(context);
23624                context.builder.set_grid_template_columns(computed)
23625        }
23626
23627        pub fn parse_declared<'i, 't>(
23628            context: &ParserContext,
23629            input: &mut Parser<'i, 't>,
23630        ) -> Result<PropertyDeclaration, ParseError<'i>> {
23631                parse(context, input)
23632                .map(PropertyDeclaration::GridTemplateColumns)
23633        }
23634    }
23635
23636
23637
23638
23639
23640    
23641        
23642    
23643
23644
23645
23646    
23647        
23648    
23649    /// https://drafts.csswg.org/css-grid/#propdef-grid-auto-flow
23650    pub mod grid_auto_flow {
23651        #[allow(unused_imports)]
23652        use cssparser::{Parser, BasicParseError, Token};
23653        #[allow(unused_imports)]
23654        use crate::parser::{Parse, ParserContext};
23655        #[allow(unused_imports)]
23656        use crate::properties::{UnparsedValue, ShorthandId};
23657        #[allow(unused_imports)]
23658        use crate::error_reporting::ParseErrorReporter;
23659        #[allow(unused_imports)]
23660        use crate::properties::longhands;
23661        #[allow(unused_imports)]
23662        use crate::properties::{LonghandId, LonghandIdSet};
23663        #[allow(unused_imports)]
23664        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
23665        #[allow(unused_imports)]
23666        use crate::properties::style_structs;
23667        #[allow(unused_imports)]
23668        use selectors::parser::SelectorParseErrorKind;
23669        #[allow(unused_imports)]
23670        use servo_arc::Arc;
23671        #[allow(unused_imports)]
23672        use style_traits::{ParseError, StyleParseErrorKind};
23673        #[allow(unused_imports)]
23674        use crate::values::computed::{Context, ToComputedValue};
23675        #[allow(unused_imports)]
23676        use crate::values::{computed, generics, specified};
23677        #[allow(unused_imports)]
23678        use crate::Atom;
23679        
23680            
23681        #[allow(unused_imports)]
23682        use app_units::Au;
23683        #[allow(unused_imports)]
23684        use crate::values::specified::AllowQuirks;
23685        #[allow(unused_imports)]
23686        use crate::Zero;
23687        #[allow(unused_imports)]
23688        use smallvec::SmallVec;
23689        pub use crate::values::specified::GridAutoFlow as SpecifiedValue;
23690        pub mod computed_value {
23691            pub use crate::values::computed::GridAutoFlow as T;
23692        }
23693        #[inline] pub fn get_initial_value() -> computed_value::T { computed::GridAutoFlow::ROW }
23694        #[allow(unused_variables)]
23695        #[inline]
23696        pub fn parse<'i, 't>(
23697            context: &ParserContext,
23698            input: &mut Parser<'i, 't>,
23699        ) -> Result<SpecifiedValue, ParseError<'i>> {
23700            <specified::GridAutoFlow as crate::parser::Parse>::parse(context, input)
23701        }
23702    
23703        
23704        #[allow(unused_variables)]
23705        pub unsafe fn cascade_property(
23706            declaration: &PropertyDeclaration,
23707            context: &mut computed::Context,
23708        ) {
23709            context.for_non_inherited_property = true;
23710            debug_assert_eq!(
23711                declaration.id().as_longhand().unwrap(),
23712                LonghandId::GridAutoFlow,
23713            );
23714            let specified_value = match *declaration {
23715                PropertyDeclaration::CSSWideKeyword(ref wk) => {
23716                    match wk.keyword {
23717                        CSSWideKeyword::Unset |
23718                        CSSWideKeyword::Initial => {
23719                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
23720                        },
23721                        CSSWideKeyword::Inherit => {
23722                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
23723                                context.builder.inherit_grid_auto_flow();
23724                        }
23725                        CSSWideKeyword::RevertLayer |
23726                        CSSWideKeyword::Revert => {
23727                            declaration.debug_crash("Found revert/revert-layer not dealt with");
23728                        },
23729                    }
23730                    return;
23731                },
23732                #[cfg(debug_assertions)]
23733                PropertyDeclaration::WithVariables(..) => {
23734                    declaration.debug_crash("Found variables not substituted");
23735                    return;
23736                },
23737                _ => unsafe {
23738                    declaration.unchecked_value_as::<crate::values::specified::GridAutoFlow>()
23739                },
23740            };
23741
23742
23743                let computed = specified_value.to_computed_value(context);
23744                context.builder.set_grid_auto_flow(computed)
23745        }
23746
23747        pub fn parse_declared<'i, 't>(
23748            context: &ParserContext,
23749            input: &mut Parser<'i, 't>,
23750        ) -> Result<PropertyDeclaration, ParseError<'i>> {
23751                parse(context, input)
23752                .map(PropertyDeclaration::GridAutoFlow)
23753        }
23754    }
23755
23756
23757
23758
23759    
23760        
23761    
23762    /// https://drafts.csswg.org/css-grid/#propdef-grid-template-areas
23763    pub mod grid_template_areas {
23764        #[allow(unused_imports)]
23765        use cssparser::{Parser, BasicParseError, Token};
23766        #[allow(unused_imports)]
23767        use crate::parser::{Parse, ParserContext};
23768        #[allow(unused_imports)]
23769        use crate::properties::{UnparsedValue, ShorthandId};
23770        #[allow(unused_imports)]
23771        use crate::error_reporting::ParseErrorReporter;
23772        #[allow(unused_imports)]
23773        use crate::properties::longhands;
23774        #[allow(unused_imports)]
23775        use crate::properties::{LonghandId, LonghandIdSet};
23776        #[allow(unused_imports)]
23777        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
23778        #[allow(unused_imports)]
23779        use crate::properties::style_structs;
23780        #[allow(unused_imports)]
23781        use selectors::parser::SelectorParseErrorKind;
23782        #[allow(unused_imports)]
23783        use servo_arc::Arc;
23784        #[allow(unused_imports)]
23785        use style_traits::{ParseError, StyleParseErrorKind};
23786        #[allow(unused_imports)]
23787        use crate::values::computed::{Context, ToComputedValue};
23788        #[allow(unused_imports)]
23789        use crate::values::{computed, generics, specified};
23790        #[allow(unused_imports)]
23791        use crate::Atom;
23792        
23793            
23794        #[allow(unused_imports)]
23795        use app_units::Au;
23796        #[allow(unused_imports)]
23797        use crate::values::specified::AllowQuirks;
23798        #[allow(unused_imports)]
23799        use crate::Zero;
23800        #[allow(unused_imports)]
23801        use smallvec::SmallVec;
23802        pub use crate::values::specified::GridTemplateAreas as SpecifiedValue;
23803        pub mod computed_value {
23804            pub use crate::values::computed::GridTemplateAreas as T;
23805        }
23806        #[inline] pub fn get_initial_value() -> computed_value::T { computed::GridTemplateAreas::none() }
23807        #[allow(unused_variables)]
23808        #[inline]
23809        pub fn parse<'i, 't>(
23810            context: &ParserContext,
23811            input: &mut Parser<'i, 't>,
23812        ) -> Result<SpecifiedValue, ParseError<'i>> {
23813            <specified::GridTemplateAreas as crate::parser::Parse>::parse(context, input)
23814        }
23815    
23816        
23817        #[allow(unused_variables)]
23818        pub unsafe fn cascade_property(
23819            declaration: &PropertyDeclaration,
23820            context: &mut computed::Context,
23821        ) {
23822            context.for_non_inherited_property = true;
23823            debug_assert_eq!(
23824                declaration.id().as_longhand().unwrap(),
23825                LonghandId::GridTemplateAreas,
23826            );
23827            let specified_value = match *declaration {
23828                PropertyDeclaration::CSSWideKeyword(ref wk) => {
23829                    match wk.keyword {
23830                        CSSWideKeyword::Unset |
23831                        CSSWideKeyword::Initial => {
23832                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
23833                        },
23834                        CSSWideKeyword::Inherit => {
23835                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
23836                                context.builder.inherit_grid_template_areas();
23837                        }
23838                        CSSWideKeyword::RevertLayer |
23839                        CSSWideKeyword::Revert => {
23840                            declaration.debug_crash("Found revert/revert-layer not dealt with");
23841                        },
23842                    }
23843                    return;
23844                },
23845                #[cfg(debug_assertions)]
23846                PropertyDeclaration::WithVariables(..) => {
23847                    declaration.debug_crash("Found variables not substituted");
23848                    return;
23849                },
23850                _ => unsafe {
23851                    declaration.unchecked_value_as::<crate::values::specified::GridTemplateAreas>()
23852                },
23853            };
23854
23855
23856                let computed = specified_value.to_computed_value(context);
23857                context.builder.set_grid_template_areas(computed)
23858        }
23859
23860        pub fn parse_declared<'i, 't>(
23861            context: &ParserContext,
23862            input: &mut Parser<'i, 't>,
23863        ) -> Result<PropertyDeclaration, ParseError<'i>> {
23864                parse(context, input)
23865                .map(PropertyDeclaration::GridTemplateAreas)
23866        }
23867    }
23868
23869
23870
23871
23872    
23873        
23874    
23875    /// https://drafts.csswg.org/css-align-3/#propdef-column-gap
23876    pub mod column_gap {
23877        #[allow(unused_imports)]
23878        use cssparser::{Parser, BasicParseError, Token};
23879        #[allow(unused_imports)]
23880        use crate::parser::{Parse, ParserContext};
23881        #[allow(unused_imports)]
23882        use crate::properties::{UnparsedValue, ShorthandId};
23883        #[allow(unused_imports)]
23884        use crate::error_reporting::ParseErrorReporter;
23885        #[allow(unused_imports)]
23886        use crate::properties::longhands;
23887        #[allow(unused_imports)]
23888        use crate::properties::{LonghandId, LonghandIdSet};
23889        #[allow(unused_imports)]
23890        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
23891        #[allow(unused_imports)]
23892        use crate::properties::style_structs;
23893        #[allow(unused_imports)]
23894        use selectors::parser::SelectorParseErrorKind;
23895        #[allow(unused_imports)]
23896        use servo_arc::Arc;
23897        #[allow(unused_imports)]
23898        use style_traits::{ParseError, StyleParseErrorKind};
23899        #[allow(unused_imports)]
23900        use crate::values::computed::{Context, ToComputedValue};
23901        #[allow(unused_imports)]
23902        use crate::values::{computed, generics, specified};
23903        #[allow(unused_imports)]
23904        use crate::Atom;
23905        
23906            
23907        #[allow(unused_imports)]
23908        use app_units::Au;
23909        #[allow(unused_imports)]
23910        use crate::values::specified::AllowQuirks;
23911        #[allow(unused_imports)]
23912        use crate::Zero;
23913        #[allow(unused_imports)]
23914        use smallvec::SmallVec;
23915        pub use crate::values::specified::length::NonNegativeLengthPercentageOrNormal as SpecifiedValue;
23916        pub mod computed_value {
23917            pub use crate::values::computed::length::NonNegativeLengthPercentageOrNormal as T;
23918        }
23919        #[inline] pub fn get_initial_value() -> computed_value::T { computed::length::NonNegativeLengthPercentageOrNormal::normal() }
23920        #[allow(unused_variables)]
23921        #[inline]
23922        pub fn parse<'i, 't>(
23923            context: &ParserContext,
23924            input: &mut Parser<'i, 't>,
23925        ) -> Result<SpecifiedValue, ParseError<'i>> {
23926            <specified::length::NonNegativeLengthPercentageOrNormal as crate::parser::Parse>::parse(context, input)
23927        }
23928    
23929        
23930        #[allow(unused_variables)]
23931        pub unsafe fn cascade_property(
23932            declaration: &PropertyDeclaration,
23933            context: &mut computed::Context,
23934        ) {
23935            context.for_non_inherited_property = true;
23936            debug_assert_eq!(
23937                declaration.id().as_longhand().unwrap(),
23938                LonghandId::ColumnGap,
23939            );
23940            let specified_value = match *declaration {
23941                PropertyDeclaration::CSSWideKeyword(ref wk) => {
23942                    match wk.keyword {
23943                        CSSWideKeyword::Unset |
23944                        CSSWideKeyword::Initial => {
23945                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
23946                        },
23947                        CSSWideKeyword::Inherit => {
23948                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
23949                                context.builder.inherit_column_gap();
23950                        }
23951                        CSSWideKeyword::RevertLayer |
23952                        CSSWideKeyword::Revert => {
23953                            declaration.debug_crash("Found revert/revert-layer not dealt with");
23954                        },
23955                    }
23956                    return;
23957                },
23958                #[cfg(debug_assertions)]
23959                PropertyDeclaration::WithVariables(..) => {
23960                    declaration.debug_crash("Found variables not substituted");
23961                    return;
23962                },
23963                _ => unsafe {
23964                    declaration.unchecked_value_as::<crate::values::specified::length::NonNegativeLengthPercentageOrNormal>()
23965                },
23966            };
23967
23968
23969                let computed = specified_value.to_computed_value(context);
23970                context.builder.set_column_gap(computed)
23971        }
23972
23973        pub fn parse_declared<'i, 't>(
23974            context: &ParserContext,
23975            input: &mut Parser<'i, 't>,
23976        ) -> Result<PropertyDeclaration, ParseError<'i>> {
23977                parse(context, input)
23978                .map(PropertyDeclaration::ColumnGap)
23979        }
23980    }
23981
23982
23983
23984// no need for -moz- prefixed alias for this property
23985
23986    
23987        
23988    
23989    /// https://drafts.csswg.org/css-align-3/#propdef-row-gap
23990    pub mod row_gap {
23991        #[allow(unused_imports)]
23992        use cssparser::{Parser, BasicParseError, Token};
23993        #[allow(unused_imports)]
23994        use crate::parser::{Parse, ParserContext};
23995        #[allow(unused_imports)]
23996        use crate::properties::{UnparsedValue, ShorthandId};
23997        #[allow(unused_imports)]
23998        use crate::error_reporting::ParseErrorReporter;
23999        #[allow(unused_imports)]
24000        use crate::properties::longhands;
24001        #[allow(unused_imports)]
24002        use crate::properties::{LonghandId, LonghandIdSet};
24003        #[allow(unused_imports)]
24004        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
24005        #[allow(unused_imports)]
24006        use crate::properties::style_structs;
24007        #[allow(unused_imports)]
24008        use selectors::parser::SelectorParseErrorKind;
24009        #[allow(unused_imports)]
24010        use servo_arc::Arc;
24011        #[allow(unused_imports)]
24012        use style_traits::{ParseError, StyleParseErrorKind};
24013        #[allow(unused_imports)]
24014        use crate::values::computed::{Context, ToComputedValue};
24015        #[allow(unused_imports)]
24016        use crate::values::{computed, generics, specified};
24017        #[allow(unused_imports)]
24018        use crate::Atom;
24019        
24020            
24021        #[allow(unused_imports)]
24022        use app_units::Au;
24023        #[allow(unused_imports)]
24024        use crate::values::specified::AllowQuirks;
24025        #[allow(unused_imports)]
24026        use crate::Zero;
24027        #[allow(unused_imports)]
24028        use smallvec::SmallVec;
24029        pub use crate::values::specified::length::NonNegativeLengthPercentageOrNormal as SpecifiedValue;
24030        pub mod computed_value {
24031            pub use crate::values::computed::length::NonNegativeLengthPercentageOrNormal as T;
24032        }
24033        #[inline] pub fn get_initial_value() -> computed_value::T { computed::length::NonNegativeLengthPercentageOrNormal::normal() }
24034        #[allow(unused_variables)]
24035        #[inline]
24036        pub fn parse<'i, 't>(
24037            context: &ParserContext,
24038            input: &mut Parser<'i, 't>,
24039        ) -> Result<SpecifiedValue, ParseError<'i>> {
24040            <specified::length::NonNegativeLengthPercentageOrNormal as crate::parser::Parse>::parse(context, input)
24041        }
24042    
24043        
24044        #[allow(unused_variables)]
24045        pub unsafe fn cascade_property(
24046            declaration: &PropertyDeclaration,
24047            context: &mut computed::Context,
24048        ) {
24049            context.for_non_inherited_property = true;
24050            debug_assert_eq!(
24051                declaration.id().as_longhand().unwrap(),
24052                LonghandId::RowGap,
24053            );
24054            let specified_value = match *declaration {
24055                PropertyDeclaration::CSSWideKeyword(ref wk) => {
24056                    match wk.keyword {
24057                        CSSWideKeyword::Unset |
24058                        CSSWideKeyword::Initial => {
24059                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
24060                        },
24061                        CSSWideKeyword::Inherit => {
24062                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
24063                                context.builder.inherit_row_gap();
24064                        }
24065                        CSSWideKeyword::RevertLayer |
24066                        CSSWideKeyword::Revert => {
24067                            declaration.debug_crash("Found revert/revert-layer not dealt with");
24068                        },
24069                    }
24070                    return;
24071                },
24072                #[cfg(debug_assertions)]
24073                PropertyDeclaration::WithVariables(..) => {
24074                    declaration.debug_crash("Found variables not substituted");
24075                    return;
24076                },
24077                _ => unsafe {
24078                    declaration.unchecked_value_as::<crate::values::specified::length::NonNegativeLengthPercentageOrNormal>()
24079                },
24080            };
24081
24082
24083                let computed = specified_value.to_computed_value(context);
24084                context.builder.set_row_gap(computed)
24085        }
24086
24087        pub fn parse_declared<'i, 't>(
24088            context: &ParserContext,
24089            input: &mut Parser<'i, 't>,
24090        ) -> Result<PropertyDeclaration, ParseError<'i>> {
24091                parse(context, input)
24092                .map(PropertyDeclaration::RowGap)
24093        }
24094    }
24095
24096
24097
24098
24099    
24100        
24101    
24102    /// https://drafts.csswg.org/css-sizing-4/#aspect-ratio
24103    pub mod aspect_ratio {
24104        #[allow(unused_imports)]
24105        use cssparser::{Parser, BasicParseError, Token};
24106        #[allow(unused_imports)]
24107        use crate::parser::{Parse, ParserContext};
24108        #[allow(unused_imports)]
24109        use crate::properties::{UnparsedValue, ShorthandId};
24110        #[allow(unused_imports)]
24111        use crate::error_reporting::ParseErrorReporter;
24112        #[allow(unused_imports)]
24113        use crate::properties::longhands;
24114        #[allow(unused_imports)]
24115        use crate::properties::{LonghandId, LonghandIdSet};
24116        #[allow(unused_imports)]
24117        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
24118        #[allow(unused_imports)]
24119        use crate::properties::style_structs;
24120        #[allow(unused_imports)]
24121        use selectors::parser::SelectorParseErrorKind;
24122        #[allow(unused_imports)]
24123        use servo_arc::Arc;
24124        #[allow(unused_imports)]
24125        use style_traits::{ParseError, StyleParseErrorKind};
24126        #[allow(unused_imports)]
24127        use crate::values::computed::{Context, ToComputedValue};
24128        #[allow(unused_imports)]
24129        use crate::values::{computed, generics, specified};
24130        #[allow(unused_imports)]
24131        use crate::Atom;
24132        
24133            
24134        #[allow(unused_imports)]
24135        use app_units::Au;
24136        #[allow(unused_imports)]
24137        use crate::values::specified::AllowQuirks;
24138        #[allow(unused_imports)]
24139        use crate::Zero;
24140        #[allow(unused_imports)]
24141        use smallvec::SmallVec;
24142        pub use crate::values::specified::AspectRatio as SpecifiedValue;
24143        pub mod computed_value {
24144            pub use crate::values::computed::AspectRatio as T;
24145        }
24146        #[inline] pub fn get_initial_value() -> computed_value::T { computed::AspectRatio::auto() }
24147        #[allow(unused_variables)]
24148        #[inline]
24149        pub fn parse<'i, 't>(
24150            context: &ParserContext,
24151            input: &mut Parser<'i, 't>,
24152        ) -> Result<SpecifiedValue, ParseError<'i>> {
24153            <specified::AspectRatio as crate::parser::Parse>::parse(context, input)
24154        }
24155    
24156        
24157        #[allow(unused_variables)]
24158        pub unsafe fn cascade_property(
24159            declaration: &PropertyDeclaration,
24160            context: &mut computed::Context,
24161        ) {
24162            context.for_non_inherited_property = true;
24163            debug_assert_eq!(
24164                declaration.id().as_longhand().unwrap(),
24165                LonghandId::AspectRatio,
24166            );
24167            let specified_value = match *declaration {
24168                PropertyDeclaration::CSSWideKeyword(ref wk) => {
24169                    match wk.keyword {
24170                        CSSWideKeyword::Unset |
24171                        CSSWideKeyword::Initial => {
24172                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
24173                        },
24174                        CSSWideKeyword::Inherit => {
24175                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
24176                                context.builder.inherit_aspect_ratio();
24177                        }
24178                        CSSWideKeyword::RevertLayer |
24179                        CSSWideKeyword::Revert => {
24180                            declaration.debug_crash("Found revert/revert-layer not dealt with");
24181                        },
24182                    }
24183                    return;
24184                },
24185                #[cfg(debug_assertions)]
24186                PropertyDeclaration::WithVariables(..) => {
24187                    declaration.debug_crash("Found variables not substituted");
24188                    return;
24189                },
24190                _ => unsafe {
24191                    declaration.unchecked_value_as::<crate::values::specified::AspectRatio>()
24192                },
24193            };
24194
24195
24196                let computed = specified_value.to_computed_value(context);
24197                context.builder.set_aspect_ratio(computed)
24198        }
24199
24200        pub fn parse_declared<'i, 't>(
24201            context: &ParserContext,
24202            input: &mut Parser<'i, 't>,
24203        ) -> Result<PropertyDeclaration, ParseError<'i>> {
24204                parse(context, input)
24205                .map(PropertyDeclaration::AspectRatio)
24206        }
24207    }
24208
24209
24210
24211    
24212    
24213        
24214    
24215
24216    
24217    
24218        
24219    
24220
24221    
24222    
24223        
24224    
24225
24226    
24227    
24228        
24229    
24230
24231
24232    
24233    /* This Source Code Form is subject to the terms of the Mozilla Public
24234 * License, v. 2.0. If a copy of the MPL was not distributed with this
24235 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
24236
24237
24238
24239
24240    
24241        
24242    
24243
24244
24245// Section 14 - Gradients and Patterns
24246
24247
24248    
24249        
24250    
24251
24252
24253
24254    
24255        
24256    
24257
24258
24259// Filter Effects Module
24260
24261
24262    
24263        
24264    
24265
24266
24267
24268    
24269        
24270    
24271
24272
24273
24274    
24275        
24276    
24277
24278
24279// CSS Masking Module Level 1
24280// https://drafts.fxtf.org/css-masking-1
24281
24282    
24283
24284    
24285        
24286    
24287
24288
24289
24290    
24291        
24292    
24293    /// https://drafts.fxtf.org/css-masking-1/#propdef-clip-path
24294    pub mod clip_path {
24295        #[allow(unused_imports)]
24296        use cssparser::{Parser, BasicParseError, Token};
24297        #[allow(unused_imports)]
24298        use crate::parser::{Parse, ParserContext};
24299        #[allow(unused_imports)]
24300        use crate::properties::{UnparsedValue, ShorthandId};
24301        #[allow(unused_imports)]
24302        use crate::error_reporting::ParseErrorReporter;
24303        #[allow(unused_imports)]
24304        use crate::properties::longhands;
24305        #[allow(unused_imports)]
24306        use crate::properties::{LonghandId, LonghandIdSet};
24307        #[allow(unused_imports)]
24308        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
24309        #[allow(unused_imports)]
24310        use crate::properties::style_structs;
24311        #[allow(unused_imports)]
24312        use selectors::parser::SelectorParseErrorKind;
24313        #[allow(unused_imports)]
24314        use servo_arc::Arc;
24315        #[allow(unused_imports)]
24316        use style_traits::{ParseError, StyleParseErrorKind};
24317        #[allow(unused_imports)]
24318        use crate::values::computed::{Context, ToComputedValue};
24319        #[allow(unused_imports)]
24320        use crate::values::{computed, generics, specified};
24321        #[allow(unused_imports)]
24322        use crate::Atom;
24323        
24324            
24325        #[allow(unused_imports)]
24326        use app_units::Au;
24327        #[allow(unused_imports)]
24328        use crate::values::specified::AllowQuirks;
24329        #[allow(unused_imports)]
24330        use crate::Zero;
24331        #[allow(unused_imports)]
24332        use smallvec::SmallVec;
24333        pub use crate::values::specified::basic_shape::ClipPath as SpecifiedValue;
24334        pub mod computed_value {
24335            pub use crate::values::computed::basic_shape::ClipPath as T;
24336        }
24337        #[inline] pub fn get_initial_value() -> computed_value::T { generics::basic_shape::ClipPath::None }
24338        #[allow(unused_variables)]
24339        #[inline]
24340        pub fn parse<'i, 't>(
24341            context: &ParserContext,
24342            input: &mut Parser<'i, 't>,
24343        ) -> Result<SpecifiedValue, ParseError<'i>> {
24344            <specified::basic_shape::ClipPath as crate::parser::Parse>::parse(context, input)
24345        }
24346    
24347        
24348        #[allow(unused_variables)]
24349        pub unsafe fn cascade_property(
24350            declaration: &PropertyDeclaration,
24351            context: &mut computed::Context,
24352        ) {
24353            context.for_non_inherited_property = true;
24354            debug_assert_eq!(
24355                declaration.id().as_longhand().unwrap(),
24356                LonghandId::ClipPath,
24357            );
24358            let specified_value = match *declaration {
24359                PropertyDeclaration::CSSWideKeyword(ref wk) => {
24360                    match wk.keyword {
24361                        CSSWideKeyword::Unset |
24362                        CSSWideKeyword::Initial => {
24363                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
24364                        },
24365                        CSSWideKeyword::Inherit => {
24366                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
24367                                context.builder.inherit_clip_path();
24368                        }
24369                        CSSWideKeyword::RevertLayer |
24370                        CSSWideKeyword::Revert => {
24371                            declaration.debug_crash("Found revert/revert-layer not dealt with");
24372                        },
24373                    }
24374                    return;
24375                },
24376                #[cfg(debug_assertions)]
24377                PropertyDeclaration::WithVariables(..) => {
24378                    declaration.debug_crash("Found variables not substituted");
24379                    return;
24380                },
24381                _ => unsafe {
24382                    declaration.unchecked_value_as::<crate::values::specified::basic_shape::ClipPath>()
24383                },
24384            };
24385
24386
24387                let computed = specified_value.to_computed_value(context);
24388                context.builder.set_clip_path(computed)
24389        }
24390
24391        pub fn parse_declared<'i, 't>(
24392            context: &ParserContext,
24393            input: &mut Parser<'i, 't>,
24394        ) -> Result<PropertyDeclaration, ParseError<'i>> {
24395                parse(context, input)
24396                .map(PropertyDeclaration::ClipPath)
24397        }
24398    }
24399
24400
24401
24402
24403    
24404
24405    
24406        
24407    
24408    
24409
24410
24411
24412
24413    
24414        
24415    
24416    
24417
24418
24419
24420    
24421    
24422        
24423    
24424    
24425
24426
24427    
24428    
24429        
24430    
24431    
24432
24433
24434
24435
24436    
24437
24438    
24439        
24440    
24441    
24442
24443
24444
24445
24446    
24447
24448    
24449        
24450    
24451    
24452
24453
24454
24455
24456    
24457        
24458    
24459    
24460
24461
24462
24463
24464    
24465
24466    
24467        
24468    
24469    
24470
24471
24472
24473
24474    
24475        
24476    
24477    
24478    /// https://drafts.fxtf.org/css-masking-1/#propdef-mask-image
24479    pub mod mask_image {
24480        #[allow(unused_imports)]
24481        use cssparser::{Parser, BasicParseError, Token};
24482        #[allow(unused_imports)]
24483        use crate::parser::{Parse, ParserContext};
24484        #[allow(unused_imports)]
24485        use crate::properties::{UnparsedValue, ShorthandId};
24486        #[allow(unused_imports)]
24487        use crate::error_reporting::ParseErrorReporter;
24488        #[allow(unused_imports)]
24489        use crate::properties::longhands;
24490        #[allow(unused_imports)]
24491        use crate::properties::{LonghandId, LonghandIdSet};
24492        #[allow(unused_imports)]
24493        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
24494        #[allow(unused_imports)]
24495        use crate::properties::style_structs;
24496        #[allow(unused_imports)]
24497        use selectors::parser::SelectorParseErrorKind;
24498        #[allow(unused_imports)]
24499        use servo_arc::Arc;
24500        #[allow(unused_imports)]
24501        use style_traits::{ParseError, StyleParseErrorKind};
24502        #[allow(unused_imports)]
24503        use crate::values::computed::{Context, ToComputedValue};
24504        #[allow(unused_imports)]
24505        use crate::values::{computed, generics, specified};
24506        #[allow(unused_imports)]
24507        use crate::Atom;
24508        
24509        #[allow(unused_imports)]
24510        use smallvec::SmallVec;
24511
24512        pub mod single_value {
24513            #[allow(unused_imports)]
24514            use cssparser::{Parser, BasicParseError};
24515            #[allow(unused_imports)]
24516            use crate::parser::{Parse, ParserContext};
24517            #[allow(unused_imports)]
24518            use crate::properties::ShorthandId;
24519            #[allow(unused_imports)]
24520            use selectors::parser::SelectorParseErrorKind;
24521            #[allow(unused_imports)]
24522            use style_traits::{ParseError, StyleParseErrorKind};
24523            #[allow(unused_imports)]
24524            use crate::values::computed::{Context, ToComputedValue};
24525            #[allow(unused_imports)]
24526            use crate::values::{computed, specified};
24527            
24528            
24529        #[allow(unused_imports)]
24530        use app_units::Au;
24531        #[allow(unused_imports)]
24532        use crate::values::specified::AllowQuirks;
24533        #[allow(unused_imports)]
24534        use crate::Zero;
24535        #[allow(unused_imports)]
24536        use smallvec::SmallVec;
24537        pub use crate::values::specified::Image as SpecifiedValue;
24538        pub mod computed_value {
24539            pub use crate::values::computed::Image as T;
24540        }
24541        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Image::None }
24542        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::Image::None }
24543        #[allow(unused_variables)]
24544        #[inline]
24545        pub fn parse<'i, 't>(
24546            context: &ParserContext,
24547            input: &mut Parser<'i, 't>,
24548        ) -> Result<SpecifiedValue, ParseError<'i>> {
24549            specified::Image::parse_with_cors_anonymous(context, input)
24550        }
24551    
24552        
24553        }
24554
24555        /// The definition of the computed value for mask-image.
24556        pub mod computed_value {
24557            #[allow(unused_imports)]
24558            use crate::values::animated::ToAnimatedValue;
24559            #[allow(unused_imports)]
24560            use crate::values::resolved::ToResolvedValue;
24561            pub use super::single_value::computed_value as single_value;
24562            pub use self::single_value::T as SingleComputedValue;
24563            use smallvec::SmallVec;
24564            use crate::values::computed::ComputedVecIter;
24565
24566            
24567
24568            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
24569            // something for transition-name, which is the only remaining user
24570            // of NotInitial.
24571            pub type UnderlyingList<T> =
24572                    SmallVec<[T; 1]>;
24573
24574            pub type UnderlyingOwnedList<T> =
24575                    SmallVec<[T; 1]>;
24576
24577
24578            /// The generic type defining the animated and resolved values for
24579            /// this property.
24580            ///
24581            /// Making this type generic allows the compiler to figure out the
24582            /// animated value for us, instead of having to implement it
24583            /// manually for every type we care about.
24584            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
24585            #[css(comma)]
24586            pub struct OwnedList<T>(
24587                #[css(iterable)]
24588                pub UnderlyingOwnedList<T>,
24589            );
24590
24591            /// The computed value for this property.
24592            pub type ComputedList = OwnedList<single_value::T>;
24593            pub use self::OwnedList as List;
24594
24595
24596
24597            /// The computed value, effectively a list of single values.
24598            pub use self::ComputedList as T;
24599
24600            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
24601        }
24602
24603        /// The specified value of mask-image.
24604        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
24605        #[css(comma)]
24606        pub struct SpecifiedValue(
24607            #[css(iterable)]
24608            pub crate::OwnedSlice<single_value::SpecifiedValue>,
24609        );
24610
24611        pub fn get_initial_value() -> computed_value::T {
24612                let mut v = SmallVec::new();
24613                v.push(single_value::get_initial_value());
24614                computed_value::List(v)
24615        }
24616
24617        pub fn parse<'i, 't>(
24618            context: &ParserContext,
24619            input: &mut Parser<'i, 't>,
24620        ) -> Result<SpecifiedValue, ParseError<'i>> {
24621            use style_traits::Separator;
24622
24623
24624            let v = style_traits::Comma::parse(input, |parser| {
24625                single_value::parse(context, parser)
24626            })?;
24627            Ok(SpecifiedValue(v.into()))
24628        }
24629
24630        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
24631
24632
24633        impl ToComputedValue for SpecifiedValue {
24634            type ComputedValue = computed_value::T;
24635
24636            #[inline]
24637            fn to_computed_value(&self, context: &Context) -> computed_value::T {
24638                use std::iter::FromIterator;
24639                computed_value::List(computed_value::UnderlyingList::from_iter(
24640                    self.0.iter().map(|i| i.to_computed_value(context))
24641                ))
24642            }
24643
24644            #[inline]
24645            fn from_computed_value(computed: &computed_value::T) -> Self {
24646                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
24647                SpecifiedValue(iter.collect())
24648            }
24649        }
24650    
24651        #[allow(unused_variables)]
24652        pub unsafe fn cascade_property(
24653            declaration: &PropertyDeclaration,
24654            context: &mut computed::Context,
24655        ) {
24656            context.for_non_inherited_property = true;
24657            debug_assert_eq!(
24658                declaration.id().as_longhand().unwrap(),
24659                LonghandId::MaskImage,
24660            );
24661            let specified_value = match *declaration {
24662                PropertyDeclaration::CSSWideKeyword(ref wk) => {
24663                    match wk.keyword {
24664                        CSSWideKeyword::Unset |
24665                        CSSWideKeyword::Initial => {
24666                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
24667                        },
24668                        CSSWideKeyword::Inherit => {
24669                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
24670                                context.builder.inherit_mask_image();
24671                        }
24672                        CSSWideKeyword::RevertLayer |
24673                        CSSWideKeyword::Revert => {
24674                            declaration.debug_crash("Found revert/revert-layer not dealt with");
24675                        },
24676                    }
24677                    return;
24678                },
24679                #[cfg(debug_assertions)]
24680                PropertyDeclaration::WithVariables(..) => {
24681                    declaration.debug_crash("Found variables not substituted");
24682                    return;
24683                },
24684                _ => unsafe {
24685                    declaration.unchecked_value_as::<longhands::mask_image::SpecifiedValue>()
24686                },
24687            };
24688
24689
24690                let computed = specified_value.to_computed_value(context);
24691                context.builder.set_mask_image(computed)
24692        }
24693
24694        pub fn parse_declared<'i, 't>(
24695            context: &ParserContext,
24696            input: &mut Parser<'i, 't>,
24697        ) -> Result<PropertyDeclaration, ParseError<'i>> {
24698                parse(context, input)
24699                .map(PropertyDeclaration::MaskImage)
24700        }
24701    }
24702
24703
24704
24705
24706
24707    
24708        
24709    
24710
24711
24712
24713    
24714        
24715    
24716
24717
24718
24719    
24720        
24721    
24722
24723
24724
24725    
24726        
24727    
24728
24729
24730
24731    
24732        
24733    
24734
24735
24736
24737    
24738        
24739    
24740
24741
24742
24743    
24744        
24745    
24746
24747
24748
24749    
24750        
24751    
24752
24753
24754    
24755    /* This Source Code Form is subject to the terms of the Mozilla Public
24756 * License, v. 2.0. If a copy of the MPL was not distributed with this
24757 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
24758
24759
24760
24761
24762    
24763
24764    
24765        
24766    
24767    /// https://drafts.csswg.org/css-tables/#propdef-table-layout
24768    pub mod table_layout {
24769        #[allow(unused_imports)]
24770        use cssparser::{Parser, BasicParseError, Token};
24771        #[allow(unused_imports)]
24772        use crate::parser::{Parse, ParserContext};
24773        #[allow(unused_imports)]
24774        use crate::properties::{UnparsedValue, ShorthandId};
24775        #[allow(unused_imports)]
24776        use crate::error_reporting::ParseErrorReporter;
24777        #[allow(unused_imports)]
24778        use crate::properties::longhands;
24779        #[allow(unused_imports)]
24780        use crate::properties::{LonghandId, LonghandIdSet};
24781        #[allow(unused_imports)]
24782        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
24783        #[allow(unused_imports)]
24784        use crate::properties::style_structs;
24785        #[allow(unused_imports)]
24786        use selectors::parser::SelectorParseErrorKind;
24787        #[allow(unused_imports)]
24788        use servo_arc::Arc;
24789        #[allow(unused_imports)]
24790        use style_traits::{ParseError, StyleParseErrorKind};
24791        #[allow(unused_imports)]
24792        use crate::values::computed::{Context, ToComputedValue};
24793        #[allow(unused_imports)]
24794        use crate::values::{computed, generics, specified};
24795        #[allow(unused_imports)]
24796        use crate::Atom;
24797        
24798            
24799        pub use self::computed_value::T as SpecifiedValue;
24800        pub mod computed_value {
24801            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
24802            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
24803            pub enum T {
24804            
24805            Auto,
24806            
24807            Fixed,
24808            }
24809        }
24810        #[inline]
24811        pub fn get_initial_value() -> computed_value::T {
24812            computed_value::T::Auto
24813        }
24814        #[inline]
24815        pub fn get_initial_specified_value() -> SpecifiedValue {
24816            SpecifiedValue::Auto
24817        }
24818        #[inline]
24819        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
24820                             -> Result<SpecifiedValue, ParseError<'i>> {
24821            SpecifiedValue::parse(input)
24822        }
24823
24824    
24825        
24826        #[allow(unused_variables)]
24827        pub unsafe fn cascade_property(
24828            declaration: &PropertyDeclaration,
24829            context: &mut computed::Context,
24830        ) {
24831            context.for_non_inherited_property = true;
24832            debug_assert_eq!(
24833                declaration.id().as_longhand().unwrap(),
24834                LonghandId::TableLayout,
24835            );
24836            let specified_value = match *declaration {
24837                PropertyDeclaration::CSSWideKeyword(ref wk) => {
24838                    match wk.keyword {
24839                        CSSWideKeyword::Unset |
24840                        CSSWideKeyword::Initial => {
24841                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
24842                        },
24843                        CSSWideKeyword::Inherit => {
24844                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
24845                                context.builder.inherit_table_layout();
24846                        }
24847                        CSSWideKeyword::RevertLayer |
24848                        CSSWideKeyword::Revert => {
24849                            declaration.debug_crash("Found revert/revert-layer not dealt with");
24850                        },
24851                    }
24852                    return;
24853                },
24854                #[cfg(debug_assertions)]
24855                PropertyDeclaration::WithVariables(..) => {
24856                    declaration.debug_crash("Found variables not substituted");
24857                    return;
24858                },
24859                _ => unsafe {
24860                    declaration.unchecked_value_as::<longhands::table_layout::SpecifiedValue>()
24861                },
24862            };
24863
24864
24865                let computed = specified_value.to_computed_value(context);
24866                context.builder.set_table_layout(computed)
24867        }
24868
24869        pub fn parse_declared<'i, 't>(
24870            context: &ParserContext,
24871            input: &mut Parser<'i, 't>,
24872        ) -> Result<PropertyDeclaration, ParseError<'i>> {
24873                parse(context, input)
24874                .map(PropertyDeclaration::TableLayout)
24875        }
24876    }
24877
24878
24879
24880
24881    
24882        
24883    
24884
24885
24886    
24887    /* This Source Code Form is subject to the terms of the Mozilla Public
24888 * License, v. 2.0. If a copy of the MPL was not distributed with this
24889 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
24890
24891
24892
24893
24894    
24895        
24896    
24897    /// https://drafts.csswg.org/css-ui/#propdef-text-overflow
24898    pub mod text_overflow {
24899        #[allow(unused_imports)]
24900        use cssparser::{Parser, BasicParseError, Token};
24901        #[allow(unused_imports)]
24902        use crate::parser::{Parse, ParserContext};
24903        #[allow(unused_imports)]
24904        use crate::properties::{UnparsedValue, ShorthandId};
24905        #[allow(unused_imports)]
24906        use crate::error_reporting::ParseErrorReporter;
24907        #[allow(unused_imports)]
24908        use crate::properties::longhands;
24909        #[allow(unused_imports)]
24910        use crate::properties::{LonghandId, LonghandIdSet};
24911        #[allow(unused_imports)]
24912        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
24913        #[allow(unused_imports)]
24914        use crate::properties::style_structs;
24915        #[allow(unused_imports)]
24916        use selectors::parser::SelectorParseErrorKind;
24917        #[allow(unused_imports)]
24918        use servo_arc::Arc;
24919        #[allow(unused_imports)]
24920        use style_traits::{ParseError, StyleParseErrorKind};
24921        #[allow(unused_imports)]
24922        use crate::values::computed::{Context, ToComputedValue};
24923        #[allow(unused_imports)]
24924        use crate::values::{computed, generics, specified};
24925        #[allow(unused_imports)]
24926        use crate::Atom;
24927        
24928            
24929        #[allow(unused_imports)]
24930        use app_units::Au;
24931        #[allow(unused_imports)]
24932        use crate::values::specified::AllowQuirks;
24933        #[allow(unused_imports)]
24934        use crate::Zero;
24935        #[allow(unused_imports)]
24936        use smallvec::SmallVec;
24937        pub use crate::values::specified::TextOverflow as SpecifiedValue;
24938        pub mod computed_value {
24939            pub use crate::values::computed::TextOverflow as T;
24940        }
24941        #[inline] pub fn get_initial_value() -> computed_value::T { computed::TextOverflow::get_initial_value() }
24942        #[allow(unused_variables)]
24943        #[inline]
24944        pub fn parse<'i, 't>(
24945            context: &ParserContext,
24946            input: &mut Parser<'i, 't>,
24947        ) -> Result<SpecifiedValue, ParseError<'i>> {
24948            <specified::TextOverflow as crate::parser::Parse>::parse(context, input)
24949        }
24950    
24951        
24952        #[allow(unused_variables)]
24953        pub unsafe fn cascade_property(
24954            declaration: &PropertyDeclaration,
24955            context: &mut computed::Context,
24956        ) {
24957            context.for_non_inherited_property = true;
24958            debug_assert_eq!(
24959                declaration.id().as_longhand().unwrap(),
24960                LonghandId::TextOverflow,
24961            );
24962            let specified_value = match *declaration {
24963                PropertyDeclaration::CSSWideKeyword(ref wk) => {
24964                    match wk.keyword {
24965                        CSSWideKeyword::Unset |
24966                        CSSWideKeyword::Initial => {
24967                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
24968                        },
24969                        CSSWideKeyword::Inherit => {
24970                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
24971                                context.builder.inherit_text_overflow();
24972                        }
24973                        CSSWideKeyword::RevertLayer |
24974                        CSSWideKeyword::Revert => {
24975                            declaration.debug_crash("Found revert/revert-layer not dealt with");
24976                        },
24977                    }
24978                    return;
24979                },
24980                #[cfg(debug_assertions)]
24981                PropertyDeclaration::WithVariables(..) => {
24982                    declaration.debug_crash("Found variables not substituted");
24983                    return;
24984                },
24985                _ => unsafe {
24986                    declaration.unchecked_value_as::<Box<crate::values::specified::TextOverflow>>()
24987                },
24988            };
24989
24990
24991                let computed = (**specified_value).to_computed_value(context);
24992                context.builder.set_text_overflow(computed)
24993        }
24994
24995        pub fn parse_declared<'i, 't>(
24996            context: &ParserContext,
24997            input: &mut Parser<'i, 't>,
24998        ) -> Result<PropertyDeclaration, ParseError<'i>> {
24999                parse(context, input)
25000                .map(Box::new)
25001                .map(PropertyDeclaration::TextOverflow)
25002        }
25003    }
25004
25005
25006
25007
25008    
25009
25010    
25011        
25012    
25013    /// https://drafts.csswg.org/css-writing-modes/#propdef-unicode-bidi
25014    pub mod unicode_bidi {
25015        #[allow(unused_imports)]
25016        use cssparser::{Parser, BasicParseError, Token};
25017        #[allow(unused_imports)]
25018        use crate::parser::{Parse, ParserContext};
25019        #[allow(unused_imports)]
25020        use crate::properties::{UnparsedValue, ShorthandId};
25021        #[allow(unused_imports)]
25022        use crate::error_reporting::ParseErrorReporter;
25023        #[allow(unused_imports)]
25024        use crate::properties::longhands;
25025        #[allow(unused_imports)]
25026        use crate::properties::{LonghandId, LonghandIdSet};
25027        #[allow(unused_imports)]
25028        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
25029        #[allow(unused_imports)]
25030        use crate::properties::style_structs;
25031        #[allow(unused_imports)]
25032        use selectors::parser::SelectorParseErrorKind;
25033        #[allow(unused_imports)]
25034        use servo_arc::Arc;
25035        #[allow(unused_imports)]
25036        use style_traits::{ParseError, StyleParseErrorKind};
25037        #[allow(unused_imports)]
25038        use crate::values::computed::{Context, ToComputedValue};
25039        #[allow(unused_imports)]
25040        use crate::values::{computed, generics, specified};
25041        #[allow(unused_imports)]
25042        use crate::Atom;
25043        
25044            
25045        pub use self::computed_value::T as SpecifiedValue;
25046        pub mod computed_value {
25047            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
25048            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
25049            pub enum T {
25050            
25051            Normal,
25052            
25053            Embed,
25054            
25055            Isolate,
25056            
25057            BidiOverride,
25058            
25059            IsolateOverride,
25060            
25061            Plaintext,
25062            }
25063        }
25064        #[inline]
25065        pub fn get_initial_value() -> computed_value::T {
25066            computed_value::T::Normal
25067        }
25068        #[inline]
25069        pub fn get_initial_specified_value() -> SpecifiedValue {
25070            SpecifiedValue::Normal
25071        }
25072        #[inline]
25073        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
25074                             -> Result<SpecifiedValue, ParseError<'i>> {
25075            SpecifiedValue::parse(input)
25076        }
25077
25078    
25079        
25080        #[allow(unused_variables)]
25081        pub unsafe fn cascade_property(
25082            declaration: &PropertyDeclaration,
25083            context: &mut computed::Context,
25084        ) {
25085            context.for_non_inherited_property = true;
25086            debug_assert_eq!(
25087                declaration.id().as_longhand().unwrap(),
25088                LonghandId::UnicodeBidi,
25089            );
25090            let specified_value = match *declaration {
25091                PropertyDeclaration::CSSWideKeyword(ref wk) => {
25092                    match wk.keyword {
25093                        CSSWideKeyword::Unset |
25094                        CSSWideKeyword::Initial => {
25095                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
25096                        },
25097                        CSSWideKeyword::Inherit => {
25098                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
25099                                context.builder.inherit_unicode_bidi();
25100                        }
25101                        CSSWideKeyword::RevertLayer |
25102                        CSSWideKeyword::Revert => {
25103                            declaration.debug_crash("Found revert/revert-layer not dealt with");
25104                        },
25105                    }
25106                    return;
25107                },
25108                #[cfg(debug_assertions)]
25109                PropertyDeclaration::WithVariables(..) => {
25110                    declaration.debug_crash("Found variables not substituted");
25111                    return;
25112                },
25113                _ => unsafe {
25114                    declaration.unchecked_value_as::<longhands::unicode_bidi::SpecifiedValue>()
25115                },
25116            };
25117
25118
25119                let computed = specified_value.to_computed_value(context);
25120                context.builder.set_unicode_bidi(computed)
25121        }
25122
25123        pub fn parse_declared<'i, 't>(
25124            context: &ParserContext,
25125            input: &mut Parser<'i, 't>,
25126        ) -> Result<PropertyDeclaration, ParseError<'i>> {
25127                parse(context, input)
25128                .map(PropertyDeclaration::UnicodeBidi)
25129        }
25130    }
25131
25132
25133
25134
25135    
25136        
25137    
25138    /// https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-line
25139    pub mod text_decoration_line {
25140        #[allow(unused_imports)]
25141        use cssparser::{Parser, BasicParseError, Token};
25142        #[allow(unused_imports)]
25143        use crate::parser::{Parse, ParserContext};
25144        #[allow(unused_imports)]
25145        use crate::properties::{UnparsedValue, ShorthandId};
25146        #[allow(unused_imports)]
25147        use crate::error_reporting::ParseErrorReporter;
25148        #[allow(unused_imports)]
25149        use crate::properties::longhands;
25150        #[allow(unused_imports)]
25151        use crate::properties::{LonghandId, LonghandIdSet};
25152        #[allow(unused_imports)]
25153        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
25154        #[allow(unused_imports)]
25155        use crate::properties::style_structs;
25156        #[allow(unused_imports)]
25157        use selectors::parser::SelectorParseErrorKind;
25158        #[allow(unused_imports)]
25159        use servo_arc::Arc;
25160        #[allow(unused_imports)]
25161        use style_traits::{ParseError, StyleParseErrorKind};
25162        #[allow(unused_imports)]
25163        use crate::values::computed::{Context, ToComputedValue};
25164        #[allow(unused_imports)]
25165        use crate::values::{computed, generics, specified};
25166        #[allow(unused_imports)]
25167        use crate::Atom;
25168        
25169            
25170        #[allow(unused_imports)]
25171        use app_units::Au;
25172        #[allow(unused_imports)]
25173        use crate::values::specified::AllowQuirks;
25174        #[allow(unused_imports)]
25175        use crate::Zero;
25176        #[allow(unused_imports)]
25177        use smallvec::SmallVec;
25178        pub use crate::values::specified::TextDecorationLine as SpecifiedValue;
25179        pub mod computed_value {
25180            pub use crate::values::computed::TextDecorationLine as T;
25181        }
25182        #[inline] pub fn get_initial_value() -> computed_value::T { specified::TextDecorationLine::none() }
25183        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::TextDecorationLine::none() }
25184        #[allow(unused_variables)]
25185        #[inline]
25186        pub fn parse<'i, 't>(
25187            context: &ParserContext,
25188            input: &mut Parser<'i, 't>,
25189        ) -> Result<SpecifiedValue, ParseError<'i>> {
25190            <specified::TextDecorationLine as crate::parser::Parse>::parse(context, input)
25191        }
25192    
25193        
25194        #[allow(unused_variables)]
25195        pub unsafe fn cascade_property(
25196            declaration: &PropertyDeclaration,
25197            context: &mut computed::Context,
25198        ) {
25199            context.for_non_inherited_property = true;
25200            debug_assert_eq!(
25201                declaration.id().as_longhand().unwrap(),
25202                LonghandId::TextDecorationLine,
25203            );
25204            let specified_value = match *declaration {
25205                PropertyDeclaration::CSSWideKeyword(ref wk) => {
25206                    match wk.keyword {
25207                        CSSWideKeyword::Unset |
25208                        CSSWideKeyword::Initial => {
25209                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
25210                        },
25211                        CSSWideKeyword::Inherit => {
25212                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
25213                                context.builder.inherit_text_decoration_line();
25214                        }
25215                        CSSWideKeyword::RevertLayer |
25216                        CSSWideKeyword::Revert => {
25217                            declaration.debug_crash("Found revert/revert-layer not dealt with");
25218                        },
25219                    }
25220                    return;
25221                },
25222                #[cfg(debug_assertions)]
25223                PropertyDeclaration::WithVariables(..) => {
25224                    declaration.debug_crash("Found variables not substituted");
25225                    return;
25226                },
25227                _ => unsafe {
25228                    declaration.unchecked_value_as::<crate::values::specified::TextDecorationLine>()
25229                },
25230            };
25231
25232
25233                let computed = specified_value.to_computed_value(context);
25234                context.builder.set_text_decoration_line(computed)
25235        }
25236
25237        pub fn parse_declared<'i, 't>(
25238            context: &ParserContext,
25239            input: &mut Parser<'i, 't>,
25240        ) -> Result<PropertyDeclaration, ParseError<'i>> {
25241                parse(context, input)
25242                .map(PropertyDeclaration::TextDecorationLine)
25243        }
25244    }
25245
25246
25247
25248
25249    
25250
25251    
25252        
25253    
25254    /// https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-style
25255    pub mod text_decoration_style {
25256        #[allow(unused_imports)]
25257        use cssparser::{Parser, BasicParseError, Token};
25258        #[allow(unused_imports)]
25259        use crate::parser::{Parse, ParserContext};
25260        #[allow(unused_imports)]
25261        use crate::properties::{UnparsedValue, ShorthandId};
25262        #[allow(unused_imports)]
25263        use crate::error_reporting::ParseErrorReporter;
25264        #[allow(unused_imports)]
25265        use crate::properties::longhands;
25266        #[allow(unused_imports)]
25267        use crate::properties::{LonghandId, LonghandIdSet};
25268        #[allow(unused_imports)]
25269        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
25270        #[allow(unused_imports)]
25271        use crate::properties::style_structs;
25272        #[allow(unused_imports)]
25273        use selectors::parser::SelectorParseErrorKind;
25274        #[allow(unused_imports)]
25275        use servo_arc::Arc;
25276        #[allow(unused_imports)]
25277        use style_traits::{ParseError, StyleParseErrorKind};
25278        #[allow(unused_imports)]
25279        use crate::values::computed::{Context, ToComputedValue};
25280        #[allow(unused_imports)]
25281        use crate::values::{computed, generics, specified};
25282        #[allow(unused_imports)]
25283        use crate::Atom;
25284        
25285            
25286        pub use self::computed_value::T as SpecifiedValue;
25287        pub mod computed_value {
25288            #[cfg_attr(feature = "servo", derive(Deserialize, Hash, Serialize))]
25289            #[derive(Clone, Copy, Debug, Eq, FromPrimitive, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
25290            pub enum T {
25291            
25292            Solid,
25293            
25294            Double,
25295            
25296            Dotted,
25297            
25298            Dashed,
25299            
25300            Wavy,
25301            
25302            MozNone,
25303            }
25304        }
25305        #[inline]
25306        pub fn get_initial_value() -> computed_value::T {
25307            computed_value::T::Solid
25308        }
25309        #[inline]
25310        pub fn get_initial_specified_value() -> SpecifiedValue {
25311            SpecifiedValue::Solid
25312        }
25313        #[inline]
25314        pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
25315                             -> Result<SpecifiedValue, ParseError<'i>> {
25316            SpecifiedValue::parse(input)
25317        }
25318
25319    
25320        
25321        #[allow(unused_variables)]
25322        pub unsafe fn cascade_property(
25323            declaration: &PropertyDeclaration,
25324            context: &mut computed::Context,
25325        ) {
25326            context.for_non_inherited_property = true;
25327            debug_assert_eq!(
25328                declaration.id().as_longhand().unwrap(),
25329                LonghandId::TextDecorationStyle,
25330            );
25331            let specified_value = match *declaration {
25332                PropertyDeclaration::CSSWideKeyword(ref wk) => {
25333                    match wk.keyword {
25334                        CSSWideKeyword::Unset |
25335                        CSSWideKeyword::Initial => {
25336                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
25337                        },
25338                        CSSWideKeyword::Inherit => {
25339                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
25340                                context.builder.inherit_text_decoration_style();
25341                        }
25342                        CSSWideKeyword::RevertLayer |
25343                        CSSWideKeyword::Revert => {
25344                            declaration.debug_crash("Found revert/revert-layer not dealt with");
25345                        },
25346                    }
25347                    return;
25348                },
25349                #[cfg(debug_assertions)]
25350                PropertyDeclaration::WithVariables(..) => {
25351                    declaration.debug_crash("Found variables not substituted");
25352                    return;
25353                },
25354                _ => unsafe {
25355                    declaration.unchecked_value_as::<longhands::text_decoration_style::SpecifiedValue>()
25356                },
25357            };
25358
25359
25360                let computed = specified_value.to_computed_value(context);
25361                context.builder.set_text_decoration_style(computed)
25362        }
25363
25364        pub fn parse_declared<'i, 't>(
25365            context: &ParserContext,
25366            input: &mut Parser<'i, 't>,
25367        ) -> Result<PropertyDeclaration, ParseError<'i>> {
25368                parse(context, input)
25369                .map(PropertyDeclaration::TextDecorationStyle)
25370        }
25371    }
25372
25373
25374
25375
25376    
25377        
25378    
25379    /// https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-color
25380    pub mod text_decoration_color {
25381        #[allow(unused_imports)]
25382        use cssparser::{Parser, BasicParseError, Token};
25383        #[allow(unused_imports)]
25384        use crate::parser::{Parse, ParserContext};
25385        #[allow(unused_imports)]
25386        use crate::properties::{UnparsedValue, ShorthandId};
25387        #[allow(unused_imports)]
25388        use crate::error_reporting::ParseErrorReporter;
25389        #[allow(unused_imports)]
25390        use crate::properties::longhands;
25391        #[allow(unused_imports)]
25392        use crate::properties::{LonghandId, LonghandIdSet};
25393        #[allow(unused_imports)]
25394        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
25395        #[allow(unused_imports)]
25396        use crate::properties::style_structs;
25397        #[allow(unused_imports)]
25398        use selectors::parser::SelectorParseErrorKind;
25399        #[allow(unused_imports)]
25400        use servo_arc::Arc;
25401        #[allow(unused_imports)]
25402        use style_traits::{ParseError, StyleParseErrorKind};
25403        #[allow(unused_imports)]
25404        use crate::values::computed::{Context, ToComputedValue};
25405        #[allow(unused_imports)]
25406        use crate::values::{computed, generics, specified};
25407        #[allow(unused_imports)]
25408        use crate::Atom;
25409        
25410            
25411        #[allow(unused_imports)]
25412        use app_units::Au;
25413        #[allow(unused_imports)]
25414        use crate::values::specified::AllowQuirks;
25415        #[allow(unused_imports)]
25416        use crate::Zero;
25417        #[allow(unused_imports)]
25418        use smallvec::SmallVec;
25419        pub use crate::values::specified::Color as SpecifiedValue;
25420        pub mod computed_value {
25421            pub use crate::values::computed::Color as T;
25422        }
25423        #[inline] pub fn get_initial_value() -> computed_value::T { computed_value::T::currentcolor() }
25424        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::Color::currentcolor() }
25425        #[allow(unused_variables)]
25426        #[inline]
25427        pub fn parse<'i, 't>(
25428            context: &ParserContext,
25429            input: &mut Parser<'i, 't>,
25430        ) -> Result<SpecifiedValue, ParseError<'i>> {
25431            <specified::Color as crate::parser::Parse>::parse(context, input)
25432        }
25433    
25434        
25435        #[allow(unused_variables)]
25436        pub unsafe fn cascade_property(
25437            declaration: &PropertyDeclaration,
25438            context: &mut computed::Context,
25439        ) {
25440            context.for_non_inherited_property = true;
25441            debug_assert_eq!(
25442                declaration.id().as_longhand().unwrap(),
25443                LonghandId::TextDecorationColor,
25444            );
25445            let specified_value = match *declaration {
25446                PropertyDeclaration::CSSWideKeyword(ref wk) => {
25447                    match wk.keyword {
25448                        CSSWideKeyword::Unset |
25449                        CSSWideKeyword::Initial => {
25450                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
25451                        },
25452                        CSSWideKeyword::Inherit => {
25453                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
25454                                context.builder.inherit_text_decoration_color();
25455                        }
25456                        CSSWideKeyword::RevertLayer |
25457                        CSSWideKeyword::Revert => {
25458                            declaration.debug_crash("Found revert/revert-layer not dealt with");
25459                        },
25460                    }
25461                    return;
25462                },
25463                #[cfg(debug_assertions)]
25464                PropertyDeclaration::WithVariables(..) => {
25465                    declaration.debug_crash("Found variables not substituted");
25466                    return;
25467                },
25468                _ => unsafe {
25469                    declaration.unchecked_value_as::<crate::values::specified::Color>()
25470                },
25471            };
25472
25473
25474                let computed = specified_value.to_computed_value(context);
25475                context.builder.set_text_decoration_color(computed)
25476        }
25477
25478        pub fn parse_declared<'i, 't>(
25479            context: &ParserContext,
25480            input: &mut Parser<'i, 't>,
25481        ) -> Result<PropertyDeclaration, ParseError<'i>> {
25482                parse(context, input)
25483                .map(PropertyDeclaration::TextDecorationColor)
25484        }
25485    }
25486
25487
25488
25489
25490    
25491        
25492    
25493
25494
25495
25496    
25497        
25498    
25499
25500
25501    
25502    /* This Source Code Form is subject to the terms of the Mozilla Public
25503 * License, v. 2.0. If a copy of the MPL was not distributed with this
25504 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
25505
25506
25507
25508
25509// TODO spec says that UAs should not support this
25510// we should probably remove from gecko (https://bugzilla.mozilla.org/show_bug.cgi?id=1328331)
25511
25512    
25513
25514    
25515        
25516    
25517
25518
25519
25520    
25521
25522    
25523        
25524    
25525
25526
25527
25528    
25529        
25530    
25531
25532
25533
25534    
25535
25536    
25537        
25538    
25539
25540
25541// TODO(emilio): Maybe make shadow behavior on macOS match Linux / Windows, and remove this? But
25542// that requires making -moz-window-input-region-margin work there...
25543
25544    
25545
25546    
25547        
25548    
25549
25550
25551
25552    
25553        
25554    
25555
25556
25557
25558    
25559        
25560    
25561
25562
25563
25564    
25565        
25566    
25567
25568
25569// Hack to allow chrome to hide stuff only visually (without hiding it from a11y).
25570
25571    
25572        
25573    
25574
25575
25576// TODO(emilio): Probably also should be hidden from content.
25577
25578    
25579        
25580    
25581
25582
25583
25584
25585
25586    
25587        
25588    
25589    
25590    /// https://drafts.csswg.org/css-transitions/#propdef-transition-duration
25591    pub mod transition_duration {
25592        #[allow(unused_imports)]
25593        use cssparser::{Parser, BasicParseError, Token};
25594        #[allow(unused_imports)]
25595        use crate::parser::{Parse, ParserContext};
25596        #[allow(unused_imports)]
25597        use crate::properties::{UnparsedValue, ShorthandId};
25598        #[allow(unused_imports)]
25599        use crate::error_reporting::ParseErrorReporter;
25600        #[allow(unused_imports)]
25601        use crate::properties::longhands;
25602        #[allow(unused_imports)]
25603        use crate::properties::{LonghandId, LonghandIdSet};
25604        #[allow(unused_imports)]
25605        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
25606        #[allow(unused_imports)]
25607        use crate::properties::style_structs;
25608        #[allow(unused_imports)]
25609        use selectors::parser::SelectorParseErrorKind;
25610        #[allow(unused_imports)]
25611        use servo_arc::Arc;
25612        #[allow(unused_imports)]
25613        use style_traits::{ParseError, StyleParseErrorKind};
25614        #[allow(unused_imports)]
25615        use crate::values::computed::{Context, ToComputedValue};
25616        #[allow(unused_imports)]
25617        use crate::values::{computed, generics, specified};
25618        #[allow(unused_imports)]
25619        use crate::Atom;
25620        
25621        #[allow(unused_imports)]
25622        use smallvec::SmallVec;
25623
25624        pub mod single_value {
25625            #[allow(unused_imports)]
25626            use cssparser::{Parser, BasicParseError};
25627            #[allow(unused_imports)]
25628            use crate::parser::{Parse, ParserContext};
25629            #[allow(unused_imports)]
25630            use crate::properties::ShorthandId;
25631            #[allow(unused_imports)]
25632            use selectors::parser::SelectorParseErrorKind;
25633            #[allow(unused_imports)]
25634            use style_traits::{ParseError, StyleParseErrorKind};
25635            #[allow(unused_imports)]
25636            use crate::values::computed::{Context, ToComputedValue};
25637            #[allow(unused_imports)]
25638            use crate::values::{computed, specified};
25639            
25640            
25641        #[allow(unused_imports)]
25642        use app_units::Au;
25643        #[allow(unused_imports)]
25644        use crate::values::specified::AllowQuirks;
25645        #[allow(unused_imports)]
25646        use crate::Zero;
25647        #[allow(unused_imports)]
25648        use smallvec::SmallVec;
25649        pub use crate::values::specified::Time as SpecifiedValue;
25650        pub mod computed_value {
25651            pub use crate::values::computed::Time as T;
25652        }
25653        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Time::zero() }
25654        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::Time::zero() }
25655        #[allow(unused_variables)]
25656        #[inline]
25657        pub fn parse<'i, 't>(
25658            context: &ParserContext,
25659            input: &mut Parser<'i, 't>,
25660        ) -> Result<SpecifiedValue, ParseError<'i>> {
25661            specified::Time::parse_non_negative(context, input)
25662        }
25663    
25664        
25665        }
25666
25667        /// The definition of the computed value for transition-duration.
25668        pub mod computed_value {
25669            #[allow(unused_imports)]
25670            use crate::values::animated::ToAnimatedValue;
25671            #[allow(unused_imports)]
25672            use crate::values::resolved::ToResolvedValue;
25673            pub use super::single_value::computed_value as single_value;
25674            pub use self::single_value::T as SingleComputedValue;
25675            use smallvec::SmallVec;
25676            use crate::values::computed::ComputedVecIter;
25677
25678            
25679
25680            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
25681            // something for transition-name, which is the only remaining user
25682            // of NotInitial.
25683            pub type UnderlyingList<T> =
25684                    SmallVec<[T; 1]>;
25685
25686            pub type UnderlyingOwnedList<T> =
25687                    SmallVec<[T; 1]>;
25688
25689
25690            /// The generic type defining the animated and resolved values for
25691            /// this property.
25692            ///
25693            /// Making this type generic allows the compiler to figure out the
25694            /// animated value for us, instead of having to implement it
25695            /// manually for every type we care about.
25696            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
25697            #[css(comma)]
25698            pub struct OwnedList<T>(
25699                #[css(iterable)]
25700                pub UnderlyingOwnedList<T>,
25701            );
25702
25703            /// The computed value for this property.
25704            pub type ComputedList = OwnedList<single_value::T>;
25705            pub use self::OwnedList as List;
25706
25707
25708
25709            /// The computed value, effectively a list of single values.
25710            pub use self::ComputedList as T;
25711
25712            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
25713        }
25714
25715        /// The specified value of transition-duration.
25716        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
25717        #[css(comma)]
25718        pub struct SpecifiedValue(
25719            #[css(iterable)]
25720            pub crate::OwnedSlice<single_value::SpecifiedValue>,
25721        );
25722
25723        pub fn get_initial_value() -> computed_value::T {
25724                let mut v = SmallVec::new();
25725                v.push(single_value::get_initial_value());
25726                computed_value::List(v)
25727        }
25728
25729        pub fn parse<'i, 't>(
25730            context: &ParserContext,
25731            input: &mut Parser<'i, 't>,
25732        ) -> Result<SpecifiedValue, ParseError<'i>> {
25733            use style_traits::Separator;
25734
25735
25736            let v = style_traits::Comma::parse(input, |parser| {
25737                single_value::parse(context, parser)
25738            })?;
25739            Ok(SpecifiedValue(v.into()))
25740        }
25741
25742        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
25743
25744
25745        impl ToComputedValue for SpecifiedValue {
25746            type ComputedValue = computed_value::T;
25747
25748            #[inline]
25749            fn to_computed_value(&self, context: &Context) -> computed_value::T {
25750                use std::iter::FromIterator;
25751                computed_value::List(computed_value::UnderlyingList::from_iter(
25752                    self.0.iter().map(|i| i.to_computed_value(context))
25753                ))
25754            }
25755
25756            #[inline]
25757            fn from_computed_value(computed: &computed_value::T) -> Self {
25758                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
25759                SpecifiedValue(iter.collect())
25760            }
25761        }
25762    
25763        #[allow(unused_variables)]
25764        pub unsafe fn cascade_property(
25765            declaration: &PropertyDeclaration,
25766            context: &mut computed::Context,
25767        ) {
25768            context.for_non_inherited_property = true;
25769            debug_assert_eq!(
25770                declaration.id().as_longhand().unwrap(),
25771                LonghandId::TransitionDuration,
25772            );
25773            let specified_value = match *declaration {
25774                PropertyDeclaration::CSSWideKeyword(ref wk) => {
25775                    match wk.keyword {
25776                        CSSWideKeyword::Unset |
25777                        CSSWideKeyword::Initial => {
25778                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
25779                        },
25780                        CSSWideKeyword::Inherit => {
25781                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
25782                                context.builder.inherit_transition_duration();
25783                        }
25784                        CSSWideKeyword::RevertLayer |
25785                        CSSWideKeyword::Revert => {
25786                            declaration.debug_crash("Found revert/revert-layer not dealt with");
25787                        },
25788                    }
25789                    return;
25790                },
25791                #[cfg(debug_assertions)]
25792                PropertyDeclaration::WithVariables(..) => {
25793                    declaration.debug_crash("Found variables not substituted");
25794                    return;
25795                },
25796                _ => unsafe {
25797                    declaration.unchecked_value_as::<longhands::transition_duration::SpecifiedValue>()
25798                },
25799            };
25800
25801
25802                let computed = specified_value.to_computed_value(context);
25803                context.builder.set_transition_duration(computed)
25804        }
25805
25806        pub fn parse_declared<'i, 't>(
25807            context: &ParserContext,
25808            input: &mut Parser<'i, 't>,
25809        ) -> Result<PropertyDeclaration, ParseError<'i>> {
25810                parse(context, input)
25811                .map(PropertyDeclaration::TransitionDuration)
25812        }
25813    }
25814
25815
25816
25817
25818
25819    
25820        
25821    
25822    
25823    /// https://drafts.csswg.org/css-transitions/#propdef-transition-timing-function
25824    pub mod transition_timing_function {
25825        #[allow(unused_imports)]
25826        use cssparser::{Parser, BasicParseError, Token};
25827        #[allow(unused_imports)]
25828        use crate::parser::{Parse, ParserContext};
25829        #[allow(unused_imports)]
25830        use crate::properties::{UnparsedValue, ShorthandId};
25831        #[allow(unused_imports)]
25832        use crate::error_reporting::ParseErrorReporter;
25833        #[allow(unused_imports)]
25834        use crate::properties::longhands;
25835        #[allow(unused_imports)]
25836        use crate::properties::{LonghandId, LonghandIdSet};
25837        #[allow(unused_imports)]
25838        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
25839        #[allow(unused_imports)]
25840        use crate::properties::style_structs;
25841        #[allow(unused_imports)]
25842        use selectors::parser::SelectorParseErrorKind;
25843        #[allow(unused_imports)]
25844        use servo_arc::Arc;
25845        #[allow(unused_imports)]
25846        use style_traits::{ParseError, StyleParseErrorKind};
25847        #[allow(unused_imports)]
25848        use crate::values::computed::{Context, ToComputedValue};
25849        #[allow(unused_imports)]
25850        use crate::values::{computed, generics, specified};
25851        #[allow(unused_imports)]
25852        use crate::Atom;
25853        
25854        #[allow(unused_imports)]
25855        use smallvec::SmallVec;
25856
25857        pub mod single_value {
25858            #[allow(unused_imports)]
25859            use cssparser::{Parser, BasicParseError};
25860            #[allow(unused_imports)]
25861            use crate::parser::{Parse, ParserContext};
25862            #[allow(unused_imports)]
25863            use crate::properties::ShorthandId;
25864            #[allow(unused_imports)]
25865            use selectors::parser::SelectorParseErrorKind;
25866            #[allow(unused_imports)]
25867            use style_traits::{ParseError, StyleParseErrorKind};
25868            #[allow(unused_imports)]
25869            use crate::values::computed::{Context, ToComputedValue};
25870            #[allow(unused_imports)]
25871            use crate::values::{computed, specified};
25872            
25873            
25874        #[allow(unused_imports)]
25875        use app_units::Au;
25876        #[allow(unused_imports)]
25877        use crate::values::specified::AllowQuirks;
25878        #[allow(unused_imports)]
25879        use crate::Zero;
25880        #[allow(unused_imports)]
25881        use smallvec::SmallVec;
25882        pub use crate::values::specified::TimingFunction as SpecifiedValue;
25883        pub mod computed_value {
25884            pub use crate::values::computed::TimingFunction as T;
25885        }
25886        #[inline] pub fn get_initial_value() -> computed_value::T { computed::TimingFunction::ease() }
25887        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::TimingFunction::ease() }
25888        #[allow(unused_variables)]
25889        #[inline]
25890        pub fn parse<'i, 't>(
25891            context: &ParserContext,
25892            input: &mut Parser<'i, 't>,
25893        ) -> Result<SpecifiedValue, ParseError<'i>> {
25894            <specified::TimingFunction as crate::parser::Parse>::parse(context, input)
25895        }
25896    
25897        
25898        }
25899
25900        /// The definition of the computed value for transition-timing-function.
25901        pub mod computed_value {
25902            #[allow(unused_imports)]
25903            use crate::values::animated::ToAnimatedValue;
25904            #[allow(unused_imports)]
25905            use crate::values::resolved::ToResolvedValue;
25906            pub use super::single_value::computed_value as single_value;
25907            pub use self::single_value::T as SingleComputedValue;
25908            use smallvec::SmallVec;
25909            use crate::values::computed::ComputedVecIter;
25910
25911            
25912
25913            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
25914            // something for transition-name, which is the only remaining user
25915            // of NotInitial.
25916            pub type UnderlyingList<T> =
25917                    SmallVec<[T; 1]>;
25918
25919            pub type UnderlyingOwnedList<T> =
25920                    SmallVec<[T; 1]>;
25921
25922
25923            /// The generic type defining the animated and resolved values for
25924            /// this property.
25925            ///
25926            /// Making this type generic allows the compiler to figure out the
25927            /// animated value for us, instead of having to implement it
25928            /// manually for every type we care about.
25929            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
25930            #[css(comma)]
25931            pub struct OwnedList<T>(
25932                #[css(iterable)]
25933                pub UnderlyingOwnedList<T>,
25934            );
25935
25936            /// The computed value for this property.
25937            pub type ComputedList = OwnedList<single_value::T>;
25938            pub use self::OwnedList as List;
25939
25940
25941
25942            /// The computed value, effectively a list of single values.
25943            pub use self::ComputedList as T;
25944
25945            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
25946        }
25947
25948        /// The specified value of transition-timing-function.
25949        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
25950        #[css(comma)]
25951        pub struct SpecifiedValue(
25952            #[css(iterable)]
25953            pub crate::OwnedSlice<single_value::SpecifiedValue>,
25954        );
25955
25956        pub fn get_initial_value() -> computed_value::T {
25957                let mut v = SmallVec::new();
25958                v.push(single_value::get_initial_value());
25959                computed_value::List(v)
25960        }
25961
25962        pub fn parse<'i, 't>(
25963            context: &ParserContext,
25964            input: &mut Parser<'i, 't>,
25965        ) -> Result<SpecifiedValue, ParseError<'i>> {
25966            use style_traits::Separator;
25967
25968
25969            let v = style_traits::Comma::parse(input, |parser| {
25970                single_value::parse(context, parser)
25971            })?;
25972            Ok(SpecifiedValue(v.into()))
25973        }
25974
25975        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
25976
25977
25978        impl ToComputedValue for SpecifiedValue {
25979            type ComputedValue = computed_value::T;
25980
25981            #[inline]
25982            fn to_computed_value(&self, context: &Context) -> computed_value::T {
25983                use std::iter::FromIterator;
25984                computed_value::List(computed_value::UnderlyingList::from_iter(
25985                    self.0.iter().map(|i| i.to_computed_value(context))
25986                ))
25987            }
25988
25989            #[inline]
25990            fn from_computed_value(computed: &computed_value::T) -> Self {
25991                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
25992                SpecifiedValue(iter.collect())
25993            }
25994        }
25995    
25996        #[allow(unused_variables)]
25997        pub unsafe fn cascade_property(
25998            declaration: &PropertyDeclaration,
25999            context: &mut computed::Context,
26000        ) {
26001            context.for_non_inherited_property = true;
26002            debug_assert_eq!(
26003                declaration.id().as_longhand().unwrap(),
26004                LonghandId::TransitionTimingFunction,
26005            );
26006            let specified_value = match *declaration {
26007                PropertyDeclaration::CSSWideKeyword(ref wk) => {
26008                    match wk.keyword {
26009                        CSSWideKeyword::Unset |
26010                        CSSWideKeyword::Initial => {
26011                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
26012                        },
26013                        CSSWideKeyword::Inherit => {
26014                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
26015                                context.builder.inherit_transition_timing_function();
26016                        }
26017                        CSSWideKeyword::RevertLayer |
26018                        CSSWideKeyword::Revert => {
26019                            declaration.debug_crash("Found revert/revert-layer not dealt with");
26020                        },
26021                    }
26022                    return;
26023                },
26024                #[cfg(debug_assertions)]
26025                PropertyDeclaration::WithVariables(..) => {
26026                    declaration.debug_crash("Found variables not substituted");
26027                    return;
26028                },
26029                _ => unsafe {
26030                    declaration.unchecked_value_as::<longhands::transition_timing_function::SpecifiedValue>()
26031                },
26032            };
26033
26034
26035                let computed = specified_value.to_computed_value(context);
26036                context.builder.set_transition_timing_function(computed)
26037        }
26038
26039        pub fn parse_declared<'i, 't>(
26040            context: &ParserContext,
26041            input: &mut Parser<'i, 't>,
26042        ) -> Result<PropertyDeclaration, ParseError<'i>> {
26043                parse(context, input)
26044                .map(PropertyDeclaration::TransitionTimingFunction)
26045        }
26046    }
26047
26048
26049
26050
26051
26052    
26053        
26054    
26055    
26056    /// https://drafts.csswg.org/css-transitions/#propdef-transition-property
26057    pub mod transition_property {
26058        #[allow(unused_imports)]
26059        use cssparser::{Parser, BasicParseError, Token};
26060        #[allow(unused_imports)]
26061        use crate::parser::{Parse, ParserContext};
26062        #[allow(unused_imports)]
26063        use crate::properties::{UnparsedValue, ShorthandId};
26064        #[allow(unused_imports)]
26065        use crate::error_reporting::ParseErrorReporter;
26066        #[allow(unused_imports)]
26067        use crate::properties::longhands;
26068        #[allow(unused_imports)]
26069        use crate::properties::{LonghandId, LonghandIdSet};
26070        #[allow(unused_imports)]
26071        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
26072        #[allow(unused_imports)]
26073        use crate::properties::style_structs;
26074        #[allow(unused_imports)]
26075        use selectors::parser::SelectorParseErrorKind;
26076        #[allow(unused_imports)]
26077        use servo_arc::Arc;
26078        #[allow(unused_imports)]
26079        use style_traits::{ParseError, StyleParseErrorKind};
26080        #[allow(unused_imports)]
26081        use crate::values::computed::{Context, ToComputedValue};
26082        #[allow(unused_imports)]
26083        use crate::values::{computed, generics, specified};
26084        #[allow(unused_imports)]
26085        use crate::Atom;
26086        
26087        #[allow(unused_imports)]
26088        use smallvec::SmallVec;
26089
26090        pub mod single_value {
26091            #[allow(unused_imports)]
26092            use cssparser::{Parser, BasicParseError};
26093            #[allow(unused_imports)]
26094            use crate::parser::{Parse, ParserContext};
26095            #[allow(unused_imports)]
26096            use crate::properties::ShorthandId;
26097            #[allow(unused_imports)]
26098            use selectors::parser::SelectorParseErrorKind;
26099            #[allow(unused_imports)]
26100            use style_traits::{ParseError, StyleParseErrorKind};
26101            #[allow(unused_imports)]
26102            use crate::values::computed::{Context, ToComputedValue};
26103            #[allow(unused_imports)]
26104            use crate::values::{computed, specified};
26105            
26106            
26107        #[allow(unused_imports)]
26108        use app_units::Au;
26109        #[allow(unused_imports)]
26110        use crate::values::specified::AllowQuirks;
26111        #[allow(unused_imports)]
26112        use crate::Zero;
26113        #[allow(unused_imports)]
26114        use smallvec::SmallVec;
26115        pub use crate::values::specified::TransitionProperty as SpecifiedValue;
26116        pub mod computed_value {
26117            pub use crate::values::computed::TransitionProperty as T;
26118        }
26119        #[inline] pub fn get_initial_value() -> computed_value::T { computed::TransitionProperty::all() }
26120        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::TransitionProperty::all() }
26121        #[allow(unused_variables)]
26122        #[inline]
26123        pub fn parse<'i, 't>(
26124            context: &ParserContext,
26125            input: &mut Parser<'i, 't>,
26126        ) -> Result<SpecifiedValue, ParseError<'i>> {
26127            <specified::TransitionProperty as crate::parser::Parse>::parse(context, input)
26128        }
26129    
26130        
26131        }
26132
26133        /// The definition of the computed value for transition-property.
26134        pub mod computed_value {
26135            #[allow(unused_imports)]
26136            use crate::values::animated::ToAnimatedValue;
26137            #[allow(unused_imports)]
26138            use crate::values::resolved::ToResolvedValue;
26139            pub use super::single_value::computed_value as single_value;
26140            pub use self::single_value::T as SingleComputedValue;
26141            use smallvec::SmallVec;
26142            use crate::values::computed::ComputedVecIter;
26143
26144            
26145
26146            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
26147            // something for transition-name, which is the only remaining user
26148            // of NotInitial.
26149            pub type UnderlyingList<T> =
26150                    SmallVec<[T; 1]>;
26151
26152            pub type UnderlyingOwnedList<T> =
26153                    SmallVec<[T; 1]>;
26154
26155
26156            /// The generic type defining the animated and resolved values for
26157            /// this property.
26158            ///
26159            /// Making this type generic allows the compiler to figure out the
26160            /// animated value for us, instead of having to implement it
26161            /// manually for every type we care about.
26162            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
26163            #[css(comma)]
26164            pub struct OwnedList<T>(
26165                #[css(iterable)]
26166                pub UnderlyingOwnedList<T>,
26167            );
26168
26169            /// The computed value for this property.
26170            pub type ComputedList = OwnedList<single_value::T>;
26171            pub use self::OwnedList as List;
26172
26173
26174
26175            /// The computed value, effectively a list of single values.
26176            pub use self::ComputedList as T;
26177
26178            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
26179        }
26180
26181        /// The specified value of transition-property.
26182        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
26183        #[value_info(other_values = "none")]
26184        #[css(comma)]
26185        pub struct SpecifiedValue(
26186            #[css(iterable)]
26187            pub crate::OwnedSlice<single_value::SpecifiedValue>,
26188        );
26189
26190        pub fn get_initial_value() -> computed_value::T {
26191                let mut v = SmallVec::new();
26192                v.push(single_value::get_initial_value());
26193                computed_value::List(v)
26194        }
26195
26196        pub fn parse<'i, 't>(
26197            context: &ParserContext,
26198            input: &mut Parser<'i, 't>,
26199        ) -> Result<SpecifiedValue, ParseError<'i>> {
26200            use style_traits::Separator;
26201
26202            if input.try_parse(|input| input.expect_ident_matching("none")).is_ok() {
26203                return Ok(SpecifiedValue(crate::OwnedSlice::from(vec![computed::TransitionProperty::none()])))
26204            }
26205
26206            let v = style_traits::Comma::parse(input, |parser| {
26207                single_value::parse(context, parser)
26208            })?;
26209            Ok(SpecifiedValue(v.into()))
26210        }
26211
26212        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
26213
26214
26215        impl ToComputedValue for SpecifiedValue {
26216            type ComputedValue = computed_value::T;
26217
26218            #[inline]
26219            fn to_computed_value(&self, context: &Context) -> computed_value::T {
26220                use std::iter::FromIterator;
26221                computed_value::List(computed_value::UnderlyingList::from_iter(
26222                    self.0.iter().map(|i| i.to_computed_value(context))
26223                ))
26224            }
26225
26226            #[inline]
26227            fn from_computed_value(computed: &computed_value::T) -> Self {
26228                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
26229                SpecifiedValue(iter.collect())
26230            }
26231        }
26232    
26233        #[allow(unused_variables)]
26234        pub unsafe fn cascade_property(
26235            declaration: &PropertyDeclaration,
26236            context: &mut computed::Context,
26237        ) {
26238            context.for_non_inherited_property = true;
26239            debug_assert_eq!(
26240                declaration.id().as_longhand().unwrap(),
26241                LonghandId::TransitionProperty,
26242            );
26243            let specified_value = match *declaration {
26244                PropertyDeclaration::CSSWideKeyword(ref wk) => {
26245                    match wk.keyword {
26246                        CSSWideKeyword::Unset |
26247                        CSSWideKeyword::Initial => {
26248                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
26249                        },
26250                        CSSWideKeyword::Inherit => {
26251                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
26252                                context.builder.inherit_transition_property();
26253                        }
26254                        CSSWideKeyword::RevertLayer |
26255                        CSSWideKeyword::Revert => {
26256                            declaration.debug_crash("Found revert/revert-layer not dealt with");
26257                        },
26258                    }
26259                    return;
26260                },
26261                #[cfg(debug_assertions)]
26262                PropertyDeclaration::WithVariables(..) => {
26263                    declaration.debug_crash("Found variables not substituted");
26264                    return;
26265                },
26266                _ => unsafe {
26267                    declaration.unchecked_value_as::<longhands::transition_property::SpecifiedValue>()
26268                },
26269            };
26270
26271
26272                let computed = specified_value.to_computed_value(context);
26273                context.builder.set_transition_property(computed)
26274        }
26275
26276        pub fn parse_declared<'i, 't>(
26277            context: &ParserContext,
26278            input: &mut Parser<'i, 't>,
26279        ) -> Result<PropertyDeclaration, ParseError<'i>> {
26280                parse(context, input)
26281                .map(PropertyDeclaration::TransitionProperty)
26282        }
26283    }
26284
26285
26286
26287
26288
26289    
26290        
26291    
26292    
26293    /// https://drafts.csswg.org/css-transitions/#propdef-transition-delay
26294    pub mod transition_delay {
26295        #[allow(unused_imports)]
26296        use cssparser::{Parser, BasicParseError, Token};
26297        #[allow(unused_imports)]
26298        use crate::parser::{Parse, ParserContext};
26299        #[allow(unused_imports)]
26300        use crate::properties::{UnparsedValue, ShorthandId};
26301        #[allow(unused_imports)]
26302        use crate::error_reporting::ParseErrorReporter;
26303        #[allow(unused_imports)]
26304        use crate::properties::longhands;
26305        #[allow(unused_imports)]
26306        use crate::properties::{LonghandId, LonghandIdSet};
26307        #[allow(unused_imports)]
26308        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
26309        #[allow(unused_imports)]
26310        use crate::properties::style_structs;
26311        #[allow(unused_imports)]
26312        use selectors::parser::SelectorParseErrorKind;
26313        #[allow(unused_imports)]
26314        use servo_arc::Arc;
26315        #[allow(unused_imports)]
26316        use style_traits::{ParseError, StyleParseErrorKind};
26317        #[allow(unused_imports)]
26318        use crate::values::computed::{Context, ToComputedValue};
26319        #[allow(unused_imports)]
26320        use crate::values::{computed, generics, specified};
26321        #[allow(unused_imports)]
26322        use crate::Atom;
26323        
26324        #[allow(unused_imports)]
26325        use smallvec::SmallVec;
26326
26327        pub mod single_value {
26328            #[allow(unused_imports)]
26329            use cssparser::{Parser, BasicParseError};
26330            #[allow(unused_imports)]
26331            use crate::parser::{Parse, ParserContext};
26332            #[allow(unused_imports)]
26333            use crate::properties::ShorthandId;
26334            #[allow(unused_imports)]
26335            use selectors::parser::SelectorParseErrorKind;
26336            #[allow(unused_imports)]
26337            use style_traits::{ParseError, StyleParseErrorKind};
26338            #[allow(unused_imports)]
26339            use crate::values::computed::{Context, ToComputedValue};
26340            #[allow(unused_imports)]
26341            use crate::values::{computed, specified};
26342            
26343            
26344        #[allow(unused_imports)]
26345        use app_units::Au;
26346        #[allow(unused_imports)]
26347        use crate::values::specified::AllowQuirks;
26348        #[allow(unused_imports)]
26349        use crate::Zero;
26350        #[allow(unused_imports)]
26351        use smallvec::SmallVec;
26352        pub use crate::values::specified::Time as SpecifiedValue;
26353        pub mod computed_value {
26354            pub use crate::values::computed::Time as T;
26355        }
26356        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Time::zero() }
26357        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::Time::zero() }
26358        #[allow(unused_variables)]
26359        #[inline]
26360        pub fn parse<'i, 't>(
26361            context: &ParserContext,
26362            input: &mut Parser<'i, 't>,
26363        ) -> Result<SpecifiedValue, ParseError<'i>> {
26364            <specified::Time as crate::parser::Parse>::parse(context, input)
26365        }
26366    
26367        
26368        }
26369
26370        /// The definition of the computed value for transition-delay.
26371        pub mod computed_value {
26372            #[allow(unused_imports)]
26373            use crate::values::animated::ToAnimatedValue;
26374            #[allow(unused_imports)]
26375            use crate::values::resolved::ToResolvedValue;
26376            pub use super::single_value::computed_value as single_value;
26377            pub use self::single_value::T as SingleComputedValue;
26378            use smallvec::SmallVec;
26379            use crate::values::computed::ComputedVecIter;
26380
26381            
26382
26383            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
26384            // something for transition-name, which is the only remaining user
26385            // of NotInitial.
26386            pub type UnderlyingList<T> =
26387                    SmallVec<[T; 1]>;
26388
26389            pub type UnderlyingOwnedList<T> =
26390                    SmallVec<[T; 1]>;
26391
26392
26393            /// The generic type defining the animated and resolved values for
26394            /// this property.
26395            ///
26396            /// Making this type generic allows the compiler to figure out the
26397            /// animated value for us, instead of having to implement it
26398            /// manually for every type we care about.
26399            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
26400            #[css(comma)]
26401            pub struct OwnedList<T>(
26402                #[css(iterable)]
26403                pub UnderlyingOwnedList<T>,
26404            );
26405
26406            /// The computed value for this property.
26407            pub type ComputedList = OwnedList<single_value::T>;
26408            pub use self::OwnedList as List;
26409
26410
26411
26412            /// The computed value, effectively a list of single values.
26413            pub use self::ComputedList as T;
26414
26415            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
26416        }
26417
26418        /// The specified value of transition-delay.
26419        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
26420        #[css(comma)]
26421        pub struct SpecifiedValue(
26422            #[css(iterable)]
26423            pub crate::OwnedSlice<single_value::SpecifiedValue>,
26424        );
26425
26426        pub fn get_initial_value() -> computed_value::T {
26427                let mut v = SmallVec::new();
26428                v.push(single_value::get_initial_value());
26429                computed_value::List(v)
26430        }
26431
26432        pub fn parse<'i, 't>(
26433            context: &ParserContext,
26434            input: &mut Parser<'i, 't>,
26435        ) -> Result<SpecifiedValue, ParseError<'i>> {
26436            use style_traits::Separator;
26437
26438
26439            let v = style_traits::Comma::parse(input, |parser| {
26440                single_value::parse(context, parser)
26441            })?;
26442            Ok(SpecifiedValue(v.into()))
26443        }
26444
26445        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
26446
26447
26448        impl ToComputedValue for SpecifiedValue {
26449            type ComputedValue = computed_value::T;
26450
26451            #[inline]
26452            fn to_computed_value(&self, context: &Context) -> computed_value::T {
26453                use std::iter::FromIterator;
26454                computed_value::List(computed_value::UnderlyingList::from_iter(
26455                    self.0.iter().map(|i| i.to_computed_value(context))
26456                ))
26457            }
26458
26459            #[inline]
26460            fn from_computed_value(computed: &computed_value::T) -> Self {
26461                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
26462                SpecifiedValue(iter.collect())
26463            }
26464        }
26465    
26466        #[allow(unused_variables)]
26467        pub unsafe fn cascade_property(
26468            declaration: &PropertyDeclaration,
26469            context: &mut computed::Context,
26470        ) {
26471            context.for_non_inherited_property = true;
26472            debug_assert_eq!(
26473                declaration.id().as_longhand().unwrap(),
26474                LonghandId::TransitionDelay,
26475            );
26476            let specified_value = match *declaration {
26477                PropertyDeclaration::CSSWideKeyword(ref wk) => {
26478                    match wk.keyword {
26479                        CSSWideKeyword::Unset |
26480                        CSSWideKeyword::Initial => {
26481                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
26482                        },
26483                        CSSWideKeyword::Inherit => {
26484                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
26485                                context.builder.inherit_transition_delay();
26486                        }
26487                        CSSWideKeyword::RevertLayer |
26488                        CSSWideKeyword::Revert => {
26489                            declaration.debug_crash("Found revert/revert-layer not dealt with");
26490                        },
26491                    }
26492                    return;
26493                },
26494                #[cfg(debug_assertions)]
26495                PropertyDeclaration::WithVariables(..) => {
26496                    declaration.debug_crash("Found variables not substituted");
26497                    return;
26498                },
26499                _ => unsafe {
26500                    declaration.unchecked_value_as::<longhands::transition_delay::SpecifiedValue>()
26501                },
26502            };
26503
26504
26505                let computed = specified_value.to_computed_value(context);
26506                context.builder.set_transition_delay(computed)
26507        }
26508
26509        pub fn parse_declared<'i, 't>(
26510            context: &ParserContext,
26511            input: &mut Parser<'i, 't>,
26512        ) -> Result<PropertyDeclaration, ParseError<'i>> {
26513                parse(context, input)
26514                .map(PropertyDeclaration::TransitionDelay)
26515        }
26516    }
26517
26518
26519
26520
26521
26522    
26523        
26524    
26525    
26526    /// https://drafts.csswg.org/css-transitions-2/#transition-behavior-property
26527    pub mod transition_behavior {
26528        #[allow(unused_imports)]
26529        use cssparser::{Parser, BasicParseError, Token};
26530        #[allow(unused_imports)]
26531        use crate::parser::{Parse, ParserContext};
26532        #[allow(unused_imports)]
26533        use crate::properties::{UnparsedValue, ShorthandId};
26534        #[allow(unused_imports)]
26535        use crate::error_reporting::ParseErrorReporter;
26536        #[allow(unused_imports)]
26537        use crate::properties::longhands;
26538        #[allow(unused_imports)]
26539        use crate::properties::{LonghandId, LonghandIdSet};
26540        #[allow(unused_imports)]
26541        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
26542        #[allow(unused_imports)]
26543        use crate::properties::style_structs;
26544        #[allow(unused_imports)]
26545        use selectors::parser::SelectorParseErrorKind;
26546        #[allow(unused_imports)]
26547        use servo_arc::Arc;
26548        #[allow(unused_imports)]
26549        use style_traits::{ParseError, StyleParseErrorKind};
26550        #[allow(unused_imports)]
26551        use crate::values::computed::{Context, ToComputedValue};
26552        #[allow(unused_imports)]
26553        use crate::values::{computed, generics, specified};
26554        #[allow(unused_imports)]
26555        use crate::Atom;
26556        
26557        #[allow(unused_imports)]
26558        use smallvec::SmallVec;
26559
26560        pub mod single_value {
26561            #[allow(unused_imports)]
26562            use cssparser::{Parser, BasicParseError};
26563            #[allow(unused_imports)]
26564            use crate::parser::{Parse, ParserContext};
26565            #[allow(unused_imports)]
26566            use crate::properties::ShorthandId;
26567            #[allow(unused_imports)]
26568            use selectors::parser::SelectorParseErrorKind;
26569            #[allow(unused_imports)]
26570            use style_traits::{ParseError, StyleParseErrorKind};
26571            #[allow(unused_imports)]
26572            use crate::values::computed::{Context, ToComputedValue};
26573            #[allow(unused_imports)]
26574            use crate::values::{computed, specified};
26575            
26576            
26577        #[allow(unused_imports)]
26578        use app_units::Au;
26579        #[allow(unused_imports)]
26580        use crate::values::specified::AllowQuirks;
26581        #[allow(unused_imports)]
26582        use crate::Zero;
26583        #[allow(unused_imports)]
26584        use smallvec::SmallVec;
26585        pub use crate::values::specified::TransitionBehavior as SpecifiedValue;
26586        pub mod computed_value {
26587            pub use crate::values::computed::TransitionBehavior as T;
26588        }
26589        #[inline] pub fn get_initial_value() -> computed_value::T { computed::TransitionBehavior::normal() }
26590        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::TransitionBehavior::normal() }
26591        #[allow(unused_variables)]
26592        #[inline]
26593        pub fn parse<'i, 't>(
26594            context: &ParserContext,
26595            input: &mut Parser<'i, 't>,
26596        ) -> Result<SpecifiedValue, ParseError<'i>> {
26597            <specified::TransitionBehavior as crate::parser::Parse>::parse(context, input)
26598        }
26599    
26600        
26601        }
26602
26603        /// The definition of the computed value for transition-behavior.
26604        pub mod computed_value {
26605            #[allow(unused_imports)]
26606            use crate::values::animated::ToAnimatedValue;
26607            #[allow(unused_imports)]
26608            use crate::values::resolved::ToResolvedValue;
26609            pub use super::single_value::computed_value as single_value;
26610            pub use self::single_value::T as SingleComputedValue;
26611            use smallvec::SmallVec;
26612            use crate::values::computed::ComputedVecIter;
26613
26614            
26615
26616            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
26617            // something for transition-name, which is the only remaining user
26618            // of NotInitial.
26619            pub type UnderlyingList<T> =
26620                    SmallVec<[T; 1]>;
26621
26622            pub type UnderlyingOwnedList<T> =
26623                    SmallVec<[T; 1]>;
26624
26625
26626            /// The generic type defining the animated and resolved values for
26627            /// this property.
26628            ///
26629            /// Making this type generic allows the compiler to figure out the
26630            /// animated value for us, instead of having to implement it
26631            /// manually for every type we care about.
26632            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
26633            #[css(comma)]
26634            pub struct OwnedList<T>(
26635                #[css(iterable)]
26636                pub UnderlyingOwnedList<T>,
26637            );
26638
26639            /// The computed value for this property.
26640            pub type ComputedList = OwnedList<single_value::T>;
26641            pub use self::OwnedList as List;
26642
26643
26644
26645            /// The computed value, effectively a list of single values.
26646            pub use self::ComputedList as T;
26647
26648            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
26649        }
26650
26651        /// The specified value of transition-behavior.
26652        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
26653        #[css(comma)]
26654        pub struct SpecifiedValue(
26655            #[css(iterable)]
26656            pub crate::OwnedSlice<single_value::SpecifiedValue>,
26657        );
26658
26659        pub fn get_initial_value() -> computed_value::T {
26660                let mut v = SmallVec::new();
26661                v.push(single_value::get_initial_value());
26662                computed_value::List(v)
26663        }
26664
26665        pub fn parse<'i, 't>(
26666            context: &ParserContext,
26667            input: &mut Parser<'i, 't>,
26668        ) -> Result<SpecifiedValue, ParseError<'i>> {
26669            use style_traits::Separator;
26670
26671
26672            let v = style_traits::Comma::parse(input, |parser| {
26673                single_value::parse(context, parser)
26674            })?;
26675            Ok(SpecifiedValue(v.into()))
26676        }
26677
26678        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
26679
26680
26681        impl ToComputedValue for SpecifiedValue {
26682            type ComputedValue = computed_value::T;
26683
26684            #[inline]
26685            fn to_computed_value(&self, context: &Context) -> computed_value::T {
26686                use std::iter::FromIterator;
26687                computed_value::List(computed_value::UnderlyingList::from_iter(
26688                    self.0.iter().map(|i| i.to_computed_value(context))
26689                ))
26690            }
26691
26692            #[inline]
26693            fn from_computed_value(computed: &computed_value::T) -> Self {
26694                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
26695                SpecifiedValue(iter.collect())
26696            }
26697        }
26698    
26699        #[allow(unused_variables)]
26700        pub unsafe fn cascade_property(
26701            declaration: &PropertyDeclaration,
26702            context: &mut computed::Context,
26703        ) {
26704            context.for_non_inherited_property = true;
26705            debug_assert_eq!(
26706                declaration.id().as_longhand().unwrap(),
26707                LonghandId::TransitionBehavior,
26708            );
26709            let specified_value = match *declaration {
26710                PropertyDeclaration::CSSWideKeyword(ref wk) => {
26711                    match wk.keyword {
26712                        CSSWideKeyword::Unset |
26713                        CSSWideKeyword::Initial => {
26714                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
26715                        },
26716                        CSSWideKeyword::Inherit => {
26717                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
26718                                context.builder.inherit_transition_behavior();
26719                        }
26720                        CSSWideKeyword::RevertLayer |
26721                        CSSWideKeyword::Revert => {
26722                            declaration.debug_crash("Found revert/revert-layer not dealt with");
26723                        },
26724                    }
26725                    return;
26726                },
26727                #[cfg(debug_assertions)]
26728                PropertyDeclaration::WithVariables(..) => {
26729                    declaration.debug_crash("Found variables not substituted");
26730                    return;
26731                },
26732                _ => unsafe {
26733                    declaration.unchecked_value_as::<longhands::transition_behavior::SpecifiedValue>()
26734                },
26735            };
26736
26737
26738                let computed = specified_value.to_computed_value(context);
26739                context.builder.set_transition_behavior(computed)
26740        }
26741
26742        pub fn parse_declared<'i, 't>(
26743            context: &ParserContext,
26744            input: &mut Parser<'i, 't>,
26745        ) -> Result<PropertyDeclaration, ParseError<'i>> {
26746                parse(context, input)
26747                .map(PropertyDeclaration::TransitionBehavior)
26748        }
26749    }
26750
26751
26752
26753
26754
26755
26756
26757    
26758        
26759    
26760    
26761    /// https://drafts.csswg.org/css-animations/#propdef-animation-name
26762    pub mod animation_name {
26763        #[allow(unused_imports)]
26764        use cssparser::{Parser, BasicParseError, Token};
26765        #[allow(unused_imports)]
26766        use crate::parser::{Parse, ParserContext};
26767        #[allow(unused_imports)]
26768        use crate::properties::{UnparsedValue, ShorthandId};
26769        #[allow(unused_imports)]
26770        use crate::error_reporting::ParseErrorReporter;
26771        #[allow(unused_imports)]
26772        use crate::properties::longhands;
26773        #[allow(unused_imports)]
26774        use crate::properties::{LonghandId, LonghandIdSet};
26775        #[allow(unused_imports)]
26776        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
26777        #[allow(unused_imports)]
26778        use crate::properties::style_structs;
26779        #[allow(unused_imports)]
26780        use selectors::parser::SelectorParseErrorKind;
26781        #[allow(unused_imports)]
26782        use servo_arc::Arc;
26783        #[allow(unused_imports)]
26784        use style_traits::{ParseError, StyleParseErrorKind};
26785        #[allow(unused_imports)]
26786        use crate::values::computed::{Context, ToComputedValue};
26787        #[allow(unused_imports)]
26788        use crate::values::{computed, generics, specified};
26789        #[allow(unused_imports)]
26790        use crate::Atom;
26791        
26792        #[allow(unused_imports)]
26793        use smallvec::SmallVec;
26794
26795        pub mod single_value {
26796            #[allow(unused_imports)]
26797            use cssparser::{Parser, BasicParseError};
26798            #[allow(unused_imports)]
26799            use crate::parser::{Parse, ParserContext};
26800            #[allow(unused_imports)]
26801            use crate::properties::ShorthandId;
26802            #[allow(unused_imports)]
26803            use selectors::parser::SelectorParseErrorKind;
26804            #[allow(unused_imports)]
26805            use style_traits::{ParseError, StyleParseErrorKind};
26806            #[allow(unused_imports)]
26807            use crate::values::computed::{Context, ToComputedValue};
26808            #[allow(unused_imports)]
26809            use crate::values::{computed, specified};
26810            
26811            
26812        #[allow(unused_imports)]
26813        use app_units::Au;
26814        #[allow(unused_imports)]
26815        use crate::values::specified::AllowQuirks;
26816        #[allow(unused_imports)]
26817        use crate::Zero;
26818        #[allow(unused_imports)]
26819        use smallvec::SmallVec;
26820        pub use crate::values::specified::AnimationName as SpecifiedValue;
26821        pub mod computed_value {
26822            pub use crate::values::computed::AnimationName as T;
26823        }
26824        #[inline] pub fn get_initial_value() -> computed_value::T { computed::AnimationName::none() }
26825        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::AnimationName::none() }
26826        #[allow(unused_variables)]
26827        #[inline]
26828        pub fn parse<'i, 't>(
26829            context: &ParserContext,
26830            input: &mut Parser<'i, 't>,
26831        ) -> Result<SpecifiedValue, ParseError<'i>> {
26832            <specified::AnimationName as crate::parser::Parse>::parse(context, input)
26833        }
26834    
26835        
26836        }
26837
26838        /// The definition of the computed value for animation-name.
26839        pub mod computed_value {
26840            #[allow(unused_imports)]
26841            use crate::values::animated::ToAnimatedValue;
26842            #[allow(unused_imports)]
26843            use crate::values::resolved::ToResolvedValue;
26844            pub use super::single_value::computed_value as single_value;
26845            pub use self::single_value::T as SingleComputedValue;
26846            use smallvec::SmallVec;
26847            use crate::values::computed::ComputedVecIter;
26848
26849            
26850
26851            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
26852            // something for transition-name, which is the only remaining user
26853            // of NotInitial.
26854            pub type UnderlyingList<T> =
26855                    SmallVec<[T; 1]>;
26856
26857            pub type UnderlyingOwnedList<T> =
26858                    SmallVec<[T; 1]>;
26859
26860
26861            /// The generic type defining the animated and resolved values for
26862            /// this property.
26863            ///
26864            /// Making this type generic allows the compiler to figure out the
26865            /// animated value for us, instead of having to implement it
26866            /// manually for every type we care about.
26867            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
26868            #[css(comma)]
26869            pub struct OwnedList<T>(
26870                #[css(iterable)]
26871                pub UnderlyingOwnedList<T>,
26872            );
26873
26874            /// The computed value for this property.
26875            pub type ComputedList = OwnedList<single_value::T>;
26876            pub use self::OwnedList as List;
26877
26878
26879
26880            /// The computed value, effectively a list of single values.
26881            pub use self::ComputedList as T;
26882
26883            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
26884        }
26885
26886        /// The specified value of animation-name.
26887        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
26888        #[css(comma)]
26889        pub struct SpecifiedValue(
26890            #[css(iterable)]
26891            pub crate::OwnedSlice<single_value::SpecifiedValue>,
26892        );
26893
26894        pub fn get_initial_value() -> computed_value::T {
26895                let mut v = SmallVec::new();
26896                v.push(single_value::get_initial_value());
26897                computed_value::List(v)
26898        }
26899
26900        pub fn parse<'i, 't>(
26901            context: &ParserContext,
26902            input: &mut Parser<'i, 't>,
26903        ) -> Result<SpecifiedValue, ParseError<'i>> {
26904            use style_traits::Separator;
26905
26906
26907            let v = style_traits::Comma::parse(input, |parser| {
26908                single_value::parse(context, parser)
26909            })?;
26910            Ok(SpecifiedValue(v.into()))
26911        }
26912
26913        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
26914
26915
26916        impl ToComputedValue for SpecifiedValue {
26917            type ComputedValue = computed_value::T;
26918
26919            #[inline]
26920            fn to_computed_value(&self, context: &Context) -> computed_value::T {
26921                use std::iter::FromIterator;
26922                computed_value::List(computed_value::UnderlyingList::from_iter(
26923                    self.0.iter().map(|i| i.to_computed_value(context))
26924                ))
26925            }
26926
26927            #[inline]
26928            fn from_computed_value(computed: &computed_value::T) -> Self {
26929                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
26930                SpecifiedValue(iter.collect())
26931            }
26932        }
26933    
26934        #[allow(unused_variables)]
26935        pub unsafe fn cascade_property(
26936            declaration: &PropertyDeclaration,
26937            context: &mut computed::Context,
26938        ) {
26939            context.for_non_inherited_property = true;
26940            debug_assert_eq!(
26941                declaration.id().as_longhand().unwrap(),
26942                LonghandId::AnimationName,
26943            );
26944            let specified_value = match *declaration {
26945                PropertyDeclaration::CSSWideKeyword(ref wk) => {
26946                    match wk.keyword {
26947                        CSSWideKeyword::Unset |
26948                        CSSWideKeyword::Initial => {
26949                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
26950                        },
26951                        CSSWideKeyword::Inherit => {
26952                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
26953                                context.builder.inherit_animation_name();
26954                        }
26955                        CSSWideKeyword::RevertLayer |
26956                        CSSWideKeyword::Revert => {
26957                            declaration.debug_crash("Found revert/revert-layer not dealt with");
26958                        },
26959                    }
26960                    return;
26961                },
26962                #[cfg(debug_assertions)]
26963                PropertyDeclaration::WithVariables(..) => {
26964                    declaration.debug_crash("Found variables not substituted");
26965                    return;
26966                },
26967                _ => unsafe {
26968                    declaration.unchecked_value_as::<longhands::animation_name::SpecifiedValue>()
26969                },
26970            };
26971
26972
26973                let computed = specified_value.to_computed_value(context);
26974                context.builder.set_animation_name(computed)
26975        }
26976
26977        pub fn parse_declared<'i, 't>(
26978            context: &ParserContext,
26979            input: &mut Parser<'i, 't>,
26980        ) -> Result<PropertyDeclaration, ParseError<'i>> {
26981                parse(context, input)
26982                .map(PropertyDeclaration::AnimationName)
26983        }
26984    }
26985
26986
26987
26988
26989
26990    
26991        
26992    
26993    
26994    /// https://drafts.csswg.org/css-animations-2/#animation-duration
26995    pub mod animation_duration {
26996        #[allow(unused_imports)]
26997        use cssparser::{Parser, BasicParseError, Token};
26998        #[allow(unused_imports)]
26999        use crate::parser::{Parse, ParserContext};
27000        #[allow(unused_imports)]
27001        use crate::properties::{UnparsedValue, ShorthandId};
27002        #[allow(unused_imports)]
27003        use crate::error_reporting::ParseErrorReporter;
27004        #[allow(unused_imports)]
27005        use crate::properties::longhands;
27006        #[allow(unused_imports)]
27007        use crate::properties::{LonghandId, LonghandIdSet};
27008        #[allow(unused_imports)]
27009        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
27010        #[allow(unused_imports)]
27011        use crate::properties::style_structs;
27012        #[allow(unused_imports)]
27013        use selectors::parser::SelectorParseErrorKind;
27014        #[allow(unused_imports)]
27015        use servo_arc::Arc;
27016        #[allow(unused_imports)]
27017        use style_traits::{ParseError, StyleParseErrorKind};
27018        #[allow(unused_imports)]
27019        use crate::values::computed::{Context, ToComputedValue};
27020        #[allow(unused_imports)]
27021        use crate::values::{computed, generics, specified};
27022        #[allow(unused_imports)]
27023        use crate::Atom;
27024        
27025        #[allow(unused_imports)]
27026        use smallvec::SmallVec;
27027
27028        pub mod single_value {
27029            #[allow(unused_imports)]
27030            use cssparser::{Parser, BasicParseError};
27031            #[allow(unused_imports)]
27032            use crate::parser::{Parse, ParserContext};
27033            #[allow(unused_imports)]
27034            use crate::properties::ShorthandId;
27035            #[allow(unused_imports)]
27036            use selectors::parser::SelectorParseErrorKind;
27037            #[allow(unused_imports)]
27038            use style_traits::{ParseError, StyleParseErrorKind};
27039            #[allow(unused_imports)]
27040            use crate::values::computed::{Context, ToComputedValue};
27041            #[allow(unused_imports)]
27042            use crate::values::{computed, specified};
27043            
27044            
27045        #[allow(unused_imports)]
27046        use app_units::Au;
27047        #[allow(unused_imports)]
27048        use crate::values::specified::AllowQuirks;
27049        #[allow(unused_imports)]
27050        use crate::Zero;
27051        #[allow(unused_imports)]
27052        use smallvec::SmallVec;
27053        pub use crate::values::specified::AnimationDuration as SpecifiedValue;
27054        pub mod computed_value {
27055            pub use crate::values::computed::AnimationDuration as T;
27056        }
27057        #[inline] pub fn get_initial_value() -> computed_value::T { computed::AnimationDuration::auto() }
27058        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::AnimationDuration::auto() }
27059        #[allow(unused_variables)]
27060        #[inline]
27061        pub fn parse<'i, 't>(
27062            context: &ParserContext,
27063            input: &mut Parser<'i, 't>,
27064        ) -> Result<SpecifiedValue, ParseError<'i>> {
27065            <specified::AnimationDuration as crate::parser::Parse>::parse(context, input)
27066        }
27067    
27068        
27069        }
27070
27071        /// The definition of the computed value for animation-duration.
27072        pub mod computed_value {
27073            #[allow(unused_imports)]
27074            use crate::values::animated::ToAnimatedValue;
27075            #[allow(unused_imports)]
27076            use crate::values::resolved::ToResolvedValue;
27077            pub use super::single_value::computed_value as single_value;
27078            pub use self::single_value::T as SingleComputedValue;
27079            use smallvec::SmallVec;
27080            use crate::values::computed::ComputedVecIter;
27081
27082            
27083
27084            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
27085            // something for transition-name, which is the only remaining user
27086            // of NotInitial.
27087            pub type UnderlyingList<T> =
27088                    SmallVec<[T; 1]>;
27089
27090            pub type UnderlyingOwnedList<T> =
27091                    SmallVec<[T; 1]>;
27092
27093
27094            /// The generic type defining the animated and resolved values for
27095            /// this property.
27096            ///
27097            /// Making this type generic allows the compiler to figure out the
27098            /// animated value for us, instead of having to implement it
27099            /// manually for every type we care about.
27100            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
27101            #[css(comma)]
27102            pub struct OwnedList<T>(
27103                #[css(iterable)]
27104                pub UnderlyingOwnedList<T>,
27105            );
27106
27107            /// The computed value for this property.
27108            pub type ComputedList = OwnedList<single_value::T>;
27109            pub use self::OwnedList as List;
27110
27111
27112
27113            /// The computed value, effectively a list of single values.
27114            pub use self::ComputedList as T;
27115
27116            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
27117        }
27118
27119        /// The specified value of animation-duration.
27120        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
27121        #[css(comma)]
27122        pub struct SpecifiedValue(
27123            #[css(iterable)]
27124            pub crate::OwnedSlice<single_value::SpecifiedValue>,
27125        );
27126
27127        pub fn get_initial_value() -> computed_value::T {
27128                let mut v = SmallVec::new();
27129                v.push(single_value::get_initial_value());
27130                computed_value::List(v)
27131        }
27132
27133        pub fn parse<'i, 't>(
27134            context: &ParserContext,
27135            input: &mut Parser<'i, 't>,
27136        ) -> Result<SpecifiedValue, ParseError<'i>> {
27137            use style_traits::Separator;
27138
27139
27140            let v = style_traits::Comma::parse(input, |parser| {
27141                single_value::parse(context, parser)
27142            })?;
27143            Ok(SpecifiedValue(v.into()))
27144        }
27145
27146        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
27147
27148
27149        impl ToComputedValue for SpecifiedValue {
27150            type ComputedValue = computed_value::T;
27151
27152            #[inline]
27153            fn to_computed_value(&self, context: &Context) -> computed_value::T {
27154                use std::iter::FromIterator;
27155                computed_value::List(computed_value::UnderlyingList::from_iter(
27156                    self.0.iter().map(|i| i.to_computed_value(context))
27157                ))
27158            }
27159
27160            #[inline]
27161            fn from_computed_value(computed: &computed_value::T) -> Self {
27162                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
27163                SpecifiedValue(iter.collect())
27164            }
27165        }
27166    
27167        #[allow(unused_variables)]
27168        pub unsafe fn cascade_property(
27169            declaration: &PropertyDeclaration,
27170            context: &mut computed::Context,
27171        ) {
27172            context.for_non_inherited_property = true;
27173            debug_assert_eq!(
27174                declaration.id().as_longhand().unwrap(),
27175                LonghandId::AnimationDuration,
27176            );
27177            let specified_value = match *declaration {
27178                PropertyDeclaration::CSSWideKeyword(ref wk) => {
27179                    match wk.keyword {
27180                        CSSWideKeyword::Unset |
27181                        CSSWideKeyword::Initial => {
27182                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
27183                        },
27184                        CSSWideKeyword::Inherit => {
27185                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
27186                                context.builder.inherit_animation_duration();
27187                        }
27188                        CSSWideKeyword::RevertLayer |
27189                        CSSWideKeyword::Revert => {
27190                            declaration.debug_crash("Found revert/revert-layer not dealt with");
27191                        },
27192                    }
27193                    return;
27194                },
27195                #[cfg(debug_assertions)]
27196                PropertyDeclaration::WithVariables(..) => {
27197                    declaration.debug_crash("Found variables not substituted");
27198                    return;
27199                },
27200                _ => unsafe {
27201                    declaration.unchecked_value_as::<longhands::animation_duration::SpecifiedValue>()
27202                },
27203            };
27204
27205
27206                let computed = specified_value.to_computed_value(context);
27207                context.builder.set_animation_duration(computed)
27208        }
27209
27210        pub fn parse_declared<'i, 't>(
27211            context: &ParserContext,
27212            input: &mut Parser<'i, 't>,
27213        ) -> Result<PropertyDeclaration, ParseError<'i>> {
27214                parse(context, input)
27215                .map(PropertyDeclaration::AnimationDuration)
27216        }
27217    }
27218
27219
27220
27221
27222// animation-timing-function is the exception to the rule for allowed_in_keyframe_block:
27223// https://drafts.csswg.org/css-animations/#keyframes
27224
27225    
27226        
27227    
27228    
27229    /// https://drafts.csswg.org/css-transitions/#propdef-animation-timing-function
27230    pub mod animation_timing_function {
27231        #[allow(unused_imports)]
27232        use cssparser::{Parser, BasicParseError, Token};
27233        #[allow(unused_imports)]
27234        use crate::parser::{Parse, ParserContext};
27235        #[allow(unused_imports)]
27236        use crate::properties::{UnparsedValue, ShorthandId};
27237        #[allow(unused_imports)]
27238        use crate::error_reporting::ParseErrorReporter;
27239        #[allow(unused_imports)]
27240        use crate::properties::longhands;
27241        #[allow(unused_imports)]
27242        use crate::properties::{LonghandId, LonghandIdSet};
27243        #[allow(unused_imports)]
27244        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
27245        #[allow(unused_imports)]
27246        use crate::properties::style_structs;
27247        #[allow(unused_imports)]
27248        use selectors::parser::SelectorParseErrorKind;
27249        #[allow(unused_imports)]
27250        use servo_arc::Arc;
27251        #[allow(unused_imports)]
27252        use style_traits::{ParseError, StyleParseErrorKind};
27253        #[allow(unused_imports)]
27254        use crate::values::computed::{Context, ToComputedValue};
27255        #[allow(unused_imports)]
27256        use crate::values::{computed, generics, specified};
27257        #[allow(unused_imports)]
27258        use crate::Atom;
27259        
27260        #[allow(unused_imports)]
27261        use smallvec::SmallVec;
27262
27263        pub mod single_value {
27264            #[allow(unused_imports)]
27265            use cssparser::{Parser, BasicParseError};
27266            #[allow(unused_imports)]
27267            use crate::parser::{Parse, ParserContext};
27268            #[allow(unused_imports)]
27269            use crate::properties::ShorthandId;
27270            #[allow(unused_imports)]
27271            use selectors::parser::SelectorParseErrorKind;
27272            #[allow(unused_imports)]
27273            use style_traits::{ParseError, StyleParseErrorKind};
27274            #[allow(unused_imports)]
27275            use crate::values::computed::{Context, ToComputedValue};
27276            #[allow(unused_imports)]
27277            use crate::values::{computed, specified};
27278            
27279            
27280        #[allow(unused_imports)]
27281        use app_units::Au;
27282        #[allow(unused_imports)]
27283        use crate::values::specified::AllowQuirks;
27284        #[allow(unused_imports)]
27285        use crate::Zero;
27286        #[allow(unused_imports)]
27287        use smallvec::SmallVec;
27288        pub use crate::values::specified::TimingFunction as SpecifiedValue;
27289        pub mod computed_value {
27290            pub use crate::values::computed::TimingFunction as T;
27291        }
27292        #[inline] pub fn get_initial_value() -> computed_value::T { computed::TimingFunction::ease() }
27293        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::TimingFunction::ease() }
27294        #[allow(unused_variables)]
27295        #[inline]
27296        pub fn parse<'i, 't>(
27297            context: &ParserContext,
27298            input: &mut Parser<'i, 't>,
27299        ) -> Result<SpecifiedValue, ParseError<'i>> {
27300            <specified::TimingFunction as crate::parser::Parse>::parse(context, input)
27301        }
27302    
27303        
27304        }
27305
27306        /// The definition of the computed value for animation-timing-function.
27307        pub mod computed_value {
27308            #[allow(unused_imports)]
27309            use crate::values::animated::ToAnimatedValue;
27310            #[allow(unused_imports)]
27311            use crate::values::resolved::ToResolvedValue;
27312            pub use super::single_value::computed_value as single_value;
27313            pub use self::single_value::T as SingleComputedValue;
27314            use smallvec::SmallVec;
27315            use crate::values::computed::ComputedVecIter;
27316
27317            
27318
27319            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
27320            // something for transition-name, which is the only remaining user
27321            // of NotInitial.
27322            pub type UnderlyingList<T> =
27323                    SmallVec<[T; 1]>;
27324
27325            pub type UnderlyingOwnedList<T> =
27326                    SmallVec<[T; 1]>;
27327
27328
27329            /// The generic type defining the animated and resolved values for
27330            /// this property.
27331            ///
27332            /// Making this type generic allows the compiler to figure out the
27333            /// animated value for us, instead of having to implement it
27334            /// manually for every type we care about.
27335            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
27336            #[css(comma)]
27337            pub struct OwnedList<T>(
27338                #[css(iterable)]
27339                pub UnderlyingOwnedList<T>,
27340            );
27341
27342            /// The computed value for this property.
27343            pub type ComputedList = OwnedList<single_value::T>;
27344            pub use self::OwnedList as List;
27345
27346
27347
27348            /// The computed value, effectively a list of single values.
27349            pub use self::ComputedList as T;
27350
27351            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
27352        }
27353
27354        /// The specified value of animation-timing-function.
27355        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
27356        #[css(comma)]
27357        pub struct SpecifiedValue(
27358            #[css(iterable)]
27359            pub crate::OwnedSlice<single_value::SpecifiedValue>,
27360        );
27361
27362        pub fn get_initial_value() -> computed_value::T {
27363                let mut v = SmallVec::new();
27364                v.push(single_value::get_initial_value());
27365                computed_value::List(v)
27366        }
27367
27368        pub fn parse<'i, 't>(
27369            context: &ParserContext,
27370            input: &mut Parser<'i, 't>,
27371        ) -> Result<SpecifiedValue, ParseError<'i>> {
27372            use style_traits::Separator;
27373
27374
27375            let v = style_traits::Comma::parse(input, |parser| {
27376                single_value::parse(context, parser)
27377            })?;
27378            Ok(SpecifiedValue(v.into()))
27379        }
27380
27381        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
27382
27383
27384        impl ToComputedValue for SpecifiedValue {
27385            type ComputedValue = computed_value::T;
27386
27387            #[inline]
27388            fn to_computed_value(&self, context: &Context) -> computed_value::T {
27389                use std::iter::FromIterator;
27390                computed_value::List(computed_value::UnderlyingList::from_iter(
27391                    self.0.iter().map(|i| i.to_computed_value(context))
27392                ))
27393            }
27394
27395            #[inline]
27396            fn from_computed_value(computed: &computed_value::T) -> Self {
27397                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
27398                SpecifiedValue(iter.collect())
27399            }
27400        }
27401    
27402        #[allow(unused_variables)]
27403        pub unsafe fn cascade_property(
27404            declaration: &PropertyDeclaration,
27405            context: &mut computed::Context,
27406        ) {
27407            context.for_non_inherited_property = true;
27408            debug_assert_eq!(
27409                declaration.id().as_longhand().unwrap(),
27410                LonghandId::AnimationTimingFunction,
27411            );
27412            let specified_value = match *declaration {
27413                PropertyDeclaration::CSSWideKeyword(ref wk) => {
27414                    match wk.keyword {
27415                        CSSWideKeyword::Unset |
27416                        CSSWideKeyword::Initial => {
27417                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
27418                        },
27419                        CSSWideKeyword::Inherit => {
27420                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
27421                                context.builder.inherit_animation_timing_function();
27422                        }
27423                        CSSWideKeyword::RevertLayer |
27424                        CSSWideKeyword::Revert => {
27425                            declaration.debug_crash("Found revert/revert-layer not dealt with");
27426                        },
27427                    }
27428                    return;
27429                },
27430                #[cfg(debug_assertions)]
27431                PropertyDeclaration::WithVariables(..) => {
27432                    declaration.debug_crash("Found variables not substituted");
27433                    return;
27434                },
27435                _ => unsafe {
27436                    declaration.unchecked_value_as::<longhands::animation_timing_function::SpecifiedValue>()
27437                },
27438            };
27439
27440
27441                let computed = specified_value.to_computed_value(context);
27442                context.builder.set_animation_timing_function(computed)
27443        }
27444
27445        pub fn parse_declared<'i, 't>(
27446            context: &ParserContext,
27447            input: &mut Parser<'i, 't>,
27448        ) -> Result<PropertyDeclaration, ParseError<'i>> {
27449                parse(context, input)
27450                .map(PropertyDeclaration::AnimationTimingFunction)
27451        }
27452    }
27453
27454
27455
27456
27457
27458    
27459        
27460    
27461    
27462    /// https://drafts.csswg.org/css-animations/#propdef-animation-iteration-count
27463    pub mod animation_iteration_count {
27464        #[allow(unused_imports)]
27465        use cssparser::{Parser, BasicParseError, Token};
27466        #[allow(unused_imports)]
27467        use crate::parser::{Parse, ParserContext};
27468        #[allow(unused_imports)]
27469        use crate::properties::{UnparsedValue, ShorthandId};
27470        #[allow(unused_imports)]
27471        use crate::error_reporting::ParseErrorReporter;
27472        #[allow(unused_imports)]
27473        use crate::properties::longhands;
27474        #[allow(unused_imports)]
27475        use crate::properties::{LonghandId, LonghandIdSet};
27476        #[allow(unused_imports)]
27477        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
27478        #[allow(unused_imports)]
27479        use crate::properties::style_structs;
27480        #[allow(unused_imports)]
27481        use selectors::parser::SelectorParseErrorKind;
27482        #[allow(unused_imports)]
27483        use servo_arc::Arc;
27484        #[allow(unused_imports)]
27485        use style_traits::{ParseError, StyleParseErrorKind};
27486        #[allow(unused_imports)]
27487        use crate::values::computed::{Context, ToComputedValue};
27488        #[allow(unused_imports)]
27489        use crate::values::{computed, generics, specified};
27490        #[allow(unused_imports)]
27491        use crate::Atom;
27492        
27493        #[allow(unused_imports)]
27494        use smallvec::SmallVec;
27495
27496        pub mod single_value {
27497            #[allow(unused_imports)]
27498            use cssparser::{Parser, BasicParseError};
27499            #[allow(unused_imports)]
27500            use crate::parser::{Parse, ParserContext};
27501            #[allow(unused_imports)]
27502            use crate::properties::ShorthandId;
27503            #[allow(unused_imports)]
27504            use selectors::parser::SelectorParseErrorKind;
27505            #[allow(unused_imports)]
27506            use style_traits::{ParseError, StyleParseErrorKind};
27507            #[allow(unused_imports)]
27508            use crate::values::computed::{Context, ToComputedValue};
27509            #[allow(unused_imports)]
27510            use crate::values::{computed, specified};
27511            
27512            
27513        #[allow(unused_imports)]
27514        use app_units::Au;
27515        #[allow(unused_imports)]
27516        use crate::values::specified::AllowQuirks;
27517        #[allow(unused_imports)]
27518        use crate::Zero;
27519        #[allow(unused_imports)]
27520        use smallvec::SmallVec;
27521        pub use crate::values::specified::AnimationIterationCount as SpecifiedValue;
27522        pub mod computed_value {
27523            pub use crate::values::computed::AnimationIterationCount as T;
27524        }
27525        #[inline] pub fn get_initial_value() -> computed_value::T { computed::AnimationIterationCount::one() }
27526        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::AnimationIterationCount::one() }
27527        #[allow(unused_variables)]
27528        #[inline]
27529        pub fn parse<'i, 't>(
27530            context: &ParserContext,
27531            input: &mut Parser<'i, 't>,
27532        ) -> Result<SpecifiedValue, ParseError<'i>> {
27533            <specified::AnimationIterationCount as crate::parser::Parse>::parse(context, input)
27534        }
27535    
27536        
27537        }
27538
27539        /// The definition of the computed value for animation-iteration-count.
27540        pub mod computed_value {
27541            #[allow(unused_imports)]
27542            use crate::values::animated::ToAnimatedValue;
27543            #[allow(unused_imports)]
27544            use crate::values::resolved::ToResolvedValue;
27545            pub use super::single_value::computed_value as single_value;
27546            pub use self::single_value::T as SingleComputedValue;
27547            use smallvec::SmallVec;
27548            use crate::values::computed::ComputedVecIter;
27549
27550            
27551
27552            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
27553            // something for transition-name, which is the only remaining user
27554            // of NotInitial.
27555            pub type UnderlyingList<T> =
27556                    SmallVec<[T; 1]>;
27557
27558            pub type UnderlyingOwnedList<T> =
27559                    SmallVec<[T; 1]>;
27560
27561
27562            /// The generic type defining the animated and resolved values for
27563            /// this property.
27564            ///
27565            /// Making this type generic allows the compiler to figure out the
27566            /// animated value for us, instead of having to implement it
27567            /// manually for every type we care about.
27568            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
27569            #[css(comma)]
27570            pub struct OwnedList<T>(
27571                #[css(iterable)]
27572                pub UnderlyingOwnedList<T>,
27573            );
27574
27575            /// The computed value for this property.
27576            pub type ComputedList = OwnedList<single_value::T>;
27577            pub use self::OwnedList as List;
27578
27579
27580
27581            /// The computed value, effectively a list of single values.
27582            pub use self::ComputedList as T;
27583
27584            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
27585        }
27586
27587        /// The specified value of animation-iteration-count.
27588        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
27589        #[css(comma)]
27590        pub struct SpecifiedValue(
27591            #[css(iterable)]
27592            pub crate::OwnedSlice<single_value::SpecifiedValue>,
27593        );
27594
27595        pub fn get_initial_value() -> computed_value::T {
27596                let mut v = SmallVec::new();
27597                v.push(single_value::get_initial_value());
27598                computed_value::List(v)
27599        }
27600
27601        pub fn parse<'i, 't>(
27602            context: &ParserContext,
27603            input: &mut Parser<'i, 't>,
27604        ) -> Result<SpecifiedValue, ParseError<'i>> {
27605            use style_traits::Separator;
27606
27607
27608            let v = style_traits::Comma::parse(input, |parser| {
27609                single_value::parse(context, parser)
27610            })?;
27611            Ok(SpecifiedValue(v.into()))
27612        }
27613
27614        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
27615
27616
27617        impl ToComputedValue for SpecifiedValue {
27618            type ComputedValue = computed_value::T;
27619
27620            #[inline]
27621            fn to_computed_value(&self, context: &Context) -> computed_value::T {
27622                use std::iter::FromIterator;
27623                computed_value::List(computed_value::UnderlyingList::from_iter(
27624                    self.0.iter().map(|i| i.to_computed_value(context))
27625                ))
27626            }
27627
27628            #[inline]
27629            fn from_computed_value(computed: &computed_value::T) -> Self {
27630                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
27631                SpecifiedValue(iter.collect())
27632            }
27633        }
27634    
27635        #[allow(unused_variables)]
27636        pub unsafe fn cascade_property(
27637            declaration: &PropertyDeclaration,
27638            context: &mut computed::Context,
27639        ) {
27640            context.for_non_inherited_property = true;
27641            debug_assert_eq!(
27642                declaration.id().as_longhand().unwrap(),
27643                LonghandId::AnimationIterationCount,
27644            );
27645            let specified_value = match *declaration {
27646                PropertyDeclaration::CSSWideKeyword(ref wk) => {
27647                    match wk.keyword {
27648                        CSSWideKeyword::Unset |
27649                        CSSWideKeyword::Initial => {
27650                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
27651                        },
27652                        CSSWideKeyword::Inherit => {
27653                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
27654                                context.builder.inherit_animation_iteration_count();
27655                        }
27656                        CSSWideKeyword::RevertLayer |
27657                        CSSWideKeyword::Revert => {
27658                            declaration.debug_crash("Found revert/revert-layer not dealt with");
27659                        },
27660                    }
27661                    return;
27662                },
27663                #[cfg(debug_assertions)]
27664                PropertyDeclaration::WithVariables(..) => {
27665                    declaration.debug_crash("Found variables not substituted");
27666                    return;
27667                },
27668                _ => unsafe {
27669                    declaration.unchecked_value_as::<longhands::animation_iteration_count::SpecifiedValue>()
27670                },
27671            };
27672
27673
27674                let computed = specified_value.to_computed_value(context);
27675                context.builder.set_animation_iteration_count(computed)
27676        }
27677
27678        pub fn parse_declared<'i, 't>(
27679            context: &ParserContext,
27680            input: &mut Parser<'i, 't>,
27681        ) -> Result<PropertyDeclaration, ParseError<'i>> {
27682                parse(context, input)
27683                .map(PropertyDeclaration::AnimationIterationCount)
27684        }
27685    }
27686
27687
27688
27689
27690
27691    
27692        
27693    
27694    
27695    /// https://drafts.csswg.org/css-animations/#propdef-animation-direction
27696    pub mod animation_direction {
27697        #[allow(unused_imports)]
27698        use cssparser::{Parser, BasicParseError, Token};
27699        #[allow(unused_imports)]
27700        use crate::parser::{Parse, ParserContext};
27701        #[allow(unused_imports)]
27702        use crate::properties::{UnparsedValue, ShorthandId};
27703        #[allow(unused_imports)]
27704        use crate::error_reporting::ParseErrorReporter;
27705        #[allow(unused_imports)]
27706        use crate::properties::longhands;
27707        #[allow(unused_imports)]
27708        use crate::properties::{LonghandId, LonghandIdSet};
27709        #[allow(unused_imports)]
27710        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
27711        #[allow(unused_imports)]
27712        use crate::properties::style_structs;
27713        #[allow(unused_imports)]
27714        use selectors::parser::SelectorParseErrorKind;
27715        #[allow(unused_imports)]
27716        use servo_arc::Arc;
27717        #[allow(unused_imports)]
27718        use style_traits::{ParseError, StyleParseErrorKind};
27719        #[allow(unused_imports)]
27720        use crate::values::computed::{Context, ToComputedValue};
27721        #[allow(unused_imports)]
27722        use crate::values::{computed, generics, specified};
27723        #[allow(unused_imports)]
27724        use crate::Atom;
27725        
27726        #[allow(unused_imports)]
27727        use smallvec::SmallVec;
27728
27729        pub mod single_value {
27730            #[allow(unused_imports)]
27731            use cssparser::{Parser, BasicParseError};
27732            #[allow(unused_imports)]
27733            use crate::parser::{Parse, ParserContext};
27734            #[allow(unused_imports)]
27735            use crate::properties::ShorthandId;
27736            #[allow(unused_imports)]
27737            use selectors::parser::SelectorParseErrorKind;
27738            #[allow(unused_imports)]
27739            use style_traits::{ParseError, StyleParseErrorKind};
27740            #[allow(unused_imports)]
27741            use crate::values::computed::{Context, ToComputedValue};
27742            #[allow(unused_imports)]
27743            use crate::values::{computed, specified};
27744            
27745            
27746        #[allow(unused_imports)]
27747        use app_units::Au;
27748        #[allow(unused_imports)]
27749        use crate::values::specified::AllowQuirks;
27750        #[allow(unused_imports)]
27751        use crate::Zero;
27752        #[allow(unused_imports)]
27753        use smallvec::SmallVec;
27754        pub use crate::values::specified::AnimationDirection as SpecifiedValue;
27755        pub mod computed_value {
27756            pub use crate::values::computed::AnimationDirection as T;
27757        }
27758        #[inline] pub fn get_initial_value() -> computed_value::T { computed::AnimationDirection::Normal }
27759        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::AnimationDirection::Normal }
27760        #[allow(unused_variables)]
27761        #[inline]
27762        pub fn parse<'i, 't>(
27763            context: &ParserContext,
27764            input: &mut Parser<'i, 't>,
27765        ) -> Result<SpecifiedValue, ParseError<'i>> {
27766            <specified::AnimationDirection as crate::parser::Parse>::parse(context, input)
27767        }
27768    
27769        
27770        }
27771
27772        /// The definition of the computed value for animation-direction.
27773        pub mod computed_value {
27774            #[allow(unused_imports)]
27775            use crate::values::animated::ToAnimatedValue;
27776            #[allow(unused_imports)]
27777            use crate::values::resolved::ToResolvedValue;
27778            pub use super::single_value::computed_value as single_value;
27779            pub use self::single_value::T as SingleComputedValue;
27780            use smallvec::SmallVec;
27781            use crate::values::computed::ComputedVecIter;
27782
27783            
27784
27785            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
27786            // something for transition-name, which is the only remaining user
27787            // of NotInitial.
27788            pub type UnderlyingList<T> =
27789                    SmallVec<[T; 1]>;
27790
27791            pub type UnderlyingOwnedList<T> =
27792                    SmallVec<[T; 1]>;
27793
27794
27795            /// The generic type defining the animated and resolved values for
27796            /// this property.
27797            ///
27798            /// Making this type generic allows the compiler to figure out the
27799            /// animated value for us, instead of having to implement it
27800            /// manually for every type we care about.
27801            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
27802            #[css(comma)]
27803            pub struct OwnedList<T>(
27804                #[css(iterable)]
27805                pub UnderlyingOwnedList<T>,
27806            );
27807
27808            /// The computed value for this property.
27809            pub type ComputedList = OwnedList<single_value::T>;
27810            pub use self::OwnedList as List;
27811
27812
27813
27814            /// The computed value, effectively a list of single values.
27815            pub use self::ComputedList as T;
27816
27817            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
27818        }
27819
27820        /// The specified value of animation-direction.
27821        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
27822        #[css(comma)]
27823        pub struct SpecifiedValue(
27824            #[css(iterable)]
27825            pub crate::OwnedSlice<single_value::SpecifiedValue>,
27826        );
27827
27828        pub fn get_initial_value() -> computed_value::T {
27829                let mut v = SmallVec::new();
27830                v.push(single_value::get_initial_value());
27831                computed_value::List(v)
27832        }
27833
27834        pub fn parse<'i, 't>(
27835            context: &ParserContext,
27836            input: &mut Parser<'i, 't>,
27837        ) -> Result<SpecifiedValue, ParseError<'i>> {
27838            use style_traits::Separator;
27839
27840
27841            let v = style_traits::Comma::parse(input, |parser| {
27842                single_value::parse(context, parser)
27843            })?;
27844            Ok(SpecifiedValue(v.into()))
27845        }
27846
27847        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
27848
27849
27850        impl ToComputedValue for SpecifiedValue {
27851            type ComputedValue = computed_value::T;
27852
27853            #[inline]
27854            fn to_computed_value(&self, context: &Context) -> computed_value::T {
27855                use std::iter::FromIterator;
27856                computed_value::List(computed_value::UnderlyingList::from_iter(
27857                    self.0.iter().map(|i| i.to_computed_value(context))
27858                ))
27859            }
27860
27861            #[inline]
27862            fn from_computed_value(computed: &computed_value::T) -> Self {
27863                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
27864                SpecifiedValue(iter.collect())
27865            }
27866        }
27867    
27868        #[allow(unused_variables)]
27869        pub unsafe fn cascade_property(
27870            declaration: &PropertyDeclaration,
27871            context: &mut computed::Context,
27872        ) {
27873            context.for_non_inherited_property = true;
27874            debug_assert_eq!(
27875                declaration.id().as_longhand().unwrap(),
27876                LonghandId::AnimationDirection,
27877            );
27878            let specified_value = match *declaration {
27879                PropertyDeclaration::CSSWideKeyword(ref wk) => {
27880                    match wk.keyword {
27881                        CSSWideKeyword::Unset |
27882                        CSSWideKeyword::Initial => {
27883                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
27884                        },
27885                        CSSWideKeyword::Inherit => {
27886                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
27887                                context.builder.inherit_animation_direction();
27888                        }
27889                        CSSWideKeyword::RevertLayer |
27890                        CSSWideKeyword::Revert => {
27891                            declaration.debug_crash("Found revert/revert-layer not dealt with");
27892                        },
27893                    }
27894                    return;
27895                },
27896                #[cfg(debug_assertions)]
27897                PropertyDeclaration::WithVariables(..) => {
27898                    declaration.debug_crash("Found variables not substituted");
27899                    return;
27900                },
27901                _ => unsafe {
27902                    declaration.unchecked_value_as::<longhands::animation_direction::SpecifiedValue>()
27903                },
27904            };
27905
27906
27907                let computed = specified_value.to_computed_value(context);
27908                context.builder.set_animation_direction(computed)
27909        }
27910
27911        pub fn parse_declared<'i, 't>(
27912            context: &ParserContext,
27913            input: &mut Parser<'i, 't>,
27914        ) -> Result<PropertyDeclaration, ParseError<'i>> {
27915                parse(context, input)
27916                .map(PropertyDeclaration::AnimationDirection)
27917        }
27918    }
27919
27920
27921
27922
27923
27924    
27925        
27926    
27927    
27928    /// https://drafts.csswg.org/css-animations/#propdef-animation-play-state
27929    pub mod animation_play_state {
27930        #[allow(unused_imports)]
27931        use cssparser::{Parser, BasicParseError, Token};
27932        #[allow(unused_imports)]
27933        use crate::parser::{Parse, ParserContext};
27934        #[allow(unused_imports)]
27935        use crate::properties::{UnparsedValue, ShorthandId};
27936        #[allow(unused_imports)]
27937        use crate::error_reporting::ParseErrorReporter;
27938        #[allow(unused_imports)]
27939        use crate::properties::longhands;
27940        #[allow(unused_imports)]
27941        use crate::properties::{LonghandId, LonghandIdSet};
27942        #[allow(unused_imports)]
27943        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
27944        #[allow(unused_imports)]
27945        use crate::properties::style_structs;
27946        #[allow(unused_imports)]
27947        use selectors::parser::SelectorParseErrorKind;
27948        #[allow(unused_imports)]
27949        use servo_arc::Arc;
27950        #[allow(unused_imports)]
27951        use style_traits::{ParseError, StyleParseErrorKind};
27952        #[allow(unused_imports)]
27953        use crate::values::computed::{Context, ToComputedValue};
27954        #[allow(unused_imports)]
27955        use crate::values::{computed, generics, specified};
27956        #[allow(unused_imports)]
27957        use crate::Atom;
27958        
27959        #[allow(unused_imports)]
27960        use smallvec::SmallVec;
27961
27962        pub mod single_value {
27963            #[allow(unused_imports)]
27964            use cssparser::{Parser, BasicParseError};
27965            #[allow(unused_imports)]
27966            use crate::parser::{Parse, ParserContext};
27967            #[allow(unused_imports)]
27968            use crate::properties::ShorthandId;
27969            #[allow(unused_imports)]
27970            use selectors::parser::SelectorParseErrorKind;
27971            #[allow(unused_imports)]
27972            use style_traits::{ParseError, StyleParseErrorKind};
27973            #[allow(unused_imports)]
27974            use crate::values::computed::{Context, ToComputedValue};
27975            #[allow(unused_imports)]
27976            use crate::values::{computed, specified};
27977            
27978            
27979        #[allow(unused_imports)]
27980        use app_units::Au;
27981        #[allow(unused_imports)]
27982        use crate::values::specified::AllowQuirks;
27983        #[allow(unused_imports)]
27984        use crate::Zero;
27985        #[allow(unused_imports)]
27986        use smallvec::SmallVec;
27987        pub use crate::values::specified::AnimationPlayState as SpecifiedValue;
27988        pub mod computed_value {
27989            pub use crate::values::computed::AnimationPlayState as T;
27990        }
27991        #[inline] pub fn get_initial_value() -> computed_value::T { computed::AnimationPlayState::Running }
27992        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { computed::AnimationPlayState::Running }
27993        #[allow(unused_variables)]
27994        #[inline]
27995        pub fn parse<'i, 't>(
27996            context: &ParserContext,
27997            input: &mut Parser<'i, 't>,
27998        ) -> Result<SpecifiedValue, ParseError<'i>> {
27999            <specified::AnimationPlayState as crate::parser::Parse>::parse(context, input)
28000        }
28001    
28002        
28003        }
28004
28005        /// The definition of the computed value for animation-play-state.
28006        pub mod computed_value {
28007            #[allow(unused_imports)]
28008            use crate::values::animated::ToAnimatedValue;
28009            #[allow(unused_imports)]
28010            use crate::values::resolved::ToResolvedValue;
28011            pub use super::single_value::computed_value as single_value;
28012            pub use self::single_value::T as SingleComputedValue;
28013            use smallvec::SmallVec;
28014            use crate::values::computed::ComputedVecIter;
28015
28016            
28017
28018            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
28019            // something for transition-name, which is the only remaining user
28020            // of NotInitial.
28021            pub type UnderlyingList<T> =
28022                    SmallVec<[T; 1]>;
28023
28024            pub type UnderlyingOwnedList<T> =
28025                    SmallVec<[T; 1]>;
28026
28027
28028            /// The generic type defining the animated and resolved values for
28029            /// this property.
28030            ///
28031            /// Making this type generic allows the compiler to figure out the
28032            /// animated value for us, instead of having to implement it
28033            /// manually for every type we care about.
28034            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
28035            #[css(comma)]
28036            pub struct OwnedList<T>(
28037                #[css(iterable)]
28038                pub UnderlyingOwnedList<T>,
28039            );
28040
28041            /// The computed value for this property.
28042            pub type ComputedList = OwnedList<single_value::T>;
28043            pub use self::OwnedList as List;
28044
28045
28046
28047            /// The computed value, effectively a list of single values.
28048            pub use self::ComputedList as T;
28049
28050            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
28051        }
28052
28053        /// The specified value of animation-play-state.
28054        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
28055        #[css(comma)]
28056        pub struct SpecifiedValue(
28057            #[css(iterable)]
28058            pub crate::OwnedSlice<single_value::SpecifiedValue>,
28059        );
28060
28061        pub fn get_initial_value() -> computed_value::T {
28062                let mut v = SmallVec::new();
28063                v.push(single_value::get_initial_value());
28064                computed_value::List(v)
28065        }
28066
28067        pub fn parse<'i, 't>(
28068            context: &ParserContext,
28069            input: &mut Parser<'i, 't>,
28070        ) -> Result<SpecifiedValue, ParseError<'i>> {
28071            use style_traits::Separator;
28072
28073
28074            let v = style_traits::Comma::parse(input, |parser| {
28075                single_value::parse(context, parser)
28076            })?;
28077            Ok(SpecifiedValue(v.into()))
28078        }
28079
28080        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
28081
28082
28083        impl ToComputedValue for SpecifiedValue {
28084            type ComputedValue = computed_value::T;
28085
28086            #[inline]
28087            fn to_computed_value(&self, context: &Context) -> computed_value::T {
28088                use std::iter::FromIterator;
28089                computed_value::List(computed_value::UnderlyingList::from_iter(
28090                    self.0.iter().map(|i| i.to_computed_value(context))
28091                ))
28092            }
28093
28094            #[inline]
28095            fn from_computed_value(computed: &computed_value::T) -> Self {
28096                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
28097                SpecifiedValue(iter.collect())
28098            }
28099        }
28100    
28101        #[allow(unused_variables)]
28102        pub unsafe fn cascade_property(
28103            declaration: &PropertyDeclaration,
28104            context: &mut computed::Context,
28105        ) {
28106            context.for_non_inherited_property = true;
28107            debug_assert_eq!(
28108                declaration.id().as_longhand().unwrap(),
28109                LonghandId::AnimationPlayState,
28110            );
28111            let specified_value = match *declaration {
28112                PropertyDeclaration::CSSWideKeyword(ref wk) => {
28113                    match wk.keyword {
28114                        CSSWideKeyword::Unset |
28115                        CSSWideKeyword::Initial => {
28116                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
28117                        },
28118                        CSSWideKeyword::Inherit => {
28119                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
28120                                context.builder.inherit_animation_play_state();
28121                        }
28122                        CSSWideKeyword::RevertLayer |
28123                        CSSWideKeyword::Revert => {
28124                            declaration.debug_crash("Found revert/revert-layer not dealt with");
28125                        },
28126                    }
28127                    return;
28128                },
28129                #[cfg(debug_assertions)]
28130                PropertyDeclaration::WithVariables(..) => {
28131                    declaration.debug_crash("Found variables not substituted");
28132                    return;
28133                },
28134                _ => unsafe {
28135                    declaration.unchecked_value_as::<longhands::animation_play_state::SpecifiedValue>()
28136                },
28137            };
28138
28139
28140                let computed = specified_value.to_computed_value(context);
28141                context.builder.set_animation_play_state(computed)
28142        }
28143
28144        pub fn parse_declared<'i, 't>(
28145            context: &ParserContext,
28146            input: &mut Parser<'i, 't>,
28147        ) -> Result<PropertyDeclaration, ParseError<'i>> {
28148                parse(context, input)
28149                .map(PropertyDeclaration::AnimationPlayState)
28150        }
28151    }
28152
28153
28154
28155
28156
28157    
28158        
28159    
28160    
28161    /// https://drafts.csswg.org/css-animations/#propdef-animation-fill-mode
28162    pub mod animation_fill_mode {
28163        #[allow(unused_imports)]
28164        use cssparser::{Parser, BasicParseError, Token};
28165        #[allow(unused_imports)]
28166        use crate::parser::{Parse, ParserContext};
28167        #[allow(unused_imports)]
28168        use crate::properties::{UnparsedValue, ShorthandId};
28169        #[allow(unused_imports)]
28170        use crate::error_reporting::ParseErrorReporter;
28171        #[allow(unused_imports)]
28172        use crate::properties::longhands;
28173        #[allow(unused_imports)]
28174        use crate::properties::{LonghandId, LonghandIdSet};
28175        #[allow(unused_imports)]
28176        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
28177        #[allow(unused_imports)]
28178        use crate::properties::style_structs;
28179        #[allow(unused_imports)]
28180        use selectors::parser::SelectorParseErrorKind;
28181        #[allow(unused_imports)]
28182        use servo_arc::Arc;
28183        #[allow(unused_imports)]
28184        use style_traits::{ParseError, StyleParseErrorKind};
28185        #[allow(unused_imports)]
28186        use crate::values::computed::{Context, ToComputedValue};
28187        #[allow(unused_imports)]
28188        use crate::values::{computed, generics, specified};
28189        #[allow(unused_imports)]
28190        use crate::Atom;
28191        
28192        #[allow(unused_imports)]
28193        use smallvec::SmallVec;
28194
28195        pub mod single_value {
28196            #[allow(unused_imports)]
28197            use cssparser::{Parser, BasicParseError};
28198            #[allow(unused_imports)]
28199            use crate::parser::{Parse, ParserContext};
28200            #[allow(unused_imports)]
28201            use crate::properties::ShorthandId;
28202            #[allow(unused_imports)]
28203            use selectors::parser::SelectorParseErrorKind;
28204            #[allow(unused_imports)]
28205            use style_traits::{ParseError, StyleParseErrorKind};
28206            #[allow(unused_imports)]
28207            use crate::values::computed::{Context, ToComputedValue};
28208            #[allow(unused_imports)]
28209            use crate::values::{computed, specified};
28210            
28211            
28212        #[allow(unused_imports)]
28213        use app_units::Au;
28214        #[allow(unused_imports)]
28215        use crate::values::specified::AllowQuirks;
28216        #[allow(unused_imports)]
28217        use crate::Zero;
28218        #[allow(unused_imports)]
28219        use smallvec::SmallVec;
28220        pub use crate::values::specified::AnimationFillMode as SpecifiedValue;
28221        pub mod computed_value {
28222            pub use crate::values::computed::AnimationFillMode as T;
28223        }
28224        #[inline] pub fn get_initial_value() -> computed_value::T { computed::AnimationFillMode::None }
28225        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { computed::AnimationFillMode::None }
28226        #[allow(unused_variables)]
28227        #[inline]
28228        pub fn parse<'i, 't>(
28229            context: &ParserContext,
28230            input: &mut Parser<'i, 't>,
28231        ) -> Result<SpecifiedValue, ParseError<'i>> {
28232            <specified::AnimationFillMode as crate::parser::Parse>::parse(context, input)
28233        }
28234    
28235        
28236        }
28237
28238        /// The definition of the computed value for animation-fill-mode.
28239        pub mod computed_value {
28240            #[allow(unused_imports)]
28241            use crate::values::animated::ToAnimatedValue;
28242            #[allow(unused_imports)]
28243            use crate::values::resolved::ToResolvedValue;
28244            pub use super::single_value::computed_value as single_value;
28245            pub use self::single_value::T as SingleComputedValue;
28246            use smallvec::SmallVec;
28247            use crate::values::computed::ComputedVecIter;
28248
28249            
28250
28251            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
28252            // something for transition-name, which is the only remaining user
28253            // of NotInitial.
28254            pub type UnderlyingList<T> =
28255                    SmallVec<[T; 1]>;
28256
28257            pub type UnderlyingOwnedList<T> =
28258                    SmallVec<[T; 1]>;
28259
28260
28261            /// The generic type defining the animated and resolved values for
28262            /// this property.
28263            ///
28264            /// Making this type generic allows the compiler to figure out the
28265            /// animated value for us, instead of having to implement it
28266            /// manually for every type we care about.
28267            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
28268            #[css(comma)]
28269            pub struct OwnedList<T>(
28270                #[css(iterable)]
28271                pub UnderlyingOwnedList<T>,
28272            );
28273
28274            /// The computed value for this property.
28275            pub type ComputedList = OwnedList<single_value::T>;
28276            pub use self::OwnedList as List;
28277
28278
28279
28280            /// The computed value, effectively a list of single values.
28281            pub use self::ComputedList as T;
28282
28283            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
28284        }
28285
28286        /// The specified value of animation-fill-mode.
28287        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
28288        #[css(comma)]
28289        pub struct SpecifiedValue(
28290            #[css(iterable)]
28291            pub crate::OwnedSlice<single_value::SpecifiedValue>,
28292        );
28293
28294        pub fn get_initial_value() -> computed_value::T {
28295                let mut v = SmallVec::new();
28296                v.push(single_value::get_initial_value());
28297                computed_value::List(v)
28298        }
28299
28300        pub fn parse<'i, 't>(
28301            context: &ParserContext,
28302            input: &mut Parser<'i, 't>,
28303        ) -> Result<SpecifiedValue, ParseError<'i>> {
28304            use style_traits::Separator;
28305
28306
28307            let v = style_traits::Comma::parse(input, |parser| {
28308                single_value::parse(context, parser)
28309            })?;
28310            Ok(SpecifiedValue(v.into()))
28311        }
28312
28313        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
28314
28315
28316        impl ToComputedValue for SpecifiedValue {
28317            type ComputedValue = computed_value::T;
28318
28319            #[inline]
28320            fn to_computed_value(&self, context: &Context) -> computed_value::T {
28321                use std::iter::FromIterator;
28322                computed_value::List(computed_value::UnderlyingList::from_iter(
28323                    self.0.iter().map(|i| i.to_computed_value(context))
28324                ))
28325            }
28326
28327            #[inline]
28328            fn from_computed_value(computed: &computed_value::T) -> Self {
28329                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
28330                SpecifiedValue(iter.collect())
28331            }
28332        }
28333    
28334        #[allow(unused_variables)]
28335        pub unsafe fn cascade_property(
28336            declaration: &PropertyDeclaration,
28337            context: &mut computed::Context,
28338        ) {
28339            context.for_non_inherited_property = true;
28340            debug_assert_eq!(
28341                declaration.id().as_longhand().unwrap(),
28342                LonghandId::AnimationFillMode,
28343            );
28344            let specified_value = match *declaration {
28345                PropertyDeclaration::CSSWideKeyword(ref wk) => {
28346                    match wk.keyword {
28347                        CSSWideKeyword::Unset |
28348                        CSSWideKeyword::Initial => {
28349                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
28350                        },
28351                        CSSWideKeyword::Inherit => {
28352                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
28353                                context.builder.inherit_animation_fill_mode();
28354                        }
28355                        CSSWideKeyword::RevertLayer |
28356                        CSSWideKeyword::Revert => {
28357                            declaration.debug_crash("Found revert/revert-layer not dealt with");
28358                        },
28359                    }
28360                    return;
28361                },
28362                #[cfg(debug_assertions)]
28363                PropertyDeclaration::WithVariables(..) => {
28364                    declaration.debug_crash("Found variables not substituted");
28365                    return;
28366                },
28367                _ => unsafe {
28368                    declaration.unchecked_value_as::<longhands::animation_fill_mode::SpecifiedValue>()
28369                },
28370            };
28371
28372
28373                let computed = specified_value.to_computed_value(context);
28374                context.builder.set_animation_fill_mode(computed)
28375        }
28376
28377        pub fn parse_declared<'i, 't>(
28378            context: &ParserContext,
28379            input: &mut Parser<'i, 't>,
28380        ) -> Result<PropertyDeclaration, ParseError<'i>> {
28381                parse(context, input)
28382                .map(PropertyDeclaration::AnimationFillMode)
28383        }
28384    }
28385
28386
28387
28388
28389
28390    
28391        
28392    
28393    
28394    /// https://drafts.csswg.org/css-animations-2/#animation-composition
28395    pub mod animation_composition {
28396        #[allow(unused_imports)]
28397        use cssparser::{Parser, BasicParseError, Token};
28398        #[allow(unused_imports)]
28399        use crate::parser::{Parse, ParserContext};
28400        #[allow(unused_imports)]
28401        use crate::properties::{UnparsedValue, ShorthandId};
28402        #[allow(unused_imports)]
28403        use crate::error_reporting::ParseErrorReporter;
28404        #[allow(unused_imports)]
28405        use crate::properties::longhands;
28406        #[allow(unused_imports)]
28407        use crate::properties::{LonghandId, LonghandIdSet};
28408        #[allow(unused_imports)]
28409        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
28410        #[allow(unused_imports)]
28411        use crate::properties::style_structs;
28412        #[allow(unused_imports)]
28413        use selectors::parser::SelectorParseErrorKind;
28414        #[allow(unused_imports)]
28415        use servo_arc::Arc;
28416        #[allow(unused_imports)]
28417        use style_traits::{ParseError, StyleParseErrorKind};
28418        #[allow(unused_imports)]
28419        use crate::values::computed::{Context, ToComputedValue};
28420        #[allow(unused_imports)]
28421        use crate::values::{computed, generics, specified};
28422        #[allow(unused_imports)]
28423        use crate::Atom;
28424        
28425        #[allow(unused_imports)]
28426        use smallvec::SmallVec;
28427
28428        pub mod single_value {
28429            #[allow(unused_imports)]
28430            use cssparser::{Parser, BasicParseError};
28431            #[allow(unused_imports)]
28432            use crate::parser::{Parse, ParserContext};
28433            #[allow(unused_imports)]
28434            use crate::properties::ShorthandId;
28435            #[allow(unused_imports)]
28436            use selectors::parser::SelectorParseErrorKind;
28437            #[allow(unused_imports)]
28438            use style_traits::{ParseError, StyleParseErrorKind};
28439            #[allow(unused_imports)]
28440            use crate::values::computed::{Context, ToComputedValue};
28441            #[allow(unused_imports)]
28442            use crate::values::{computed, specified};
28443            
28444            
28445        #[allow(unused_imports)]
28446        use app_units::Au;
28447        #[allow(unused_imports)]
28448        use crate::values::specified::AllowQuirks;
28449        #[allow(unused_imports)]
28450        use crate::Zero;
28451        #[allow(unused_imports)]
28452        use smallvec::SmallVec;
28453        pub use crate::values::specified::AnimationComposition as SpecifiedValue;
28454        pub mod computed_value {
28455            pub use crate::values::computed::AnimationComposition as T;
28456        }
28457        #[inline] pub fn get_initial_value() -> computed_value::T { computed::AnimationComposition::Replace }
28458        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { computed::AnimationComposition::Replace }
28459        #[allow(unused_variables)]
28460        #[inline]
28461        pub fn parse<'i, 't>(
28462            context: &ParserContext,
28463            input: &mut Parser<'i, 't>,
28464        ) -> Result<SpecifiedValue, ParseError<'i>> {
28465            <specified::AnimationComposition as crate::parser::Parse>::parse(context, input)
28466        }
28467    
28468        
28469        }
28470
28471        /// The definition of the computed value for animation-composition.
28472        pub mod computed_value {
28473            #[allow(unused_imports)]
28474            use crate::values::animated::ToAnimatedValue;
28475            #[allow(unused_imports)]
28476            use crate::values::resolved::ToResolvedValue;
28477            pub use super::single_value::computed_value as single_value;
28478            pub use self::single_value::T as SingleComputedValue;
28479            use smallvec::SmallVec;
28480            use crate::values::computed::ComputedVecIter;
28481
28482            
28483
28484            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
28485            // something for transition-name, which is the only remaining user
28486            // of NotInitial.
28487            pub type UnderlyingList<T> =
28488                    SmallVec<[T; 1]>;
28489
28490            pub type UnderlyingOwnedList<T> =
28491                    SmallVec<[T; 1]>;
28492
28493
28494            /// The generic type defining the animated and resolved values for
28495            /// this property.
28496            ///
28497            /// Making this type generic allows the compiler to figure out the
28498            /// animated value for us, instead of having to implement it
28499            /// manually for every type we care about.
28500            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
28501            #[css(comma)]
28502            pub struct OwnedList<T>(
28503                #[css(iterable)]
28504                pub UnderlyingOwnedList<T>,
28505            );
28506
28507            /// The computed value for this property.
28508            pub type ComputedList = OwnedList<single_value::T>;
28509            pub use self::OwnedList as List;
28510
28511
28512
28513            /// The computed value, effectively a list of single values.
28514            pub use self::ComputedList as T;
28515
28516            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
28517        }
28518
28519        /// The specified value of animation-composition.
28520        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
28521        #[css(comma)]
28522        pub struct SpecifiedValue(
28523            #[css(iterable)]
28524            pub crate::OwnedSlice<single_value::SpecifiedValue>,
28525        );
28526
28527        pub fn get_initial_value() -> computed_value::T {
28528                let mut v = SmallVec::new();
28529                v.push(single_value::get_initial_value());
28530                computed_value::List(v)
28531        }
28532
28533        pub fn parse<'i, 't>(
28534            context: &ParserContext,
28535            input: &mut Parser<'i, 't>,
28536        ) -> Result<SpecifiedValue, ParseError<'i>> {
28537            use style_traits::Separator;
28538
28539
28540            let v = style_traits::Comma::parse(input, |parser| {
28541                single_value::parse(context, parser)
28542            })?;
28543            Ok(SpecifiedValue(v.into()))
28544        }
28545
28546        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
28547
28548
28549        impl ToComputedValue for SpecifiedValue {
28550            type ComputedValue = computed_value::T;
28551
28552            #[inline]
28553            fn to_computed_value(&self, context: &Context) -> computed_value::T {
28554                use std::iter::FromIterator;
28555                computed_value::List(computed_value::UnderlyingList::from_iter(
28556                    self.0.iter().map(|i| i.to_computed_value(context))
28557                ))
28558            }
28559
28560            #[inline]
28561            fn from_computed_value(computed: &computed_value::T) -> Self {
28562                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
28563                SpecifiedValue(iter.collect())
28564            }
28565        }
28566    
28567        #[allow(unused_variables)]
28568        pub unsafe fn cascade_property(
28569            declaration: &PropertyDeclaration,
28570            context: &mut computed::Context,
28571        ) {
28572            context.for_non_inherited_property = true;
28573            debug_assert_eq!(
28574                declaration.id().as_longhand().unwrap(),
28575                LonghandId::AnimationComposition,
28576            );
28577            let specified_value = match *declaration {
28578                PropertyDeclaration::CSSWideKeyword(ref wk) => {
28579                    match wk.keyword {
28580                        CSSWideKeyword::Unset |
28581                        CSSWideKeyword::Initial => {
28582                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
28583                        },
28584                        CSSWideKeyword::Inherit => {
28585                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
28586                                context.builder.inherit_animation_composition();
28587                        }
28588                        CSSWideKeyword::RevertLayer |
28589                        CSSWideKeyword::Revert => {
28590                            declaration.debug_crash("Found revert/revert-layer not dealt with");
28591                        },
28592                    }
28593                    return;
28594                },
28595                #[cfg(debug_assertions)]
28596                PropertyDeclaration::WithVariables(..) => {
28597                    declaration.debug_crash("Found variables not substituted");
28598                    return;
28599                },
28600                _ => unsafe {
28601                    declaration.unchecked_value_as::<longhands::animation_composition::SpecifiedValue>()
28602                },
28603            };
28604
28605
28606                let computed = specified_value.to_computed_value(context);
28607                context.builder.set_animation_composition(computed)
28608        }
28609
28610        pub fn parse_declared<'i, 't>(
28611            context: &ParserContext,
28612            input: &mut Parser<'i, 't>,
28613        ) -> Result<PropertyDeclaration, ParseError<'i>> {
28614                parse(context, input)
28615                .map(PropertyDeclaration::AnimationComposition)
28616        }
28617    }
28618
28619
28620
28621
28622
28623    
28624        
28625    
28626    
28627    /// https://drafts.csswg.org/css-animations/#propdef-animation-delay
28628    pub mod animation_delay {
28629        #[allow(unused_imports)]
28630        use cssparser::{Parser, BasicParseError, Token};
28631        #[allow(unused_imports)]
28632        use crate::parser::{Parse, ParserContext};
28633        #[allow(unused_imports)]
28634        use crate::properties::{UnparsedValue, ShorthandId};
28635        #[allow(unused_imports)]
28636        use crate::error_reporting::ParseErrorReporter;
28637        #[allow(unused_imports)]
28638        use crate::properties::longhands;
28639        #[allow(unused_imports)]
28640        use crate::properties::{LonghandId, LonghandIdSet};
28641        #[allow(unused_imports)]
28642        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
28643        #[allow(unused_imports)]
28644        use crate::properties::style_structs;
28645        #[allow(unused_imports)]
28646        use selectors::parser::SelectorParseErrorKind;
28647        #[allow(unused_imports)]
28648        use servo_arc::Arc;
28649        #[allow(unused_imports)]
28650        use style_traits::{ParseError, StyleParseErrorKind};
28651        #[allow(unused_imports)]
28652        use crate::values::computed::{Context, ToComputedValue};
28653        #[allow(unused_imports)]
28654        use crate::values::{computed, generics, specified};
28655        #[allow(unused_imports)]
28656        use crate::Atom;
28657        
28658        #[allow(unused_imports)]
28659        use smallvec::SmallVec;
28660
28661        pub mod single_value {
28662            #[allow(unused_imports)]
28663            use cssparser::{Parser, BasicParseError};
28664            #[allow(unused_imports)]
28665            use crate::parser::{Parse, ParserContext};
28666            #[allow(unused_imports)]
28667            use crate::properties::ShorthandId;
28668            #[allow(unused_imports)]
28669            use selectors::parser::SelectorParseErrorKind;
28670            #[allow(unused_imports)]
28671            use style_traits::{ParseError, StyleParseErrorKind};
28672            #[allow(unused_imports)]
28673            use crate::values::computed::{Context, ToComputedValue};
28674            #[allow(unused_imports)]
28675            use crate::values::{computed, specified};
28676            
28677            
28678        #[allow(unused_imports)]
28679        use app_units::Au;
28680        #[allow(unused_imports)]
28681        use crate::values::specified::AllowQuirks;
28682        #[allow(unused_imports)]
28683        use crate::Zero;
28684        #[allow(unused_imports)]
28685        use smallvec::SmallVec;
28686        pub use crate::values::specified::Time as SpecifiedValue;
28687        pub mod computed_value {
28688            pub use crate::values::computed::Time as T;
28689        }
28690        #[inline] pub fn get_initial_value() -> computed_value::T { computed::Time::zero() }
28691        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::Time::zero() }
28692        #[allow(unused_variables)]
28693        #[inline]
28694        pub fn parse<'i, 't>(
28695            context: &ParserContext,
28696            input: &mut Parser<'i, 't>,
28697        ) -> Result<SpecifiedValue, ParseError<'i>> {
28698            <specified::Time as crate::parser::Parse>::parse(context, input)
28699        }
28700    
28701        
28702        }
28703
28704        /// The definition of the computed value for animation-delay.
28705        pub mod computed_value {
28706            #[allow(unused_imports)]
28707            use crate::values::animated::ToAnimatedValue;
28708            #[allow(unused_imports)]
28709            use crate::values::resolved::ToResolvedValue;
28710            pub use super::single_value::computed_value as single_value;
28711            pub use self::single_value::T as SingleComputedValue;
28712            use smallvec::SmallVec;
28713            use crate::values::computed::ComputedVecIter;
28714
28715            
28716
28717            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
28718            // something for transition-name, which is the only remaining user
28719            // of NotInitial.
28720            pub type UnderlyingList<T> =
28721                    SmallVec<[T; 1]>;
28722
28723            pub type UnderlyingOwnedList<T> =
28724                    SmallVec<[T; 1]>;
28725
28726
28727            /// The generic type defining the animated and resolved values for
28728            /// this property.
28729            ///
28730            /// Making this type generic allows the compiler to figure out the
28731            /// animated value for us, instead of having to implement it
28732            /// manually for every type we care about.
28733            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
28734            #[css(comma)]
28735            pub struct OwnedList<T>(
28736                #[css(iterable)]
28737                pub UnderlyingOwnedList<T>,
28738            );
28739
28740            /// The computed value for this property.
28741            pub type ComputedList = OwnedList<single_value::T>;
28742            pub use self::OwnedList as List;
28743
28744
28745
28746            /// The computed value, effectively a list of single values.
28747            pub use self::ComputedList as T;
28748
28749            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
28750        }
28751
28752        /// The specified value of animation-delay.
28753        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
28754        #[css(comma)]
28755        pub struct SpecifiedValue(
28756            #[css(iterable)]
28757            pub crate::OwnedSlice<single_value::SpecifiedValue>,
28758        );
28759
28760        pub fn get_initial_value() -> computed_value::T {
28761                let mut v = SmallVec::new();
28762                v.push(single_value::get_initial_value());
28763                computed_value::List(v)
28764        }
28765
28766        pub fn parse<'i, 't>(
28767            context: &ParserContext,
28768            input: &mut Parser<'i, 't>,
28769        ) -> Result<SpecifiedValue, ParseError<'i>> {
28770            use style_traits::Separator;
28771
28772
28773            let v = style_traits::Comma::parse(input, |parser| {
28774                single_value::parse(context, parser)
28775            })?;
28776            Ok(SpecifiedValue(v.into()))
28777        }
28778
28779        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
28780
28781
28782        impl ToComputedValue for SpecifiedValue {
28783            type ComputedValue = computed_value::T;
28784
28785            #[inline]
28786            fn to_computed_value(&self, context: &Context) -> computed_value::T {
28787                use std::iter::FromIterator;
28788                computed_value::List(computed_value::UnderlyingList::from_iter(
28789                    self.0.iter().map(|i| i.to_computed_value(context))
28790                ))
28791            }
28792
28793            #[inline]
28794            fn from_computed_value(computed: &computed_value::T) -> Self {
28795                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
28796                SpecifiedValue(iter.collect())
28797            }
28798        }
28799    
28800        #[allow(unused_variables)]
28801        pub unsafe fn cascade_property(
28802            declaration: &PropertyDeclaration,
28803            context: &mut computed::Context,
28804        ) {
28805            context.for_non_inherited_property = true;
28806            debug_assert_eq!(
28807                declaration.id().as_longhand().unwrap(),
28808                LonghandId::AnimationDelay,
28809            );
28810            let specified_value = match *declaration {
28811                PropertyDeclaration::CSSWideKeyword(ref wk) => {
28812                    match wk.keyword {
28813                        CSSWideKeyword::Unset |
28814                        CSSWideKeyword::Initial => {
28815                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
28816                        },
28817                        CSSWideKeyword::Inherit => {
28818                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
28819                                context.builder.inherit_animation_delay();
28820                        }
28821                        CSSWideKeyword::RevertLayer |
28822                        CSSWideKeyword::Revert => {
28823                            declaration.debug_crash("Found revert/revert-layer not dealt with");
28824                        },
28825                    }
28826                    return;
28827                },
28828                #[cfg(debug_assertions)]
28829                PropertyDeclaration::WithVariables(..) => {
28830                    declaration.debug_crash("Found variables not substituted");
28831                    return;
28832                },
28833                _ => unsafe {
28834                    declaration.unchecked_value_as::<longhands::animation_delay::SpecifiedValue>()
28835                },
28836            };
28837
28838
28839                let computed = specified_value.to_computed_value(context);
28840                context.builder.set_animation_delay(computed)
28841        }
28842
28843        pub fn parse_declared<'i, 't>(
28844            context: &ParserContext,
28845            input: &mut Parser<'i, 't>,
28846        ) -> Result<PropertyDeclaration, ParseError<'i>> {
28847                parse(context, input)
28848                .map(PropertyDeclaration::AnimationDelay)
28849        }
28850    }
28851
28852
28853
28854
28855
28856    
28857        
28858    
28859    
28860    /// https://drafts.csswg.org/css-animations-2/#propdef-animation-timeline
28861    pub mod animation_timeline {
28862        #[allow(unused_imports)]
28863        use cssparser::{Parser, BasicParseError, Token};
28864        #[allow(unused_imports)]
28865        use crate::parser::{Parse, ParserContext};
28866        #[allow(unused_imports)]
28867        use crate::properties::{UnparsedValue, ShorthandId};
28868        #[allow(unused_imports)]
28869        use crate::error_reporting::ParseErrorReporter;
28870        #[allow(unused_imports)]
28871        use crate::properties::longhands;
28872        #[allow(unused_imports)]
28873        use crate::properties::{LonghandId, LonghandIdSet};
28874        #[allow(unused_imports)]
28875        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
28876        #[allow(unused_imports)]
28877        use crate::properties::style_structs;
28878        #[allow(unused_imports)]
28879        use selectors::parser::SelectorParseErrorKind;
28880        #[allow(unused_imports)]
28881        use servo_arc::Arc;
28882        #[allow(unused_imports)]
28883        use style_traits::{ParseError, StyleParseErrorKind};
28884        #[allow(unused_imports)]
28885        use crate::values::computed::{Context, ToComputedValue};
28886        #[allow(unused_imports)]
28887        use crate::values::{computed, generics, specified};
28888        #[allow(unused_imports)]
28889        use crate::Atom;
28890        
28891        #[allow(unused_imports)]
28892        use smallvec::SmallVec;
28893
28894        pub mod single_value {
28895            #[allow(unused_imports)]
28896            use cssparser::{Parser, BasicParseError};
28897            #[allow(unused_imports)]
28898            use crate::parser::{Parse, ParserContext};
28899            #[allow(unused_imports)]
28900            use crate::properties::ShorthandId;
28901            #[allow(unused_imports)]
28902            use selectors::parser::SelectorParseErrorKind;
28903            #[allow(unused_imports)]
28904            use style_traits::{ParseError, StyleParseErrorKind};
28905            #[allow(unused_imports)]
28906            use crate::values::computed::{Context, ToComputedValue};
28907            #[allow(unused_imports)]
28908            use crate::values::{computed, specified};
28909            
28910            
28911        #[allow(unused_imports)]
28912        use app_units::Au;
28913        #[allow(unused_imports)]
28914        use crate::values::specified::AllowQuirks;
28915        #[allow(unused_imports)]
28916        use crate::Zero;
28917        #[allow(unused_imports)]
28918        use smallvec::SmallVec;
28919        pub use crate::values::specified::AnimationTimeline as SpecifiedValue;
28920        pub mod computed_value {
28921            pub use crate::values::computed::AnimationTimeline as T;
28922        }
28923        #[inline] pub fn get_initial_value() -> computed_value::T { computed::AnimationTimeline::auto() }
28924        #[inline] pub fn get_initial_specified_value() -> SpecifiedValue { specified::AnimationTimeline::auto() }
28925        #[allow(unused_variables)]
28926        #[inline]
28927        pub fn parse<'i, 't>(
28928            context: &ParserContext,
28929            input: &mut Parser<'i, 't>,
28930        ) -> Result<SpecifiedValue, ParseError<'i>> {
28931            <specified::AnimationTimeline as crate::parser::Parse>::parse(context, input)
28932        }
28933    
28934        
28935        }
28936
28937        /// The definition of the computed value for animation-timeline.
28938        pub mod computed_value {
28939            #[allow(unused_imports)]
28940            use crate::values::animated::ToAnimatedValue;
28941            #[allow(unused_imports)]
28942            use crate::values::resolved::ToResolvedValue;
28943            pub use super::single_value::computed_value as single_value;
28944            pub use self::single_value::T as SingleComputedValue;
28945            use smallvec::SmallVec;
28946            use crate::values::computed::ComputedVecIter;
28947
28948            
28949
28950            // FIXME(emilio): Add an OwnedNonEmptySlice type, and figure out
28951            // something for transition-name, which is the only remaining user
28952            // of NotInitial.
28953            pub type UnderlyingList<T> =
28954                    SmallVec<[T; 1]>;
28955
28956            pub type UnderlyingOwnedList<T> =
28957                    SmallVec<[T; 1]>;
28958
28959
28960            /// The generic type defining the animated and resolved values for
28961            /// this property.
28962            ///
28963            /// Making this type generic allows the compiler to figure out the
28964            /// animated value for us, instead of having to implement it
28965            /// manually for every type we care about.
28966            #[derive(Clone, Debug, MallocSizeOf, PartialEq, ToAnimatedValue, ToResolvedValue, ToCss)]
28967            #[css(comma)]
28968            pub struct OwnedList<T>(
28969                #[css(iterable)]
28970                pub UnderlyingOwnedList<T>,
28971            );
28972
28973            /// The computed value for this property.
28974            pub type ComputedList = OwnedList<single_value::T>;
28975            pub use self::OwnedList as List;
28976
28977
28978
28979            /// The computed value, effectively a list of single values.
28980            pub use self::ComputedList as T;
28981
28982            pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;
28983        }
28984
28985        /// The specified value of animation-timeline.
28986        #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
28987        #[css(comma)]
28988        pub struct SpecifiedValue(
28989            #[css(iterable)]
28990            pub crate::OwnedSlice<single_value::SpecifiedValue>,
28991        );
28992
28993        pub fn get_initial_value() -> computed_value::T {
28994                let mut v = SmallVec::new();
28995                v.push(single_value::get_initial_value());
28996                computed_value::List(v)
28997        }
28998
28999        pub fn parse<'i, 't>(
29000            context: &ParserContext,
29001            input: &mut Parser<'i, 't>,
29002        ) -> Result<SpecifiedValue, ParseError<'i>> {
29003            use style_traits::Separator;
29004
29005
29006            let v = style_traits::Comma::parse(input, |parser| {
29007                single_value::parse(context, parser)
29008            })?;
29009            Ok(SpecifiedValue(v.into()))
29010        }
29011
29012        pub use self::single_value::SpecifiedValue as SingleSpecifiedValue;
29013
29014
29015        impl ToComputedValue for SpecifiedValue {
29016            type ComputedValue = computed_value::T;
29017
29018            #[inline]
29019            fn to_computed_value(&self, context: &Context) -> computed_value::T {
29020                use std::iter::FromIterator;
29021                computed_value::List(computed_value::UnderlyingList::from_iter(
29022                    self.0.iter().map(|i| i.to_computed_value(context))
29023                ))
29024            }
29025
29026            #[inline]
29027            fn from_computed_value(computed: &computed_value::T) -> Self {
29028                let iter = computed.0.iter().map(ToComputedValue::from_computed_value);
29029                SpecifiedValue(iter.collect())
29030            }
29031        }
29032    
29033        #[allow(unused_variables)]
29034        pub unsafe fn cascade_property(
29035            declaration: &PropertyDeclaration,
29036            context: &mut computed::Context,
29037        ) {
29038            context.for_non_inherited_property = true;
29039            debug_assert_eq!(
29040                declaration.id().as_longhand().unwrap(),
29041                LonghandId::AnimationTimeline,
29042            );
29043            let specified_value = match *declaration {
29044                PropertyDeclaration::CSSWideKeyword(ref wk) => {
29045                    match wk.keyword {
29046                        CSSWideKeyword::Unset |
29047                        CSSWideKeyword::Initial => {
29048                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
29049                        },
29050                        CSSWideKeyword::Inherit => {
29051                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
29052                                context.builder.inherit_animation_timeline();
29053                        }
29054                        CSSWideKeyword::RevertLayer |
29055                        CSSWideKeyword::Revert => {
29056                            declaration.debug_crash("Found revert/revert-layer not dealt with");
29057                        },
29058                    }
29059                    return;
29060                },
29061                #[cfg(debug_assertions)]
29062                PropertyDeclaration::WithVariables(..) => {
29063                    declaration.debug_crash("Found variables not substituted");
29064                    return;
29065                },
29066                _ => unsafe {
29067                    declaration.unchecked_value_as::<longhands::animation_timeline::SpecifiedValue>()
29068                },
29069            };
29070
29071
29072                let computed = specified_value.to_computed_value(context);
29073                context.builder.set_animation_timeline(computed)
29074        }
29075
29076        pub fn parse_declared<'i, 't>(
29077            context: &ParserContext,
29078            input: &mut Parser<'i, 't>,
29079        ) -> Result<PropertyDeclaration, ParseError<'i>> {
29080                parse(context, input)
29081                .map(PropertyDeclaration::AnimationTimeline)
29082        }
29083    }
29084
29085
29086
29087
29088
29089    
29090        
29091    
29092    
29093
29094
29095
29096
29097    
29098        
29099    
29100    
29101
29102
29103
29104
29105    
29106        
29107    
29108    
29109
29110
29111
29112
29113    
29114        
29115    
29116    
29117
29118
29119
29120
29121    
29122        
29123    
29124    
29125
29126
29127
29128
29129    
29130
29131    
29132        
29133    
29134
29135
29136
29137    
29138        
29139    
29140    /// https://drafts.csswg.org/css-view-transitions-1/#view-transition-name-prop
29141    pub mod view_transition_name {
29142        #[allow(unused_imports)]
29143        use cssparser::{Parser, BasicParseError, Token};
29144        #[allow(unused_imports)]
29145        use crate::parser::{Parse, ParserContext};
29146        #[allow(unused_imports)]
29147        use crate::properties::{UnparsedValue, ShorthandId};
29148        #[allow(unused_imports)]
29149        use crate::error_reporting::ParseErrorReporter;
29150        #[allow(unused_imports)]
29151        use crate::properties::longhands;
29152        #[allow(unused_imports)]
29153        use crate::properties::{LonghandId, LonghandIdSet};
29154        #[allow(unused_imports)]
29155        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
29156        #[allow(unused_imports)]
29157        use crate::properties::style_structs;
29158        #[allow(unused_imports)]
29159        use selectors::parser::SelectorParseErrorKind;
29160        #[allow(unused_imports)]
29161        use servo_arc::Arc;
29162        #[allow(unused_imports)]
29163        use style_traits::{ParseError, StyleParseErrorKind};
29164        #[allow(unused_imports)]
29165        use crate::values::computed::{Context, ToComputedValue};
29166        #[allow(unused_imports)]
29167        use crate::values::{computed, generics, specified};
29168        #[allow(unused_imports)]
29169        use crate::Atom;
29170        
29171            
29172        #[allow(unused_imports)]
29173        use app_units::Au;
29174        #[allow(unused_imports)]
29175        use crate::values::specified::AllowQuirks;
29176        #[allow(unused_imports)]
29177        use crate::Zero;
29178        #[allow(unused_imports)]
29179        use smallvec::SmallVec;
29180        pub use crate::values::specified::ViewTransitionName as SpecifiedValue;
29181        pub mod computed_value {
29182            pub use crate::values::computed::ViewTransitionName as T;
29183        }
29184        #[inline] pub fn get_initial_value() -> computed_value::T { computed::ViewTransitionName::none() }
29185        #[allow(unused_variables)]
29186        #[inline]
29187        pub fn parse<'i, 't>(
29188            context: &ParserContext,
29189            input: &mut Parser<'i, 't>,
29190        ) -> Result<SpecifiedValue, ParseError<'i>> {
29191            <specified::ViewTransitionName as crate::parser::Parse>::parse(context, input)
29192        }
29193    
29194        
29195        #[allow(unused_variables)]
29196        pub unsafe fn cascade_property(
29197            declaration: &PropertyDeclaration,
29198            context: &mut computed::Context,
29199        ) {
29200            context.for_non_inherited_property = true;
29201            debug_assert_eq!(
29202                declaration.id().as_longhand().unwrap(),
29203                LonghandId::ViewTransitionName,
29204            );
29205            let specified_value = match *declaration {
29206                PropertyDeclaration::CSSWideKeyword(ref wk) => {
29207                    match wk.keyword {
29208                        CSSWideKeyword::Unset |
29209                        CSSWideKeyword::Initial => {
29210                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
29211                        },
29212                        CSSWideKeyword::Inherit => {
29213                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
29214                                context.builder.inherit_view_transition_name();
29215                        }
29216                        CSSWideKeyword::RevertLayer |
29217                        CSSWideKeyword::Revert => {
29218                            declaration.debug_crash("Found revert/revert-layer not dealt with");
29219                        },
29220                    }
29221                    return;
29222                },
29223                #[cfg(debug_assertions)]
29224                PropertyDeclaration::WithVariables(..) => {
29225                    declaration.debug_crash("Found variables not substituted");
29226                    return;
29227                },
29228                _ => unsafe {
29229                    declaration.unchecked_value_as::<crate::values::specified::ViewTransitionName>()
29230                },
29231            };
29232
29233
29234                let computed = specified_value.to_computed_value(context);
29235                context.builder.set_view_transition_name(computed)
29236        }
29237
29238        pub fn parse_declared<'i, 't>(
29239            context: &ParserContext,
29240            input: &mut Parser<'i, 't>,
29241        ) -> Result<PropertyDeclaration, ParseError<'i>> {
29242                parse(context, input)
29243                .map(PropertyDeclaration::ViewTransitionName)
29244        }
29245    }
29246
29247
29248
29249
29250    
29251        
29252    
29253    /// https://drafts.csswg.org/css-view-transitions-2/#view-transition-class-prop
29254    pub mod view_transition_class {
29255        #[allow(unused_imports)]
29256        use cssparser::{Parser, BasicParseError, Token};
29257        #[allow(unused_imports)]
29258        use crate::parser::{Parse, ParserContext};
29259        #[allow(unused_imports)]
29260        use crate::properties::{UnparsedValue, ShorthandId};
29261        #[allow(unused_imports)]
29262        use crate::error_reporting::ParseErrorReporter;
29263        #[allow(unused_imports)]
29264        use crate::properties::longhands;
29265        #[allow(unused_imports)]
29266        use crate::properties::{LonghandId, LonghandIdSet};
29267        #[allow(unused_imports)]
29268        use crate::properties::{CSSWideKeyword, ComputedValues, PropertyDeclaration};
29269        #[allow(unused_imports)]
29270        use crate::properties::style_structs;
29271        #[allow(unused_imports)]
29272        use selectors::parser::SelectorParseErrorKind;
29273        #[allow(unused_imports)]
29274        use servo_arc::Arc;
29275        #[allow(unused_imports)]
29276        use style_traits::{ParseError, StyleParseErrorKind};
29277        #[allow(unused_imports)]
29278        use crate::values::computed::{Context, ToComputedValue};
29279        #[allow(unused_imports)]
29280        use crate::values::{computed, generics, specified};
29281        #[allow(unused_imports)]
29282        use crate::Atom;
29283        
29284            
29285        #[allow(unused_imports)]
29286        use app_units::Au;
29287        #[allow(unused_imports)]
29288        use crate::values::specified::AllowQuirks;
29289        #[allow(unused_imports)]
29290        use crate::Zero;
29291        #[allow(unused_imports)]
29292        use smallvec::SmallVec;
29293        pub use crate::values::specified::ViewTransitionClass as SpecifiedValue;
29294        pub mod computed_value {
29295            pub use crate::values::computed::ViewTransitionClass as T;
29296        }
29297        #[inline] pub fn get_initial_value() -> computed_value::T { computed::ViewTransitionClass::none() }
29298        #[allow(unused_variables)]
29299        #[inline]
29300        pub fn parse<'i, 't>(
29301            context: &ParserContext,
29302            input: &mut Parser<'i, 't>,
29303        ) -> Result<SpecifiedValue, ParseError<'i>> {
29304            <specified::ViewTransitionClass as crate::parser::Parse>::parse(context, input)
29305        }
29306    
29307        
29308        #[allow(unused_variables)]
29309        pub unsafe fn cascade_property(
29310            declaration: &PropertyDeclaration,
29311            context: &mut computed::Context,
29312        ) {
29313            context.for_non_inherited_property = true;
29314            debug_assert_eq!(
29315                declaration.id().as_longhand().unwrap(),
29316                LonghandId::ViewTransitionClass,
29317            );
29318            let specified_value = match *declaration {
29319                PropertyDeclaration::CSSWideKeyword(ref wk) => {
29320                    match wk.keyword {
29321                        CSSWideKeyword::Unset |
29322                        CSSWideKeyword::Initial => {
29323                                declaration.debug_crash("Unexpected initial or unset for non-inherited property");
29324                        },
29325                        CSSWideKeyword::Inherit => {
29326                                context.rule_cache_conditions.borrow_mut().set_uncacheable();
29327                                context.builder.inherit_view_transition_class();
29328                        }
29329                        CSSWideKeyword::RevertLayer |
29330                        CSSWideKeyword::Revert => {
29331                            declaration.debug_crash("Found revert/revert-layer not dealt with");
29332                        },
29333                    }
29334                    return;
29335                },
29336                #[cfg(debug_assertions)]
29337                PropertyDeclaration::WithVariables(..) => {
29338                    declaration.debug_crash("Found variables not substituted");
29339                    return;
29340                },
29341                _ => unsafe {
29342                    declaration.unchecked_value_as::<crate::values::specified::ViewTransitionClass>()
29343                },
29344            };
29345
29346
29347                let computed = specified_value.to_computed_value(context);
29348                context.builder.set_view_transition_class(computed)
29349        }
29350
29351        pub fn parse_declared<'i, 't>(
29352            context: &ParserContext,
29353            input: &mut Parser<'i, 't>,
29354        ) -> Result<PropertyDeclaration, ParseError<'i>> {
29355                parse(context, input)
29356                .map(PropertyDeclaration::ViewTransitionClass)
29357        }
29358    }
29359
29360
29361
29362    
29363    /* This Source Code Form is subject to the terms of the Mozilla Public
29364 * License, v. 2.0. If a copy of the MPL was not distributed with this
29365 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
29366
29367
29368
29369
29370    
29371
29372    
29373        
29374    
29375
29376
29377
29378    
29379
29380    
29381        
29382    
29383
29384
29385
29386    
29387        
29388    
29389
29390
29391
29392    
29393
29394    
29395        
29396    
29397
29398
29399
29400    
29401
29402    
29403        
29404    
29405
29406
29407// NOTE(heycam): Odd that the initial value is 1 yet 0 is a valid value. There
29408// are uses of `-moz-box-ordinal-group: 0` in the tree, too.
29409
29410    
29411        
29412    
29413
29414
29415}
29416
29417
29418
29419
29420macro_rules! unwrap_or_initial {
29421    ($prop: ident) => (unwrap_or_initial!($prop, $prop));
29422    ($prop: ident, $expr: expr) =>
29423        ($expr.unwrap_or_else(|| $prop::get_initial_specified_value()));
29424}
29425
29426/// A module with code for all the shorthand css properties, and a few
29427/// serialization helpers.
29428#[allow(missing_docs)]
29429pub mod shorthands {
29430    use cssparser::Parser;
29431    use crate::parser::{Parse, ParserContext};
29432    use style_traits::{ParseError, StyleParseErrorKind};
29433    use crate::values::specified;
29434
29435    /* This Source Code Form is subject to the terms of the Mozilla Public
29436 * License, v. 2.0. If a copy of the MPL was not distributed with this
29437 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
29438
29439
29440
29441// TODO: other background-* properties
29442
29443
29444    /// https://drafts.csswg.org/css-backgrounds/#the-background
29445    pub mod background {
29446        use cssparser::Parser;
29447        use crate::parser::ParserContext;
29448        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
29449        #[allow(unused_imports)]
29450        use selectors::parser::SelectorParseErrorKind;
29451        #[allow(unused_imports)]
29452        use std::fmt::{self, Write};
29453        #[allow(unused_imports)]
29454        use style_traits::{ParseError, StyleParseErrorKind};
29455        #[allow(unused_imports)]
29456        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
29457
29458        #[derive(SpecifiedValueInfo)]
29459        pub struct Longhands {
29460                pub background_color:
29461                    longhands::background_color::SpecifiedValue
29462                    ,
29463                pub background_position_x:
29464                    longhands::background_position_x::SpecifiedValue
29465                    ,
29466                pub background_position_y:
29467                    longhands::background_position_y::SpecifiedValue
29468                    ,
29469                pub background_repeat:
29470                    longhands::background_repeat::SpecifiedValue
29471                    ,
29472                pub background_attachment:
29473                    longhands::background_attachment::SpecifiedValue
29474                    ,
29475                pub background_image:
29476                    longhands::background_image::SpecifiedValue
29477                    ,
29478                pub background_size:
29479                    longhands::background_size::SpecifiedValue
29480                    ,
29481                pub background_origin:
29482                    longhands::background_origin::SpecifiedValue
29483                    ,
29484                pub background_clip:
29485                    longhands::background_clip::SpecifiedValue
29486                    ,
29487        }
29488
29489        /// Represents a serializable set of all of the longhand properties that
29490        /// correspond to a shorthand.
29491        pub struct LonghandsToSerialize<'a> {
29492                pub background_color:
29493                    &'a longhands::background_color::SpecifiedValue,
29494                pub background_position_x:
29495                    &'a longhands::background_position_x::SpecifiedValue,
29496                pub background_position_y:
29497                    &'a longhands::background_position_y::SpecifiedValue,
29498                pub background_repeat:
29499                    &'a longhands::background_repeat::SpecifiedValue,
29500                pub background_attachment:
29501                    &'a longhands::background_attachment::SpecifiedValue,
29502                pub background_image:
29503                    &'a longhands::background_image::SpecifiedValue,
29504                pub background_size:
29505                    &'a longhands::background_size::SpecifiedValue,
29506                pub background_origin:
29507                    &'a longhands::background_origin::SpecifiedValue,
29508                pub background_clip:
29509                    &'a longhands::background_clip::SpecifiedValue,
29510        }
29511
29512        impl<'a> LonghandsToSerialize<'a> {
29513            /// Tries to get a serializable set of longhands given a set of
29514            /// property declarations.
29515            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
29516                // Define all of the expected variables that correspond to the shorthand
29517                    let mut background_color =
29518                        None::<&'a longhands::background_color::SpecifiedValue>;
29519                    let mut background_position_x =
29520                        None::<&'a longhands::background_position_x::SpecifiedValue>;
29521                    let mut background_position_y =
29522                        None::<&'a longhands::background_position_y::SpecifiedValue>;
29523                    let mut background_repeat =
29524                        None::<&'a longhands::background_repeat::SpecifiedValue>;
29525                    let mut background_attachment =
29526                        None::<&'a longhands::background_attachment::SpecifiedValue>;
29527                    let mut background_image =
29528                        None::<&'a longhands::background_image::SpecifiedValue>;
29529                    let mut background_size =
29530                        None::<&'a longhands::background_size::SpecifiedValue>;
29531                    let mut background_origin =
29532                        None::<&'a longhands::background_origin::SpecifiedValue>;
29533                    let mut background_clip =
29534                        None::<&'a longhands::background_clip::SpecifiedValue>;
29535
29536                // Attempt to assign the incoming declarations to the expected variables
29537                for declaration in iter {
29538                    match *declaration {
29539                            PropertyDeclaration::BackgroundColor(ref value) => {
29540                                background_color = Some(value)
29541                            },
29542                            PropertyDeclaration::BackgroundPositionX(ref value) => {
29543                                background_position_x = Some(value)
29544                            },
29545                            PropertyDeclaration::BackgroundPositionY(ref value) => {
29546                                background_position_y = Some(value)
29547                            },
29548                            PropertyDeclaration::BackgroundRepeat(ref value) => {
29549                                background_repeat = Some(value)
29550                            },
29551                            PropertyDeclaration::BackgroundAttachment(ref value) => {
29552                                background_attachment = Some(value)
29553                            },
29554                            PropertyDeclaration::BackgroundImage(ref value) => {
29555                                background_image = Some(value)
29556                            },
29557                            PropertyDeclaration::BackgroundSize(ref value) => {
29558                                background_size = Some(value)
29559                            },
29560                            PropertyDeclaration::BackgroundOrigin(ref value) => {
29561                                background_origin = Some(value)
29562                            },
29563                            PropertyDeclaration::BackgroundClip(ref value) => {
29564                                background_clip = Some(value)
29565                            },
29566                        _ => {}
29567                    };
29568                }
29569
29570                // If any of the expected variables are missing, return an error
29571                match (
29572                        background_color,
29573                        background_position_x,
29574                        background_position_y,
29575                        background_repeat,
29576                        background_attachment,
29577                        background_image,
29578                        background_size,
29579                        background_origin,
29580                        background_clip,
29581                ) {
29582
29583                    (
29584                        Some(background_color),
29585                        Some(background_position_x),
29586                        Some(background_position_y),
29587                        Some(background_repeat),
29588                        Some(background_attachment),
29589                        Some(background_image),
29590                        Some(background_size),
29591                        Some(background_origin),
29592                        Some(background_clip),
29593                    ) =>
29594                    Ok(LonghandsToSerialize {
29595                            background_color,
29596                            background_position_x,
29597                            background_position_y,
29598                            background_repeat,
29599                            background_attachment,
29600                            background_image,
29601                            background_size,
29602                            background_origin,
29603                            background_clip,
29604                    }),
29605                    _ => Err(())
29606                }
29607            }
29608        }
29609
29610        /// Parse the given shorthand and fill the result into the
29611        /// `declarations` vector.
29612        pub fn parse_into<'i, 't>(
29613            declarations: &mut SourcePropertyDeclaration,
29614            context: &ParserContext,
29615            input: &mut Parser<'i, 't>,
29616        ) -> Result<(), ParseError<'i>> {
29617            #[allow(unused_imports)]
29618            use crate::properties::{NonCustomPropertyId, LonghandId};
29619            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
29620                    declarations.push(PropertyDeclaration::BackgroundColor(
29621                        longhands.background_color
29622                    ));
29623                    declarations.push(PropertyDeclaration::BackgroundPositionX(
29624                        longhands.background_position_x
29625                    ));
29626                    declarations.push(PropertyDeclaration::BackgroundPositionY(
29627                        longhands.background_position_y
29628                    ));
29629                    declarations.push(PropertyDeclaration::BackgroundRepeat(
29630                        longhands.background_repeat
29631                    ));
29632                    declarations.push(PropertyDeclaration::BackgroundAttachment(
29633                        longhands.background_attachment
29634                    ));
29635                    declarations.push(PropertyDeclaration::BackgroundImage(
29636                        longhands.background_image
29637                    ));
29638                    declarations.push(PropertyDeclaration::BackgroundSize(
29639                        longhands.background_size
29640                    ));
29641                    declarations.push(PropertyDeclaration::BackgroundOrigin(
29642                        longhands.background_origin
29643                    ));
29644                    declarations.push(PropertyDeclaration::BackgroundClip(
29645                        longhands.background_clip
29646                    ));
29647            })
29648        }
29649
29650        /// Try to serialize a given shorthand to a string.
29651        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
29652            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
29653                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
29654                Err(_) => Ok(())
29655            }
29656        }
29657
29658        
29659    use crate::properties::longhands::{background_position_x, background_position_y, background_repeat};
29660    use crate::properties::longhands::{background_attachment, background_color, background_image, background_size, background_origin};
29661    use crate::properties::longhands::background_clip;
29662    use crate::properties::longhands::background_clip::single_value::computed_value::T as Clip;
29663    use crate::properties::longhands::background_origin::single_value::computed_value::T as Origin;
29664    use crate::values::specified::{AllowQuirks, Color, Position, PositionComponent};
29665    use crate::parser::Parse;
29666
29667    // FIXME(emilio): Should be the same type!
29668    impl From<background_origin::single_value::SpecifiedValue> for background_clip::single_value::SpecifiedValue {
29669        fn from(origin: background_origin::single_value::SpecifiedValue) ->
29670            background_clip::single_value::SpecifiedValue {
29671            match origin {
29672                background_origin::single_value::SpecifiedValue::ContentBox =>
29673                    background_clip::single_value::SpecifiedValue::ContentBox,
29674                background_origin::single_value::SpecifiedValue::PaddingBox =>
29675                    background_clip::single_value::SpecifiedValue::PaddingBox,
29676                background_origin::single_value::SpecifiedValue::BorderBox =>
29677                    background_clip::single_value::SpecifiedValue::BorderBox,
29678            }
29679        }
29680    }
29681
29682    pub fn parse_value<'i, 't>(
29683        context: &ParserContext,
29684        input: &mut Parser<'i, 't>,
29685    ) -> Result<Longhands, ParseError<'i>> {
29686        let mut background_color = None;
29687
29688        // Vec grows from 0 to 4 by default on first push().  So allocate with
29689        // capacity 1, so in the common case of only one item we don't way
29690        // overallocate, then shrink.  Note that we always push at least one
29691        // item if parsing succeeds.
29692        let mut background_image = Vec::with_capacity(1);
29693        // Vec grows from 0 to 4 by default on first push().  So allocate with
29694        // capacity 1, so in the common case of only one item we don't way
29695        // overallocate, then shrink.  Note that we always push at least one
29696        // item if parsing succeeds.
29697        let mut background_position_x = Vec::with_capacity(1);
29698        // Vec grows from 0 to 4 by default on first push().  So allocate with
29699        // capacity 1, so in the common case of only one item we don't way
29700        // overallocate, then shrink.  Note that we always push at least one
29701        // item if parsing succeeds.
29702        let mut background_position_y = Vec::with_capacity(1);
29703        // Vec grows from 0 to 4 by default on first push().  So allocate with
29704        // capacity 1, so in the common case of only one item we don't way
29705        // overallocate, then shrink.  Note that we always push at least one
29706        // item if parsing succeeds.
29707        let mut background_repeat = Vec::with_capacity(1);
29708        // Vec grows from 0 to 4 by default on first push().  So allocate with
29709        // capacity 1, so in the common case of only one item we don't way
29710        // overallocate, then shrink.  Note that we always push at least one
29711        // item if parsing succeeds.
29712        let mut background_size = Vec::with_capacity(1);
29713        // Vec grows from 0 to 4 by default on first push().  So allocate with
29714        // capacity 1, so in the common case of only one item we don't way
29715        // overallocate, then shrink.  Note that we always push at least one
29716        // item if parsing succeeds.
29717        let mut background_attachment = Vec::with_capacity(1);
29718        // Vec grows from 0 to 4 by default on first push().  So allocate with
29719        // capacity 1, so in the common case of only one item we don't way
29720        // overallocate, then shrink.  Note that we always push at least one
29721        // item if parsing succeeds.
29722        let mut background_origin = Vec::with_capacity(1);
29723        // Vec grows from 0 to 4 by default on first push().  So allocate with
29724        // capacity 1, so in the common case of only one item we don't way
29725        // overallocate, then shrink.  Note that we always push at least one
29726        // item if parsing succeeds.
29727        let mut background_clip = Vec::with_capacity(1);
29728        input.parse_comma_separated(|input| {
29729            // background-color can only be in the last element, so if it
29730            // is parsed anywhere before, the value is invalid.
29731            if background_color.is_some() {
29732                return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
29733            }
29734
29735                let mut image = None;
29736                let mut position = None;
29737                let mut repeat = None;
29738                let mut size = None;
29739                let mut attachment = None;
29740                let mut origin = None;
29741                let mut clip = None;
29742            loop {
29743                if background_color.is_none() {
29744                    if let Ok(value) = input.try_parse(|i| Color::parse(context, i)) {
29745                        background_color = Some(value);
29746                        continue
29747                    }
29748                }
29749                if position.is_none() {
29750                    if let Ok(value) = input.try_parse(|input| {
29751                        Position::parse_three_value_quirky(context, input, AllowQuirks::No)
29752                    }) {
29753                        position = Some(value);
29754
29755                        // Parse background size, if applicable.
29756                        size = input.try_parse(|input| {
29757                            input.expect_delim('/')?;
29758                            background_size::single_value::parse(context, input)
29759                        }).ok();
29760
29761                        continue
29762                    }
29763                }
29764                    if image.is_none() {
29765                        if let Ok(value) = input.try_parse(|input| background_image::single_value
29766                                                                               ::parse(context, input)) {
29767                            image = Some(value);
29768                            continue
29769                        }
29770                    }
29771                    if repeat.is_none() {
29772                        if let Ok(value) = input.try_parse(|input| background_repeat::single_value
29773                                                                               ::parse(context, input)) {
29774                            repeat = Some(value);
29775                            continue
29776                        }
29777                    }
29778                    if attachment.is_none() {
29779                        if let Ok(value) = input.try_parse(|input| background_attachment::single_value
29780                                                                               ::parse(context, input)) {
29781                            attachment = Some(value);
29782                            continue
29783                        }
29784                    }
29785                    if origin.is_none() {
29786                        if let Ok(value) = input.try_parse(|input| background_origin::single_value
29787                                                                               ::parse(context, input)) {
29788                            origin = Some(value);
29789                            continue
29790                        }
29791                    }
29792                    if clip.is_none() {
29793                        if let Ok(value) = input.try_parse(|input| background_clip::single_value
29794                                                                               ::parse(context, input)) {
29795                            clip = Some(value);
29796                            continue
29797                        }
29798                    }
29799                break
29800            }
29801            if clip.is_none() {
29802                if let Some(origin) = origin {
29803                    clip = Some(background_clip::single_value::SpecifiedValue::from(origin));
29804                }
29805            }
29806            let mut any = false;
29807                any = any || image.is_some();
29808                any = any || position.is_some();
29809                any = any || repeat.is_some();
29810                any = any || size.is_some();
29811                any = any || attachment.is_some();
29812                any = any || origin.is_some();
29813                any = any || clip.is_some();
29814            any = any || background_color.is_some();
29815            if any {
29816                if let Some(position) = position {
29817                    background_position_x.push(position.horizontal);
29818                    background_position_y.push(position.vertical);
29819                } else {
29820                    background_position_x.push(PositionComponent::zero());
29821                    background_position_y.push(PositionComponent::zero());
29822                }
29823                    if let Some(bg_image) = image {
29824                        background_image.push(bg_image);
29825                    } else {
29826                        background_image.push(background_image::single_value
29827                                                                    ::get_initial_specified_value());
29828                    }
29829                    if let Some(bg_repeat) = repeat {
29830                        background_repeat.push(bg_repeat);
29831                    } else {
29832                        background_repeat.push(background_repeat::single_value
29833                                                                    ::get_initial_specified_value());
29834                    }
29835                    if let Some(bg_size) = size {
29836                        background_size.push(bg_size);
29837                    } else {
29838                        background_size.push(background_size::single_value
29839                                                                    ::get_initial_specified_value());
29840                    }
29841                    if let Some(bg_attachment) = attachment {
29842                        background_attachment.push(bg_attachment);
29843                    } else {
29844                        background_attachment.push(background_attachment::single_value
29845                                                                    ::get_initial_specified_value());
29846                    }
29847                    if let Some(bg_origin) = origin {
29848                        background_origin.push(bg_origin);
29849                    } else {
29850                        background_origin.push(background_origin::single_value
29851                                                                    ::get_initial_specified_value());
29852                    }
29853                    if let Some(bg_clip) = clip {
29854                        background_clip.push(bg_clip);
29855                    } else {
29856                        background_clip.push(background_clip::single_value
29857                                                                    ::get_initial_specified_value());
29858                    }
29859                Ok(())
29860            } else {
29861                Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
29862            }
29863        })?;
29864
29865        Ok(expanded! {
29866             background_color: background_color.unwrap_or(Color::transparent()),
29867             background_image: background_image::SpecifiedValue(background_image.into()),
29868             background_position_x: background_position_x::SpecifiedValue(background_position_x.into()),
29869             background_position_y: background_position_y::SpecifiedValue(background_position_y.into()),
29870             background_repeat: background_repeat::SpecifiedValue(background_repeat.into()),
29871             background_size: background_size::SpecifiedValue(background_size.into()),
29872             background_attachment: background_attachment::SpecifiedValue(background_attachment.into()),
29873             background_origin: background_origin::SpecifiedValue(background_origin.into()),
29874             background_clip: background_clip::SpecifiedValue(background_clip.into()),
29875         })
29876    }
29877
29878    impl<'a> ToCss for LonghandsToSerialize<'a>  {
29879        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
29880            let len = self.background_image.0.len();
29881            // There should be at least one declared value
29882            if len == 0 {
29883                return Ok(());
29884            }
29885
29886            // If a value list length is differs then we don't do a shorthand serialization.
29887            // The exceptions to this is color which appears once only and is serialized
29888            // with the last item.
29889                if len != self.background_image.0.len() {
29890                    return Ok(());
29891                }
29892                if len != self.background_position_x.0.len() {
29893                    return Ok(());
29894                }
29895                if len != self.background_position_y.0.len() {
29896                    return Ok(());
29897                }
29898                if len != self.background_size.0.len() {
29899                    return Ok(());
29900                }
29901                if len != self.background_repeat.0.len() {
29902                    return Ok(());
29903                }
29904                if len != self.background_origin.0.len() {
29905                    return Ok(());
29906                }
29907                if len != self.background_clip.0.len() {
29908                    return Ok(());
29909                }
29910                if len != self.background_attachment.0.len() {
29911                    return Ok(());
29912                }
29913
29914            for i in 0..len {
29915                    let image = &self.background_image.0[i];
29916                    let position_x = &self.background_position_x.0[i];
29917                    let position_y = &self.background_position_y.0[i];
29918                    let repeat = &self.background_repeat.0[i];
29919                    let size = &self.background_size.0[i];
29920                    let attachment = &self.background_attachment.0[i];
29921                    let origin = &self.background_origin.0[i];
29922                    let clip = &self.background_clip.0[i];
29923
29924                if i != 0 {
29925                    dest.write_str(", ")?;
29926                }
29927
29928                let mut wrote_value = false;
29929
29930                if i == len - 1 {
29931                    if *self.background_color != background_color::get_initial_specified_value() {
29932                        self.background_color.to_css(dest)?;
29933                        wrote_value = true;
29934                    }
29935                }
29936
29937                if *image != background_image::single_value::get_initial_specified_value() {
29938                    if wrote_value {
29939                        dest.write_char(' ')?;
29940                    }
29941                    image.to_css(dest)?;
29942                    wrote_value = true;
29943                }
29944
29945                // Size is only valid after a position so when there is a
29946                // non-initial size we must also serialize position
29947                if *position_x != PositionComponent::zero() ||
29948                    *position_y != PositionComponent::zero() ||
29949                    *size != background_size::single_value::get_initial_specified_value()
29950                {
29951                    if wrote_value {
29952                        dest.write_char(' ')?;
29953                    }
29954
29955                    Position {
29956                        horizontal: position_x.clone(),
29957                        vertical: position_y.clone()
29958                    }.to_css(dest)?;
29959
29960                    wrote_value = true;
29961
29962                    if *size != background_size::single_value::get_initial_specified_value() {
29963                        dest.write_str(" / ")?;
29964                        size.to_css(dest)?;
29965                    }
29966                }
29967
29968                    if *repeat != background_repeat::single_value::get_initial_specified_value() {
29969                        if wrote_value {
29970                            dest.write_char(' ')?;
29971                        }
29972                        repeat.to_css(dest)?;
29973                        wrote_value = true;
29974                    }
29975                    if *attachment != background_attachment::single_value::get_initial_specified_value() {
29976                        if wrote_value {
29977                            dest.write_char(' ')?;
29978                        }
29979                        attachment.to_css(dest)?;
29980                        wrote_value = true;
29981                    }
29982
29983                if *origin != Origin::PaddingBox || *clip != Clip::BorderBox {
29984                    if wrote_value {
29985                        dest.write_char(' ')?;
29986                    }
29987                    origin.to_css(dest)?;
29988                    if *clip != From::from(*origin) {
29989                        dest.write_char(' ')?;
29990                        clip.to_css(dest)?;
29991                    }
29992
29993                    wrote_value = true;
29994                }
29995
29996                if !wrote_value {
29997                    image.to_css(dest)?;
29998                }
29999            }
30000
30001            Ok(())
30002        }
30003    }
30004
30005    }
30006
30007
30008
30009
30010    /// https://drafts.csswg.org/css-backgrounds-4/#the-background-position
30011    pub mod background_position {
30012        use cssparser::Parser;
30013        use crate::parser::ParserContext;
30014        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
30015        #[allow(unused_imports)]
30016        use selectors::parser::SelectorParseErrorKind;
30017        #[allow(unused_imports)]
30018        use std::fmt::{self, Write};
30019        #[allow(unused_imports)]
30020        use style_traits::{ParseError, StyleParseErrorKind};
30021        #[allow(unused_imports)]
30022        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
30023
30024        #[derive(SpecifiedValueInfo)]
30025        pub struct Longhands {
30026                pub background_position_x:
30027                    longhands::background_position_x::SpecifiedValue
30028                    ,
30029                pub background_position_y:
30030                    longhands::background_position_y::SpecifiedValue
30031                    ,
30032        }
30033
30034        /// Represents a serializable set of all of the longhand properties that
30035        /// correspond to a shorthand.
30036        pub struct LonghandsToSerialize<'a> {
30037                pub background_position_x:
30038                    &'a longhands::background_position_x::SpecifiedValue,
30039                pub background_position_y:
30040                    &'a longhands::background_position_y::SpecifiedValue,
30041        }
30042
30043        impl<'a> LonghandsToSerialize<'a> {
30044            /// Tries to get a serializable set of longhands given a set of
30045            /// property declarations.
30046            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
30047                // Define all of the expected variables that correspond to the shorthand
30048                    let mut background_position_x =
30049                        None::<&'a longhands::background_position_x::SpecifiedValue>;
30050                    let mut background_position_y =
30051                        None::<&'a longhands::background_position_y::SpecifiedValue>;
30052
30053                // Attempt to assign the incoming declarations to the expected variables
30054                for declaration in iter {
30055                    match *declaration {
30056                            PropertyDeclaration::BackgroundPositionX(ref value) => {
30057                                background_position_x = Some(value)
30058                            },
30059                            PropertyDeclaration::BackgroundPositionY(ref value) => {
30060                                background_position_y = Some(value)
30061                            },
30062                        _ => {}
30063                    };
30064                }
30065
30066                // If any of the expected variables are missing, return an error
30067                match (
30068                        background_position_x,
30069                        background_position_y,
30070                ) {
30071
30072                    (
30073                        Some(background_position_x),
30074                        Some(background_position_y),
30075                    ) =>
30076                    Ok(LonghandsToSerialize {
30077                            background_position_x,
30078                            background_position_y,
30079                    }),
30080                    _ => Err(())
30081                }
30082            }
30083        }
30084
30085        /// Parse the given shorthand and fill the result into the
30086        /// `declarations` vector.
30087        pub fn parse_into<'i, 't>(
30088            declarations: &mut SourcePropertyDeclaration,
30089            context: &ParserContext,
30090            input: &mut Parser<'i, 't>,
30091        ) -> Result<(), ParseError<'i>> {
30092            #[allow(unused_imports)]
30093            use crate::properties::{NonCustomPropertyId, LonghandId};
30094            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
30095                    declarations.push(PropertyDeclaration::BackgroundPositionX(
30096                        longhands.background_position_x
30097                    ));
30098                    declarations.push(PropertyDeclaration::BackgroundPositionY(
30099                        longhands.background_position_y
30100                    ));
30101            })
30102        }
30103
30104        /// Try to serialize a given shorthand to a string.
30105        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
30106            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
30107                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
30108                Err(_) => Ok(())
30109            }
30110        }
30111
30112        
30113    use crate::properties::longhands::{background_position_x, background_position_y};
30114    use crate::values::specified::AllowQuirks;
30115    use crate::values::specified::position::Position;
30116
30117    pub fn parse_value<'i, 't>(
30118        context: &ParserContext,
30119        input: &mut Parser<'i, 't>,
30120    ) -> Result<Longhands, ParseError<'i>> {
30121        // Vec grows from 0 to 4 by default on first push().  So allocate with
30122        // capacity 1, so in the common case of only one item we don't way
30123        // overallocate, then shrink.  Note that we always push at least one
30124        // item if parsing succeeds.
30125        let mut position_x = Vec::with_capacity(1);
30126        let mut position_y = Vec::with_capacity(1);
30127        let mut any = false;
30128
30129        input.parse_comma_separated(|input| {
30130            let value = Position::parse_three_value_quirky(context, input, AllowQuirks::Yes)?;
30131            position_x.push(value.horizontal);
30132            position_y.push(value.vertical);
30133            any = true;
30134            Ok(())
30135        })?;
30136        if !any {
30137            return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
30138        }
30139
30140        Ok(expanded! {
30141            background_position_x: background_position_x::SpecifiedValue(position_x.into()),
30142            background_position_y: background_position_y::SpecifiedValue(position_y.into()),
30143        })
30144    }
30145
30146    impl<'a> ToCss for LonghandsToSerialize<'a>  {
30147        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
30148            let len = self.background_position_x.0.len();
30149            if len == 0 || len != self.background_position_y.0.len() {
30150                return Ok(());
30151            }
30152            for i in 0..len {
30153                Position {
30154                    horizontal: self.background_position_x.0[i].clone(),
30155                    vertical: self.background_position_y.0[i].clone()
30156                }.to_css(dest)?;
30157
30158                if i < len - 1 {
30159                    dest.write_str(", ")?;
30160                }
30161            }
30162            Ok(())
30163        }
30164    }
30165
30166    }
30167
30168
30169    /* This Source Code Form is subject to the terms of the Mozilla Public
30170 * License, v. 2.0. If a copy of the MPL was not distributed with this
30171 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
30172
30173
30174
30175
30176
30177    
30178    
30179
30180    /// https://drafts.csswg.org/css-backgrounds/#border-color
30181    pub mod border_color {
30182        use cssparser::Parser;
30183        use crate::parser::ParserContext;
30184        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
30185        #[allow(unused_imports)]
30186        use selectors::parser::SelectorParseErrorKind;
30187        #[allow(unused_imports)]
30188        use std::fmt::{self, Write};
30189        #[allow(unused_imports)]
30190        use style_traits::{ParseError, StyleParseErrorKind};
30191        #[allow(unused_imports)]
30192        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
30193
30194        #[derive(SpecifiedValueInfo)]
30195        pub struct Longhands {
30196                pub border_top_color:
30197                    longhands::border_top_color::SpecifiedValue
30198                    ,
30199                pub border_right_color:
30200                    longhands::border_right_color::SpecifiedValue
30201                    ,
30202                pub border_bottom_color:
30203                    longhands::border_bottom_color::SpecifiedValue
30204                    ,
30205                pub border_left_color:
30206                    longhands::border_left_color::SpecifiedValue
30207                    ,
30208        }
30209
30210        /// Represents a serializable set of all of the longhand properties that
30211        /// correspond to a shorthand.
30212        pub struct LonghandsToSerialize<'a> {
30213                pub border_top_color:
30214                    &'a longhands::border_top_color::SpecifiedValue,
30215                pub border_right_color:
30216                    &'a longhands::border_right_color::SpecifiedValue,
30217                pub border_bottom_color:
30218                    &'a longhands::border_bottom_color::SpecifiedValue,
30219                pub border_left_color:
30220                    &'a longhands::border_left_color::SpecifiedValue,
30221        }
30222
30223        impl<'a> LonghandsToSerialize<'a> {
30224            /// Tries to get a serializable set of longhands given a set of
30225            /// property declarations.
30226            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
30227                // Define all of the expected variables that correspond to the shorthand
30228                    let mut border_top_color =
30229                        None::<&'a longhands::border_top_color::SpecifiedValue>;
30230                    let mut border_right_color =
30231                        None::<&'a longhands::border_right_color::SpecifiedValue>;
30232                    let mut border_bottom_color =
30233                        None::<&'a longhands::border_bottom_color::SpecifiedValue>;
30234                    let mut border_left_color =
30235                        None::<&'a longhands::border_left_color::SpecifiedValue>;
30236
30237                // Attempt to assign the incoming declarations to the expected variables
30238                for declaration in iter {
30239                    match *declaration {
30240                            PropertyDeclaration::BorderTopColor(ref value) => {
30241                                border_top_color = Some(value)
30242                            },
30243                            PropertyDeclaration::BorderRightColor(ref value) => {
30244                                border_right_color = Some(value)
30245                            },
30246                            PropertyDeclaration::BorderBottomColor(ref value) => {
30247                                border_bottom_color = Some(value)
30248                            },
30249                            PropertyDeclaration::BorderLeftColor(ref value) => {
30250                                border_left_color = Some(value)
30251                            },
30252                        _ => {}
30253                    };
30254                }
30255
30256                // If any of the expected variables are missing, return an error
30257                match (
30258                        border_top_color,
30259                        border_right_color,
30260                        border_bottom_color,
30261                        border_left_color,
30262                ) {
30263
30264                    (
30265                        Some(border_top_color),
30266                        Some(border_right_color),
30267                        Some(border_bottom_color),
30268                        Some(border_left_color),
30269                    ) =>
30270                    Ok(LonghandsToSerialize {
30271                            border_top_color,
30272                            border_right_color,
30273                            border_bottom_color,
30274                            border_left_color,
30275                    }),
30276                    _ => Err(())
30277                }
30278            }
30279        }
30280
30281        /// Parse the given shorthand and fill the result into the
30282        /// `declarations` vector.
30283        pub fn parse_into<'i, 't>(
30284            declarations: &mut SourcePropertyDeclaration,
30285            context: &ParserContext,
30286            input: &mut Parser<'i, 't>,
30287        ) -> Result<(), ParseError<'i>> {
30288            #[allow(unused_imports)]
30289            use crate::properties::{NonCustomPropertyId, LonghandId};
30290            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
30291                    declarations.push(PropertyDeclaration::BorderTopColor(
30292                        longhands.border_top_color
30293                    ));
30294                    declarations.push(PropertyDeclaration::BorderRightColor(
30295                        longhands.border_right_color
30296                    ));
30297                    declarations.push(PropertyDeclaration::BorderBottomColor(
30298                        longhands.border_bottom_color
30299                    ));
30300                    declarations.push(PropertyDeclaration::BorderLeftColor(
30301                        longhands.border_left_color
30302                    ));
30303            })
30304        }
30305
30306        /// Try to serialize a given shorthand to a string.
30307        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
30308            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
30309                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
30310                Err(_) => Ok(())
30311            }
30312        }
30313
30314        
30315        #[allow(unused_imports)]
30316        use crate::parser::Parse;
30317        use crate::values::generics::rect::Rect;
30318        #[allow(unused_imports)]
30319        use crate::values::specified;
30320
30321        fn parse_value<'i, 't>(
30322            context: &ParserContext,
30323            input: &mut Parser<'i, 't>,
30324        ) -> Result<Longhands, ParseError<'i>> {
30325            let rect = Rect::parse_with(context, input, |c, i| -> Result<
30326                crate::properties::longhands::border_top_color::SpecifiedValue,
30327                ParseError<'i>
30328            > {
30329                specified::Color::parse_quirky(c, i, specified::AllowQuirks::Yes)
30330            })?;
30331            Ok(expanded! {
30332                    border_top_color: rect.0,
30333                    border_right_color: rect.1,
30334                    border_bottom_color: rect.2,
30335                    border_left_color: rect.3,
30336            })
30337        }
30338
30339        impl<'a> ToCss for LonghandsToSerialize<'a> {
30340            fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
30341            where
30342                W: Write,
30343            {
30344                let rect = Rect::new(
30345                    &self.border_top_color,
30346                    &self.border_right_color,
30347                    &self.border_bottom_color,
30348                    &self.border_left_color,
30349                );
30350                rect.to_css(dest)
30351            }
30352        }
30353    
30354    }
30355
30356
30357
30358
30359    
30360    
30361
30362    /// https://drafts.csswg.org/css-backgrounds/#border-style
30363    pub mod border_style {
30364        use cssparser::Parser;
30365        use crate::parser::ParserContext;
30366        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
30367        #[allow(unused_imports)]
30368        use selectors::parser::SelectorParseErrorKind;
30369        #[allow(unused_imports)]
30370        use std::fmt::{self, Write};
30371        #[allow(unused_imports)]
30372        use style_traits::{ParseError, StyleParseErrorKind};
30373        #[allow(unused_imports)]
30374        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
30375
30376        #[derive(SpecifiedValueInfo)]
30377        pub struct Longhands {
30378                pub border_top_style:
30379                    longhands::border_top_style::SpecifiedValue
30380                    ,
30381                pub border_right_style:
30382                    longhands::border_right_style::SpecifiedValue
30383                    ,
30384                pub border_bottom_style:
30385                    longhands::border_bottom_style::SpecifiedValue
30386                    ,
30387                pub border_left_style:
30388                    longhands::border_left_style::SpecifiedValue
30389                    ,
30390        }
30391
30392        /// Represents a serializable set of all of the longhand properties that
30393        /// correspond to a shorthand.
30394        pub struct LonghandsToSerialize<'a> {
30395                pub border_top_style:
30396                    &'a longhands::border_top_style::SpecifiedValue,
30397                pub border_right_style:
30398                    &'a longhands::border_right_style::SpecifiedValue,
30399                pub border_bottom_style:
30400                    &'a longhands::border_bottom_style::SpecifiedValue,
30401                pub border_left_style:
30402                    &'a longhands::border_left_style::SpecifiedValue,
30403        }
30404
30405        impl<'a> LonghandsToSerialize<'a> {
30406            /// Tries to get a serializable set of longhands given a set of
30407            /// property declarations.
30408            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
30409                // Define all of the expected variables that correspond to the shorthand
30410                    let mut border_top_style =
30411                        None::<&'a longhands::border_top_style::SpecifiedValue>;
30412                    let mut border_right_style =
30413                        None::<&'a longhands::border_right_style::SpecifiedValue>;
30414                    let mut border_bottom_style =
30415                        None::<&'a longhands::border_bottom_style::SpecifiedValue>;
30416                    let mut border_left_style =
30417                        None::<&'a longhands::border_left_style::SpecifiedValue>;
30418
30419                // Attempt to assign the incoming declarations to the expected variables
30420                for declaration in iter {
30421                    match *declaration {
30422                            PropertyDeclaration::BorderTopStyle(ref value) => {
30423                                border_top_style = Some(value)
30424                            },
30425                            PropertyDeclaration::BorderRightStyle(ref value) => {
30426                                border_right_style = Some(value)
30427                            },
30428                            PropertyDeclaration::BorderBottomStyle(ref value) => {
30429                                border_bottom_style = Some(value)
30430                            },
30431                            PropertyDeclaration::BorderLeftStyle(ref value) => {
30432                                border_left_style = Some(value)
30433                            },
30434                        _ => {}
30435                    };
30436                }
30437
30438                // If any of the expected variables are missing, return an error
30439                match (
30440                        border_top_style,
30441                        border_right_style,
30442                        border_bottom_style,
30443                        border_left_style,
30444                ) {
30445
30446                    (
30447                        Some(border_top_style),
30448                        Some(border_right_style),
30449                        Some(border_bottom_style),
30450                        Some(border_left_style),
30451                    ) =>
30452                    Ok(LonghandsToSerialize {
30453                            border_top_style,
30454                            border_right_style,
30455                            border_bottom_style,
30456                            border_left_style,
30457                    }),
30458                    _ => Err(())
30459                }
30460            }
30461        }
30462
30463        /// Parse the given shorthand and fill the result into the
30464        /// `declarations` vector.
30465        pub fn parse_into<'i, 't>(
30466            declarations: &mut SourcePropertyDeclaration,
30467            context: &ParserContext,
30468            input: &mut Parser<'i, 't>,
30469        ) -> Result<(), ParseError<'i>> {
30470            #[allow(unused_imports)]
30471            use crate::properties::{NonCustomPropertyId, LonghandId};
30472            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
30473                    declarations.push(PropertyDeclaration::BorderTopStyle(
30474                        longhands.border_top_style
30475                    ));
30476                    declarations.push(PropertyDeclaration::BorderRightStyle(
30477                        longhands.border_right_style
30478                    ));
30479                    declarations.push(PropertyDeclaration::BorderBottomStyle(
30480                        longhands.border_bottom_style
30481                    ));
30482                    declarations.push(PropertyDeclaration::BorderLeftStyle(
30483                        longhands.border_left_style
30484                    ));
30485            })
30486        }
30487
30488        /// Try to serialize a given shorthand to a string.
30489        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
30490            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
30491                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
30492                Err(_) => Ok(())
30493            }
30494        }
30495
30496        
30497        #[allow(unused_imports)]
30498        use crate::parser::Parse;
30499        use crate::values::generics::rect::Rect;
30500        #[allow(unused_imports)]
30501        use crate::values::specified;
30502
30503        fn parse_value<'i, 't>(
30504            context: &ParserContext,
30505            input: &mut Parser<'i, 't>,
30506        ) -> Result<Longhands, ParseError<'i>> {
30507            let rect = Rect::parse_with(context, input, |c, i| -> Result<
30508                crate::properties::longhands::border_top_style::SpecifiedValue,
30509                ParseError<'i>
30510            > {
30511                crate::parser::Parse::parse(c, i)
30512            })?;
30513            Ok(expanded! {
30514                    border_top_style: rect.0,
30515                    border_right_style: rect.1,
30516                    border_bottom_style: rect.2,
30517                    border_left_style: rect.3,
30518            })
30519        }
30520
30521        impl<'a> ToCss for LonghandsToSerialize<'a> {
30522            fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
30523            where
30524                W: Write,
30525            {
30526                let rect = Rect::new(
30527                    &self.border_top_style,
30528                    &self.border_right_style,
30529                    &self.border_bottom_style,
30530                    &self.border_left_style,
30531                );
30532                rect.to_css(dest)
30533            }
30534        }
30535    
30536    }
30537
30538
30539
30540
30541
30542    /// https://drafts.csswg.org/css-backgrounds/#border-width
30543    pub mod border_width {
30544        use cssparser::Parser;
30545        use crate::parser::ParserContext;
30546        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
30547        #[allow(unused_imports)]
30548        use selectors::parser::SelectorParseErrorKind;
30549        #[allow(unused_imports)]
30550        use std::fmt::{self, Write};
30551        #[allow(unused_imports)]
30552        use style_traits::{ParseError, StyleParseErrorKind};
30553        #[allow(unused_imports)]
30554        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
30555
30556        #[derive(SpecifiedValueInfo)]
30557        pub struct Longhands {
30558                pub border_top_width:
30559                    longhands::border_top_width::SpecifiedValue
30560                    ,
30561                pub border_right_width:
30562                    longhands::border_right_width::SpecifiedValue
30563                    ,
30564                pub border_bottom_width:
30565                    longhands::border_bottom_width::SpecifiedValue
30566                    ,
30567                pub border_left_width:
30568                    longhands::border_left_width::SpecifiedValue
30569                    ,
30570        }
30571
30572        /// Represents a serializable set of all of the longhand properties that
30573        /// correspond to a shorthand.
30574        pub struct LonghandsToSerialize<'a> {
30575                pub border_top_width:
30576                    &'a longhands::border_top_width::SpecifiedValue,
30577                pub border_right_width:
30578                    &'a longhands::border_right_width::SpecifiedValue,
30579                pub border_bottom_width:
30580                    &'a longhands::border_bottom_width::SpecifiedValue,
30581                pub border_left_width:
30582                    &'a longhands::border_left_width::SpecifiedValue,
30583        }
30584
30585        impl<'a> LonghandsToSerialize<'a> {
30586            /// Tries to get a serializable set of longhands given a set of
30587            /// property declarations.
30588            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
30589                // Define all of the expected variables that correspond to the shorthand
30590                    let mut border_top_width =
30591                        None::<&'a longhands::border_top_width::SpecifiedValue>;
30592                    let mut border_right_width =
30593                        None::<&'a longhands::border_right_width::SpecifiedValue>;
30594                    let mut border_bottom_width =
30595                        None::<&'a longhands::border_bottom_width::SpecifiedValue>;
30596                    let mut border_left_width =
30597                        None::<&'a longhands::border_left_width::SpecifiedValue>;
30598
30599                // Attempt to assign the incoming declarations to the expected variables
30600                for declaration in iter {
30601                    match *declaration {
30602                            PropertyDeclaration::BorderTopWidth(ref value) => {
30603                                border_top_width = Some(value)
30604                            },
30605                            PropertyDeclaration::BorderRightWidth(ref value) => {
30606                                border_right_width = Some(value)
30607                            },
30608                            PropertyDeclaration::BorderBottomWidth(ref value) => {
30609                                border_bottom_width = Some(value)
30610                            },
30611                            PropertyDeclaration::BorderLeftWidth(ref value) => {
30612                                border_left_width = Some(value)
30613                            },
30614                        _ => {}
30615                    };
30616                }
30617
30618                // If any of the expected variables are missing, return an error
30619                match (
30620                        border_top_width,
30621                        border_right_width,
30622                        border_bottom_width,
30623                        border_left_width,
30624                ) {
30625
30626                    (
30627                        Some(border_top_width),
30628                        Some(border_right_width),
30629                        Some(border_bottom_width),
30630                        Some(border_left_width),
30631                    ) =>
30632                    Ok(LonghandsToSerialize {
30633                            border_top_width,
30634                            border_right_width,
30635                            border_bottom_width,
30636                            border_left_width,
30637                    }),
30638                    _ => Err(())
30639                }
30640            }
30641        }
30642
30643        /// Parse the given shorthand and fill the result into the
30644        /// `declarations` vector.
30645        pub fn parse_into<'i, 't>(
30646            declarations: &mut SourcePropertyDeclaration,
30647            context: &ParserContext,
30648            input: &mut Parser<'i, 't>,
30649        ) -> Result<(), ParseError<'i>> {
30650            #[allow(unused_imports)]
30651            use crate::properties::{NonCustomPropertyId, LonghandId};
30652            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
30653                    declarations.push(PropertyDeclaration::BorderTopWidth(
30654                        longhands.border_top_width
30655                    ));
30656                    declarations.push(PropertyDeclaration::BorderRightWidth(
30657                        longhands.border_right_width
30658                    ));
30659                    declarations.push(PropertyDeclaration::BorderBottomWidth(
30660                        longhands.border_bottom_width
30661                    ));
30662                    declarations.push(PropertyDeclaration::BorderLeftWidth(
30663                        longhands.border_left_width
30664                    ));
30665            })
30666        }
30667
30668        /// Try to serialize a given shorthand to a string.
30669        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
30670            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
30671                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
30672                Err(_) => Ok(())
30673            }
30674        }
30675
30676        
30677    use crate::values::generics::rect::Rect;
30678    use crate::values::specified::{AllowQuirks, BorderSideWidth};
30679
30680    pub fn parse_value<'i, 't>(
30681        context: &ParserContext,
30682        input: &mut Parser<'i, 't>,
30683    ) -> Result<Longhands, ParseError<'i>> {
30684        let rect = Rect::parse_with(context, input, |_, i| {
30685            BorderSideWidth::parse_quirky(context, i, AllowQuirks::Yes)
30686        })?;
30687        Ok(expanded! {
30688            border_top_width: rect.0,
30689            border_right_width: rect.1,
30690            border_bottom_width: rect.2,
30691            border_left_width: rect.3,
30692        })
30693    }
30694
30695    impl<'a> ToCss for LonghandsToSerialize<'a>  {
30696        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
30697            let top = &self.border_top_width;
30698            let right = &self.border_right_width;
30699            let bottom = &self.border_bottom_width;
30700            let left = &self.border_left_width;
30701            Rect::new(top, right, bottom, left).to_css(dest)
30702        }
30703    }
30704
30705    }
30706
30707
30708
30709pub fn parse_border<'i, 't>(
30710    context: &ParserContext,
30711    input: &mut Parser<'i, 't>,
30712) -> Result<(specified::Color, specified::BorderStyle, specified::BorderSideWidth), ParseError<'i>> {
30713    use crate::values::specified::{Color, BorderStyle, BorderSideWidth};
30714    let _unused = context;
30715    let mut color = None;
30716    let mut style = None;
30717    let mut width = None;
30718    let mut any = false;
30719    loop {
30720        if width.is_none() {
30721            if let Ok(value) = input.try_parse(|i| BorderSideWidth::parse(context, i)) {
30722                width = Some(value);
30723                any = true;
30724            }
30725        }
30726        if style.is_none() {
30727            if let Ok(value) = input.try_parse(BorderStyle::parse) {
30728                style = Some(value);
30729                any = true;
30730                continue
30731            }
30732        }
30733        if color.is_none() {
30734            if let Ok(value) = input.try_parse(|i| Color::parse(context, i)) {
30735                color = Some(value);
30736                any = true;
30737                continue
30738            }
30739        }
30740        break
30741    }
30742    if !any {
30743        return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
30744    }
30745    Ok((color.unwrap_or(Color::CurrentColor), style.unwrap_or(BorderStyle::None), width.unwrap_or(BorderSideWidth::medium())))
30746}
30747
30748    
30749    
30750
30751    /// https://drafts.csswg.org/css-backgrounds/#border-top
30752    pub mod border_top {
30753        use cssparser::Parser;
30754        use crate::parser::ParserContext;
30755        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
30756        #[allow(unused_imports)]
30757        use selectors::parser::SelectorParseErrorKind;
30758        #[allow(unused_imports)]
30759        use std::fmt::{self, Write};
30760        #[allow(unused_imports)]
30761        use style_traits::{ParseError, StyleParseErrorKind};
30762        #[allow(unused_imports)]
30763        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
30764
30765        #[derive(SpecifiedValueInfo)]
30766        pub struct Longhands {
30767                pub border_top_width:
30768                    longhands::border_top_width::SpecifiedValue
30769                    ,
30770                pub border_top_style:
30771                    longhands::border_top_style::SpecifiedValue
30772                    ,
30773                pub border_top_color:
30774                    longhands::border_top_color::SpecifiedValue
30775                    ,
30776        }
30777
30778        /// Represents a serializable set of all of the longhand properties that
30779        /// correspond to a shorthand.
30780        pub struct LonghandsToSerialize<'a> {
30781                pub border_top_width:
30782                    &'a longhands::border_top_width::SpecifiedValue,
30783                pub border_top_style:
30784                    &'a longhands::border_top_style::SpecifiedValue,
30785                pub border_top_color:
30786                    &'a longhands::border_top_color::SpecifiedValue,
30787        }
30788
30789        impl<'a> LonghandsToSerialize<'a> {
30790            /// Tries to get a serializable set of longhands given a set of
30791            /// property declarations.
30792            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
30793                // Define all of the expected variables that correspond to the shorthand
30794                    let mut border_top_width =
30795                        None::<&'a longhands::border_top_width::SpecifiedValue>;
30796                    let mut border_top_style =
30797                        None::<&'a longhands::border_top_style::SpecifiedValue>;
30798                    let mut border_top_color =
30799                        None::<&'a longhands::border_top_color::SpecifiedValue>;
30800
30801                // Attempt to assign the incoming declarations to the expected variables
30802                for declaration in iter {
30803                    match *declaration {
30804                            PropertyDeclaration::BorderTopWidth(ref value) => {
30805                                border_top_width = Some(value)
30806                            },
30807                            PropertyDeclaration::BorderTopStyle(ref value) => {
30808                                border_top_style = Some(value)
30809                            },
30810                            PropertyDeclaration::BorderTopColor(ref value) => {
30811                                border_top_color = Some(value)
30812                            },
30813                        _ => {}
30814                    };
30815                }
30816
30817                // If any of the expected variables are missing, return an error
30818                match (
30819                        border_top_width,
30820                        border_top_style,
30821                        border_top_color,
30822                ) {
30823
30824                    (
30825                        Some(border_top_width),
30826                        Some(border_top_style),
30827                        Some(border_top_color),
30828                    ) =>
30829                    Ok(LonghandsToSerialize {
30830                            border_top_width,
30831                            border_top_style,
30832                            border_top_color,
30833                    }),
30834                    _ => Err(())
30835                }
30836            }
30837        }
30838
30839        /// Parse the given shorthand and fill the result into the
30840        /// `declarations` vector.
30841        pub fn parse_into<'i, 't>(
30842            declarations: &mut SourcePropertyDeclaration,
30843            context: &ParserContext,
30844            input: &mut Parser<'i, 't>,
30845        ) -> Result<(), ParseError<'i>> {
30846            #[allow(unused_imports)]
30847            use crate::properties::{NonCustomPropertyId, LonghandId};
30848            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
30849                    declarations.push(PropertyDeclaration::BorderTopWidth(
30850                        longhands.border_top_width
30851                    ));
30852                    declarations.push(PropertyDeclaration::BorderTopStyle(
30853                        longhands.border_top_style
30854                    ));
30855                    declarations.push(PropertyDeclaration::BorderTopColor(
30856                        longhands.border_top_color
30857                    ));
30858            })
30859        }
30860
30861        /// Try to serialize a given shorthand to a string.
30862        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
30863            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
30864                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
30865                Err(_) => Ok(())
30866            }
30867        }
30868
30869        
30870
30871    pub fn parse_value<'i, 't>(
30872        context: &ParserContext,
30873        input: &mut Parser<'i, 't>,
30874    ) -> Result<Longhands, ParseError<'i>> {
30875        let (color, style, width) = super::parse_border(context, input)?;
30876        Ok(expanded! {
30877            border_top_color: color,
30878            border_top_style: style,
30879            border_top_width: width
30880        })
30881    }
30882
30883    impl<'a> ToCss for LonghandsToSerialize<'a>  {
30884        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
30885            crate::values::specified::border::serialize_directional_border(
30886                dest,
30887                self.border_top_width,
30888                self.border_top_style,
30889                self.border_top_color
30890            )
30891        }
30892    }
30893
30894    
30895    }
30896
30897    
30898    
30899
30900    /// https://drafts.csswg.org/css-backgrounds/#border-right
30901    pub mod border_right {
30902        use cssparser::Parser;
30903        use crate::parser::ParserContext;
30904        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
30905        #[allow(unused_imports)]
30906        use selectors::parser::SelectorParseErrorKind;
30907        #[allow(unused_imports)]
30908        use std::fmt::{self, Write};
30909        #[allow(unused_imports)]
30910        use style_traits::{ParseError, StyleParseErrorKind};
30911        #[allow(unused_imports)]
30912        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
30913
30914        #[derive(SpecifiedValueInfo)]
30915        pub struct Longhands {
30916                pub border_right_width:
30917                    longhands::border_right_width::SpecifiedValue
30918                    ,
30919                pub border_right_style:
30920                    longhands::border_right_style::SpecifiedValue
30921                    ,
30922                pub border_right_color:
30923                    longhands::border_right_color::SpecifiedValue
30924                    ,
30925        }
30926
30927        /// Represents a serializable set of all of the longhand properties that
30928        /// correspond to a shorthand.
30929        pub struct LonghandsToSerialize<'a> {
30930                pub border_right_width:
30931                    &'a longhands::border_right_width::SpecifiedValue,
30932                pub border_right_style:
30933                    &'a longhands::border_right_style::SpecifiedValue,
30934                pub border_right_color:
30935                    &'a longhands::border_right_color::SpecifiedValue,
30936        }
30937
30938        impl<'a> LonghandsToSerialize<'a> {
30939            /// Tries to get a serializable set of longhands given a set of
30940            /// property declarations.
30941            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
30942                // Define all of the expected variables that correspond to the shorthand
30943                    let mut border_right_width =
30944                        None::<&'a longhands::border_right_width::SpecifiedValue>;
30945                    let mut border_right_style =
30946                        None::<&'a longhands::border_right_style::SpecifiedValue>;
30947                    let mut border_right_color =
30948                        None::<&'a longhands::border_right_color::SpecifiedValue>;
30949
30950                // Attempt to assign the incoming declarations to the expected variables
30951                for declaration in iter {
30952                    match *declaration {
30953                            PropertyDeclaration::BorderRightWidth(ref value) => {
30954                                border_right_width = Some(value)
30955                            },
30956                            PropertyDeclaration::BorderRightStyle(ref value) => {
30957                                border_right_style = Some(value)
30958                            },
30959                            PropertyDeclaration::BorderRightColor(ref value) => {
30960                                border_right_color = Some(value)
30961                            },
30962                        _ => {}
30963                    };
30964                }
30965
30966                // If any of the expected variables are missing, return an error
30967                match (
30968                        border_right_width,
30969                        border_right_style,
30970                        border_right_color,
30971                ) {
30972
30973                    (
30974                        Some(border_right_width),
30975                        Some(border_right_style),
30976                        Some(border_right_color),
30977                    ) =>
30978                    Ok(LonghandsToSerialize {
30979                            border_right_width,
30980                            border_right_style,
30981                            border_right_color,
30982                    }),
30983                    _ => Err(())
30984                }
30985            }
30986        }
30987
30988        /// Parse the given shorthand and fill the result into the
30989        /// `declarations` vector.
30990        pub fn parse_into<'i, 't>(
30991            declarations: &mut SourcePropertyDeclaration,
30992            context: &ParserContext,
30993            input: &mut Parser<'i, 't>,
30994        ) -> Result<(), ParseError<'i>> {
30995            #[allow(unused_imports)]
30996            use crate::properties::{NonCustomPropertyId, LonghandId};
30997            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
30998                    declarations.push(PropertyDeclaration::BorderRightWidth(
30999                        longhands.border_right_width
31000                    ));
31001                    declarations.push(PropertyDeclaration::BorderRightStyle(
31002                        longhands.border_right_style
31003                    ));
31004                    declarations.push(PropertyDeclaration::BorderRightColor(
31005                        longhands.border_right_color
31006                    ));
31007            })
31008        }
31009
31010        /// Try to serialize a given shorthand to a string.
31011        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
31012            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
31013                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
31014                Err(_) => Ok(())
31015            }
31016        }
31017
31018        
31019
31020    pub fn parse_value<'i, 't>(
31021        context: &ParserContext,
31022        input: &mut Parser<'i, 't>,
31023    ) -> Result<Longhands, ParseError<'i>> {
31024        let (color, style, width) = super::parse_border(context, input)?;
31025        Ok(expanded! {
31026            border_right_color: color,
31027            border_right_style: style,
31028            border_right_width: width
31029        })
31030    }
31031
31032    impl<'a> ToCss for LonghandsToSerialize<'a>  {
31033        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
31034            crate::values::specified::border::serialize_directional_border(
31035                dest,
31036                self.border_right_width,
31037                self.border_right_style,
31038                self.border_right_color
31039            )
31040        }
31041    }
31042
31043    
31044    }
31045
31046    
31047    
31048
31049    /// https://drafts.csswg.org/css-backgrounds/#border-bottom
31050    pub mod border_bottom {
31051        use cssparser::Parser;
31052        use crate::parser::ParserContext;
31053        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
31054        #[allow(unused_imports)]
31055        use selectors::parser::SelectorParseErrorKind;
31056        #[allow(unused_imports)]
31057        use std::fmt::{self, Write};
31058        #[allow(unused_imports)]
31059        use style_traits::{ParseError, StyleParseErrorKind};
31060        #[allow(unused_imports)]
31061        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
31062
31063        #[derive(SpecifiedValueInfo)]
31064        pub struct Longhands {
31065                pub border_bottom_width:
31066                    longhands::border_bottom_width::SpecifiedValue
31067                    ,
31068                pub border_bottom_style:
31069                    longhands::border_bottom_style::SpecifiedValue
31070                    ,
31071                pub border_bottom_color:
31072                    longhands::border_bottom_color::SpecifiedValue
31073                    ,
31074        }
31075
31076        /// Represents a serializable set of all of the longhand properties that
31077        /// correspond to a shorthand.
31078        pub struct LonghandsToSerialize<'a> {
31079                pub border_bottom_width:
31080                    &'a longhands::border_bottom_width::SpecifiedValue,
31081                pub border_bottom_style:
31082                    &'a longhands::border_bottom_style::SpecifiedValue,
31083                pub border_bottom_color:
31084                    &'a longhands::border_bottom_color::SpecifiedValue,
31085        }
31086
31087        impl<'a> LonghandsToSerialize<'a> {
31088            /// Tries to get a serializable set of longhands given a set of
31089            /// property declarations.
31090            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
31091                // Define all of the expected variables that correspond to the shorthand
31092                    let mut border_bottom_width =
31093                        None::<&'a longhands::border_bottom_width::SpecifiedValue>;
31094                    let mut border_bottom_style =
31095                        None::<&'a longhands::border_bottom_style::SpecifiedValue>;
31096                    let mut border_bottom_color =
31097                        None::<&'a longhands::border_bottom_color::SpecifiedValue>;
31098
31099                // Attempt to assign the incoming declarations to the expected variables
31100                for declaration in iter {
31101                    match *declaration {
31102                            PropertyDeclaration::BorderBottomWidth(ref value) => {
31103                                border_bottom_width = Some(value)
31104                            },
31105                            PropertyDeclaration::BorderBottomStyle(ref value) => {
31106                                border_bottom_style = Some(value)
31107                            },
31108                            PropertyDeclaration::BorderBottomColor(ref value) => {
31109                                border_bottom_color = Some(value)
31110                            },
31111                        _ => {}
31112                    };
31113                }
31114
31115                // If any of the expected variables are missing, return an error
31116                match (
31117                        border_bottom_width,
31118                        border_bottom_style,
31119                        border_bottom_color,
31120                ) {
31121
31122                    (
31123                        Some(border_bottom_width),
31124                        Some(border_bottom_style),
31125                        Some(border_bottom_color),
31126                    ) =>
31127                    Ok(LonghandsToSerialize {
31128                            border_bottom_width,
31129                            border_bottom_style,
31130                            border_bottom_color,
31131                    }),
31132                    _ => Err(())
31133                }
31134            }
31135        }
31136
31137        /// Parse the given shorthand and fill the result into the
31138        /// `declarations` vector.
31139        pub fn parse_into<'i, 't>(
31140            declarations: &mut SourcePropertyDeclaration,
31141            context: &ParserContext,
31142            input: &mut Parser<'i, 't>,
31143        ) -> Result<(), ParseError<'i>> {
31144            #[allow(unused_imports)]
31145            use crate::properties::{NonCustomPropertyId, LonghandId};
31146            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
31147                    declarations.push(PropertyDeclaration::BorderBottomWidth(
31148                        longhands.border_bottom_width
31149                    ));
31150                    declarations.push(PropertyDeclaration::BorderBottomStyle(
31151                        longhands.border_bottom_style
31152                    ));
31153                    declarations.push(PropertyDeclaration::BorderBottomColor(
31154                        longhands.border_bottom_color
31155                    ));
31156            })
31157        }
31158
31159        /// Try to serialize a given shorthand to a string.
31160        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
31161            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
31162                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
31163                Err(_) => Ok(())
31164            }
31165        }
31166
31167        
31168
31169    pub fn parse_value<'i, 't>(
31170        context: &ParserContext,
31171        input: &mut Parser<'i, 't>,
31172    ) -> Result<Longhands, ParseError<'i>> {
31173        let (color, style, width) = super::parse_border(context, input)?;
31174        Ok(expanded! {
31175            border_bottom_color: color,
31176            border_bottom_style: style,
31177            border_bottom_width: width
31178        })
31179    }
31180
31181    impl<'a> ToCss for LonghandsToSerialize<'a>  {
31182        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
31183            crate::values::specified::border::serialize_directional_border(
31184                dest,
31185                self.border_bottom_width,
31186                self.border_bottom_style,
31187                self.border_bottom_color
31188            )
31189        }
31190    }
31191
31192    
31193    }
31194
31195    
31196    
31197
31198    /// https://drafts.csswg.org/css-backgrounds/#border-left
31199    pub mod border_left {
31200        use cssparser::Parser;
31201        use crate::parser::ParserContext;
31202        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
31203        #[allow(unused_imports)]
31204        use selectors::parser::SelectorParseErrorKind;
31205        #[allow(unused_imports)]
31206        use std::fmt::{self, Write};
31207        #[allow(unused_imports)]
31208        use style_traits::{ParseError, StyleParseErrorKind};
31209        #[allow(unused_imports)]
31210        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
31211
31212        #[derive(SpecifiedValueInfo)]
31213        pub struct Longhands {
31214                pub border_left_width:
31215                    longhands::border_left_width::SpecifiedValue
31216                    ,
31217                pub border_left_style:
31218                    longhands::border_left_style::SpecifiedValue
31219                    ,
31220                pub border_left_color:
31221                    longhands::border_left_color::SpecifiedValue
31222                    ,
31223        }
31224
31225        /// Represents a serializable set of all of the longhand properties that
31226        /// correspond to a shorthand.
31227        pub struct LonghandsToSerialize<'a> {
31228                pub border_left_width:
31229                    &'a longhands::border_left_width::SpecifiedValue,
31230                pub border_left_style:
31231                    &'a longhands::border_left_style::SpecifiedValue,
31232                pub border_left_color:
31233                    &'a longhands::border_left_color::SpecifiedValue,
31234        }
31235
31236        impl<'a> LonghandsToSerialize<'a> {
31237            /// Tries to get a serializable set of longhands given a set of
31238            /// property declarations.
31239            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
31240                // Define all of the expected variables that correspond to the shorthand
31241                    let mut border_left_width =
31242                        None::<&'a longhands::border_left_width::SpecifiedValue>;
31243                    let mut border_left_style =
31244                        None::<&'a longhands::border_left_style::SpecifiedValue>;
31245                    let mut border_left_color =
31246                        None::<&'a longhands::border_left_color::SpecifiedValue>;
31247
31248                // Attempt to assign the incoming declarations to the expected variables
31249                for declaration in iter {
31250                    match *declaration {
31251                            PropertyDeclaration::BorderLeftWidth(ref value) => {
31252                                border_left_width = Some(value)
31253                            },
31254                            PropertyDeclaration::BorderLeftStyle(ref value) => {
31255                                border_left_style = Some(value)
31256                            },
31257                            PropertyDeclaration::BorderLeftColor(ref value) => {
31258                                border_left_color = Some(value)
31259                            },
31260                        _ => {}
31261                    };
31262                }
31263
31264                // If any of the expected variables are missing, return an error
31265                match (
31266                        border_left_width,
31267                        border_left_style,
31268                        border_left_color,
31269                ) {
31270
31271                    (
31272                        Some(border_left_width),
31273                        Some(border_left_style),
31274                        Some(border_left_color),
31275                    ) =>
31276                    Ok(LonghandsToSerialize {
31277                            border_left_width,
31278                            border_left_style,
31279                            border_left_color,
31280                    }),
31281                    _ => Err(())
31282                }
31283            }
31284        }
31285
31286        /// Parse the given shorthand and fill the result into the
31287        /// `declarations` vector.
31288        pub fn parse_into<'i, 't>(
31289            declarations: &mut SourcePropertyDeclaration,
31290            context: &ParserContext,
31291            input: &mut Parser<'i, 't>,
31292        ) -> Result<(), ParseError<'i>> {
31293            #[allow(unused_imports)]
31294            use crate::properties::{NonCustomPropertyId, LonghandId};
31295            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
31296                    declarations.push(PropertyDeclaration::BorderLeftWidth(
31297                        longhands.border_left_width
31298                    ));
31299                    declarations.push(PropertyDeclaration::BorderLeftStyle(
31300                        longhands.border_left_style
31301                    ));
31302                    declarations.push(PropertyDeclaration::BorderLeftColor(
31303                        longhands.border_left_color
31304                    ));
31305            })
31306        }
31307
31308        /// Try to serialize a given shorthand to a string.
31309        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
31310            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
31311                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
31312                Err(_) => Ok(())
31313            }
31314        }
31315
31316        
31317
31318    pub fn parse_value<'i, 't>(
31319        context: &ParserContext,
31320        input: &mut Parser<'i, 't>,
31321    ) -> Result<Longhands, ParseError<'i>> {
31322        let (color, style, width) = super::parse_border(context, input)?;
31323        Ok(expanded! {
31324            border_left_color: color,
31325            border_left_style: style,
31326            border_left_width: width
31327        })
31328    }
31329
31330    impl<'a> ToCss for LonghandsToSerialize<'a>  {
31331        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
31332            crate::values::specified::border::serialize_directional_border(
31333                dest,
31334                self.border_left_width,
31335                self.border_left_style,
31336                self.border_left_color
31337            )
31338        }
31339    }
31340
31341    
31342    }
31343
31344    
31345    
31346
31347    /// https://drafts.csswg.org/css-logical-props/#propdef-border-block-start
31348    pub mod border_block_start {
31349        use cssparser::Parser;
31350        use crate::parser::ParserContext;
31351        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
31352        #[allow(unused_imports)]
31353        use selectors::parser::SelectorParseErrorKind;
31354        #[allow(unused_imports)]
31355        use std::fmt::{self, Write};
31356        #[allow(unused_imports)]
31357        use style_traits::{ParseError, StyleParseErrorKind};
31358        #[allow(unused_imports)]
31359        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
31360
31361        #[derive(SpecifiedValueInfo)]
31362        pub struct Longhands {
31363                pub border_block_start_width:
31364                    longhands::border_block_start_width::SpecifiedValue
31365                    ,
31366                pub border_block_start_style:
31367                    longhands::border_block_start_style::SpecifiedValue
31368                    ,
31369                pub border_block_start_color:
31370                    longhands::border_block_start_color::SpecifiedValue
31371                    ,
31372        }
31373
31374        /// Represents a serializable set of all of the longhand properties that
31375        /// correspond to a shorthand.
31376        pub struct LonghandsToSerialize<'a> {
31377                pub border_block_start_width:
31378                    &'a longhands::border_block_start_width::SpecifiedValue,
31379                pub border_block_start_style:
31380                    &'a longhands::border_block_start_style::SpecifiedValue,
31381                pub border_block_start_color:
31382                    &'a longhands::border_block_start_color::SpecifiedValue,
31383        }
31384
31385        impl<'a> LonghandsToSerialize<'a> {
31386            /// Tries to get a serializable set of longhands given a set of
31387            /// property declarations.
31388            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
31389                // Define all of the expected variables that correspond to the shorthand
31390                    let mut border_block_start_width =
31391                        None::<&'a longhands::border_block_start_width::SpecifiedValue>;
31392                    let mut border_block_start_style =
31393                        None::<&'a longhands::border_block_start_style::SpecifiedValue>;
31394                    let mut border_block_start_color =
31395                        None::<&'a longhands::border_block_start_color::SpecifiedValue>;
31396
31397                // Attempt to assign the incoming declarations to the expected variables
31398                for declaration in iter {
31399                    match *declaration {
31400                            PropertyDeclaration::BorderBlockStartWidth(ref value) => {
31401                                border_block_start_width = Some(value)
31402                            },
31403                            PropertyDeclaration::BorderBlockStartStyle(ref value) => {
31404                                border_block_start_style = Some(value)
31405                            },
31406                            PropertyDeclaration::BorderBlockStartColor(ref value) => {
31407                                border_block_start_color = Some(value)
31408                            },
31409                        _ => {}
31410                    };
31411                }
31412
31413                // If any of the expected variables are missing, return an error
31414                match (
31415                        border_block_start_width,
31416                        border_block_start_style,
31417                        border_block_start_color,
31418                ) {
31419
31420                    (
31421                        Some(border_block_start_width),
31422                        Some(border_block_start_style),
31423                        Some(border_block_start_color),
31424                    ) =>
31425                    Ok(LonghandsToSerialize {
31426                            border_block_start_width,
31427                            border_block_start_style,
31428                            border_block_start_color,
31429                    }),
31430                    _ => Err(())
31431                }
31432            }
31433        }
31434
31435        /// Parse the given shorthand and fill the result into the
31436        /// `declarations` vector.
31437        pub fn parse_into<'i, 't>(
31438            declarations: &mut SourcePropertyDeclaration,
31439            context: &ParserContext,
31440            input: &mut Parser<'i, 't>,
31441        ) -> Result<(), ParseError<'i>> {
31442            #[allow(unused_imports)]
31443            use crate::properties::{NonCustomPropertyId, LonghandId};
31444            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
31445                    declarations.push(PropertyDeclaration::BorderBlockStartWidth(
31446                        longhands.border_block_start_width
31447                    ));
31448                    declarations.push(PropertyDeclaration::BorderBlockStartStyle(
31449                        longhands.border_block_start_style
31450                    ));
31451                    declarations.push(PropertyDeclaration::BorderBlockStartColor(
31452                        longhands.border_block_start_color
31453                    ));
31454            })
31455        }
31456
31457        /// Try to serialize a given shorthand to a string.
31458        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
31459            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
31460                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
31461                Err(_) => Ok(())
31462            }
31463        }
31464
31465        
31466
31467    pub fn parse_value<'i, 't>(
31468        context: &ParserContext,
31469        input: &mut Parser<'i, 't>,
31470    ) -> Result<Longhands, ParseError<'i>> {
31471        let (color, style, width) = super::parse_border(context, input)?;
31472        Ok(expanded! {
31473            border_block_start_color: color,
31474            border_block_start_style: style,
31475            border_block_start_width: width
31476        })
31477    }
31478
31479    impl<'a> ToCss for LonghandsToSerialize<'a>  {
31480        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
31481            crate::values::specified::border::serialize_directional_border(
31482                dest,
31483                self.border_block_start_width,
31484                self.border_block_start_style,
31485                self.border_block_start_color
31486            )
31487        }
31488    }
31489
31490    
31491    }
31492
31493    
31494    
31495
31496    /// https://drafts.csswg.org/css-logical-props/#propdef-border-block-end
31497    pub mod border_block_end {
31498        use cssparser::Parser;
31499        use crate::parser::ParserContext;
31500        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
31501        #[allow(unused_imports)]
31502        use selectors::parser::SelectorParseErrorKind;
31503        #[allow(unused_imports)]
31504        use std::fmt::{self, Write};
31505        #[allow(unused_imports)]
31506        use style_traits::{ParseError, StyleParseErrorKind};
31507        #[allow(unused_imports)]
31508        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
31509
31510        #[derive(SpecifiedValueInfo)]
31511        pub struct Longhands {
31512                pub border_block_end_width:
31513                    longhands::border_block_end_width::SpecifiedValue
31514                    ,
31515                pub border_block_end_style:
31516                    longhands::border_block_end_style::SpecifiedValue
31517                    ,
31518                pub border_block_end_color:
31519                    longhands::border_block_end_color::SpecifiedValue
31520                    ,
31521        }
31522
31523        /// Represents a serializable set of all of the longhand properties that
31524        /// correspond to a shorthand.
31525        pub struct LonghandsToSerialize<'a> {
31526                pub border_block_end_width:
31527                    &'a longhands::border_block_end_width::SpecifiedValue,
31528                pub border_block_end_style:
31529                    &'a longhands::border_block_end_style::SpecifiedValue,
31530                pub border_block_end_color:
31531                    &'a longhands::border_block_end_color::SpecifiedValue,
31532        }
31533
31534        impl<'a> LonghandsToSerialize<'a> {
31535            /// Tries to get a serializable set of longhands given a set of
31536            /// property declarations.
31537            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
31538                // Define all of the expected variables that correspond to the shorthand
31539                    let mut border_block_end_width =
31540                        None::<&'a longhands::border_block_end_width::SpecifiedValue>;
31541                    let mut border_block_end_style =
31542                        None::<&'a longhands::border_block_end_style::SpecifiedValue>;
31543                    let mut border_block_end_color =
31544                        None::<&'a longhands::border_block_end_color::SpecifiedValue>;
31545
31546                // Attempt to assign the incoming declarations to the expected variables
31547                for declaration in iter {
31548                    match *declaration {
31549                            PropertyDeclaration::BorderBlockEndWidth(ref value) => {
31550                                border_block_end_width = Some(value)
31551                            },
31552                            PropertyDeclaration::BorderBlockEndStyle(ref value) => {
31553                                border_block_end_style = Some(value)
31554                            },
31555                            PropertyDeclaration::BorderBlockEndColor(ref value) => {
31556                                border_block_end_color = Some(value)
31557                            },
31558                        _ => {}
31559                    };
31560                }
31561
31562                // If any of the expected variables are missing, return an error
31563                match (
31564                        border_block_end_width,
31565                        border_block_end_style,
31566                        border_block_end_color,
31567                ) {
31568
31569                    (
31570                        Some(border_block_end_width),
31571                        Some(border_block_end_style),
31572                        Some(border_block_end_color),
31573                    ) =>
31574                    Ok(LonghandsToSerialize {
31575                            border_block_end_width,
31576                            border_block_end_style,
31577                            border_block_end_color,
31578                    }),
31579                    _ => Err(())
31580                }
31581            }
31582        }
31583
31584        /// Parse the given shorthand and fill the result into the
31585        /// `declarations` vector.
31586        pub fn parse_into<'i, 't>(
31587            declarations: &mut SourcePropertyDeclaration,
31588            context: &ParserContext,
31589            input: &mut Parser<'i, 't>,
31590        ) -> Result<(), ParseError<'i>> {
31591            #[allow(unused_imports)]
31592            use crate::properties::{NonCustomPropertyId, LonghandId};
31593            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
31594                    declarations.push(PropertyDeclaration::BorderBlockEndWidth(
31595                        longhands.border_block_end_width
31596                    ));
31597                    declarations.push(PropertyDeclaration::BorderBlockEndStyle(
31598                        longhands.border_block_end_style
31599                    ));
31600                    declarations.push(PropertyDeclaration::BorderBlockEndColor(
31601                        longhands.border_block_end_color
31602                    ));
31603            })
31604        }
31605
31606        /// Try to serialize a given shorthand to a string.
31607        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
31608            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
31609                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
31610                Err(_) => Ok(())
31611            }
31612        }
31613
31614        
31615
31616    pub fn parse_value<'i, 't>(
31617        context: &ParserContext,
31618        input: &mut Parser<'i, 't>,
31619    ) -> Result<Longhands, ParseError<'i>> {
31620        let (color, style, width) = super::parse_border(context, input)?;
31621        Ok(expanded! {
31622            border_block_end_color: color,
31623            border_block_end_style: style,
31624            border_block_end_width: width
31625        })
31626    }
31627
31628    impl<'a> ToCss for LonghandsToSerialize<'a>  {
31629        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
31630            crate::values::specified::border::serialize_directional_border(
31631                dest,
31632                self.border_block_end_width,
31633                self.border_block_end_style,
31634                self.border_block_end_color
31635            )
31636        }
31637    }
31638
31639    
31640    }
31641
31642    
31643    
31644
31645    /// https://drafts.csswg.org/css-logical-props/#propdef-border-inline-start
31646    pub mod border_inline_start {
31647        use cssparser::Parser;
31648        use crate::parser::ParserContext;
31649        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
31650        #[allow(unused_imports)]
31651        use selectors::parser::SelectorParseErrorKind;
31652        #[allow(unused_imports)]
31653        use std::fmt::{self, Write};
31654        #[allow(unused_imports)]
31655        use style_traits::{ParseError, StyleParseErrorKind};
31656        #[allow(unused_imports)]
31657        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
31658
31659        #[derive(SpecifiedValueInfo)]
31660        pub struct Longhands {
31661                pub border_inline_start_width:
31662                    longhands::border_inline_start_width::SpecifiedValue
31663                    ,
31664                pub border_inline_start_style:
31665                    longhands::border_inline_start_style::SpecifiedValue
31666                    ,
31667                pub border_inline_start_color:
31668                    longhands::border_inline_start_color::SpecifiedValue
31669                    ,
31670        }
31671
31672        /// Represents a serializable set of all of the longhand properties that
31673        /// correspond to a shorthand.
31674        pub struct LonghandsToSerialize<'a> {
31675                pub border_inline_start_width:
31676                    &'a longhands::border_inline_start_width::SpecifiedValue,
31677                pub border_inline_start_style:
31678                    &'a longhands::border_inline_start_style::SpecifiedValue,
31679                pub border_inline_start_color:
31680                    &'a longhands::border_inline_start_color::SpecifiedValue,
31681        }
31682
31683        impl<'a> LonghandsToSerialize<'a> {
31684            /// Tries to get a serializable set of longhands given a set of
31685            /// property declarations.
31686            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
31687                // Define all of the expected variables that correspond to the shorthand
31688                    let mut border_inline_start_width =
31689                        None::<&'a longhands::border_inline_start_width::SpecifiedValue>;
31690                    let mut border_inline_start_style =
31691                        None::<&'a longhands::border_inline_start_style::SpecifiedValue>;
31692                    let mut border_inline_start_color =
31693                        None::<&'a longhands::border_inline_start_color::SpecifiedValue>;
31694
31695                // Attempt to assign the incoming declarations to the expected variables
31696                for declaration in iter {
31697                    match *declaration {
31698                            PropertyDeclaration::BorderInlineStartWidth(ref value) => {
31699                                border_inline_start_width = Some(value)
31700                            },
31701                            PropertyDeclaration::BorderInlineStartStyle(ref value) => {
31702                                border_inline_start_style = Some(value)
31703                            },
31704                            PropertyDeclaration::BorderInlineStartColor(ref value) => {
31705                                border_inline_start_color = Some(value)
31706                            },
31707                        _ => {}
31708                    };
31709                }
31710
31711                // If any of the expected variables are missing, return an error
31712                match (
31713                        border_inline_start_width,
31714                        border_inline_start_style,
31715                        border_inline_start_color,
31716                ) {
31717
31718                    (
31719                        Some(border_inline_start_width),
31720                        Some(border_inline_start_style),
31721                        Some(border_inline_start_color),
31722                    ) =>
31723                    Ok(LonghandsToSerialize {
31724                            border_inline_start_width,
31725                            border_inline_start_style,
31726                            border_inline_start_color,
31727                    }),
31728                    _ => Err(())
31729                }
31730            }
31731        }
31732
31733        /// Parse the given shorthand and fill the result into the
31734        /// `declarations` vector.
31735        pub fn parse_into<'i, 't>(
31736            declarations: &mut SourcePropertyDeclaration,
31737            context: &ParserContext,
31738            input: &mut Parser<'i, 't>,
31739        ) -> Result<(), ParseError<'i>> {
31740            #[allow(unused_imports)]
31741            use crate::properties::{NonCustomPropertyId, LonghandId};
31742            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
31743                    declarations.push(PropertyDeclaration::BorderInlineStartWidth(
31744                        longhands.border_inline_start_width
31745                    ));
31746                    declarations.push(PropertyDeclaration::BorderInlineStartStyle(
31747                        longhands.border_inline_start_style
31748                    ));
31749                    declarations.push(PropertyDeclaration::BorderInlineStartColor(
31750                        longhands.border_inline_start_color
31751                    ));
31752            })
31753        }
31754
31755        /// Try to serialize a given shorthand to a string.
31756        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
31757            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
31758                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
31759                Err(_) => Ok(())
31760            }
31761        }
31762
31763        
31764
31765    pub fn parse_value<'i, 't>(
31766        context: &ParserContext,
31767        input: &mut Parser<'i, 't>,
31768    ) -> Result<Longhands, ParseError<'i>> {
31769        let (color, style, width) = super::parse_border(context, input)?;
31770        Ok(expanded! {
31771            border_inline_start_color: color,
31772            border_inline_start_style: style,
31773            border_inline_start_width: width
31774        })
31775    }
31776
31777    impl<'a> ToCss for LonghandsToSerialize<'a>  {
31778        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
31779            crate::values::specified::border::serialize_directional_border(
31780                dest,
31781                self.border_inline_start_width,
31782                self.border_inline_start_style,
31783                self.border_inline_start_color
31784            )
31785        }
31786    }
31787
31788    
31789    }
31790
31791    
31792    
31793
31794    /// https://drafts.csswg.org/css-logical-props/#propdef-border-inline-end
31795    pub mod border_inline_end {
31796        use cssparser::Parser;
31797        use crate::parser::ParserContext;
31798        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
31799        #[allow(unused_imports)]
31800        use selectors::parser::SelectorParseErrorKind;
31801        #[allow(unused_imports)]
31802        use std::fmt::{self, Write};
31803        #[allow(unused_imports)]
31804        use style_traits::{ParseError, StyleParseErrorKind};
31805        #[allow(unused_imports)]
31806        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
31807
31808        #[derive(SpecifiedValueInfo)]
31809        pub struct Longhands {
31810                pub border_inline_end_width:
31811                    longhands::border_inline_end_width::SpecifiedValue
31812                    ,
31813                pub border_inline_end_style:
31814                    longhands::border_inline_end_style::SpecifiedValue
31815                    ,
31816                pub border_inline_end_color:
31817                    longhands::border_inline_end_color::SpecifiedValue
31818                    ,
31819        }
31820
31821        /// Represents a serializable set of all of the longhand properties that
31822        /// correspond to a shorthand.
31823        pub struct LonghandsToSerialize<'a> {
31824                pub border_inline_end_width:
31825                    &'a longhands::border_inline_end_width::SpecifiedValue,
31826                pub border_inline_end_style:
31827                    &'a longhands::border_inline_end_style::SpecifiedValue,
31828                pub border_inline_end_color:
31829                    &'a longhands::border_inline_end_color::SpecifiedValue,
31830        }
31831
31832        impl<'a> LonghandsToSerialize<'a> {
31833            /// Tries to get a serializable set of longhands given a set of
31834            /// property declarations.
31835            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
31836                // Define all of the expected variables that correspond to the shorthand
31837                    let mut border_inline_end_width =
31838                        None::<&'a longhands::border_inline_end_width::SpecifiedValue>;
31839                    let mut border_inline_end_style =
31840                        None::<&'a longhands::border_inline_end_style::SpecifiedValue>;
31841                    let mut border_inline_end_color =
31842                        None::<&'a longhands::border_inline_end_color::SpecifiedValue>;
31843
31844                // Attempt to assign the incoming declarations to the expected variables
31845                for declaration in iter {
31846                    match *declaration {
31847                            PropertyDeclaration::BorderInlineEndWidth(ref value) => {
31848                                border_inline_end_width = Some(value)
31849                            },
31850                            PropertyDeclaration::BorderInlineEndStyle(ref value) => {
31851                                border_inline_end_style = Some(value)
31852                            },
31853                            PropertyDeclaration::BorderInlineEndColor(ref value) => {
31854                                border_inline_end_color = Some(value)
31855                            },
31856                        _ => {}
31857                    };
31858                }
31859
31860                // If any of the expected variables are missing, return an error
31861                match (
31862                        border_inline_end_width,
31863                        border_inline_end_style,
31864                        border_inline_end_color,
31865                ) {
31866
31867                    (
31868                        Some(border_inline_end_width),
31869                        Some(border_inline_end_style),
31870                        Some(border_inline_end_color),
31871                    ) =>
31872                    Ok(LonghandsToSerialize {
31873                            border_inline_end_width,
31874                            border_inline_end_style,
31875                            border_inline_end_color,
31876                    }),
31877                    _ => Err(())
31878                }
31879            }
31880        }
31881
31882        /// Parse the given shorthand and fill the result into the
31883        /// `declarations` vector.
31884        pub fn parse_into<'i, 't>(
31885            declarations: &mut SourcePropertyDeclaration,
31886            context: &ParserContext,
31887            input: &mut Parser<'i, 't>,
31888        ) -> Result<(), ParseError<'i>> {
31889            #[allow(unused_imports)]
31890            use crate::properties::{NonCustomPropertyId, LonghandId};
31891            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
31892                    declarations.push(PropertyDeclaration::BorderInlineEndWidth(
31893                        longhands.border_inline_end_width
31894                    ));
31895                    declarations.push(PropertyDeclaration::BorderInlineEndStyle(
31896                        longhands.border_inline_end_style
31897                    ));
31898                    declarations.push(PropertyDeclaration::BorderInlineEndColor(
31899                        longhands.border_inline_end_color
31900                    ));
31901            })
31902        }
31903
31904        /// Try to serialize a given shorthand to a string.
31905        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
31906            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
31907                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
31908                Err(_) => Ok(())
31909            }
31910        }
31911
31912        
31913
31914    pub fn parse_value<'i, 't>(
31915        context: &ParserContext,
31916        input: &mut Parser<'i, 't>,
31917    ) -> Result<Longhands, ParseError<'i>> {
31918        let (color, style, width) = super::parse_border(context, input)?;
31919        Ok(expanded! {
31920            border_inline_end_color: color,
31921            border_inline_end_style: style,
31922            border_inline_end_width: width
31923        })
31924    }
31925
31926    impl<'a> ToCss for LonghandsToSerialize<'a>  {
31927        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
31928            crate::values::specified::border::serialize_directional_border(
31929                dest,
31930                self.border_inline_end_width,
31931                self.border_inline_end_style,
31932                self.border_inline_end_color
31933            )
31934        }
31935    }
31936
31937    
31938    }
31939
31940
31941
31942
31943    /// https://drafts.csswg.org/css-backgrounds/#border
31944    pub mod border {
31945        use cssparser::Parser;
31946        use crate::parser::ParserContext;
31947        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
31948        #[allow(unused_imports)]
31949        use selectors::parser::SelectorParseErrorKind;
31950        #[allow(unused_imports)]
31951        use std::fmt::{self, Write};
31952        #[allow(unused_imports)]
31953        use style_traits::{ParseError, StyleParseErrorKind};
31954        #[allow(unused_imports)]
31955        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
31956
31957        pub struct Longhands {
31958                pub border_top_width:
31959                    longhands::border_top_width::SpecifiedValue
31960                    ,
31961                pub border_top_style:
31962                    longhands::border_top_style::SpecifiedValue
31963                    ,
31964                pub border_top_color:
31965                    longhands::border_top_color::SpecifiedValue
31966                    ,
31967                pub border_right_width:
31968                    longhands::border_right_width::SpecifiedValue
31969                    ,
31970                pub border_right_style:
31971                    longhands::border_right_style::SpecifiedValue
31972                    ,
31973                pub border_right_color:
31974                    longhands::border_right_color::SpecifiedValue
31975                    ,
31976                pub border_bottom_width:
31977                    longhands::border_bottom_width::SpecifiedValue
31978                    ,
31979                pub border_bottom_style:
31980                    longhands::border_bottom_style::SpecifiedValue
31981                    ,
31982                pub border_bottom_color:
31983                    longhands::border_bottom_color::SpecifiedValue
31984                    ,
31985                pub border_left_width:
31986                    longhands::border_left_width::SpecifiedValue
31987                    ,
31988                pub border_left_style:
31989                    longhands::border_left_style::SpecifiedValue
31990                    ,
31991                pub border_left_color:
31992                    longhands::border_left_color::SpecifiedValue
31993                    ,
31994                pub border_image_outset:
31995                        Box<
31996                    longhands::border_image_outset::SpecifiedValue
31997                        >
31998                    ,
31999                pub border_image_repeat:
32000                    longhands::border_image_repeat::SpecifiedValue
32001                    ,
32002                pub border_image_slice:
32003                        Box<
32004                    longhands::border_image_slice::SpecifiedValue
32005                        >
32006                    ,
32007                pub border_image_source:
32008                    longhands::border_image_source::SpecifiedValue
32009                    ,
32010                pub border_image_width:
32011                        Box<
32012                    longhands::border_image_width::SpecifiedValue
32013                        >
32014                    ,
32015        }
32016
32017        /// Represents a serializable set of all of the longhand properties that
32018        /// correspond to a shorthand.
32019        pub struct LonghandsToSerialize<'a> {
32020                pub border_top_width:
32021                    &'a longhands::border_top_width::SpecifiedValue,
32022                pub border_top_style:
32023                    &'a longhands::border_top_style::SpecifiedValue,
32024                pub border_top_color:
32025                    &'a longhands::border_top_color::SpecifiedValue,
32026                pub border_right_width:
32027                    &'a longhands::border_right_width::SpecifiedValue,
32028                pub border_right_style:
32029                    &'a longhands::border_right_style::SpecifiedValue,
32030                pub border_right_color:
32031                    &'a longhands::border_right_color::SpecifiedValue,
32032                pub border_bottom_width:
32033                    &'a longhands::border_bottom_width::SpecifiedValue,
32034                pub border_bottom_style:
32035                    &'a longhands::border_bottom_style::SpecifiedValue,
32036                pub border_bottom_color:
32037                    &'a longhands::border_bottom_color::SpecifiedValue,
32038                pub border_left_width:
32039                    &'a longhands::border_left_width::SpecifiedValue,
32040                pub border_left_style:
32041                    &'a longhands::border_left_style::SpecifiedValue,
32042                pub border_left_color:
32043                    &'a longhands::border_left_color::SpecifiedValue,
32044                pub border_image_outset:
32045                    &'a longhands::border_image_outset::SpecifiedValue,
32046                pub border_image_repeat:
32047                    &'a longhands::border_image_repeat::SpecifiedValue,
32048                pub border_image_slice:
32049                    &'a longhands::border_image_slice::SpecifiedValue,
32050                pub border_image_source:
32051                    &'a longhands::border_image_source::SpecifiedValue,
32052                pub border_image_width:
32053                    &'a longhands::border_image_width::SpecifiedValue,
32054        }
32055
32056        impl<'a> LonghandsToSerialize<'a> {
32057            /// Tries to get a serializable set of longhands given a set of
32058            /// property declarations.
32059            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
32060                // Define all of the expected variables that correspond to the shorthand
32061                    let mut border_top_width =
32062                        None::<&'a longhands::border_top_width::SpecifiedValue>;
32063                    let mut border_top_style =
32064                        None::<&'a longhands::border_top_style::SpecifiedValue>;
32065                    let mut border_top_color =
32066                        None::<&'a longhands::border_top_color::SpecifiedValue>;
32067                    let mut border_right_width =
32068                        None::<&'a longhands::border_right_width::SpecifiedValue>;
32069                    let mut border_right_style =
32070                        None::<&'a longhands::border_right_style::SpecifiedValue>;
32071                    let mut border_right_color =
32072                        None::<&'a longhands::border_right_color::SpecifiedValue>;
32073                    let mut border_bottom_width =
32074                        None::<&'a longhands::border_bottom_width::SpecifiedValue>;
32075                    let mut border_bottom_style =
32076                        None::<&'a longhands::border_bottom_style::SpecifiedValue>;
32077                    let mut border_bottom_color =
32078                        None::<&'a longhands::border_bottom_color::SpecifiedValue>;
32079                    let mut border_left_width =
32080                        None::<&'a longhands::border_left_width::SpecifiedValue>;
32081                    let mut border_left_style =
32082                        None::<&'a longhands::border_left_style::SpecifiedValue>;
32083                    let mut border_left_color =
32084                        None::<&'a longhands::border_left_color::SpecifiedValue>;
32085                    let mut border_image_outset =
32086                        None::<&'a longhands::border_image_outset::SpecifiedValue>;
32087                    let mut border_image_repeat =
32088                        None::<&'a longhands::border_image_repeat::SpecifiedValue>;
32089                    let mut border_image_slice =
32090                        None::<&'a longhands::border_image_slice::SpecifiedValue>;
32091                    let mut border_image_source =
32092                        None::<&'a longhands::border_image_source::SpecifiedValue>;
32093                    let mut border_image_width =
32094                        None::<&'a longhands::border_image_width::SpecifiedValue>;
32095
32096                // Attempt to assign the incoming declarations to the expected variables
32097                for declaration in iter {
32098                    match *declaration {
32099                            PropertyDeclaration::BorderTopWidth(ref value) => {
32100                                border_top_width = Some(value)
32101                            },
32102                            PropertyDeclaration::BorderTopStyle(ref value) => {
32103                                border_top_style = Some(value)
32104                            },
32105                            PropertyDeclaration::BorderTopColor(ref value) => {
32106                                border_top_color = Some(value)
32107                            },
32108                            PropertyDeclaration::BorderRightWidth(ref value) => {
32109                                border_right_width = Some(value)
32110                            },
32111                            PropertyDeclaration::BorderRightStyle(ref value) => {
32112                                border_right_style = Some(value)
32113                            },
32114                            PropertyDeclaration::BorderRightColor(ref value) => {
32115                                border_right_color = Some(value)
32116                            },
32117                            PropertyDeclaration::BorderBottomWidth(ref value) => {
32118                                border_bottom_width = Some(value)
32119                            },
32120                            PropertyDeclaration::BorderBottomStyle(ref value) => {
32121                                border_bottom_style = Some(value)
32122                            },
32123                            PropertyDeclaration::BorderBottomColor(ref value) => {
32124                                border_bottom_color = Some(value)
32125                            },
32126                            PropertyDeclaration::BorderLeftWidth(ref value) => {
32127                                border_left_width = Some(value)
32128                            },
32129                            PropertyDeclaration::BorderLeftStyle(ref value) => {
32130                                border_left_style = Some(value)
32131                            },
32132                            PropertyDeclaration::BorderLeftColor(ref value) => {
32133                                border_left_color = Some(value)
32134                            },
32135                            PropertyDeclaration::BorderImageOutset(ref value) => {
32136                                border_image_outset = Some(value)
32137                            },
32138                            PropertyDeclaration::BorderImageRepeat(ref value) => {
32139                                border_image_repeat = Some(value)
32140                            },
32141                            PropertyDeclaration::BorderImageSlice(ref value) => {
32142                                border_image_slice = Some(value)
32143                            },
32144                            PropertyDeclaration::BorderImageSource(ref value) => {
32145                                border_image_source = Some(value)
32146                            },
32147                            PropertyDeclaration::BorderImageWidth(ref value) => {
32148                                border_image_width = Some(value)
32149                            },
32150                        _ => {}
32151                    };
32152                }
32153
32154                // If any of the expected variables are missing, return an error
32155                match (
32156                        border_top_width,
32157                        border_top_style,
32158                        border_top_color,
32159                        border_right_width,
32160                        border_right_style,
32161                        border_right_color,
32162                        border_bottom_width,
32163                        border_bottom_style,
32164                        border_bottom_color,
32165                        border_left_width,
32166                        border_left_style,
32167                        border_left_color,
32168                        border_image_outset,
32169                        border_image_repeat,
32170                        border_image_slice,
32171                        border_image_source,
32172                        border_image_width,
32173                ) {
32174
32175                    (
32176                        Some(border_top_width),
32177                        Some(border_top_style),
32178                        Some(border_top_color),
32179                        Some(border_right_width),
32180                        Some(border_right_style),
32181                        Some(border_right_color),
32182                        Some(border_bottom_width),
32183                        Some(border_bottom_style),
32184                        Some(border_bottom_color),
32185                        Some(border_left_width),
32186                        Some(border_left_style),
32187                        Some(border_left_color),
32188                        Some(border_image_outset),
32189                        Some(border_image_repeat),
32190                        Some(border_image_slice),
32191                        Some(border_image_source),
32192                        Some(border_image_width),
32193                    ) =>
32194                    Ok(LonghandsToSerialize {
32195                            border_top_width,
32196                            border_top_style,
32197                            border_top_color,
32198                            border_right_width,
32199                            border_right_style,
32200                            border_right_color,
32201                            border_bottom_width,
32202                            border_bottom_style,
32203                            border_bottom_color,
32204                            border_left_width,
32205                            border_left_style,
32206                            border_left_color,
32207                            border_image_outset,
32208                            border_image_repeat,
32209                            border_image_slice,
32210                            border_image_source,
32211                            border_image_width,
32212                    }),
32213                    _ => Err(())
32214                }
32215            }
32216        }
32217
32218        /// Parse the given shorthand and fill the result into the
32219        /// `declarations` vector.
32220        pub fn parse_into<'i, 't>(
32221            declarations: &mut SourcePropertyDeclaration,
32222            context: &ParserContext,
32223            input: &mut Parser<'i, 't>,
32224        ) -> Result<(), ParseError<'i>> {
32225            #[allow(unused_imports)]
32226            use crate::properties::{NonCustomPropertyId, LonghandId};
32227            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
32228                    declarations.push(PropertyDeclaration::BorderTopWidth(
32229                        longhands.border_top_width
32230                    ));
32231                    declarations.push(PropertyDeclaration::BorderTopStyle(
32232                        longhands.border_top_style
32233                    ));
32234                    declarations.push(PropertyDeclaration::BorderTopColor(
32235                        longhands.border_top_color
32236                    ));
32237                    declarations.push(PropertyDeclaration::BorderRightWidth(
32238                        longhands.border_right_width
32239                    ));
32240                    declarations.push(PropertyDeclaration::BorderRightStyle(
32241                        longhands.border_right_style
32242                    ));
32243                    declarations.push(PropertyDeclaration::BorderRightColor(
32244                        longhands.border_right_color
32245                    ));
32246                    declarations.push(PropertyDeclaration::BorderBottomWidth(
32247                        longhands.border_bottom_width
32248                    ));
32249                    declarations.push(PropertyDeclaration::BorderBottomStyle(
32250                        longhands.border_bottom_style
32251                    ));
32252                    declarations.push(PropertyDeclaration::BorderBottomColor(
32253                        longhands.border_bottom_color
32254                    ));
32255                    declarations.push(PropertyDeclaration::BorderLeftWidth(
32256                        longhands.border_left_width
32257                    ));
32258                    declarations.push(PropertyDeclaration::BorderLeftStyle(
32259                        longhands.border_left_style
32260                    ));
32261                    declarations.push(PropertyDeclaration::BorderLeftColor(
32262                        longhands.border_left_color
32263                    ));
32264                    declarations.push(PropertyDeclaration::BorderImageOutset(
32265                        longhands.border_image_outset
32266                    ));
32267                    declarations.push(PropertyDeclaration::BorderImageRepeat(
32268                        longhands.border_image_repeat
32269                    ));
32270                    declarations.push(PropertyDeclaration::BorderImageSlice(
32271                        longhands.border_image_slice
32272                    ));
32273                    declarations.push(PropertyDeclaration::BorderImageSource(
32274                        longhands.border_image_source
32275                    ));
32276                    declarations.push(PropertyDeclaration::BorderImageWidth(
32277                        longhands.border_image_width
32278                    ));
32279            })
32280        }
32281
32282        /// Try to serialize a given shorthand to a string.
32283        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
32284            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
32285                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
32286                Err(_) => Ok(())
32287            }
32288        }
32289
32290        
32291
32292    pub fn parse_value<'i, 't>(
32293        context: &ParserContext,
32294        input: &mut Parser<'i, 't>,
32295    ) -> Result<Longhands, ParseError<'i>> {
32296        use crate::properties::longhands::{border_image_outset, border_image_repeat, border_image_slice};
32297        use crate::properties::longhands::{border_image_source, border_image_width};
32298
32299        let (color, style, width) = super::parse_border(context, input)?;
32300        Ok(expanded! {
32301                border_top_color: color.clone(),
32302                border_top_style: style,
32303                border_top_width: width.clone(),
32304                border_right_color: color.clone(),
32305                border_right_style: style,
32306                border_right_width: width.clone(),
32307                border_bottom_color: color.clone(),
32308                border_bottom_style: style,
32309                border_bottom_width: width.clone(),
32310                border_left_color: color.clone(),
32311                border_left_style: style,
32312                border_left_width: width.clone(),
32313
32314            // The ‘border’ shorthand resets ‘border-image’ to its initial value.
32315            // See https://drafts.csswg.org/css-backgrounds-3/#the-border-shorthands
32316                border_image_outset: border_image_outset::get_initial_specified_value(),
32317                border_image_repeat: border_image_repeat::get_initial_specified_value(),
32318                border_image_slice: border_image_slice::get_initial_specified_value(),
32319                border_image_source: border_image_source::get_initial_specified_value(),
32320                border_image_width: border_image_width::get_initial_specified_value(),
32321        })
32322    }
32323
32324    impl<'a> ToCss for LonghandsToSerialize<'a>  {
32325        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
32326            use crate::properties::longhands;
32327
32328            // If any of the border-image longhands differ from their initial specified values we should not
32329            // invoke serialize_directional_border(), so there is no point in continuing on to compute all_equal.
32330                if *self.border_image_outset != longhands::border_image_outset::get_initial_specified_value() {
32331                    return Ok(());
32332                }
32333                if *self.border_image_repeat != longhands::border_image_repeat::get_initial_specified_value() {
32334                    return Ok(());
32335                }
32336                if *self.border_image_slice != longhands::border_image_slice::get_initial_specified_value() {
32337                    return Ok(());
32338                }
32339                if *self.border_image_source != longhands::border_image_source::get_initial_specified_value() {
32340                    return Ok(());
32341                }
32342                if *self.border_image_width != longhands::border_image_width::get_initial_specified_value() {
32343                    return Ok(());
32344                }
32345
32346            let all_equal = {
32347                  let border_top_width = self.border_top_width;
32348                  let border_top_style = self.border_top_style;
32349                  let border_top_color = self.border_top_color;
32350                  let border_right_width = self.border_right_width;
32351                  let border_right_style = self.border_right_style;
32352                  let border_right_color = self.border_right_color;
32353                  let border_bottom_width = self.border_bottom_width;
32354                  let border_bottom_style = self.border_bottom_style;
32355                  let border_bottom_color = self.border_bottom_color;
32356                  let border_left_width = self.border_left_width;
32357                  let border_left_style = self.border_left_style;
32358                  let border_left_color = self.border_left_color;
32359
32360                border_top_width == border_right_width &&
32361                border_right_width == border_bottom_width &&
32362                border_bottom_width == border_left_width &&
32363
32364                border_top_style == border_right_style &&
32365                border_right_style == border_bottom_style &&
32366                border_bottom_style == border_left_style &&
32367
32368                border_top_color == border_right_color &&
32369                border_right_color == border_bottom_color &&
32370                border_bottom_color == border_left_color
32371            };
32372
32373            // If all longhands are all present, then all sides should be the same,
32374            // so we can just one set of color/style/width
32375            if !all_equal {
32376                return Ok(())
32377            }
32378            crate::values::specified::border::serialize_directional_border(
32379                dest,
32380                self.border_left_width,
32381                self.border_left_style,
32382                self.border_left_color
32383            )
32384        }
32385    }
32386
32387    // Just use the same as border-left. The border shorthand can't accept
32388    // any value that the sub-shorthand couldn't.
32389    
32390    impl SpecifiedValueInfo for Longhands {
32391        const SUPPORTED_TYPES: u8 = <crate::properties::shorthands::border_left::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES;
32392        fn collect_completion_keywords(f: KeywordsCollectFn) {
32393            <crate::properties::shorthands::border_left::Longhands as SpecifiedValueInfo>::collect_completion_keywords(f);
32394        }
32395    }
32396
32397    }
32398
32399
32400
32401
32402    /// https://drafts.csswg.org/css-backgrounds/#border-radius
32403    pub mod border_radius {
32404        use cssparser::Parser;
32405        use crate::parser::ParserContext;
32406        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
32407        #[allow(unused_imports)]
32408        use selectors::parser::SelectorParseErrorKind;
32409        #[allow(unused_imports)]
32410        use std::fmt::{self, Write};
32411        #[allow(unused_imports)]
32412        use style_traits::{ParseError, StyleParseErrorKind};
32413        #[allow(unused_imports)]
32414        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
32415
32416        #[derive(SpecifiedValueInfo)]
32417        pub struct Longhands {
32418                pub border_top_left_radius:
32419                        Box<
32420                    longhands::border_top_left_radius::SpecifiedValue
32421                        >
32422                    ,
32423                pub border_top_right_radius:
32424                        Box<
32425                    longhands::border_top_right_radius::SpecifiedValue
32426                        >
32427                    ,
32428                pub border_bottom_right_radius:
32429                        Box<
32430                    longhands::border_bottom_right_radius::SpecifiedValue
32431                        >
32432                    ,
32433                pub border_bottom_left_radius:
32434                        Box<
32435                    longhands::border_bottom_left_radius::SpecifiedValue
32436                        >
32437                    ,
32438        }
32439
32440        /// Represents a serializable set of all of the longhand properties that
32441        /// correspond to a shorthand.
32442        pub struct LonghandsToSerialize<'a> {
32443                pub border_top_left_radius:
32444                    &'a longhands::border_top_left_radius::SpecifiedValue,
32445                pub border_top_right_radius:
32446                    &'a longhands::border_top_right_radius::SpecifiedValue,
32447                pub border_bottom_right_radius:
32448                    &'a longhands::border_bottom_right_radius::SpecifiedValue,
32449                pub border_bottom_left_radius:
32450                    &'a longhands::border_bottom_left_radius::SpecifiedValue,
32451        }
32452
32453        impl<'a> LonghandsToSerialize<'a> {
32454            /// Tries to get a serializable set of longhands given a set of
32455            /// property declarations.
32456            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
32457                // Define all of the expected variables that correspond to the shorthand
32458                    let mut border_top_left_radius =
32459                        None::<&'a longhands::border_top_left_radius::SpecifiedValue>;
32460                    let mut border_top_right_radius =
32461                        None::<&'a longhands::border_top_right_radius::SpecifiedValue>;
32462                    let mut border_bottom_right_radius =
32463                        None::<&'a longhands::border_bottom_right_radius::SpecifiedValue>;
32464                    let mut border_bottom_left_radius =
32465                        None::<&'a longhands::border_bottom_left_radius::SpecifiedValue>;
32466
32467                // Attempt to assign the incoming declarations to the expected variables
32468                for declaration in iter {
32469                    match *declaration {
32470                            PropertyDeclaration::BorderTopLeftRadius(ref value) => {
32471                                border_top_left_radius = Some(value)
32472                            },
32473                            PropertyDeclaration::BorderTopRightRadius(ref value) => {
32474                                border_top_right_radius = Some(value)
32475                            },
32476                            PropertyDeclaration::BorderBottomRightRadius(ref value) => {
32477                                border_bottom_right_radius = Some(value)
32478                            },
32479                            PropertyDeclaration::BorderBottomLeftRadius(ref value) => {
32480                                border_bottom_left_radius = Some(value)
32481                            },
32482                        _ => {}
32483                    };
32484                }
32485
32486                // If any of the expected variables are missing, return an error
32487                match (
32488                        border_top_left_radius,
32489                        border_top_right_radius,
32490                        border_bottom_right_radius,
32491                        border_bottom_left_radius,
32492                ) {
32493
32494                    (
32495                        Some(border_top_left_radius),
32496                        Some(border_top_right_radius),
32497                        Some(border_bottom_right_radius),
32498                        Some(border_bottom_left_radius),
32499                    ) =>
32500                    Ok(LonghandsToSerialize {
32501                            border_top_left_radius,
32502                            border_top_right_radius,
32503                            border_bottom_right_radius,
32504                            border_bottom_left_radius,
32505                    }),
32506                    _ => Err(())
32507                }
32508            }
32509        }
32510
32511        /// Parse the given shorthand and fill the result into the
32512        /// `declarations` vector.
32513        pub fn parse_into<'i, 't>(
32514            declarations: &mut SourcePropertyDeclaration,
32515            context: &ParserContext,
32516            input: &mut Parser<'i, 't>,
32517        ) -> Result<(), ParseError<'i>> {
32518            #[allow(unused_imports)]
32519            use crate::properties::{NonCustomPropertyId, LonghandId};
32520            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
32521                    declarations.push(PropertyDeclaration::BorderTopLeftRadius(
32522                        longhands.border_top_left_radius
32523                    ));
32524                    declarations.push(PropertyDeclaration::BorderTopRightRadius(
32525                        longhands.border_top_right_radius
32526                    ));
32527                    declarations.push(PropertyDeclaration::BorderBottomRightRadius(
32528                        longhands.border_bottom_right_radius
32529                    ));
32530                    declarations.push(PropertyDeclaration::BorderBottomLeftRadius(
32531                        longhands.border_bottom_left_radius
32532                    ));
32533            })
32534        }
32535
32536        /// Try to serialize a given shorthand to a string.
32537        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
32538            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
32539                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
32540                Err(_) => Ok(())
32541            }
32542        }
32543
32544        
32545    use crate::values::generics::rect::Rect;
32546    use crate::values::generics::border::BorderCornerRadius;
32547    use crate::values::specified::border::BorderRadius;
32548    use crate::parser::Parse;
32549
32550    pub fn parse_value<'i, 't>(
32551        context: &ParserContext,
32552        input: &mut Parser<'i, 't>,
32553    ) -> Result<Longhands, ParseError<'i>> {
32554        let radii = BorderRadius::parse(context, input)?;
32555        Ok(expanded! {
32556            border_top_left_radius: radii.top_left,
32557            border_top_right_radius: radii.top_right,
32558            border_bottom_right_radius: radii.bottom_right,
32559            border_bottom_left_radius: radii.bottom_left,
32560        })
32561    }
32562
32563    impl<'a> ToCss for LonghandsToSerialize<'a>  {
32564        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
32565            let LonghandsToSerialize {
32566                border_top_left_radius: &BorderCornerRadius(ref tl),
32567                border_top_right_radius: &BorderCornerRadius(ref tr),
32568                border_bottom_right_radius: &BorderCornerRadius(ref br),
32569                border_bottom_left_radius: &BorderCornerRadius(ref bl),
32570            } = *self;
32571
32572
32573            let widths = Rect::new(tl.width(), tr.width(), br.width(), bl.width());
32574            let heights = Rect::new(tl.height(), tr.height(), br.height(), bl.height());
32575
32576            BorderRadius::serialize_rects(widths, heights, dest)
32577        }
32578    }
32579
32580    }
32581
32582
32583
32584
32585    /// https://drafts.csswg.org/css-backgrounds-3/#border-image
32586    pub mod border_image {
32587        use cssparser::Parser;
32588        use crate::parser::ParserContext;
32589        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
32590        #[allow(unused_imports)]
32591        use selectors::parser::SelectorParseErrorKind;
32592        #[allow(unused_imports)]
32593        use std::fmt::{self, Write};
32594        #[allow(unused_imports)]
32595        use style_traits::{ParseError, StyleParseErrorKind};
32596        #[allow(unused_imports)]
32597        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
32598
32599        #[derive(SpecifiedValueInfo)]
32600        pub struct Longhands {
32601                pub border_image_outset:
32602                        Box<
32603                    longhands::border_image_outset::SpecifiedValue
32604                        >
32605                    ,
32606                pub border_image_repeat:
32607                    longhands::border_image_repeat::SpecifiedValue
32608                    ,
32609                pub border_image_slice:
32610                        Box<
32611                    longhands::border_image_slice::SpecifiedValue
32612                        >
32613                    ,
32614                pub border_image_source:
32615                    longhands::border_image_source::SpecifiedValue
32616                    ,
32617                pub border_image_width:
32618                        Box<
32619                    longhands::border_image_width::SpecifiedValue
32620                        >
32621                    ,
32622        }
32623
32624        /// Represents a serializable set of all of the longhand properties that
32625        /// correspond to a shorthand.
32626        pub struct LonghandsToSerialize<'a> {
32627                pub border_image_outset:
32628                    &'a longhands::border_image_outset::SpecifiedValue,
32629                pub border_image_repeat:
32630                    &'a longhands::border_image_repeat::SpecifiedValue,
32631                pub border_image_slice:
32632                    &'a longhands::border_image_slice::SpecifiedValue,
32633                pub border_image_source:
32634                    &'a longhands::border_image_source::SpecifiedValue,
32635                pub border_image_width:
32636                    &'a longhands::border_image_width::SpecifiedValue,
32637        }
32638
32639        impl<'a> LonghandsToSerialize<'a> {
32640            /// Tries to get a serializable set of longhands given a set of
32641            /// property declarations.
32642            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
32643                // Define all of the expected variables that correspond to the shorthand
32644                    let mut border_image_outset =
32645                        None::<&'a longhands::border_image_outset::SpecifiedValue>;
32646                    let mut border_image_repeat =
32647                        None::<&'a longhands::border_image_repeat::SpecifiedValue>;
32648                    let mut border_image_slice =
32649                        None::<&'a longhands::border_image_slice::SpecifiedValue>;
32650                    let mut border_image_source =
32651                        None::<&'a longhands::border_image_source::SpecifiedValue>;
32652                    let mut border_image_width =
32653                        None::<&'a longhands::border_image_width::SpecifiedValue>;
32654
32655                // Attempt to assign the incoming declarations to the expected variables
32656                for declaration in iter {
32657                    match *declaration {
32658                            PropertyDeclaration::BorderImageOutset(ref value) => {
32659                                border_image_outset = Some(value)
32660                            },
32661                            PropertyDeclaration::BorderImageRepeat(ref value) => {
32662                                border_image_repeat = Some(value)
32663                            },
32664                            PropertyDeclaration::BorderImageSlice(ref value) => {
32665                                border_image_slice = Some(value)
32666                            },
32667                            PropertyDeclaration::BorderImageSource(ref value) => {
32668                                border_image_source = Some(value)
32669                            },
32670                            PropertyDeclaration::BorderImageWidth(ref value) => {
32671                                border_image_width = Some(value)
32672                            },
32673                        _ => {}
32674                    };
32675                }
32676
32677                // If any of the expected variables are missing, return an error
32678                match (
32679                        border_image_outset,
32680                        border_image_repeat,
32681                        border_image_slice,
32682                        border_image_source,
32683                        border_image_width,
32684                ) {
32685
32686                    (
32687                        Some(border_image_outset),
32688                        Some(border_image_repeat),
32689                        Some(border_image_slice),
32690                        Some(border_image_source),
32691                        Some(border_image_width),
32692                    ) =>
32693                    Ok(LonghandsToSerialize {
32694                            border_image_outset,
32695                            border_image_repeat,
32696                            border_image_slice,
32697                            border_image_source,
32698                            border_image_width,
32699                    }),
32700                    _ => Err(())
32701                }
32702            }
32703        }
32704
32705        /// Parse the given shorthand and fill the result into the
32706        /// `declarations` vector.
32707        pub fn parse_into<'i, 't>(
32708            declarations: &mut SourcePropertyDeclaration,
32709            context: &ParserContext,
32710            input: &mut Parser<'i, 't>,
32711        ) -> Result<(), ParseError<'i>> {
32712            #[allow(unused_imports)]
32713            use crate::properties::{NonCustomPropertyId, LonghandId};
32714            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
32715                    declarations.push(PropertyDeclaration::BorderImageOutset(
32716                        longhands.border_image_outset
32717                    ));
32718                    declarations.push(PropertyDeclaration::BorderImageRepeat(
32719                        longhands.border_image_repeat
32720                    ));
32721                    declarations.push(PropertyDeclaration::BorderImageSlice(
32722                        longhands.border_image_slice
32723                    ));
32724                    declarations.push(PropertyDeclaration::BorderImageSource(
32725                        longhands.border_image_source
32726                    ));
32727                    declarations.push(PropertyDeclaration::BorderImageWidth(
32728                        longhands.border_image_width
32729                    ));
32730            })
32731        }
32732
32733        /// Try to serialize a given shorthand to a string.
32734        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
32735            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
32736                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
32737                Err(_) => Ok(())
32738            }
32739        }
32740
32741        
32742    use crate::properties::longhands::{border_image_outset, border_image_repeat, border_image_slice};
32743    use crate::properties::longhands::{border_image_source, border_image_width};
32744
32745    pub fn parse_value<'i, 't>(
32746        context: &ParserContext,
32747        input: &mut Parser<'i, 't>,
32748    ) -> Result<Longhands, ParseError<'i>> {
32749        let mut outset = border_image_outset::get_initial_specified_value();
32750        let mut repeat = border_image_repeat::get_initial_specified_value();
32751        let mut slice = border_image_slice::get_initial_specified_value();
32752        let mut source = border_image_source::get_initial_specified_value();
32753        let mut width = border_image_width::get_initial_specified_value();
32754        let mut any = false;
32755        let mut parsed_slice = false;
32756        let mut parsed_source = false;
32757        let mut parsed_repeat = false;
32758        loop {
32759            if !parsed_slice {
32760                if let Ok(value) = input.try_parse(|input| border_image_slice::parse(context, input)) {
32761                    parsed_slice = true;
32762                    any = true;
32763                    slice = value;
32764                    // Parse border image width and outset, if applicable.
32765                    let maybe_width_outset: Result<_, ParseError> = input.try_parse(|input| {
32766                        input.expect_delim('/')?;
32767
32768                        // Parse border image width, if applicable.
32769                        let w = input.try_parse(|input| border_image_width::parse(context, input)).ok();
32770
32771                        // Parse border image outset if applicable.
32772                        let o = input.try_parse(|input| {
32773                            input.expect_delim('/')?;
32774                            border_image_outset::parse(context, input)
32775                        }).ok();
32776                        if w.is_none() && o.is_none() {
32777                            return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
32778                        }
32779                        Ok((w, o))
32780                    });
32781                    if let Ok((w, o)) = maybe_width_outset {
32782                        if let Some(w) = w {
32783                            width = w;
32784                        }
32785                        if let Some(o) = o {
32786                            outset = o;
32787                        }
32788                    }
32789                    continue;
32790                }
32791            }
32792                if !parsed_source {
32793                    if let Ok(value) = input.try_parse(|input| border_image_source::parse(context, input)) {
32794                        source = value;
32795                        parsed_source = true;
32796                        any = true;
32797                        continue
32798                    }
32799                }
32800                if !parsed_repeat {
32801                    if let Ok(value) = input.try_parse(|input| border_image_repeat::parse(context, input)) {
32802                        repeat = value;
32803                        parsed_repeat = true;
32804                        any = true;
32805                        continue
32806                    }
32807                }
32808            break
32809        }
32810        if !any {
32811            return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
32812        }
32813        Ok(expanded! {
32814                border_image_outset: outset,
32815                border_image_repeat: repeat,
32816                border_image_slice: slice,
32817                border_image_source: source,
32818                border_image_width: width,
32819         })
32820    }
32821
32822    impl<'a> ToCss for LonghandsToSerialize<'a>  {
32823        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
32824            let mut has_any = false;
32825            let has_source = *self.border_image_source != border_image_source::get_initial_specified_value();
32826            has_any = has_any || has_source;
32827            let has_slice = *self.border_image_slice != border_image_slice::get_initial_specified_value();
32828            has_any = has_any || has_slice;
32829            let has_outset = *self.border_image_outset != border_image_outset::get_initial_specified_value();
32830            has_any = has_any || has_outset;
32831            let has_width = *self.border_image_width != border_image_width::get_initial_specified_value();
32832            has_any = has_any || has_width;
32833            let has_repeat = *self.border_image_repeat != border_image_repeat::get_initial_specified_value();
32834            has_any = has_any || has_repeat;
32835            if has_source || !has_any {
32836                self.border_image_source.to_css(dest)?;
32837                if !has_any {
32838                    return Ok(());
32839                }
32840            }
32841            let needs_slice = has_slice || has_width || has_outset;
32842            if needs_slice {
32843                if has_source {
32844                    dest.write_char(' ')?;
32845                }
32846                self.border_image_slice.to_css(dest)?;
32847                if has_width || has_outset {
32848                    dest.write_str(" /")?;
32849                    if has_width {
32850                        dest.write_char(' ')?;
32851                        self.border_image_width.to_css(dest)?;
32852                    }
32853                    if has_outset {
32854                        dest.write_str(" / ")?;
32855                        self.border_image_outset.to_css(dest)?;
32856                    }
32857                }
32858            }
32859            if has_repeat {
32860                if has_source || needs_slice {
32861                    dest.write_char(' ')?;
32862                }
32863                self.border_image_repeat.to_css(dest)?;
32864            }
32865            Ok(())
32866        }
32867    }
32868
32869    }
32870
32871
32872        
32873        
32874
32875    /// https://drafts.csswg.org/css-logical/#propdef-border-block-width
32876    pub mod border_block_width {
32877        use cssparser::Parser;
32878        use crate::parser::ParserContext;
32879        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
32880        #[allow(unused_imports)]
32881        use selectors::parser::SelectorParseErrorKind;
32882        #[allow(unused_imports)]
32883        use std::fmt::{self, Write};
32884        #[allow(unused_imports)]
32885        use style_traits::{ParseError, StyleParseErrorKind};
32886        #[allow(unused_imports)]
32887        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
32888
32889        #[derive(SpecifiedValueInfo)]
32890        pub struct Longhands {
32891                pub border_block_start_width:
32892                    longhands::border_block_start_width::SpecifiedValue
32893                    ,
32894                pub border_block_end_width:
32895                    longhands::border_block_end_width::SpecifiedValue
32896                    ,
32897        }
32898
32899        /// Represents a serializable set of all of the longhand properties that
32900        /// correspond to a shorthand.
32901        pub struct LonghandsToSerialize<'a> {
32902                pub border_block_start_width:
32903                    &'a longhands::border_block_start_width::SpecifiedValue,
32904                pub border_block_end_width:
32905                    &'a longhands::border_block_end_width::SpecifiedValue,
32906        }
32907
32908        impl<'a> LonghandsToSerialize<'a> {
32909            /// Tries to get a serializable set of longhands given a set of
32910            /// property declarations.
32911            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
32912                // Define all of the expected variables that correspond to the shorthand
32913                    let mut border_block_start_width =
32914                        None::<&'a longhands::border_block_start_width::SpecifiedValue>;
32915                    let mut border_block_end_width =
32916                        None::<&'a longhands::border_block_end_width::SpecifiedValue>;
32917
32918                // Attempt to assign the incoming declarations to the expected variables
32919                for declaration in iter {
32920                    match *declaration {
32921                            PropertyDeclaration::BorderBlockStartWidth(ref value) => {
32922                                border_block_start_width = Some(value)
32923                            },
32924                            PropertyDeclaration::BorderBlockEndWidth(ref value) => {
32925                                border_block_end_width = Some(value)
32926                            },
32927                        _ => {}
32928                    };
32929                }
32930
32931                // If any of the expected variables are missing, return an error
32932                match (
32933                        border_block_start_width,
32934                        border_block_end_width,
32935                ) {
32936
32937                    (
32938                        Some(border_block_start_width),
32939                        Some(border_block_end_width),
32940                    ) =>
32941                    Ok(LonghandsToSerialize {
32942                            border_block_start_width,
32943                            border_block_end_width,
32944                    }),
32945                    _ => Err(())
32946                }
32947            }
32948        }
32949
32950        /// Parse the given shorthand and fill the result into the
32951        /// `declarations` vector.
32952        pub fn parse_into<'i, 't>(
32953            declarations: &mut SourcePropertyDeclaration,
32954            context: &ParserContext,
32955            input: &mut Parser<'i, 't>,
32956        ) -> Result<(), ParseError<'i>> {
32957            #[allow(unused_imports)]
32958            use crate::properties::{NonCustomPropertyId, LonghandId};
32959            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
32960                    declarations.push(PropertyDeclaration::BorderBlockStartWidth(
32961                        longhands.border_block_start_width
32962                    ));
32963                    declarations.push(PropertyDeclaration::BorderBlockEndWidth(
32964                        longhands.border_block_end_width
32965                    ));
32966            })
32967        }
32968
32969        /// Try to serialize a given shorthand to a string.
32970        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
32971            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
32972                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
32973                Err(_) => Ok(())
32974            }
32975        }
32976
32977        
32978
32979            use crate::properties::longhands::border_block_start_width;
32980            pub fn parse_value<'i, 't>(
32981                context: &ParserContext,
32982                input: &mut Parser<'i, 't>,
32983            ) -> Result<Longhands, ParseError<'i>> {
32984                let start_value = border_block_start_width::parse(context, input)?;
32985                let end_value =
32986                    input.try_parse(|input| border_block_start_width::parse(context, input))
32987                        .unwrap_or_else(|_| start_value.clone());
32988
32989                Ok(expanded! {
32990                    border_block_start_width: start_value,
32991                    border_block_end_width: end_value,
32992                })
32993            }
32994
32995            impl<'a> ToCss for LonghandsToSerialize<'a>  {
32996                fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
32997                    self.border_block_start_width.to_css(dest)?;
32998
32999                    if self.border_block_end_width != self.border_block_start_width {
33000                        dest.write_char(' ')?;
33001                        self.border_block_end_width.to_css(dest)?;
33002                    }
33003
33004                    Ok(())
33005                }
33006            }
33007        
33008    }
33009
33010        
33011        
33012
33013    /// https://drafts.csswg.org/css-logical/#propdef-border-block-style
33014    pub mod border_block_style {
33015        use cssparser::Parser;
33016        use crate::parser::ParserContext;
33017        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
33018        #[allow(unused_imports)]
33019        use selectors::parser::SelectorParseErrorKind;
33020        #[allow(unused_imports)]
33021        use std::fmt::{self, Write};
33022        #[allow(unused_imports)]
33023        use style_traits::{ParseError, StyleParseErrorKind};
33024        #[allow(unused_imports)]
33025        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
33026
33027        #[derive(SpecifiedValueInfo)]
33028        pub struct Longhands {
33029                pub border_block_start_style:
33030                    longhands::border_block_start_style::SpecifiedValue
33031                    ,
33032                pub border_block_end_style:
33033                    longhands::border_block_end_style::SpecifiedValue
33034                    ,
33035        }
33036
33037        /// Represents a serializable set of all of the longhand properties that
33038        /// correspond to a shorthand.
33039        pub struct LonghandsToSerialize<'a> {
33040                pub border_block_start_style:
33041                    &'a longhands::border_block_start_style::SpecifiedValue,
33042                pub border_block_end_style:
33043                    &'a longhands::border_block_end_style::SpecifiedValue,
33044        }
33045
33046        impl<'a> LonghandsToSerialize<'a> {
33047            /// Tries to get a serializable set of longhands given a set of
33048            /// property declarations.
33049            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
33050                // Define all of the expected variables that correspond to the shorthand
33051                    let mut border_block_start_style =
33052                        None::<&'a longhands::border_block_start_style::SpecifiedValue>;
33053                    let mut border_block_end_style =
33054                        None::<&'a longhands::border_block_end_style::SpecifiedValue>;
33055
33056                // Attempt to assign the incoming declarations to the expected variables
33057                for declaration in iter {
33058                    match *declaration {
33059                            PropertyDeclaration::BorderBlockStartStyle(ref value) => {
33060                                border_block_start_style = Some(value)
33061                            },
33062                            PropertyDeclaration::BorderBlockEndStyle(ref value) => {
33063                                border_block_end_style = Some(value)
33064                            },
33065                        _ => {}
33066                    };
33067                }
33068
33069                // If any of the expected variables are missing, return an error
33070                match (
33071                        border_block_start_style,
33072                        border_block_end_style,
33073                ) {
33074
33075                    (
33076                        Some(border_block_start_style),
33077                        Some(border_block_end_style),
33078                    ) =>
33079                    Ok(LonghandsToSerialize {
33080                            border_block_start_style,
33081                            border_block_end_style,
33082                    }),
33083                    _ => Err(())
33084                }
33085            }
33086        }
33087
33088        /// Parse the given shorthand and fill the result into the
33089        /// `declarations` vector.
33090        pub fn parse_into<'i, 't>(
33091            declarations: &mut SourcePropertyDeclaration,
33092            context: &ParserContext,
33093            input: &mut Parser<'i, 't>,
33094        ) -> Result<(), ParseError<'i>> {
33095            #[allow(unused_imports)]
33096            use crate::properties::{NonCustomPropertyId, LonghandId};
33097            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
33098                    declarations.push(PropertyDeclaration::BorderBlockStartStyle(
33099                        longhands.border_block_start_style
33100                    ));
33101                    declarations.push(PropertyDeclaration::BorderBlockEndStyle(
33102                        longhands.border_block_end_style
33103                    ));
33104            })
33105        }
33106
33107        /// Try to serialize a given shorthand to a string.
33108        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
33109            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
33110                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
33111                Err(_) => Ok(())
33112            }
33113        }
33114
33115        
33116
33117            use crate::properties::longhands::border_block_start_style;
33118            pub fn parse_value<'i, 't>(
33119                context: &ParserContext,
33120                input: &mut Parser<'i, 't>,
33121            ) -> Result<Longhands, ParseError<'i>> {
33122                let start_value = border_block_start_style::parse(context, input)?;
33123                let end_value =
33124                    input.try_parse(|input| border_block_start_style::parse(context, input))
33125                        .unwrap_or_else(|_| start_value.clone());
33126
33127                Ok(expanded! {
33128                    border_block_start_style: start_value,
33129                    border_block_end_style: end_value,
33130                })
33131            }
33132
33133            impl<'a> ToCss for LonghandsToSerialize<'a>  {
33134                fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
33135                    self.border_block_start_style.to_css(dest)?;
33136
33137                    if self.border_block_end_style != self.border_block_start_style {
33138                        dest.write_char(' ')?;
33139                        self.border_block_end_style.to_css(dest)?;
33140                    }
33141
33142                    Ok(())
33143                }
33144            }
33145        
33146    }
33147
33148        
33149        
33150
33151    /// https://drafts.csswg.org/css-logical/#propdef-border-block-color
33152    pub mod border_block_color {
33153        use cssparser::Parser;
33154        use crate::parser::ParserContext;
33155        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
33156        #[allow(unused_imports)]
33157        use selectors::parser::SelectorParseErrorKind;
33158        #[allow(unused_imports)]
33159        use std::fmt::{self, Write};
33160        #[allow(unused_imports)]
33161        use style_traits::{ParseError, StyleParseErrorKind};
33162        #[allow(unused_imports)]
33163        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
33164
33165        #[derive(SpecifiedValueInfo)]
33166        pub struct Longhands {
33167                pub border_block_start_color:
33168                    longhands::border_block_start_color::SpecifiedValue
33169                    ,
33170                pub border_block_end_color:
33171                    longhands::border_block_end_color::SpecifiedValue
33172                    ,
33173        }
33174
33175        /// Represents a serializable set of all of the longhand properties that
33176        /// correspond to a shorthand.
33177        pub struct LonghandsToSerialize<'a> {
33178                pub border_block_start_color:
33179                    &'a longhands::border_block_start_color::SpecifiedValue,
33180                pub border_block_end_color:
33181                    &'a longhands::border_block_end_color::SpecifiedValue,
33182        }
33183
33184        impl<'a> LonghandsToSerialize<'a> {
33185            /// Tries to get a serializable set of longhands given a set of
33186            /// property declarations.
33187            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
33188                // Define all of the expected variables that correspond to the shorthand
33189                    let mut border_block_start_color =
33190                        None::<&'a longhands::border_block_start_color::SpecifiedValue>;
33191                    let mut border_block_end_color =
33192                        None::<&'a longhands::border_block_end_color::SpecifiedValue>;
33193
33194                // Attempt to assign the incoming declarations to the expected variables
33195                for declaration in iter {
33196                    match *declaration {
33197                            PropertyDeclaration::BorderBlockStartColor(ref value) => {
33198                                border_block_start_color = Some(value)
33199                            },
33200                            PropertyDeclaration::BorderBlockEndColor(ref value) => {
33201                                border_block_end_color = Some(value)
33202                            },
33203                        _ => {}
33204                    };
33205                }
33206
33207                // If any of the expected variables are missing, return an error
33208                match (
33209                        border_block_start_color,
33210                        border_block_end_color,
33211                ) {
33212
33213                    (
33214                        Some(border_block_start_color),
33215                        Some(border_block_end_color),
33216                    ) =>
33217                    Ok(LonghandsToSerialize {
33218                            border_block_start_color,
33219                            border_block_end_color,
33220                    }),
33221                    _ => Err(())
33222                }
33223            }
33224        }
33225
33226        /// Parse the given shorthand and fill the result into the
33227        /// `declarations` vector.
33228        pub fn parse_into<'i, 't>(
33229            declarations: &mut SourcePropertyDeclaration,
33230            context: &ParserContext,
33231            input: &mut Parser<'i, 't>,
33232        ) -> Result<(), ParseError<'i>> {
33233            #[allow(unused_imports)]
33234            use crate::properties::{NonCustomPropertyId, LonghandId};
33235            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
33236                    declarations.push(PropertyDeclaration::BorderBlockStartColor(
33237                        longhands.border_block_start_color
33238                    ));
33239                    declarations.push(PropertyDeclaration::BorderBlockEndColor(
33240                        longhands.border_block_end_color
33241                    ));
33242            })
33243        }
33244
33245        /// Try to serialize a given shorthand to a string.
33246        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
33247            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
33248                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
33249                Err(_) => Ok(())
33250            }
33251        }
33252
33253        
33254
33255            use crate::properties::longhands::border_block_start_color;
33256            pub fn parse_value<'i, 't>(
33257                context: &ParserContext,
33258                input: &mut Parser<'i, 't>,
33259            ) -> Result<Longhands, ParseError<'i>> {
33260                let start_value = border_block_start_color::parse(context, input)?;
33261                let end_value =
33262                    input.try_parse(|input| border_block_start_color::parse(context, input))
33263                        .unwrap_or_else(|_| start_value.clone());
33264
33265                Ok(expanded! {
33266                    border_block_start_color: start_value,
33267                    border_block_end_color: end_value,
33268                })
33269            }
33270
33271            impl<'a> ToCss for LonghandsToSerialize<'a>  {
33272                fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
33273                    self.border_block_start_color.to_css(dest)?;
33274
33275                    if self.border_block_end_color != self.border_block_start_color {
33276                        dest.write_char(' ')?;
33277                        self.border_block_end_color.to_css(dest)?;
33278                    }
33279
33280                    Ok(())
33281                }
33282            }
33283        
33284    }
33285
33286        
33287        
33288
33289    /// https://drafts.csswg.org/css-logical/#propdef-border-inline-width
33290    pub mod border_inline_width {
33291        use cssparser::Parser;
33292        use crate::parser::ParserContext;
33293        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
33294        #[allow(unused_imports)]
33295        use selectors::parser::SelectorParseErrorKind;
33296        #[allow(unused_imports)]
33297        use std::fmt::{self, Write};
33298        #[allow(unused_imports)]
33299        use style_traits::{ParseError, StyleParseErrorKind};
33300        #[allow(unused_imports)]
33301        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
33302
33303        #[derive(SpecifiedValueInfo)]
33304        pub struct Longhands {
33305                pub border_inline_start_width:
33306                    longhands::border_inline_start_width::SpecifiedValue
33307                    ,
33308                pub border_inline_end_width:
33309                    longhands::border_inline_end_width::SpecifiedValue
33310                    ,
33311        }
33312
33313        /// Represents a serializable set of all of the longhand properties that
33314        /// correspond to a shorthand.
33315        pub struct LonghandsToSerialize<'a> {
33316                pub border_inline_start_width:
33317                    &'a longhands::border_inline_start_width::SpecifiedValue,
33318                pub border_inline_end_width:
33319                    &'a longhands::border_inline_end_width::SpecifiedValue,
33320        }
33321
33322        impl<'a> LonghandsToSerialize<'a> {
33323            /// Tries to get a serializable set of longhands given a set of
33324            /// property declarations.
33325            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
33326                // Define all of the expected variables that correspond to the shorthand
33327                    let mut border_inline_start_width =
33328                        None::<&'a longhands::border_inline_start_width::SpecifiedValue>;
33329                    let mut border_inline_end_width =
33330                        None::<&'a longhands::border_inline_end_width::SpecifiedValue>;
33331
33332                // Attempt to assign the incoming declarations to the expected variables
33333                for declaration in iter {
33334                    match *declaration {
33335                            PropertyDeclaration::BorderInlineStartWidth(ref value) => {
33336                                border_inline_start_width = Some(value)
33337                            },
33338                            PropertyDeclaration::BorderInlineEndWidth(ref value) => {
33339                                border_inline_end_width = Some(value)
33340                            },
33341                        _ => {}
33342                    };
33343                }
33344
33345                // If any of the expected variables are missing, return an error
33346                match (
33347                        border_inline_start_width,
33348                        border_inline_end_width,
33349                ) {
33350
33351                    (
33352                        Some(border_inline_start_width),
33353                        Some(border_inline_end_width),
33354                    ) =>
33355                    Ok(LonghandsToSerialize {
33356                            border_inline_start_width,
33357                            border_inline_end_width,
33358                    }),
33359                    _ => Err(())
33360                }
33361            }
33362        }
33363
33364        /// Parse the given shorthand and fill the result into the
33365        /// `declarations` vector.
33366        pub fn parse_into<'i, 't>(
33367            declarations: &mut SourcePropertyDeclaration,
33368            context: &ParserContext,
33369            input: &mut Parser<'i, 't>,
33370        ) -> Result<(), ParseError<'i>> {
33371            #[allow(unused_imports)]
33372            use crate::properties::{NonCustomPropertyId, LonghandId};
33373            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
33374                    declarations.push(PropertyDeclaration::BorderInlineStartWidth(
33375                        longhands.border_inline_start_width
33376                    ));
33377                    declarations.push(PropertyDeclaration::BorderInlineEndWidth(
33378                        longhands.border_inline_end_width
33379                    ));
33380            })
33381        }
33382
33383        /// Try to serialize a given shorthand to a string.
33384        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
33385            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
33386                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
33387                Err(_) => Ok(())
33388            }
33389        }
33390
33391        
33392
33393            use crate::properties::longhands::border_inline_start_width;
33394            pub fn parse_value<'i, 't>(
33395                context: &ParserContext,
33396                input: &mut Parser<'i, 't>,
33397            ) -> Result<Longhands, ParseError<'i>> {
33398                let start_value = border_inline_start_width::parse(context, input)?;
33399                let end_value =
33400                    input.try_parse(|input| border_inline_start_width::parse(context, input))
33401                        .unwrap_or_else(|_| start_value.clone());
33402
33403                Ok(expanded! {
33404                    border_inline_start_width: start_value,
33405                    border_inline_end_width: end_value,
33406                })
33407            }
33408
33409            impl<'a> ToCss for LonghandsToSerialize<'a>  {
33410                fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
33411                    self.border_inline_start_width.to_css(dest)?;
33412
33413                    if self.border_inline_end_width != self.border_inline_start_width {
33414                        dest.write_char(' ')?;
33415                        self.border_inline_end_width.to_css(dest)?;
33416                    }
33417
33418                    Ok(())
33419                }
33420            }
33421        
33422    }
33423
33424        
33425        
33426
33427    /// https://drafts.csswg.org/css-logical/#propdef-border-inline-style
33428    pub mod border_inline_style {
33429        use cssparser::Parser;
33430        use crate::parser::ParserContext;
33431        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
33432        #[allow(unused_imports)]
33433        use selectors::parser::SelectorParseErrorKind;
33434        #[allow(unused_imports)]
33435        use std::fmt::{self, Write};
33436        #[allow(unused_imports)]
33437        use style_traits::{ParseError, StyleParseErrorKind};
33438        #[allow(unused_imports)]
33439        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
33440
33441        #[derive(SpecifiedValueInfo)]
33442        pub struct Longhands {
33443                pub border_inline_start_style:
33444                    longhands::border_inline_start_style::SpecifiedValue
33445                    ,
33446                pub border_inline_end_style:
33447                    longhands::border_inline_end_style::SpecifiedValue
33448                    ,
33449        }
33450
33451        /// Represents a serializable set of all of the longhand properties that
33452        /// correspond to a shorthand.
33453        pub struct LonghandsToSerialize<'a> {
33454                pub border_inline_start_style:
33455                    &'a longhands::border_inline_start_style::SpecifiedValue,
33456                pub border_inline_end_style:
33457                    &'a longhands::border_inline_end_style::SpecifiedValue,
33458        }
33459
33460        impl<'a> LonghandsToSerialize<'a> {
33461            /// Tries to get a serializable set of longhands given a set of
33462            /// property declarations.
33463            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
33464                // Define all of the expected variables that correspond to the shorthand
33465                    let mut border_inline_start_style =
33466                        None::<&'a longhands::border_inline_start_style::SpecifiedValue>;
33467                    let mut border_inline_end_style =
33468                        None::<&'a longhands::border_inline_end_style::SpecifiedValue>;
33469
33470                // Attempt to assign the incoming declarations to the expected variables
33471                for declaration in iter {
33472                    match *declaration {
33473                            PropertyDeclaration::BorderInlineStartStyle(ref value) => {
33474                                border_inline_start_style = Some(value)
33475                            },
33476                            PropertyDeclaration::BorderInlineEndStyle(ref value) => {
33477                                border_inline_end_style = Some(value)
33478                            },
33479                        _ => {}
33480                    };
33481                }
33482
33483                // If any of the expected variables are missing, return an error
33484                match (
33485                        border_inline_start_style,
33486                        border_inline_end_style,
33487                ) {
33488
33489                    (
33490                        Some(border_inline_start_style),
33491                        Some(border_inline_end_style),
33492                    ) =>
33493                    Ok(LonghandsToSerialize {
33494                            border_inline_start_style,
33495                            border_inline_end_style,
33496                    }),
33497                    _ => Err(())
33498                }
33499            }
33500        }
33501
33502        /// Parse the given shorthand and fill the result into the
33503        /// `declarations` vector.
33504        pub fn parse_into<'i, 't>(
33505            declarations: &mut SourcePropertyDeclaration,
33506            context: &ParserContext,
33507            input: &mut Parser<'i, 't>,
33508        ) -> Result<(), ParseError<'i>> {
33509            #[allow(unused_imports)]
33510            use crate::properties::{NonCustomPropertyId, LonghandId};
33511            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
33512                    declarations.push(PropertyDeclaration::BorderInlineStartStyle(
33513                        longhands.border_inline_start_style
33514                    ));
33515                    declarations.push(PropertyDeclaration::BorderInlineEndStyle(
33516                        longhands.border_inline_end_style
33517                    ));
33518            })
33519        }
33520
33521        /// Try to serialize a given shorthand to a string.
33522        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
33523            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
33524                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
33525                Err(_) => Ok(())
33526            }
33527        }
33528
33529        
33530
33531            use crate::properties::longhands::border_inline_start_style;
33532            pub fn parse_value<'i, 't>(
33533                context: &ParserContext,
33534                input: &mut Parser<'i, 't>,
33535            ) -> Result<Longhands, ParseError<'i>> {
33536                let start_value = border_inline_start_style::parse(context, input)?;
33537                let end_value =
33538                    input.try_parse(|input| border_inline_start_style::parse(context, input))
33539                        .unwrap_or_else(|_| start_value.clone());
33540
33541                Ok(expanded! {
33542                    border_inline_start_style: start_value,
33543                    border_inline_end_style: end_value,
33544                })
33545            }
33546
33547            impl<'a> ToCss for LonghandsToSerialize<'a>  {
33548                fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
33549                    self.border_inline_start_style.to_css(dest)?;
33550
33551                    if self.border_inline_end_style != self.border_inline_start_style {
33552                        dest.write_char(' ')?;
33553                        self.border_inline_end_style.to_css(dest)?;
33554                    }
33555
33556                    Ok(())
33557                }
33558            }
33559        
33560    }
33561
33562        
33563        
33564
33565    /// https://drafts.csswg.org/css-logical/#propdef-border-inline-color
33566    pub mod border_inline_color {
33567        use cssparser::Parser;
33568        use crate::parser::ParserContext;
33569        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
33570        #[allow(unused_imports)]
33571        use selectors::parser::SelectorParseErrorKind;
33572        #[allow(unused_imports)]
33573        use std::fmt::{self, Write};
33574        #[allow(unused_imports)]
33575        use style_traits::{ParseError, StyleParseErrorKind};
33576        #[allow(unused_imports)]
33577        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
33578
33579        #[derive(SpecifiedValueInfo)]
33580        pub struct Longhands {
33581                pub border_inline_start_color:
33582                    longhands::border_inline_start_color::SpecifiedValue
33583                    ,
33584                pub border_inline_end_color:
33585                    longhands::border_inline_end_color::SpecifiedValue
33586                    ,
33587        }
33588
33589        /// Represents a serializable set of all of the longhand properties that
33590        /// correspond to a shorthand.
33591        pub struct LonghandsToSerialize<'a> {
33592                pub border_inline_start_color:
33593                    &'a longhands::border_inline_start_color::SpecifiedValue,
33594                pub border_inline_end_color:
33595                    &'a longhands::border_inline_end_color::SpecifiedValue,
33596        }
33597
33598        impl<'a> LonghandsToSerialize<'a> {
33599            /// Tries to get a serializable set of longhands given a set of
33600            /// property declarations.
33601            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
33602                // Define all of the expected variables that correspond to the shorthand
33603                    let mut border_inline_start_color =
33604                        None::<&'a longhands::border_inline_start_color::SpecifiedValue>;
33605                    let mut border_inline_end_color =
33606                        None::<&'a longhands::border_inline_end_color::SpecifiedValue>;
33607
33608                // Attempt to assign the incoming declarations to the expected variables
33609                for declaration in iter {
33610                    match *declaration {
33611                            PropertyDeclaration::BorderInlineStartColor(ref value) => {
33612                                border_inline_start_color = Some(value)
33613                            },
33614                            PropertyDeclaration::BorderInlineEndColor(ref value) => {
33615                                border_inline_end_color = Some(value)
33616                            },
33617                        _ => {}
33618                    };
33619                }
33620
33621                // If any of the expected variables are missing, return an error
33622                match (
33623                        border_inline_start_color,
33624                        border_inline_end_color,
33625                ) {
33626
33627                    (
33628                        Some(border_inline_start_color),
33629                        Some(border_inline_end_color),
33630                    ) =>
33631                    Ok(LonghandsToSerialize {
33632                            border_inline_start_color,
33633                            border_inline_end_color,
33634                    }),
33635                    _ => Err(())
33636                }
33637            }
33638        }
33639
33640        /// Parse the given shorthand and fill the result into the
33641        /// `declarations` vector.
33642        pub fn parse_into<'i, 't>(
33643            declarations: &mut SourcePropertyDeclaration,
33644            context: &ParserContext,
33645            input: &mut Parser<'i, 't>,
33646        ) -> Result<(), ParseError<'i>> {
33647            #[allow(unused_imports)]
33648            use crate::properties::{NonCustomPropertyId, LonghandId};
33649            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
33650                    declarations.push(PropertyDeclaration::BorderInlineStartColor(
33651                        longhands.border_inline_start_color
33652                    ));
33653                    declarations.push(PropertyDeclaration::BorderInlineEndColor(
33654                        longhands.border_inline_end_color
33655                    ));
33656            })
33657        }
33658
33659        /// Try to serialize a given shorthand to a string.
33660        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
33661            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
33662                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
33663                Err(_) => Ok(())
33664            }
33665        }
33666
33667        
33668
33669            use crate::properties::longhands::border_inline_start_color;
33670            pub fn parse_value<'i, 't>(
33671                context: &ParserContext,
33672                input: &mut Parser<'i, 't>,
33673            ) -> Result<Longhands, ParseError<'i>> {
33674                let start_value = border_inline_start_color::parse(context, input)?;
33675                let end_value =
33676                    input.try_parse(|input| border_inline_start_color::parse(context, input))
33677                        .unwrap_or_else(|_| start_value.clone());
33678
33679                Ok(expanded! {
33680                    border_inline_start_color: start_value,
33681                    border_inline_end_color: end_value,
33682                })
33683            }
33684
33685            impl<'a> ToCss for LonghandsToSerialize<'a>  {
33686                fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
33687                    self.border_inline_start_color.to_css(dest)?;
33688
33689                    if self.border_inline_end_color != self.border_inline_start_color {
33690                        dest.write_char(' ')?;
33691                        self.border_inline_end_color.to_css(dest)?;
33692                    }
33693
33694                    Ok(())
33695                }
33696            }
33697        
33698    }
33699
33700
33701    
33702    
33703
33704    /// https://drafts.csswg.org/css-logical/#propdef-border-block
33705    pub mod border_block {
33706        use cssparser::Parser;
33707        use crate::parser::ParserContext;
33708        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
33709        #[allow(unused_imports)]
33710        use selectors::parser::SelectorParseErrorKind;
33711        #[allow(unused_imports)]
33712        use std::fmt::{self, Write};
33713        #[allow(unused_imports)]
33714        use style_traits::{ParseError, StyleParseErrorKind};
33715        #[allow(unused_imports)]
33716        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
33717
33718        #[derive(SpecifiedValueInfo)]
33719        pub struct Longhands {
33720                pub border_block_start_width:
33721                    longhands::border_block_start_width::SpecifiedValue
33722                    ,
33723                pub border_block_end_width:
33724                    longhands::border_block_end_width::SpecifiedValue
33725                    ,
33726                pub border_block_start_style:
33727                    longhands::border_block_start_style::SpecifiedValue
33728                    ,
33729                pub border_block_end_style:
33730                    longhands::border_block_end_style::SpecifiedValue
33731                    ,
33732                pub border_block_start_color:
33733                    longhands::border_block_start_color::SpecifiedValue
33734                    ,
33735                pub border_block_end_color:
33736                    longhands::border_block_end_color::SpecifiedValue
33737                    ,
33738        }
33739
33740        /// Represents a serializable set of all of the longhand properties that
33741        /// correspond to a shorthand.
33742        pub struct LonghandsToSerialize<'a> {
33743                pub border_block_start_width:
33744                    &'a longhands::border_block_start_width::SpecifiedValue,
33745                pub border_block_end_width:
33746                    &'a longhands::border_block_end_width::SpecifiedValue,
33747                pub border_block_start_style:
33748                    &'a longhands::border_block_start_style::SpecifiedValue,
33749                pub border_block_end_style:
33750                    &'a longhands::border_block_end_style::SpecifiedValue,
33751                pub border_block_start_color:
33752                    &'a longhands::border_block_start_color::SpecifiedValue,
33753                pub border_block_end_color:
33754                    &'a longhands::border_block_end_color::SpecifiedValue,
33755        }
33756
33757        impl<'a> LonghandsToSerialize<'a> {
33758            /// Tries to get a serializable set of longhands given a set of
33759            /// property declarations.
33760            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
33761                // Define all of the expected variables that correspond to the shorthand
33762                    let mut border_block_start_width =
33763                        None::<&'a longhands::border_block_start_width::SpecifiedValue>;
33764                    let mut border_block_end_width =
33765                        None::<&'a longhands::border_block_end_width::SpecifiedValue>;
33766                    let mut border_block_start_style =
33767                        None::<&'a longhands::border_block_start_style::SpecifiedValue>;
33768                    let mut border_block_end_style =
33769                        None::<&'a longhands::border_block_end_style::SpecifiedValue>;
33770                    let mut border_block_start_color =
33771                        None::<&'a longhands::border_block_start_color::SpecifiedValue>;
33772                    let mut border_block_end_color =
33773                        None::<&'a longhands::border_block_end_color::SpecifiedValue>;
33774
33775                // Attempt to assign the incoming declarations to the expected variables
33776                for declaration in iter {
33777                    match *declaration {
33778                            PropertyDeclaration::BorderBlockStartWidth(ref value) => {
33779                                border_block_start_width = Some(value)
33780                            },
33781                            PropertyDeclaration::BorderBlockEndWidth(ref value) => {
33782                                border_block_end_width = Some(value)
33783                            },
33784                            PropertyDeclaration::BorderBlockStartStyle(ref value) => {
33785                                border_block_start_style = Some(value)
33786                            },
33787                            PropertyDeclaration::BorderBlockEndStyle(ref value) => {
33788                                border_block_end_style = Some(value)
33789                            },
33790                            PropertyDeclaration::BorderBlockStartColor(ref value) => {
33791                                border_block_start_color = Some(value)
33792                            },
33793                            PropertyDeclaration::BorderBlockEndColor(ref value) => {
33794                                border_block_end_color = Some(value)
33795                            },
33796                        _ => {}
33797                    };
33798                }
33799
33800                // If any of the expected variables are missing, return an error
33801                match (
33802                        border_block_start_width,
33803                        border_block_end_width,
33804                        border_block_start_style,
33805                        border_block_end_style,
33806                        border_block_start_color,
33807                        border_block_end_color,
33808                ) {
33809
33810                    (
33811                        Some(border_block_start_width),
33812                        Some(border_block_end_width),
33813                        Some(border_block_start_style),
33814                        Some(border_block_end_style),
33815                        Some(border_block_start_color),
33816                        Some(border_block_end_color),
33817                    ) =>
33818                    Ok(LonghandsToSerialize {
33819                            border_block_start_width,
33820                            border_block_end_width,
33821                            border_block_start_style,
33822                            border_block_end_style,
33823                            border_block_start_color,
33824                            border_block_end_color,
33825                    }),
33826                    _ => Err(())
33827                }
33828            }
33829        }
33830
33831        /// Parse the given shorthand and fill the result into the
33832        /// `declarations` vector.
33833        pub fn parse_into<'i, 't>(
33834            declarations: &mut SourcePropertyDeclaration,
33835            context: &ParserContext,
33836            input: &mut Parser<'i, 't>,
33837        ) -> Result<(), ParseError<'i>> {
33838            #[allow(unused_imports)]
33839            use crate::properties::{NonCustomPropertyId, LonghandId};
33840            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
33841                    declarations.push(PropertyDeclaration::BorderBlockStartWidth(
33842                        longhands.border_block_start_width
33843                    ));
33844                    declarations.push(PropertyDeclaration::BorderBlockEndWidth(
33845                        longhands.border_block_end_width
33846                    ));
33847                    declarations.push(PropertyDeclaration::BorderBlockStartStyle(
33848                        longhands.border_block_start_style
33849                    ));
33850                    declarations.push(PropertyDeclaration::BorderBlockEndStyle(
33851                        longhands.border_block_end_style
33852                    ));
33853                    declarations.push(PropertyDeclaration::BorderBlockStartColor(
33854                        longhands.border_block_start_color
33855                    ));
33856                    declarations.push(PropertyDeclaration::BorderBlockEndColor(
33857                        longhands.border_block_end_color
33858                    ));
33859            })
33860        }
33861
33862        /// Try to serialize a given shorthand to a string.
33863        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
33864            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
33865                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
33866                Err(_) => Ok(())
33867            }
33868        }
33869
33870        
33871
33872        use crate::properties::shorthands::border_block_start;
33873        pub fn parse_value<'i, 't>(
33874            context: &ParserContext,
33875            input: &mut Parser<'i, 't>,
33876        ) -> Result<Longhands, ParseError<'i>> {
33877            let start_value = border_block_start::parse_value(context, input)?;
33878            Ok(expanded! {
33879                border_block_start_width: start_value.border_block_start_width.clone(),
33880                border_block_end_width: start_value.border_block_start_width,
33881                border_block_start_style: start_value.border_block_start_style.clone(),
33882                border_block_end_style: start_value.border_block_start_style,
33883                border_block_start_color: start_value.border_block_start_color.clone(),
33884                border_block_end_color: start_value.border_block_start_color,
33885            })
33886        }
33887
33888        impl<'a> ToCss for LonghandsToSerialize<'a>  {
33889            fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
33890                crate::values::specified::border::serialize_directional_border(
33891                    dest,
33892                    self.border_block_start_width,
33893                    self.border_block_start_style,
33894                    self.border_block_start_color
33895                )
33896            }
33897        }
33898    
33899    }
33900
33901    
33902    
33903
33904    /// https://drafts.csswg.org/css-logical/#propdef-border-inline
33905    pub mod border_inline {
33906        use cssparser::Parser;
33907        use crate::parser::ParserContext;
33908        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
33909        #[allow(unused_imports)]
33910        use selectors::parser::SelectorParseErrorKind;
33911        #[allow(unused_imports)]
33912        use std::fmt::{self, Write};
33913        #[allow(unused_imports)]
33914        use style_traits::{ParseError, StyleParseErrorKind};
33915        #[allow(unused_imports)]
33916        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
33917
33918        #[derive(SpecifiedValueInfo)]
33919        pub struct Longhands {
33920                pub border_inline_start_width:
33921                    longhands::border_inline_start_width::SpecifiedValue
33922                    ,
33923                pub border_inline_end_width:
33924                    longhands::border_inline_end_width::SpecifiedValue
33925                    ,
33926                pub border_inline_start_style:
33927                    longhands::border_inline_start_style::SpecifiedValue
33928                    ,
33929                pub border_inline_end_style:
33930                    longhands::border_inline_end_style::SpecifiedValue
33931                    ,
33932                pub border_inline_start_color:
33933                    longhands::border_inline_start_color::SpecifiedValue
33934                    ,
33935                pub border_inline_end_color:
33936                    longhands::border_inline_end_color::SpecifiedValue
33937                    ,
33938        }
33939
33940        /// Represents a serializable set of all of the longhand properties that
33941        /// correspond to a shorthand.
33942        pub struct LonghandsToSerialize<'a> {
33943                pub border_inline_start_width:
33944                    &'a longhands::border_inline_start_width::SpecifiedValue,
33945                pub border_inline_end_width:
33946                    &'a longhands::border_inline_end_width::SpecifiedValue,
33947                pub border_inline_start_style:
33948                    &'a longhands::border_inline_start_style::SpecifiedValue,
33949                pub border_inline_end_style:
33950                    &'a longhands::border_inline_end_style::SpecifiedValue,
33951                pub border_inline_start_color:
33952                    &'a longhands::border_inline_start_color::SpecifiedValue,
33953                pub border_inline_end_color:
33954                    &'a longhands::border_inline_end_color::SpecifiedValue,
33955        }
33956
33957        impl<'a> LonghandsToSerialize<'a> {
33958            /// Tries to get a serializable set of longhands given a set of
33959            /// property declarations.
33960            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
33961                // Define all of the expected variables that correspond to the shorthand
33962                    let mut border_inline_start_width =
33963                        None::<&'a longhands::border_inline_start_width::SpecifiedValue>;
33964                    let mut border_inline_end_width =
33965                        None::<&'a longhands::border_inline_end_width::SpecifiedValue>;
33966                    let mut border_inline_start_style =
33967                        None::<&'a longhands::border_inline_start_style::SpecifiedValue>;
33968                    let mut border_inline_end_style =
33969                        None::<&'a longhands::border_inline_end_style::SpecifiedValue>;
33970                    let mut border_inline_start_color =
33971                        None::<&'a longhands::border_inline_start_color::SpecifiedValue>;
33972                    let mut border_inline_end_color =
33973                        None::<&'a longhands::border_inline_end_color::SpecifiedValue>;
33974
33975                // Attempt to assign the incoming declarations to the expected variables
33976                for declaration in iter {
33977                    match *declaration {
33978                            PropertyDeclaration::BorderInlineStartWidth(ref value) => {
33979                                border_inline_start_width = Some(value)
33980                            },
33981                            PropertyDeclaration::BorderInlineEndWidth(ref value) => {
33982                                border_inline_end_width = Some(value)
33983                            },
33984                            PropertyDeclaration::BorderInlineStartStyle(ref value) => {
33985                                border_inline_start_style = Some(value)
33986                            },
33987                            PropertyDeclaration::BorderInlineEndStyle(ref value) => {
33988                                border_inline_end_style = Some(value)
33989                            },
33990                            PropertyDeclaration::BorderInlineStartColor(ref value) => {
33991                                border_inline_start_color = Some(value)
33992                            },
33993                            PropertyDeclaration::BorderInlineEndColor(ref value) => {
33994                                border_inline_end_color = Some(value)
33995                            },
33996                        _ => {}
33997                    };
33998                }
33999
34000                // If any of the expected variables are missing, return an error
34001                match (
34002                        border_inline_start_width,
34003                        border_inline_end_width,
34004                        border_inline_start_style,
34005                        border_inline_end_style,
34006                        border_inline_start_color,
34007                        border_inline_end_color,
34008                ) {
34009
34010                    (
34011                        Some(border_inline_start_width),
34012                        Some(border_inline_end_width),
34013                        Some(border_inline_start_style),
34014                        Some(border_inline_end_style),
34015                        Some(border_inline_start_color),
34016                        Some(border_inline_end_color),
34017                    ) =>
34018                    Ok(LonghandsToSerialize {
34019                            border_inline_start_width,
34020                            border_inline_end_width,
34021                            border_inline_start_style,
34022                            border_inline_end_style,
34023                            border_inline_start_color,
34024                            border_inline_end_color,
34025                    }),
34026                    _ => Err(())
34027                }
34028            }
34029        }
34030
34031        /// Parse the given shorthand and fill the result into the
34032        /// `declarations` vector.
34033        pub fn parse_into<'i, 't>(
34034            declarations: &mut SourcePropertyDeclaration,
34035            context: &ParserContext,
34036            input: &mut Parser<'i, 't>,
34037        ) -> Result<(), ParseError<'i>> {
34038            #[allow(unused_imports)]
34039            use crate::properties::{NonCustomPropertyId, LonghandId};
34040            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
34041                    declarations.push(PropertyDeclaration::BorderInlineStartWidth(
34042                        longhands.border_inline_start_width
34043                    ));
34044                    declarations.push(PropertyDeclaration::BorderInlineEndWidth(
34045                        longhands.border_inline_end_width
34046                    ));
34047                    declarations.push(PropertyDeclaration::BorderInlineStartStyle(
34048                        longhands.border_inline_start_style
34049                    ));
34050                    declarations.push(PropertyDeclaration::BorderInlineEndStyle(
34051                        longhands.border_inline_end_style
34052                    ));
34053                    declarations.push(PropertyDeclaration::BorderInlineStartColor(
34054                        longhands.border_inline_start_color
34055                    ));
34056                    declarations.push(PropertyDeclaration::BorderInlineEndColor(
34057                        longhands.border_inline_end_color
34058                    ));
34059            })
34060        }
34061
34062        /// Try to serialize a given shorthand to a string.
34063        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
34064            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
34065                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
34066                Err(_) => Ok(())
34067            }
34068        }
34069
34070        
34071
34072        use crate::properties::shorthands::border_inline_start;
34073        pub fn parse_value<'i, 't>(
34074            context: &ParserContext,
34075            input: &mut Parser<'i, 't>,
34076        ) -> Result<Longhands, ParseError<'i>> {
34077            let start_value = border_inline_start::parse_value(context, input)?;
34078            Ok(expanded! {
34079                border_inline_start_width: start_value.border_inline_start_width.clone(),
34080                border_inline_end_width: start_value.border_inline_start_width,
34081                border_inline_start_style: start_value.border_inline_start_style.clone(),
34082                border_inline_end_style: start_value.border_inline_start_style,
34083                border_inline_start_color: start_value.border_inline_start_color.clone(),
34084                border_inline_end_color: start_value.border_inline_start_color,
34085            })
34086        }
34087
34088        impl<'a> ToCss for LonghandsToSerialize<'a>  {
34089            fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
34090                crate::values::specified::border::serialize_directional_border(
34091                    dest,
34092                    self.border_inline_start_width,
34093                    self.border_inline_start_style,
34094                    self.border_inline_start_color
34095                )
34096            }
34097        }
34098    
34099    }
34100
34101
34102    /* This Source Code Form is subject to the terms of the Mozilla Public
34103 * License, v. 2.0. If a copy of the MPL was not distributed with this
34104 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
34105
34106
34107
34108
34109
34110
34111    /// https://drafts.csswg.org/css-overflow/#propdef-overflow
34112    pub mod overflow {
34113        use cssparser::Parser;
34114        use crate::parser::ParserContext;
34115        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
34116        #[allow(unused_imports)]
34117        use selectors::parser::SelectorParseErrorKind;
34118        #[allow(unused_imports)]
34119        use std::fmt::{self, Write};
34120        #[allow(unused_imports)]
34121        use style_traits::{ParseError, StyleParseErrorKind};
34122        #[allow(unused_imports)]
34123        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
34124
34125        #[derive(SpecifiedValueInfo)]
34126        pub struct Longhands {
34127                pub overflow_x:
34128                    longhands::overflow_x::SpecifiedValue
34129                    ,
34130                pub overflow_y:
34131                    longhands::overflow_y::SpecifiedValue
34132                    ,
34133        }
34134
34135        /// Represents a serializable set of all of the longhand properties that
34136        /// correspond to a shorthand.
34137        pub struct LonghandsToSerialize<'a> {
34138                pub overflow_x:
34139                    &'a longhands::overflow_x::SpecifiedValue,
34140                pub overflow_y:
34141                    &'a longhands::overflow_y::SpecifiedValue,
34142        }
34143
34144        impl<'a> LonghandsToSerialize<'a> {
34145            /// Tries to get a serializable set of longhands given a set of
34146            /// property declarations.
34147            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
34148                // Define all of the expected variables that correspond to the shorthand
34149                    let mut overflow_x =
34150                        None::<&'a longhands::overflow_x::SpecifiedValue>;
34151                    let mut overflow_y =
34152                        None::<&'a longhands::overflow_y::SpecifiedValue>;
34153
34154                // Attempt to assign the incoming declarations to the expected variables
34155                for declaration in iter {
34156                    match *declaration {
34157                            PropertyDeclaration::OverflowX(ref value) => {
34158                                overflow_x = Some(value)
34159                            },
34160                            PropertyDeclaration::OverflowY(ref value) => {
34161                                overflow_y = Some(value)
34162                            },
34163                        _ => {}
34164                    };
34165                }
34166
34167                // If any of the expected variables are missing, return an error
34168                match (
34169                        overflow_x,
34170                        overflow_y,
34171                ) {
34172
34173                    (
34174                        Some(overflow_x),
34175                        Some(overflow_y),
34176                    ) =>
34177                    Ok(LonghandsToSerialize {
34178                            overflow_x,
34179                            overflow_y,
34180                    }),
34181                    _ => Err(())
34182                }
34183            }
34184        }
34185
34186        /// Parse the given shorthand and fill the result into the
34187        /// `declarations` vector.
34188        pub fn parse_into<'i, 't>(
34189            declarations: &mut SourcePropertyDeclaration,
34190            context: &ParserContext,
34191            input: &mut Parser<'i, 't>,
34192        ) -> Result<(), ParseError<'i>> {
34193            #[allow(unused_imports)]
34194            use crate::properties::{NonCustomPropertyId, LonghandId};
34195            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
34196                    declarations.push(PropertyDeclaration::OverflowX(
34197                        longhands.overflow_x
34198                    ));
34199                    declarations.push(PropertyDeclaration::OverflowY(
34200                        longhands.overflow_y
34201                    ));
34202            })
34203        }
34204
34205        /// Try to serialize a given shorthand to a string.
34206        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
34207            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
34208                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
34209                Err(_) => Ok(())
34210            }
34211        }
34212
34213        
34214    #[allow(unused_imports)]
34215    use crate::parser::Parse;
34216    #[allow(unused_imports)]
34217    use crate::values::specified;
34218
34219    fn parse_value<'i, 't>(
34220        context: &ParserContext,
34221        input: &mut Parser<'i, 't>,
34222    ) -> Result<Longhands, ParseError<'i>> {
34223        let parse_one = |c: &ParserContext, input: &mut Parser<'i, 't>| -> Result<
34224            crate::properties::longhands::overflow_x::SpecifiedValue,
34225            ParseError<'i>
34226        > {
34227            crate::parser::Parse::parse(c, input)
34228        };
34229
34230        let first = parse_one(context, input)?;
34231        let second =
34232            input.try_parse(|input| parse_one(context, input)).unwrap_or_else(|_| first.clone());
34233        Ok(expanded! {
34234            overflow_x: first,
34235            overflow_y: second,
34236        })
34237    }
34238
34239    impl<'a> ToCss for LonghandsToSerialize<'a>  {
34240        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
34241            let first = &self.overflow_x;
34242            let second = &self.overflow_y;
34243
34244            first.to_css(dest)?;
34245            if first != second {
34246                dest.write_char(' ')?;
34247                second.to_css(dest)?;
34248            }
34249            Ok(())
34250        }
34251    }
34252
34253    }
34254
34255
34256
34257
34258
34259
34260
34261
34262
34263
34264
34265
34266
34267
34268
34269
34270
34271
34272
34273
34274
34275
34276
34277
34278
34279
34280
34281
34282
34283
34284
34285
34286
34287
34288
34289    /* This Source Code Form is subject to the terms of the Mozilla Public
34290 * License, v. 2.0. If a copy of the MPL was not distributed with this
34291 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
34292
34293
34294
34295
34296
34297    /// https://drafts.csswg.org/css-multicol/#propdef-columns
34298    pub mod columns {
34299        use cssparser::Parser;
34300        use crate::parser::ParserContext;
34301        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
34302        #[allow(unused_imports)]
34303        use selectors::parser::SelectorParseErrorKind;
34304        #[allow(unused_imports)]
34305        use std::fmt::{self, Write};
34306        #[allow(unused_imports)]
34307        use style_traits::{ParseError, StyleParseErrorKind};
34308        #[allow(unused_imports)]
34309        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
34310
34311        #[derive(SpecifiedValueInfo)]
34312        pub struct Longhands {
34313                pub column_width:
34314                    longhands::column_width::SpecifiedValue
34315                    ,
34316                pub column_count:
34317                    longhands::column_count::SpecifiedValue
34318                    ,
34319        }
34320
34321        /// Represents a serializable set of all of the longhand properties that
34322        /// correspond to a shorthand.
34323        pub struct LonghandsToSerialize<'a> {
34324                pub column_width:
34325                    &'a longhands::column_width::SpecifiedValue,
34326                pub column_count:
34327                    &'a longhands::column_count::SpecifiedValue,
34328        }
34329
34330        impl<'a> LonghandsToSerialize<'a> {
34331            /// Tries to get a serializable set of longhands given a set of
34332            /// property declarations.
34333            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
34334                // Define all of the expected variables that correspond to the shorthand
34335                    let mut column_width =
34336                        None::<&'a longhands::column_width::SpecifiedValue>;
34337                    let mut column_count =
34338                        None::<&'a longhands::column_count::SpecifiedValue>;
34339
34340                // Attempt to assign the incoming declarations to the expected variables
34341                for declaration in iter {
34342                    match *declaration {
34343                            PropertyDeclaration::ColumnWidth(ref value) => {
34344                                column_width = Some(value)
34345                            },
34346                            PropertyDeclaration::ColumnCount(ref value) => {
34347                                column_count = Some(value)
34348                            },
34349                        _ => {}
34350                    };
34351                }
34352
34353                // If any of the expected variables are missing, return an error
34354                match (
34355                        column_width,
34356                        column_count,
34357                ) {
34358
34359                    (
34360                        Some(column_width),
34361                        Some(column_count),
34362                    ) =>
34363                    Ok(LonghandsToSerialize {
34364                            column_width,
34365                            column_count,
34366                    }),
34367                    _ => Err(())
34368                }
34369            }
34370        }
34371
34372        /// Parse the given shorthand and fill the result into the
34373        /// `declarations` vector.
34374        pub fn parse_into<'i, 't>(
34375            declarations: &mut SourcePropertyDeclaration,
34376            context: &ParserContext,
34377            input: &mut Parser<'i, 't>,
34378        ) -> Result<(), ParseError<'i>> {
34379            #[allow(unused_imports)]
34380            use crate::properties::{NonCustomPropertyId, LonghandId};
34381            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
34382                    declarations.push(PropertyDeclaration::ColumnWidth(
34383                        longhands.column_width
34384                    ));
34385                    declarations.push(PropertyDeclaration::ColumnCount(
34386                        longhands.column_count
34387                    ));
34388            })
34389        }
34390
34391        /// Try to serialize a given shorthand to a string.
34392        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
34393            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
34394                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
34395                Err(_) => Ok(())
34396            }
34397        }
34398
34399        
34400    use crate::properties::longhands::{column_count, column_width};
34401
34402    pub fn parse_value<'i, 't>(
34403        context: &ParserContext,
34404        input: &mut Parser<'i, 't>,
34405    ) -> Result<Longhands, ParseError<'i>> {
34406        let mut column_count = None;
34407        let mut column_width = None;
34408        let mut autos = 0;
34409
34410        loop {
34411            if input.try_parse(|input| input.expect_ident_matching("auto")).is_ok() {
34412                // Leave the options to None, 'auto' is the initial value.
34413                autos += 1;
34414                continue
34415            }
34416
34417            if column_count.is_none() {
34418                if let Ok(value) = input.try_parse(|input| column_count::parse(context, input)) {
34419                    column_count = Some(value);
34420                    continue
34421                }
34422            }
34423
34424            if column_width.is_none() {
34425                if let Ok(value) = input.try_parse(|input| column_width::parse(context, input)) {
34426                    column_width = Some(value);
34427                    continue
34428                }
34429            }
34430
34431            break
34432        }
34433
34434        let values = autos + column_count.iter().len() + column_width.iter().len();
34435        if values == 0 || values > 2 {
34436            Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
34437        } else {
34438            Ok(expanded! {
34439                column_count: unwrap_or_initial!(column_count),
34440                column_width: unwrap_or_initial!(column_width),
34441            })
34442        }
34443    }
34444
34445    impl<'a> ToCss for LonghandsToSerialize<'a> {
34446        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
34447            if self.column_width.is_auto() {
34448                return self.column_count.to_css(dest)
34449            }
34450            self.column_width.to_css(dest)?;
34451            if !self.column_count.is_auto() {
34452                dest.write_char(' ')?;
34453                self.column_count.to_css(dest)?;
34454            }
34455            Ok(())
34456        }
34457    }
34458
34459    }
34460
34461
34462
34463
34464
34465
34466    /* This Source Code Form is subject to the terms of the Mozilla Public
34467 * License, v. 2.0. If a copy of the MPL was not distributed with this
34468 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
34469
34470    /* This Source Code Form is subject to the terms of the Mozilla Public
34471 * License, v. 2.0. If a copy of the MPL was not distributed with this
34472 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
34473
34474    /* This Source Code Form is subject to the terms of the Mozilla Public
34475 * License, v. 2.0. If a copy of the MPL was not distributed with this
34476 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
34477
34478
34479
34480
34481
34482
34483    /// https://drafts.csswg.org/css-fonts-3/#propdef-font
34484    pub mod font {
34485        use cssparser::Parser;
34486        use crate::parser::ParserContext;
34487        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
34488        #[allow(unused_imports)]
34489        use selectors::parser::SelectorParseErrorKind;
34490        #[allow(unused_imports)]
34491        use std::fmt::{self, Write};
34492        #[allow(unused_imports)]
34493        use style_traits::{ParseError, StyleParseErrorKind};
34494        #[allow(unused_imports)]
34495        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
34496
34497        pub struct Longhands {
34498                pub font_style:
34499                    longhands::font_style::SpecifiedValue
34500                    ,
34501                pub font_variant_caps:
34502                    longhands::font_variant_caps::SpecifiedValue
34503                    ,
34504                pub font_weight:
34505                    longhands::font_weight::SpecifiedValue
34506                    ,
34507                pub font_stretch:
34508                    longhands::font_stretch::SpecifiedValue
34509                    ,
34510                pub font_size:
34511                    longhands::font_size::SpecifiedValue
34512                    ,
34513                pub line_height:
34514                    longhands::line_height::SpecifiedValue
34515                    ,
34516                pub font_family:
34517                    longhands::font_family::SpecifiedValue
34518                    ,
34519        }
34520
34521        /// Represents a serializable set of all of the longhand properties that
34522        /// correspond to a shorthand.
34523        pub struct LonghandsToSerialize<'a> {
34524                pub font_style:
34525                    &'a longhands::font_style::SpecifiedValue,
34526                pub font_variant_caps:
34527                    &'a longhands::font_variant_caps::SpecifiedValue,
34528                pub font_weight:
34529                    &'a longhands::font_weight::SpecifiedValue,
34530                pub font_stretch:
34531                    &'a longhands::font_stretch::SpecifiedValue,
34532                pub font_size:
34533                    &'a longhands::font_size::SpecifiedValue,
34534                pub line_height:
34535                    &'a longhands::line_height::SpecifiedValue,
34536                pub font_family:
34537                    &'a longhands::font_family::SpecifiedValue,
34538        }
34539
34540        impl<'a> LonghandsToSerialize<'a> {
34541            /// Tries to get a serializable set of longhands given a set of
34542            /// property declarations.
34543            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
34544                // Define all of the expected variables that correspond to the shorthand
34545                    let mut font_style =
34546                        None::<&'a longhands::font_style::SpecifiedValue>;
34547                    let mut font_variant_caps =
34548                        None::<&'a longhands::font_variant_caps::SpecifiedValue>;
34549                    let mut font_weight =
34550                        None::<&'a longhands::font_weight::SpecifiedValue>;
34551                    let mut font_stretch =
34552                        None::<&'a longhands::font_stretch::SpecifiedValue>;
34553                    let mut font_size =
34554                        None::<&'a longhands::font_size::SpecifiedValue>;
34555                    let mut line_height =
34556                        None::<&'a longhands::line_height::SpecifiedValue>;
34557                    let mut font_family =
34558                        None::<&'a longhands::font_family::SpecifiedValue>;
34559
34560                // Attempt to assign the incoming declarations to the expected variables
34561                for declaration in iter {
34562                    match *declaration {
34563                            PropertyDeclaration::FontStyle(ref value) => {
34564                                font_style = Some(value)
34565                            },
34566                            PropertyDeclaration::FontVariantCaps(ref value) => {
34567                                font_variant_caps = Some(value)
34568                            },
34569                            PropertyDeclaration::FontWeight(ref value) => {
34570                                font_weight = Some(value)
34571                            },
34572                            PropertyDeclaration::FontStretch(ref value) => {
34573                                font_stretch = Some(value)
34574                            },
34575                            PropertyDeclaration::FontSize(ref value) => {
34576                                font_size = Some(value)
34577                            },
34578                            PropertyDeclaration::LineHeight(ref value) => {
34579                                line_height = Some(value)
34580                            },
34581                            PropertyDeclaration::FontFamily(ref value) => {
34582                                font_family = Some(value)
34583                            },
34584                        _ => {}
34585                    };
34586                }
34587
34588                // If any of the expected variables are missing, return an error
34589                match (
34590                        font_style,
34591                        font_variant_caps,
34592                        font_weight,
34593                        font_stretch,
34594                        font_size,
34595                        line_height,
34596                        font_family,
34597                ) {
34598
34599                    (
34600                        Some(font_style),
34601                        Some(font_variant_caps),
34602                        Some(font_weight),
34603                        Some(font_stretch),
34604                        Some(font_size),
34605                        Some(line_height),
34606                        Some(font_family),
34607                    ) =>
34608                    Ok(LonghandsToSerialize {
34609                            font_style,
34610                            font_variant_caps,
34611                            font_weight,
34612                            font_stretch,
34613                            font_size,
34614                            line_height,
34615                            font_family,
34616                    }),
34617                    _ => Err(())
34618                }
34619            }
34620        }
34621
34622        /// Parse the given shorthand and fill the result into the
34623        /// `declarations` vector.
34624        pub fn parse_into<'i, 't>(
34625            declarations: &mut SourcePropertyDeclaration,
34626            context: &ParserContext,
34627            input: &mut Parser<'i, 't>,
34628        ) -> Result<(), ParseError<'i>> {
34629            #[allow(unused_imports)]
34630            use crate::properties::{NonCustomPropertyId, LonghandId};
34631            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
34632                    declarations.push(PropertyDeclaration::FontStyle(
34633                        longhands.font_style
34634                    ));
34635                    declarations.push(PropertyDeclaration::FontVariantCaps(
34636                        longhands.font_variant_caps
34637                    ));
34638                    declarations.push(PropertyDeclaration::FontWeight(
34639                        longhands.font_weight
34640                    ));
34641                    declarations.push(PropertyDeclaration::FontStretch(
34642                        longhands.font_stretch
34643                    ));
34644                    declarations.push(PropertyDeclaration::FontSize(
34645                        longhands.font_size
34646                    ));
34647                    declarations.push(PropertyDeclaration::LineHeight(
34648                        longhands.line_height
34649                    ));
34650                    declarations.push(PropertyDeclaration::FontFamily(
34651                        longhands.font_family
34652                    ));
34653            })
34654        }
34655
34656        /// Try to serialize a given shorthand to a string.
34657        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
34658            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
34659                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
34660                Err(_) => Ok(())
34661            }
34662        }
34663
34664        
34665    use crate::computed_values::font_variant_caps::T::SmallCaps;
34666    use crate::parser::Parse;
34667    use crate::properties::longhands::{font_family, font_style, font_weight, font_stretch};
34668    #[cfg(feature = "gecko")]
34669    use crate::properties::longhands::font_size;
34670    use crate::properties::longhands::font_variant_caps;
34671    use crate::values::specified::font::LineHeight;
34672    use crate::values::specified::{FontSize, FontWeight};
34673    use crate::values::specified::font::{FontStretch, FontStretchKeyword};
34674    #[cfg(feature = "gecko")]
34675    use crate::values::specified::font::SystemFont;
34676
34677    
34678    use self::font_family::SpecifiedValue as FontFamily;
34679
34680    pub fn parse_value<'i, 't>(
34681        context: &ParserContext,
34682        input: &mut Parser<'i, 't>,
34683    ) -> Result<Longhands, ParseError<'i>> {
34684        let mut nb_normals = 0;
34685        let mut style = None;
34686        let mut variant_caps = None;
34687        let mut weight = None;
34688        let mut stretch = None;
34689        let size;
34690        loop {
34691            // Special-case 'normal' because it is valid in each of
34692            // font-style, font-weight, font-variant and font-stretch.
34693            // Leaves the values to None, 'normal' is the initial value for each of them.
34694            if input.try_parse(|input| input.expect_ident_matching("normal")).is_ok() {
34695                nb_normals += 1;
34696                continue;
34697            }
34698            if style.is_none() {
34699                if let Ok(value) = input.try_parse(|input| font_style::parse(context, input)) {
34700                    style = Some(value);
34701                    continue
34702                }
34703            }
34704            if weight.is_none() {
34705                if let Ok(value) = input.try_parse(|input| font_weight::parse(context, input)) {
34706                    weight = Some(value);
34707                    continue
34708                }
34709            }
34710            if variant_caps.is_none() {
34711                // The only variant-caps value allowed is small-caps (from CSS2); the added values
34712                // defined by CSS Fonts 3 and later are not accepted.
34713                // https://www.w3.org/TR/css-fonts-4/#font-prop
34714                if input.try_parse(|input| input.expect_ident_matching("small-caps")).is_ok() {
34715                    variant_caps = Some(SmallCaps);
34716                    continue
34717                }
34718            }
34719            if stretch.is_none() {
34720                if let Ok(value) = input.try_parse(FontStretchKeyword::parse) {
34721                    stretch = Some(FontStretch::Keyword(value));
34722                    continue
34723                }
34724            }
34725            size = Some(FontSize::parse(context, input)?);
34726            break
34727        }
34728
34729        let size = match size {
34730            Some(s) => s,
34731            None => {
34732                return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
34733            }
34734        };
34735
34736        let line_height = if input.try_parse(|input| input.expect_delim('/')).is_ok() {
34737            Some(LineHeight::parse(context, input)?)
34738        } else {
34739            None
34740        };
34741
34742        #[inline]
34743        fn count<T>(opt: &Option<T>) -> u8 {
34744            if opt.is_some() { 1 } else { 0 }
34745        }
34746
34747        if (count(&style) + count(&weight) + count(&variant_caps) + count(&stretch) + nb_normals) > 4 {
34748            return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
34749        }
34750
34751        let family = FontFamily::parse(context, input)?;
34752        Ok(expanded! {
34753                font_style: unwrap_or_initial!(font_style, style),
34754                font_weight: unwrap_or_initial!(font_weight, weight),
34755                font_stretch: unwrap_or_initial!(font_stretch, stretch),
34756                font_variant_caps: unwrap_or_initial!(font_variant_caps, variant_caps),
34757            font_size: size,
34758            line_height: line_height.unwrap_or(LineHeight::normal()),
34759            font_family: family,
34760        })
34761    }
34762
34763
34764    impl<'a> ToCss for LonghandsToSerialize<'a> {
34765        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
34766
34767
34768            // Only font-stretch keywords are allowed as part as the font
34769            // shorthand.
34770            let font_stretch = match *self.font_stretch {
34771                FontStretch::Keyword(kw) => kw,
34772                FontStretch::Stretch(percentage) => {
34773                    match FontStretchKeyword::from_percentage(percentage.0.get()) {
34774                        Some(kw) => kw,
34775                        None => return Ok(()),
34776                    }
34777                }
34778                FontStretch::System(..) => return Ok(()),
34779            };
34780
34781            // The only variant-caps value allowed in the shorthand is small-caps (from CSS2);
34782            // the added values defined by CSS Fonts 3 and later are not supported.
34783            // https://www.w3.org/TR/css-fonts-4/#font-prop
34784            if self.font_variant_caps != &font_variant_caps::get_initial_specified_value() &&
34785                *self.font_variant_caps != SmallCaps {
34786                return Ok(());
34787            }
34788
34789                if self.font_style != &font_style::get_initial_specified_value() {
34790                    self.font_style.to_css(dest)?;
34791                    dest.write_char(' ')?;
34792                }
34793                if self.font_variant_caps != &font_variant_caps::get_initial_specified_value() {
34794                    self.font_variant_caps.to_css(dest)?;
34795                    dest.write_char(' ')?;
34796                }
34797
34798            // The initial specified font-weight value of 'normal' computes as a number (400),
34799            // not to the keyword, so we need to check for that as well in order to properly
34800            // serialize the computed style.
34801            if self.font_weight != &FontWeight::normal() &&
34802               self.font_weight != &FontWeight::from_gecko_keyword(400)  {
34803                self.font_weight.to_css(dest)?;
34804                dest.write_char(' ')?;
34805            }
34806
34807            if font_stretch != FontStretchKeyword::Normal {
34808                font_stretch.to_css(dest)?;
34809                dest.write_char(' ')?;
34810            }
34811
34812            self.font_size.to_css(dest)?;
34813
34814            if *self.line_height != LineHeight::normal() {
34815                dest.write_str(" / ")?;
34816                self.line_height.to_css(dest)?;
34817            }
34818
34819            dest.write_char(' ')?;
34820            self.font_family.to_css(dest)?;
34821
34822            Ok(())
34823        }
34824    }
34825
34826    impl<'a> LonghandsToSerialize<'a> {
34827    }
34828
34829    
34830    impl SpecifiedValueInfo for Longhands {
34831        const SUPPORTED_TYPES: u8 = 0
34832            | <longhands::font_style::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES
34833            | <longhands::font_weight::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES
34834            | <longhands::font_stretch::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES
34835            | <longhands::font_variant_caps::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES
34836            | <longhands::font_size::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES
34837            | <longhands::font_family::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES
34838            ;
34839
34840        fn collect_completion_keywords(f: KeywordsCollectFn) {
34841            <longhands::font_style::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords(f);
34842            <longhands::font_weight::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords(f);
34843            <longhands::font_stretch::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords(f);
34844            <longhands::font_variant_caps::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords(f);
34845            <longhands::font_size::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords(f);
34846            <longhands::font_family::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords(f);
34847        }
34848    }
34849
34850    }
34851
34852
34853
34854
34855    /// https://drafts.csswg.org/css-fonts-3/#propdef-font-variant
34856    pub mod font_variant {
34857        use cssparser::Parser;
34858        use crate::parser::ParserContext;
34859        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
34860        #[allow(unused_imports)]
34861        use selectors::parser::SelectorParseErrorKind;
34862        #[allow(unused_imports)]
34863        use std::fmt::{self, Write};
34864        #[allow(unused_imports)]
34865        use style_traits::{ParseError, StyleParseErrorKind};
34866        #[allow(unused_imports)]
34867        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
34868
34869        #[derive(SpecifiedValueInfo)]
34870        pub struct Longhands {
34871                pub font_variant_caps:
34872                    longhands::font_variant_caps::SpecifiedValue
34873                    ,
34874        }
34875
34876        /// Represents a serializable set of all of the longhand properties that
34877        /// correspond to a shorthand.
34878        pub struct LonghandsToSerialize<'a> {
34879                pub font_variant_caps:
34880                    &'a longhands::font_variant_caps::SpecifiedValue,
34881        }
34882
34883        impl<'a> LonghandsToSerialize<'a> {
34884            /// Tries to get a serializable set of longhands given a set of
34885            /// property declarations.
34886            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
34887                // Define all of the expected variables that correspond to the shorthand
34888                    let mut font_variant_caps =
34889                        None::<&'a longhands::font_variant_caps::SpecifiedValue>;
34890
34891                // Attempt to assign the incoming declarations to the expected variables
34892                for declaration in iter {
34893                    match *declaration {
34894                            PropertyDeclaration::FontVariantCaps(ref value) => {
34895                                font_variant_caps = Some(value)
34896                            },
34897                        _ => {}
34898                    };
34899                }
34900
34901                // If any of the expected variables are missing, return an error
34902                match (
34903                        font_variant_caps,
34904                ) {
34905
34906                    (
34907                        Some(font_variant_caps),
34908                    ) =>
34909                    Ok(LonghandsToSerialize {
34910                            font_variant_caps,
34911                    }),
34912                    _ => Err(())
34913                }
34914            }
34915        }
34916
34917        /// Parse the given shorthand and fill the result into the
34918        /// `declarations` vector.
34919        pub fn parse_into<'i, 't>(
34920            declarations: &mut SourcePropertyDeclaration,
34921            context: &ParserContext,
34922            input: &mut Parser<'i, 't>,
34923        ) -> Result<(), ParseError<'i>> {
34924            #[allow(unused_imports)]
34925            use crate::properties::{NonCustomPropertyId, LonghandId};
34926            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
34927                    declarations.push(PropertyDeclaration::FontVariantCaps(
34928                        longhands.font_variant_caps
34929                    ));
34930            })
34931        }
34932
34933        /// Try to serialize a given shorthand to a string.
34934        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
34935            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
34936                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
34937                Err(_) => Ok(())
34938            }
34939        }
34940
34941        
34942    
34943
34944    use crate::properties::longhands::font_variant_caps;
34945    #[allow(unused_imports)]
34946    use crate::values::specified::FontVariantLigatures;
34947
34948    pub fn parse_value<'i, 't>(
34949        context: &ParserContext,
34950        input: &mut Parser<'i, 't>,
34951    ) -> Result<Longhands, ParseError<'i>> {
34952        let mut caps = None;
34953
34954        if input.try_parse(|input| input.expect_ident_matching("normal")).is_ok() {
34955            // Leave the values to None, 'normal' is the initial value for all the sub properties.
34956        } else if input.try_parse(|input| input.expect_ident_matching("none")).is_ok() {
34957            // The 'none' value sets 'font-variant-ligatures' to 'none' and resets all other sub properties
34958            // to their initial value.
34959        } else {
34960            let mut has_custom_value: bool = false;
34961            loop {
34962                if input.try_parse(|input| input.expect_ident_matching("normal")).is_ok() ||
34963                   input.try_parse(|input| input.expect_ident_matching("none")).is_ok() {
34964                    return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
34965                }
34966                if caps.is_none() {
34967                    if let Ok(value) = input.try_parse(|i| font_variant_caps::parse(context, i)) {
34968                        has_custom_value = true;
34969                        caps = Some(value);
34970                        continue
34971                    }
34972                }
34973
34974                break
34975            }
34976
34977            if !has_custom_value {
34978                return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
34979            }
34980        }
34981
34982        Ok(expanded! {
34983            font_variant_caps: unwrap_or_initial!(font_variant_caps, caps),
34984        })
34985    }
34986
34987    impl<'a> ToCss for LonghandsToSerialize<'a>  {
34988        #[allow(unused_assignments)]
34989        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
34990
34991            let has_none_ligatures =
34992                false;
34993
34994            const TOTAL_SUBPROPS: usize = 1;
34995            let mut nb_normals = 0;
34996            {
34997                let value = self.font_variant_caps;
34998                if value == &font_variant_caps::get_initial_specified_value() {
34999                   nb_normals += 1;
35000                }
35001            }
35002
35003
35004            if nb_normals > 0 && nb_normals == TOTAL_SUBPROPS {
35005                dest.write_str("normal")?;
35006            } else if has_none_ligatures {
35007                if nb_normals == TOTAL_SUBPROPS - 1 {
35008                    // Serialize to 'none' if 'font-variant-ligatures' is set to 'none' and all other
35009                    // font feature properties are reset to their initial value.
35010                    dest.write_str("none")?;
35011                } else {
35012                    return Ok(())
35013                }
35014            } else {
35015                let mut has_any = false;
35016                {
35017                    let value = self.font_variant_caps;
35018                    if value != &font_variant_caps::get_initial_specified_value() {
35019                        if has_any {
35020                            dest.write_char(' ')?;
35021                        }
35022                        has_any = true;
35023                        value.to_css(dest)?;
35024                    }
35025                }
35026            }
35027
35028            Ok(())
35029        }
35030    }
35031
35032    }
35033
35034
35035
35036
35037
35038
35039    /* This Source Code Form is subject to the terms of the Mozilla Public
35040 * License, v. 2.0. If a copy of the MPL was not distributed with this
35041 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
35042
35043    /* This Source Code Form is subject to the terms of the Mozilla Public
35044 * License, v. 2.0. If a copy of the MPL was not distributed with this
35045 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
35046
35047
35048
35049
35050
35051
35052
35053    /* This Source Code Form is subject to the terms of the Mozilla Public
35054 * License, v. 2.0. If a copy of the MPL was not distributed with this
35055 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
35056
35057    /* This Source Code Form is subject to the terms of the Mozilla Public
35058 * License, v. 2.0. If a copy of the MPL was not distributed with this
35059 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
35060
35061
35062
35063
35064
35065
35066
35067
35068
35069
35070
35071
35072
35073    /// https://www.w3.org/TR/css-text-4/#white-space-property
35074    pub mod white_space {
35075        use cssparser::Parser;
35076        use crate::parser::ParserContext;
35077        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
35078        #[allow(unused_imports)]
35079        use selectors::parser::SelectorParseErrorKind;
35080        #[allow(unused_imports)]
35081        use std::fmt::{self, Write};
35082        #[allow(unused_imports)]
35083        use style_traits::{ParseError, StyleParseErrorKind};
35084        #[allow(unused_imports)]
35085        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
35086
35087        pub struct Longhands {
35088                pub text_wrap_mode:
35089                    longhands::text_wrap_mode::SpecifiedValue
35090                    ,
35091                pub white_space_collapse:
35092                    longhands::white_space_collapse::SpecifiedValue
35093                    ,
35094        }
35095
35096        /// Represents a serializable set of all of the longhand properties that
35097        /// correspond to a shorthand.
35098        pub struct LonghandsToSerialize<'a> {
35099                pub text_wrap_mode:
35100                    &'a longhands::text_wrap_mode::SpecifiedValue,
35101                pub white_space_collapse:
35102                    &'a longhands::white_space_collapse::SpecifiedValue,
35103        }
35104
35105        impl<'a> LonghandsToSerialize<'a> {
35106            /// Tries to get a serializable set of longhands given a set of
35107            /// property declarations.
35108            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
35109                // Define all of the expected variables that correspond to the shorthand
35110                    let mut text_wrap_mode =
35111                        None::<&'a longhands::text_wrap_mode::SpecifiedValue>;
35112                    let mut white_space_collapse =
35113                        None::<&'a longhands::white_space_collapse::SpecifiedValue>;
35114
35115                // Attempt to assign the incoming declarations to the expected variables
35116                for declaration in iter {
35117                    match *declaration {
35118                            PropertyDeclaration::TextWrapMode(ref value) => {
35119                                text_wrap_mode = Some(value)
35120                            },
35121                            PropertyDeclaration::WhiteSpaceCollapse(ref value) => {
35122                                white_space_collapse = Some(value)
35123                            },
35124                        _ => {}
35125                    };
35126                }
35127
35128                // If any of the expected variables are missing, return an error
35129                match (
35130                        text_wrap_mode,
35131                        white_space_collapse,
35132                ) {
35133
35134                    (
35135                        Some(text_wrap_mode),
35136                        Some(white_space_collapse),
35137                    ) =>
35138                    Ok(LonghandsToSerialize {
35139                            text_wrap_mode,
35140                            white_space_collapse,
35141                    }),
35142                    _ => Err(())
35143                }
35144            }
35145        }
35146
35147        /// Parse the given shorthand and fill the result into the
35148        /// `declarations` vector.
35149        pub fn parse_into<'i, 't>(
35150            declarations: &mut SourcePropertyDeclaration,
35151            context: &ParserContext,
35152            input: &mut Parser<'i, 't>,
35153        ) -> Result<(), ParseError<'i>> {
35154            #[allow(unused_imports)]
35155            use crate::properties::{NonCustomPropertyId, LonghandId};
35156            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
35157                    declarations.push(PropertyDeclaration::TextWrapMode(
35158                        longhands.text_wrap_mode
35159                    ));
35160                    declarations.push(PropertyDeclaration::WhiteSpaceCollapse(
35161                        longhands.white_space_collapse
35162                    ));
35163            })
35164        }
35165
35166        /// Try to serialize a given shorthand to a string.
35167        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
35168            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
35169                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
35170                Err(_) => Ok(())
35171            }
35172        }
35173
35174        
35175    use crate::properties::longhands::{text_wrap_mode, white_space_collapse};
35176
35177    pub fn parse_value<'i, 't>(
35178        context: &ParserContext,
35179        input: &mut Parser<'i, 't>,
35180    ) -> Result<Longhands, ParseError<'i>> {
35181        use white_space_collapse::computed_value::T as Collapse;
35182        use text_wrap_mode::computed_value::T as Wrap;
35183
35184        fn parse_special_shorthands<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Longhands, ParseError<'i>> {
35185            let (mode, collapse) = try_match_ident_ignore_ascii_case! { input,
35186                "normal" => (Wrap::Wrap, Collapse::Collapse),
35187                "pre" => (Wrap::Nowrap, Collapse::Preserve),
35188                "pre-wrap" => (Wrap::Wrap, Collapse::Preserve),
35189                "pre-line" => (Wrap::Wrap, Collapse::PreserveBreaks),
35190            };
35191            Ok(expanded! {
35192                text_wrap_mode: mode,
35193                white_space_collapse: collapse,
35194            })
35195        }
35196
35197        if let Ok(result) = input.try_parse(parse_special_shorthands) {
35198            return Ok(result);
35199        }
35200
35201        let mut wrap = None;
35202        let mut collapse = None;
35203
35204        loop {
35205            if wrap.is_none() {
35206                if let Ok(value) = input.try_parse(|input| text_wrap_mode::parse(context, input)) {
35207                    wrap = Some(value);
35208                    continue
35209                }
35210            }
35211            if collapse.is_none() {
35212                if let Ok(value) = input.try_parse(|input| white_space_collapse::parse(context, input)) {
35213                    collapse = Some(value);
35214                    continue
35215                }
35216            }
35217            break
35218        }
35219
35220        if wrap.is_some() || collapse.is_some() {
35221            Ok(expanded! {
35222                text_wrap_mode: unwrap_or_initial!(text_wrap_mode, wrap),
35223                white_space_collapse: unwrap_or_initial!(white_space_collapse, collapse),
35224            })
35225        } else {
35226            Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
35227        }
35228    }
35229
35230    impl<'a> ToCss for LonghandsToSerialize<'a>  {
35231        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
35232            use white_space_collapse::computed_value::T as Collapse;
35233            use text_wrap_mode::computed_value::T as Wrap;
35234
35235            match *self.text_wrap_mode {
35236                Wrap::Wrap => {
35237                    match *self.white_space_collapse {
35238                        Collapse::Collapse => return dest.write_str("normal"),
35239                        Collapse::Preserve => return dest.write_str("pre-wrap"),
35240                        Collapse::PreserveBreaks => return dest.write_str("pre-line"),
35241                        _ => (),
35242                    }
35243                },
35244                Wrap::Nowrap => {
35245                    if let Collapse::Preserve = *self.white_space_collapse {
35246                        return dest.write_str("pre");
35247                    }
35248                },
35249            }
35250
35251            let mut has_value = false;
35252            if *self.white_space_collapse != Collapse::Collapse {
35253                self.white_space_collapse.to_css(dest)?;
35254                has_value = true;
35255            }
35256
35257            if *self.text_wrap_mode != Wrap::Wrap {
35258                if has_value {
35259                    dest.write_char(' ')?;
35260                }
35261                self.text_wrap_mode.to_css(dest)?;
35262            }
35263
35264            Ok(())
35265        }
35266    }
35267
35268    impl SpecifiedValueInfo for Longhands {
35269        fn collect_completion_keywords(f: KeywordsCollectFn) {
35270            // Collect keywords from our longhands.
35271            text_wrap_mode::SpecifiedValue::collect_completion_keywords(f);
35272            white_space_collapse::SpecifiedValue::collect_completion_keywords(f);
35273
35274            // Add the special values supported only by the shorthand
35275            // (see parse_special_shorthands() above).
35276            f(&["normal", "pre", "pre-wrap", "pre-line"])
35277        }
35278    }
35279
35280    }
35281
35282
35283// CSS Compatibility
35284// https://compat.spec.whatwg.org/
35285
35286
35287
35288
35289    /* This Source Code Form is subject to the terms of the Mozilla Public
35290 * License, v. 2.0. If a copy of the MPL was not distributed with this
35291 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
35292
35293    /* This Source Code Form is subject to the terms of the Mozilla Public
35294 * License, v. 2.0. If a copy of the MPL was not distributed with this
35295 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
35296
35297
35298
35299
35300
35301    /// https://drafts.csswg.org/css-lists/#propdef-list-style
35302    pub mod list_style {
35303        use cssparser::Parser;
35304        use crate::parser::ParserContext;
35305        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
35306        #[allow(unused_imports)]
35307        use selectors::parser::SelectorParseErrorKind;
35308        #[allow(unused_imports)]
35309        use std::fmt::{self, Write};
35310        #[allow(unused_imports)]
35311        use style_traits::{ParseError, StyleParseErrorKind};
35312        #[allow(unused_imports)]
35313        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
35314
35315        #[derive(SpecifiedValueInfo)]
35316        pub struct Longhands {
35317                pub list_style_position:
35318                    longhands::list_style_position::SpecifiedValue
35319                    ,
35320                pub list_style_image:
35321                    longhands::list_style_image::SpecifiedValue
35322                    ,
35323                pub list_style_type:
35324                    longhands::list_style_type::SpecifiedValue
35325                    ,
35326        }
35327
35328        /// Represents a serializable set of all of the longhand properties that
35329        /// correspond to a shorthand.
35330        pub struct LonghandsToSerialize<'a> {
35331                pub list_style_position:
35332                    &'a longhands::list_style_position::SpecifiedValue,
35333                pub list_style_image:
35334                    &'a longhands::list_style_image::SpecifiedValue,
35335                pub list_style_type:
35336                    &'a longhands::list_style_type::SpecifiedValue,
35337        }
35338
35339        impl<'a> LonghandsToSerialize<'a> {
35340            /// Tries to get a serializable set of longhands given a set of
35341            /// property declarations.
35342            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
35343                // Define all of the expected variables that correspond to the shorthand
35344                    let mut list_style_position =
35345                        None::<&'a longhands::list_style_position::SpecifiedValue>;
35346                    let mut list_style_image =
35347                        None::<&'a longhands::list_style_image::SpecifiedValue>;
35348                    let mut list_style_type =
35349                        None::<&'a longhands::list_style_type::SpecifiedValue>;
35350
35351                // Attempt to assign the incoming declarations to the expected variables
35352                for declaration in iter {
35353                    match *declaration {
35354                            PropertyDeclaration::ListStylePosition(ref value) => {
35355                                list_style_position = Some(value)
35356                            },
35357                            PropertyDeclaration::ListStyleImage(ref value) => {
35358                                list_style_image = Some(value)
35359                            },
35360                            PropertyDeclaration::ListStyleType(ref value) => {
35361                                list_style_type = Some(value)
35362                            },
35363                        _ => {}
35364                    };
35365                }
35366
35367                // If any of the expected variables are missing, return an error
35368                match (
35369                        list_style_position,
35370                        list_style_image,
35371                        list_style_type,
35372                ) {
35373
35374                    (
35375                        Some(list_style_position),
35376                        Some(list_style_image),
35377                        Some(list_style_type),
35378                    ) =>
35379                    Ok(LonghandsToSerialize {
35380                            list_style_position,
35381                            list_style_image,
35382                            list_style_type,
35383                    }),
35384                    _ => Err(())
35385                }
35386            }
35387        }
35388
35389        /// Parse the given shorthand and fill the result into the
35390        /// `declarations` vector.
35391        pub fn parse_into<'i, 't>(
35392            declarations: &mut SourcePropertyDeclaration,
35393            context: &ParserContext,
35394            input: &mut Parser<'i, 't>,
35395        ) -> Result<(), ParseError<'i>> {
35396            #[allow(unused_imports)]
35397            use crate::properties::{NonCustomPropertyId, LonghandId};
35398            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
35399                    declarations.push(PropertyDeclaration::ListStylePosition(
35400                        longhands.list_style_position
35401                    ));
35402                    declarations.push(PropertyDeclaration::ListStyleImage(
35403                        longhands.list_style_image
35404                    ));
35405                    declarations.push(PropertyDeclaration::ListStyleType(
35406                        longhands.list_style_type
35407                    ));
35408            })
35409        }
35410
35411        /// Try to serialize a given shorthand to a string.
35412        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
35413            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
35414                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
35415                Err(_) => Ok(())
35416            }
35417        }
35418
35419        
35420    use crate::properties::longhands::{list_style_image, list_style_position, list_style_type};
35421    use crate::values::specified::Image;
35422
35423    pub fn parse_value<'i, 't>(
35424        context: &ParserContext,
35425        input: &mut Parser<'i, 't>,
35426    ) -> Result<Longhands, ParseError<'i>> {
35427        // `none` is ambiguous until we've finished parsing the shorthands, so we count the number
35428        // of times we see it.
35429        let mut nones = 0u8;
35430        let (mut image, mut position, mut list_style_type, mut any) = (None, None, None, false);
35431        loop {
35432            if input.try_parse(|input| input.expect_ident_matching("none")).is_ok() {
35433                nones = nones + 1;
35434                if nones > 2 {
35435                    return Err(input.new_custom_error(SelectorParseErrorKind::UnexpectedIdent("none".into())))
35436                }
35437                any = true;
35438                continue
35439            }
35440
35441            if image.is_none() {
35442                if let Ok(value) = input.try_parse(|input| list_style_image::parse(context, input)) {
35443                    image = Some(value);
35444                    any = true;
35445                    continue
35446                }
35447            }
35448
35449            if position.is_none() {
35450                if let Ok(value) = input.try_parse(|input| list_style_position::parse(context, input)) {
35451                    position = Some(value);
35452                    any = true;
35453                    continue
35454                }
35455            }
35456
35457            // list-style-type must be checked the last, because it accepts
35458            // arbitrary identifier for custom counter style, and thus may
35459            // affect values of list-style-position.
35460            if list_style_type.is_none() {
35461                if let Ok(value) = input.try_parse(|input| list_style_type::parse(context, input)) {
35462                    list_style_type = Some(value);
35463                    any = true;
35464                    continue
35465                }
35466            }
35467            break
35468        }
35469
35470        let position = unwrap_or_initial!(list_style_position, position);
35471
35472        // If there are two `none`s, then we can't have a type or image; if there is one `none`,
35473        // then we can't have both a type *and* an image; if there is no `none` then we're fine as
35474        // long as we parsed something.
35475        use self::list_style_type::SpecifiedValue as ListStyleType;
35476        match (any, nones, list_style_type, image) {
35477            (true, 2, None, None) => {
35478                Ok(expanded! {
35479                    list_style_position: position,
35480                    list_style_image: Image::None,
35481                    list_style_type: ListStyleType::none(),
35482                })
35483            }
35484            (true, 1, None, Some(image)) => {
35485                Ok(expanded! {
35486                    list_style_position: position,
35487                    list_style_image: image,
35488                    list_style_type: ListStyleType::none(),
35489                })
35490            }
35491            (true, 1, Some(list_style_type), None) => {
35492                Ok(expanded! {
35493                    list_style_position: position,
35494                    list_style_image: Image::None,
35495                    list_style_type: list_style_type,
35496                })
35497            }
35498            (true, 1, None, None) => {
35499                Ok(expanded! {
35500                    list_style_position: position,
35501                    list_style_image: Image::None,
35502                    list_style_type: ListStyleType::none(),
35503                })
35504            }
35505            (true, 0, list_style_type, image) => {
35506                Ok(expanded! {
35507                    list_style_position: position,
35508                    list_style_image: unwrap_or_initial!(list_style_image, image),
35509                    list_style_type: unwrap_or_initial!(list_style_type),
35510                })
35511            }
35512            _ => Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError)),
35513        }
35514    }
35515
35516    impl<'a> ToCss for LonghandsToSerialize<'a>  {
35517        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
35518            use longhands::list_style_position::SpecifiedValue as ListStylePosition;
35519            use longhands::list_style_type::SpecifiedValue as ListStyleType;
35520            use longhands::list_style_image::SpecifiedValue as ListStyleImage;
35521            let mut have_one_non_initial_value = false;
35522            let position_is_initial = self.list_style_position == &ListStylePosition::Outside;
35523            if !position_is_initial {
35524                self.list_style_position.to_css(dest)?;
35525                have_one_non_initial_value = true;
35526            }
35527            if self.list_style_image != &ListStyleImage::None {
35528                if have_one_non_initial_value {
35529                    dest.write_char(' ')?;
35530                }
35531                self.list_style_image.to_css(dest)?;
35532                have_one_non_initial_value = true;
35533            }
35534            if self.list_style_type != &ListStyleType::disc() {
35535                if have_one_non_initial_value {
35536                    dest.write_char(' ')?;
35537                }
35538                self.list_style_type.to_css(dest)?;
35539                have_one_non_initial_value = true;
35540            }
35541            if !have_one_non_initial_value {
35542                self.list_style_position.to_css(dest)?;
35543            }
35544            Ok(())
35545        }
35546    }
35547
35548    }
35549
35550
35551    /* This Source Code Form is subject to the terms of the Mozilla Public
35552 * License, v. 2.0. If a copy of the MPL was not distributed with this
35553 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
35554
35555
35556
35557
35558
35559    
35560    
35561
35562    /// https://drafts.csswg.org/css-box/#propdef-margin
35563    pub mod margin {
35564        use cssparser::Parser;
35565        use crate::parser::ParserContext;
35566        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
35567        #[allow(unused_imports)]
35568        use selectors::parser::SelectorParseErrorKind;
35569        #[allow(unused_imports)]
35570        use std::fmt::{self, Write};
35571        #[allow(unused_imports)]
35572        use style_traits::{ParseError, StyleParseErrorKind};
35573        #[allow(unused_imports)]
35574        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
35575
35576        #[derive(SpecifiedValueInfo)]
35577        pub struct Longhands {
35578                pub margin_top:
35579                    longhands::margin_top::SpecifiedValue
35580                    ,
35581                pub margin_right:
35582                    longhands::margin_right::SpecifiedValue
35583                    ,
35584                pub margin_bottom:
35585                    longhands::margin_bottom::SpecifiedValue
35586                    ,
35587                pub margin_left:
35588                    longhands::margin_left::SpecifiedValue
35589                    ,
35590        }
35591
35592        /// Represents a serializable set of all of the longhand properties that
35593        /// correspond to a shorthand.
35594        pub struct LonghandsToSerialize<'a> {
35595                pub margin_top:
35596                    &'a longhands::margin_top::SpecifiedValue,
35597                pub margin_right:
35598                    &'a longhands::margin_right::SpecifiedValue,
35599                pub margin_bottom:
35600                    &'a longhands::margin_bottom::SpecifiedValue,
35601                pub margin_left:
35602                    &'a longhands::margin_left::SpecifiedValue,
35603        }
35604
35605        impl<'a> LonghandsToSerialize<'a> {
35606            /// Tries to get a serializable set of longhands given a set of
35607            /// property declarations.
35608            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
35609                // Define all of the expected variables that correspond to the shorthand
35610                    let mut margin_top =
35611                        None::<&'a longhands::margin_top::SpecifiedValue>;
35612                    let mut margin_right =
35613                        None::<&'a longhands::margin_right::SpecifiedValue>;
35614                    let mut margin_bottom =
35615                        None::<&'a longhands::margin_bottom::SpecifiedValue>;
35616                    let mut margin_left =
35617                        None::<&'a longhands::margin_left::SpecifiedValue>;
35618
35619                // Attempt to assign the incoming declarations to the expected variables
35620                for declaration in iter {
35621                    match *declaration {
35622                            PropertyDeclaration::MarginTop(ref value) => {
35623                                margin_top = Some(value)
35624                            },
35625                            PropertyDeclaration::MarginRight(ref value) => {
35626                                margin_right = Some(value)
35627                            },
35628                            PropertyDeclaration::MarginBottom(ref value) => {
35629                                margin_bottom = Some(value)
35630                            },
35631                            PropertyDeclaration::MarginLeft(ref value) => {
35632                                margin_left = Some(value)
35633                            },
35634                        _ => {}
35635                    };
35636                }
35637
35638                // If any of the expected variables are missing, return an error
35639                match (
35640                        margin_top,
35641                        margin_right,
35642                        margin_bottom,
35643                        margin_left,
35644                ) {
35645
35646                    (
35647                        Some(margin_top),
35648                        Some(margin_right),
35649                        Some(margin_bottom),
35650                        Some(margin_left),
35651                    ) =>
35652                    Ok(LonghandsToSerialize {
35653                            margin_top,
35654                            margin_right,
35655                            margin_bottom,
35656                            margin_left,
35657                    }),
35658                    _ => Err(())
35659                }
35660            }
35661        }
35662
35663        /// Parse the given shorthand and fill the result into the
35664        /// `declarations` vector.
35665        pub fn parse_into<'i, 't>(
35666            declarations: &mut SourcePropertyDeclaration,
35667            context: &ParserContext,
35668            input: &mut Parser<'i, 't>,
35669        ) -> Result<(), ParseError<'i>> {
35670            #[allow(unused_imports)]
35671            use crate::properties::{NonCustomPropertyId, LonghandId};
35672            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
35673                    declarations.push(PropertyDeclaration::MarginTop(
35674                        longhands.margin_top
35675                    ));
35676                    declarations.push(PropertyDeclaration::MarginRight(
35677                        longhands.margin_right
35678                    ));
35679                    declarations.push(PropertyDeclaration::MarginBottom(
35680                        longhands.margin_bottom
35681                    ));
35682                    declarations.push(PropertyDeclaration::MarginLeft(
35683                        longhands.margin_left
35684                    ));
35685            })
35686        }
35687
35688        /// Try to serialize a given shorthand to a string.
35689        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
35690            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
35691                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
35692                Err(_) => Ok(())
35693            }
35694        }
35695
35696        
35697        #[allow(unused_imports)]
35698        use crate::parser::Parse;
35699        use crate::values::generics::rect::Rect;
35700        #[allow(unused_imports)]
35701        use crate::values::specified;
35702
35703        fn parse_value<'i, 't>(
35704            context: &ParserContext,
35705            input: &mut Parser<'i, 't>,
35706        ) -> Result<Longhands, ParseError<'i>> {
35707            let rect = Rect::parse_with(context, input, |c, i| -> Result<
35708                crate::properties::longhands::margin_top::SpecifiedValue,
35709                ParseError<'i>
35710            > {
35711                specified::Margin::parse_quirky(c, i, specified::AllowQuirks::Yes)
35712            })?;
35713            Ok(expanded! {
35714                    margin_top: rect.0,
35715                    margin_right: rect.1,
35716                    margin_bottom: rect.2,
35717                    margin_left: rect.3,
35718            })
35719        }
35720
35721        impl<'a> ToCss for LonghandsToSerialize<'a> {
35722            fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
35723            where
35724                W: Write,
35725            {
35726                let rect = Rect::new(
35727                    &self.margin_top,
35728                    &self.margin_right,
35729                    &self.margin_bottom,
35730                    &self.margin_left,
35731                );
35732                rect.to_css(dest)
35733            }
35734        }
35735    
35736    }
35737
35738
35739
35740
35741
35742
35743    /// https://drafts.csswg.org/css-logical/#propdef-margin-block
35744    pub mod margin_block {
35745        use cssparser::Parser;
35746        use crate::parser::ParserContext;
35747        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
35748        #[allow(unused_imports)]
35749        use selectors::parser::SelectorParseErrorKind;
35750        #[allow(unused_imports)]
35751        use std::fmt::{self, Write};
35752        #[allow(unused_imports)]
35753        use style_traits::{ParseError, StyleParseErrorKind};
35754        #[allow(unused_imports)]
35755        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
35756
35757        #[derive(SpecifiedValueInfo)]
35758        pub struct Longhands {
35759                pub margin_block_start:
35760                    longhands::margin_block_start::SpecifiedValue
35761                    ,
35762                pub margin_block_end:
35763                    longhands::margin_block_end::SpecifiedValue
35764                    ,
35765        }
35766
35767        /// Represents a serializable set of all of the longhand properties that
35768        /// correspond to a shorthand.
35769        pub struct LonghandsToSerialize<'a> {
35770                pub margin_block_start:
35771                    &'a longhands::margin_block_start::SpecifiedValue,
35772                pub margin_block_end:
35773                    &'a longhands::margin_block_end::SpecifiedValue,
35774        }
35775
35776        impl<'a> LonghandsToSerialize<'a> {
35777            /// Tries to get a serializable set of longhands given a set of
35778            /// property declarations.
35779            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
35780                // Define all of the expected variables that correspond to the shorthand
35781                    let mut margin_block_start =
35782                        None::<&'a longhands::margin_block_start::SpecifiedValue>;
35783                    let mut margin_block_end =
35784                        None::<&'a longhands::margin_block_end::SpecifiedValue>;
35785
35786                // Attempt to assign the incoming declarations to the expected variables
35787                for declaration in iter {
35788                    match *declaration {
35789                            PropertyDeclaration::MarginBlockStart(ref value) => {
35790                                margin_block_start = Some(value)
35791                            },
35792                            PropertyDeclaration::MarginBlockEnd(ref value) => {
35793                                margin_block_end = Some(value)
35794                            },
35795                        _ => {}
35796                    };
35797                }
35798
35799                // If any of the expected variables are missing, return an error
35800                match (
35801                        margin_block_start,
35802                        margin_block_end,
35803                ) {
35804
35805                    (
35806                        Some(margin_block_start),
35807                        Some(margin_block_end),
35808                    ) =>
35809                    Ok(LonghandsToSerialize {
35810                            margin_block_start,
35811                            margin_block_end,
35812                    }),
35813                    _ => Err(())
35814                }
35815            }
35816        }
35817
35818        /// Parse the given shorthand and fill the result into the
35819        /// `declarations` vector.
35820        pub fn parse_into<'i, 't>(
35821            declarations: &mut SourcePropertyDeclaration,
35822            context: &ParserContext,
35823            input: &mut Parser<'i, 't>,
35824        ) -> Result<(), ParseError<'i>> {
35825            #[allow(unused_imports)]
35826            use crate::properties::{NonCustomPropertyId, LonghandId};
35827            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
35828                    declarations.push(PropertyDeclaration::MarginBlockStart(
35829                        longhands.margin_block_start
35830                    ));
35831                    declarations.push(PropertyDeclaration::MarginBlockEnd(
35832                        longhands.margin_block_end
35833                    ));
35834            })
35835        }
35836
35837        /// Try to serialize a given shorthand to a string.
35838        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
35839            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
35840                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
35841                Err(_) => Ok(())
35842            }
35843        }
35844
35845        
35846    #[allow(unused_imports)]
35847    use crate::parser::Parse;
35848    #[allow(unused_imports)]
35849    use crate::values::specified;
35850
35851    fn parse_value<'i, 't>(
35852        context: &ParserContext,
35853        input: &mut Parser<'i, 't>,
35854    ) -> Result<Longhands, ParseError<'i>> {
35855        let parse_one = |c: &ParserContext, input: &mut Parser<'i, 't>| -> Result<
35856            crate::properties::longhands::margin_block_start::SpecifiedValue,
35857            ParseError<'i>
35858        > {
35859            specified::Margin::parse(c, input)
35860        };
35861
35862        let first = parse_one(context, input)?;
35863        let second =
35864            input.try_parse(|input| parse_one(context, input)).unwrap_or_else(|_| first.clone());
35865        Ok(expanded! {
35866            margin_block_start: first,
35867            margin_block_end: second,
35868        })
35869    }
35870
35871    impl<'a> ToCss for LonghandsToSerialize<'a>  {
35872        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
35873            let first = &self.margin_block_start;
35874            let second = &self.margin_block_end;
35875
35876            first.to_css(dest)?;
35877            if first != second {
35878                dest.write_char(' ')?;
35879                second.to_css(dest)?;
35880            }
35881            Ok(())
35882        }
35883    }
35884
35885    }
35886
35887
35888
35889
35890
35891
35892    /// https://drafts.csswg.org/css-logical/#propdef-margin-inline
35893    pub mod margin_inline {
35894        use cssparser::Parser;
35895        use crate::parser::ParserContext;
35896        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
35897        #[allow(unused_imports)]
35898        use selectors::parser::SelectorParseErrorKind;
35899        #[allow(unused_imports)]
35900        use std::fmt::{self, Write};
35901        #[allow(unused_imports)]
35902        use style_traits::{ParseError, StyleParseErrorKind};
35903        #[allow(unused_imports)]
35904        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
35905
35906        #[derive(SpecifiedValueInfo)]
35907        pub struct Longhands {
35908                pub margin_inline_start:
35909                    longhands::margin_inline_start::SpecifiedValue
35910                    ,
35911                pub margin_inline_end:
35912                    longhands::margin_inline_end::SpecifiedValue
35913                    ,
35914        }
35915
35916        /// Represents a serializable set of all of the longhand properties that
35917        /// correspond to a shorthand.
35918        pub struct LonghandsToSerialize<'a> {
35919                pub margin_inline_start:
35920                    &'a longhands::margin_inline_start::SpecifiedValue,
35921                pub margin_inline_end:
35922                    &'a longhands::margin_inline_end::SpecifiedValue,
35923        }
35924
35925        impl<'a> LonghandsToSerialize<'a> {
35926            /// Tries to get a serializable set of longhands given a set of
35927            /// property declarations.
35928            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
35929                // Define all of the expected variables that correspond to the shorthand
35930                    let mut margin_inline_start =
35931                        None::<&'a longhands::margin_inline_start::SpecifiedValue>;
35932                    let mut margin_inline_end =
35933                        None::<&'a longhands::margin_inline_end::SpecifiedValue>;
35934
35935                // Attempt to assign the incoming declarations to the expected variables
35936                for declaration in iter {
35937                    match *declaration {
35938                            PropertyDeclaration::MarginInlineStart(ref value) => {
35939                                margin_inline_start = Some(value)
35940                            },
35941                            PropertyDeclaration::MarginInlineEnd(ref value) => {
35942                                margin_inline_end = Some(value)
35943                            },
35944                        _ => {}
35945                    };
35946                }
35947
35948                // If any of the expected variables are missing, return an error
35949                match (
35950                        margin_inline_start,
35951                        margin_inline_end,
35952                ) {
35953
35954                    (
35955                        Some(margin_inline_start),
35956                        Some(margin_inline_end),
35957                    ) =>
35958                    Ok(LonghandsToSerialize {
35959                            margin_inline_start,
35960                            margin_inline_end,
35961                    }),
35962                    _ => Err(())
35963                }
35964            }
35965        }
35966
35967        /// Parse the given shorthand and fill the result into the
35968        /// `declarations` vector.
35969        pub fn parse_into<'i, 't>(
35970            declarations: &mut SourcePropertyDeclaration,
35971            context: &ParserContext,
35972            input: &mut Parser<'i, 't>,
35973        ) -> Result<(), ParseError<'i>> {
35974            #[allow(unused_imports)]
35975            use crate::properties::{NonCustomPropertyId, LonghandId};
35976            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
35977                    declarations.push(PropertyDeclaration::MarginInlineStart(
35978                        longhands.margin_inline_start
35979                    ));
35980                    declarations.push(PropertyDeclaration::MarginInlineEnd(
35981                        longhands.margin_inline_end
35982                    ));
35983            })
35984        }
35985
35986        /// Try to serialize a given shorthand to a string.
35987        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
35988            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
35989                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
35990                Err(_) => Ok(())
35991            }
35992        }
35993
35994        
35995    #[allow(unused_imports)]
35996    use crate::parser::Parse;
35997    #[allow(unused_imports)]
35998    use crate::values::specified;
35999
36000    fn parse_value<'i, 't>(
36001        context: &ParserContext,
36002        input: &mut Parser<'i, 't>,
36003    ) -> Result<Longhands, ParseError<'i>> {
36004        let parse_one = |c: &ParserContext, input: &mut Parser<'i, 't>| -> Result<
36005            crate::properties::longhands::margin_inline_start::SpecifiedValue,
36006            ParseError<'i>
36007        > {
36008            specified::Margin::parse(c, input)
36009        };
36010
36011        let first = parse_one(context, input)?;
36012        let second =
36013            input.try_parse(|input| parse_one(context, input)).unwrap_or_else(|_| first.clone());
36014        Ok(expanded! {
36015            margin_inline_start: first,
36016            margin_inline_end: second,
36017        })
36018    }
36019
36020    impl<'a> ToCss for LonghandsToSerialize<'a>  {
36021        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
36022            let first = &self.margin_inline_start;
36023            let second = &self.margin_inline_end;
36024
36025            first.to_css(dest)?;
36026            if first != second {
36027                dest.write_char(' ')?;
36028                second.to_css(dest)?;
36029            }
36030            Ok(())
36031        }
36032    }
36033
36034    }
36035
36036
36037
36038
36039    
36040    
36041
36042
36043
36044
36045
36046
36047
36048
36049
36050
36051
36052
36053
36054
36055
36056
36057    /* This Source Code Form is subject to the terms of the Mozilla Public
36058 * License, v. 2.0. If a copy of the MPL was not distributed with this
36059 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
36060
36061
36062
36063
36064
36065    /// https://drafts.csswg.org/css-ui/#propdef-outline
36066    pub mod outline {
36067        use cssparser::Parser;
36068        use crate::parser::ParserContext;
36069        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
36070        #[allow(unused_imports)]
36071        use selectors::parser::SelectorParseErrorKind;
36072        #[allow(unused_imports)]
36073        use std::fmt::{self, Write};
36074        #[allow(unused_imports)]
36075        use style_traits::{ParseError, StyleParseErrorKind};
36076        #[allow(unused_imports)]
36077        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
36078
36079        #[derive(SpecifiedValueInfo)]
36080        pub struct Longhands {
36081                pub outline_color:
36082                    longhands::outline_color::SpecifiedValue
36083                    ,
36084                pub outline_style:
36085                    longhands::outline_style::SpecifiedValue
36086                    ,
36087                pub outline_width:
36088                    longhands::outline_width::SpecifiedValue
36089                    ,
36090        }
36091
36092        /// Represents a serializable set of all of the longhand properties that
36093        /// correspond to a shorthand.
36094        pub struct LonghandsToSerialize<'a> {
36095                pub outline_color:
36096                    &'a longhands::outline_color::SpecifiedValue,
36097                pub outline_style:
36098                    &'a longhands::outline_style::SpecifiedValue,
36099                pub outline_width:
36100                    &'a longhands::outline_width::SpecifiedValue,
36101        }
36102
36103        impl<'a> LonghandsToSerialize<'a> {
36104            /// Tries to get a serializable set of longhands given a set of
36105            /// property declarations.
36106            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
36107                // Define all of the expected variables that correspond to the shorthand
36108                    let mut outline_color =
36109                        None::<&'a longhands::outline_color::SpecifiedValue>;
36110                    let mut outline_style =
36111                        None::<&'a longhands::outline_style::SpecifiedValue>;
36112                    let mut outline_width =
36113                        None::<&'a longhands::outline_width::SpecifiedValue>;
36114
36115                // Attempt to assign the incoming declarations to the expected variables
36116                for declaration in iter {
36117                    match *declaration {
36118                            PropertyDeclaration::OutlineColor(ref value) => {
36119                                outline_color = Some(value)
36120                            },
36121                            PropertyDeclaration::OutlineStyle(ref value) => {
36122                                outline_style = Some(value)
36123                            },
36124                            PropertyDeclaration::OutlineWidth(ref value) => {
36125                                outline_width = Some(value)
36126                            },
36127                        _ => {}
36128                    };
36129                }
36130
36131                // If any of the expected variables are missing, return an error
36132                match (
36133                        outline_color,
36134                        outline_style,
36135                        outline_width,
36136                ) {
36137
36138                    (
36139                        Some(outline_color),
36140                        Some(outline_style),
36141                        Some(outline_width),
36142                    ) =>
36143                    Ok(LonghandsToSerialize {
36144                            outline_color,
36145                            outline_style,
36146                            outline_width,
36147                    }),
36148                    _ => Err(())
36149                }
36150            }
36151        }
36152
36153        /// Parse the given shorthand and fill the result into the
36154        /// `declarations` vector.
36155        pub fn parse_into<'i, 't>(
36156            declarations: &mut SourcePropertyDeclaration,
36157            context: &ParserContext,
36158            input: &mut Parser<'i, 't>,
36159        ) -> Result<(), ParseError<'i>> {
36160            #[allow(unused_imports)]
36161            use crate::properties::{NonCustomPropertyId, LonghandId};
36162            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
36163                    declarations.push(PropertyDeclaration::OutlineColor(
36164                        longhands.outline_color
36165                    ));
36166                    declarations.push(PropertyDeclaration::OutlineStyle(
36167                        longhands.outline_style
36168                    ));
36169                    declarations.push(PropertyDeclaration::OutlineWidth(
36170                        longhands.outline_width
36171                    ));
36172            })
36173        }
36174
36175        /// Try to serialize a given shorthand to a string.
36176        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
36177            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
36178                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
36179                Err(_) => Ok(())
36180            }
36181        }
36182
36183        
36184    use crate::properties::longhands::{outline_color, outline_width, outline_style};
36185    use crate::values::specified;
36186    use crate::parser::Parse;
36187
36188    pub fn parse_value<'i, 't>(
36189        context: &ParserContext,
36190        input: &mut Parser<'i, 't>,
36191    ) -> Result<Longhands, ParseError<'i>> {
36192        let _unused = context;
36193        let mut color = None;
36194        let mut style = None;
36195        let mut width = None;
36196        let mut any = false;
36197        loop {
36198            if color.is_none() {
36199                if let Ok(value) = input.try_parse(|i| specified::Color::parse(context, i)) {
36200                    color = Some(value);
36201                    any = true;
36202                    continue
36203                }
36204            }
36205            if style.is_none() {
36206                if let Ok(value) = input.try_parse(|input| outline_style::parse(context, input)) {
36207                    style = Some(value);
36208                    any = true;
36209                    continue
36210                }
36211            }
36212            if width.is_none() {
36213                if let Ok(value) = input.try_parse(|input| outline_width::parse(context, input)) {
36214                    width = Some(value);
36215                    any = true;
36216                    continue
36217                }
36218            }
36219            break
36220        }
36221        if any {
36222            Ok(expanded! {
36223                outline_color: unwrap_or_initial!(outline_color, color),
36224                outline_style: unwrap_or_initial!(outline_style, style),
36225                outline_width: unwrap_or_initial!(outline_width, width),
36226            })
36227        } else {
36228            Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
36229        }
36230    }
36231
36232    impl<'a> ToCss for LonghandsToSerialize<'a>  {
36233        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
36234            let mut wrote_value = false;
36235
36236                if *self.outline_color != outline_color::get_initial_specified_value() {
36237                    if wrote_value {
36238                        dest.write_char(' ')?;
36239                    }
36240                    self.outline_color.to_css(dest)?;
36241                    wrote_value = true;
36242                }
36243                if *self.outline_style != outline_style::get_initial_specified_value() {
36244                    if wrote_value {
36245                        dest.write_char(' ')?;
36246                    }
36247                    self.outline_style.to_css(dest)?;
36248                    wrote_value = true;
36249                }
36250                if *self.outline_width != outline_width::get_initial_specified_value() {
36251                    if wrote_value {
36252                        dest.write_char(' ')?;
36253                    }
36254                    self.outline_width.to_css(dest)?;
36255                    wrote_value = true;
36256                }
36257
36258            if !wrote_value {
36259                self.outline_style.to_css(dest)?;
36260            }
36261
36262            Ok(())
36263        }
36264    }
36265
36266    }
36267
36268
36269    /* This Source Code Form is subject to the terms of the Mozilla Public
36270 * License, v. 2.0. If a copy of the MPL was not distributed with this
36271 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
36272
36273
36274
36275
36276    
36277    
36278
36279    /// https://drafts.csswg.org/css-box-3/#propdef-padding
36280    pub mod padding {
36281        use cssparser::Parser;
36282        use crate::parser::ParserContext;
36283        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
36284        #[allow(unused_imports)]
36285        use selectors::parser::SelectorParseErrorKind;
36286        #[allow(unused_imports)]
36287        use std::fmt::{self, Write};
36288        #[allow(unused_imports)]
36289        use style_traits::{ParseError, StyleParseErrorKind};
36290        #[allow(unused_imports)]
36291        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
36292
36293        #[derive(SpecifiedValueInfo)]
36294        pub struct Longhands {
36295                pub padding_top:
36296                    longhands::padding_top::SpecifiedValue
36297                    ,
36298                pub padding_right:
36299                    longhands::padding_right::SpecifiedValue
36300                    ,
36301                pub padding_bottom:
36302                    longhands::padding_bottom::SpecifiedValue
36303                    ,
36304                pub padding_left:
36305                    longhands::padding_left::SpecifiedValue
36306                    ,
36307        }
36308
36309        /// Represents a serializable set of all of the longhand properties that
36310        /// correspond to a shorthand.
36311        pub struct LonghandsToSerialize<'a> {
36312                pub padding_top:
36313                    &'a longhands::padding_top::SpecifiedValue,
36314                pub padding_right:
36315                    &'a longhands::padding_right::SpecifiedValue,
36316                pub padding_bottom:
36317                    &'a longhands::padding_bottom::SpecifiedValue,
36318                pub padding_left:
36319                    &'a longhands::padding_left::SpecifiedValue,
36320        }
36321
36322        impl<'a> LonghandsToSerialize<'a> {
36323            /// Tries to get a serializable set of longhands given a set of
36324            /// property declarations.
36325            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
36326                // Define all of the expected variables that correspond to the shorthand
36327                    let mut padding_top =
36328                        None::<&'a longhands::padding_top::SpecifiedValue>;
36329                    let mut padding_right =
36330                        None::<&'a longhands::padding_right::SpecifiedValue>;
36331                    let mut padding_bottom =
36332                        None::<&'a longhands::padding_bottom::SpecifiedValue>;
36333                    let mut padding_left =
36334                        None::<&'a longhands::padding_left::SpecifiedValue>;
36335
36336                // Attempt to assign the incoming declarations to the expected variables
36337                for declaration in iter {
36338                    match *declaration {
36339                            PropertyDeclaration::PaddingTop(ref value) => {
36340                                padding_top = Some(value)
36341                            },
36342                            PropertyDeclaration::PaddingRight(ref value) => {
36343                                padding_right = Some(value)
36344                            },
36345                            PropertyDeclaration::PaddingBottom(ref value) => {
36346                                padding_bottom = Some(value)
36347                            },
36348                            PropertyDeclaration::PaddingLeft(ref value) => {
36349                                padding_left = Some(value)
36350                            },
36351                        _ => {}
36352                    };
36353                }
36354
36355                // If any of the expected variables are missing, return an error
36356                match (
36357                        padding_top,
36358                        padding_right,
36359                        padding_bottom,
36360                        padding_left,
36361                ) {
36362
36363                    (
36364                        Some(padding_top),
36365                        Some(padding_right),
36366                        Some(padding_bottom),
36367                        Some(padding_left),
36368                    ) =>
36369                    Ok(LonghandsToSerialize {
36370                            padding_top,
36371                            padding_right,
36372                            padding_bottom,
36373                            padding_left,
36374                    }),
36375                    _ => Err(())
36376                }
36377            }
36378        }
36379
36380        /// Parse the given shorthand and fill the result into the
36381        /// `declarations` vector.
36382        pub fn parse_into<'i, 't>(
36383            declarations: &mut SourcePropertyDeclaration,
36384            context: &ParserContext,
36385            input: &mut Parser<'i, 't>,
36386        ) -> Result<(), ParseError<'i>> {
36387            #[allow(unused_imports)]
36388            use crate::properties::{NonCustomPropertyId, LonghandId};
36389            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
36390                    declarations.push(PropertyDeclaration::PaddingTop(
36391                        longhands.padding_top
36392                    ));
36393                    declarations.push(PropertyDeclaration::PaddingRight(
36394                        longhands.padding_right
36395                    ));
36396                    declarations.push(PropertyDeclaration::PaddingBottom(
36397                        longhands.padding_bottom
36398                    ));
36399                    declarations.push(PropertyDeclaration::PaddingLeft(
36400                        longhands.padding_left
36401                    ));
36402            })
36403        }
36404
36405        /// Try to serialize a given shorthand to a string.
36406        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
36407            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
36408                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
36409                Err(_) => Ok(())
36410            }
36411        }
36412
36413        
36414        #[allow(unused_imports)]
36415        use crate::parser::Parse;
36416        use crate::values::generics::rect::Rect;
36417        #[allow(unused_imports)]
36418        use crate::values::specified;
36419
36420        fn parse_value<'i, 't>(
36421            context: &ParserContext,
36422            input: &mut Parser<'i, 't>,
36423        ) -> Result<Longhands, ParseError<'i>> {
36424            let rect = Rect::parse_with(context, input, |c, i| -> Result<
36425                crate::properties::longhands::padding_top::SpecifiedValue,
36426                ParseError<'i>
36427            > {
36428                specified::NonNegativeLengthPercentage::parse_quirky(c, i, specified::AllowQuirks::Yes)
36429            })?;
36430            Ok(expanded! {
36431                    padding_top: rect.0,
36432                    padding_right: rect.1,
36433                    padding_bottom: rect.2,
36434                    padding_left: rect.3,
36435            })
36436        }
36437
36438        impl<'a> ToCss for LonghandsToSerialize<'a> {
36439            fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
36440            where
36441                W: Write,
36442            {
36443                let rect = Rect::new(
36444                    &self.padding_top,
36445                    &self.padding_right,
36446                    &self.padding_bottom,
36447                    &self.padding_left,
36448                );
36449                rect.to_css(dest)
36450            }
36451        }
36452    
36453    }
36454
36455
36456
36457
36458
36459
36460    /// https://drafts.csswg.org/css-logical/#propdef-padding-block
36461    pub mod padding_block {
36462        use cssparser::Parser;
36463        use crate::parser::ParserContext;
36464        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
36465        #[allow(unused_imports)]
36466        use selectors::parser::SelectorParseErrorKind;
36467        #[allow(unused_imports)]
36468        use std::fmt::{self, Write};
36469        #[allow(unused_imports)]
36470        use style_traits::{ParseError, StyleParseErrorKind};
36471        #[allow(unused_imports)]
36472        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
36473
36474        #[derive(SpecifiedValueInfo)]
36475        pub struct Longhands {
36476                pub padding_block_start:
36477                    longhands::padding_block_start::SpecifiedValue
36478                    ,
36479                pub padding_block_end:
36480                    longhands::padding_block_end::SpecifiedValue
36481                    ,
36482        }
36483
36484        /// Represents a serializable set of all of the longhand properties that
36485        /// correspond to a shorthand.
36486        pub struct LonghandsToSerialize<'a> {
36487                pub padding_block_start:
36488                    &'a longhands::padding_block_start::SpecifiedValue,
36489                pub padding_block_end:
36490                    &'a longhands::padding_block_end::SpecifiedValue,
36491        }
36492
36493        impl<'a> LonghandsToSerialize<'a> {
36494            /// Tries to get a serializable set of longhands given a set of
36495            /// property declarations.
36496            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
36497                // Define all of the expected variables that correspond to the shorthand
36498                    let mut padding_block_start =
36499                        None::<&'a longhands::padding_block_start::SpecifiedValue>;
36500                    let mut padding_block_end =
36501                        None::<&'a longhands::padding_block_end::SpecifiedValue>;
36502
36503                // Attempt to assign the incoming declarations to the expected variables
36504                for declaration in iter {
36505                    match *declaration {
36506                            PropertyDeclaration::PaddingBlockStart(ref value) => {
36507                                padding_block_start = Some(value)
36508                            },
36509                            PropertyDeclaration::PaddingBlockEnd(ref value) => {
36510                                padding_block_end = Some(value)
36511                            },
36512                        _ => {}
36513                    };
36514                }
36515
36516                // If any of the expected variables are missing, return an error
36517                match (
36518                        padding_block_start,
36519                        padding_block_end,
36520                ) {
36521
36522                    (
36523                        Some(padding_block_start),
36524                        Some(padding_block_end),
36525                    ) =>
36526                    Ok(LonghandsToSerialize {
36527                            padding_block_start,
36528                            padding_block_end,
36529                    }),
36530                    _ => Err(())
36531                }
36532            }
36533        }
36534
36535        /// Parse the given shorthand and fill the result into the
36536        /// `declarations` vector.
36537        pub fn parse_into<'i, 't>(
36538            declarations: &mut SourcePropertyDeclaration,
36539            context: &ParserContext,
36540            input: &mut Parser<'i, 't>,
36541        ) -> Result<(), ParseError<'i>> {
36542            #[allow(unused_imports)]
36543            use crate::properties::{NonCustomPropertyId, LonghandId};
36544            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
36545                    declarations.push(PropertyDeclaration::PaddingBlockStart(
36546                        longhands.padding_block_start
36547                    ));
36548                    declarations.push(PropertyDeclaration::PaddingBlockEnd(
36549                        longhands.padding_block_end
36550                    ));
36551            })
36552        }
36553
36554        /// Try to serialize a given shorthand to a string.
36555        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
36556            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
36557                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
36558                Err(_) => Ok(())
36559            }
36560        }
36561
36562        
36563    #[allow(unused_imports)]
36564    use crate::parser::Parse;
36565    #[allow(unused_imports)]
36566    use crate::values::specified;
36567
36568    fn parse_value<'i, 't>(
36569        context: &ParserContext,
36570        input: &mut Parser<'i, 't>,
36571    ) -> Result<Longhands, ParseError<'i>> {
36572        let parse_one = |c: &ParserContext, input: &mut Parser<'i, 't>| -> Result<
36573            crate::properties::longhands::padding_block_start::SpecifiedValue,
36574            ParseError<'i>
36575        > {
36576            specified::NonNegativeLengthPercentage::parse(c, input)
36577        };
36578
36579        let first = parse_one(context, input)?;
36580        let second =
36581            input.try_parse(|input| parse_one(context, input)).unwrap_or_else(|_| first.clone());
36582        Ok(expanded! {
36583            padding_block_start: first,
36584            padding_block_end: second,
36585        })
36586    }
36587
36588    impl<'a> ToCss for LonghandsToSerialize<'a>  {
36589        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
36590            let first = &self.padding_block_start;
36591            let second = &self.padding_block_end;
36592
36593            first.to_css(dest)?;
36594            if first != second {
36595                dest.write_char(' ')?;
36596                second.to_css(dest)?;
36597            }
36598            Ok(())
36599        }
36600    }
36601
36602    }
36603
36604
36605
36606
36607
36608
36609    /// https://drafts.csswg.org/css-logical/#propdef-padding-inline
36610    pub mod padding_inline {
36611        use cssparser::Parser;
36612        use crate::parser::ParserContext;
36613        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
36614        #[allow(unused_imports)]
36615        use selectors::parser::SelectorParseErrorKind;
36616        #[allow(unused_imports)]
36617        use std::fmt::{self, Write};
36618        #[allow(unused_imports)]
36619        use style_traits::{ParseError, StyleParseErrorKind};
36620        #[allow(unused_imports)]
36621        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
36622
36623        #[derive(SpecifiedValueInfo)]
36624        pub struct Longhands {
36625                pub padding_inline_start:
36626                    longhands::padding_inline_start::SpecifiedValue
36627                    ,
36628                pub padding_inline_end:
36629                    longhands::padding_inline_end::SpecifiedValue
36630                    ,
36631        }
36632
36633        /// Represents a serializable set of all of the longhand properties that
36634        /// correspond to a shorthand.
36635        pub struct LonghandsToSerialize<'a> {
36636                pub padding_inline_start:
36637                    &'a longhands::padding_inline_start::SpecifiedValue,
36638                pub padding_inline_end:
36639                    &'a longhands::padding_inline_end::SpecifiedValue,
36640        }
36641
36642        impl<'a> LonghandsToSerialize<'a> {
36643            /// Tries to get a serializable set of longhands given a set of
36644            /// property declarations.
36645            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
36646                // Define all of the expected variables that correspond to the shorthand
36647                    let mut padding_inline_start =
36648                        None::<&'a longhands::padding_inline_start::SpecifiedValue>;
36649                    let mut padding_inline_end =
36650                        None::<&'a longhands::padding_inline_end::SpecifiedValue>;
36651
36652                // Attempt to assign the incoming declarations to the expected variables
36653                for declaration in iter {
36654                    match *declaration {
36655                            PropertyDeclaration::PaddingInlineStart(ref value) => {
36656                                padding_inline_start = Some(value)
36657                            },
36658                            PropertyDeclaration::PaddingInlineEnd(ref value) => {
36659                                padding_inline_end = Some(value)
36660                            },
36661                        _ => {}
36662                    };
36663                }
36664
36665                // If any of the expected variables are missing, return an error
36666                match (
36667                        padding_inline_start,
36668                        padding_inline_end,
36669                ) {
36670
36671                    (
36672                        Some(padding_inline_start),
36673                        Some(padding_inline_end),
36674                    ) =>
36675                    Ok(LonghandsToSerialize {
36676                            padding_inline_start,
36677                            padding_inline_end,
36678                    }),
36679                    _ => Err(())
36680                }
36681            }
36682        }
36683
36684        /// Parse the given shorthand and fill the result into the
36685        /// `declarations` vector.
36686        pub fn parse_into<'i, 't>(
36687            declarations: &mut SourcePropertyDeclaration,
36688            context: &ParserContext,
36689            input: &mut Parser<'i, 't>,
36690        ) -> Result<(), ParseError<'i>> {
36691            #[allow(unused_imports)]
36692            use crate::properties::{NonCustomPropertyId, LonghandId};
36693            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
36694                    declarations.push(PropertyDeclaration::PaddingInlineStart(
36695                        longhands.padding_inline_start
36696                    ));
36697                    declarations.push(PropertyDeclaration::PaddingInlineEnd(
36698                        longhands.padding_inline_end
36699                    ));
36700            })
36701        }
36702
36703        /// Try to serialize a given shorthand to a string.
36704        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
36705            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
36706                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
36707                Err(_) => Ok(())
36708            }
36709        }
36710
36711        
36712    #[allow(unused_imports)]
36713    use crate::parser::Parse;
36714    #[allow(unused_imports)]
36715    use crate::values::specified;
36716
36717    fn parse_value<'i, 't>(
36718        context: &ParserContext,
36719        input: &mut Parser<'i, 't>,
36720    ) -> Result<Longhands, ParseError<'i>> {
36721        let parse_one = |c: &ParserContext, input: &mut Parser<'i, 't>| -> Result<
36722            crate::properties::longhands::padding_inline_start::SpecifiedValue,
36723            ParseError<'i>
36724        > {
36725            specified::NonNegativeLengthPercentage::parse(c, input)
36726        };
36727
36728        let first = parse_one(context, input)?;
36729        let second =
36730            input.try_parse(|input| parse_one(context, input)).unwrap_or_else(|_| first.clone());
36731        Ok(expanded! {
36732            padding_inline_start: first,
36733            padding_inline_end: second,
36734        })
36735    }
36736
36737    impl<'a> ToCss for LonghandsToSerialize<'a>  {
36738        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
36739            let first = &self.padding_inline_start;
36740            let second = &self.padding_inline_end;
36741
36742            first.to_css(dest)?;
36743            if first != second {
36744                dest.write_char(' ')?;
36745                second.to_css(dest)?;
36746            }
36747            Ok(())
36748        }
36749    }
36750
36751    }
36752
36753
36754
36755
36756    
36757    
36758
36759
36760
36761
36762
36763
36764
36765
36766
36767
36768
36769
36770
36771
36772
36773
36774    /* This Source Code Form is subject to the terms of the Mozilla Public
36775 * License, v. 2.0. If a copy of the MPL was not distributed with this
36776 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
36777
36778    /* This Source Code Form is subject to the terms of the Mozilla Public
36779 * License, v. 2.0. If a copy of the MPL was not distributed with this
36780 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
36781
36782
36783
36784
36785
36786
36787    /// https://drafts.csswg.org/css-flexbox/#flex-flow-property
36788    pub mod flex_flow {
36789        use cssparser::Parser;
36790        use crate::parser::ParserContext;
36791        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
36792        #[allow(unused_imports)]
36793        use selectors::parser::SelectorParseErrorKind;
36794        #[allow(unused_imports)]
36795        use std::fmt::{self, Write};
36796        #[allow(unused_imports)]
36797        use style_traits::{ParseError, StyleParseErrorKind};
36798        #[allow(unused_imports)]
36799        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
36800
36801        #[derive(SpecifiedValueInfo)]
36802        pub struct Longhands {
36803                pub flex_direction:
36804                    longhands::flex_direction::SpecifiedValue
36805                    ,
36806                pub flex_wrap:
36807                    longhands::flex_wrap::SpecifiedValue
36808                    ,
36809        }
36810
36811        /// Represents a serializable set of all of the longhand properties that
36812        /// correspond to a shorthand.
36813        pub struct LonghandsToSerialize<'a> {
36814                pub flex_direction:
36815                    &'a longhands::flex_direction::SpecifiedValue,
36816                pub flex_wrap:
36817                    &'a longhands::flex_wrap::SpecifiedValue,
36818        }
36819
36820        impl<'a> LonghandsToSerialize<'a> {
36821            /// Tries to get a serializable set of longhands given a set of
36822            /// property declarations.
36823            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
36824                // Define all of the expected variables that correspond to the shorthand
36825                    let mut flex_direction =
36826                        None::<&'a longhands::flex_direction::SpecifiedValue>;
36827                    let mut flex_wrap =
36828                        None::<&'a longhands::flex_wrap::SpecifiedValue>;
36829
36830                // Attempt to assign the incoming declarations to the expected variables
36831                for declaration in iter {
36832                    match *declaration {
36833                            PropertyDeclaration::FlexDirection(ref value) => {
36834                                flex_direction = Some(value)
36835                            },
36836                            PropertyDeclaration::FlexWrap(ref value) => {
36837                                flex_wrap = Some(value)
36838                            },
36839                        _ => {}
36840                    };
36841                }
36842
36843                // If any of the expected variables are missing, return an error
36844                match (
36845                        flex_direction,
36846                        flex_wrap,
36847                ) {
36848
36849                    (
36850                        Some(flex_direction),
36851                        Some(flex_wrap),
36852                    ) =>
36853                    Ok(LonghandsToSerialize {
36854                            flex_direction,
36855                            flex_wrap,
36856                    }),
36857                    _ => Err(())
36858                }
36859            }
36860        }
36861
36862        /// Parse the given shorthand and fill the result into the
36863        /// `declarations` vector.
36864        pub fn parse_into<'i, 't>(
36865            declarations: &mut SourcePropertyDeclaration,
36866            context: &ParserContext,
36867            input: &mut Parser<'i, 't>,
36868        ) -> Result<(), ParseError<'i>> {
36869            #[allow(unused_imports)]
36870            use crate::properties::{NonCustomPropertyId, LonghandId};
36871            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
36872                    declarations.push(PropertyDeclaration::FlexDirection(
36873                        longhands.flex_direction
36874                    ));
36875                    declarations.push(PropertyDeclaration::FlexWrap(
36876                        longhands.flex_wrap
36877                    ));
36878            })
36879        }
36880
36881        /// Try to serialize a given shorthand to a string.
36882        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
36883            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
36884                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
36885                Err(_) => Ok(())
36886            }
36887        }
36888
36889        
36890    use crate::properties::longhands::{flex_direction, flex_wrap};
36891
36892    pub fn parse_value<'i, 't>(
36893        context: &ParserContext,
36894        input: &mut Parser<'i, 't>,
36895    ) -> Result<Longhands, ParseError<'i>> {
36896        let mut direction = None;
36897        let mut wrap = None;
36898        loop {
36899            if direction.is_none() {
36900                if let Ok(value) = input.try_parse(|input| flex_direction::parse(context, input)) {
36901                    direction = Some(value);
36902                    continue
36903                }
36904            }
36905            if wrap.is_none() {
36906                if let Ok(value) = input.try_parse(|input| flex_wrap::parse(context, input)) {
36907                    wrap = Some(value);
36908                    continue
36909                }
36910            }
36911            break
36912        }
36913
36914        if direction.is_none() && wrap.is_none() {
36915            return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
36916        }
36917        Ok(expanded! {
36918            flex_direction: unwrap_or_initial!(flex_direction, direction),
36919            flex_wrap: unwrap_or_initial!(flex_wrap, wrap),
36920        })
36921    }
36922
36923    impl<'a> ToCss for LonghandsToSerialize<'a> {
36924        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
36925            if *self.flex_direction == flex_direction::get_initial_specified_value() &&
36926               *self.flex_wrap != flex_wrap::get_initial_specified_value() {
36927                return self.flex_wrap.to_css(dest)
36928            }
36929            self.flex_direction.to_css(dest)?;
36930            if *self.flex_wrap != flex_wrap::get_initial_specified_value() {
36931                dest.write_char(' ')?;
36932                self.flex_wrap.to_css(dest)?;
36933            }
36934            Ok(())
36935        }
36936    }
36937
36938    }
36939
36940
36941
36942
36943    /// https://drafts.csswg.org/css-flexbox/#flex-property
36944    pub mod flex {
36945        use cssparser::Parser;
36946        use crate::parser::ParserContext;
36947        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
36948        #[allow(unused_imports)]
36949        use selectors::parser::SelectorParseErrorKind;
36950        #[allow(unused_imports)]
36951        use std::fmt::{self, Write};
36952        #[allow(unused_imports)]
36953        use style_traits::{ParseError, StyleParseErrorKind};
36954        #[allow(unused_imports)]
36955        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
36956
36957        #[derive(SpecifiedValueInfo)]
36958        pub struct Longhands {
36959                pub flex_grow:
36960                    longhands::flex_grow::SpecifiedValue
36961                    ,
36962                pub flex_shrink:
36963                    longhands::flex_shrink::SpecifiedValue
36964                    ,
36965                pub flex_basis:
36966                        Box<
36967                    longhands::flex_basis::SpecifiedValue
36968                        >
36969                    ,
36970        }
36971
36972        /// Represents a serializable set of all of the longhand properties that
36973        /// correspond to a shorthand.
36974        #[derive(ToCss)]
36975        pub struct LonghandsToSerialize<'a> {
36976                pub flex_grow:
36977                    &'a longhands::flex_grow::SpecifiedValue,
36978                pub flex_shrink:
36979                    &'a longhands::flex_shrink::SpecifiedValue,
36980                pub flex_basis:
36981                    &'a longhands::flex_basis::SpecifiedValue,
36982        }
36983
36984        impl<'a> LonghandsToSerialize<'a> {
36985            /// Tries to get a serializable set of longhands given a set of
36986            /// property declarations.
36987            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
36988                // Define all of the expected variables that correspond to the shorthand
36989                    let mut flex_grow =
36990                        None::<&'a longhands::flex_grow::SpecifiedValue>;
36991                    let mut flex_shrink =
36992                        None::<&'a longhands::flex_shrink::SpecifiedValue>;
36993                    let mut flex_basis =
36994                        None::<&'a longhands::flex_basis::SpecifiedValue>;
36995
36996                // Attempt to assign the incoming declarations to the expected variables
36997                for declaration in iter {
36998                    match *declaration {
36999                            PropertyDeclaration::FlexGrow(ref value) => {
37000                                flex_grow = Some(value)
37001                            },
37002                            PropertyDeclaration::FlexShrink(ref value) => {
37003                                flex_shrink = Some(value)
37004                            },
37005                            PropertyDeclaration::FlexBasis(ref value) => {
37006                                flex_basis = Some(value)
37007                            },
37008                        _ => {}
37009                    };
37010                }
37011
37012                // If any of the expected variables are missing, return an error
37013                match (
37014                        flex_grow,
37015                        flex_shrink,
37016                        flex_basis,
37017                ) {
37018
37019                    (
37020                        Some(flex_grow),
37021                        Some(flex_shrink),
37022                        Some(flex_basis),
37023                    ) =>
37024                    Ok(LonghandsToSerialize {
37025                            flex_grow,
37026                            flex_shrink,
37027                            flex_basis,
37028                    }),
37029                    _ => Err(())
37030                }
37031            }
37032        }
37033
37034        /// Parse the given shorthand and fill the result into the
37035        /// `declarations` vector.
37036        pub fn parse_into<'i, 't>(
37037            declarations: &mut SourcePropertyDeclaration,
37038            context: &ParserContext,
37039            input: &mut Parser<'i, 't>,
37040        ) -> Result<(), ParseError<'i>> {
37041            #[allow(unused_imports)]
37042            use crate::properties::{NonCustomPropertyId, LonghandId};
37043            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
37044                    declarations.push(PropertyDeclaration::FlexGrow(
37045                        longhands.flex_grow
37046                    ));
37047                    declarations.push(PropertyDeclaration::FlexShrink(
37048                        longhands.flex_shrink
37049                    ));
37050                    declarations.push(PropertyDeclaration::FlexBasis(
37051                        longhands.flex_basis
37052                    ));
37053            })
37054        }
37055
37056        /// Try to serialize a given shorthand to a string.
37057        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
37058            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
37059                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
37060                Err(_) => Ok(())
37061            }
37062        }
37063
37064        
37065    use crate::parser::Parse;
37066    use crate::values::specified::NonNegativeNumber;
37067    use crate::properties::longhands::flex_basis::SpecifiedValue as FlexBasis;
37068
37069    fn parse_flexibility<'i, 't>(
37070        context: &ParserContext,
37071        input: &mut Parser<'i, 't>,
37072    ) -> Result<(NonNegativeNumber, Option<NonNegativeNumber>),ParseError<'i>> {
37073        let grow = NonNegativeNumber::parse(context, input)?;
37074        let shrink = input.try_parse(|i| NonNegativeNumber::parse(context, i)).ok();
37075        Ok((grow, shrink))
37076    }
37077
37078    pub fn parse_value<'i, 't>(
37079        context: &ParserContext,
37080        input: &mut Parser<'i, 't>,
37081    ) -> Result<Longhands, ParseError<'i>> {
37082        let mut grow = None;
37083        let mut shrink = None;
37084        let mut basis = None;
37085
37086        if input.try_parse(|input| input.expect_ident_matching("none")).is_ok() {
37087            return Ok(expanded! {
37088                flex_grow: NonNegativeNumber::new(0.0),
37089                flex_shrink: NonNegativeNumber::new(0.0),
37090                flex_basis: FlexBasis::auto(),
37091            })
37092        }
37093        loop {
37094            if grow.is_none() {
37095                if let Ok((flex_grow, flex_shrink)) = input.try_parse(|i| parse_flexibility(context, i)) {
37096                    grow = Some(flex_grow);
37097                    shrink = flex_shrink;
37098                    continue
37099                }
37100            }
37101            if basis.is_none() {
37102                if let Ok(value) = input.try_parse(|input| FlexBasis::parse(context, input)) {
37103                    basis = Some(value);
37104                    continue
37105                }
37106            }
37107            break
37108        }
37109
37110        if grow.is_none() && basis.is_none() {
37111            return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
37112        }
37113        Ok(expanded! {
37114            flex_grow: grow.unwrap_or(NonNegativeNumber::new(1.0)),
37115            flex_shrink: shrink.unwrap_or(NonNegativeNumber::new(1.0)),
37116            // Per spec, this should be SpecifiedValue::zero(), but all
37117            // browsers currently agree on using `0%`. This is a spec
37118            // change which hasn't been adopted by browsers:
37119            // https://github.com/w3c/csswg-drafts/commit/2c446befdf0f686217905bdd7c92409f6bd3921b
37120            flex_basis: basis.unwrap_or(FlexBasis::zero_percent()),
37121        })
37122    }
37123
37124    }
37125
37126
37127
37128
37129    /// https://drafts.csswg.org/css-align-3/#gap-shorthand
37130    pub mod gap {
37131        use cssparser::Parser;
37132        use crate::parser::ParserContext;
37133        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
37134        #[allow(unused_imports)]
37135        use selectors::parser::SelectorParseErrorKind;
37136        #[allow(unused_imports)]
37137        use std::fmt::{self, Write};
37138        #[allow(unused_imports)]
37139        use style_traits::{ParseError, StyleParseErrorKind};
37140        #[allow(unused_imports)]
37141        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
37142
37143        #[derive(SpecifiedValueInfo)]
37144        pub struct Longhands {
37145                pub row_gap:
37146                    longhands::row_gap::SpecifiedValue
37147                    ,
37148                pub column_gap:
37149                    longhands::column_gap::SpecifiedValue
37150                    ,
37151        }
37152
37153        /// Represents a serializable set of all of the longhand properties that
37154        /// correspond to a shorthand.
37155        pub struct LonghandsToSerialize<'a> {
37156                pub row_gap:
37157                    &'a longhands::row_gap::SpecifiedValue,
37158                pub column_gap:
37159                    &'a longhands::column_gap::SpecifiedValue,
37160        }
37161
37162        impl<'a> LonghandsToSerialize<'a> {
37163            /// Tries to get a serializable set of longhands given a set of
37164            /// property declarations.
37165            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
37166                // Define all of the expected variables that correspond to the shorthand
37167                    let mut row_gap =
37168                        None::<&'a longhands::row_gap::SpecifiedValue>;
37169                    let mut column_gap =
37170                        None::<&'a longhands::column_gap::SpecifiedValue>;
37171
37172                // Attempt to assign the incoming declarations to the expected variables
37173                for declaration in iter {
37174                    match *declaration {
37175                            PropertyDeclaration::RowGap(ref value) => {
37176                                row_gap = Some(value)
37177                            },
37178                            PropertyDeclaration::ColumnGap(ref value) => {
37179                                column_gap = Some(value)
37180                            },
37181                        _ => {}
37182                    };
37183                }
37184
37185                // If any of the expected variables are missing, return an error
37186                match (
37187                        row_gap,
37188                        column_gap,
37189                ) {
37190
37191                    (
37192                        Some(row_gap),
37193                        Some(column_gap),
37194                    ) =>
37195                    Ok(LonghandsToSerialize {
37196                            row_gap,
37197                            column_gap,
37198                    }),
37199                    _ => Err(())
37200                }
37201            }
37202        }
37203
37204        /// Parse the given shorthand and fill the result into the
37205        /// `declarations` vector.
37206        pub fn parse_into<'i, 't>(
37207            declarations: &mut SourcePropertyDeclaration,
37208            context: &ParserContext,
37209            input: &mut Parser<'i, 't>,
37210        ) -> Result<(), ParseError<'i>> {
37211            #[allow(unused_imports)]
37212            use crate::properties::{NonCustomPropertyId, LonghandId};
37213            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
37214                    declarations.push(PropertyDeclaration::RowGap(
37215                        longhands.row_gap
37216                    ));
37217                    declarations.push(PropertyDeclaration::ColumnGap(
37218                        longhands.column_gap
37219                    ));
37220            })
37221        }
37222
37223        /// Try to serialize a given shorthand to a string.
37224        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
37225            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
37226                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
37227                Err(_) => Ok(())
37228            }
37229        }
37230
37231        
37232  use crate::properties::longhands::{row_gap, column_gap};
37233
37234  pub fn parse_value<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
37235                             -> Result<Longhands, ParseError<'i>> {
37236      let r_gap = row_gap::parse(context, input)?;
37237      let c_gap = input.try_parse(|input| column_gap::parse(context, input)).unwrap_or(r_gap.clone());
37238
37239      Ok(expanded! {
37240        row_gap: r_gap,
37241        column_gap: c_gap,
37242      })
37243  }
37244
37245  impl<'a> ToCss for LonghandsToSerialize<'a>  {
37246      fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
37247          if self.row_gap == self.column_gap {
37248            self.row_gap.to_css(dest)
37249          } else {
37250            self.row_gap.to_css(dest)?;
37251            dest.write_char(' ')?;
37252            self.column_gap.to_css(dest)
37253          }
37254      }
37255  }
37256
37257
37258    }
37259
37260
37261
37262
37263    /// https://drafts.csswg.org/css-grid/#propdef-grid-row
37264    pub mod grid_row {
37265        use cssparser::Parser;
37266        use crate::parser::ParserContext;
37267        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
37268        #[allow(unused_imports)]
37269        use selectors::parser::SelectorParseErrorKind;
37270        #[allow(unused_imports)]
37271        use std::fmt::{self, Write};
37272        #[allow(unused_imports)]
37273        use style_traits::{ParseError, StyleParseErrorKind};
37274        #[allow(unused_imports)]
37275        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
37276
37277        #[derive(SpecifiedValueInfo)]
37278        pub struct Longhands {
37279                pub grid_row_start:
37280                    longhands::grid_row_start::SpecifiedValue
37281                    ,
37282                pub grid_row_end:
37283                    longhands::grid_row_end::SpecifiedValue
37284                    ,
37285        }
37286
37287        /// Represents a serializable set of all of the longhand properties that
37288        /// correspond to a shorthand.
37289        pub struct LonghandsToSerialize<'a> {
37290                pub grid_row_start:
37291                    &'a longhands::grid_row_start::SpecifiedValue,
37292                pub grid_row_end:
37293                    &'a longhands::grid_row_end::SpecifiedValue,
37294        }
37295
37296        impl<'a> LonghandsToSerialize<'a> {
37297            /// Tries to get a serializable set of longhands given a set of
37298            /// property declarations.
37299            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
37300                // Define all of the expected variables that correspond to the shorthand
37301                    let mut grid_row_start =
37302                        None::<&'a longhands::grid_row_start::SpecifiedValue>;
37303                    let mut grid_row_end =
37304                        None::<&'a longhands::grid_row_end::SpecifiedValue>;
37305
37306                // Attempt to assign the incoming declarations to the expected variables
37307                for declaration in iter {
37308                    match *declaration {
37309                            PropertyDeclaration::GridRowStart(ref value) => {
37310                                grid_row_start = Some(value)
37311                            },
37312                            PropertyDeclaration::GridRowEnd(ref value) => {
37313                                grid_row_end = Some(value)
37314                            },
37315                        _ => {}
37316                    };
37317                }
37318
37319                // If any of the expected variables are missing, return an error
37320                match (
37321                        grid_row_start,
37322                        grid_row_end,
37323                ) {
37324
37325                    (
37326                        Some(grid_row_start),
37327                        Some(grid_row_end),
37328                    ) =>
37329                    Ok(LonghandsToSerialize {
37330                            grid_row_start,
37331                            grid_row_end,
37332                    }),
37333                    _ => Err(())
37334                }
37335            }
37336        }
37337
37338        /// Parse the given shorthand and fill the result into the
37339        /// `declarations` vector.
37340        pub fn parse_into<'i, 't>(
37341            declarations: &mut SourcePropertyDeclaration,
37342            context: &ParserContext,
37343            input: &mut Parser<'i, 't>,
37344        ) -> Result<(), ParseError<'i>> {
37345            #[allow(unused_imports)]
37346            use crate::properties::{NonCustomPropertyId, LonghandId};
37347            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
37348                    declarations.push(PropertyDeclaration::GridRowStart(
37349                        longhands.grid_row_start
37350                    ));
37351                    declarations.push(PropertyDeclaration::GridRowEnd(
37352                        longhands.grid_row_end
37353                    ));
37354            })
37355        }
37356
37357        /// Try to serialize a given shorthand to a string.
37358        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
37359            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
37360                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
37361                Err(_) => Ok(())
37362            }
37363        }
37364
37365        
37366    use crate::values::specified::GridLine;
37367    use crate::parser::Parse;
37368    use crate::Zero;
37369
37370    // NOTE: Since both the shorthands have the same code, we should (re-)use code from one to implement
37371    // the other. This might not be a big deal for now, but we should consider looking into this in the future
37372    // to limit the amount of code generated.
37373    pub fn parse_value<'i, 't>(
37374        context: &ParserContext,
37375        input: &mut Parser<'i, 't>,
37376    ) -> Result<Longhands, ParseError<'i>> {
37377        let start = input.try_parse(|i| GridLine::parse(context, i))?;
37378        let end = if input.try_parse(|i| i.expect_delim('/')).is_ok() {
37379            GridLine::parse(context, input)?
37380        } else {
37381            let mut line = GridLine::auto();
37382            if start.line_num.is_zero() && !start.is_span {
37383                line.ident = start.ident.clone(); // ident from start value should be taken
37384            }
37385
37386            line
37387        };
37388
37389        Ok(expanded! {
37390            grid_row_start: start,
37391            grid_row_end: end,
37392        })
37393    }
37394
37395    impl<'a> ToCss for LonghandsToSerialize<'a> {
37396        // Return the shortest possible serialization of the `grid-row-[start/end]` values.
37397        // This function exploits the opportunities to omit the end value per this spec text:
37398        //
37399        // https://drafts.csswg.org/css-grid/#propdef-grid-column
37400        // "When the second value is omitted, if the first value is a <custom-ident>,
37401        // the grid-row-end/grid-column-end longhand is also set to that <custom-ident>;
37402        // otherwise, it is set to auto."
37403        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
37404            self.grid_row_start.to_css(dest)?;
37405            if self.grid_row_start.can_omit(self.grid_row_end) {
37406                return Ok(());  // the end value is redundant
37407            }
37408            dest.write_str(" / ")?;
37409            self.grid_row_end.to_css(dest)
37410        }
37411    }
37412
37413    }
37414
37415
37416
37417    /// https://drafts.csswg.org/css-grid/#propdef-grid-column
37418    pub mod grid_column {
37419        use cssparser::Parser;
37420        use crate::parser::ParserContext;
37421        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
37422        #[allow(unused_imports)]
37423        use selectors::parser::SelectorParseErrorKind;
37424        #[allow(unused_imports)]
37425        use std::fmt::{self, Write};
37426        #[allow(unused_imports)]
37427        use style_traits::{ParseError, StyleParseErrorKind};
37428        #[allow(unused_imports)]
37429        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
37430
37431        #[derive(SpecifiedValueInfo)]
37432        pub struct Longhands {
37433                pub grid_column_start:
37434                    longhands::grid_column_start::SpecifiedValue
37435                    ,
37436                pub grid_column_end:
37437                    longhands::grid_column_end::SpecifiedValue
37438                    ,
37439        }
37440
37441        /// Represents a serializable set of all of the longhand properties that
37442        /// correspond to a shorthand.
37443        pub struct LonghandsToSerialize<'a> {
37444                pub grid_column_start:
37445                    &'a longhands::grid_column_start::SpecifiedValue,
37446                pub grid_column_end:
37447                    &'a longhands::grid_column_end::SpecifiedValue,
37448        }
37449
37450        impl<'a> LonghandsToSerialize<'a> {
37451            /// Tries to get a serializable set of longhands given a set of
37452            /// property declarations.
37453            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
37454                // Define all of the expected variables that correspond to the shorthand
37455                    let mut grid_column_start =
37456                        None::<&'a longhands::grid_column_start::SpecifiedValue>;
37457                    let mut grid_column_end =
37458                        None::<&'a longhands::grid_column_end::SpecifiedValue>;
37459
37460                // Attempt to assign the incoming declarations to the expected variables
37461                for declaration in iter {
37462                    match *declaration {
37463                            PropertyDeclaration::GridColumnStart(ref value) => {
37464                                grid_column_start = Some(value)
37465                            },
37466                            PropertyDeclaration::GridColumnEnd(ref value) => {
37467                                grid_column_end = Some(value)
37468                            },
37469                        _ => {}
37470                    };
37471                }
37472
37473                // If any of the expected variables are missing, return an error
37474                match (
37475                        grid_column_start,
37476                        grid_column_end,
37477                ) {
37478
37479                    (
37480                        Some(grid_column_start),
37481                        Some(grid_column_end),
37482                    ) =>
37483                    Ok(LonghandsToSerialize {
37484                            grid_column_start,
37485                            grid_column_end,
37486                    }),
37487                    _ => Err(())
37488                }
37489            }
37490        }
37491
37492        /// Parse the given shorthand and fill the result into the
37493        /// `declarations` vector.
37494        pub fn parse_into<'i, 't>(
37495            declarations: &mut SourcePropertyDeclaration,
37496            context: &ParserContext,
37497            input: &mut Parser<'i, 't>,
37498        ) -> Result<(), ParseError<'i>> {
37499            #[allow(unused_imports)]
37500            use crate::properties::{NonCustomPropertyId, LonghandId};
37501            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
37502                    declarations.push(PropertyDeclaration::GridColumnStart(
37503                        longhands.grid_column_start
37504                    ));
37505                    declarations.push(PropertyDeclaration::GridColumnEnd(
37506                        longhands.grid_column_end
37507                    ));
37508            })
37509        }
37510
37511        /// Try to serialize a given shorthand to a string.
37512        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
37513            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
37514                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
37515                Err(_) => Ok(())
37516            }
37517        }
37518
37519        
37520    use crate::values::specified::GridLine;
37521    use crate::parser::Parse;
37522    use crate::Zero;
37523
37524    // NOTE: Since both the shorthands have the same code, we should (re-)use code from one to implement
37525    // the other. This might not be a big deal for now, but we should consider looking into this in the future
37526    // to limit the amount of code generated.
37527    pub fn parse_value<'i, 't>(
37528        context: &ParserContext,
37529        input: &mut Parser<'i, 't>,
37530    ) -> Result<Longhands, ParseError<'i>> {
37531        let start = input.try_parse(|i| GridLine::parse(context, i))?;
37532        let end = if input.try_parse(|i| i.expect_delim('/')).is_ok() {
37533            GridLine::parse(context, input)?
37534        } else {
37535            let mut line = GridLine::auto();
37536            if start.line_num.is_zero() && !start.is_span {
37537                line.ident = start.ident.clone(); // ident from start value should be taken
37538            }
37539
37540            line
37541        };
37542
37543        Ok(expanded! {
37544            grid_column_start: start,
37545            grid_column_end: end,
37546        })
37547    }
37548
37549    impl<'a> ToCss for LonghandsToSerialize<'a> {
37550        // Return the shortest possible serialization of the `grid-column-[start/end]` values.
37551        // This function exploits the opportunities to omit the end value per this spec text:
37552        //
37553        // https://drafts.csswg.org/css-grid/#propdef-grid-column
37554        // "When the second value is omitted, if the first value is a <custom-ident>,
37555        // the grid-row-end/grid-column-end longhand is also set to that <custom-ident>;
37556        // otherwise, it is set to auto."
37557        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
37558            self.grid_column_start.to_css(dest)?;
37559            if self.grid_column_start.can_omit(self.grid_column_end) {
37560                return Ok(());  // the end value is redundant
37561            }
37562            dest.write_str(" / ")?;
37563            self.grid_column_end.to_css(dest)
37564        }
37565    }
37566
37567    }
37568
37569
37570
37571
37572    /// https://drafts.csswg.org/css-grid/#propdef-grid-area
37573    pub mod grid_area {
37574        use cssparser::Parser;
37575        use crate::parser::ParserContext;
37576        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
37577        #[allow(unused_imports)]
37578        use selectors::parser::SelectorParseErrorKind;
37579        #[allow(unused_imports)]
37580        use std::fmt::{self, Write};
37581        #[allow(unused_imports)]
37582        use style_traits::{ParseError, StyleParseErrorKind};
37583        #[allow(unused_imports)]
37584        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
37585
37586        #[derive(SpecifiedValueInfo)]
37587        pub struct Longhands {
37588                pub grid_row_start:
37589                    longhands::grid_row_start::SpecifiedValue
37590                    ,
37591                pub grid_row_end:
37592                    longhands::grid_row_end::SpecifiedValue
37593                    ,
37594                pub grid_column_start:
37595                    longhands::grid_column_start::SpecifiedValue
37596                    ,
37597                pub grid_column_end:
37598                    longhands::grid_column_end::SpecifiedValue
37599                    ,
37600        }
37601
37602        /// Represents a serializable set of all of the longhand properties that
37603        /// correspond to a shorthand.
37604        pub struct LonghandsToSerialize<'a> {
37605                pub grid_row_start:
37606                    &'a longhands::grid_row_start::SpecifiedValue,
37607                pub grid_row_end:
37608                    &'a longhands::grid_row_end::SpecifiedValue,
37609                pub grid_column_start:
37610                    &'a longhands::grid_column_start::SpecifiedValue,
37611                pub grid_column_end:
37612                    &'a longhands::grid_column_end::SpecifiedValue,
37613        }
37614
37615        impl<'a> LonghandsToSerialize<'a> {
37616            /// Tries to get a serializable set of longhands given a set of
37617            /// property declarations.
37618            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
37619                // Define all of the expected variables that correspond to the shorthand
37620                    let mut grid_row_start =
37621                        None::<&'a longhands::grid_row_start::SpecifiedValue>;
37622                    let mut grid_row_end =
37623                        None::<&'a longhands::grid_row_end::SpecifiedValue>;
37624                    let mut grid_column_start =
37625                        None::<&'a longhands::grid_column_start::SpecifiedValue>;
37626                    let mut grid_column_end =
37627                        None::<&'a longhands::grid_column_end::SpecifiedValue>;
37628
37629                // Attempt to assign the incoming declarations to the expected variables
37630                for declaration in iter {
37631                    match *declaration {
37632                            PropertyDeclaration::GridRowStart(ref value) => {
37633                                grid_row_start = Some(value)
37634                            },
37635                            PropertyDeclaration::GridRowEnd(ref value) => {
37636                                grid_row_end = Some(value)
37637                            },
37638                            PropertyDeclaration::GridColumnStart(ref value) => {
37639                                grid_column_start = Some(value)
37640                            },
37641                            PropertyDeclaration::GridColumnEnd(ref value) => {
37642                                grid_column_end = Some(value)
37643                            },
37644                        _ => {}
37645                    };
37646                }
37647
37648                // If any of the expected variables are missing, return an error
37649                match (
37650                        grid_row_start,
37651                        grid_row_end,
37652                        grid_column_start,
37653                        grid_column_end,
37654                ) {
37655
37656                    (
37657                        Some(grid_row_start),
37658                        Some(grid_row_end),
37659                        Some(grid_column_start),
37660                        Some(grid_column_end),
37661                    ) =>
37662                    Ok(LonghandsToSerialize {
37663                            grid_row_start,
37664                            grid_row_end,
37665                            grid_column_start,
37666                            grid_column_end,
37667                    }),
37668                    _ => Err(())
37669                }
37670            }
37671        }
37672
37673        /// Parse the given shorthand and fill the result into the
37674        /// `declarations` vector.
37675        pub fn parse_into<'i, 't>(
37676            declarations: &mut SourcePropertyDeclaration,
37677            context: &ParserContext,
37678            input: &mut Parser<'i, 't>,
37679        ) -> Result<(), ParseError<'i>> {
37680            #[allow(unused_imports)]
37681            use crate::properties::{NonCustomPropertyId, LonghandId};
37682            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
37683                    declarations.push(PropertyDeclaration::GridRowStart(
37684                        longhands.grid_row_start
37685                    ));
37686                    declarations.push(PropertyDeclaration::GridRowEnd(
37687                        longhands.grid_row_end
37688                    ));
37689                    declarations.push(PropertyDeclaration::GridColumnStart(
37690                        longhands.grid_column_start
37691                    ));
37692                    declarations.push(PropertyDeclaration::GridColumnEnd(
37693                        longhands.grid_column_end
37694                    ));
37695            })
37696        }
37697
37698        /// Try to serialize a given shorthand to a string.
37699        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
37700            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
37701                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
37702                Err(_) => Ok(())
37703            }
37704        }
37705
37706        
37707    use crate::values::specified::GridLine;
37708    use crate::parser::Parse;
37709    use crate::Zero;
37710
37711    // The code is the same as `grid-{row,column}` except that this can have four values at most.
37712    pub fn parse_value<'i, 't>(
37713        context: &ParserContext,
37714        input: &mut Parser<'i, 't>,
37715    ) -> Result<Longhands, ParseError<'i>> {
37716        fn line_with_ident_from(other: &GridLine) -> GridLine {
37717            let mut this = GridLine::auto();
37718            if other.line_num.is_zero() && !other.is_span {
37719                this.ident = other.ident.clone();
37720            }
37721
37722            this
37723        }
37724
37725        let row_start = input.try_parse(|i| GridLine::parse(context, i))?;
37726        let (column_start, row_end, column_end) = if input.try_parse(|i| i.expect_delim('/')).is_ok() {
37727            let column_start = GridLine::parse(context, input)?;
37728            let (row_end, column_end) = if input.try_parse(|i| i.expect_delim('/')).is_ok() {
37729                let row_end = GridLine::parse(context, input)?;
37730                let column_end = if input.try_parse(|i| i.expect_delim('/')).is_ok() {
37731                    GridLine::parse(context, input)?
37732                } else {        // grid-column-end has not been given
37733                    line_with_ident_from(&column_start)
37734                };
37735
37736                (row_end, column_end)
37737            } else {        // grid-row-start and grid-column-start has been given
37738                let row_end = line_with_ident_from(&row_start);
37739                let column_end = line_with_ident_from(&column_start);
37740                (row_end, column_end)
37741            };
37742
37743            (column_start, row_end, column_end)
37744        } else {        // only grid-row-start is given
37745            let line = line_with_ident_from(&row_start);
37746            (line.clone(), line.clone(), line)
37747        };
37748
37749        Ok(expanded! {
37750            grid_row_start: row_start,
37751            grid_row_end: row_end,
37752            grid_column_start: column_start,
37753            grid_column_end: column_end,
37754        })
37755    }
37756
37757    impl<'a> ToCss for LonghandsToSerialize<'a> {
37758        // Return the shortest possible serialization of the `grid-[column/row]-[start/end]` values.
37759        // This function exploits the opportunities to omit trailing values per this spec text:
37760        //
37761        // https://drafts.csswg.org/css-grid/#propdef-grid-area
37762        // "If four <grid-line> values are specified, grid-row-start is set to the first value,
37763        // grid-column-start is set to the second value, grid-row-end is set to the third value,
37764        // and grid-column-end is set to the fourth value.
37765        //
37766        // When grid-column-end is omitted, if grid-column-start is a <custom-ident>,
37767        // grid-column-end is set to that <custom-ident>; otherwise, it is set to auto.
37768        //
37769        // When grid-row-end is omitted, if grid-row-start is a <custom-ident>, grid-row-end is
37770        // set to that <custom-ident>; otherwise, it is set to auto.
37771        //
37772        // When grid-column-start is omitted, if grid-row-start is a <custom-ident>, all four
37773        // longhands are set to that value. Otherwise, it is set to auto."
37774        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
37775            self.grid_row_start.to_css(dest)?;
37776            let mut trailing_values = 3;
37777            if self.grid_column_start.can_omit(self.grid_column_end) {
37778                trailing_values -= 1;
37779                if self.grid_row_start.can_omit(self.grid_row_end) {
37780                    trailing_values -= 1;
37781                    if self.grid_row_start.can_omit(self.grid_column_start) {
37782                        trailing_values -= 1;
37783                    }
37784                }
37785            }
37786            let values = [&self.grid_column_start, &self.grid_row_end, &self.grid_column_end];
37787            for value in values.iter().take(trailing_values) {
37788                dest.write_str(" / ")?;
37789                value.to_css(dest)?;
37790            }
37791            Ok(())
37792        }
37793    }
37794
37795    }
37796
37797
37798
37799
37800    /// https://drafts.csswg.org/css-grid/#propdef-grid-template
37801    pub mod grid_template {
37802        use cssparser::Parser;
37803        use crate::parser::ParserContext;
37804        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
37805        #[allow(unused_imports)]
37806        use selectors::parser::SelectorParseErrorKind;
37807        #[allow(unused_imports)]
37808        use std::fmt::{self, Write};
37809        #[allow(unused_imports)]
37810        use style_traits::{ParseError, StyleParseErrorKind};
37811        #[allow(unused_imports)]
37812        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
37813
37814        #[derive(SpecifiedValueInfo)]
37815        pub struct Longhands {
37816                pub grid_template_rows:
37817                    longhands::grid_template_rows::SpecifiedValue
37818                    ,
37819                pub grid_template_columns:
37820                    longhands::grid_template_columns::SpecifiedValue
37821                    ,
37822                pub grid_template_areas:
37823                    longhands::grid_template_areas::SpecifiedValue
37824                    ,
37825        }
37826
37827        /// Represents a serializable set of all of the longhand properties that
37828        /// correspond to a shorthand.
37829        pub struct LonghandsToSerialize<'a> {
37830                pub grid_template_rows:
37831                    &'a longhands::grid_template_rows::SpecifiedValue,
37832                pub grid_template_columns:
37833                    &'a longhands::grid_template_columns::SpecifiedValue,
37834                pub grid_template_areas:
37835                    &'a longhands::grid_template_areas::SpecifiedValue,
37836        }
37837
37838        impl<'a> LonghandsToSerialize<'a> {
37839            /// Tries to get a serializable set of longhands given a set of
37840            /// property declarations.
37841            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
37842                // Define all of the expected variables that correspond to the shorthand
37843                    let mut grid_template_rows =
37844                        None::<&'a longhands::grid_template_rows::SpecifiedValue>;
37845                    let mut grid_template_columns =
37846                        None::<&'a longhands::grid_template_columns::SpecifiedValue>;
37847                    let mut grid_template_areas =
37848                        None::<&'a longhands::grid_template_areas::SpecifiedValue>;
37849
37850                // Attempt to assign the incoming declarations to the expected variables
37851                for declaration in iter {
37852                    match *declaration {
37853                            PropertyDeclaration::GridTemplateRows(ref value) => {
37854                                grid_template_rows = Some(value)
37855                            },
37856                            PropertyDeclaration::GridTemplateColumns(ref value) => {
37857                                grid_template_columns = Some(value)
37858                            },
37859                            PropertyDeclaration::GridTemplateAreas(ref value) => {
37860                                grid_template_areas = Some(value)
37861                            },
37862                        _ => {}
37863                    };
37864                }
37865
37866                // If any of the expected variables are missing, return an error
37867                match (
37868                        grid_template_rows,
37869                        grid_template_columns,
37870                        grid_template_areas,
37871                ) {
37872
37873                    (
37874                        Some(grid_template_rows),
37875                        Some(grid_template_columns),
37876                        Some(grid_template_areas),
37877                    ) =>
37878                    Ok(LonghandsToSerialize {
37879                            grid_template_rows,
37880                            grid_template_columns,
37881                            grid_template_areas,
37882                    }),
37883                    _ => Err(())
37884                }
37885            }
37886        }
37887
37888        /// Parse the given shorthand and fill the result into the
37889        /// `declarations` vector.
37890        pub fn parse_into<'i, 't>(
37891            declarations: &mut SourcePropertyDeclaration,
37892            context: &ParserContext,
37893            input: &mut Parser<'i, 't>,
37894        ) -> Result<(), ParseError<'i>> {
37895            #[allow(unused_imports)]
37896            use crate::properties::{NonCustomPropertyId, LonghandId};
37897            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
37898                    declarations.push(PropertyDeclaration::GridTemplateRows(
37899                        longhands.grid_template_rows
37900                    ));
37901                    declarations.push(PropertyDeclaration::GridTemplateColumns(
37902                        longhands.grid_template_columns
37903                    ));
37904                    declarations.push(PropertyDeclaration::GridTemplateAreas(
37905                        longhands.grid_template_areas
37906                    ));
37907            })
37908        }
37909
37910        /// Try to serialize a given shorthand to a string.
37911        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
37912            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
37913                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
37914                Err(_) => Ok(())
37915            }
37916        }
37917
37918        
37919    use crate::parser::Parse;
37920    use servo_arc::Arc;
37921    use crate::values::generics::grid::{TrackSize, TrackList};
37922    use crate::values::generics::grid::{TrackListValue, concat_serialize_idents};
37923    use crate::values::specified::{GridTemplateComponent, GenericGridTemplateComponent};
37924    use crate::values::specified::grid::parse_line_names;
37925    use crate::values::specified::position::{GridTemplateAreas, TemplateAreasParser, TemplateAreasArc};
37926
37927    /// Parsing for `<grid-template>` shorthand (also used by `grid` shorthand).
37928    pub fn parse_grid_template<'i, 't>(
37929        context: &ParserContext,
37930        input: &mut Parser<'i, 't>,
37931    ) -> Result<(GridTemplateComponent, GridTemplateComponent, GridTemplateAreas), ParseError<'i>> {
37932        // Other shorthand sub properties also parse the `none` keyword and this shorthand
37933        // should know after this keyword there is nothing to parse. Otherwise it gets
37934        // confused and rejects the sub properties that contains `none`.
37935        
37936            if let Ok(x) = input.try_parse(|i| {
37937                if i.try_parse(|i| i.expect_ident_matching("none")).is_ok() {
37938                    if !i.is_exhausted() {
37939                        return Err(());
37940                    }
37941                    return Ok((GenericGridTemplateComponent::None, GenericGridTemplateComponent::None, GridTemplateAreas::None));
37942                }
37943                Err(())
37944            }) {
37945                return Ok(x);
37946            }
37947
37948        let first_line_names = input.try_parse(parse_line_names).unwrap_or_default();
37949        let mut areas_parser = TemplateAreasParser::default();
37950        if areas_parser.try_parse_string(input).is_ok() {
37951            let mut values = vec![];
37952            let mut line_names = vec![];
37953            line_names.push(first_line_names);
37954            loop {
37955                let size = input.try_parse(|i| TrackSize::parse(context, i)).unwrap_or_default();
37956                values.push(TrackListValue::TrackSize(size));
37957                let mut names = input.try_parse(parse_line_names).unwrap_or_default();
37958                let more_names = input.try_parse(parse_line_names);
37959
37960                match areas_parser.try_parse_string(input) {
37961                    Ok(()) => {
37962                        if let Ok(v) = more_names {
37963                            // We got `[names] [more_names] "string"` - merge the two name lists.
37964                            let mut names_vec = names.into_vec();
37965                            names_vec.extend(v.into_iter());
37966                            names = names_vec.into();
37967                        }
37968                        line_names.push(names);
37969                    },
37970                    Err(e) => {
37971                        if more_names.is_ok() {
37972                            // We've parsed `"string" [names] [more_names]` but then failed to parse another `"string"`.
37973                            // The grammar doesn't allow two trailing `<line-names>` so this is an invalid value.
37974                            return Err(e);
37975                        }
37976                        // only the named area determines whether we should bail out
37977                        line_names.push(names);
37978                        break
37979                    },
37980                };
37981            }
37982
37983            if line_names.len() == values.len() {
37984                // should be one longer than track sizes
37985                line_names.push(Default::default());
37986            }
37987
37988            let template_areas = areas_parser.finish()
37989                .map_err(|()| input.new_custom_error(StyleParseErrorKind::UnspecifiedError))?;
37990            let template_rows = TrackList {
37991                values: values.into(),
37992                line_names: line_names.into(),
37993                auto_repeat_index: std::usize::MAX,
37994            };
37995
37996            let template_cols = if input.try_parse(|i| i.expect_delim('/')).is_ok() {
37997                let value = GridTemplateComponent::parse_without_none(context, input)?;
37998                if let GenericGridTemplateComponent::TrackList(ref list) = value {
37999                    if !list.is_explicit() {
38000                        return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
38001                    }
38002                }
38003
38004                value
38005            } else {
38006                GridTemplateComponent::default()
38007            };
38008
38009            Ok((
38010                GenericGridTemplateComponent::TrackList(Box::new(template_rows)),
38011                template_cols,
38012                GridTemplateAreas::Areas(TemplateAreasArc(Arc::new(template_areas)))
38013            ))
38014        } else {
38015            let mut template_rows = GridTemplateComponent::parse(context, input)?;
38016            if let GenericGridTemplateComponent::TrackList(ref mut list) = template_rows {
38017                // Fist line names are parsed already and it shouldn't be parsed again.
38018                // If line names are not empty, that means given property value is not acceptable
38019                if list.line_names[0].is_empty() {
38020                    list.line_names[0] = first_line_names;      // won't panic
38021                } else {
38022                    return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
38023                }
38024            }
38025
38026            input.expect_delim('/')?;
38027            Ok((template_rows, GridTemplateComponent::parse(context, input)?, GridTemplateAreas::None))
38028        }
38029    }
38030
38031    #[inline]
38032    pub fn parse_value<'i, 't>(
38033        context: &ParserContext,
38034        input: &mut Parser<'i, 't>,
38035    ) -> Result<Longhands, ParseError<'i>> {
38036        let (rows, columns, areas) = parse_grid_template(context, input)?;
38037        Ok(expanded! {
38038            grid_template_rows: rows,
38039            grid_template_columns: columns,
38040            grid_template_areas: areas,
38041        })
38042    }
38043
38044    /// Serialization for `<grid-template>` shorthand (also used by `grid` shorthand).
38045    pub fn serialize_grid_template<W>(
38046        template_rows: &GridTemplateComponent,
38047        template_columns: &GridTemplateComponent,
38048        template_areas: &GridTemplateAreas,
38049        dest: &mut CssWriter<W>,
38050    ) -> fmt::Result
38051    where
38052        W: Write {
38053        match *template_areas {
38054            GridTemplateAreas::None => {
38055                if template_rows.is_initial() && template_columns.is_initial() {
38056                    return GridTemplateComponent::default().to_css(dest);
38057                }
38058                template_rows.to_css(dest)?;
38059                dest.write_str(" / ")?;
38060                template_columns.to_css(dest)
38061            },
38062            GridTemplateAreas::Areas(ref areas) => {
38063                // The length of template-area and template-rows values should be equal.
38064                if areas.0.strings.len() != template_rows.track_list_len() {
38065                    return Ok(());
38066                }
38067
38068                let track_list = match *template_rows {
38069                    GenericGridTemplateComponent::TrackList(ref list) => {
38070                        // We should fail if there is a `repeat` function.
38071                        // `grid` and `grid-template` shorthands doesn't accept
38072                        // that. Only longhand accepts.
38073                        if !list.is_explicit() {
38074                            return Ok(());
38075                        }
38076                        list
38077                    },
38078                    // Others template components shouldn't exist with normal shorthand values.
38079                    // But if we need to serialize a group of longhand sub-properties for
38080                    // the shorthand, we should be able to return empty string instead of crashing.
38081                    _ => return Ok(()),
38082                };
38083
38084                // We need to check some values that longhand accepts but shorthands don't.
38085                match *template_columns {
38086                    // We should fail if there is a `repeat` function. `grid` and
38087                    // `grid-template` shorthands doesn't accept that. Only longhand accepts that.
38088                    GenericGridTemplateComponent::TrackList(ref list) => {
38089                        if !list.is_explicit() {
38090                            return Ok(());
38091                        }
38092                    },
38093                    // Also the shorthands don't accept subgrids unlike longhand.
38094                    // We should fail without an error here.
38095                    GenericGridTemplateComponent::Subgrid(_) => {
38096                        return Ok(());
38097                    },
38098                    _ => {},
38099                }
38100
38101                let mut names_iter = track_list.line_names.iter();
38102                for (((i, string), names), value) in areas.0.strings.iter().enumerate()
38103                                                                  .zip(&mut names_iter)
38104                                                                  .zip(track_list.values.iter()) {
38105                    if i > 0 {
38106                        dest.write_char(' ')?;
38107                    }
38108
38109                    if !names.is_empty() {
38110                        concat_serialize_idents("[", "] ", names, " ", dest)?;
38111                    }
38112
38113                    string.to_css(dest)?;
38114
38115                    // If the track size is the initial value then it's redundant here.
38116                    if !value.is_initial() {
38117                        dest.write_char(' ')?;
38118                        value.to_css(dest)?;
38119                    }
38120                }
38121
38122                if let Some(names) = names_iter.next() {
38123                    concat_serialize_idents(" [", "]", names, " ", dest)?;
38124                }
38125
38126                if let GenericGridTemplateComponent::TrackList(ref list) = *template_columns {
38127                    dest.write_str(" / ")?;
38128                    list.to_css(dest)?;
38129                }
38130
38131                Ok(())
38132            },
38133        }
38134    }
38135
38136    impl<'a> ToCss for LonghandsToSerialize<'a> {
38137        #[inline]
38138        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
38139            serialize_grid_template(
38140                self.grid_template_rows,
38141                self.grid_template_columns,
38142                self.grid_template_areas,
38143                dest
38144            )
38145        }
38146    }
38147
38148    }
38149
38150
38151
38152
38153    /// https://drafts.csswg.org/css-grid/#propdef-grid
38154    pub mod grid {
38155        use cssparser::Parser;
38156        use crate::parser::ParserContext;
38157        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
38158        #[allow(unused_imports)]
38159        use selectors::parser::SelectorParseErrorKind;
38160        #[allow(unused_imports)]
38161        use std::fmt::{self, Write};
38162        #[allow(unused_imports)]
38163        use style_traits::{ParseError, StyleParseErrorKind};
38164        #[allow(unused_imports)]
38165        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
38166
38167        #[derive(SpecifiedValueInfo)]
38168        pub struct Longhands {
38169                pub grid_template_rows:
38170                    longhands::grid_template_rows::SpecifiedValue
38171                    ,
38172                pub grid_template_columns:
38173                    longhands::grid_template_columns::SpecifiedValue
38174                    ,
38175                pub grid_template_areas:
38176                    longhands::grid_template_areas::SpecifiedValue
38177                    ,
38178                pub grid_auto_rows:
38179                    longhands::grid_auto_rows::SpecifiedValue
38180                    ,
38181                pub grid_auto_columns:
38182                    longhands::grid_auto_columns::SpecifiedValue
38183                    ,
38184                pub grid_auto_flow:
38185                    longhands::grid_auto_flow::SpecifiedValue
38186                    ,
38187        }
38188
38189        /// Represents a serializable set of all of the longhand properties that
38190        /// correspond to a shorthand.
38191        pub struct LonghandsToSerialize<'a> {
38192                pub grid_template_rows:
38193                    &'a longhands::grid_template_rows::SpecifiedValue,
38194                pub grid_template_columns:
38195                    &'a longhands::grid_template_columns::SpecifiedValue,
38196                pub grid_template_areas:
38197                    &'a longhands::grid_template_areas::SpecifiedValue,
38198                pub grid_auto_rows:
38199                    &'a longhands::grid_auto_rows::SpecifiedValue,
38200                pub grid_auto_columns:
38201                    &'a longhands::grid_auto_columns::SpecifiedValue,
38202                pub grid_auto_flow:
38203                    &'a longhands::grid_auto_flow::SpecifiedValue,
38204        }
38205
38206        impl<'a> LonghandsToSerialize<'a> {
38207            /// Tries to get a serializable set of longhands given a set of
38208            /// property declarations.
38209            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
38210                // Define all of the expected variables that correspond to the shorthand
38211                    let mut grid_template_rows =
38212                        None::<&'a longhands::grid_template_rows::SpecifiedValue>;
38213                    let mut grid_template_columns =
38214                        None::<&'a longhands::grid_template_columns::SpecifiedValue>;
38215                    let mut grid_template_areas =
38216                        None::<&'a longhands::grid_template_areas::SpecifiedValue>;
38217                    let mut grid_auto_rows =
38218                        None::<&'a longhands::grid_auto_rows::SpecifiedValue>;
38219                    let mut grid_auto_columns =
38220                        None::<&'a longhands::grid_auto_columns::SpecifiedValue>;
38221                    let mut grid_auto_flow =
38222                        None::<&'a longhands::grid_auto_flow::SpecifiedValue>;
38223
38224                // Attempt to assign the incoming declarations to the expected variables
38225                for declaration in iter {
38226                    match *declaration {
38227                            PropertyDeclaration::GridTemplateRows(ref value) => {
38228                                grid_template_rows = Some(value)
38229                            },
38230                            PropertyDeclaration::GridTemplateColumns(ref value) => {
38231                                grid_template_columns = Some(value)
38232                            },
38233                            PropertyDeclaration::GridTemplateAreas(ref value) => {
38234                                grid_template_areas = Some(value)
38235                            },
38236                            PropertyDeclaration::GridAutoRows(ref value) => {
38237                                grid_auto_rows = Some(value)
38238                            },
38239                            PropertyDeclaration::GridAutoColumns(ref value) => {
38240                                grid_auto_columns = Some(value)
38241                            },
38242                            PropertyDeclaration::GridAutoFlow(ref value) => {
38243                                grid_auto_flow = Some(value)
38244                            },
38245                        _ => {}
38246                    };
38247                }
38248
38249                // If any of the expected variables are missing, return an error
38250                match (
38251                        grid_template_rows,
38252                        grid_template_columns,
38253                        grid_template_areas,
38254                        grid_auto_rows,
38255                        grid_auto_columns,
38256                        grid_auto_flow,
38257                ) {
38258
38259                    (
38260                        Some(grid_template_rows),
38261                        Some(grid_template_columns),
38262                        Some(grid_template_areas),
38263                        Some(grid_auto_rows),
38264                        Some(grid_auto_columns),
38265                        Some(grid_auto_flow),
38266                    ) =>
38267                    Ok(LonghandsToSerialize {
38268                            grid_template_rows,
38269                            grid_template_columns,
38270                            grid_template_areas,
38271                            grid_auto_rows,
38272                            grid_auto_columns,
38273                            grid_auto_flow,
38274                    }),
38275                    _ => Err(())
38276                }
38277            }
38278        }
38279
38280        /// Parse the given shorthand and fill the result into the
38281        /// `declarations` vector.
38282        pub fn parse_into<'i, 't>(
38283            declarations: &mut SourcePropertyDeclaration,
38284            context: &ParserContext,
38285            input: &mut Parser<'i, 't>,
38286        ) -> Result<(), ParseError<'i>> {
38287            #[allow(unused_imports)]
38288            use crate::properties::{NonCustomPropertyId, LonghandId};
38289            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
38290                    declarations.push(PropertyDeclaration::GridTemplateRows(
38291                        longhands.grid_template_rows
38292                    ));
38293                    declarations.push(PropertyDeclaration::GridTemplateColumns(
38294                        longhands.grid_template_columns
38295                    ));
38296                    declarations.push(PropertyDeclaration::GridTemplateAreas(
38297                        longhands.grid_template_areas
38298                    ));
38299                    declarations.push(PropertyDeclaration::GridAutoRows(
38300                        longhands.grid_auto_rows
38301                    ));
38302                    declarations.push(PropertyDeclaration::GridAutoColumns(
38303                        longhands.grid_auto_columns
38304                    ));
38305                    declarations.push(PropertyDeclaration::GridAutoFlow(
38306                        longhands.grid_auto_flow
38307                    ));
38308            })
38309        }
38310
38311        /// Try to serialize a given shorthand to a string.
38312        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
38313            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
38314                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
38315                Err(_) => Ok(())
38316            }
38317        }
38318
38319        
38320    use crate::parser::Parse;
38321    use crate::properties::longhands::{grid_auto_columns, grid_auto_rows, grid_auto_flow};
38322    use crate::values::generics::grid::GridTemplateComponent;
38323    use crate::values::specified::{GenericGridTemplateComponent, ImplicitGridTracks};
38324    use crate::values::specified::position::{GridAutoFlow, GridTemplateAreas};
38325
38326    pub fn parse_value<'i, 't>(
38327        context: &ParserContext,
38328        input: &mut Parser<'i, 't>,
38329    ) -> Result<Longhands, ParseError<'i>> {
38330        let mut temp_rows = GridTemplateComponent::default();
38331        let mut temp_cols = GridTemplateComponent::default();
38332        let mut temp_areas = GridTemplateAreas::None;
38333        let mut auto_rows = ImplicitGridTracks::default();
38334        let mut auto_cols = ImplicitGridTracks::default();
38335        let mut flow = grid_auto_flow::get_initial_value();
38336
38337        fn parse_auto_flow<'i, 't>(
38338            input: &mut Parser<'i, 't>,
38339            is_row: bool,
38340        ) -> Result<GridAutoFlow, ParseError<'i>> {
38341            let mut track = None;
38342            let mut dense = GridAutoFlow::empty();
38343
38344            for _ in 0..2 {
38345                if input.try_parse(|i| i.expect_ident_matching("auto-flow")).is_ok() {
38346                    track = if is_row {
38347                        Some(GridAutoFlow::ROW)
38348                    } else {
38349                        Some(GridAutoFlow::COLUMN)
38350                    };
38351                } else if input.try_parse(|i| i.expect_ident_matching("dense")).is_ok() {
38352                    dense = GridAutoFlow::DENSE
38353                } else {
38354                    break
38355                }
38356            }
38357
38358            if track.is_some() {
38359                Ok(track.unwrap() | dense)
38360            } else {
38361                Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
38362            }
38363        }
38364
38365        if let Ok((rows, cols, areas)) = input.try_parse(|i| super::grid_template::parse_grid_template(context, i)) {
38366            temp_rows = rows;
38367            temp_cols = cols;
38368            temp_areas = areas;
38369        } else if let Ok(rows) = input.try_parse(|i| GridTemplateComponent::parse(context, i)) {
38370            temp_rows = rows;
38371            input.expect_delim('/')?;
38372            flow = parse_auto_flow(input, false)?;
38373            auto_cols = input.try_parse(|i| grid_auto_columns::parse(context, i)).unwrap_or_default();
38374        } else {
38375            flow = parse_auto_flow(input, true)?;
38376            auto_rows = input.try_parse(|i| grid_auto_rows::parse(context, i)).unwrap_or_default();
38377            input.expect_delim('/')?;
38378            temp_cols = GridTemplateComponent::parse(context, input)?;
38379        }
38380
38381        Ok(expanded! {
38382            grid_template_rows: temp_rows,
38383            grid_template_columns: temp_cols,
38384            grid_template_areas: temp_areas,
38385            grid_auto_rows: auto_rows,
38386            grid_auto_columns: auto_cols,
38387            grid_auto_flow: flow,
38388        })
38389    }
38390
38391    impl<'a> LonghandsToSerialize<'a> {
38392        /// Returns true if other sub properties except template-{rows,columns} are initial.
38393        fn is_grid_template(&self) -> bool {
38394            self.grid_auto_rows.is_initial() &&
38395            self.grid_auto_columns.is_initial() &&
38396            *self.grid_auto_flow == grid_auto_flow::get_initial_value()
38397        }
38398    }
38399
38400    impl<'a> ToCss for LonghandsToSerialize<'a> {
38401        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
38402            if self.is_grid_template() {
38403                return super::grid_template::serialize_grid_template(
38404                    self.grid_template_rows,
38405                    self.grid_template_columns,
38406                    self.grid_template_areas,
38407                    dest
38408                );
38409            }
38410
38411            if *self.grid_template_areas != GridTemplateAreas::None {
38412                // No other syntax can set the template areas, so fail to
38413                // serialize.
38414                return Ok(());
38415            }
38416
38417            if self.grid_auto_flow.contains(GridAutoFlow::COLUMN) {
38418                // It should fail to serialize if other branch of the if condition's values are set.
38419                if !self.grid_auto_rows.is_initial() ||
38420                    !self.grid_template_columns.is_initial() {
38421                    return Ok(());
38422                }
38423
38424                // It should fail to serialize if template-rows value is not Explicit.
38425                if let GenericGridTemplateComponent::TrackList(ref list) = *self.grid_template_rows {
38426                    if !list.is_explicit() {
38427                        return Ok(());
38428                    }
38429                }
38430
38431                self.grid_template_rows.to_css(dest)?;
38432                dest.write_str(" / auto-flow")?;
38433                if self.grid_auto_flow.contains(GridAutoFlow::DENSE) {
38434                    dest.write_str(" dense")?;
38435                }
38436
38437                if !self.grid_auto_columns.is_initial() {
38438                    dest.write_char(' ')?;
38439                    self.grid_auto_columns.to_css(dest)?;
38440                }
38441
38442                return Ok(());
38443            }
38444
38445            // It should fail to serialize if other branch of the if condition's values are set.
38446            if !self.grid_auto_columns.is_initial() ||
38447                !self.grid_template_rows.is_initial() {
38448                return Ok(());
38449            }
38450
38451            // It should fail to serialize if template-column value is not Explicit.
38452            if let GenericGridTemplateComponent::TrackList(ref list) = *self.grid_template_columns {
38453                if !list.is_explicit() {
38454                    return Ok(());
38455                }
38456            }
38457
38458            dest.write_str("auto-flow")?;
38459            if self.grid_auto_flow.contains(GridAutoFlow::DENSE) {
38460                dest.write_str(" dense")?;
38461            }
38462
38463            if !self.grid_auto_rows.is_initial() {
38464                dest.write_char(' ')?;
38465                self.grid_auto_rows.to_css(dest)?;
38466            }
38467
38468            dest.write_str(" / ")?;
38469            self.grid_template_columns.to_css(dest)?;
38470            Ok(())
38471        }
38472    }
38473
38474    }
38475
38476
38477
38478
38479    /// https://drafts.csswg.org/css-align/#propdef-place-content
38480    pub mod place_content {
38481        use cssparser::Parser;
38482        use crate::parser::ParserContext;
38483        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
38484        #[allow(unused_imports)]
38485        use selectors::parser::SelectorParseErrorKind;
38486        #[allow(unused_imports)]
38487        use std::fmt::{self, Write};
38488        #[allow(unused_imports)]
38489        use style_traits::{ParseError, StyleParseErrorKind};
38490        #[allow(unused_imports)]
38491        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
38492
38493        #[derive(SpecifiedValueInfo)]
38494        pub struct Longhands {
38495                pub align_content:
38496                    longhands::align_content::SpecifiedValue
38497                    ,
38498                pub justify_content:
38499                    longhands::justify_content::SpecifiedValue
38500                    ,
38501        }
38502
38503        /// Represents a serializable set of all of the longhand properties that
38504        /// correspond to a shorthand.
38505        pub struct LonghandsToSerialize<'a> {
38506                pub align_content:
38507                    &'a longhands::align_content::SpecifiedValue,
38508                pub justify_content:
38509                    &'a longhands::justify_content::SpecifiedValue,
38510        }
38511
38512        impl<'a> LonghandsToSerialize<'a> {
38513            /// Tries to get a serializable set of longhands given a set of
38514            /// property declarations.
38515            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
38516                // Define all of the expected variables that correspond to the shorthand
38517                    let mut align_content =
38518                        None::<&'a longhands::align_content::SpecifiedValue>;
38519                    let mut justify_content =
38520                        None::<&'a longhands::justify_content::SpecifiedValue>;
38521
38522                // Attempt to assign the incoming declarations to the expected variables
38523                for declaration in iter {
38524                    match *declaration {
38525                            PropertyDeclaration::AlignContent(ref value) => {
38526                                align_content = Some(value)
38527                            },
38528                            PropertyDeclaration::JustifyContent(ref value) => {
38529                                justify_content = Some(value)
38530                            },
38531                        _ => {}
38532                    };
38533                }
38534
38535                // If any of the expected variables are missing, return an error
38536                match (
38537                        align_content,
38538                        justify_content,
38539                ) {
38540
38541                    (
38542                        Some(align_content),
38543                        Some(justify_content),
38544                    ) =>
38545                    Ok(LonghandsToSerialize {
38546                            align_content,
38547                            justify_content,
38548                    }),
38549                    _ => Err(())
38550                }
38551            }
38552        }
38553
38554        /// Parse the given shorthand and fill the result into the
38555        /// `declarations` vector.
38556        pub fn parse_into<'i, 't>(
38557            declarations: &mut SourcePropertyDeclaration,
38558            context: &ParserContext,
38559            input: &mut Parser<'i, 't>,
38560        ) -> Result<(), ParseError<'i>> {
38561            #[allow(unused_imports)]
38562            use crate::properties::{NonCustomPropertyId, LonghandId};
38563            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
38564                    declarations.push(PropertyDeclaration::AlignContent(
38565                        longhands.align_content
38566                    ));
38567                    declarations.push(PropertyDeclaration::JustifyContent(
38568                        longhands.justify_content
38569                    ));
38570            })
38571        }
38572
38573        /// Try to serialize a given shorthand to a string.
38574        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
38575            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
38576                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
38577                Err(_) => Ok(())
38578            }
38579        }
38580
38581        
38582    use crate::values::specified::align::{AlignContent, JustifyContent, ContentDistribution, AxisDirection};
38583
38584    pub fn parse_value<'i, 't>(
38585        _: &ParserContext,
38586        input: &mut Parser<'i, 't>,
38587    ) -> Result<Longhands, ParseError<'i>> {
38588        let align_content =
38589            ContentDistribution::parse(input, AxisDirection::Block)?;
38590
38591        let justify_content = input.try_parse(|input| {
38592            ContentDistribution::parse(input, AxisDirection::Inline)
38593        });
38594
38595        let justify_content = match justify_content {
38596            Ok(v) => v,
38597            Err(..) => {
38598                // https://drafts.csswg.org/css-align-3/#place-content:
38599                //
38600                //   The second value is assigned to justify-content; if
38601                //   omitted, it is copied from the first value, unless that
38602                //   value is a <baseline-position> in which case it is
38603                //   defaulted to start.
38604                //
38605                if !align_content.is_baseline_position() {
38606                    align_content
38607                } else {
38608                    ContentDistribution::start()
38609                }
38610            }
38611        };
38612
38613        Ok(expanded! {
38614            align_content: AlignContent(align_content),
38615            justify_content: JustifyContent(justify_content),
38616        })
38617    }
38618
38619    impl<'a> ToCss for LonghandsToSerialize<'a> {
38620        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
38621            self.align_content.to_css(dest)?;
38622            if self.align_content.0 != self.justify_content.0 {
38623                dest.write_char(' ')?;
38624                self.justify_content.to_css(dest)?;
38625            }
38626            Ok(())
38627        }
38628    }
38629
38630    }
38631
38632
38633
38634
38635    /// https://drafts.csswg.org/css-align/#place-self-property
38636    pub mod place_self {
38637        use cssparser::Parser;
38638        use crate::parser::ParserContext;
38639        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
38640        #[allow(unused_imports)]
38641        use selectors::parser::SelectorParseErrorKind;
38642        #[allow(unused_imports)]
38643        use std::fmt::{self, Write};
38644        #[allow(unused_imports)]
38645        use style_traits::{ParseError, StyleParseErrorKind};
38646        #[allow(unused_imports)]
38647        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
38648
38649        #[derive(SpecifiedValueInfo)]
38650        pub struct Longhands {
38651                pub align_self:
38652                    longhands::align_self::SpecifiedValue
38653                    ,
38654                pub justify_self:
38655                    longhands::justify_self::SpecifiedValue
38656                    ,
38657        }
38658
38659        /// Represents a serializable set of all of the longhand properties that
38660        /// correspond to a shorthand.
38661        pub struct LonghandsToSerialize<'a> {
38662                pub align_self:
38663                    &'a longhands::align_self::SpecifiedValue,
38664                pub justify_self:
38665                    &'a longhands::justify_self::SpecifiedValue,
38666        }
38667
38668        impl<'a> LonghandsToSerialize<'a> {
38669            /// Tries to get a serializable set of longhands given a set of
38670            /// property declarations.
38671            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
38672                // Define all of the expected variables that correspond to the shorthand
38673                    let mut align_self =
38674                        None::<&'a longhands::align_self::SpecifiedValue>;
38675                    let mut justify_self =
38676                        None::<&'a longhands::justify_self::SpecifiedValue>;
38677
38678                // Attempt to assign the incoming declarations to the expected variables
38679                for declaration in iter {
38680                    match *declaration {
38681                            PropertyDeclaration::AlignSelf(ref value) => {
38682                                align_self = Some(value)
38683                            },
38684                            PropertyDeclaration::JustifySelf(ref value) => {
38685                                justify_self = Some(value)
38686                            },
38687                        _ => {}
38688                    };
38689                }
38690
38691                // If any of the expected variables are missing, return an error
38692                match (
38693                        align_self,
38694                        justify_self,
38695                ) {
38696
38697                    (
38698                        Some(align_self),
38699                        Some(justify_self),
38700                    ) =>
38701                    Ok(LonghandsToSerialize {
38702                            align_self,
38703                            justify_self,
38704                    }),
38705                    _ => Err(())
38706                }
38707            }
38708        }
38709
38710        /// Parse the given shorthand and fill the result into the
38711        /// `declarations` vector.
38712        pub fn parse_into<'i, 't>(
38713            declarations: &mut SourcePropertyDeclaration,
38714            context: &ParserContext,
38715            input: &mut Parser<'i, 't>,
38716        ) -> Result<(), ParseError<'i>> {
38717            #[allow(unused_imports)]
38718            use crate::properties::{NonCustomPropertyId, LonghandId};
38719            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
38720                    declarations.push(PropertyDeclaration::AlignSelf(
38721                        longhands.align_self
38722                    ));
38723                    declarations.push(PropertyDeclaration::JustifySelf(
38724                        longhands.justify_self
38725                    ));
38726            })
38727        }
38728
38729        /// Try to serialize a given shorthand to a string.
38730        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
38731            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
38732                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
38733                Err(_) => Ok(())
38734            }
38735        }
38736
38737        
38738    use crate::values::specified::align::{AlignSelf, JustifySelf, SelfAlignment, AxisDirection};
38739
38740    pub fn parse_value<'i, 't>(
38741        _: &ParserContext,
38742        input: &mut Parser<'i, 't>,
38743    ) -> Result<Longhands, ParseError<'i>> {
38744        let align = SelfAlignment::parse(input, AxisDirection::Block)?;
38745        let justify = input.try_parse(|input| SelfAlignment::parse(input, AxisDirection::Inline));
38746
38747        let justify = match justify {
38748            Ok(v) => v,
38749            Err(..) => {
38750                debug_assert!(align.is_valid_on_both_axes());
38751                align
38752            }
38753        };
38754
38755        Ok(expanded! {
38756            align_self: AlignSelf(align),
38757            justify_self: JustifySelf(justify),
38758        })
38759    }
38760    impl<'a> ToCss for LonghandsToSerialize<'a> {
38761        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
38762            self.align_self.to_css(dest)?;
38763            if self.align_self.0 != self.justify_self.0 {
38764                dest.write_char(' ')?;
38765                self.justify_self.to_css(dest)?;
38766            }
38767            Ok(())
38768        }
38769    }
38770
38771    }
38772
38773
38774
38775
38776    /// https://drafts.csswg.org/css-align/#place-items-property
38777    pub mod place_items {
38778        use cssparser::Parser;
38779        use crate::parser::ParserContext;
38780        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
38781        #[allow(unused_imports)]
38782        use selectors::parser::SelectorParseErrorKind;
38783        #[allow(unused_imports)]
38784        use std::fmt::{self, Write};
38785        #[allow(unused_imports)]
38786        use style_traits::{ParseError, StyleParseErrorKind};
38787        #[allow(unused_imports)]
38788        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
38789
38790        #[derive(SpecifiedValueInfo)]
38791        pub struct Longhands {
38792                pub align_items:
38793                    longhands::align_items::SpecifiedValue
38794                    ,
38795                pub justify_items:
38796                    longhands::justify_items::SpecifiedValue
38797                    ,
38798        }
38799
38800        /// Represents a serializable set of all of the longhand properties that
38801        /// correspond to a shorthand.
38802        pub struct LonghandsToSerialize<'a> {
38803                pub align_items:
38804                    &'a longhands::align_items::SpecifiedValue,
38805                pub justify_items:
38806                    &'a longhands::justify_items::SpecifiedValue,
38807        }
38808
38809        impl<'a> LonghandsToSerialize<'a> {
38810            /// Tries to get a serializable set of longhands given a set of
38811            /// property declarations.
38812            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
38813                // Define all of the expected variables that correspond to the shorthand
38814                    let mut align_items =
38815                        None::<&'a longhands::align_items::SpecifiedValue>;
38816                    let mut justify_items =
38817                        None::<&'a longhands::justify_items::SpecifiedValue>;
38818
38819                // Attempt to assign the incoming declarations to the expected variables
38820                for declaration in iter {
38821                    match *declaration {
38822                            PropertyDeclaration::AlignItems(ref value) => {
38823                                align_items = Some(value)
38824                            },
38825                            PropertyDeclaration::JustifyItems(ref value) => {
38826                                justify_items = Some(value)
38827                            },
38828                        _ => {}
38829                    };
38830                }
38831
38832                // If any of the expected variables are missing, return an error
38833                match (
38834                        align_items,
38835                        justify_items,
38836                ) {
38837
38838                    (
38839                        Some(align_items),
38840                        Some(justify_items),
38841                    ) =>
38842                    Ok(LonghandsToSerialize {
38843                            align_items,
38844                            justify_items,
38845                    }),
38846                    _ => Err(())
38847                }
38848            }
38849        }
38850
38851        /// Parse the given shorthand and fill the result into the
38852        /// `declarations` vector.
38853        pub fn parse_into<'i, 't>(
38854            declarations: &mut SourcePropertyDeclaration,
38855            context: &ParserContext,
38856            input: &mut Parser<'i, 't>,
38857        ) -> Result<(), ParseError<'i>> {
38858            #[allow(unused_imports)]
38859            use crate::properties::{NonCustomPropertyId, LonghandId};
38860            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
38861                    declarations.push(PropertyDeclaration::AlignItems(
38862                        longhands.align_items
38863                    ));
38864                    declarations.push(PropertyDeclaration::JustifyItems(
38865                        longhands.justify_items
38866                    ));
38867            })
38868        }
38869
38870        /// Try to serialize a given shorthand to a string.
38871        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
38872            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
38873                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
38874                Err(_) => Ok(())
38875            }
38876        }
38877
38878        
38879    use crate::values::specified::align::{AlignItems, JustifyItems};
38880    use crate::parser::Parse;
38881
38882    impl From<AlignItems> for JustifyItems {
38883        fn from(align: AlignItems) -> JustifyItems {
38884            JustifyItems(align.0)
38885        }
38886    }
38887
38888    pub fn parse_value<'i, 't>(
38889        context: &ParserContext,
38890        input: &mut Parser<'i, 't>,
38891    ) -> Result<Longhands, ParseError<'i>> {
38892        let align = AlignItems::parse(context, input)?;
38893        let justify =
38894            input.try_parse(|input| JustifyItems::parse(context, input))
38895                 .unwrap_or_else(|_| JustifyItems::from(align));
38896
38897        Ok(expanded! {
38898            align_items: align,
38899            justify_items: justify,
38900        })
38901    }
38902
38903    impl<'a> ToCss for LonghandsToSerialize<'a> {
38904        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
38905            self.align_items.to_css(dest)?;
38906            if self.align_items.0 != self.justify_items.0 {
38907                dest.write_char(' ')?;
38908                self.justify_items.to_css(dest)?;
38909            }
38910
38911            Ok(())
38912        }
38913    }
38914
38915    }
38916
38917
38918
38919
38920
38921
38922// See https://github.com/w3c/csswg-drafts/issues/3525 for the quirks stuff.
38923
38924    
38925    
38926
38927    /// https://drafts.csswg.org/css-logical/#propdef-inset
38928    pub mod inset {
38929        use cssparser::Parser;
38930        use crate::parser::ParserContext;
38931        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
38932        #[allow(unused_imports)]
38933        use selectors::parser::SelectorParseErrorKind;
38934        #[allow(unused_imports)]
38935        use std::fmt::{self, Write};
38936        #[allow(unused_imports)]
38937        use style_traits::{ParseError, StyleParseErrorKind};
38938        #[allow(unused_imports)]
38939        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
38940
38941        #[derive(SpecifiedValueInfo)]
38942        pub struct Longhands {
38943                pub top:
38944                    longhands::top::SpecifiedValue
38945                    ,
38946                pub right:
38947                    longhands::right::SpecifiedValue
38948                    ,
38949                pub bottom:
38950                    longhands::bottom::SpecifiedValue
38951                    ,
38952                pub left:
38953                    longhands::left::SpecifiedValue
38954                    ,
38955        }
38956
38957        /// Represents a serializable set of all of the longhand properties that
38958        /// correspond to a shorthand.
38959        pub struct LonghandsToSerialize<'a> {
38960                pub top:
38961                    &'a longhands::top::SpecifiedValue,
38962                pub right:
38963                    &'a longhands::right::SpecifiedValue,
38964                pub bottom:
38965                    &'a longhands::bottom::SpecifiedValue,
38966                pub left:
38967                    &'a longhands::left::SpecifiedValue,
38968        }
38969
38970        impl<'a> LonghandsToSerialize<'a> {
38971            /// Tries to get a serializable set of longhands given a set of
38972            /// property declarations.
38973            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
38974                // Define all of the expected variables that correspond to the shorthand
38975                    let mut top =
38976                        None::<&'a longhands::top::SpecifiedValue>;
38977                    let mut right =
38978                        None::<&'a longhands::right::SpecifiedValue>;
38979                    let mut bottom =
38980                        None::<&'a longhands::bottom::SpecifiedValue>;
38981                    let mut left =
38982                        None::<&'a longhands::left::SpecifiedValue>;
38983
38984                // Attempt to assign the incoming declarations to the expected variables
38985                for declaration in iter {
38986                    match *declaration {
38987                            PropertyDeclaration::Top(ref value) => {
38988                                top = Some(value)
38989                            },
38990                            PropertyDeclaration::Right(ref value) => {
38991                                right = Some(value)
38992                            },
38993                            PropertyDeclaration::Bottom(ref value) => {
38994                                bottom = Some(value)
38995                            },
38996                            PropertyDeclaration::Left(ref value) => {
38997                                left = Some(value)
38998                            },
38999                        _ => {}
39000                    };
39001                }
39002
39003                // If any of the expected variables are missing, return an error
39004                match (
39005                        top,
39006                        right,
39007                        bottom,
39008                        left,
39009                ) {
39010
39011                    (
39012                        Some(top),
39013                        Some(right),
39014                        Some(bottom),
39015                        Some(left),
39016                    ) =>
39017                    Ok(LonghandsToSerialize {
39018                            top,
39019                            right,
39020                            bottom,
39021                            left,
39022                    }),
39023                    _ => Err(())
39024                }
39025            }
39026        }
39027
39028        /// Parse the given shorthand and fill the result into the
39029        /// `declarations` vector.
39030        pub fn parse_into<'i, 't>(
39031            declarations: &mut SourcePropertyDeclaration,
39032            context: &ParserContext,
39033            input: &mut Parser<'i, 't>,
39034        ) -> Result<(), ParseError<'i>> {
39035            #[allow(unused_imports)]
39036            use crate::properties::{NonCustomPropertyId, LonghandId};
39037            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
39038                    declarations.push(PropertyDeclaration::Top(
39039                        longhands.top
39040                    ));
39041                    declarations.push(PropertyDeclaration::Right(
39042                        longhands.right
39043                    ));
39044                    declarations.push(PropertyDeclaration::Bottom(
39045                        longhands.bottom
39046                    ));
39047                    declarations.push(PropertyDeclaration::Left(
39048                        longhands.left
39049                    ));
39050            })
39051        }
39052
39053        /// Try to serialize a given shorthand to a string.
39054        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
39055            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
39056                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
39057                Err(_) => Ok(())
39058            }
39059        }
39060
39061        
39062        #[allow(unused_imports)]
39063        use crate::parser::Parse;
39064        use crate::values::generics::rect::Rect;
39065        #[allow(unused_imports)]
39066        use crate::values::specified;
39067
39068        fn parse_value<'i, 't>(
39069            context: &ParserContext,
39070            input: &mut Parser<'i, 't>,
39071        ) -> Result<Longhands, ParseError<'i>> {
39072            let rect = Rect::parse_with(context, input, |c, i| -> Result<
39073                crate::properties::longhands::top::SpecifiedValue,
39074                ParseError<'i>
39075            > {
39076                specified::Inset::parse(c, i)
39077            })?;
39078            Ok(expanded! {
39079                    top: rect.0,
39080                    right: rect.1,
39081                    bottom: rect.2,
39082                    left: rect.3,
39083            })
39084        }
39085
39086        impl<'a> ToCss for LonghandsToSerialize<'a> {
39087            fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
39088            where
39089                W: Write,
39090            {
39091                let rect = Rect::new(
39092                    &self.top,
39093                    &self.right,
39094                    &self.bottom,
39095                    &self.left,
39096                );
39097                rect.to_css(dest)
39098            }
39099        }
39100    
39101    }
39102
39103
39104
39105
39106
39107
39108    /// https://drafts.csswg.org/css-logical/#propdef-inset-block
39109    pub mod inset_block {
39110        use cssparser::Parser;
39111        use crate::parser::ParserContext;
39112        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
39113        #[allow(unused_imports)]
39114        use selectors::parser::SelectorParseErrorKind;
39115        #[allow(unused_imports)]
39116        use std::fmt::{self, Write};
39117        #[allow(unused_imports)]
39118        use style_traits::{ParseError, StyleParseErrorKind};
39119        #[allow(unused_imports)]
39120        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
39121
39122        #[derive(SpecifiedValueInfo)]
39123        pub struct Longhands {
39124                pub inset_block_start:
39125                    longhands::inset_block_start::SpecifiedValue
39126                    ,
39127                pub inset_block_end:
39128                    longhands::inset_block_end::SpecifiedValue
39129                    ,
39130        }
39131
39132        /// Represents a serializable set of all of the longhand properties that
39133        /// correspond to a shorthand.
39134        pub struct LonghandsToSerialize<'a> {
39135                pub inset_block_start:
39136                    &'a longhands::inset_block_start::SpecifiedValue,
39137                pub inset_block_end:
39138                    &'a longhands::inset_block_end::SpecifiedValue,
39139        }
39140
39141        impl<'a> LonghandsToSerialize<'a> {
39142            /// Tries to get a serializable set of longhands given a set of
39143            /// property declarations.
39144            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
39145                // Define all of the expected variables that correspond to the shorthand
39146                    let mut inset_block_start =
39147                        None::<&'a longhands::inset_block_start::SpecifiedValue>;
39148                    let mut inset_block_end =
39149                        None::<&'a longhands::inset_block_end::SpecifiedValue>;
39150
39151                // Attempt to assign the incoming declarations to the expected variables
39152                for declaration in iter {
39153                    match *declaration {
39154                            PropertyDeclaration::InsetBlockStart(ref value) => {
39155                                inset_block_start = Some(value)
39156                            },
39157                            PropertyDeclaration::InsetBlockEnd(ref value) => {
39158                                inset_block_end = Some(value)
39159                            },
39160                        _ => {}
39161                    };
39162                }
39163
39164                // If any of the expected variables are missing, return an error
39165                match (
39166                        inset_block_start,
39167                        inset_block_end,
39168                ) {
39169
39170                    (
39171                        Some(inset_block_start),
39172                        Some(inset_block_end),
39173                    ) =>
39174                    Ok(LonghandsToSerialize {
39175                            inset_block_start,
39176                            inset_block_end,
39177                    }),
39178                    _ => Err(())
39179                }
39180            }
39181        }
39182
39183        /// Parse the given shorthand and fill the result into the
39184        /// `declarations` vector.
39185        pub fn parse_into<'i, 't>(
39186            declarations: &mut SourcePropertyDeclaration,
39187            context: &ParserContext,
39188            input: &mut Parser<'i, 't>,
39189        ) -> Result<(), ParseError<'i>> {
39190            #[allow(unused_imports)]
39191            use crate::properties::{NonCustomPropertyId, LonghandId};
39192            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
39193                    declarations.push(PropertyDeclaration::InsetBlockStart(
39194                        longhands.inset_block_start
39195                    ));
39196                    declarations.push(PropertyDeclaration::InsetBlockEnd(
39197                        longhands.inset_block_end
39198                    ));
39199            })
39200        }
39201
39202        /// Try to serialize a given shorthand to a string.
39203        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
39204            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
39205                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
39206                Err(_) => Ok(())
39207            }
39208        }
39209
39210        
39211    #[allow(unused_imports)]
39212    use crate::parser::Parse;
39213    #[allow(unused_imports)]
39214    use crate::values::specified;
39215
39216    fn parse_value<'i, 't>(
39217        context: &ParserContext,
39218        input: &mut Parser<'i, 't>,
39219    ) -> Result<Longhands, ParseError<'i>> {
39220        let parse_one = |c: &ParserContext, input: &mut Parser<'i, 't>| -> Result<
39221            crate::properties::longhands::inset_block_start::SpecifiedValue,
39222            ParseError<'i>
39223        > {
39224            specified::Inset::parse(c, input)
39225        };
39226
39227        let first = parse_one(context, input)?;
39228        let second =
39229            input.try_parse(|input| parse_one(context, input)).unwrap_or_else(|_| first.clone());
39230        Ok(expanded! {
39231            inset_block_start: first,
39232            inset_block_end: second,
39233        })
39234    }
39235
39236    impl<'a> ToCss for LonghandsToSerialize<'a>  {
39237        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
39238            let first = &self.inset_block_start;
39239            let second = &self.inset_block_end;
39240
39241            first.to_css(dest)?;
39242            if first != second {
39243                dest.write_char(' ')?;
39244                second.to_css(dest)?;
39245            }
39246            Ok(())
39247        }
39248    }
39249
39250    }
39251
39252
39253
39254
39255
39256
39257    /// https://drafts.csswg.org/css-logical/#propdef-inset-inline
39258    pub mod inset_inline {
39259        use cssparser::Parser;
39260        use crate::parser::ParserContext;
39261        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
39262        #[allow(unused_imports)]
39263        use selectors::parser::SelectorParseErrorKind;
39264        #[allow(unused_imports)]
39265        use std::fmt::{self, Write};
39266        #[allow(unused_imports)]
39267        use style_traits::{ParseError, StyleParseErrorKind};
39268        #[allow(unused_imports)]
39269        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
39270
39271        #[derive(SpecifiedValueInfo)]
39272        pub struct Longhands {
39273                pub inset_inline_start:
39274                    longhands::inset_inline_start::SpecifiedValue
39275                    ,
39276                pub inset_inline_end:
39277                    longhands::inset_inline_end::SpecifiedValue
39278                    ,
39279        }
39280
39281        /// Represents a serializable set of all of the longhand properties that
39282        /// correspond to a shorthand.
39283        pub struct LonghandsToSerialize<'a> {
39284                pub inset_inline_start:
39285                    &'a longhands::inset_inline_start::SpecifiedValue,
39286                pub inset_inline_end:
39287                    &'a longhands::inset_inline_end::SpecifiedValue,
39288        }
39289
39290        impl<'a> LonghandsToSerialize<'a> {
39291            /// Tries to get a serializable set of longhands given a set of
39292            /// property declarations.
39293            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
39294                // Define all of the expected variables that correspond to the shorthand
39295                    let mut inset_inline_start =
39296                        None::<&'a longhands::inset_inline_start::SpecifiedValue>;
39297                    let mut inset_inline_end =
39298                        None::<&'a longhands::inset_inline_end::SpecifiedValue>;
39299
39300                // Attempt to assign the incoming declarations to the expected variables
39301                for declaration in iter {
39302                    match *declaration {
39303                            PropertyDeclaration::InsetInlineStart(ref value) => {
39304                                inset_inline_start = Some(value)
39305                            },
39306                            PropertyDeclaration::InsetInlineEnd(ref value) => {
39307                                inset_inline_end = Some(value)
39308                            },
39309                        _ => {}
39310                    };
39311                }
39312
39313                // If any of the expected variables are missing, return an error
39314                match (
39315                        inset_inline_start,
39316                        inset_inline_end,
39317                ) {
39318
39319                    (
39320                        Some(inset_inline_start),
39321                        Some(inset_inline_end),
39322                    ) =>
39323                    Ok(LonghandsToSerialize {
39324                            inset_inline_start,
39325                            inset_inline_end,
39326                    }),
39327                    _ => Err(())
39328                }
39329            }
39330        }
39331
39332        /// Parse the given shorthand and fill the result into the
39333        /// `declarations` vector.
39334        pub fn parse_into<'i, 't>(
39335            declarations: &mut SourcePropertyDeclaration,
39336            context: &ParserContext,
39337            input: &mut Parser<'i, 't>,
39338        ) -> Result<(), ParseError<'i>> {
39339            #[allow(unused_imports)]
39340            use crate::properties::{NonCustomPropertyId, LonghandId};
39341            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
39342                    declarations.push(PropertyDeclaration::InsetInlineStart(
39343                        longhands.inset_inline_start
39344                    ));
39345                    declarations.push(PropertyDeclaration::InsetInlineEnd(
39346                        longhands.inset_inline_end
39347                    ));
39348            })
39349        }
39350
39351        /// Try to serialize a given shorthand to a string.
39352        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
39353            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
39354                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
39355                Err(_) => Ok(())
39356            }
39357        }
39358
39359        
39360    #[allow(unused_imports)]
39361    use crate::parser::Parse;
39362    #[allow(unused_imports)]
39363    use crate::values::specified;
39364
39365    fn parse_value<'i, 't>(
39366        context: &ParserContext,
39367        input: &mut Parser<'i, 't>,
39368    ) -> Result<Longhands, ParseError<'i>> {
39369        let parse_one = |c: &ParserContext, input: &mut Parser<'i, 't>| -> Result<
39370            crate::properties::longhands::inset_inline_start::SpecifiedValue,
39371            ParseError<'i>
39372        > {
39373            specified::Inset::parse(c, input)
39374        };
39375
39376        let first = parse_one(context, input)?;
39377        let second =
39378            input.try_parse(|input| parse_one(context, input)).unwrap_or_else(|_| first.clone());
39379        Ok(expanded! {
39380            inset_inline_start: first,
39381            inset_inline_end: second,
39382        })
39383    }
39384
39385    impl<'a> ToCss for LonghandsToSerialize<'a>  {
39386        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
39387            let first = &self.inset_inline_start;
39388            let second = &self.inset_inline_end;
39389
39390            first.to_css(dest)?;
39391            if first != second {
39392                dest.write_char(' ')?;
39393                second.to_css(dest)?;
39394            }
39395            Ok(())
39396        }
39397    }
39398
39399    }
39400
39401
39402
39403
39404
39405
39406
39407
39408
39409    /* This Source Code Form is subject to the terms of the Mozilla Public
39410 * License, v. 2.0. If a copy of the MPL was not distributed with this
39411 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
39412
39413
39414
39415
39416
39417
39418
39419
39420
39421
39422
39423    /* This Source Code Form is subject to the terms of the Mozilla Public
39424 * License, v. 2.0. If a copy of the MPL was not distributed with this
39425 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
39426
39427    /* This Source Code Form is subject to the terms of the Mozilla Public
39428 * License, v. 2.0. If a copy of the MPL was not distributed with this
39429 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
39430
39431
39432
39433
39434
39435    /// https://drafts.csswg.org/css-text-decor/#propdef-text-decoration
39436    pub mod text_decoration {
39437        use cssparser::Parser;
39438        use crate::parser::ParserContext;
39439        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
39440        #[allow(unused_imports)]
39441        use selectors::parser::SelectorParseErrorKind;
39442        #[allow(unused_imports)]
39443        use std::fmt::{self, Write};
39444        #[allow(unused_imports)]
39445        use style_traits::{ParseError, StyleParseErrorKind};
39446        #[allow(unused_imports)]
39447        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
39448
39449        #[derive(SpecifiedValueInfo)]
39450        pub struct Longhands {
39451                pub text_decoration_color:
39452                    longhands::text_decoration_color::SpecifiedValue
39453                    ,
39454                pub text_decoration_line:
39455                    longhands::text_decoration_line::SpecifiedValue
39456                    ,
39457                pub text_decoration_style:
39458                    longhands::text_decoration_style::SpecifiedValue
39459                    ,
39460        }
39461
39462        /// Represents a serializable set of all of the longhand properties that
39463        /// correspond to a shorthand.
39464        pub struct LonghandsToSerialize<'a> {
39465                pub text_decoration_color:
39466                    &'a longhands::text_decoration_color::SpecifiedValue,
39467                pub text_decoration_line:
39468                    &'a longhands::text_decoration_line::SpecifiedValue,
39469                pub text_decoration_style:
39470                    &'a longhands::text_decoration_style::SpecifiedValue,
39471        }
39472
39473        impl<'a> LonghandsToSerialize<'a> {
39474            /// Tries to get a serializable set of longhands given a set of
39475            /// property declarations.
39476            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
39477                // Define all of the expected variables that correspond to the shorthand
39478                    let mut text_decoration_color =
39479                        None::<&'a longhands::text_decoration_color::SpecifiedValue>;
39480                    let mut text_decoration_line =
39481                        None::<&'a longhands::text_decoration_line::SpecifiedValue>;
39482                    let mut text_decoration_style =
39483                        None::<&'a longhands::text_decoration_style::SpecifiedValue>;
39484
39485                // Attempt to assign the incoming declarations to the expected variables
39486                for declaration in iter {
39487                    match *declaration {
39488                            PropertyDeclaration::TextDecorationColor(ref value) => {
39489                                text_decoration_color = Some(value)
39490                            },
39491                            PropertyDeclaration::TextDecorationLine(ref value) => {
39492                                text_decoration_line = Some(value)
39493                            },
39494                            PropertyDeclaration::TextDecorationStyle(ref value) => {
39495                                text_decoration_style = Some(value)
39496                            },
39497                        _ => {}
39498                    };
39499                }
39500
39501                // If any of the expected variables are missing, return an error
39502                match (
39503                        text_decoration_color,
39504                        text_decoration_line,
39505                        text_decoration_style,
39506                ) {
39507
39508                    (
39509                        Some(text_decoration_color),
39510                        Some(text_decoration_line),
39511                        Some(text_decoration_style),
39512                    ) =>
39513                    Ok(LonghandsToSerialize {
39514                            text_decoration_color,
39515                            text_decoration_line,
39516                            text_decoration_style,
39517                    }),
39518                    _ => Err(())
39519                }
39520            }
39521        }
39522
39523        /// Parse the given shorthand and fill the result into the
39524        /// `declarations` vector.
39525        pub fn parse_into<'i, 't>(
39526            declarations: &mut SourcePropertyDeclaration,
39527            context: &ParserContext,
39528            input: &mut Parser<'i, 't>,
39529        ) -> Result<(), ParseError<'i>> {
39530            #[allow(unused_imports)]
39531            use crate::properties::{NonCustomPropertyId, LonghandId};
39532            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
39533                    declarations.push(PropertyDeclaration::TextDecorationColor(
39534                        longhands.text_decoration_color
39535                    ));
39536                    declarations.push(PropertyDeclaration::TextDecorationLine(
39537                        longhands.text_decoration_line
39538                    ));
39539                    declarations.push(PropertyDeclaration::TextDecorationStyle(
39540                        longhands.text_decoration_style
39541                    ));
39542            })
39543        }
39544
39545        /// Try to serialize a given shorthand to a string.
39546        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
39547            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
39548                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
39549                Err(_) => Ok(())
39550            }
39551        }
39552
39553        
39554    use crate::properties::longhands::{text_decoration_color, text_decoration_line, text_decoration_style};
39555
39556
39557    pub fn parse_value<'i, 't>(
39558        context: &ParserContext,
39559        input: &mut Parser<'i, 't>,
39560    ) -> Result<Longhands, ParseError<'i>> {
39561        let (mut line, mut style, mut color, mut any) = (None, None, None, false);
39562
39563        loop {
39564            macro_rules! parse_component {
39565                ($value:ident, $module:ident) => (
39566                    if $value.is_none() {
39567                        if let Ok(value) = input.try_parse(|input| $module::parse(context, input)) {
39568                            $value = Some(value);
39569                            any = true;
39570                            continue;
39571                        }
39572                    }
39573                )
39574            }
39575
39576            parse_component!(line, text_decoration_line);
39577            parse_component!(style, text_decoration_style);
39578            parse_component!(color, text_decoration_color);
39579
39580
39581            break;
39582        }
39583
39584        if !any {
39585            return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
39586        }
39587
39588        Ok(expanded! {
39589            text_decoration_line: unwrap_or_initial!(text_decoration_line, line),
39590            text_decoration_style: unwrap_or_initial!(text_decoration_style, style),
39591            text_decoration_color: unwrap_or_initial!(text_decoration_color, color),
39592
39593        })
39594    }
39595
39596    impl<'a> ToCss for LonghandsToSerialize<'a>  {
39597        #[allow(unused)]
39598        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
39599            use crate::values::specified::TextDecorationLine;
39600            use crate::values::specified::Color;
39601
39602            let (is_solid_style, is_current_color) =
39603            (
39604                *self.text_decoration_style == text_decoration_style::SpecifiedValue::Solid,
39605                *self.text_decoration_color == Color::CurrentColor,
39606            );
39607
39608                let is_auto_thickness = true;
39609
39610
39611            let mut has_value = false;
39612            let is_none = *self.text_decoration_line == TextDecorationLine::none();
39613            if (is_solid_style && is_current_color && is_auto_thickness) || !is_none {
39614                self.text_decoration_line.to_css(dest)?;
39615                has_value = true;
39616            }
39617
39618
39619            if !is_solid_style {
39620                if has_value {
39621                    dest.write_char(' ')?;
39622                }
39623                self.text_decoration_style.to_css(dest)?;
39624                has_value = true;
39625            }
39626
39627            if !is_current_color {
39628                if has_value {
39629                    dest.write_char(' ')?;
39630                }
39631                self.text_decoration_color.to_css(dest)?;
39632                has_value = true;
39633            }
39634
39635            Ok(())
39636        }
39637    }
39638
39639    }
39640
39641
39642    /* This Source Code Form is subject to the terms of the Mozilla Public
39643 * License, v. 2.0. If a copy of the MPL was not distributed with this
39644 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
39645
39646
39647
39648macro_rules! try_parse_one {
39649    ($context: expr, $input: expr, $var: ident, $prop_module: ident) => {
39650        if $var.is_none() {
39651            if let Ok(value) = $input.try_parse(|i| {
39652                $prop_module::single_value::parse($context, i)
39653            }) {
39654                $var = Some(value);
39655                continue;
39656            }
39657        }
39658    };
39659}
39660
39661
39662
39663    /// https://drafts.csswg.org/css-transitions/#propdef-transition
39664    pub mod transition {
39665        use cssparser::Parser;
39666        use crate::parser::ParserContext;
39667        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
39668        #[allow(unused_imports)]
39669        use selectors::parser::SelectorParseErrorKind;
39670        #[allow(unused_imports)]
39671        use std::fmt::{self, Write};
39672        #[allow(unused_imports)]
39673        use style_traits::{ParseError, StyleParseErrorKind};
39674        #[allow(unused_imports)]
39675        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
39676
39677        #[derive(SpecifiedValueInfo)]
39678        pub struct Longhands {
39679                pub transition_property:
39680                    longhands::transition_property::SpecifiedValue
39681                    ,
39682                pub transition_duration:
39683                    longhands::transition_duration::SpecifiedValue
39684                    ,
39685                pub transition_timing_function:
39686                    longhands::transition_timing_function::SpecifiedValue
39687                    ,
39688                pub transition_delay:
39689                    longhands::transition_delay::SpecifiedValue
39690                    ,
39691                pub transition_behavior:
39692                    longhands::transition_behavior::SpecifiedValue
39693                    ,
39694        }
39695
39696        /// Represents a serializable set of all of the longhand properties that
39697        /// correspond to a shorthand.
39698        pub struct LonghandsToSerialize<'a> {
39699                pub transition_property:
39700                    &'a longhands::transition_property::SpecifiedValue,
39701                pub transition_duration:
39702                    &'a longhands::transition_duration::SpecifiedValue,
39703                pub transition_timing_function:
39704                    &'a longhands::transition_timing_function::SpecifiedValue,
39705                pub transition_delay:
39706                    &'a longhands::transition_delay::SpecifiedValue,
39707                pub transition_behavior:
39708                    &'a longhands::transition_behavior::SpecifiedValue,
39709        }
39710
39711        impl<'a> LonghandsToSerialize<'a> {
39712            /// Tries to get a serializable set of longhands given a set of
39713            /// property declarations.
39714            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
39715                // Define all of the expected variables that correspond to the shorthand
39716                    let mut transition_property =
39717                        None::<&'a longhands::transition_property::SpecifiedValue>;
39718                    let mut transition_duration =
39719                        None::<&'a longhands::transition_duration::SpecifiedValue>;
39720                    let mut transition_timing_function =
39721                        None::<&'a longhands::transition_timing_function::SpecifiedValue>;
39722                    let mut transition_delay =
39723                        None::<&'a longhands::transition_delay::SpecifiedValue>;
39724                    let mut transition_behavior =
39725                        None::<&'a longhands::transition_behavior::SpecifiedValue>;
39726
39727                // Attempt to assign the incoming declarations to the expected variables
39728                for declaration in iter {
39729                    match *declaration {
39730                            PropertyDeclaration::TransitionProperty(ref value) => {
39731                                transition_property = Some(value)
39732                            },
39733                            PropertyDeclaration::TransitionDuration(ref value) => {
39734                                transition_duration = Some(value)
39735                            },
39736                            PropertyDeclaration::TransitionTimingFunction(ref value) => {
39737                                transition_timing_function = Some(value)
39738                            },
39739                            PropertyDeclaration::TransitionDelay(ref value) => {
39740                                transition_delay = Some(value)
39741                            },
39742                            PropertyDeclaration::TransitionBehavior(ref value) => {
39743                                transition_behavior = Some(value)
39744                            },
39745                        _ => {}
39746                    };
39747                }
39748
39749                // If any of the expected variables are missing, return an error
39750                match (
39751                        transition_property,
39752                        transition_duration,
39753                        transition_timing_function,
39754                        transition_delay,
39755                        transition_behavior,
39756                ) {
39757
39758                    (
39759                        Some(transition_property),
39760                        Some(transition_duration),
39761                        Some(transition_timing_function),
39762                        Some(transition_delay),
39763                        Some(transition_behavior),
39764                    ) =>
39765                    Ok(LonghandsToSerialize {
39766                            transition_property,
39767                            transition_duration,
39768                            transition_timing_function,
39769                            transition_delay,
39770                            transition_behavior,
39771                    }),
39772                    _ => Err(())
39773                }
39774            }
39775        }
39776
39777        /// Parse the given shorthand and fill the result into the
39778        /// `declarations` vector.
39779        pub fn parse_into<'i, 't>(
39780            declarations: &mut SourcePropertyDeclaration,
39781            context: &ParserContext,
39782            input: &mut Parser<'i, 't>,
39783        ) -> Result<(), ParseError<'i>> {
39784            #[allow(unused_imports)]
39785            use crate::properties::{NonCustomPropertyId, LonghandId};
39786            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
39787                    declarations.push(PropertyDeclaration::TransitionProperty(
39788                        longhands.transition_property
39789                    ));
39790                    declarations.push(PropertyDeclaration::TransitionDuration(
39791                        longhands.transition_duration
39792                    ));
39793                    declarations.push(PropertyDeclaration::TransitionTimingFunction(
39794                        longhands.transition_timing_function
39795                    ));
39796                    declarations.push(PropertyDeclaration::TransitionDelay(
39797                        longhands.transition_delay
39798                    ));
39799                    declarations.push(PropertyDeclaration::TransitionBehavior(
39800                        longhands.transition_behavior
39801                    ));
39802            })
39803        }
39804
39805        /// Try to serialize a given shorthand to a string.
39806        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
39807            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
39808                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
39809                Err(_) => Ok(())
39810            }
39811        }
39812
39813        
39814    use crate::parser::Parse;
39815    use crate::properties::longhands::transition_delay;
39816    use crate::properties::longhands::transition_duration;
39817    use crate::properties::longhands::transition_property;
39818    use crate::properties::longhands::transition_timing_function;
39819    use crate::properties::longhands::transition_behavior;
39820    use crate::values::specified::TransitionProperty;
39821
39822    pub fn parse_value<'i, 't>(
39823        context: &ParserContext,
39824        input: &mut Parser<'i, 't>,
39825    ) -> Result<Longhands, ParseError<'i>> {
39826        struct SingleTransition {
39827            transition_property: transition_property::SingleSpecifiedValue,
39828            transition_duration: transition_duration::SingleSpecifiedValue,
39829            transition_timing_function: transition_timing_function::SingleSpecifiedValue,
39830            transition_delay: transition_delay::SingleSpecifiedValue,
39831            transition_behavior: transition_behavior::SingleSpecifiedValue,
39832        }
39833
39834        fn parse_one_transition<'i, 't>(
39835            context: &ParserContext,
39836            input: &mut Parser<'i, 't>,
39837            first: bool,
39838        ) -> Result<SingleTransition,ParseError<'i>> {
39839            let mut property = None;
39840            let mut duration = None;
39841            let mut timing_function = None;
39842            let mut delay = None;
39843            let mut behavior = None;
39844
39845            let mut parsed = 0;
39846            loop {
39847                parsed += 1;
39848
39849                try_parse_one!(context, input, duration, transition_duration);
39850                try_parse_one!(context, input, timing_function, transition_timing_function);
39851                try_parse_one!(context, input, delay, transition_delay);
39852                try_parse_one!(context, input, behavior, transition_behavior);
39853                // Must check 'transition-property' after 'transition-timing-function' since
39854                // 'transition-property' accepts any keyword.
39855                if property.is_none() {
39856                    if let Ok(value) = input.try_parse(|i| TransitionProperty::parse(context, i)) {
39857                        property = Some(value);
39858                        continue;
39859                    }
39860
39861                    // 'none' is not a valid value for <single-transition-property>,
39862                    // so it's only acceptable as the first item.
39863                    if first && input.try_parse(|i| i.expect_ident_matching("none")).is_ok() {
39864                        property = Some(TransitionProperty::none());
39865                        continue;
39866                    }
39867                }
39868
39869                parsed -= 1;
39870                break
39871            }
39872
39873            if parsed != 0 {
39874                Ok(SingleTransition {
39875                    transition_property: property.unwrap_or_else(transition_property::single_value
39876                                                                                 ::get_initial_specified_value),
39877                    transition_duration: duration.unwrap_or_else(transition_duration::single_value
39878                                                                                 ::get_initial_specified_value),
39879                    transition_timing_function: timing_function.unwrap_or_else(transition_timing_function::single_value
39880                                                                                 ::get_initial_specified_value),
39881                    transition_delay: delay.unwrap_or_else(transition_delay::single_value
39882                                                                                 ::get_initial_specified_value),
39883                    transition_behavior: behavior.unwrap_or_else(transition_behavior::single_value
39884                                                                                 ::get_initial_specified_value),
39885                })
39886            } else {
39887                Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
39888            }
39889        }
39890
39891        let mut propertys = Vec::new();
39892        let mut durations = Vec::new();
39893        let mut timing_functions = Vec::new();
39894        let mut delays = Vec::new();
39895        let mut behaviors = Vec::new();
39896
39897        let mut first = true;
39898        let mut has_transition_property_none = false;
39899        let results = input.parse_comma_separated(|i| {
39900            if has_transition_property_none {
39901                // If you specify transition-property: none, multiple items are invalid.
39902                return Err(i.new_custom_error(StyleParseErrorKind::UnspecifiedError))
39903            }
39904            let transition = parse_one_transition(context, i, first)?;
39905            first = false;
39906            has_transition_property_none = transition.transition_property.is_none();
39907            Ok(transition)
39908        })?;
39909        for result in results {
39910            propertys.push(result.transition_property);
39911            durations.push(result.transition_duration);
39912            timing_functions.push(result.transition_timing_function);
39913            delays.push(result.transition_delay);
39914            behaviors.push(result.transition_behavior);
39915        }
39916
39917        Ok(expanded! {
39918            transition_property: transition_property::SpecifiedValue(propertys.into()),
39919            transition_duration: transition_duration::SpecifiedValue(durations.into()),
39920            transition_timing_function: transition_timing_function::SpecifiedValue(timing_functions.into()),
39921            transition_delay: transition_delay::SpecifiedValue(delays.into()),
39922            transition_behavior: transition_behavior::SpecifiedValue(behaviors.into()),
39923        })
39924    }
39925
39926    impl<'a> ToCss for LonghandsToSerialize<'a>  {
39927        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
39928            use crate::Zero;
39929            use style_traits::values::SequenceWriter;
39930
39931            let property_len = self.transition_property.0.len();
39932
39933            // There are two cases that we can do shorthand serialization:
39934            // * when all value lists have the same length, or
39935            // * when transition-property is none, and other value lists have exactly one item.
39936            if property_len == 0 {
39937                    if self.transition_duration.0.len() != 1 {
39938                        return Ok(());
39939                    }
39940                    if self.transition_delay.0.len() != 1 {
39941                        return Ok(());
39942                    }
39943                    if self.transition_timing_function.0.len() != 1 {
39944                        return Ok(());
39945                    }
39946
39947                if self.transition_behavior.0.len() != 1 {
39948                    return Ok(());
39949                }
39950            } else {
39951                    if self.transition_duration.0.len() != property_len {
39952                        return Ok(());
39953                    }
39954                    if self.transition_delay.0.len() != property_len {
39955                        return Ok(());
39956                    }
39957                    if self.transition_timing_function.0.len() != property_len {
39958                        return Ok(());
39959                    }
39960
39961                if self.transition_behavior.0.len() != property_len {
39962                    return Ok(());
39963                }
39964            }
39965
39966            // Representative length.
39967            let len = self.transition_duration.0.len();
39968
39969            for i in 0..len {
39970                if i != 0 {
39971                    dest.write_str(", ")?;
39972                }
39973
39974                let has_duration = !self.transition_duration.0[i].is_zero();
39975                let has_timing = !self.transition_timing_function.0[i].is_ease();
39976                let has_delay = !self.transition_delay.0[i].is_zero();
39977                let has_behavior = !self.transition_behavior.0[i].is_normal();
39978                let has_any = has_duration || has_timing || has_delay || has_behavior;
39979
39980                let mut writer = SequenceWriter::new(dest, " ");
39981
39982                if property_len == 0 {
39983                    writer.raw_item("none")?;
39984                } else if !self.transition_property.0[i].is_all() || !has_any {
39985                    writer.item(&self.transition_property.0[i])?;
39986                }
39987
39988                // In order to avoid ambiguity, we have to serialize duration if we have delay.
39989                if has_duration || has_delay {
39990                    writer.item(&self.transition_duration.0[i])?;
39991                }
39992
39993                if has_timing {
39994                    writer.item(&self.transition_timing_function.0[i])?;
39995                }
39996
39997                if has_delay {
39998                    writer.item(&self.transition_delay.0[i])?;
39999                }
40000
40001                if has_behavior {
40002                    writer.item(&self.transition_behavior.0[i])?;
40003                }
40004            }
40005            Ok(())
40006        }
40007    }
40008
40009    }
40010
40011
40012
40013
40014    /// https://drafts.csswg.org/css-animations/#propdef-animation
40015    pub mod animation {
40016        use cssparser::Parser;
40017        use crate::parser::ParserContext;
40018        use crate::properties::{PropertyDeclaration, SourcePropertyDeclaration, MaybeBoxed, longhands};
40019        #[allow(unused_imports)]
40020        use selectors::parser::SelectorParseErrorKind;
40021        #[allow(unused_imports)]
40022        use std::fmt::{self, Write};
40023        #[allow(unused_imports)]
40024        use style_traits::{ParseError, StyleParseErrorKind};
40025        #[allow(unused_imports)]
40026        use style_traits::{CssWriter, KeywordsCollectFn, SpecifiedValueInfo, ToCss};
40027
40028        #[derive(SpecifiedValueInfo)]
40029        pub struct Longhands {
40030                pub animation_name:
40031                    longhands::animation_name::SpecifiedValue
40032                    ,
40033                pub animation_duration:
40034                    longhands::animation_duration::SpecifiedValue
40035                    ,
40036                pub animation_timing_function:
40037                    longhands::animation_timing_function::SpecifiedValue
40038                    ,
40039                pub animation_delay:
40040                    longhands::animation_delay::SpecifiedValue
40041                    ,
40042                pub animation_iteration_count:
40043                    longhands::animation_iteration_count::SpecifiedValue
40044                    ,
40045                pub animation_direction:
40046                    longhands::animation_direction::SpecifiedValue
40047                    ,
40048                pub animation_fill_mode:
40049                    longhands::animation_fill_mode::SpecifiedValue
40050                    ,
40051                pub animation_play_state:
40052                    longhands::animation_play_state::SpecifiedValue
40053                    ,
40054                pub animation_timeline:
40055                    longhands::animation_timeline::SpecifiedValue
40056                    ,
40057        }
40058
40059        /// Represents a serializable set of all of the longhand properties that
40060        /// correspond to a shorthand.
40061        pub struct LonghandsToSerialize<'a> {
40062                pub animation_name:
40063                    &'a longhands::animation_name::SpecifiedValue,
40064                pub animation_duration:
40065                    &'a longhands::animation_duration::SpecifiedValue,
40066                pub animation_timing_function:
40067                    &'a longhands::animation_timing_function::SpecifiedValue,
40068                pub animation_delay:
40069                    &'a longhands::animation_delay::SpecifiedValue,
40070                pub animation_iteration_count:
40071                    &'a longhands::animation_iteration_count::SpecifiedValue,
40072                pub animation_direction:
40073                    &'a longhands::animation_direction::SpecifiedValue,
40074                pub animation_fill_mode:
40075                    &'a longhands::animation_fill_mode::SpecifiedValue,
40076                pub animation_play_state:
40077                    &'a longhands::animation_play_state::SpecifiedValue,
40078                pub animation_timeline:
40079                    Option<
40080                    &'a longhands::animation_timeline::SpecifiedValue,
40081                    >,
40082        }
40083
40084        impl<'a> LonghandsToSerialize<'a> {
40085            /// Tries to get a serializable set of longhands given a set of
40086            /// property declarations.
40087            pub fn from_iter(iter: impl Iterator<Item = &'a PropertyDeclaration>) -> Result<Self, ()> {
40088                // Define all of the expected variables that correspond to the shorthand
40089                    let mut animation_name =
40090                        None::<&'a longhands::animation_name::SpecifiedValue>;
40091                    let mut animation_duration =
40092                        None::<&'a longhands::animation_duration::SpecifiedValue>;
40093                    let mut animation_timing_function =
40094                        None::<&'a longhands::animation_timing_function::SpecifiedValue>;
40095                    let mut animation_delay =
40096                        None::<&'a longhands::animation_delay::SpecifiedValue>;
40097                    let mut animation_iteration_count =
40098                        None::<&'a longhands::animation_iteration_count::SpecifiedValue>;
40099                    let mut animation_direction =
40100                        None::<&'a longhands::animation_direction::SpecifiedValue>;
40101                    let mut animation_fill_mode =
40102                        None::<&'a longhands::animation_fill_mode::SpecifiedValue>;
40103                    let mut animation_play_state =
40104                        None::<&'a longhands::animation_play_state::SpecifiedValue>;
40105                    let mut animation_timeline =
40106                        None::<&'a longhands::animation_timeline::SpecifiedValue>;
40107
40108                // Attempt to assign the incoming declarations to the expected variables
40109                for declaration in iter {
40110                    match *declaration {
40111                            PropertyDeclaration::AnimationName(ref value) => {
40112                                animation_name = Some(value)
40113                            },
40114                            PropertyDeclaration::AnimationDuration(ref value) => {
40115                                animation_duration = Some(value)
40116                            },
40117                            PropertyDeclaration::AnimationTimingFunction(ref value) => {
40118                                animation_timing_function = Some(value)
40119                            },
40120                            PropertyDeclaration::AnimationDelay(ref value) => {
40121                                animation_delay = Some(value)
40122                            },
40123                            PropertyDeclaration::AnimationIterationCount(ref value) => {
40124                                animation_iteration_count = Some(value)
40125                            },
40126                            PropertyDeclaration::AnimationDirection(ref value) => {
40127                                animation_direction = Some(value)
40128                            },
40129                            PropertyDeclaration::AnimationFillMode(ref value) => {
40130                                animation_fill_mode = Some(value)
40131                            },
40132                            PropertyDeclaration::AnimationPlayState(ref value) => {
40133                                animation_play_state = Some(value)
40134                            },
40135                            PropertyDeclaration::AnimationTimeline(ref value) => {
40136                                animation_timeline = Some(value)
40137                            },
40138                        _ => {}
40139                    };
40140                }
40141
40142                // If any of the expected variables are missing, return an error
40143                match (
40144                        animation_name,
40145                        animation_duration,
40146                        animation_timing_function,
40147                        animation_delay,
40148                        animation_iteration_count,
40149                        animation_direction,
40150                        animation_fill_mode,
40151                        animation_play_state,
40152                        animation_timeline,
40153                ) {
40154
40155                    (
40156                        Some(animation_name),
40157                        Some(animation_duration),
40158                        Some(animation_timing_function),
40159                        Some(animation_delay),
40160                        Some(animation_iteration_count),
40161                        Some(animation_direction),
40162                        Some(animation_fill_mode),
40163                        Some(animation_play_state),
40164                        animation_timeline,
40165                    ) =>
40166                    Ok(LonghandsToSerialize {
40167                            animation_name,
40168                            animation_duration,
40169                            animation_timing_function,
40170                            animation_delay,
40171                            animation_iteration_count,
40172                            animation_direction,
40173                            animation_fill_mode,
40174                            animation_play_state,
40175                            animation_timeline,
40176                    }),
40177                    _ => Err(())
40178                }
40179            }
40180        }
40181
40182        /// Parse the given shorthand and fill the result into the
40183        /// `declarations` vector.
40184        pub fn parse_into<'i, 't>(
40185            declarations: &mut SourcePropertyDeclaration,
40186            context: &ParserContext,
40187            input: &mut Parser<'i, 't>,
40188        ) -> Result<(), ParseError<'i>> {
40189            #[allow(unused_imports)]
40190            use crate::properties::{NonCustomPropertyId, LonghandId};
40191            input.parse_entirely(|input| parse_value(context, input)).map(|longhands| {
40192                    declarations.push(PropertyDeclaration::AnimationName(
40193                        longhands.animation_name
40194                    ));
40195                    declarations.push(PropertyDeclaration::AnimationDuration(
40196                        longhands.animation_duration
40197                    ));
40198                    declarations.push(PropertyDeclaration::AnimationTimingFunction(
40199                        longhands.animation_timing_function
40200                    ));
40201                    declarations.push(PropertyDeclaration::AnimationDelay(
40202                        longhands.animation_delay
40203                    ));
40204                    declarations.push(PropertyDeclaration::AnimationIterationCount(
40205                        longhands.animation_iteration_count
40206                    ));
40207                    declarations.push(PropertyDeclaration::AnimationDirection(
40208                        longhands.animation_direction
40209                    ));
40210                    declarations.push(PropertyDeclaration::AnimationFillMode(
40211                        longhands.animation_fill_mode
40212                    ));
40213                    declarations.push(PropertyDeclaration::AnimationPlayState(
40214                        longhands.animation_play_state
40215                    ));
40216                if NonCustomPropertyId::from(LonghandId::AnimationTimeline)
40217                    .allowed_in_ignoring_rule_type(context) {
40218                    declarations.push(PropertyDeclaration::AnimationTimeline(
40219                        longhands.animation_timeline
40220                    ));
40221                }
40222            })
40223        }
40224
40225        /// Try to serialize a given shorthand to a string.
40226        pub fn to_css(declarations: &[&PropertyDeclaration], dest: &mut crate::str::CssStringWriter) -> fmt::Result {
40227            match LonghandsToSerialize::from_iter(declarations.iter().cloned()) {
40228                Ok(longhands) => longhands.to_css(&mut CssWriter::new(dest)),
40229                Err(_) => Ok(())
40230            }
40231        }
40232
40233        
40234    
40235    use crate::properties::longhands::animation_name;
40236    use crate::properties::longhands::animation_duration;
40237    use crate::properties::longhands::animation_timing_function;
40238    use crate::properties::longhands::animation_delay;
40239    use crate::properties::longhands::animation_iteration_count;
40240    use crate::properties::longhands::animation_direction;
40241    use crate::properties::longhands::animation_fill_mode;
40242    use crate::properties::longhands::animation_play_state;
40243    use crate::properties::longhands::animation_timeline;
40244
40245    pub fn parse_value<'i, 't>(
40246        context: &ParserContext,
40247        input: &mut Parser<'i, 't>,
40248    ) -> Result<Longhands, ParseError<'i>> {
40249        struct SingleAnimation {
40250            animation_name: animation_name::SingleSpecifiedValue,
40251            animation_duration: animation_duration::SingleSpecifiedValue,
40252            animation_timing_function: animation_timing_function::SingleSpecifiedValue,
40253            animation_delay: animation_delay::SingleSpecifiedValue,
40254            animation_iteration_count: animation_iteration_count::SingleSpecifiedValue,
40255            animation_direction: animation_direction::SingleSpecifiedValue,
40256            animation_fill_mode: animation_fill_mode::SingleSpecifiedValue,
40257            animation_play_state: animation_play_state::SingleSpecifiedValue,
40258        }
40259
40260        fn parse_one_animation<'i, 't>(
40261            context: &ParserContext,
40262            input: &mut Parser<'i, 't>,
40263        ) -> Result<SingleAnimation, ParseError<'i>> {
40264            let mut name = None;
40265            let mut duration = None;
40266            let mut timing_function = None;
40267            let mut delay = None;
40268            let mut iteration_count = None;
40269            let mut direction = None;
40270            let mut fill_mode = None;
40271            let mut play_state = None;
40272
40273            let mut parsed = 0;
40274            // NB: Name must be the last one here so that keywords valid for other
40275            // longhands are not interpreted as names.
40276            //
40277            // Also, duration must be before delay, see
40278            // https://drafts.csswg.org/css-animations/#typedef-single-animation
40279            loop {
40280                parsed += 1;
40281                try_parse_one!(context, input, duration, animation_duration);
40282                try_parse_one!(context, input, timing_function, animation_timing_function);
40283                try_parse_one!(context, input, delay, animation_delay);
40284                try_parse_one!(context, input, iteration_count, animation_iteration_count);
40285                try_parse_one!(context, input, direction, animation_direction);
40286                try_parse_one!(context, input, fill_mode, animation_fill_mode);
40287                try_parse_one!(context, input, play_state, animation_play_state);
40288                try_parse_one!(context, input, name, animation_name);
40289
40290                // Note: per spec issue discussion, all animation longhands not defined in
40291                // Animations 1 are defined as reset-only sub-properties for now.
40292                // https://github.com/w3c/csswg-drafts/issues/6946#issuecomment-1233190360
40293                //
40294                // FIXME: Bug 1824261. We should revisit this when the spec gets updated with the
40295                // new syntax.
40296                // https://github.com/w3c/csswg-drafts/issues/6946
40297
40298                parsed -= 1;
40299                break
40300            }
40301
40302            // If nothing is parsed, this is an invalid entry.
40303            if parsed == 0 {
40304                Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
40305            } else {
40306                Ok(SingleAnimation {
40307                    animation_name: name.unwrap_or_else(animation_name::single_value
40308                                                              ::get_initial_specified_value),
40309                    animation_duration: duration.unwrap_or_else(animation_duration::single_value
40310                                                              ::get_initial_specified_value),
40311                    animation_timing_function: timing_function.unwrap_or_else(animation_timing_function::single_value
40312                                                              ::get_initial_specified_value),
40313                    animation_delay: delay.unwrap_or_else(animation_delay::single_value
40314                                                              ::get_initial_specified_value),
40315                    animation_iteration_count: iteration_count.unwrap_or_else(animation_iteration_count::single_value
40316                                                              ::get_initial_specified_value),
40317                    animation_direction: direction.unwrap_or_else(animation_direction::single_value
40318                                                              ::get_initial_specified_value),
40319                    animation_fill_mode: fill_mode.unwrap_or_else(animation_fill_mode::single_value
40320                                                              ::get_initial_specified_value),
40321                    animation_play_state: play_state.unwrap_or_else(animation_play_state::single_value
40322                                                              ::get_initial_specified_value),
40323                })
40324            }
40325        }
40326
40327        let mut names = vec![];
40328        let mut durations = vec![];
40329        let mut timing_functions = vec![];
40330        let mut delays = vec![];
40331        let mut iteration_counts = vec![];
40332        let mut directions = vec![];
40333        let mut fill_modes = vec![];
40334        let mut play_states = vec![];
40335
40336        let results = input.parse_comma_separated(|i| parse_one_animation(context, i))?;
40337        for result in results.into_iter() {
40338            names.push(result.animation_name);
40339            durations.push(result.animation_duration);
40340            timing_functions.push(result.animation_timing_function);
40341            delays.push(result.animation_delay);
40342            iteration_counts.push(result.animation_iteration_count);
40343            directions.push(result.animation_direction);
40344            fill_modes.push(result.animation_fill_mode);
40345            play_states.push(result.animation_play_state);
40346        }
40347
40348        Ok(expanded! {
40349            animation_name: animation_name::SpecifiedValue(names.into()),
40350            animation_duration: animation_duration::SpecifiedValue(durations.into()),
40351            animation_timing_function: animation_timing_function::SpecifiedValue(timing_functions.into()),
40352            animation_delay: animation_delay::SpecifiedValue(delays.into()),
40353            animation_iteration_count: animation_iteration_count::SpecifiedValue(iteration_counts.into()),
40354            animation_direction: animation_direction::SpecifiedValue(directions.into()),
40355            animation_fill_mode: animation_fill_mode::SpecifiedValue(fill_modes.into()),
40356            animation_play_state: animation_play_state::SpecifiedValue(play_states.into()),
40357            // FIXME: Bug 1824261. animation-timeline is reset-only for now.
40358            animation_timeline: animation_timeline::SpecifiedValue(
40359                vec![animation_timeline::single_value::get_initial_specified_value()].into()
40360            ),
40361        })
40362    }
40363
40364    impl<'a> ToCss for LonghandsToSerialize<'a>  {
40365        fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
40366            use crate::values::specified::easing::TimingFunction;
40367            use crate::values::specified::{
40368                AnimationDirection, AnimationFillMode, AnimationPlayState,
40369            };
40370            use crate::Zero;
40371            use style_traits::values::SequenceWriter;
40372
40373            let len = self.animation_name.0.len();
40374            // There should be at least one declared value
40375            if len == 0 {
40376                return Ok(());
40377            }
40378
40379            // If any value list length is differs then we don't do a shorthand serialization
40380            // either.
40381                if len != self.animation_duration.0.len() {
40382                    return Ok(())
40383                }
40384                if len != self.animation_timing_function.0.len() {
40385                    return Ok(())
40386                }
40387                if len != self.animation_delay.0.len() {
40388                    return Ok(())
40389                }
40390                if len != self.animation_iteration_count.0.len() {
40391                    return Ok(())
40392                }
40393                if len != self.animation_direction.0.len() {
40394                    return Ok(())
40395                }
40396                if len != self.animation_fill_mode.0.len() {
40397                    return Ok(())
40398                }
40399                if len != self.animation_play_state.0.len() {
40400                    return Ok(())
40401                }
40402
40403            // FIXME: Bug 1824261. We don't serialize this shorthand if the animation-timeline is
40404            // speficied, per the wpt update: https://github.com/web-platform-tests/wpt/pull/38848.
40405            if self.animation_timeline.map_or(false, |v| v.0.len() != 1 || !v.0[0].is_auto()) {
40406                return Ok(());
40407            }
40408
40409            for i in 0..len {
40410                if i != 0 {
40411                    dest.write_str(", ")?;
40412                }
40413
40414                // We follow the order of this syntax:
40415                // <single-animation> =
40416                //   <animation-duration> ||
40417                //   <easing-function> ||
40418                //   <animation-delay> ||
40419                //   <single-animation-iteration-count> ||
40420                //   <single-animation-direction> ||
40421                //   <single-animation-fill-mode> ||
40422                //   <single-animation-play-state> ||
40423                //   [ none | <keyframes-name> ] ||
40424                //   <single-animation-timeline>
40425                //
40426                // https://drafts.csswg.org/css-animations-2/#animation-shorthand
40427                //
40428                // Note: animation-timeline is not serialized for now because it is always the
40429                // initial value in this loop. Therefore, animation-duration is always resolved as
40430                // 0s if it is auto because animation-timeline is the initial value, i.e.
40431                // time-driven animations. In conclusion, we don't serialize animation-duration if
40432                // it is auto (for specified value) or if it is 0s (for resolved value).
40433                // https://drafts.csswg.org/css-animations-2/#animation-duration
40434                let has_duration = !self.animation_duration.0[i].is_auto()
40435                    && !self.animation_duration.0[i].is_zero();
40436                let has_timing_function = !self.animation_timing_function.0[i].is_ease();
40437                let has_delay = !self.animation_delay.0[i].is_zero();
40438                let has_iteration_count = !self.animation_iteration_count.0[i].is_one();
40439                let has_direction =
40440                    !matches!(self.animation_direction.0[i], AnimationDirection::Normal);
40441                let has_fill_mode =
40442                    !matches!(self.animation_fill_mode.0[i], AnimationFillMode::None);
40443                let has_play_state =
40444                    !matches!(self.animation_play_state.0[i], AnimationPlayState::Running);
40445                let animation_name = &self.animation_name.0[i];
40446                let has_name = !animation_name.is_none();
40447
40448                let mut writer = SequenceWriter::new(dest, " ");
40449
40450                // To avoid ambiguity, we have to serialize duration if duration is initial
40451                // but delay is not. (In other words, it's ambiguous if we serialize delay only.)
40452                if has_duration || has_delay {
40453                    writer.item(&self.animation_duration.0[i])?;
40454                }
40455
40456                if has_timing_function || TimingFunction::match_keywords(animation_name) {
40457                    writer.item(&self.animation_timing_function.0[i])?;
40458                }
40459
40460                // For animation-delay and animation-iteration-count.
40461                if has_delay {
40462                    writer.item(&self.animation_delay.0[i])?;
40463                }
40464                if has_iteration_count {
40465                    writer.item(&self.animation_iteration_count.0[i])?;
40466                }
40467
40468                if has_direction || AnimationDirection::match_keywords(animation_name) {
40469                    writer.item(&self.animation_direction.0[i])?;
40470                }
40471
40472                if has_fill_mode || AnimationFillMode::match_keywords(animation_name) {
40473                    writer.item(&self.animation_fill_mode.0[i])?;
40474                }
40475
40476                if has_play_state || AnimationPlayState::match_keywords(animation_name) {
40477                    writer.item(&self.animation_play_state.0[i])?;
40478                }
40479
40480                // If all values are initial, we must serialize animation-name.
40481                let has_any = {
40482                    has_duration
40483                        || has_timing_function
40484                        || has_delay
40485                        || has_iteration_count
40486                        || has_direction
40487                        || has_fill_mode
40488                        || has_play_state
40489                };
40490                if has_name || !has_any {
40491                    writer.item(animation_name)?;
40492                }
40493            }
40494            Ok(())
40495        }
40496    }
40497
40498    }
40499
40500
40501
40502
40503
40504
40505// Note: view-timeline shorthand doesn't take view-timeline-inset into account.
40506
40507
40508
40509
40510    /* This Source Code Form is subject to the terms of the Mozilla Public
40511 * License, v. 2.0. If a copy of the MPL was not distributed with this
40512 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
40513
40514
40515    // We didn't define the 'all' shorthand using the regular helpers:shorthand
40516    // mechanism, since it causes some very large types to be generated.
40517    //
40518    // Also, make sure logical properties appear before its physical
40519    // counter-parts, in order to prevent bugs like:
40520    //
40521    //   https://bugzilla.mozilla.org/show_bug.cgi?id=1410028
40522    //
40523    // FIXME(emilio): Adopt the resolution from:
40524    //
40525    //   https://github.com/w3c/csswg-drafts/issues/1898
40526    //
40527    // when there is one, whatever that is.
40528    
40529}
40530
40531
40532
40533// WARNING: It is *really* important for the variants of `LonghandId`
40534// and `PropertyDeclaration` to be defined in the exact same order,
40535// with the exception of `CSSWideKeyword`, `WithVariables` and `Custom`,
40536// which don't exist in `LonghandId`.
40537
40538
40539
40540/// Servo's representation for a property declaration.
40541#[derive(ToShmem)]
40542#[repr(u16)]
40543pub enum PropertyDeclaration {
40544    /// `align-content`
40545    AlignContent(crate::values::specified::AlignContent),
40546    /// `align-items`
40547    AlignItems(crate::values::specified::AlignItems),
40548    /// `align-self`
40549    AlignSelf(crate::values::specified::AlignSelf),
40550    /// `aspect-ratio`
40551    AspectRatio(crate::values::specified::AspectRatio),
40552    /// `backface-visibility`
40553    BackfaceVisibility(longhands::backface_visibility::SpecifiedValue),
40554    /// `baseline-source`
40555    BaselineSource(crate::values::specified::BaselineSource),
40556    /// `border-collapse`
40557    BorderCollapse(longhands::border_collapse::SpecifiedValue),
40558    /// `border-image-repeat`
40559    BorderImageRepeat(crate::values::specified::BorderImageRepeat),
40560    /// `box-sizing`
40561    BoxSizing(longhands::box_sizing::SpecifiedValue),
40562    /// `caption-side`
40563    CaptionSide(crate::values::specified::table::CaptionSide),
40564    /// `clear`
40565    Clear(crate::values::specified::Clear),
40566    /// `column-count`
40567    ColumnCount(crate::values::specified::ColumnCount),
40568    /// `column-span`
40569    ColumnSpan(longhands::column_span::SpecifiedValue),
40570    /// `contain`
40571    Contain(crate::values::specified::Contain),
40572    /// `container-type`
40573    ContainerType(crate::values::specified::ContainerType),
40574    /// `direction`
40575    Direction(longhands::direction::SpecifiedValue),
40576    /// `display`
40577    Display(crate::values::specified::Display),
40578    /// `empty-cells`
40579    EmptyCells(longhands::empty_cells::SpecifiedValue),
40580    /// `flex-direction`
40581    FlexDirection(longhands::flex_direction::SpecifiedValue),
40582    /// `flex-wrap`
40583    FlexWrap(longhands::flex_wrap::SpecifiedValue),
40584    /// `float`
40585    Float(crate::values::specified::Float),
40586    /// `font-language-override`
40587    FontLanguageOverride(crate::values::specified::FontLanguageOverride),
40588    /// `font-stretch`
40589    FontStretch(crate::values::specified::FontStretch),
40590    /// `font-style`
40591    FontStyle(crate::values::specified::FontStyle),
40592    /// `font-variant-caps`
40593    FontVariantCaps(longhands::font_variant_caps::SpecifiedValue),
40594    /// `font-weight`
40595    FontWeight(crate::values::specified::FontWeight),
40596    /// `grid-auto-flow`
40597    GridAutoFlow(crate::values::specified::GridAutoFlow),
40598    /// `image-rendering`
40599    ImageRendering(crate::values::specified::ImageRendering),
40600    /// `isolation`
40601    Isolation(longhands::isolation::SpecifiedValue),
40602    /// `justify-content`
40603    JustifyContent(crate::values::specified::JustifyContent),
40604    /// `justify-items`
40605    JustifyItems(crate::values::specified::JustifyItems),
40606    /// `justify-self`
40607    JustifySelf(crate::values::specified::JustifySelf),
40608    /// `list-style-position`
40609    ListStylePosition(longhands::list_style_position::SpecifiedValue),
40610    /// `list-style-type`
40611    ListStyleType(longhands::list_style_type::SpecifiedValue),
40612    /// `mix-blend-mode`
40613    MixBlendMode(longhands::mix_blend_mode::SpecifiedValue),
40614    /// `object-fit`
40615    ObjectFit(longhands::object_fit::SpecifiedValue),
40616    /// `opacity`
40617    Opacity(crate::values::specified::Opacity),
40618    /// `order`
40619    Order(crate::values::specified::Integer),
40620    /// `outline-style`
40621    OutlineStyle(crate::values::specified::OutlineStyle),
40622    /// `overflow-wrap`
40623    OverflowWrap(crate::values::specified::OverflowWrap),
40624    /// `pointer-events`
40625    PointerEvents(crate::values::specified::PointerEvents),
40626    /// `position`
40627    Position(crate::values::specified::PositionProperty),
40628    /// `-servo-overflow-clip-box`
40629    ServoOverflowClipBox(longhands::_servo_overflow_clip_box::SpecifiedValue),
40630    /// `-servo-top-layer`
40631    ServoTopLayer(longhands::_servo_top_layer::SpecifiedValue),
40632    /// `table-layout`
40633    TableLayout(longhands::table_layout::SpecifiedValue),
40634    /// `text-align`
40635    TextAlign(crate::values::specified::TextAlign),
40636    /// `text-align-last`
40637    TextAlignLast(crate::values::specified::TextAlignLast),
40638    /// `text-decoration-line`
40639    TextDecorationLine(crate::values::specified::TextDecorationLine),
40640    /// `text-decoration-style`
40641    TextDecorationStyle(longhands::text_decoration_style::SpecifiedValue),
40642    /// `text-justify`
40643    TextJustify(crate::values::specified::TextJustify),
40644    /// `text-rendering`
40645    TextRendering(longhands::text_rendering::SpecifiedValue),
40646    /// `text-transform`
40647    TextTransform(crate::values::specified::TextTransform),
40648    /// `text-wrap-mode`
40649    TextWrapMode(longhands::text_wrap_mode::SpecifiedValue),
40650    /// `transform-style`
40651    TransformStyle(crate::values::specified::TransformStyle),
40652    /// `unicode-bidi`
40653    UnicodeBidi(longhands::unicode_bidi::SpecifiedValue),
40654    /// `visibility`
40655    Visibility(longhands::visibility::SpecifiedValue),
40656    /// `white-space-collapse`
40657    WhiteSpaceCollapse(longhands::white_space_collapse::SpecifiedValue),
40658    /// `word-break`
40659    WordBreak(crate::values::specified::WordBreak),
40660    /// `writing-mode`
40661    WritingMode(crate::values::specified::WritingModeProperty),
40662    /// `z-index`
40663    ZIndex(crate::values::specified::ZIndex),
40664    /// `zoom`
40665    Zoom(crate::values::specified::Zoom),
40666    /// `flex-grow`
40667    FlexGrow(crate::values::specified::NonNegativeNumber),
40668    /// `flex-shrink`
40669    FlexShrink(crate::values::specified::NonNegativeNumber),
40670    /// `overflow-block`
40671    OverflowBlock(crate::values::specified::Overflow),
40672    /// `overflow-inline`
40673    OverflowInline(crate::values::specified::Overflow),
40674    /// `overflow-x`
40675    OverflowX(crate::values::specified::Overflow),
40676    /// `overflow-y`
40677    OverflowY(crate::values::specified::Overflow),
40678    /// `border-block-end-style`
40679    BorderBlockEndStyle(crate::values::specified::BorderStyle),
40680    /// `border-block-start-style`
40681    BorderBlockStartStyle(crate::values::specified::BorderStyle),
40682    /// `border-bottom-style`
40683    BorderBottomStyle(crate::values::specified::BorderStyle),
40684    /// `border-inline-end-style`
40685    BorderInlineEndStyle(crate::values::specified::BorderStyle),
40686    /// `border-inline-start-style`
40687    BorderInlineStartStyle(crate::values::specified::BorderStyle),
40688    /// `border-left-style`
40689    BorderLeftStyle(crate::values::specified::BorderStyle),
40690    /// `border-right-style`
40691    BorderRightStyle(crate::values::specified::BorderStyle),
40692    /// `border-top-style`
40693    BorderTopStyle(crate::values::specified::BorderStyle),
40694    /// `animation-composition`
40695    AnimationComposition(longhands::animation_composition::SpecifiedValue),
40696    /// `animation-delay`
40697    AnimationDelay(longhands::animation_delay::SpecifiedValue),
40698    /// `animation-direction`
40699    AnimationDirection(longhands::animation_direction::SpecifiedValue),
40700    /// `animation-duration`
40701    AnimationDuration(longhands::animation_duration::SpecifiedValue),
40702    /// `animation-fill-mode`
40703    AnimationFillMode(longhands::animation_fill_mode::SpecifiedValue),
40704    /// `animation-iteration-count`
40705    AnimationIterationCount(longhands::animation_iteration_count::SpecifiedValue),
40706    /// `animation-name`
40707    AnimationName(longhands::animation_name::SpecifiedValue),
40708    /// `animation-play-state`
40709    AnimationPlayState(longhands::animation_play_state::SpecifiedValue),
40710    /// `animation-timeline`
40711    AnimationTimeline(longhands::animation_timeline::SpecifiedValue),
40712    /// `animation-timing-function`
40713    AnimationTimingFunction(longhands::animation_timing_function::SpecifiedValue),
40714    /// `backdrop-filter`
40715    BackdropFilter(longhands::backdrop_filter::SpecifiedValue),
40716    /// `background-attachment`
40717    BackgroundAttachment(longhands::background_attachment::SpecifiedValue),
40718    /// `background-clip`
40719    BackgroundClip(longhands::background_clip::SpecifiedValue),
40720    /// `background-image`
40721    BackgroundImage(longhands::background_image::SpecifiedValue),
40722    /// `background-origin`
40723    BackgroundOrigin(longhands::background_origin::SpecifiedValue),
40724    /// `background-position-x`
40725    BackgroundPositionX(longhands::background_position_x::SpecifiedValue),
40726    /// `background-position-y`
40727    BackgroundPositionY(longhands::background_position_y::SpecifiedValue),
40728    /// `background-repeat`
40729    BackgroundRepeat(longhands::background_repeat::SpecifiedValue),
40730    /// `background-size`
40731    BackgroundSize(longhands::background_size::SpecifiedValue),
40732    /// `border-image-outset`
40733    BorderImageOutset(Box<crate::values::specified::NonNegativeLengthOrNumberRect>),
40734    /// `border-image-slice`
40735    BorderImageSlice(Box<crate::values::specified::BorderImageSlice>),
40736    /// `border-image-width`
40737    BorderImageWidth(Box<crate::values::specified::BorderImageWidth>),
40738    /// `border-spacing`
40739    BorderSpacing(Box<crate::values::specified::BorderSpacing>),
40740    /// `box-shadow`
40741    BoxShadow(longhands::box_shadow::SpecifiedValue),
40742    /// `clip`
40743    Clip(Box<crate::values::specified::ClipRectOrAuto>),
40744    /// `clip-path`
40745    ClipPath(crate::values::specified::basic_shape::ClipPath),
40746    /// `color`
40747    Color(crate::values::specified::ColorPropertyValue),
40748    /// `color-scheme`
40749    ColorScheme(crate::values::specified::ColorScheme),
40750    /// `column-width`
40751    ColumnWidth(crate::values::specified::length::NonNegativeLengthOrAuto),
40752    /// `container-name`
40753    ContainerName(crate::values::specified::ContainerName),
40754    /// `content`
40755    Content(crate::values::specified::Content),
40756    /// `counter-increment`
40757    CounterIncrement(crate::values::specified::CounterIncrement),
40758    /// `counter-reset`
40759    CounterReset(crate::values::specified::CounterReset),
40760    /// `cursor`
40761    Cursor(crate::values::specified::Cursor),
40762    /// `filter`
40763    Filter(longhands::filter::SpecifiedValue),
40764    /// `flex-basis`
40765    FlexBasis(Box<crate::values::specified::FlexBasis>),
40766    /// `font-family`
40767    FontFamily(crate::values::specified::FontFamily),
40768    /// `font-size`
40769    FontSize(crate::values::specified::FontSize),
40770    /// `font-variation-settings`
40771    FontVariationSettings(crate::values::specified::FontVariationSettings),
40772    /// `grid-template-areas`
40773    GridTemplateAreas(crate::values::specified::GridTemplateAreas),
40774    /// `letter-spacing`
40775    LetterSpacing(crate::values::specified::LetterSpacing),
40776    /// `line-height`
40777    LineHeight(crate::values::specified::LineHeight),
40778    /// `mask-image`
40779    MaskImage(longhands::mask_image::SpecifiedValue),
40780    /// `offset-path`
40781    OffsetPath(crate::values::specified::OffsetPath),
40782    /// `perspective`
40783    Perspective(crate::values::specified::Perspective),
40784    /// `quotes`
40785    Quotes(crate::values::specified::Quotes),
40786    /// `rotate`
40787    Rotate(Box<crate::values::specified::Rotate>),
40788    /// `scale`
40789    Scale(Box<crate::values::specified::Scale>),
40790    /// `text-indent`
40791    TextIndent(crate::values::specified::TextIndent),
40792    /// `text-overflow`
40793    TextOverflow(Box<crate::values::specified::TextOverflow>),
40794    /// `text-shadow`
40795    TextShadow(longhands::text_shadow::SpecifiedValue),
40796    /// `transform`
40797    Transform(crate::values::specified::Transform),
40798    /// `transform-origin`
40799    TransformOrigin(Box<crate::values::specified::TransformOrigin>),
40800    /// `transition-behavior`
40801    TransitionBehavior(longhands::transition_behavior::SpecifiedValue),
40802    /// `transition-delay`
40803    TransitionDelay(longhands::transition_delay::SpecifiedValue),
40804    /// `transition-duration`
40805    TransitionDuration(longhands::transition_duration::SpecifiedValue),
40806    /// `transition-property`
40807    TransitionProperty(longhands::transition_property::SpecifiedValue),
40808    /// `transition-timing-function`
40809    TransitionTimingFunction(longhands::transition_timing_function::SpecifiedValue),
40810    /// `translate`
40811    Translate(Box<crate::values::specified::Translate>),
40812    /// `vertical-align`
40813    VerticalAlign(crate::values::specified::VerticalAlign),
40814    /// `view-transition-class`
40815    ViewTransitionClass(crate::values::specified::ViewTransitionClass),
40816    /// `view-transition-name`
40817    ViewTransitionName(crate::values::specified::ViewTransitionName),
40818    /// `will-change`
40819    WillChange(crate::values::specified::WillChange),
40820    /// `word-spacing`
40821    WordSpacing(crate::values::specified::WordSpacing),
40822    /// `-x-lang`
40823    XLang(crate::values::specified::XLang),
40824    /// `object-position`
40825    ObjectPosition(Box<crate::values::specified::Position>),
40826    /// `perspective-origin`
40827    PerspectiveOrigin(Box<crate::values::specified::Position>),
40828    /// `grid-template-columns`
40829    GridTemplateColumns(crate::values::specified::GridTemplateComponent),
40830    /// `grid-template-rows`
40831    GridTemplateRows(crate::values::specified::GridTemplateComponent),
40832    /// `border-image-source`
40833    BorderImageSource(crate::values::specified::Image),
40834    /// `list-style-image`
40835    ListStyleImage(crate::values::specified::Image),
40836    /// `grid-auto-columns`
40837    GridAutoColumns(crate::values::specified::ImplicitGridTracks),
40838    /// `grid-auto-rows`
40839    GridAutoRows(crate::values::specified::ImplicitGridTracks),
40840    /// `outline-offset`
40841    OutlineOffset(crate::values::specified::Length),
40842    /// `overflow-clip-margin`
40843    OverflowClipMargin(crate::values::specified::Length),
40844    /// `column-gap`
40845    ColumnGap(crate::values::specified::length::NonNegativeLengthPercentageOrNormal),
40846    /// `row-gap`
40847    RowGap(crate::values::specified::length::NonNegativeLengthPercentageOrNormal),
40848    /// `grid-column-end`
40849    GridColumnEnd(crate::values::specified::GridLine),
40850    /// `grid-column-start`
40851    GridColumnStart(crate::values::specified::GridLine),
40852    /// `grid-row-end`
40853    GridRowEnd(crate::values::specified::GridLine),
40854    /// `grid-row-start`
40855    GridRowStart(crate::values::specified::GridLine),
40856    /// `max-block-size`
40857    MaxBlockSize(crate::values::specified::MaxSize),
40858    /// `max-height`
40859    MaxHeight(crate::values::specified::MaxSize),
40860    /// `max-inline-size`
40861    MaxInlineSize(crate::values::specified::MaxSize),
40862    /// `max-width`
40863    MaxWidth(crate::values::specified::MaxSize),
40864    /// `border-bottom-left-radius`
40865    BorderBottomLeftRadius(Box<crate::values::specified::BorderCornerRadius>),
40866    /// `border-bottom-right-radius`
40867    BorderBottomRightRadius(Box<crate::values::specified::BorderCornerRadius>),
40868    /// `border-end-end-radius`
40869    BorderEndEndRadius(Box<crate::values::specified::BorderCornerRadius>),
40870    /// `border-end-start-radius`
40871    BorderEndStartRadius(Box<crate::values::specified::BorderCornerRadius>),
40872    /// `border-start-end-radius`
40873    BorderStartEndRadius(Box<crate::values::specified::BorderCornerRadius>),
40874    /// `border-start-start-radius`
40875    BorderStartStartRadius(Box<crate::values::specified::BorderCornerRadius>),
40876    /// `border-top-left-radius`
40877    BorderTopLeftRadius(Box<crate::values::specified::BorderCornerRadius>),
40878    /// `border-top-right-radius`
40879    BorderTopRightRadius(Box<crate::values::specified::BorderCornerRadius>),
40880    /// `bottom`
40881    Bottom(crate::values::specified::Inset),
40882    /// `inset-block-end`
40883    InsetBlockEnd(crate::values::specified::Inset),
40884    /// `inset-block-start`
40885    InsetBlockStart(crate::values::specified::Inset),
40886    /// `inset-inline-end`
40887    InsetInlineEnd(crate::values::specified::Inset),
40888    /// `inset-inline-start`
40889    InsetInlineStart(crate::values::specified::Inset),
40890    /// `left`
40891    Left(crate::values::specified::Inset),
40892    /// `right`
40893    Right(crate::values::specified::Inset),
40894    /// `top`
40895    Top(crate::values::specified::Inset),
40896    /// `margin-block-end`
40897    MarginBlockEnd(crate::values::specified::Margin),
40898    /// `margin-block-start`
40899    MarginBlockStart(crate::values::specified::Margin),
40900    /// `margin-bottom`
40901    MarginBottom(crate::values::specified::Margin),
40902    /// `margin-inline-end`
40903    MarginInlineEnd(crate::values::specified::Margin),
40904    /// `margin-inline-start`
40905    MarginInlineStart(crate::values::specified::Margin),
40906    /// `margin-left`
40907    MarginLeft(crate::values::specified::Margin),
40908    /// `margin-right`
40909    MarginRight(crate::values::specified::Margin),
40910    /// `margin-top`
40911    MarginTop(crate::values::specified::Margin),
40912    /// `padding-block-end`
40913    PaddingBlockEnd(crate::values::specified::NonNegativeLengthPercentage),
40914    /// `padding-block-start`
40915    PaddingBlockStart(crate::values::specified::NonNegativeLengthPercentage),
40916    /// `padding-bottom`
40917    PaddingBottom(crate::values::specified::NonNegativeLengthPercentage),
40918    /// `padding-inline-end`
40919    PaddingInlineEnd(crate::values::specified::NonNegativeLengthPercentage),
40920    /// `padding-inline-start`
40921    PaddingInlineStart(crate::values::specified::NonNegativeLengthPercentage),
40922    /// `padding-left`
40923    PaddingLeft(crate::values::specified::NonNegativeLengthPercentage),
40924    /// `padding-right`
40925    PaddingRight(crate::values::specified::NonNegativeLengthPercentage),
40926    /// `padding-top`
40927    PaddingTop(crate::values::specified::NonNegativeLengthPercentage),
40928    /// `block-size`
40929    BlockSize(crate::values::specified::Size),
40930    /// `height`
40931    Height(crate::values::specified::Size),
40932    /// `inline-size`
40933    InlineSize(crate::values::specified::Size),
40934    /// `min-block-size`
40935    MinBlockSize(crate::values::specified::Size),
40936    /// `min-height`
40937    MinHeight(crate::values::specified::Size),
40938    /// `min-inline-size`
40939    MinInlineSize(crate::values::specified::Size),
40940    /// `min-width`
40941    MinWidth(crate::values::specified::Size),
40942    /// `width`
40943    Width(crate::values::specified::Size),
40944    /// `border-block-end-width`
40945    BorderBlockEndWidth(crate::values::specified::BorderSideWidth),
40946    /// `border-block-start-width`
40947    BorderBlockStartWidth(crate::values::specified::BorderSideWidth),
40948    /// `border-bottom-width`
40949    BorderBottomWidth(crate::values::specified::BorderSideWidth),
40950    /// `border-inline-end-width`
40951    BorderInlineEndWidth(crate::values::specified::BorderSideWidth),
40952    /// `border-inline-start-width`
40953    BorderInlineStartWidth(crate::values::specified::BorderSideWidth),
40954    /// `border-left-width`
40955    BorderLeftWidth(crate::values::specified::BorderSideWidth),
40956    /// `border-right-width`
40957    BorderRightWidth(crate::values::specified::BorderSideWidth),
40958    /// `border-top-width`
40959    BorderTopWidth(crate::values::specified::BorderSideWidth),
40960    /// `outline-width`
40961    OutlineWidth(crate::values::specified::BorderSideWidth),
40962    /// `background-color`
40963    BackgroundColor(crate::values::specified::Color),
40964    /// `border-block-end-color`
40965    BorderBlockEndColor(crate::values::specified::Color),
40966    /// `border-block-start-color`
40967    BorderBlockStartColor(crate::values::specified::Color),
40968    /// `border-bottom-color`
40969    BorderBottomColor(crate::values::specified::Color),
40970    /// `border-inline-end-color`
40971    BorderInlineEndColor(crate::values::specified::Color),
40972    /// `border-inline-start-color`
40973    BorderInlineStartColor(crate::values::specified::Color),
40974    /// `border-left-color`
40975    BorderLeftColor(crate::values::specified::Color),
40976    /// `border-right-color`
40977    BorderRightColor(crate::values::specified::Color),
40978    /// `border-top-color`
40979    BorderTopColor(crate::values::specified::Color),
40980    /// `outline-color`
40981    OutlineColor(crate::values::specified::Color),
40982    /// `text-decoration-color`
40983    TextDecorationColor(crate::values::specified::Color),
40984    /// A CSS-wide keyword.
40985    CSSWideKeyword(WideKeywordDeclaration),
40986    /// An unparsed declaration.
40987    WithVariables(VariableDeclaration),
40988    /// A custom property declaration.
40989    Custom(CustomDeclaration),
40990}
40991
40992// There's one of these for each parsed declaration so it better be small.
40993size_of_test!(PropertyDeclaration, 32);
40994
40995#[repr(C)]
40996struct PropertyDeclarationVariantRepr<T> {
40997    tag: u16,
40998    value: T
40999}
41000
41001impl Clone for PropertyDeclaration {
41002    #[inline]
41003    fn clone(&self) -> Self {
41004        use self::PropertyDeclaration::*;
41005
41006        
41007
41008        let self_tag = unsafe {
41009            (*(self as *const _ as *const PropertyDeclarationVariantRepr<()>)).tag
41010        };
41011        if self_tag <= LonghandId::BorderTopStyle as u16 {
41012            #[derive(Clone, Copy)]
41013            #[repr(u16)]
41014            enum CopyVariants {
41015                _AlignContent(crate::values::specified::AlignContent),
41016                _AlignItems(crate::values::specified::AlignItems),
41017                _AlignSelf(crate::values::specified::AlignSelf),
41018                _AspectRatio(crate::values::specified::AspectRatio),
41019                _BackfaceVisibility(longhands::backface_visibility::SpecifiedValue),
41020                _BaselineSource(crate::values::specified::BaselineSource),
41021                _BorderCollapse(longhands::border_collapse::SpecifiedValue),
41022                _BorderImageRepeat(crate::values::specified::BorderImageRepeat),
41023                _BoxSizing(longhands::box_sizing::SpecifiedValue),
41024                _CaptionSide(crate::values::specified::table::CaptionSide),
41025                _Clear(crate::values::specified::Clear),
41026                _ColumnCount(crate::values::specified::ColumnCount),
41027                _ColumnSpan(longhands::column_span::SpecifiedValue),
41028                _Contain(crate::values::specified::Contain),
41029                _ContainerType(crate::values::specified::ContainerType),
41030                _Direction(longhands::direction::SpecifiedValue),
41031                _Display(crate::values::specified::Display),
41032                _EmptyCells(longhands::empty_cells::SpecifiedValue),
41033                _FlexDirection(longhands::flex_direction::SpecifiedValue),
41034                _FlexWrap(longhands::flex_wrap::SpecifiedValue),
41035                _Float(crate::values::specified::Float),
41036                _FontLanguageOverride(crate::values::specified::FontLanguageOverride),
41037                _FontStretch(crate::values::specified::FontStretch),
41038                _FontStyle(crate::values::specified::FontStyle),
41039                _FontVariantCaps(longhands::font_variant_caps::SpecifiedValue),
41040                _FontWeight(crate::values::specified::FontWeight),
41041                _GridAutoFlow(crate::values::specified::GridAutoFlow),
41042                _ImageRendering(crate::values::specified::ImageRendering),
41043                _Isolation(longhands::isolation::SpecifiedValue),
41044                _JustifyContent(crate::values::specified::JustifyContent),
41045                _JustifyItems(crate::values::specified::JustifyItems),
41046                _JustifySelf(crate::values::specified::JustifySelf),
41047                _ListStylePosition(longhands::list_style_position::SpecifiedValue),
41048                _ListStyleType(longhands::list_style_type::SpecifiedValue),
41049                _MixBlendMode(longhands::mix_blend_mode::SpecifiedValue),
41050                _ObjectFit(longhands::object_fit::SpecifiedValue),
41051                _Opacity(crate::values::specified::Opacity),
41052                _Order(crate::values::specified::Integer),
41053                _OutlineStyle(crate::values::specified::OutlineStyle),
41054                _OverflowWrap(crate::values::specified::OverflowWrap),
41055                _PointerEvents(crate::values::specified::PointerEvents),
41056                _Position(crate::values::specified::PositionProperty),
41057                _ServoOverflowClipBox(longhands::_servo_overflow_clip_box::SpecifiedValue),
41058                _ServoTopLayer(longhands::_servo_top_layer::SpecifiedValue),
41059                _TableLayout(longhands::table_layout::SpecifiedValue),
41060                _TextAlign(crate::values::specified::TextAlign),
41061                _TextAlignLast(crate::values::specified::TextAlignLast),
41062                _TextDecorationLine(crate::values::specified::TextDecorationLine),
41063                _TextDecorationStyle(longhands::text_decoration_style::SpecifiedValue),
41064                _TextJustify(crate::values::specified::TextJustify),
41065                _TextRendering(longhands::text_rendering::SpecifiedValue),
41066                _TextTransform(crate::values::specified::TextTransform),
41067                _TextWrapMode(longhands::text_wrap_mode::SpecifiedValue),
41068                _TransformStyle(crate::values::specified::TransformStyle),
41069                _UnicodeBidi(longhands::unicode_bidi::SpecifiedValue),
41070                _Visibility(longhands::visibility::SpecifiedValue),
41071                _WhiteSpaceCollapse(longhands::white_space_collapse::SpecifiedValue),
41072                _WordBreak(crate::values::specified::WordBreak),
41073                _WritingMode(crate::values::specified::WritingModeProperty),
41074                _ZIndex(crate::values::specified::ZIndex),
41075                _Zoom(crate::values::specified::Zoom),
41076                _FlexGrow(crate::values::specified::NonNegativeNumber),
41077                _FlexShrink(crate::values::specified::NonNegativeNumber),
41078                _OverflowBlock(crate::values::specified::Overflow),
41079                _OverflowInline(crate::values::specified::Overflow),
41080                _OverflowX(crate::values::specified::Overflow),
41081                _OverflowY(crate::values::specified::Overflow),
41082                _BorderBlockEndStyle(crate::values::specified::BorderStyle),
41083                _BorderBlockStartStyle(crate::values::specified::BorderStyle),
41084                _BorderBottomStyle(crate::values::specified::BorderStyle),
41085                _BorderInlineEndStyle(crate::values::specified::BorderStyle),
41086                _BorderInlineStartStyle(crate::values::specified::BorderStyle),
41087                _BorderLeftStyle(crate::values::specified::BorderStyle),
41088                _BorderRightStyle(crate::values::specified::BorderStyle),
41089                _BorderTopStyle(crate::values::specified::BorderStyle),
41090            }
41091
41092            unsafe {
41093                let mut out = mem::MaybeUninit::uninit();
41094                ptr::write(
41095                    out.as_mut_ptr() as *mut CopyVariants,
41096                    *(self as *const _ as *const CopyVariants),
41097                );
41098                return out.assume_init();
41099            }
41100        }
41101
41102        // This function ensures that all properties not handled above
41103        // do not have a specified value implements Copy. If you hit
41104        // compile error here, you may want to add the type name into
41105        // Longhand.specified_is_copy in data.py.
41106        fn _static_assert_others_are_not_copy() {
41107            struct Helper<T>(T);
41108            trait AssertCopy { fn assert() {} }
41109            trait AssertNotCopy { fn assert() {} }
41110            impl<T: Copy> AssertCopy for Helper<T> {}
41111            impl AssertNotCopy for Helper<Box<crate::values::specified::BorderCornerRadius>> {}
41112            Helper::<Box<crate::values::specified::BorderCornerRadius>>::assert();
41113            impl AssertNotCopy for Helper<Box<crate::values::specified::BorderImageSlice>> {}
41114            Helper::<Box<crate::values::specified::BorderImageSlice>>::assert();
41115            impl AssertNotCopy for Helper<Box<crate::values::specified::BorderImageWidth>> {}
41116            Helper::<Box<crate::values::specified::BorderImageWidth>>::assert();
41117            impl AssertNotCopy for Helper<Box<crate::values::specified::BorderSpacing>> {}
41118            Helper::<Box<crate::values::specified::BorderSpacing>>::assert();
41119            impl AssertNotCopy for Helper<Box<crate::values::specified::ClipRectOrAuto>> {}
41120            Helper::<Box<crate::values::specified::ClipRectOrAuto>>::assert();
41121            impl AssertNotCopy for Helper<Box<crate::values::specified::FlexBasis>> {}
41122            Helper::<Box<crate::values::specified::FlexBasis>>::assert();
41123            impl AssertNotCopy for Helper<Box<crate::values::specified::NonNegativeLengthOrNumberRect>> {}
41124            Helper::<Box<crate::values::specified::NonNegativeLengthOrNumberRect>>::assert();
41125            impl AssertNotCopy for Helper<Box<crate::values::specified::Position>> {}
41126            Helper::<Box<crate::values::specified::Position>>::assert();
41127            impl AssertNotCopy for Helper<Box<crate::values::specified::Rotate>> {}
41128            Helper::<Box<crate::values::specified::Rotate>>::assert();
41129            impl AssertNotCopy for Helper<Box<crate::values::specified::Scale>> {}
41130            Helper::<Box<crate::values::specified::Scale>>::assert();
41131            impl AssertNotCopy for Helper<Box<crate::values::specified::TextOverflow>> {}
41132            Helper::<Box<crate::values::specified::TextOverflow>>::assert();
41133            impl AssertNotCopy for Helper<Box<crate::values::specified::TransformOrigin>> {}
41134            Helper::<Box<crate::values::specified::TransformOrigin>>::assert();
41135            impl AssertNotCopy for Helper<Box<crate::values::specified::Translate>> {}
41136            Helper::<Box<crate::values::specified::Translate>>::assert();
41137            impl AssertNotCopy for Helper<CustomDeclaration> {}
41138            Helper::<CustomDeclaration>::assert();
41139            impl AssertNotCopy for Helper<VariableDeclaration> {}
41140            Helper::<VariableDeclaration>::assert();
41141            impl AssertNotCopy for Helper<WideKeywordDeclaration> {}
41142            Helper::<WideKeywordDeclaration>::assert();
41143            impl AssertNotCopy for Helper<crate::values::specified::BorderSideWidth> {}
41144            Helper::<crate::values::specified::BorderSideWidth>::assert();
41145            impl AssertNotCopy for Helper<crate::values::specified::Color> {}
41146            Helper::<crate::values::specified::Color>::assert();
41147            impl AssertNotCopy for Helper<crate::values::specified::ColorPropertyValue> {}
41148            Helper::<crate::values::specified::ColorPropertyValue>::assert();
41149            impl AssertNotCopy for Helper<crate::values::specified::ColorScheme> {}
41150            Helper::<crate::values::specified::ColorScheme>::assert();
41151            impl AssertNotCopy for Helper<crate::values::specified::ContainerName> {}
41152            Helper::<crate::values::specified::ContainerName>::assert();
41153            impl AssertNotCopy for Helper<crate::values::specified::Content> {}
41154            Helper::<crate::values::specified::Content>::assert();
41155            impl AssertNotCopy for Helper<crate::values::specified::CounterIncrement> {}
41156            Helper::<crate::values::specified::CounterIncrement>::assert();
41157            impl AssertNotCopy for Helper<crate::values::specified::CounterReset> {}
41158            Helper::<crate::values::specified::CounterReset>::assert();
41159            impl AssertNotCopy for Helper<crate::values::specified::Cursor> {}
41160            Helper::<crate::values::specified::Cursor>::assert();
41161            impl AssertNotCopy for Helper<crate::values::specified::FontFamily> {}
41162            Helper::<crate::values::specified::FontFamily>::assert();
41163            impl AssertNotCopy for Helper<crate::values::specified::FontSize> {}
41164            Helper::<crate::values::specified::FontSize>::assert();
41165            impl AssertNotCopy for Helper<crate::values::specified::FontVariationSettings> {}
41166            Helper::<crate::values::specified::FontVariationSettings>::assert();
41167            impl AssertNotCopy for Helper<crate::values::specified::GridLine> {}
41168            Helper::<crate::values::specified::GridLine>::assert();
41169            impl AssertNotCopy for Helper<crate::values::specified::GridTemplateAreas> {}
41170            Helper::<crate::values::specified::GridTemplateAreas>::assert();
41171            impl AssertNotCopy for Helper<crate::values::specified::GridTemplateComponent> {}
41172            Helper::<crate::values::specified::GridTemplateComponent>::assert();
41173            impl AssertNotCopy for Helper<crate::values::specified::Image> {}
41174            Helper::<crate::values::specified::Image>::assert();
41175            impl AssertNotCopy for Helper<crate::values::specified::ImplicitGridTracks> {}
41176            Helper::<crate::values::specified::ImplicitGridTracks>::assert();
41177            impl AssertNotCopy for Helper<crate::values::specified::Inset> {}
41178            Helper::<crate::values::specified::Inset>::assert();
41179            impl AssertNotCopy for Helper<crate::values::specified::Length> {}
41180            Helper::<crate::values::specified::Length>::assert();
41181            impl AssertNotCopy for Helper<crate::values::specified::LetterSpacing> {}
41182            Helper::<crate::values::specified::LetterSpacing>::assert();
41183            impl AssertNotCopy for Helper<crate::values::specified::LineHeight> {}
41184            Helper::<crate::values::specified::LineHeight>::assert();
41185            impl AssertNotCopy for Helper<crate::values::specified::Margin> {}
41186            Helper::<crate::values::specified::Margin>::assert();
41187            impl AssertNotCopy for Helper<crate::values::specified::MaxSize> {}
41188            Helper::<crate::values::specified::MaxSize>::assert();
41189            impl AssertNotCopy for Helper<crate::values::specified::NonNegativeLengthPercentage> {}
41190            Helper::<crate::values::specified::NonNegativeLengthPercentage>::assert();
41191            impl AssertNotCopy for Helper<crate::values::specified::OffsetPath> {}
41192            Helper::<crate::values::specified::OffsetPath>::assert();
41193            impl AssertNotCopy for Helper<crate::values::specified::Perspective> {}
41194            Helper::<crate::values::specified::Perspective>::assert();
41195            impl AssertNotCopy for Helper<crate::values::specified::Quotes> {}
41196            Helper::<crate::values::specified::Quotes>::assert();
41197            impl AssertNotCopy for Helper<crate::values::specified::Size> {}
41198            Helper::<crate::values::specified::Size>::assert();
41199            impl AssertNotCopy for Helper<crate::values::specified::TextIndent> {}
41200            Helper::<crate::values::specified::TextIndent>::assert();
41201            impl AssertNotCopy for Helper<crate::values::specified::Transform> {}
41202            Helper::<crate::values::specified::Transform>::assert();
41203            impl AssertNotCopy for Helper<crate::values::specified::VerticalAlign> {}
41204            Helper::<crate::values::specified::VerticalAlign>::assert();
41205            impl AssertNotCopy for Helper<crate::values::specified::ViewTransitionClass> {}
41206            Helper::<crate::values::specified::ViewTransitionClass>::assert();
41207            impl AssertNotCopy for Helper<crate::values::specified::ViewTransitionName> {}
41208            Helper::<crate::values::specified::ViewTransitionName>::assert();
41209            impl AssertNotCopy for Helper<crate::values::specified::WillChange> {}
41210            Helper::<crate::values::specified::WillChange>::assert();
41211            impl AssertNotCopy for Helper<crate::values::specified::WordSpacing> {}
41212            Helper::<crate::values::specified::WordSpacing>::assert();
41213            impl AssertNotCopy for Helper<crate::values::specified::XLang> {}
41214            Helper::<crate::values::specified::XLang>::assert();
41215            impl AssertNotCopy for Helper<crate::values::specified::basic_shape::ClipPath> {}
41216            Helper::<crate::values::specified::basic_shape::ClipPath>::assert();
41217            impl AssertNotCopy for Helper<crate::values::specified::length::NonNegativeLengthOrAuto> {}
41218            Helper::<crate::values::specified::length::NonNegativeLengthOrAuto>::assert();
41219            impl AssertNotCopy for Helper<crate::values::specified::length::NonNegativeLengthPercentageOrNormal> {}
41220            Helper::<crate::values::specified::length::NonNegativeLengthPercentageOrNormal>::assert();
41221            impl AssertNotCopy for Helper<longhands::animation_composition::SpecifiedValue> {}
41222            Helper::<longhands::animation_composition::SpecifiedValue>::assert();
41223            impl AssertNotCopy for Helper<longhands::animation_delay::SpecifiedValue> {}
41224            Helper::<longhands::animation_delay::SpecifiedValue>::assert();
41225            impl AssertNotCopy for Helper<longhands::animation_direction::SpecifiedValue> {}
41226            Helper::<longhands::animation_direction::SpecifiedValue>::assert();
41227            impl AssertNotCopy for Helper<longhands::animation_duration::SpecifiedValue> {}
41228            Helper::<longhands::animation_duration::SpecifiedValue>::assert();
41229            impl AssertNotCopy for Helper<longhands::animation_fill_mode::SpecifiedValue> {}
41230            Helper::<longhands::animation_fill_mode::SpecifiedValue>::assert();
41231            impl AssertNotCopy for Helper<longhands::animation_iteration_count::SpecifiedValue> {}
41232            Helper::<longhands::animation_iteration_count::SpecifiedValue>::assert();
41233            impl AssertNotCopy for Helper<longhands::animation_name::SpecifiedValue> {}
41234            Helper::<longhands::animation_name::SpecifiedValue>::assert();
41235            impl AssertNotCopy for Helper<longhands::animation_play_state::SpecifiedValue> {}
41236            Helper::<longhands::animation_play_state::SpecifiedValue>::assert();
41237            impl AssertNotCopy for Helper<longhands::animation_timeline::SpecifiedValue> {}
41238            Helper::<longhands::animation_timeline::SpecifiedValue>::assert();
41239            impl AssertNotCopy for Helper<longhands::animation_timing_function::SpecifiedValue> {}
41240            Helper::<longhands::animation_timing_function::SpecifiedValue>::assert();
41241            impl AssertNotCopy for Helper<longhands::backdrop_filter::SpecifiedValue> {}
41242            Helper::<longhands::backdrop_filter::SpecifiedValue>::assert();
41243            impl AssertNotCopy for Helper<longhands::background_attachment::SpecifiedValue> {}
41244            Helper::<longhands::background_attachment::SpecifiedValue>::assert();
41245            impl AssertNotCopy for Helper<longhands::background_clip::SpecifiedValue> {}
41246            Helper::<longhands::background_clip::SpecifiedValue>::assert();
41247            impl AssertNotCopy for Helper<longhands::background_image::SpecifiedValue> {}
41248            Helper::<longhands::background_image::SpecifiedValue>::assert();
41249            impl AssertNotCopy for Helper<longhands::background_origin::SpecifiedValue> {}
41250            Helper::<longhands::background_origin::SpecifiedValue>::assert();
41251            impl AssertNotCopy for Helper<longhands::background_position_x::SpecifiedValue> {}
41252            Helper::<longhands::background_position_x::SpecifiedValue>::assert();
41253            impl AssertNotCopy for Helper<longhands::background_position_y::SpecifiedValue> {}
41254            Helper::<longhands::background_position_y::SpecifiedValue>::assert();
41255            impl AssertNotCopy for Helper<longhands::background_repeat::SpecifiedValue> {}
41256            Helper::<longhands::background_repeat::SpecifiedValue>::assert();
41257            impl AssertNotCopy for Helper<longhands::background_size::SpecifiedValue> {}
41258            Helper::<longhands::background_size::SpecifiedValue>::assert();
41259            impl AssertNotCopy for Helper<longhands::box_shadow::SpecifiedValue> {}
41260            Helper::<longhands::box_shadow::SpecifiedValue>::assert();
41261            impl AssertNotCopy for Helper<longhands::filter::SpecifiedValue> {}
41262            Helper::<longhands::filter::SpecifiedValue>::assert();
41263            impl AssertNotCopy for Helper<longhands::mask_image::SpecifiedValue> {}
41264            Helper::<longhands::mask_image::SpecifiedValue>::assert();
41265            impl AssertNotCopy for Helper<longhands::text_shadow::SpecifiedValue> {}
41266            Helper::<longhands::text_shadow::SpecifiedValue>::assert();
41267            impl AssertNotCopy for Helper<longhands::transition_behavior::SpecifiedValue> {}
41268            Helper::<longhands::transition_behavior::SpecifiedValue>::assert();
41269            impl AssertNotCopy for Helper<longhands::transition_delay::SpecifiedValue> {}
41270            Helper::<longhands::transition_delay::SpecifiedValue>::assert();
41271            impl AssertNotCopy for Helper<longhands::transition_duration::SpecifiedValue> {}
41272            Helper::<longhands::transition_duration::SpecifiedValue>::assert();
41273            impl AssertNotCopy for Helper<longhands::transition_property::SpecifiedValue> {}
41274            Helper::<longhands::transition_property::SpecifiedValue>::assert();
41275            impl AssertNotCopy for Helper<longhands::transition_timing_function::SpecifiedValue> {}
41276            Helper::<longhands::transition_timing_function::SpecifiedValue>::assert();
41277        }
41278
41279        match *self {
41280            AlignContent(..) |
41281AlignItems(..) |
41282AlignSelf(..) |
41283AspectRatio(..) |
41284BackfaceVisibility(..) |
41285BaselineSource(..) |
41286BorderCollapse(..) |
41287BorderImageRepeat(..) |
41288BoxSizing(..) |
41289CaptionSide(..) |
41290Clear(..) |
41291ColumnCount(..) |
41292ColumnSpan(..) |
41293Contain(..) |
41294ContainerType(..) |
41295Direction(..) |
41296Display(..) |
41297EmptyCells(..) |
41298FlexDirection(..) |
41299FlexWrap(..) |
41300Float(..) |
41301FontLanguageOverride(..) |
41302FontStretch(..) |
41303FontStyle(..) |
41304FontVariantCaps(..) |
41305FontWeight(..) |
41306GridAutoFlow(..) |
41307ImageRendering(..) |
41308Isolation(..) |
41309JustifyContent(..) |
41310JustifyItems(..) |
41311JustifySelf(..) |
41312ListStylePosition(..) |
41313ListStyleType(..) |
41314MixBlendMode(..) |
41315ObjectFit(..) |
41316Opacity(..) |
41317Order(..) |
41318OutlineStyle(..) |
41319OverflowWrap(..) |
41320PointerEvents(..) |
41321Position(..) |
41322ServoOverflowClipBox(..) |
41323ServoTopLayer(..) |
41324TableLayout(..) |
41325TextAlign(..) |
41326TextAlignLast(..) |
41327TextDecorationLine(..) |
41328TextDecorationStyle(..) |
41329TextJustify(..) |
41330TextRendering(..) |
41331TextTransform(..) |
41332TextWrapMode(..) |
41333TransformStyle(..) |
41334UnicodeBidi(..) |
41335Visibility(..) |
41336WhiteSpaceCollapse(..) |
41337WordBreak(..) |
41338WritingMode(..) |
41339ZIndex(..) |
41340Zoom(..) |
41341FlexGrow(..) |
41342FlexShrink(..) |
41343OverflowBlock(..) |
41344OverflowInline(..) |
41345OverflowX(..) |
41346OverflowY(..) |
41347BorderBlockEndStyle(..) |
41348BorderBlockStartStyle(..) |
41349BorderBottomStyle(..) |
41350BorderInlineEndStyle(..) |
41351BorderInlineStartStyle(..) |
41352BorderLeftStyle(..) |
41353BorderRightStyle(..) |
41354BorderTopStyle(..) => {
41355                unsafe { debug_unreachable!() }
41356            }
41357            
41358            AnimationComposition(ref value) => {
41359                AnimationComposition(value.clone())
41360            }
41361            
41362            AnimationDelay(ref value) => {
41363                AnimationDelay(value.clone())
41364            }
41365            
41366            AnimationDirection(ref value) => {
41367                AnimationDirection(value.clone())
41368            }
41369            
41370            AnimationDuration(ref value) => {
41371                AnimationDuration(value.clone())
41372            }
41373            
41374            AnimationFillMode(ref value) => {
41375                AnimationFillMode(value.clone())
41376            }
41377            
41378            AnimationIterationCount(ref value) => {
41379                AnimationIterationCount(value.clone())
41380            }
41381            
41382            AnimationName(ref value) => {
41383                AnimationName(value.clone())
41384            }
41385            
41386            AnimationPlayState(ref value) => {
41387                AnimationPlayState(value.clone())
41388            }
41389            
41390            AnimationTimeline(ref value) => {
41391                AnimationTimeline(value.clone())
41392            }
41393            
41394            AnimationTimingFunction(ref value) => {
41395                AnimationTimingFunction(value.clone())
41396            }
41397            
41398            BackdropFilter(ref value) => {
41399                BackdropFilter(value.clone())
41400            }
41401            
41402            BackgroundAttachment(ref value) => {
41403                BackgroundAttachment(value.clone())
41404            }
41405            
41406            BackgroundClip(ref value) => {
41407                BackgroundClip(value.clone())
41408            }
41409            
41410            BackgroundImage(ref value) => {
41411                BackgroundImage(value.clone())
41412            }
41413            
41414            BackgroundOrigin(ref value) => {
41415                BackgroundOrigin(value.clone())
41416            }
41417            
41418            BackgroundPositionX(ref value) => {
41419                BackgroundPositionX(value.clone())
41420            }
41421            
41422            BackgroundPositionY(ref value) => {
41423                BackgroundPositionY(value.clone())
41424            }
41425            
41426            BackgroundRepeat(ref value) => {
41427                BackgroundRepeat(value.clone())
41428            }
41429            
41430            BackgroundSize(ref value) => {
41431                BackgroundSize(value.clone())
41432            }
41433            
41434            BorderImageOutset(ref value) => {
41435                BorderImageOutset(value.clone())
41436            }
41437            
41438            BorderImageSlice(ref value) => {
41439                BorderImageSlice(value.clone())
41440            }
41441            
41442            BorderImageWidth(ref value) => {
41443                BorderImageWidth(value.clone())
41444            }
41445            
41446            BorderSpacing(ref value) => {
41447                BorderSpacing(value.clone())
41448            }
41449            
41450            BoxShadow(ref value) => {
41451                BoxShadow(value.clone())
41452            }
41453            
41454            Clip(ref value) => {
41455                Clip(value.clone())
41456            }
41457            
41458            ClipPath(ref value) => {
41459                ClipPath(value.clone())
41460            }
41461            
41462            Color(ref value) => {
41463                Color(value.clone())
41464            }
41465            
41466            ColorScheme(ref value) => {
41467                ColorScheme(value.clone())
41468            }
41469            
41470            ColumnWidth(ref value) => {
41471                ColumnWidth(value.clone())
41472            }
41473            
41474            ContainerName(ref value) => {
41475                ContainerName(value.clone())
41476            }
41477            
41478            Content(ref value) => {
41479                Content(value.clone())
41480            }
41481            
41482            CounterIncrement(ref value) => {
41483                CounterIncrement(value.clone())
41484            }
41485            
41486            CounterReset(ref value) => {
41487                CounterReset(value.clone())
41488            }
41489            
41490            Cursor(ref value) => {
41491                Cursor(value.clone())
41492            }
41493            
41494            Filter(ref value) => {
41495                Filter(value.clone())
41496            }
41497            
41498            FlexBasis(ref value) => {
41499                FlexBasis(value.clone())
41500            }
41501            
41502            FontFamily(ref value) => {
41503                FontFamily(value.clone())
41504            }
41505            
41506            FontSize(ref value) => {
41507                FontSize(value.clone())
41508            }
41509            
41510            FontVariationSettings(ref value) => {
41511                FontVariationSettings(value.clone())
41512            }
41513            
41514            GridTemplateAreas(ref value) => {
41515                GridTemplateAreas(value.clone())
41516            }
41517            
41518            LetterSpacing(ref value) => {
41519                LetterSpacing(value.clone())
41520            }
41521            
41522            LineHeight(ref value) => {
41523                LineHeight(value.clone())
41524            }
41525            
41526            MaskImage(ref value) => {
41527                MaskImage(value.clone())
41528            }
41529            
41530            OffsetPath(ref value) => {
41531                OffsetPath(value.clone())
41532            }
41533            
41534            Perspective(ref value) => {
41535                Perspective(value.clone())
41536            }
41537            
41538            Quotes(ref value) => {
41539                Quotes(value.clone())
41540            }
41541            
41542            Rotate(ref value) => {
41543                Rotate(value.clone())
41544            }
41545            
41546            Scale(ref value) => {
41547                Scale(value.clone())
41548            }
41549            
41550            TextIndent(ref value) => {
41551                TextIndent(value.clone())
41552            }
41553            
41554            TextOverflow(ref value) => {
41555                TextOverflow(value.clone())
41556            }
41557            
41558            TextShadow(ref value) => {
41559                TextShadow(value.clone())
41560            }
41561            
41562            Transform(ref value) => {
41563                Transform(value.clone())
41564            }
41565            
41566            TransformOrigin(ref value) => {
41567                TransformOrigin(value.clone())
41568            }
41569            
41570            TransitionBehavior(ref value) => {
41571                TransitionBehavior(value.clone())
41572            }
41573            
41574            TransitionDelay(ref value) => {
41575                TransitionDelay(value.clone())
41576            }
41577            
41578            TransitionDuration(ref value) => {
41579                TransitionDuration(value.clone())
41580            }
41581            
41582            TransitionProperty(ref value) => {
41583                TransitionProperty(value.clone())
41584            }
41585            
41586            TransitionTimingFunction(ref value) => {
41587                TransitionTimingFunction(value.clone())
41588            }
41589            
41590            Translate(ref value) => {
41591                Translate(value.clone())
41592            }
41593            
41594            VerticalAlign(ref value) => {
41595                VerticalAlign(value.clone())
41596            }
41597            
41598            ViewTransitionClass(ref value) => {
41599                ViewTransitionClass(value.clone())
41600            }
41601            
41602            ViewTransitionName(ref value) => {
41603                ViewTransitionName(value.clone())
41604            }
41605            
41606            WillChange(ref value) => {
41607                WillChange(value.clone())
41608            }
41609            
41610            WordSpacing(ref value) => {
41611                WordSpacing(value.clone())
41612            }
41613            
41614            XLang(ref value) => {
41615                XLang(value.clone())
41616            }
41617            
41618            ObjectPosition(ref value) |
41619PerspectiveOrigin(ref value) => {
41620                unsafe {
41621                    let mut out = mem::MaybeUninit::uninit();
41622                    ptr::write(
41623                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<Box<crate::values::specified::Position>>,
41624                        PropertyDeclarationVariantRepr {
41625                            tag: *(self as *const _ as *const u16),
41626                            value: value.clone(),
41627                        },
41628                    );
41629                    out.assume_init()
41630                }
41631            }
41632            
41633            GridTemplateColumns(ref value) |
41634GridTemplateRows(ref value) => {
41635                unsafe {
41636                    let mut out = mem::MaybeUninit::uninit();
41637                    ptr::write(
41638                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::GridTemplateComponent>,
41639                        PropertyDeclarationVariantRepr {
41640                            tag: *(self as *const _ as *const u16),
41641                            value: value.clone(),
41642                        },
41643                    );
41644                    out.assume_init()
41645                }
41646            }
41647            
41648            BorderImageSource(ref value) |
41649ListStyleImage(ref value) => {
41650                unsafe {
41651                    let mut out = mem::MaybeUninit::uninit();
41652                    ptr::write(
41653                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::Image>,
41654                        PropertyDeclarationVariantRepr {
41655                            tag: *(self as *const _ as *const u16),
41656                            value: value.clone(),
41657                        },
41658                    );
41659                    out.assume_init()
41660                }
41661            }
41662            
41663            GridAutoColumns(ref value) |
41664GridAutoRows(ref value) => {
41665                unsafe {
41666                    let mut out = mem::MaybeUninit::uninit();
41667                    ptr::write(
41668                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::ImplicitGridTracks>,
41669                        PropertyDeclarationVariantRepr {
41670                            tag: *(self as *const _ as *const u16),
41671                            value: value.clone(),
41672                        },
41673                    );
41674                    out.assume_init()
41675                }
41676            }
41677            
41678            OutlineOffset(ref value) |
41679OverflowClipMargin(ref value) => {
41680                unsafe {
41681                    let mut out = mem::MaybeUninit::uninit();
41682                    ptr::write(
41683                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::Length>,
41684                        PropertyDeclarationVariantRepr {
41685                            tag: *(self as *const _ as *const u16),
41686                            value: value.clone(),
41687                        },
41688                    );
41689                    out.assume_init()
41690                }
41691            }
41692            
41693            ColumnGap(ref value) |
41694RowGap(ref value) => {
41695                unsafe {
41696                    let mut out = mem::MaybeUninit::uninit();
41697                    ptr::write(
41698                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::length::NonNegativeLengthPercentageOrNormal>,
41699                        PropertyDeclarationVariantRepr {
41700                            tag: *(self as *const _ as *const u16),
41701                            value: value.clone(),
41702                        },
41703                    );
41704                    out.assume_init()
41705                }
41706            }
41707            
41708            GridColumnEnd(ref value) |
41709GridColumnStart(ref value) |
41710GridRowEnd(ref value) |
41711GridRowStart(ref value) => {
41712                unsafe {
41713                    let mut out = mem::MaybeUninit::uninit();
41714                    ptr::write(
41715                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::GridLine>,
41716                        PropertyDeclarationVariantRepr {
41717                            tag: *(self as *const _ as *const u16),
41718                            value: value.clone(),
41719                        },
41720                    );
41721                    out.assume_init()
41722                }
41723            }
41724            
41725            MaxBlockSize(ref value) |
41726MaxHeight(ref value) |
41727MaxInlineSize(ref value) |
41728MaxWidth(ref value) => {
41729                unsafe {
41730                    let mut out = mem::MaybeUninit::uninit();
41731                    ptr::write(
41732                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::MaxSize>,
41733                        PropertyDeclarationVariantRepr {
41734                            tag: *(self as *const _ as *const u16),
41735                            value: value.clone(),
41736                        },
41737                    );
41738                    out.assume_init()
41739                }
41740            }
41741            
41742            BorderBottomLeftRadius(ref value) |
41743BorderBottomRightRadius(ref value) |
41744BorderEndEndRadius(ref value) |
41745BorderEndStartRadius(ref value) |
41746BorderStartEndRadius(ref value) |
41747BorderStartStartRadius(ref value) |
41748BorderTopLeftRadius(ref value) |
41749BorderTopRightRadius(ref value) => {
41750                unsafe {
41751                    let mut out = mem::MaybeUninit::uninit();
41752                    ptr::write(
41753                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<Box<crate::values::specified::BorderCornerRadius>>,
41754                        PropertyDeclarationVariantRepr {
41755                            tag: *(self as *const _ as *const u16),
41756                            value: value.clone(),
41757                        },
41758                    );
41759                    out.assume_init()
41760                }
41761            }
41762            
41763            Bottom(ref value) |
41764InsetBlockEnd(ref value) |
41765InsetBlockStart(ref value) |
41766InsetInlineEnd(ref value) |
41767InsetInlineStart(ref value) |
41768Left(ref value) |
41769Right(ref value) |
41770Top(ref value) => {
41771                unsafe {
41772                    let mut out = mem::MaybeUninit::uninit();
41773                    ptr::write(
41774                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::Inset>,
41775                        PropertyDeclarationVariantRepr {
41776                            tag: *(self as *const _ as *const u16),
41777                            value: value.clone(),
41778                        },
41779                    );
41780                    out.assume_init()
41781                }
41782            }
41783            
41784            MarginBlockEnd(ref value) |
41785MarginBlockStart(ref value) |
41786MarginBottom(ref value) |
41787MarginInlineEnd(ref value) |
41788MarginInlineStart(ref value) |
41789MarginLeft(ref value) |
41790MarginRight(ref value) |
41791MarginTop(ref value) => {
41792                unsafe {
41793                    let mut out = mem::MaybeUninit::uninit();
41794                    ptr::write(
41795                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::Margin>,
41796                        PropertyDeclarationVariantRepr {
41797                            tag: *(self as *const _ as *const u16),
41798                            value: value.clone(),
41799                        },
41800                    );
41801                    out.assume_init()
41802                }
41803            }
41804            
41805            PaddingBlockEnd(ref value) |
41806PaddingBlockStart(ref value) |
41807PaddingBottom(ref value) |
41808PaddingInlineEnd(ref value) |
41809PaddingInlineStart(ref value) |
41810PaddingLeft(ref value) |
41811PaddingRight(ref value) |
41812PaddingTop(ref value) => {
41813                unsafe {
41814                    let mut out = mem::MaybeUninit::uninit();
41815                    ptr::write(
41816                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::NonNegativeLengthPercentage>,
41817                        PropertyDeclarationVariantRepr {
41818                            tag: *(self as *const _ as *const u16),
41819                            value: value.clone(),
41820                        },
41821                    );
41822                    out.assume_init()
41823                }
41824            }
41825            
41826            BlockSize(ref value) |
41827Height(ref value) |
41828InlineSize(ref value) |
41829MinBlockSize(ref value) |
41830MinHeight(ref value) |
41831MinInlineSize(ref value) |
41832MinWidth(ref value) |
41833Width(ref value) => {
41834                unsafe {
41835                    let mut out = mem::MaybeUninit::uninit();
41836                    ptr::write(
41837                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::Size>,
41838                        PropertyDeclarationVariantRepr {
41839                            tag: *(self as *const _ as *const u16),
41840                            value: value.clone(),
41841                        },
41842                    );
41843                    out.assume_init()
41844                }
41845            }
41846            
41847            BorderBlockEndWidth(ref value) |
41848BorderBlockStartWidth(ref value) |
41849BorderBottomWidth(ref value) |
41850BorderInlineEndWidth(ref value) |
41851BorderInlineStartWidth(ref value) |
41852BorderLeftWidth(ref value) |
41853BorderRightWidth(ref value) |
41854BorderTopWidth(ref value) |
41855OutlineWidth(ref value) => {
41856                unsafe {
41857                    let mut out = mem::MaybeUninit::uninit();
41858                    ptr::write(
41859                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::BorderSideWidth>,
41860                        PropertyDeclarationVariantRepr {
41861                            tag: *(self as *const _ as *const u16),
41862                            value: value.clone(),
41863                        },
41864                    );
41865                    out.assume_init()
41866                }
41867            }
41868            
41869            BackgroundColor(ref value) |
41870BorderBlockEndColor(ref value) |
41871BorderBlockStartColor(ref value) |
41872BorderBottomColor(ref value) |
41873BorderInlineEndColor(ref value) |
41874BorderInlineStartColor(ref value) |
41875BorderLeftColor(ref value) |
41876BorderRightColor(ref value) |
41877BorderTopColor(ref value) |
41878OutlineColor(ref value) |
41879TextDecorationColor(ref value) => {
41880                unsafe {
41881                    let mut out = mem::MaybeUninit::uninit();
41882                    ptr::write(
41883                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::Color>,
41884                        PropertyDeclarationVariantRepr {
41885                            tag: *(self as *const _ as *const u16),
41886                            value: value.clone(),
41887                        },
41888                    );
41889                    out.assume_init()
41890                }
41891            }
41892            
41893            CSSWideKeyword(ref value) => {
41894                CSSWideKeyword(value.clone())
41895            }
41896            
41897            WithVariables(ref value) => {
41898                WithVariables(value.clone())
41899            }
41900            
41901            Custom(ref value) => {
41902                Custom(value.clone())
41903            }
41904        }
41905    }
41906}
41907
41908impl PartialEq for PropertyDeclaration {
41909    #[inline]
41910    fn eq(&self, other: &Self) -> bool {
41911        use self::PropertyDeclaration::*;
41912
41913        unsafe {
41914            let this_repr =
41915                &*(self as *const _ as *const PropertyDeclarationVariantRepr<()>);
41916            let other_repr =
41917                &*(other as *const _ as *const PropertyDeclarationVariantRepr<()>);
41918            if this_repr.tag != other_repr.tag {
41919                return false;
41920            }
41921            match *self {
41922                AlignContent(ref this) => {
41923                    let other_repr =
41924                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::AlignContent>);
41925                    *this == other_repr.value
41926                }
41927                AlignItems(ref this) => {
41928                    let other_repr =
41929                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::AlignItems>);
41930                    *this == other_repr.value
41931                }
41932                AlignSelf(ref this) => {
41933                    let other_repr =
41934                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::AlignSelf>);
41935                    *this == other_repr.value
41936                }
41937                AspectRatio(ref this) => {
41938                    let other_repr =
41939                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::AspectRatio>);
41940                    *this == other_repr.value
41941                }
41942                BackfaceVisibility(ref this) => {
41943                    let other_repr =
41944                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::backface_visibility::SpecifiedValue>);
41945                    *this == other_repr.value
41946                }
41947                BaselineSource(ref this) => {
41948                    let other_repr =
41949                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::BaselineSource>);
41950                    *this == other_repr.value
41951                }
41952                BorderCollapse(ref this) => {
41953                    let other_repr =
41954                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::border_collapse::SpecifiedValue>);
41955                    *this == other_repr.value
41956                }
41957                BorderImageRepeat(ref this) => {
41958                    let other_repr =
41959                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::BorderImageRepeat>);
41960                    *this == other_repr.value
41961                }
41962                BoxSizing(ref this) => {
41963                    let other_repr =
41964                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::box_sizing::SpecifiedValue>);
41965                    *this == other_repr.value
41966                }
41967                CaptionSide(ref this) => {
41968                    let other_repr =
41969                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::table::CaptionSide>);
41970                    *this == other_repr.value
41971                }
41972                Clear(ref this) => {
41973                    let other_repr =
41974                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Clear>);
41975                    *this == other_repr.value
41976                }
41977                ColumnCount(ref this) => {
41978                    let other_repr =
41979                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::ColumnCount>);
41980                    *this == other_repr.value
41981                }
41982                ColumnSpan(ref this) => {
41983                    let other_repr =
41984                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::column_span::SpecifiedValue>);
41985                    *this == other_repr.value
41986                }
41987                Contain(ref this) => {
41988                    let other_repr =
41989                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Contain>);
41990                    *this == other_repr.value
41991                }
41992                ContainerType(ref this) => {
41993                    let other_repr =
41994                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::ContainerType>);
41995                    *this == other_repr.value
41996                }
41997                Direction(ref this) => {
41998                    let other_repr =
41999                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::direction::SpecifiedValue>);
42000                    *this == other_repr.value
42001                }
42002                Display(ref this) => {
42003                    let other_repr =
42004                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Display>);
42005                    *this == other_repr.value
42006                }
42007                EmptyCells(ref this) => {
42008                    let other_repr =
42009                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::empty_cells::SpecifiedValue>);
42010                    *this == other_repr.value
42011                }
42012                FlexDirection(ref this) => {
42013                    let other_repr =
42014                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::flex_direction::SpecifiedValue>);
42015                    *this == other_repr.value
42016                }
42017                FlexWrap(ref this) => {
42018                    let other_repr =
42019                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::flex_wrap::SpecifiedValue>);
42020                    *this == other_repr.value
42021                }
42022                Float(ref this) => {
42023                    let other_repr =
42024                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Float>);
42025                    *this == other_repr.value
42026                }
42027                FontLanguageOverride(ref this) => {
42028                    let other_repr =
42029                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::FontLanguageOverride>);
42030                    *this == other_repr.value
42031                }
42032                FontStretch(ref this) => {
42033                    let other_repr =
42034                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::FontStretch>);
42035                    *this == other_repr.value
42036                }
42037                FontStyle(ref this) => {
42038                    let other_repr =
42039                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::FontStyle>);
42040                    *this == other_repr.value
42041                }
42042                FontVariantCaps(ref this) => {
42043                    let other_repr =
42044                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::font_variant_caps::SpecifiedValue>);
42045                    *this == other_repr.value
42046                }
42047                FontWeight(ref this) => {
42048                    let other_repr =
42049                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::FontWeight>);
42050                    *this == other_repr.value
42051                }
42052                GridAutoFlow(ref this) => {
42053                    let other_repr =
42054                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::GridAutoFlow>);
42055                    *this == other_repr.value
42056                }
42057                ImageRendering(ref this) => {
42058                    let other_repr =
42059                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::ImageRendering>);
42060                    *this == other_repr.value
42061                }
42062                Isolation(ref this) => {
42063                    let other_repr =
42064                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::isolation::SpecifiedValue>);
42065                    *this == other_repr.value
42066                }
42067                JustifyContent(ref this) => {
42068                    let other_repr =
42069                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::JustifyContent>);
42070                    *this == other_repr.value
42071                }
42072                JustifyItems(ref this) => {
42073                    let other_repr =
42074                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::JustifyItems>);
42075                    *this == other_repr.value
42076                }
42077                JustifySelf(ref this) => {
42078                    let other_repr =
42079                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::JustifySelf>);
42080                    *this == other_repr.value
42081                }
42082                ListStylePosition(ref this) => {
42083                    let other_repr =
42084                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::list_style_position::SpecifiedValue>);
42085                    *this == other_repr.value
42086                }
42087                ListStyleType(ref this) => {
42088                    let other_repr =
42089                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::list_style_type::SpecifiedValue>);
42090                    *this == other_repr.value
42091                }
42092                MixBlendMode(ref this) => {
42093                    let other_repr =
42094                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::mix_blend_mode::SpecifiedValue>);
42095                    *this == other_repr.value
42096                }
42097                ObjectFit(ref this) => {
42098                    let other_repr =
42099                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::object_fit::SpecifiedValue>);
42100                    *this == other_repr.value
42101                }
42102                Opacity(ref this) => {
42103                    let other_repr =
42104                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Opacity>);
42105                    *this == other_repr.value
42106                }
42107                Order(ref this) => {
42108                    let other_repr =
42109                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Integer>);
42110                    *this == other_repr.value
42111                }
42112                OutlineStyle(ref this) => {
42113                    let other_repr =
42114                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::OutlineStyle>);
42115                    *this == other_repr.value
42116                }
42117                OverflowWrap(ref this) => {
42118                    let other_repr =
42119                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::OverflowWrap>);
42120                    *this == other_repr.value
42121                }
42122                PointerEvents(ref this) => {
42123                    let other_repr =
42124                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::PointerEvents>);
42125                    *this == other_repr.value
42126                }
42127                Position(ref this) => {
42128                    let other_repr =
42129                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::PositionProperty>);
42130                    *this == other_repr.value
42131                }
42132                ServoOverflowClipBox(ref this) => {
42133                    let other_repr =
42134                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::_servo_overflow_clip_box::SpecifiedValue>);
42135                    *this == other_repr.value
42136                }
42137                ServoTopLayer(ref this) => {
42138                    let other_repr =
42139                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::_servo_top_layer::SpecifiedValue>);
42140                    *this == other_repr.value
42141                }
42142                TableLayout(ref this) => {
42143                    let other_repr =
42144                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::table_layout::SpecifiedValue>);
42145                    *this == other_repr.value
42146                }
42147                TextAlign(ref this) => {
42148                    let other_repr =
42149                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::TextAlign>);
42150                    *this == other_repr.value
42151                }
42152                TextAlignLast(ref this) => {
42153                    let other_repr =
42154                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::TextAlignLast>);
42155                    *this == other_repr.value
42156                }
42157                TextDecorationLine(ref this) => {
42158                    let other_repr =
42159                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::TextDecorationLine>);
42160                    *this == other_repr.value
42161                }
42162                TextDecorationStyle(ref this) => {
42163                    let other_repr =
42164                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::text_decoration_style::SpecifiedValue>);
42165                    *this == other_repr.value
42166                }
42167                TextJustify(ref this) => {
42168                    let other_repr =
42169                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::TextJustify>);
42170                    *this == other_repr.value
42171                }
42172                TextRendering(ref this) => {
42173                    let other_repr =
42174                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::text_rendering::SpecifiedValue>);
42175                    *this == other_repr.value
42176                }
42177                TextTransform(ref this) => {
42178                    let other_repr =
42179                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::TextTransform>);
42180                    *this == other_repr.value
42181                }
42182                TextWrapMode(ref this) => {
42183                    let other_repr =
42184                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::text_wrap_mode::SpecifiedValue>);
42185                    *this == other_repr.value
42186                }
42187                TransformStyle(ref this) => {
42188                    let other_repr =
42189                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::TransformStyle>);
42190                    *this == other_repr.value
42191                }
42192                UnicodeBidi(ref this) => {
42193                    let other_repr =
42194                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::unicode_bidi::SpecifiedValue>);
42195                    *this == other_repr.value
42196                }
42197                Visibility(ref this) => {
42198                    let other_repr =
42199                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::visibility::SpecifiedValue>);
42200                    *this == other_repr.value
42201                }
42202                WhiteSpaceCollapse(ref this) => {
42203                    let other_repr =
42204                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::white_space_collapse::SpecifiedValue>);
42205                    *this == other_repr.value
42206                }
42207                WordBreak(ref this) => {
42208                    let other_repr =
42209                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::WordBreak>);
42210                    *this == other_repr.value
42211                }
42212                WritingMode(ref this) => {
42213                    let other_repr =
42214                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::WritingModeProperty>);
42215                    *this == other_repr.value
42216                }
42217                ZIndex(ref this) => {
42218                    let other_repr =
42219                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::ZIndex>);
42220                    *this == other_repr.value
42221                }
42222                Zoom(ref this) => {
42223                    let other_repr =
42224                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Zoom>);
42225                    *this == other_repr.value
42226                }
42227                FlexGrow(ref this) |
42228FlexShrink(ref this) => {
42229                    let other_repr =
42230                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::NonNegativeNumber>);
42231                    *this == other_repr.value
42232                }
42233                OverflowBlock(ref this) |
42234OverflowInline(ref this) |
42235OverflowX(ref this) |
42236OverflowY(ref this) => {
42237                    let other_repr =
42238                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Overflow>);
42239                    *this == other_repr.value
42240                }
42241                BorderBlockEndStyle(ref this) |
42242BorderBlockStartStyle(ref this) |
42243BorderBottomStyle(ref this) |
42244BorderInlineEndStyle(ref this) |
42245BorderInlineStartStyle(ref this) |
42246BorderLeftStyle(ref this) |
42247BorderRightStyle(ref this) |
42248BorderTopStyle(ref this) => {
42249                    let other_repr =
42250                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::BorderStyle>);
42251                    *this == other_repr.value
42252                }
42253                AnimationComposition(ref this) => {
42254                    let other_repr =
42255                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::animation_composition::SpecifiedValue>);
42256                    *this == other_repr.value
42257                }
42258                AnimationDelay(ref this) => {
42259                    let other_repr =
42260                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::animation_delay::SpecifiedValue>);
42261                    *this == other_repr.value
42262                }
42263                AnimationDirection(ref this) => {
42264                    let other_repr =
42265                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::animation_direction::SpecifiedValue>);
42266                    *this == other_repr.value
42267                }
42268                AnimationDuration(ref this) => {
42269                    let other_repr =
42270                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::animation_duration::SpecifiedValue>);
42271                    *this == other_repr.value
42272                }
42273                AnimationFillMode(ref this) => {
42274                    let other_repr =
42275                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::animation_fill_mode::SpecifiedValue>);
42276                    *this == other_repr.value
42277                }
42278                AnimationIterationCount(ref this) => {
42279                    let other_repr =
42280                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::animation_iteration_count::SpecifiedValue>);
42281                    *this == other_repr.value
42282                }
42283                AnimationName(ref this) => {
42284                    let other_repr =
42285                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::animation_name::SpecifiedValue>);
42286                    *this == other_repr.value
42287                }
42288                AnimationPlayState(ref this) => {
42289                    let other_repr =
42290                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::animation_play_state::SpecifiedValue>);
42291                    *this == other_repr.value
42292                }
42293                AnimationTimeline(ref this) => {
42294                    let other_repr =
42295                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::animation_timeline::SpecifiedValue>);
42296                    *this == other_repr.value
42297                }
42298                AnimationTimingFunction(ref this) => {
42299                    let other_repr =
42300                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::animation_timing_function::SpecifiedValue>);
42301                    *this == other_repr.value
42302                }
42303                BackdropFilter(ref this) => {
42304                    let other_repr =
42305                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::backdrop_filter::SpecifiedValue>);
42306                    *this == other_repr.value
42307                }
42308                BackgroundAttachment(ref this) => {
42309                    let other_repr =
42310                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::background_attachment::SpecifiedValue>);
42311                    *this == other_repr.value
42312                }
42313                BackgroundClip(ref this) => {
42314                    let other_repr =
42315                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::background_clip::SpecifiedValue>);
42316                    *this == other_repr.value
42317                }
42318                BackgroundImage(ref this) => {
42319                    let other_repr =
42320                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::background_image::SpecifiedValue>);
42321                    *this == other_repr.value
42322                }
42323                BackgroundOrigin(ref this) => {
42324                    let other_repr =
42325                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::background_origin::SpecifiedValue>);
42326                    *this == other_repr.value
42327                }
42328                BackgroundPositionX(ref this) => {
42329                    let other_repr =
42330                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::background_position_x::SpecifiedValue>);
42331                    *this == other_repr.value
42332                }
42333                BackgroundPositionY(ref this) => {
42334                    let other_repr =
42335                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::background_position_y::SpecifiedValue>);
42336                    *this == other_repr.value
42337                }
42338                BackgroundRepeat(ref this) => {
42339                    let other_repr =
42340                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::background_repeat::SpecifiedValue>);
42341                    *this == other_repr.value
42342                }
42343                BackgroundSize(ref this) => {
42344                    let other_repr =
42345                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::background_size::SpecifiedValue>);
42346                    *this == other_repr.value
42347                }
42348                BorderImageOutset(ref this) => {
42349                    let other_repr =
42350                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::NonNegativeLengthOrNumberRect>>);
42351                    *this == other_repr.value
42352                }
42353                BorderImageSlice(ref this) => {
42354                    let other_repr =
42355                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::BorderImageSlice>>);
42356                    *this == other_repr.value
42357                }
42358                BorderImageWidth(ref this) => {
42359                    let other_repr =
42360                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::BorderImageWidth>>);
42361                    *this == other_repr.value
42362                }
42363                BorderSpacing(ref this) => {
42364                    let other_repr =
42365                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::BorderSpacing>>);
42366                    *this == other_repr.value
42367                }
42368                BoxShadow(ref this) => {
42369                    let other_repr =
42370                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::box_shadow::SpecifiedValue>);
42371                    *this == other_repr.value
42372                }
42373                Clip(ref this) => {
42374                    let other_repr =
42375                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::ClipRectOrAuto>>);
42376                    *this == other_repr.value
42377                }
42378                ClipPath(ref this) => {
42379                    let other_repr =
42380                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::basic_shape::ClipPath>);
42381                    *this == other_repr.value
42382                }
42383                Color(ref this) => {
42384                    let other_repr =
42385                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::ColorPropertyValue>);
42386                    *this == other_repr.value
42387                }
42388                ColorScheme(ref this) => {
42389                    let other_repr =
42390                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::ColorScheme>);
42391                    *this == other_repr.value
42392                }
42393                ColumnWidth(ref this) => {
42394                    let other_repr =
42395                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::length::NonNegativeLengthOrAuto>);
42396                    *this == other_repr.value
42397                }
42398                ContainerName(ref this) => {
42399                    let other_repr =
42400                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::ContainerName>);
42401                    *this == other_repr.value
42402                }
42403                Content(ref this) => {
42404                    let other_repr =
42405                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Content>);
42406                    *this == other_repr.value
42407                }
42408                CounterIncrement(ref this) => {
42409                    let other_repr =
42410                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::CounterIncrement>);
42411                    *this == other_repr.value
42412                }
42413                CounterReset(ref this) => {
42414                    let other_repr =
42415                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::CounterReset>);
42416                    *this == other_repr.value
42417                }
42418                Cursor(ref this) => {
42419                    let other_repr =
42420                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Cursor>);
42421                    *this == other_repr.value
42422                }
42423                Filter(ref this) => {
42424                    let other_repr =
42425                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::filter::SpecifiedValue>);
42426                    *this == other_repr.value
42427                }
42428                FlexBasis(ref this) => {
42429                    let other_repr =
42430                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::FlexBasis>>);
42431                    *this == other_repr.value
42432                }
42433                FontFamily(ref this) => {
42434                    let other_repr =
42435                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::FontFamily>);
42436                    *this == other_repr.value
42437                }
42438                FontSize(ref this) => {
42439                    let other_repr =
42440                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::FontSize>);
42441                    *this == other_repr.value
42442                }
42443                FontVariationSettings(ref this) => {
42444                    let other_repr =
42445                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::FontVariationSettings>);
42446                    *this == other_repr.value
42447                }
42448                GridTemplateAreas(ref this) => {
42449                    let other_repr =
42450                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::GridTemplateAreas>);
42451                    *this == other_repr.value
42452                }
42453                LetterSpacing(ref this) => {
42454                    let other_repr =
42455                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::LetterSpacing>);
42456                    *this == other_repr.value
42457                }
42458                LineHeight(ref this) => {
42459                    let other_repr =
42460                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::LineHeight>);
42461                    *this == other_repr.value
42462                }
42463                MaskImage(ref this) => {
42464                    let other_repr =
42465                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::mask_image::SpecifiedValue>);
42466                    *this == other_repr.value
42467                }
42468                OffsetPath(ref this) => {
42469                    let other_repr =
42470                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::OffsetPath>);
42471                    *this == other_repr.value
42472                }
42473                Perspective(ref this) => {
42474                    let other_repr =
42475                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Perspective>);
42476                    *this == other_repr.value
42477                }
42478                Quotes(ref this) => {
42479                    let other_repr =
42480                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Quotes>);
42481                    *this == other_repr.value
42482                }
42483                Rotate(ref this) => {
42484                    let other_repr =
42485                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::Rotate>>);
42486                    *this == other_repr.value
42487                }
42488                Scale(ref this) => {
42489                    let other_repr =
42490                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::Scale>>);
42491                    *this == other_repr.value
42492                }
42493                TextIndent(ref this) => {
42494                    let other_repr =
42495                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::TextIndent>);
42496                    *this == other_repr.value
42497                }
42498                TextOverflow(ref this) => {
42499                    let other_repr =
42500                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::TextOverflow>>);
42501                    *this == other_repr.value
42502                }
42503                TextShadow(ref this) => {
42504                    let other_repr =
42505                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::text_shadow::SpecifiedValue>);
42506                    *this == other_repr.value
42507                }
42508                Transform(ref this) => {
42509                    let other_repr =
42510                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Transform>);
42511                    *this == other_repr.value
42512                }
42513                TransformOrigin(ref this) => {
42514                    let other_repr =
42515                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::TransformOrigin>>);
42516                    *this == other_repr.value
42517                }
42518                TransitionBehavior(ref this) => {
42519                    let other_repr =
42520                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::transition_behavior::SpecifiedValue>);
42521                    *this == other_repr.value
42522                }
42523                TransitionDelay(ref this) => {
42524                    let other_repr =
42525                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::transition_delay::SpecifiedValue>);
42526                    *this == other_repr.value
42527                }
42528                TransitionDuration(ref this) => {
42529                    let other_repr =
42530                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::transition_duration::SpecifiedValue>);
42531                    *this == other_repr.value
42532                }
42533                TransitionProperty(ref this) => {
42534                    let other_repr =
42535                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::transition_property::SpecifiedValue>);
42536                    *this == other_repr.value
42537                }
42538                TransitionTimingFunction(ref this) => {
42539                    let other_repr =
42540                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<longhands::transition_timing_function::SpecifiedValue>);
42541                    *this == other_repr.value
42542                }
42543                Translate(ref this) => {
42544                    let other_repr =
42545                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::Translate>>);
42546                    *this == other_repr.value
42547                }
42548                VerticalAlign(ref this) => {
42549                    let other_repr =
42550                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::VerticalAlign>);
42551                    *this == other_repr.value
42552                }
42553                ViewTransitionClass(ref this) => {
42554                    let other_repr =
42555                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::ViewTransitionClass>);
42556                    *this == other_repr.value
42557                }
42558                ViewTransitionName(ref this) => {
42559                    let other_repr =
42560                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::ViewTransitionName>);
42561                    *this == other_repr.value
42562                }
42563                WillChange(ref this) => {
42564                    let other_repr =
42565                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::WillChange>);
42566                    *this == other_repr.value
42567                }
42568                WordSpacing(ref this) => {
42569                    let other_repr =
42570                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::WordSpacing>);
42571                    *this == other_repr.value
42572                }
42573                XLang(ref this) => {
42574                    let other_repr =
42575                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::XLang>);
42576                    *this == other_repr.value
42577                }
42578                ObjectPosition(ref this) |
42579PerspectiveOrigin(ref this) => {
42580                    let other_repr =
42581                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::Position>>);
42582                    *this == other_repr.value
42583                }
42584                GridTemplateColumns(ref this) |
42585GridTemplateRows(ref this) => {
42586                    let other_repr =
42587                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::GridTemplateComponent>);
42588                    *this == other_repr.value
42589                }
42590                BorderImageSource(ref this) |
42591ListStyleImage(ref this) => {
42592                    let other_repr =
42593                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Image>);
42594                    *this == other_repr.value
42595                }
42596                GridAutoColumns(ref this) |
42597GridAutoRows(ref this) => {
42598                    let other_repr =
42599                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::ImplicitGridTracks>);
42600                    *this == other_repr.value
42601                }
42602                OutlineOffset(ref this) |
42603OverflowClipMargin(ref this) => {
42604                    let other_repr =
42605                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Length>);
42606                    *this == other_repr.value
42607                }
42608                ColumnGap(ref this) |
42609RowGap(ref this) => {
42610                    let other_repr =
42611                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::length::NonNegativeLengthPercentageOrNormal>);
42612                    *this == other_repr.value
42613                }
42614                GridColumnEnd(ref this) |
42615GridColumnStart(ref this) |
42616GridRowEnd(ref this) |
42617GridRowStart(ref this) => {
42618                    let other_repr =
42619                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::GridLine>);
42620                    *this == other_repr.value
42621                }
42622                MaxBlockSize(ref this) |
42623MaxHeight(ref this) |
42624MaxInlineSize(ref this) |
42625MaxWidth(ref this) => {
42626                    let other_repr =
42627                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::MaxSize>);
42628                    *this == other_repr.value
42629                }
42630                BorderBottomLeftRadius(ref this) |
42631BorderBottomRightRadius(ref this) |
42632BorderEndEndRadius(ref this) |
42633BorderEndStartRadius(ref this) |
42634BorderStartEndRadius(ref this) |
42635BorderStartStartRadius(ref this) |
42636BorderTopLeftRadius(ref this) |
42637BorderTopRightRadius(ref this) => {
42638                    let other_repr =
42639                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::BorderCornerRadius>>);
42640                    *this == other_repr.value
42641                }
42642                Bottom(ref this) |
42643InsetBlockEnd(ref this) |
42644InsetBlockStart(ref this) |
42645InsetInlineEnd(ref this) |
42646InsetInlineStart(ref this) |
42647Left(ref this) |
42648Right(ref this) |
42649Top(ref this) => {
42650                    let other_repr =
42651                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Inset>);
42652                    *this == other_repr.value
42653                }
42654                MarginBlockEnd(ref this) |
42655MarginBlockStart(ref this) |
42656MarginBottom(ref this) |
42657MarginInlineEnd(ref this) |
42658MarginInlineStart(ref this) |
42659MarginLeft(ref this) |
42660MarginRight(ref this) |
42661MarginTop(ref this) => {
42662                    let other_repr =
42663                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Margin>);
42664                    *this == other_repr.value
42665                }
42666                PaddingBlockEnd(ref this) |
42667PaddingBlockStart(ref this) |
42668PaddingBottom(ref this) |
42669PaddingInlineEnd(ref this) |
42670PaddingInlineStart(ref this) |
42671PaddingLeft(ref this) |
42672PaddingRight(ref this) |
42673PaddingTop(ref this) => {
42674                    let other_repr =
42675                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::NonNegativeLengthPercentage>);
42676                    *this == other_repr.value
42677                }
42678                BlockSize(ref this) |
42679Height(ref this) |
42680InlineSize(ref this) |
42681MinBlockSize(ref this) |
42682MinHeight(ref this) |
42683MinInlineSize(ref this) |
42684MinWidth(ref this) |
42685Width(ref this) => {
42686                    let other_repr =
42687                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Size>);
42688                    *this == other_repr.value
42689                }
42690                BorderBlockEndWidth(ref this) |
42691BorderBlockStartWidth(ref this) |
42692BorderBottomWidth(ref this) |
42693BorderInlineEndWidth(ref this) |
42694BorderInlineStartWidth(ref this) |
42695BorderLeftWidth(ref this) |
42696BorderRightWidth(ref this) |
42697BorderTopWidth(ref this) |
42698OutlineWidth(ref this) => {
42699                    let other_repr =
42700                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::BorderSideWidth>);
42701                    *this == other_repr.value
42702                }
42703                BackgroundColor(ref this) |
42704BorderBlockEndColor(ref this) |
42705BorderBlockStartColor(ref this) |
42706BorderBottomColor(ref this) |
42707BorderInlineEndColor(ref this) |
42708BorderInlineStartColor(ref this) |
42709BorderLeftColor(ref this) |
42710BorderRightColor(ref this) |
42711BorderTopColor(ref this) |
42712OutlineColor(ref this) |
42713TextDecorationColor(ref this) => {
42714                    let other_repr =
42715                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Color>);
42716                    *this == other_repr.value
42717                }
42718                CSSWideKeyword(ref this) => {
42719                    let other_repr =
42720                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<WideKeywordDeclaration>);
42721                    *this == other_repr.value
42722                }
42723                WithVariables(ref this) => {
42724                    let other_repr =
42725                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<VariableDeclaration>);
42726                    *this == other_repr.value
42727                }
42728                Custom(ref this) => {
42729                    let other_repr =
42730                        &*(other as *const _ as *const PropertyDeclarationVariantRepr<CustomDeclaration>);
42731                    *this == other_repr.value
42732                }
42733            }
42734        }
42735    }
42736}
42737
42738impl MallocSizeOf for PropertyDeclaration {
42739    #[inline]
42740    fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize {
42741        use self::PropertyDeclaration::*;
42742
42743        match *self {
42744            AlignContent(ref value) => {
42745                value.size_of(ops)
42746            }
42747            AlignItems(ref value) => {
42748                value.size_of(ops)
42749            }
42750            AlignSelf(ref value) => {
42751                value.size_of(ops)
42752            }
42753            AspectRatio(ref value) => {
42754                value.size_of(ops)
42755            }
42756            BackfaceVisibility(ref value) => {
42757                value.size_of(ops)
42758            }
42759            BaselineSource(ref value) => {
42760                value.size_of(ops)
42761            }
42762            BorderCollapse(ref value) => {
42763                value.size_of(ops)
42764            }
42765            BorderImageRepeat(ref value) => {
42766                value.size_of(ops)
42767            }
42768            BoxSizing(ref value) => {
42769                value.size_of(ops)
42770            }
42771            CaptionSide(ref value) => {
42772                value.size_of(ops)
42773            }
42774            Clear(ref value) => {
42775                value.size_of(ops)
42776            }
42777            ColumnCount(ref value) => {
42778                value.size_of(ops)
42779            }
42780            ColumnSpan(ref value) => {
42781                value.size_of(ops)
42782            }
42783            Contain(ref value) => {
42784                value.size_of(ops)
42785            }
42786            ContainerType(ref value) => {
42787                value.size_of(ops)
42788            }
42789            Direction(ref value) => {
42790                value.size_of(ops)
42791            }
42792            Display(ref value) => {
42793                value.size_of(ops)
42794            }
42795            EmptyCells(ref value) => {
42796                value.size_of(ops)
42797            }
42798            FlexDirection(ref value) => {
42799                value.size_of(ops)
42800            }
42801            FlexWrap(ref value) => {
42802                value.size_of(ops)
42803            }
42804            Float(ref value) => {
42805                value.size_of(ops)
42806            }
42807            FontLanguageOverride(ref value) => {
42808                value.size_of(ops)
42809            }
42810            FontStretch(ref value) => {
42811                value.size_of(ops)
42812            }
42813            FontStyle(ref value) => {
42814                value.size_of(ops)
42815            }
42816            FontVariantCaps(ref value) => {
42817                value.size_of(ops)
42818            }
42819            FontWeight(ref value) => {
42820                value.size_of(ops)
42821            }
42822            GridAutoFlow(ref value) => {
42823                value.size_of(ops)
42824            }
42825            ImageRendering(ref value) => {
42826                value.size_of(ops)
42827            }
42828            Isolation(ref value) => {
42829                value.size_of(ops)
42830            }
42831            JustifyContent(ref value) => {
42832                value.size_of(ops)
42833            }
42834            JustifyItems(ref value) => {
42835                value.size_of(ops)
42836            }
42837            JustifySelf(ref value) => {
42838                value.size_of(ops)
42839            }
42840            ListStylePosition(ref value) => {
42841                value.size_of(ops)
42842            }
42843            ListStyleType(ref value) => {
42844                value.size_of(ops)
42845            }
42846            MixBlendMode(ref value) => {
42847                value.size_of(ops)
42848            }
42849            ObjectFit(ref value) => {
42850                value.size_of(ops)
42851            }
42852            Opacity(ref value) => {
42853                value.size_of(ops)
42854            }
42855            Order(ref value) => {
42856                value.size_of(ops)
42857            }
42858            OutlineStyle(ref value) => {
42859                value.size_of(ops)
42860            }
42861            OverflowWrap(ref value) => {
42862                value.size_of(ops)
42863            }
42864            PointerEvents(ref value) => {
42865                value.size_of(ops)
42866            }
42867            Position(ref value) => {
42868                value.size_of(ops)
42869            }
42870            ServoOverflowClipBox(ref value) => {
42871                value.size_of(ops)
42872            }
42873            ServoTopLayer(ref value) => {
42874                value.size_of(ops)
42875            }
42876            TableLayout(ref value) => {
42877                value.size_of(ops)
42878            }
42879            TextAlign(ref value) => {
42880                value.size_of(ops)
42881            }
42882            TextAlignLast(ref value) => {
42883                value.size_of(ops)
42884            }
42885            TextDecorationLine(ref value) => {
42886                value.size_of(ops)
42887            }
42888            TextDecorationStyle(ref value) => {
42889                value.size_of(ops)
42890            }
42891            TextJustify(ref value) => {
42892                value.size_of(ops)
42893            }
42894            TextRendering(ref value) => {
42895                value.size_of(ops)
42896            }
42897            TextTransform(ref value) => {
42898                value.size_of(ops)
42899            }
42900            TextWrapMode(ref value) => {
42901                value.size_of(ops)
42902            }
42903            TransformStyle(ref value) => {
42904                value.size_of(ops)
42905            }
42906            UnicodeBidi(ref value) => {
42907                value.size_of(ops)
42908            }
42909            Visibility(ref value) => {
42910                value.size_of(ops)
42911            }
42912            WhiteSpaceCollapse(ref value) => {
42913                value.size_of(ops)
42914            }
42915            WordBreak(ref value) => {
42916                value.size_of(ops)
42917            }
42918            WritingMode(ref value) => {
42919                value.size_of(ops)
42920            }
42921            ZIndex(ref value) => {
42922                value.size_of(ops)
42923            }
42924            Zoom(ref value) => {
42925                value.size_of(ops)
42926            }
42927            FlexGrow(ref value) | FlexShrink(ref value) => {
42928                value.size_of(ops)
42929            }
42930            OverflowBlock(ref value) | OverflowInline(ref value) | OverflowX(ref value) | OverflowY(ref value) => {
42931                value.size_of(ops)
42932            }
42933            BorderBlockEndStyle(ref value) | BorderBlockStartStyle(ref value) | BorderBottomStyle(ref value) | BorderInlineEndStyle(ref value) | BorderInlineStartStyle(ref value) | BorderLeftStyle(ref value) | BorderRightStyle(ref value) | BorderTopStyle(ref value) => {
42934                value.size_of(ops)
42935            }
42936            AnimationComposition(ref value) => {
42937                value.size_of(ops)
42938            }
42939            AnimationDelay(ref value) => {
42940                value.size_of(ops)
42941            }
42942            AnimationDirection(ref value) => {
42943                value.size_of(ops)
42944            }
42945            AnimationDuration(ref value) => {
42946                value.size_of(ops)
42947            }
42948            AnimationFillMode(ref value) => {
42949                value.size_of(ops)
42950            }
42951            AnimationIterationCount(ref value) => {
42952                value.size_of(ops)
42953            }
42954            AnimationName(ref value) => {
42955                value.size_of(ops)
42956            }
42957            AnimationPlayState(ref value) => {
42958                value.size_of(ops)
42959            }
42960            AnimationTimeline(ref value) => {
42961                value.size_of(ops)
42962            }
42963            AnimationTimingFunction(ref value) => {
42964                value.size_of(ops)
42965            }
42966            BackdropFilter(ref value) => {
42967                value.size_of(ops)
42968            }
42969            BackgroundAttachment(ref value) => {
42970                value.size_of(ops)
42971            }
42972            BackgroundClip(ref value) => {
42973                value.size_of(ops)
42974            }
42975            BackgroundImage(ref value) => {
42976                value.size_of(ops)
42977            }
42978            BackgroundOrigin(ref value) => {
42979                value.size_of(ops)
42980            }
42981            BackgroundPositionX(ref value) => {
42982                value.size_of(ops)
42983            }
42984            BackgroundPositionY(ref value) => {
42985                value.size_of(ops)
42986            }
42987            BackgroundRepeat(ref value) => {
42988                value.size_of(ops)
42989            }
42990            BackgroundSize(ref value) => {
42991                value.size_of(ops)
42992            }
42993            BorderImageOutset(ref value) => {
42994                value.size_of(ops)
42995            }
42996            BorderImageSlice(ref value) => {
42997                value.size_of(ops)
42998            }
42999            BorderImageWidth(ref value) => {
43000                value.size_of(ops)
43001            }
43002            BorderSpacing(ref value) => {
43003                value.size_of(ops)
43004            }
43005            BoxShadow(ref value) => {
43006                value.size_of(ops)
43007            }
43008            Clip(ref value) => {
43009                value.size_of(ops)
43010            }
43011            ClipPath(ref value) => {
43012                value.size_of(ops)
43013            }
43014            Color(ref value) => {
43015                value.size_of(ops)
43016            }
43017            ColorScheme(ref value) => {
43018                value.size_of(ops)
43019            }
43020            ColumnWidth(ref value) => {
43021                value.size_of(ops)
43022            }
43023            ContainerName(ref value) => {
43024                value.size_of(ops)
43025            }
43026            Content(ref value) => {
43027                value.size_of(ops)
43028            }
43029            CounterIncrement(ref value) => {
43030                value.size_of(ops)
43031            }
43032            CounterReset(ref value) => {
43033                value.size_of(ops)
43034            }
43035            Cursor(ref value) => {
43036                value.size_of(ops)
43037            }
43038            Filter(ref value) => {
43039                value.size_of(ops)
43040            }
43041            FlexBasis(ref value) => {
43042                value.size_of(ops)
43043            }
43044            FontFamily(ref value) => {
43045                value.size_of(ops)
43046            }
43047            FontSize(ref value) => {
43048                value.size_of(ops)
43049            }
43050            FontVariationSettings(ref value) => {
43051                value.size_of(ops)
43052            }
43053            GridTemplateAreas(ref value) => {
43054                value.size_of(ops)
43055            }
43056            LetterSpacing(ref value) => {
43057                value.size_of(ops)
43058            }
43059            LineHeight(ref value) => {
43060                value.size_of(ops)
43061            }
43062            MaskImage(ref value) => {
43063                value.size_of(ops)
43064            }
43065            OffsetPath(ref value) => {
43066                value.size_of(ops)
43067            }
43068            Perspective(ref value) => {
43069                value.size_of(ops)
43070            }
43071            Quotes(ref value) => {
43072                value.size_of(ops)
43073            }
43074            Rotate(ref value) => {
43075                value.size_of(ops)
43076            }
43077            Scale(ref value) => {
43078                value.size_of(ops)
43079            }
43080            TextIndent(ref value) => {
43081                value.size_of(ops)
43082            }
43083            TextOverflow(ref value) => {
43084                value.size_of(ops)
43085            }
43086            TextShadow(ref value) => {
43087                value.size_of(ops)
43088            }
43089            Transform(ref value) => {
43090                value.size_of(ops)
43091            }
43092            TransformOrigin(ref value) => {
43093                value.size_of(ops)
43094            }
43095            TransitionBehavior(ref value) => {
43096                value.size_of(ops)
43097            }
43098            TransitionDelay(ref value) => {
43099                value.size_of(ops)
43100            }
43101            TransitionDuration(ref value) => {
43102                value.size_of(ops)
43103            }
43104            TransitionProperty(ref value) => {
43105                value.size_of(ops)
43106            }
43107            TransitionTimingFunction(ref value) => {
43108                value.size_of(ops)
43109            }
43110            Translate(ref value) => {
43111                value.size_of(ops)
43112            }
43113            VerticalAlign(ref value) => {
43114                value.size_of(ops)
43115            }
43116            ViewTransitionClass(ref value) => {
43117                value.size_of(ops)
43118            }
43119            ViewTransitionName(ref value) => {
43120                value.size_of(ops)
43121            }
43122            WillChange(ref value) => {
43123                value.size_of(ops)
43124            }
43125            WordSpacing(ref value) => {
43126                value.size_of(ops)
43127            }
43128            XLang(ref value) => {
43129                value.size_of(ops)
43130            }
43131            ObjectPosition(ref value) | PerspectiveOrigin(ref value) => {
43132                value.size_of(ops)
43133            }
43134            GridTemplateColumns(ref value) | GridTemplateRows(ref value) => {
43135                value.size_of(ops)
43136            }
43137            BorderImageSource(ref value) | ListStyleImage(ref value) => {
43138                value.size_of(ops)
43139            }
43140            GridAutoColumns(ref value) | GridAutoRows(ref value) => {
43141                value.size_of(ops)
43142            }
43143            OutlineOffset(ref value) | OverflowClipMargin(ref value) => {
43144                value.size_of(ops)
43145            }
43146            ColumnGap(ref value) | RowGap(ref value) => {
43147                value.size_of(ops)
43148            }
43149            GridColumnEnd(ref value) | GridColumnStart(ref value) | GridRowEnd(ref value) | GridRowStart(ref value) => {
43150                value.size_of(ops)
43151            }
43152            MaxBlockSize(ref value) | MaxHeight(ref value) | MaxInlineSize(ref value) | MaxWidth(ref value) => {
43153                value.size_of(ops)
43154            }
43155            BorderBottomLeftRadius(ref value) | BorderBottomRightRadius(ref value) | BorderEndEndRadius(ref value) | BorderEndStartRadius(ref value) | BorderStartEndRadius(ref value) | BorderStartStartRadius(ref value) | BorderTopLeftRadius(ref value) | BorderTopRightRadius(ref value) => {
43156                value.size_of(ops)
43157            }
43158            Bottom(ref value) | InsetBlockEnd(ref value) | InsetBlockStart(ref value) | InsetInlineEnd(ref value) | InsetInlineStart(ref value) | Left(ref value) | Right(ref value) | Top(ref value) => {
43159                value.size_of(ops)
43160            }
43161            MarginBlockEnd(ref value) | MarginBlockStart(ref value) | MarginBottom(ref value) | MarginInlineEnd(ref value) | MarginInlineStart(ref value) | MarginLeft(ref value) | MarginRight(ref value) | MarginTop(ref value) => {
43162                value.size_of(ops)
43163            }
43164            PaddingBlockEnd(ref value) | PaddingBlockStart(ref value) | PaddingBottom(ref value) | PaddingInlineEnd(ref value) | PaddingInlineStart(ref value) | PaddingLeft(ref value) | PaddingRight(ref value) | PaddingTop(ref value) => {
43165                value.size_of(ops)
43166            }
43167            BlockSize(ref value) | Height(ref value) | InlineSize(ref value) | MinBlockSize(ref value) | MinHeight(ref value) | MinInlineSize(ref value) | MinWidth(ref value) | Width(ref value) => {
43168                value.size_of(ops)
43169            }
43170            BorderBlockEndWidth(ref value) | BorderBlockStartWidth(ref value) | BorderBottomWidth(ref value) | BorderInlineEndWidth(ref value) | BorderInlineStartWidth(ref value) | BorderLeftWidth(ref value) | BorderRightWidth(ref value) | BorderTopWidth(ref value) | OutlineWidth(ref value) => {
43171                value.size_of(ops)
43172            }
43173            BackgroundColor(ref value) | BorderBlockEndColor(ref value) | BorderBlockStartColor(ref value) | BorderBottomColor(ref value) | BorderInlineEndColor(ref value) | BorderInlineStartColor(ref value) | BorderLeftColor(ref value) | BorderRightColor(ref value) | BorderTopColor(ref value) | OutlineColor(ref value) | TextDecorationColor(ref value) => {
43174                value.size_of(ops)
43175            }
43176            CSSWideKeyword(ref value) => {
43177                value.size_of(ops)
43178            }
43179            WithVariables(ref value) => {
43180                value.size_of(ops)
43181            }
43182            Custom(ref value) => {
43183                value.size_of(ops)
43184            }
43185        }
43186    }
43187}
43188
43189
43190impl PropertyDeclaration {
43191    /// Returns the given value for this declaration as a particular type.
43192    /// It's the caller's responsibility to guarantee that the longhand id has the right specified
43193    /// value representation.
43194    pub(crate) unsafe fn unchecked_value_as<T>(&self) -> &T {
43195        &(*(self as *const _ as *const PropertyDeclarationVariantRepr<T>)).value
43196    }
43197
43198    /// Dumps the property declaration before crashing.
43199    #[cold]
43200    #[cfg(debug_assertions)]
43201    pub(crate) fn debug_crash(&self, reason: &str) {
43202        panic!("{}: {:?}", reason, self);
43203    }
43204    #[cfg(not(debug_assertions))]
43205    #[inline(always)]
43206    pub(crate) fn debug_crash(&self, _reason: &str) {}
43207
43208    /// Returns whether this is a variant of the Longhand(Value) type, rather
43209    /// than one of the special variants in extra_variants.
43210    fn is_longhand_value(&self) -> bool {
43211        match *self {
43212            PropertyDeclaration::CSSWideKeyword(..) => false,
43213            PropertyDeclaration::WithVariables(..) => false,
43214            PropertyDeclaration::Custom(..) => false,
43215            _ => true,
43216        }
43217    }
43218
43219    /// Like the method on ToCss, but without the type parameter to avoid
43220    /// accidentally monomorphizing this large function multiple times for
43221    /// different writers.
43222    pub fn to_css(&self, dest: &mut CssStringWriter) -> fmt::Result {
43223        use self::PropertyDeclaration::*;
43224
43225        let mut dest = CssWriter::new(dest);
43226        match *self {
43227            AlignContent(ref value) => {
43228                value.to_css(&mut dest)
43229            }
43230            AlignItems(ref value) => {
43231                value.to_css(&mut dest)
43232            }
43233            AlignSelf(ref value) => {
43234                value.to_css(&mut dest)
43235            }
43236            AspectRatio(ref value) => {
43237                value.to_css(&mut dest)
43238            }
43239            BackfaceVisibility(ref value) => {
43240                value.to_css(&mut dest)
43241            }
43242            BaselineSource(ref value) => {
43243                value.to_css(&mut dest)
43244            }
43245            BorderCollapse(ref value) => {
43246                value.to_css(&mut dest)
43247            }
43248            BorderImageRepeat(ref value) => {
43249                value.to_css(&mut dest)
43250            }
43251            BoxSizing(ref value) => {
43252                value.to_css(&mut dest)
43253            }
43254            CaptionSide(ref value) => {
43255                value.to_css(&mut dest)
43256            }
43257            Clear(ref value) => {
43258                value.to_css(&mut dest)
43259            }
43260            ColumnCount(ref value) => {
43261                value.to_css(&mut dest)
43262            }
43263            ColumnSpan(ref value) => {
43264                value.to_css(&mut dest)
43265            }
43266            Contain(ref value) => {
43267                value.to_css(&mut dest)
43268            }
43269            ContainerType(ref value) => {
43270                value.to_css(&mut dest)
43271            }
43272            Direction(ref value) => {
43273                value.to_css(&mut dest)
43274            }
43275            Display(ref value) => {
43276                value.to_css(&mut dest)
43277            }
43278            EmptyCells(ref value) => {
43279                value.to_css(&mut dest)
43280            }
43281            FlexDirection(ref value) => {
43282                value.to_css(&mut dest)
43283            }
43284            FlexWrap(ref value) => {
43285                value.to_css(&mut dest)
43286            }
43287            Float(ref value) => {
43288                value.to_css(&mut dest)
43289            }
43290            FontLanguageOverride(ref value) => {
43291                value.to_css(&mut dest)
43292            }
43293            FontStretch(ref value) => {
43294                value.to_css(&mut dest)
43295            }
43296            FontStyle(ref value) => {
43297                value.to_css(&mut dest)
43298            }
43299            FontVariantCaps(ref value) => {
43300                value.to_css(&mut dest)
43301            }
43302            FontWeight(ref value) => {
43303                value.to_css(&mut dest)
43304            }
43305            GridAutoFlow(ref value) => {
43306                value.to_css(&mut dest)
43307            }
43308            ImageRendering(ref value) => {
43309                value.to_css(&mut dest)
43310            }
43311            Isolation(ref value) => {
43312                value.to_css(&mut dest)
43313            }
43314            JustifyContent(ref value) => {
43315                value.to_css(&mut dest)
43316            }
43317            JustifyItems(ref value) => {
43318                value.to_css(&mut dest)
43319            }
43320            JustifySelf(ref value) => {
43321                value.to_css(&mut dest)
43322            }
43323            ListStylePosition(ref value) => {
43324                value.to_css(&mut dest)
43325            }
43326            ListStyleType(ref value) => {
43327                value.to_css(&mut dest)
43328            }
43329            MixBlendMode(ref value) => {
43330                value.to_css(&mut dest)
43331            }
43332            ObjectFit(ref value) => {
43333                value.to_css(&mut dest)
43334            }
43335            Opacity(ref value) => {
43336                value.to_css(&mut dest)
43337            }
43338            Order(ref value) => {
43339                value.to_css(&mut dest)
43340            }
43341            OutlineStyle(ref value) => {
43342                value.to_css(&mut dest)
43343            }
43344            OverflowWrap(ref value) => {
43345                value.to_css(&mut dest)
43346            }
43347            PointerEvents(ref value) => {
43348                value.to_css(&mut dest)
43349            }
43350            Position(ref value) => {
43351                value.to_css(&mut dest)
43352            }
43353            ServoOverflowClipBox(ref value) => {
43354                value.to_css(&mut dest)
43355            }
43356            ServoTopLayer(ref value) => {
43357                value.to_css(&mut dest)
43358            }
43359            TableLayout(ref value) => {
43360                value.to_css(&mut dest)
43361            }
43362            TextAlign(ref value) => {
43363                value.to_css(&mut dest)
43364            }
43365            TextAlignLast(ref value) => {
43366                value.to_css(&mut dest)
43367            }
43368            TextDecorationLine(ref value) => {
43369                value.to_css(&mut dest)
43370            }
43371            TextDecorationStyle(ref value) => {
43372                value.to_css(&mut dest)
43373            }
43374            TextJustify(ref value) => {
43375                value.to_css(&mut dest)
43376            }
43377            TextRendering(ref value) => {
43378                value.to_css(&mut dest)
43379            }
43380            TextTransform(ref value) => {
43381                value.to_css(&mut dest)
43382            }
43383            TextWrapMode(ref value) => {
43384                value.to_css(&mut dest)
43385            }
43386            TransformStyle(ref value) => {
43387                value.to_css(&mut dest)
43388            }
43389            UnicodeBidi(ref value) => {
43390                value.to_css(&mut dest)
43391            }
43392            Visibility(ref value) => {
43393                value.to_css(&mut dest)
43394            }
43395            WhiteSpaceCollapse(ref value) => {
43396                value.to_css(&mut dest)
43397            }
43398            WordBreak(ref value) => {
43399                value.to_css(&mut dest)
43400            }
43401            WritingMode(ref value) => {
43402                value.to_css(&mut dest)
43403            }
43404            ZIndex(ref value) => {
43405                value.to_css(&mut dest)
43406            }
43407            Zoom(ref value) => {
43408                value.to_css(&mut dest)
43409            }
43410            FlexGrow(ref value) | FlexShrink(ref value) => {
43411                value.to_css(&mut dest)
43412            }
43413            OverflowBlock(ref value) | OverflowInline(ref value) | OverflowX(ref value) | OverflowY(ref value) => {
43414                value.to_css(&mut dest)
43415            }
43416            BorderBlockEndStyle(ref value) | BorderBlockStartStyle(ref value) | BorderBottomStyle(ref value) | BorderInlineEndStyle(ref value) | BorderInlineStartStyle(ref value) | BorderLeftStyle(ref value) | BorderRightStyle(ref value) | BorderTopStyle(ref value) => {
43417                value.to_css(&mut dest)
43418            }
43419            AnimationComposition(ref value) => {
43420                value.to_css(&mut dest)
43421            }
43422            AnimationDelay(ref value) => {
43423                value.to_css(&mut dest)
43424            }
43425            AnimationDirection(ref value) => {
43426                value.to_css(&mut dest)
43427            }
43428            AnimationDuration(ref value) => {
43429                value.to_css(&mut dest)
43430            }
43431            AnimationFillMode(ref value) => {
43432                value.to_css(&mut dest)
43433            }
43434            AnimationIterationCount(ref value) => {
43435                value.to_css(&mut dest)
43436            }
43437            AnimationName(ref value) => {
43438                value.to_css(&mut dest)
43439            }
43440            AnimationPlayState(ref value) => {
43441                value.to_css(&mut dest)
43442            }
43443            AnimationTimeline(ref value) => {
43444                value.to_css(&mut dest)
43445            }
43446            AnimationTimingFunction(ref value) => {
43447                value.to_css(&mut dest)
43448            }
43449            BackdropFilter(ref value) => {
43450                value.to_css(&mut dest)
43451            }
43452            BackgroundAttachment(ref value) => {
43453                value.to_css(&mut dest)
43454            }
43455            BackgroundClip(ref value) => {
43456                value.to_css(&mut dest)
43457            }
43458            BackgroundImage(ref value) => {
43459                value.to_css(&mut dest)
43460            }
43461            BackgroundOrigin(ref value) => {
43462                value.to_css(&mut dest)
43463            }
43464            BackgroundPositionX(ref value) => {
43465                value.to_css(&mut dest)
43466            }
43467            BackgroundPositionY(ref value) => {
43468                value.to_css(&mut dest)
43469            }
43470            BackgroundRepeat(ref value) => {
43471                value.to_css(&mut dest)
43472            }
43473            BackgroundSize(ref value) => {
43474                value.to_css(&mut dest)
43475            }
43476            BorderImageOutset(ref value) => {
43477                value.to_css(&mut dest)
43478            }
43479            BorderImageSlice(ref value) => {
43480                value.to_css(&mut dest)
43481            }
43482            BorderImageWidth(ref value) => {
43483                value.to_css(&mut dest)
43484            }
43485            BorderSpacing(ref value) => {
43486                value.to_css(&mut dest)
43487            }
43488            BoxShadow(ref value) => {
43489                value.to_css(&mut dest)
43490            }
43491            Clip(ref value) => {
43492                value.to_css(&mut dest)
43493            }
43494            ClipPath(ref value) => {
43495                value.to_css(&mut dest)
43496            }
43497            Color(ref value) => {
43498                value.to_css(&mut dest)
43499            }
43500            ColorScheme(ref value) => {
43501                value.to_css(&mut dest)
43502            }
43503            ColumnWidth(ref value) => {
43504                value.to_css(&mut dest)
43505            }
43506            ContainerName(ref value) => {
43507                value.to_css(&mut dest)
43508            }
43509            Content(ref value) => {
43510                value.to_css(&mut dest)
43511            }
43512            CounterIncrement(ref value) => {
43513                value.to_css(&mut dest)
43514            }
43515            CounterReset(ref value) => {
43516                value.to_css(&mut dest)
43517            }
43518            Cursor(ref value) => {
43519                value.to_css(&mut dest)
43520            }
43521            Filter(ref value) => {
43522                value.to_css(&mut dest)
43523            }
43524            FlexBasis(ref value) => {
43525                value.to_css(&mut dest)
43526            }
43527            FontFamily(ref value) => {
43528                value.to_css(&mut dest)
43529            }
43530            FontSize(ref value) => {
43531                value.to_css(&mut dest)
43532            }
43533            FontVariationSettings(ref value) => {
43534                value.to_css(&mut dest)
43535            }
43536            GridTemplateAreas(ref value) => {
43537                value.to_css(&mut dest)
43538            }
43539            LetterSpacing(ref value) => {
43540                value.to_css(&mut dest)
43541            }
43542            LineHeight(ref value) => {
43543                value.to_css(&mut dest)
43544            }
43545            MaskImage(ref value) => {
43546                value.to_css(&mut dest)
43547            }
43548            OffsetPath(ref value) => {
43549                value.to_css(&mut dest)
43550            }
43551            Perspective(ref value) => {
43552                value.to_css(&mut dest)
43553            }
43554            Quotes(ref value) => {
43555                value.to_css(&mut dest)
43556            }
43557            Rotate(ref value) => {
43558                value.to_css(&mut dest)
43559            }
43560            Scale(ref value) => {
43561                value.to_css(&mut dest)
43562            }
43563            TextIndent(ref value) => {
43564                value.to_css(&mut dest)
43565            }
43566            TextOverflow(ref value) => {
43567                value.to_css(&mut dest)
43568            }
43569            TextShadow(ref value) => {
43570                value.to_css(&mut dest)
43571            }
43572            Transform(ref value) => {
43573                value.to_css(&mut dest)
43574            }
43575            TransformOrigin(ref value) => {
43576                value.to_css(&mut dest)
43577            }
43578            TransitionBehavior(ref value) => {
43579                value.to_css(&mut dest)
43580            }
43581            TransitionDelay(ref value) => {
43582                value.to_css(&mut dest)
43583            }
43584            TransitionDuration(ref value) => {
43585                value.to_css(&mut dest)
43586            }
43587            TransitionProperty(ref value) => {
43588                value.to_css(&mut dest)
43589            }
43590            TransitionTimingFunction(ref value) => {
43591                value.to_css(&mut dest)
43592            }
43593            Translate(ref value) => {
43594                value.to_css(&mut dest)
43595            }
43596            VerticalAlign(ref value) => {
43597                value.to_css(&mut dest)
43598            }
43599            ViewTransitionClass(ref value) => {
43600                value.to_css(&mut dest)
43601            }
43602            ViewTransitionName(ref value) => {
43603                value.to_css(&mut dest)
43604            }
43605            WillChange(ref value) => {
43606                value.to_css(&mut dest)
43607            }
43608            WordSpacing(ref value) => {
43609                value.to_css(&mut dest)
43610            }
43611            XLang(ref value) => {
43612                value.to_css(&mut dest)
43613            }
43614            ObjectPosition(ref value) | PerspectiveOrigin(ref value) => {
43615                value.to_css(&mut dest)
43616            }
43617            GridTemplateColumns(ref value) | GridTemplateRows(ref value) => {
43618                value.to_css(&mut dest)
43619            }
43620            BorderImageSource(ref value) | ListStyleImage(ref value) => {
43621                value.to_css(&mut dest)
43622            }
43623            GridAutoColumns(ref value) | GridAutoRows(ref value) => {
43624                value.to_css(&mut dest)
43625            }
43626            OutlineOffset(ref value) | OverflowClipMargin(ref value) => {
43627                value.to_css(&mut dest)
43628            }
43629            ColumnGap(ref value) | RowGap(ref value) => {
43630                value.to_css(&mut dest)
43631            }
43632            GridColumnEnd(ref value) | GridColumnStart(ref value) | GridRowEnd(ref value) | GridRowStart(ref value) => {
43633                value.to_css(&mut dest)
43634            }
43635            MaxBlockSize(ref value) | MaxHeight(ref value) | MaxInlineSize(ref value) | MaxWidth(ref value) => {
43636                value.to_css(&mut dest)
43637            }
43638            BorderBottomLeftRadius(ref value) | BorderBottomRightRadius(ref value) | BorderEndEndRadius(ref value) | BorderEndStartRadius(ref value) | BorderStartEndRadius(ref value) | BorderStartStartRadius(ref value) | BorderTopLeftRadius(ref value) | BorderTopRightRadius(ref value) => {
43639                value.to_css(&mut dest)
43640            }
43641            Bottom(ref value) | InsetBlockEnd(ref value) | InsetBlockStart(ref value) | InsetInlineEnd(ref value) | InsetInlineStart(ref value) | Left(ref value) | Right(ref value) | Top(ref value) => {
43642                value.to_css(&mut dest)
43643            }
43644            MarginBlockEnd(ref value) | MarginBlockStart(ref value) | MarginBottom(ref value) | MarginInlineEnd(ref value) | MarginInlineStart(ref value) | MarginLeft(ref value) | MarginRight(ref value) | MarginTop(ref value) => {
43645                value.to_css(&mut dest)
43646            }
43647            PaddingBlockEnd(ref value) | PaddingBlockStart(ref value) | PaddingBottom(ref value) | PaddingInlineEnd(ref value) | PaddingInlineStart(ref value) | PaddingLeft(ref value) | PaddingRight(ref value) | PaddingTop(ref value) => {
43648                value.to_css(&mut dest)
43649            }
43650            BlockSize(ref value) | Height(ref value) | InlineSize(ref value) | MinBlockSize(ref value) | MinHeight(ref value) | MinInlineSize(ref value) | MinWidth(ref value) | Width(ref value) => {
43651                value.to_css(&mut dest)
43652            }
43653            BorderBlockEndWidth(ref value) | BorderBlockStartWidth(ref value) | BorderBottomWidth(ref value) | BorderInlineEndWidth(ref value) | BorderInlineStartWidth(ref value) | BorderLeftWidth(ref value) | BorderRightWidth(ref value) | BorderTopWidth(ref value) | OutlineWidth(ref value) => {
43654                value.to_css(&mut dest)
43655            }
43656            BackgroundColor(ref value) | BorderBlockEndColor(ref value) | BorderBlockStartColor(ref value) | BorderBottomColor(ref value) | BorderInlineEndColor(ref value) | BorderInlineStartColor(ref value) | BorderLeftColor(ref value) | BorderRightColor(ref value) | BorderTopColor(ref value) | OutlineColor(ref value) | TextDecorationColor(ref value) => {
43657                value.to_css(&mut dest)
43658            }
43659            CSSWideKeyword(ref value) => {
43660                value.to_css(&mut dest)
43661            }
43662            WithVariables(ref value) => {
43663                value.to_css(&mut dest)
43664            }
43665            Custom(ref value) => {
43666                value.to_css(&mut dest)
43667            }
43668        }
43669    }
43670
43671    /// Returns the color value of a given property, for high-contrast-mode tweaks.
43672    pub(super) fn color_value(&self) -> Option<&crate::values::specified::Color> {
43673        
43674static COLOR_PROPERTIES: LonghandIdSet = LonghandIdSet {
43675    
43676    storage: [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xffe0000]
43677};
43678
43679        
43680        let id = self.id().as_longhand()?;
43681        if !COLOR_PROPERTIES.contains(id) || !self.is_longhand_value() {
43682            return None;
43683        }
43684        let repr = self as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Color>;
43685        Some(unsafe { &(*repr).value })
43686    }
43687}
43688
43689/// A module with all the code related to animated properties.
43690///
43691/// This needs to be "included" by mako at least after all longhand modules,
43692/// given they populate the global data.
43693pub mod animated_properties {
43694    /* This Source Code Form is subject to the terms of the Mozilla Public
43695 * License, v. 2.0. If a copy of the MPL was not distributed with this
43696 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
43697
43698
43699
43700
43701
43702#[cfg(feature = "gecko")] use crate::gecko_bindings::structs::nsCSSPropertyID;
43703use crate::properties::{
43704    longhands::{
43705        self, visibility::computed_value::T as Visibility,
43706    },
43707    CSSWideKeyword, LonghandId, NonCustomPropertyIterator,
43708    PropertyDeclaration, PropertyDeclarationId,
43709};
43710#[cfg(feature = "gecko")] use crate::properties::{
43711    longhands::content_visibility::computed_value::T as ContentVisibility,
43712    NonCustomPropertyId,
43713};
43714use std::ptr;
43715use std::mem;
43716use fxhash::FxHashMap;
43717use super::ComputedValues;
43718use crate::properties::OwnedPropertyDeclarationId;
43719use crate::values::animated::{Animate, Procedure, ToAnimatedValue, ToAnimatedZero};
43720use crate::values::animated::effects::AnimatedFilter;
43721#[cfg(feature = "gecko")] use crate::values::computed::TransitionProperty;
43722use crate::values::computed::{ClipRect, Context};
43723use crate::values::computed::ToComputedValue;
43724use crate::values::distance::{ComputeSquaredDistance, SquaredDistance};
43725use crate::values::generics::effects::Filter;
43726use void::{self, Void};
43727use crate::properties_and_values::value::CustomAnimatedValue;
43728
43729/// Convert nsCSSPropertyID to TransitionProperty
43730#[cfg(feature = "gecko")]
43731#[allow(non_upper_case_globals)]
43732impl From<nsCSSPropertyID> for TransitionProperty {
43733    fn from(property: nsCSSPropertyID) -> TransitionProperty {
43734        TransitionProperty::NonCustom(NonCustomPropertyId::from_nscsspropertyid(property).unwrap())
43735    }
43736}
43737
43738/// A collection of AnimationValue that were composed on an element.
43739/// This HashMap stores the values that are the last AnimationValue to be
43740/// composed for each TransitionProperty.
43741pub type AnimationValueMap = FxHashMap<OwnedPropertyDeclarationId, AnimationValue>;
43742
43743/// An enum to represent a single computed value belonging to an animated
43744/// property in order to be interpolated with another one. When interpolating,
43745/// both values need to belong to the same property.
43746#[derive(Debug, MallocSizeOf)]
43747#[repr(u16)]
43748pub enum AnimationValue {
43749    /// `align-content`
43750    AlignContent(<crate::values::specified::AlignContent as ToComputedValue>::ComputedValue),
43751    /// `align-items`
43752    AlignItems(<crate::values::specified::AlignItems as ToComputedValue>::ComputedValue),
43753    /// `align-self`
43754    AlignSelf(<crate::values::specified::AlignSelf as ToComputedValue>::ComputedValue),
43755    /// `aspect-ratio`
43756    AspectRatio(<<crate::values::specified::AspectRatio as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43757    /// `backface-visibility`
43758    BackfaceVisibility(<longhands::backface_visibility::SpecifiedValue as ToComputedValue>::ComputedValue),
43759    /// `baseline-source`
43760    BaselineSource(<crate::values::specified::BaselineSource as ToComputedValue>::ComputedValue),
43761    /// `border-collapse`
43762    BorderCollapse(<longhands::border_collapse::SpecifiedValue as ToComputedValue>::ComputedValue),
43763    /// `border-image-repeat`
43764    BorderImageRepeat(<crate::values::specified::BorderImageRepeat as ToComputedValue>::ComputedValue),
43765    /// `box-sizing`
43766    BoxSizing(<longhands::box_sizing::SpecifiedValue as ToComputedValue>::ComputedValue),
43767    /// `caption-side`
43768    CaptionSide(<crate::values::specified::table::CaptionSide as ToComputedValue>::ComputedValue),
43769    /// `clear`
43770    Clear(<crate::values::specified::Clear as ToComputedValue>::ComputedValue),
43771    /// `column-count`
43772    ColumnCount(<<crate::values::specified::ColumnCount as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43773    /// `column-span`
43774    ColumnSpan(<longhands::column_span::SpecifiedValue as ToComputedValue>::ComputedValue),
43775    /// `contain`
43776    Contain(Void),
43777    /// `container-type`
43778    ContainerType(Void),
43779    /// `direction`
43780    Direction(Void),
43781    /// `display`
43782    Display(<crate::values::specified::Display as ToComputedValue>::ComputedValue),
43783    /// `empty-cells`
43784    EmptyCells(<longhands::empty_cells::SpecifiedValue as ToComputedValue>::ComputedValue),
43785    /// `flex-direction`
43786    FlexDirection(<longhands::flex_direction::SpecifiedValue as ToComputedValue>::ComputedValue),
43787    /// `flex-wrap`
43788    FlexWrap(<longhands::flex_wrap::SpecifiedValue as ToComputedValue>::ComputedValue),
43789    /// `float`
43790    Float(<crate::values::specified::Float as ToComputedValue>::ComputedValue),
43791    /// `font-language-override`
43792    FontLanguageOverride(<crate::values::specified::FontLanguageOverride as ToComputedValue>::ComputedValue),
43793    /// `font-stretch`
43794    FontStretch(<<crate::values::specified::FontStretch as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43795    /// `font-style`
43796    FontStyle(<<crate::values::specified::FontStyle as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43797    /// `font-variant-caps`
43798    FontVariantCaps(<longhands::font_variant_caps::SpecifiedValue as ToComputedValue>::ComputedValue),
43799    /// `font-weight`
43800    FontWeight(<<crate::values::specified::FontWeight as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43801    /// `grid-auto-flow`
43802    GridAutoFlow(<crate::values::specified::GridAutoFlow as ToComputedValue>::ComputedValue),
43803    /// `image-rendering`
43804    ImageRendering(<crate::values::specified::ImageRendering as ToComputedValue>::ComputedValue),
43805    /// `isolation`
43806    Isolation(<longhands::isolation::SpecifiedValue as ToComputedValue>::ComputedValue),
43807    /// `justify-content`
43808    JustifyContent(<crate::values::specified::JustifyContent as ToComputedValue>::ComputedValue),
43809    /// `justify-items`
43810    JustifyItems(<crate::values::specified::JustifyItems as ToComputedValue>::ComputedValue),
43811    /// `justify-self`
43812    JustifySelf(<crate::values::specified::JustifySelf as ToComputedValue>::ComputedValue),
43813    /// `list-style-position`
43814    ListStylePosition(<longhands::list_style_position::SpecifiedValue as ToComputedValue>::ComputedValue),
43815    /// `list-style-type`
43816    ListStyleType(<longhands::list_style_type::SpecifiedValue as ToComputedValue>::ComputedValue),
43817    /// `mix-blend-mode`
43818    MixBlendMode(<longhands::mix_blend_mode::SpecifiedValue as ToComputedValue>::ComputedValue),
43819    /// `object-fit`
43820    ObjectFit(<longhands::object_fit::SpecifiedValue as ToComputedValue>::ComputedValue),
43821    /// `opacity`
43822    Opacity(<<crate::values::specified::Opacity as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43823    /// `order`
43824    Order(<<crate::values::specified::Integer as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43825    /// `outline-style`
43826    OutlineStyle(<crate::values::specified::OutlineStyle as ToComputedValue>::ComputedValue),
43827    /// `overflow-wrap`
43828    OverflowWrap(<crate::values::specified::OverflowWrap as ToComputedValue>::ComputedValue),
43829    /// `pointer-events`
43830    PointerEvents(<crate::values::specified::PointerEvents as ToComputedValue>::ComputedValue),
43831    /// `position`
43832    Position(<crate::values::specified::PositionProperty as ToComputedValue>::ComputedValue),
43833    /// `-servo-overflow-clip-box`
43834    ServoOverflowClipBox(Void),
43835    /// `-servo-top-layer`
43836    ServoTopLayer(Void),
43837    /// `table-layout`
43838    TableLayout(<longhands::table_layout::SpecifiedValue as ToComputedValue>::ComputedValue),
43839    /// `text-align`
43840    TextAlign(<crate::values::specified::TextAlign as ToComputedValue>::ComputedValue),
43841    /// `text-align-last`
43842    TextAlignLast(<crate::values::specified::TextAlignLast as ToComputedValue>::ComputedValue),
43843    /// `text-decoration-line`
43844    TextDecorationLine(<crate::values::specified::TextDecorationLine as ToComputedValue>::ComputedValue),
43845    /// `text-decoration-style`
43846    TextDecorationStyle(<longhands::text_decoration_style::SpecifiedValue as ToComputedValue>::ComputedValue),
43847    /// `text-justify`
43848    TextJustify(<crate::values::specified::TextJustify as ToComputedValue>::ComputedValue),
43849    /// `text-rendering`
43850    TextRendering(<longhands::text_rendering::SpecifiedValue as ToComputedValue>::ComputedValue),
43851    /// `text-transform`
43852    TextTransform(<crate::values::specified::TextTransform as ToComputedValue>::ComputedValue),
43853    /// `text-wrap-mode`
43854    TextWrapMode(<longhands::text_wrap_mode::SpecifiedValue as ToComputedValue>::ComputedValue),
43855    /// `transform-style`
43856    TransformStyle(<crate::values::specified::TransformStyle as ToComputedValue>::ComputedValue),
43857    /// `unicode-bidi`
43858    UnicodeBidi(Void),
43859    /// `visibility`
43860    Visibility(<<longhands::visibility::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43861    /// `white-space-collapse`
43862    WhiteSpaceCollapse(<longhands::white_space_collapse::SpecifiedValue as ToComputedValue>::ComputedValue),
43863    /// `word-break`
43864    WordBreak(<crate::values::specified::WordBreak as ToComputedValue>::ComputedValue),
43865    /// `writing-mode`
43866    WritingMode(Void),
43867    /// `z-index`
43868    ZIndex(<<crate::values::specified::ZIndex as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43869    /// `zoom`
43870    Zoom(<<crate::values::specified::Zoom as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43871    /// `flex-grow`
43872    FlexGrow(<<crate::values::specified::NonNegativeNumber as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43873    /// `flex-shrink`
43874    FlexShrink(<<crate::values::specified::NonNegativeNumber as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43875    /// `overflow-block`
43876    OverflowBlock(Void),
43877    /// `overflow-inline`
43878    OverflowInline(Void),
43879    /// `overflow-x`
43880    OverflowX(<crate::values::specified::Overflow as ToComputedValue>::ComputedValue),
43881    /// `overflow-y`
43882    OverflowY(<crate::values::specified::Overflow as ToComputedValue>::ComputedValue),
43883    /// `border-block-end-style`
43884    BorderBlockEndStyle(Void),
43885    /// `border-block-start-style`
43886    BorderBlockStartStyle(Void),
43887    /// `border-bottom-style`
43888    BorderBottomStyle(<crate::values::specified::BorderStyle as ToComputedValue>::ComputedValue),
43889    /// `border-inline-end-style`
43890    BorderInlineEndStyle(Void),
43891    /// `border-inline-start-style`
43892    BorderInlineStartStyle(Void),
43893    /// `border-left-style`
43894    BorderLeftStyle(<crate::values::specified::BorderStyle as ToComputedValue>::ComputedValue),
43895    /// `border-right-style`
43896    BorderRightStyle(<crate::values::specified::BorderStyle as ToComputedValue>::ComputedValue),
43897    /// `border-top-style`
43898    BorderTopStyle(<crate::values::specified::BorderStyle as ToComputedValue>::ComputedValue),
43899    /// `animation-composition`
43900    AnimationComposition(Void),
43901    /// `animation-delay`
43902    AnimationDelay(Void),
43903    /// `animation-direction`
43904    AnimationDirection(Void),
43905    /// `animation-duration`
43906    AnimationDuration(Void),
43907    /// `animation-fill-mode`
43908    AnimationFillMode(Void),
43909    /// `animation-iteration-count`
43910    AnimationIterationCount(Void),
43911    /// `animation-name`
43912    AnimationName(Void),
43913    /// `animation-play-state`
43914    AnimationPlayState(Void),
43915    /// `animation-timeline`
43916    AnimationTimeline(Void),
43917    /// `animation-timing-function`
43918    AnimationTimingFunction(Void),
43919    /// `backdrop-filter`
43920    BackdropFilter(<<longhands::backdrop_filter::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43921    /// `background-attachment`
43922    BackgroundAttachment(<longhands::background_attachment::SpecifiedValue as ToComputedValue>::ComputedValue),
43923    /// `background-clip`
43924    BackgroundClip(<longhands::background_clip::SpecifiedValue as ToComputedValue>::ComputedValue),
43925    /// `background-image`
43926    BackgroundImage(<longhands::background_image::SpecifiedValue as ToComputedValue>::ComputedValue),
43927    /// `background-origin`
43928    BackgroundOrigin(<longhands::background_origin::SpecifiedValue as ToComputedValue>::ComputedValue),
43929    /// `background-position-x`
43930    BackgroundPositionX(<<longhands::background_position_x::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43931    /// `background-position-y`
43932    BackgroundPositionY(<<longhands::background_position_y::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43933    /// `background-repeat`
43934    BackgroundRepeat(<longhands::background_repeat::SpecifiedValue as ToComputedValue>::ComputedValue),
43935    /// `background-size`
43936    BackgroundSize(<<longhands::background_size::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43937    /// `border-image-outset`
43938    BorderImageOutset(<<crate::values::specified::NonNegativeLengthOrNumberRect as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43939    /// `border-image-slice`
43940    BorderImageSlice(<<crate::values::specified::BorderImageSlice as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43941    /// `border-image-width`
43942    BorderImageWidth(<<crate::values::specified::BorderImageWidth as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43943    /// `border-spacing`
43944    BorderSpacing(<<crate::values::specified::BorderSpacing as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43945    /// `box-shadow`
43946    BoxShadow(<<longhands::box_shadow::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43947    /// `clip`
43948    Clip(<<crate::values::specified::ClipRectOrAuto as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43949    /// `clip-path`
43950    ClipPath(<<crate::values::specified::basic_shape::ClipPath as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43951    /// `color`
43952    Color(<<crate::values::specified::ColorPropertyValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43953    /// `color-scheme`
43954    ColorScheme(<crate::values::specified::ColorScheme as ToComputedValue>::ComputedValue),
43955    /// `column-width`
43956    ColumnWidth(<<crate::values::specified::length::NonNegativeLengthOrAuto as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43957    /// `container-name`
43958    ContainerName(Void),
43959    /// `content`
43960    Content(<crate::values::specified::Content as ToComputedValue>::ComputedValue),
43961    /// `counter-increment`
43962    CounterIncrement(<crate::values::specified::CounterIncrement as ToComputedValue>::ComputedValue),
43963    /// `counter-reset`
43964    CounterReset(<crate::values::specified::CounterReset as ToComputedValue>::ComputedValue),
43965    /// `cursor`
43966    Cursor(<crate::values::specified::Cursor as ToComputedValue>::ComputedValue),
43967    /// `filter`
43968    Filter(<<longhands::filter::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43969    /// `flex-basis`
43970    FlexBasis(<<crate::values::specified::FlexBasis as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43971    /// `font-family`
43972    FontFamily(<crate::values::specified::FontFamily as ToComputedValue>::ComputedValue),
43973    /// `font-size`
43974    FontSize(<<crate::values::specified::FontSize as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43975    /// `font-variation-settings`
43976    FontVariationSettings(<<crate::values::specified::FontVariationSettings as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43977    /// `grid-template-areas`
43978    GridTemplateAreas(<crate::values::specified::GridTemplateAreas as ToComputedValue>::ComputedValue),
43979    /// `letter-spacing`
43980    LetterSpacing(<<crate::values::specified::LetterSpacing as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43981    /// `line-height`
43982    LineHeight(<<crate::values::specified::LineHeight as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43983    /// `mask-image`
43984    MaskImage(<longhands::mask_image::SpecifiedValue as ToComputedValue>::ComputedValue),
43985    /// `offset-path`
43986    OffsetPath(<<crate::values::specified::OffsetPath as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43987    /// `perspective`
43988    Perspective(<<crate::values::specified::Perspective as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43989    /// `quotes`
43990    Quotes(<crate::values::specified::Quotes as ToComputedValue>::ComputedValue),
43991    /// `rotate`
43992    Rotate(<<crate::values::specified::Rotate as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43993    /// `scale`
43994    Scale(<<crate::values::specified::Scale as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43995    /// `text-indent`
43996    TextIndent(<<crate::values::specified::TextIndent as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
43997    /// `text-overflow`
43998    TextOverflow(<crate::values::specified::TextOverflow as ToComputedValue>::ComputedValue),
43999    /// `text-shadow`
44000    TextShadow(<<longhands::text_shadow::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44001    /// `transform`
44002    Transform(<<crate::values::specified::Transform as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44003    /// `transform-origin`
44004    TransformOrigin(<<crate::values::specified::TransformOrigin as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44005    /// `transition-behavior`
44006    TransitionBehavior(Void),
44007    /// `transition-delay`
44008    TransitionDelay(Void),
44009    /// `transition-duration`
44010    TransitionDuration(Void),
44011    /// `transition-property`
44012    TransitionProperty(Void),
44013    /// `transition-timing-function`
44014    TransitionTimingFunction(Void),
44015    /// `translate`
44016    Translate(<<crate::values::specified::Translate as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44017    /// `vertical-align`
44018    VerticalAlign(<<crate::values::specified::VerticalAlign as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44019    /// `view-transition-class`
44020    ViewTransitionClass(<crate::values::specified::ViewTransitionClass as ToComputedValue>::ComputedValue),
44021    /// `view-transition-name`
44022    ViewTransitionName(<crate::values::specified::ViewTransitionName as ToComputedValue>::ComputedValue),
44023    /// `will-change`
44024    WillChange(Void),
44025    /// `word-spacing`
44026    WordSpacing(<<crate::values::specified::WordSpacing as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44027    /// `-x-lang`
44028    XLang(Void),
44029    /// `object-position`
44030    ObjectPosition(<<crate::values::specified::Position as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44031    /// `perspective-origin`
44032    PerspectiveOrigin(<<crate::values::specified::Position as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44033    /// `grid-template-columns`
44034    GridTemplateColumns(<<crate::values::specified::GridTemplateComponent as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44035    /// `grid-template-rows`
44036    GridTemplateRows(<<crate::values::specified::GridTemplateComponent as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44037    /// `border-image-source`
44038    BorderImageSource(<crate::values::specified::Image as ToComputedValue>::ComputedValue),
44039    /// `list-style-image`
44040    ListStyleImage(<crate::values::specified::Image as ToComputedValue>::ComputedValue),
44041    /// `grid-auto-columns`
44042    GridAutoColumns(<crate::values::specified::ImplicitGridTracks as ToComputedValue>::ComputedValue),
44043    /// `grid-auto-rows`
44044    GridAutoRows(<crate::values::specified::ImplicitGridTracks as ToComputedValue>::ComputedValue),
44045    /// `outline-offset`
44046    OutlineOffset(<<crate::values::specified::Length as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44047    /// `overflow-clip-margin`
44048    OverflowClipMargin(<<crate::values::specified::Length as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44049    /// `column-gap`
44050    ColumnGap(<<crate::values::specified::length::NonNegativeLengthPercentageOrNormal as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44051    /// `row-gap`
44052    RowGap(<<crate::values::specified::length::NonNegativeLengthPercentageOrNormal as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44053    /// `grid-column-end`
44054    GridColumnEnd(<crate::values::specified::GridLine as ToComputedValue>::ComputedValue),
44055    /// `grid-column-start`
44056    GridColumnStart(<crate::values::specified::GridLine as ToComputedValue>::ComputedValue),
44057    /// `grid-row-end`
44058    GridRowEnd(<crate::values::specified::GridLine as ToComputedValue>::ComputedValue),
44059    /// `grid-row-start`
44060    GridRowStart(<crate::values::specified::GridLine as ToComputedValue>::ComputedValue),
44061    /// `max-block-size`
44062    MaxBlockSize(Void),
44063    /// `max-height`
44064    MaxHeight(<<crate::values::specified::MaxSize as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44065    /// `max-inline-size`
44066    MaxInlineSize(Void),
44067    /// `max-width`
44068    MaxWidth(<<crate::values::specified::MaxSize as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44069    /// `border-bottom-left-radius`
44070    BorderBottomLeftRadius(<<crate::values::specified::BorderCornerRadius as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44071    /// `border-bottom-right-radius`
44072    BorderBottomRightRadius(<<crate::values::specified::BorderCornerRadius as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44073    /// `border-end-end-radius`
44074    BorderEndEndRadius(Void),
44075    /// `border-end-start-radius`
44076    BorderEndStartRadius(Void),
44077    /// `border-start-end-radius`
44078    BorderStartEndRadius(Void),
44079    /// `border-start-start-radius`
44080    BorderStartStartRadius(Void),
44081    /// `border-top-left-radius`
44082    BorderTopLeftRadius(<<crate::values::specified::BorderCornerRadius as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44083    /// `border-top-right-radius`
44084    BorderTopRightRadius(<<crate::values::specified::BorderCornerRadius as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44085    /// `bottom`
44086    Bottom(<<crate::values::specified::Inset as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44087    /// `inset-block-end`
44088    InsetBlockEnd(Void),
44089    /// `inset-block-start`
44090    InsetBlockStart(Void),
44091    /// `inset-inline-end`
44092    InsetInlineEnd(Void),
44093    /// `inset-inline-start`
44094    InsetInlineStart(Void),
44095    /// `left`
44096    Left(<<crate::values::specified::Inset as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44097    /// `right`
44098    Right(<<crate::values::specified::Inset as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44099    /// `top`
44100    Top(<<crate::values::specified::Inset as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44101    /// `margin-block-end`
44102    MarginBlockEnd(Void),
44103    /// `margin-block-start`
44104    MarginBlockStart(Void),
44105    /// `margin-bottom`
44106    MarginBottom(<<crate::values::specified::Margin as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44107    /// `margin-inline-end`
44108    MarginInlineEnd(Void),
44109    /// `margin-inline-start`
44110    MarginInlineStart(Void),
44111    /// `margin-left`
44112    MarginLeft(<<crate::values::specified::Margin as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44113    /// `margin-right`
44114    MarginRight(<<crate::values::specified::Margin as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44115    /// `margin-top`
44116    MarginTop(<<crate::values::specified::Margin as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44117    /// `padding-block-end`
44118    PaddingBlockEnd(Void),
44119    /// `padding-block-start`
44120    PaddingBlockStart(Void),
44121    /// `padding-bottom`
44122    PaddingBottom(<<crate::values::specified::NonNegativeLengthPercentage as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44123    /// `padding-inline-end`
44124    PaddingInlineEnd(Void),
44125    /// `padding-inline-start`
44126    PaddingInlineStart(Void),
44127    /// `padding-left`
44128    PaddingLeft(<<crate::values::specified::NonNegativeLengthPercentage as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44129    /// `padding-right`
44130    PaddingRight(<<crate::values::specified::NonNegativeLengthPercentage as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44131    /// `padding-top`
44132    PaddingTop(<<crate::values::specified::NonNegativeLengthPercentage as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44133    /// `block-size`
44134    BlockSize(Void),
44135    /// `height`
44136    Height(<<crate::values::specified::Size as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44137    /// `inline-size`
44138    InlineSize(Void),
44139    /// `min-block-size`
44140    MinBlockSize(Void),
44141    /// `min-height`
44142    MinHeight(<<crate::values::specified::Size as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44143    /// `min-inline-size`
44144    MinInlineSize(Void),
44145    /// `min-width`
44146    MinWidth(<<crate::values::specified::Size as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44147    /// `width`
44148    Width(<<crate::values::specified::Size as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44149    /// `border-block-end-width`
44150    BorderBlockEndWidth(Void),
44151    /// `border-block-start-width`
44152    BorderBlockStartWidth(Void),
44153    /// `border-bottom-width`
44154    BorderBottomWidth(<<crate::values::specified::BorderSideWidth as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44155    /// `border-inline-end-width`
44156    BorderInlineEndWidth(Void),
44157    /// `border-inline-start-width`
44158    BorderInlineStartWidth(Void),
44159    /// `border-left-width`
44160    BorderLeftWidth(<<crate::values::specified::BorderSideWidth as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44161    /// `border-right-width`
44162    BorderRightWidth(<<crate::values::specified::BorderSideWidth as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44163    /// `border-top-width`
44164    BorderTopWidth(<<crate::values::specified::BorderSideWidth as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44165    /// `outline-width`
44166    OutlineWidth(<<crate::values::specified::BorderSideWidth as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44167    /// `background-color`
44168    BackgroundColor(<<crate::values::specified::Color as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44169    /// `border-block-end-color`
44170    BorderBlockEndColor(Void),
44171    /// `border-block-start-color`
44172    BorderBlockStartColor(Void),
44173    /// `border-bottom-color`
44174    BorderBottomColor(<<crate::values::specified::Color as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44175    /// `border-inline-end-color`
44176    BorderInlineEndColor(Void),
44177    /// `border-inline-start-color`
44178    BorderInlineStartColor(Void),
44179    /// `border-left-color`
44180    BorderLeftColor(<<crate::values::specified::Color as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44181    /// `border-right-color`
44182    BorderRightColor(<<crate::values::specified::Color as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44183    /// `border-top-color`
44184    BorderTopColor(<<crate::values::specified::Color as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44185    /// `outline-color`
44186    OutlineColor(<<crate::values::specified::Color as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44187    /// `text-decoration-color`
44188    TextDecorationColor(<<crate::values::specified::Color as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44189    /// A custom property.
44190    Custom(CustomAnimatedValue),
44191}
44192
44193
44194
44195#[repr(C)]
44196struct AnimationValueVariantRepr<T> {
44197    tag: u16,
44198    value: T
44199}
44200
44201impl Clone for AnimationValue {
44202    #[inline]
44203    fn clone(&self) -> Self {
44204        use self::AnimationValue::*;
44205
44206        
44207
44208        let self_tag = unsafe { *(self as *const _ as *const u16) };
44209        if self_tag <= LonghandId::BorderTopStyle as u16 {
44210            #[derive(Clone, Copy)]
44211            #[repr(u16)]
44212            enum CopyVariants {
44213                _AlignContent(<crate::values::specified::AlignContent as ToComputedValue>::ComputedValue),
44214                _AlignItems(<crate::values::specified::AlignItems as ToComputedValue>::ComputedValue),
44215                _AlignSelf(<crate::values::specified::AlignSelf as ToComputedValue>::ComputedValue),
44216                _AspectRatio(<<crate::values::specified::AspectRatio as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44217                _BackfaceVisibility(<longhands::backface_visibility::SpecifiedValue as ToComputedValue>::ComputedValue),
44218                _BaselineSource(<crate::values::specified::BaselineSource as ToComputedValue>::ComputedValue),
44219                _BorderCollapse(<longhands::border_collapse::SpecifiedValue as ToComputedValue>::ComputedValue),
44220                _BorderImageRepeat(<crate::values::specified::BorderImageRepeat as ToComputedValue>::ComputedValue),
44221                _BoxSizing(<longhands::box_sizing::SpecifiedValue as ToComputedValue>::ComputedValue),
44222                _CaptionSide(<crate::values::specified::table::CaptionSide as ToComputedValue>::ComputedValue),
44223                _Clear(<crate::values::specified::Clear as ToComputedValue>::ComputedValue),
44224                _ColumnCount(<<crate::values::specified::ColumnCount as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44225                _ColumnSpan(<longhands::column_span::SpecifiedValue as ToComputedValue>::ComputedValue),
44226                _Display(<crate::values::specified::Display as ToComputedValue>::ComputedValue),
44227                _EmptyCells(<longhands::empty_cells::SpecifiedValue as ToComputedValue>::ComputedValue),
44228                _FlexDirection(<longhands::flex_direction::SpecifiedValue as ToComputedValue>::ComputedValue),
44229                _FlexWrap(<longhands::flex_wrap::SpecifiedValue as ToComputedValue>::ComputedValue),
44230                _Float(<crate::values::specified::Float as ToComputedValue>::ComputedValue),
44231                _FontLanguageOverride(<crate::values::specified::FontLanguageOverride as ToComputedValue>::ComputedValue),
44232                _FontStretch(<<crate::values::specified::FontStretch as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44233                _FontStyle(<<crate::values::specified::FontStyle as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44234                _FontVariantCaps(<longhands::font_variant_caps::SpecifiedValue as ToComputedValue>::ComputedValue),
44235                _FontWeight(<<crate::values::specified::FontWeight as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44236                _GridAutoFlow(<crate::values::specified::GridAutoFlow as ToComputedValue>::ComputedValue),
44237                _ImageRendering(<crate::values::specified::ImageRendering as ToComputedValue>::ComputedValue),
44238                _Isolation(<longhands::isolation::SpecifiedValue as ToComputedValue>::ComputedValue),
44239                _JustifyContent(<crate::values::specified::JustifyContent as ToComputedValue>::ComputedValue),
44240                _JustifyItems(<crate::values::specified::JustifyItems as ToComputedValue>::ComputedValue),
44241                _JustifySelf(<crate::values::specified::JustifySelf as ToComputedValue>::ComputedValue),
44242                _ListStylePosition(<longhands::list_style_position::SpecifiedValue as ToComputedValue>::ComputedValue),
44243                _ListStyleType(<longhands::list_style_type::SpecifiedValue as ToComputedValue>::ComputedValue),
44244                _MixBlendMode(<longhands::mix_blend_mode::SpecifiedValue as ToComputedValue>::ComputedValue),
44245                _ObjectFit(<longhands::object_fit::SpecifiedValue as ToComputedValue>::ComputedValue),
44246                _Opacity(<<crate::values::specified::Opacity as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44247                _Order(<<crate::values::specified::Integer as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44248                _OutlineStyle(<crate::values::specified::OutlineStyle as ToComputedValue>::ComputedValue),
44249                _OverflowWrap(<crate::values::specified::OverflowWrap as ToComputedValue>::ComputedValue),
44250                _PointerEvents(<crate::values::specified::PointerEvents as ToComputedValue>::ComputedValue),
44251                _Position(<crate::values::specified::PositionProperty as ToComputedValue>::ComputedValue),
44252                _TableLayout(<longhands::table_layout::SpecifiedValue as ToComputedValue>::ComputedValue),
44253                _TextAlign(<crate::values::specified::TextAlign as ToComputedValue>::ComputedValue),
44254                _TextAlignLast(<crate::values::specified::TextAlignLast as ToComputedValue>::ComputedValue),
44255                _TextDecorationLine(<crate::values::specified::TextDecorationLine as ToComputedValue>::ComputedValue),
44256                _TextDecorationStyle(<longhands::text_decoration_style::SpecifiedValue as ToComputedValue>::ComputedValue),
44257                _TextJustify(<crate::values::specified::TextJustify as ToComputedValue>::ComputedValue),
44258                _TextRendering(<longhands::text_rendering::SpecifiedValue as ToComputedValue>::ComputedValue),
44259                _TextTransform(<crate::values::specified::TextTransform as ToComputedValue>::ComputedValue),
44260                _TextWrapMode(<longhands::text_wrap_mode::SpecifiedValue as ToComputedValue>::ComputedValue),
44261                _TransformStyle(<crate::values::specified::TransformStyle as ToComputedValue>::ComputedValue),
44262                _Visibility(<<longhands::visibility::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44263                _WhiteSpaceCollapse(<longhands::white_space_collapse::SpecifiedValue as ToComputedValue>::ComputedValue),
44264                _WordBreak(<crate::values::specified::WordBreak as ToComputedValue>::ComputedValue),
44265                _ZIndex(<<crate::values::specified::ZIndex as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44266                _Zoom(<<crate::values::specified::Zoom as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44267                _FlexGrow(<<crate::values::specified::NonNegativeNumber as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44268                _FlexShrink(<<crate::values::specified::NonNegativeNumber as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue),
44269                _OverflowX(<crate::values::specified::Overflow as ToComputedValue>::ComputedValue),
44270                _OverflowY(<crate::values::specified::Overflow as ToComputedValue>::ComputedValue),
44271                _BorderBottomStyle(<crate::values::specified::BorderStyle as ToComputedValue>::ComputedValue),
44272                _BorderLeftStyle(<crate::values::specified::BorderStyle as ToComputedValue>::ComputedValue),
44273                _BorderRightStyle(<crate::values::specified::BorderStyle as ToComputedValue>::ComputedValue),
44274                _BorderTopStyle(<crate::values::specified::BorderStyle as ToComputedValue>::ComputedValue),
44275            }
44276
44277            unsafe {
44278                let mut out = mem::MaybeUninit::uninit();
44279                ptr::write(
44280                    out.as_mut_ptr() as *mut CopyVariants,
44281                    *(self as *const _ as *const CopyVariants),
44282                );
44283                return out.assume_init();
44284            }
44285        }
44286
44287        match *self {
44288            
44289            BackdropFilter(ref value) => {
44290                BackdropFilter(value.clone())
44291            }
44292            
44293            BackgroundAttachment(ref value) => {
44294                BackgroundAttachment(value.clone())
44295            }
44296            
44297            BackgroundClip(ref value) => {
44298                BackgroundClip(value.clone())
44299            }
44300            
44301            BackgroundImage(ref value) => {
44302                BackgroundImage(value.clone())
44303            }
44304            
44305            BackgroundOrigin(ref value) => {
44306                BackgroundOrigin(value.clone())
44307            }
44308            
44309            BackgroundPositionX(ref value) => {
44310                BackgroundPositionX(value.clone())
44311            }
44312            
44313            BackgroundPositionY(ref value) => {
44314                BackgroundPositionY(value.clone())
44315            }
44316            
44317            BackgroundRepeat(ref value) => {
44318                BackgroundRepeat(value.clone())
44319            }
44320            
44321            BackgroundSize(ref value) => {
44322                BackgroundSize(value.clone())
44323            }
44324            
44325            BorderImageOutset(ref value) => {
44326                BorderImageOutset(value.clone())
44327            }
44328            
44329            BorderImageSlice(ref value) => {
44330                BorderImageSlice(value.clone())
44331            }
44332            
44333            BorderImageWidth(ref value) => {
44334                BorderImageWidth(value.clone())
44335            }
44336            
44337            BorderSpacing(ref value) => {
44338                BorderSpacing(value.clone())
44339            }
44340            
44341            BoxShadow(ref value) => {
44342                BoxShadow(value.clone())
44343            }
44344            
44345            Clip(ref value) => {
44346                Clip(value.clone())
44347            }
44348            
44349            ClipPath(ref value) => {
44350                ClipPath(value.clone())
44351            }
44352            
44353            Color(ref value) => {
44354                Color(value.clone())
44355            }
44356            
44357            ColorScheme(ref value) => {
44358                ColorScheme(value.clone())
44359            }
44360            
44361            ColumnWidth(ref value) => {
44362                ColumnWidth(value.clone())
44363            }
44364            
44365            Content(ref value) => {
44366                Content(value.clone())
44367            }
44368            
44369            CounterIncrement(ref value) => {
44370                CounterIncrement(value.clone())
44371            }
44372            
44373            CounterReset(ref value) => {
44374                CounterReset(value.clone())
44375            }
44376            
44377            Cursor(ref value) => {
44378                Cursor(value.clone())
44379            }
44380            
44381            Filter(ref value) => {
44382                Filter(value.clone())
44383            }
44384            
44385            FlexBasis(ref value) => {
44386                FlexBasis(value.clone())
44387            }
44388            
44389            FontFamily(ref value) => {
44390                FontFamily(value.clone())
44391            }
44392            
44393            FontSize(ref value) => {
44394                FontSize(value.clone())
44395            }
44396            
44397            FontVariationSettings(ref value) => {
44398                FontVariationSettings(value.clone())
44399            }
44400            
44401            GridTemplateAreas(ref value) => {
44402                GridTemplateAreas(value.clone())
44403            }
44404            
44405            LetterSpacing(ref value) => {
44406                LetterSpacing(value.clone())
44407            }
44408            
44409            LineHeight(ref value) => {
44410                LineHeight(value.clone())
44411            }
44412            
44413            MaskImage(ref value) => {
44414                MaskImage(value.clone())
44415            }
44416            
44417            OffsetPath(ref value) => {
44418                OffsetPath(value.clone())
44419            }
44420            
44421            Perspective(ref value) => {
44422                Perspective(value.clone())
44423            }
44424            
44425            Quotes(ref value) => {
44426                Quotes(value.clone())
44427            }
44428            
44429            Rotate(ref value) => {
44430                Rotate(value.clone())
44431            }
44432            
44433            Scale(ref value) => {
44434                Scale(value.clone())
44435            }
44436            
44437            TextIndent(ref value) => {
44438                TextIndent(value.clone())
44439            }
44440            
44441            TextOverflow(ref value) => {
44442                TextOverflow(value.clone())
44443            }
44444            
44445            TextShadow(ref value) => {
44446                TextShadow(value.clone())
44447            }
44448            
44449            Transform(ref value) => {
44450                Transform(value.clone())
44451            }
44452            
44453            TransformOrigin(ref value) => {
44454                TransformOrigin(value.clone())
44455            }
44456            
44457            Translate(ref value) => {
44458                Translate(value.clone())
44459            }
44460            
44461            VerticalAlign(ref value) => {
44462                VerticalAlign(value.clone())
44463            }
44464            
44465            ViewTransitionClass(ref value) => {
44466                ViewTransitionClass(value.clone())
44467            }
44468            
44469            ViewTransitionName(ref value) => {
44470                ViewTransitionName(value.clone())
44471            }
44472            
44473            WordSpacing(ref value) => {
44474                WordSpacing(value.clone())
44475            }
44476            
44477            ObjectPosition(ref value) |
44478PerspectiveOrigin(ref value) => {
44479                unsafe {
44480                    let mut out = mem::MaybeUninit::uninit();
44481                    ptr::write(
44482                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Position as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
44483                        AnimationValueVariantRepr {
44484                            tag: *(self as *const _ as *const u16),
44485                            value: value.clone(),
44486                        },
44487                    );
44488                    out.assume_init()
44489                }
44490            }
44491            
44492            GridTemplateColumns(ref value) |
44493GridTemplateRows(ref value) => {
44494                unsafe {
44495                    let mut out = mem::MaybeUninit::uninit();
44496                    ptr::write(
44497                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::GridTemplateComponent as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
44498                        AnimationValueVariantRepr {
44499                            tag: *(self as *const _ as *const u16),
44500                            value: value.clone(),
44501                        },
44502                    );
44503                    out.assume_init()
44504                }
44505            }
44506            
44507            BorderImageSource(ref value) |
44508ListStyleImage(ref value) => {
44509                unsafe {
44510                    let mut out = mem::MaybeUninit::uninit();
44511                    ptr::write(
44512                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::Image as ToComputedValue>::ComputedValue>,
44513                        AnimationValueVariantRepr {
44514                            tag: *(self as *const _ as *const u16),
44515                            value: value.clone(),
44516                        },
44517                    );
44518                    out.assume_init()
44519                }
44520            }
44521            
44522            GridAutoColumns(ref value) |
44523GridAutoRows(ref value) => {
44524                unsafe {
44525                    let mut out = mem::MaybeUninit::uninit();
44526                    ptr::write(
44527                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::ImplicitGridTracks as ToComputedValue>::ComputedValue>,
44528                        AnimationValueVariantRepr {
44529                            tag: *(self as *const _ as *const u16),
44530                            value: value.clone(),
44531                        },
44532                    );
44533                    out.assume_init()
44534                }
44535            }
44536            
44537            OutlineOffset(ref value) |
44538OverflowClipMargin(ref value) => {
44539                unsafe {
44540                    let mut out = mem::MaybeUninit::uninit();
44541                    ptr::write(
44542                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Length as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
44543                        AnimationValueVariantRepr {
44544                            tag: *(self as *const _ as *const u16),
44545                            value: value.clone(),
44546                        },
44547                    );
44548                    out.assume_init()
44549                }
44550            }
44551            
44552            ColumnGap(ref value) |
44553RowGap(ref value) => {
44554                unsafe {
44555                    let mut out = mem::MaybeUninit::uninit();
44556                    ptr::write(
44557                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::length::NonNegativeLengthPercentageOrNormal as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
44558                        AnimationValueVariantRepr {
44559                            tag: *(self as *const _ as *const u16),
44560                            value: value.clone(),
44561                        },
44562                    );
44563                    out.assume_init()
44564                }
44565            }
44566            
44567            GridColumnEnd(ref value) |
44568GridColumnStart(ref value) |
44569GridRowEnd(ref value) |
44570GridRowStart(ref value) => {
44571                unsafe {
44572                    let mut out = mem::MaybeUninit::uninit();
44573                    ptr::write(
44574                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::GridLine as ToComputedValue>::ComputedValue>,
44575                        AnimationValueVariantRepr {
44576                            tag: *(self as *const _ as *const u16),
44577                            value: value.clone(),
44578                        },
44579                    );
44580                    out.assume_init()
44581                }
44582            }
44583            
44584            MaxHeight(ref value) |
44585MaxWidth(ref value) => {
44586                unsafe {
44587                    let mut out = mem::MaybeUninit::uninit();
44588                    ptr::write(
44589                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::MaxSize as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
44590                        AnimationValueVariantRepr {
44591                            tag: *(self as *const _ as *const u16),
44592                            value: value.clone(),
44593                        },
44594                    );
44595                    out.assume_init()
44596                }
44597            }
44598            
44599            BorderBottomLeftRadius(ref value) |
44600BorderBottomRightRadius(ref value) |
44601BorderTopLeftRadius(ref value) |
44602BorderTopRightRadius(ref value) => {
44603                unsafe {
44604                    let mut out = mem::MaybeUninit::uninit();
44605                    ptr::write(
44606                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::BorderCornerRadius as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
44607                        AnimationValueVariantRepr {
44608                            tag: *(self as *const _ as *const u16),
44609                            value: value.clone(),
44610                        },
44611                    );
44612                    out.assume_init()
44613                }
44614            }
44615            
44616            Bottom(ref value) |
44617Left(ref value) |
44618Right(ref value) |
44619Top(ref value) => {
44620                unsafe {
44621                    let mut out = mem::MaybeUninit::uninit();
44622                    ptr::write(
44623                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Inset as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
44624                        AnimationValueVariantRepr {
44625                            tag: *(self as *const _ as *const u16),
44626                            value: value.clone(),
44627                        },
44628                    );
44629                    out.assume_init()
44630                }
44631            }
44632            
44633            MarginBottom(ref value) |
44634MarginLeft(ref value) |
44635MarginRight(ref value) |
44636MarginTop(ref value) => {
44637                unsafe {
44638                    let mut out = mem::MaybeUninit::uninit();
44639                    ptr::write(
44640                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Margin as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
44641                        AnimationValueVariantRepr {
44642                            tag: *(self as *const _ as *const u16),
44643                            value: value.clone(),
44644                        },
44645                    );
44646                    out.assume_init()
44647                }
44648            }
44649            
44650            PaddingBottom(ref value) |
44651PaddingLeft(ref value) |
44652PaddingRight(ref value) |
44653PaddingTop(ref value) => {
44654                unsafe {
44655                    let mut out = mem::MaybeUninit::uninit();
44656                    ptr::write(
44657                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::NonNegativeLengthPercentage as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
44658                        AnimationValueVariantRepr {
44659                            tag: *(self as *const _ as *const u16),
44660                            value: value.clone(),
44661                        },
44662                    );
44663                    out.assume_init()
44664                }
44665            }
44666            
44667            Height(ref value) |
44668MinHeight(ref value) |
44669MinWidth(ref value) |
44670Width(ref value) => {
44671                unsafe {
44672                    let mut out = mem::MaybeUninit::uninit();
44673                    ptr::write(
44674                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Size as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
44675                        AnimationValueVariantRepr {
44676                            tag: *(self as *const _ as *const u16),
44677                            value: value.clone(),
44678                        },
44679                    );
44680                    out.assume_init()
44681                }
44682            }
44683            
44684            BorderBottomWidth(ref value) |
44685BorderLeftWidth(ref value) |
44686BorderRightWidth(ref value) |
44687BorderTopWidth(ref value) |
44688OutlineWidth(ref value) => {
44689                unsafe {
44690                    let mut out = mem::MaybeUninit::uninit();
44691                    ptr::write(
44692                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::BorderSideWidth as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
44693                        AnimationValueVariantRepr {
44694                            tag: *(self as *const _ as *const u16),
44695                            value: value.clone(),
44696                        },
44697                    );
44698                    out.assume_init()
44699                }
44700            }
44701            
44702            BackgroundColor(ref value) |
44703BorderBottomColor(ref value) |
44704BorderLeftColor(ref value) |
44705BorderRightColor(ref value) |
44706BorderTopColor(ref value) |
44707OutlineColor(ref value) |
44708TextDecorationColor(ref value) => {
44709                unsafe {
44710                    let mut out = mem::MaybeUninit::uninit();
44711                    ptr::write(
44712                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Color as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
44713                        AnimationValueVariantRepr {
44714                            tag: *(self as *const _ as *const u16),
44715                            value: value.clone(),
44716                        },
44717                    );
44718                    out.assume_init()
44719                }
44720            }
44721            Custom(ref animated_value) => Custom(animated_value.clone()),
44722            _ => unsafe { debug_unreachable!() }
44723        }
44724    }
44725}
44726
44727impl PartialEq for AnimationValue {
44728    #[inline]
44729    fn eq(&self, other: &Self) -> bool {
44730        use self::AnimationValue::*;
44731
44732        unsafe {
44733            let this_tag = *(self as *const _ as *const u16);
44734            let other_tag = *(other as *const _ as *const u16);
44735            if this_tag != other_tag {
44736                return false;
44737            }
44738
44739            match *self {
44740                AlignContent(ref this) => {
44741                    let other_repr =
44742                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::AlignContent as ToComputedValue>::ComputedValue>);
44743                    *this == other_repr.value
44744                }
44745                AlignItems(ref this) => {
44746                    let other_repr =
44747                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::AlignItems as ToComputedValue>::ComputedValue>);
44748                    *this == other_repr.value
44749                }
44750                AlignSelf(ref this) => {
44751                    let other_repr =
44752                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::AlignSelf as ToComputedValue>::ComputedValue>);
44753                    *this == other_repr.value
44754                }
44755                AspectRatio(ref this) => {
44756                    let other_repr =
44757                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::AspectRatio as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
44758                    *this == other_repr.value
44759                }
44760                BackfaceVisibility(ref this) => {
44761                    let other_repr =
44762                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::backface_visibility::SpecifiedValue as ToComputedValue>::ComputedValue>);
44763                    *this == other_repr.value
44764                }
44765                BaselineSource(ref this) => {
44766                    let other_repr =
44767                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::BaselineSource as ToComputedValue>::ComputedValue>);
44768                    *this == other_repr.value
44769                }
44770                BorderCollapse(ref this) => {
44771                    let other_repr =
44772                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::border_collapse::SpecifiedValue as ToComputedValue>::ComputedValue>);
44773                    *this == other_repr.value
44774                }
44775                BorderImageRepeat(ref this) => {
44776                    let other_repr =
44777                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::BorderImageRepeat as ToComputedValue>::ComputedValue>);
44778                    *this == other_repr.value
44779                }
44780                BoxSizing(ref this) => {
44781                    let other_repr =
44782                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::box_sizing::SpecifiedValue as ToComputedValue>::ComputedValue>);
44783                    *this == other_repr.value
44784                }
44785                CaptionSide(ref this) => {
44786                    let other_repr =
44787                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::table::CaptionSide as ToComputedValue>::ComputedValue>);
44788                    *this == other_repr.value
44789                }
44790                Clear(ref this) => {
44791                    let other_repr =
44792                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::Clear as ToComputedValue>::ComputedValue>);
44793                    *this == other_repr.value
44794                }
44795                ColumnCount(ref this) => {
44796                    let other_repr =
44797                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::ColumnCount as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
44798                    *this == other_repr.value
44799                }
44800                ColumnSpan(ref this) => {
44801                    let other_repr =
44802                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::column_span::SpecifiedValue as ToComputedValue>::ComputedValue>);
44803                    *this == other_repr.value
44804                }
44805                Display(ref this) => {
44806                    let other_repr =
44807                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::Display as ToComputedValue>::ComputedValue>);
44808                    *this == other_repr.value
44809                }
44810                EmptyCells(ref this) => {
44811                    let other_repr =
44812                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::empty_cells::SpecifiedValue as ToComputedValue>::ComputedValue>);
44813                    *this == other_repr.value
44814                }
44815                FlexDirection(ref this) => {
44816                    let other_repr =
44817                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::flex_direction::SpecifiedValue as ToComputedValue>::ComputedValue>);
44818                    *this == other_repr.value
44819                }
44820                FlexWrap(ref this) => {
44821                    let other_repr =
44822                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::flex_wrap::SpecifiedValue as ToComputedValue>::ComputedValue>);
44823                    *this == other_repr.value
44824                }
44825                Float(ref this) => {
44826                    let other_repr =
44827                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::Float as ToComputedValue>::ComputedValue>);
44828                    *this == other_repr.value
44829                }
44830                FontLanguageOverride(ref this) => {
44831                    let other_repr =
44832                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::FontLanguageOverride as ToComputedValue>::ComputedValue>);
44833                    *this == other_repr.value
44834                }
44835                FontStretch(ref this) => {
44836                    let other_repr =
44837                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::FontStretch as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
44838                    *this == other_repr.value
44839                }
44840                FontStyle(ref this) => {
44841                    let other_repr =
44842                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::FontStyle as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
44843                    *this == other_repr.value
44844                }
44845                FontVariantCaps(ref this) => {
44846                    let other_repr =
44847                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::font_variant_caps::SpecifiedValue as ToComputedValue>::ComputedValue>);
44848                    *this == other_repr.value
44849                }
44850                FontWeight(ref this) => {
44851                    let other_repr =
44852                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::FontWeight as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
44853                    *this == other_repr.value
44854                }
44855                GridAutoFlow(ref this) => {
44856                    let other_repr =
44857                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::GridAutoFlow as ToComputedValue>::ComputedValue>);
44858                    *this == other_repr.value
44859                }
44860                ImageRendering(ref this) => {
44861                    let other_repr =
44862                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::ImageRendering as ToComputedValue>::ComputedValue>);
44863                    *this == other_repr.value
44864                }
44865                Isolation(ref this) => {
44866                    let other_repr =
44867                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::isolation::SpecifiedValue as ToComputedValue>::ComputedValue>);
44868                    *this == other_repr.value
44869                }
44870                JustifyContent(ref this) => {
44871                    let other_repr =
44872                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::JustifyContent as ToComputedValue>::ComputedValue>);
44873                    *this == other_repr.value
44874                }
44875                JustifyItems(ref this) => {
44876                    let other_repr =
44877                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::JustifyItems as ToComputedValue>::ComputedValue>);
44878                    *this == other_repr.value
44879                }
44880                JustifySelf(ref this) => {
44881                    let other_repr =
44882                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::JustifySelf as ToComputedValue>::ComputedValue>);
44883                    *this == other_repr.value
44884                }
44885                ListStylePosition(ref this) => {
44886                    let other_repr =
44887                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::list_style_position::SpecifiedValue as ToComputedValue>::ComputedValue>);
44888                    *this == other_repr.value
44889                }
44890                ListStyleType(ref this) => {
44891                    let other_repr =
44892                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::list_style_type::SpecifiedValue as ToComputedValue>::ComputedValue>);
44893                    *this == other_repr.value
44894                }
44895                MixBlendMode(ref this) => {
44896                    let other_repr =
44897                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::mix_blend_mode::SpecifiedValue as ToComputedValue>::ComputedValue>);
44898                    *this == other_repr.value
44899                }
44900                ObjectFit(ref this) => {
44901                    let other_repr =
44902                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::object_fit::SpecifiedValue as ToComputedValue>::ComputedValue>);
44903                    *this == other_repr.value
44904                }
44905                Opacity(ref this) => {
44906                    let other_repr =
44907                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Opacity as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
44908                    *this == other_repr.value
44909                }
44910                Order(ref this) => {
44911                    let other_repr =
44912                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Integer as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
44913                    *this == other_repr.value
44914                }
44915                OutlineStyle(ref this) => {
44916                    let other_repr =
44917                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::OutlineStyle as ToComputedValue>::ComputedValue>);
44918                    *this == other_repr.value
44919                }
44920                OverflowWrap(ref this) => {
44921                    let other_repr =
44922                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::OverflowWrap as ToComputedValue>::ComputedValue>);
44923                    *this == other_repr.value
44924                }
44925                PointerEvents(ref this) => {
44926                    let other_repr =
44927                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::PointerEvents as ToComputedValue>::ComputedValue>);
44928                    *this == other_repr.value
44929                }
44930                Position(ref this) => {
44931                    let other_repr =
44932                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::PositionProperty as ToComputedValue>::ComputedValue>);
44933                    *this == other_repr.value
44934                }
44935                TableLayout(ref this) => {
44936                    let other_repr =
44937                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::table_layout::SpecifiedValue as ToComputedValue>::ComputedValue>);
44938                    *this == other_repr.value
44939                }
44940                TextAlign(ref this) => {
44941                    let other_repr =
44942                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::TextAlign as ToComputedValue>::ComputedValue>);
44943                    *this == other_repr.value
44944                }
44945                TextAlignLast(ref this) => {
44946                    let other_repr =
44947                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::TextAlignLast as ToComputedValue>::ComputedValue>);
44948                    *this == other_repr.value
44949                }
44950                TextDecorationLine(ref this) => {
44951                    let other_repr =
44952                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::TextDecorationLine as ToComputedValue>::ComputedValue>);
44953                    *this == other_repr.value
44954                }
44955                TextDecorationStyle(ref this) => {
44956                    let other_repr =
44957                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::text_decoration_style::SpecifiedValue as ToComputedValue>::ComputedValue>);
44958                    *this == other_repr.value
44959                }
44960                TextJustify(ref this) => {
44961                    let other_repr =
44962                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::TextJustify as ToComputedValue>::ComputedValue>);
44963                    *this == other_repr.value
44964                }
44965                TextRendering(ref this) => {
44966                    let other_repr =
44967                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::text_rendering::SpecifiedValue as ToComputedValue>::ComputedValue>);
44968                    *this == other_repr.value
44969                }
44970                TextTransform(ref this) => {
44971                    let other_repr =
44972                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::TextTransform as ToComputedValue>::ComputedValue>);
44973                    *this == other_repr.value
44974                }
44975                TextWrapMode(ref this) => {
44976                    let other_repr =
44977                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::text_wrap_mode::SpecifiedValue as ToComputedValue>::ComputedValue>);
44978                    *this == other_repr.value
44979                }
44980                TransformStyle(ref this) => {
44981                    let other_repr =
44982                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::TransformStyle as ToComputedValue>::ComputedValue>);
44983                    *this == other_repr.value
44984                }
44985                Visibility(ref this) => {
44986                    let other_repr =
44987                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::visibility::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
44988                    *this == other_repr.value
44989                }
44990                WhiteSpaceCollapse(ref this) => {
44991                    let other_repr =
44992                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::white_space_collapse::SpecifiedValue as ToComputedValue>::ComputedValue>);
44993                    *this == other_repr.value
44994                }
44995                WordBreak(ref this) => {
44996                    let other_repr =
44997                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::WordBreak as ToComputedValue>::ComputedValue>);
44998                    *this == other_repr.value
44999                }
45000                ZIndex(ref this) => {
45001                    let other_repr =
45002                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::ZIndex as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45003                    *this == other_repr.value
45004                }
45005                Zoom(ref this) => {
45006                    let other_repr =
45007                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Zoom as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45008                    *this == other_repr.value
45009                }
45010                FlexGrow(ref this) |
45011FlexShrink(ref this) => {
45012                    let other_repr =
45013                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::NonNegativeNumber as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45014                    *this == other_repr.value
45015                }
45016                OverflowX(ref this) |
45017OverflowY(ref this) => {
45018                    let other_repr =
45019                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::Overflow as ToComputedValue>::ComputedValue>);
45020                    *this == other_repr.value
45021                }
45022                BorderBottomStyle(ref this) |
45023BorderLeftStyle(ref this) |
45024BorderRightStyle(ref this) |
45025BorderTopStyle(ref this) => {
45026                    let other_repr =
45027                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::BorderStyle as ToComputedValue>::ComputedValue>);
45028                    *this == other_repr.value
45029                }
45030                BackdropFilter(ref this) => {
45031                    let other_repr =
45032                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::backdrop_filter::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45033                    *this == other_repr.value
45034                }
45035                BackgroundAttachment(ref this) => {
45036                    let other_repr =
45037                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::background_attachment::SpecifiedValue as ToComputedValue>::ComputedValue>);
45038                    *this == other_repr.value
45039                }
45040                BackgroundClip(ref this) => {
45041                    let other_repr =
45042                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::background_clip::SpecifiedValue as ToComputedValue>::ComputedValue>);
45043                    *this == other_repr.value
45044                }
45045                BackgroundImage(ref this) => {
45046                    let other_repr =
45047                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::background_image::SpecifiedValue as ToComputedValue>::ComputedValue>);
45048                    *this == other_repr.value
45049                }
45050                BackgroundOrigin(ref this) => {
45051                    let other_repr =
45052                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::background_origin::SpecifiedValue as ToComputedValue>::ComputedValue>);
45053                    *this == other_repr.value
45054                }
45055                BackgroundPositionX(ref this) => {
45056                    let other_repr =
45057                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::background_position_x::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45058                    *this == other_repr.value
45059                }
45060                BackgroundPositionY(ref this) => {
45061                    let other_repr =
45062                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::background_position_y::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45063                    *this == other_repr.value
45064                }
45065                BackgroundRepeat(ref this) => {
45066                    let other_repr =
45067                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::background_repeat::SpecifiedValue as ToComputedValue>::ComputedValue>);
45068                    *this == other_repr.value
45069                }
45070                BackgroundSize(ref this) => {
45071                    let other_repr =
45072                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::background_size::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45073                    *this == other_repr.value
45074                }
45075                BorderImageOutset(ref this) => {
45076                    let other_repr =
45077                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::NonNegativeLengthOrNumberRect as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45078                    *this == other_repr.value
45079                }
45080                BorderImageSlice(ref this) => {
45081                    let other_repr =
45082                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::BorderImageSlice as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45083                    *this == other_repr.value
45084                }
45085                BorderImageWidth(ref this) => {
45086                    let other_repr =
45087                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::BorderImageWidth as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45088                    *this == other_repr.value
45089                }
45090                BorderSpacing(ref this) => {
45091                    let other_repr =
45092                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::BorderSpacing as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45093                    *this == other_repr.value
45094                }
45095                BoxShadow(ref this) => {
45096                    let other_repr =
45097                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::box_shadow::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45098                    *this == other_repr.value
45099                }
45100                Clip(ref this) => {
45101                    let other_repr =
45102                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::ClipRectOrAuto as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45103                    *this == other_repr.value
45104                }
45105                ClipPath(ref this) => {
45106                    let other_repr =
45107                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::basic_shape::ClipPath as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45108                    *this == other_repr.value
45109                }
45110                Color(ref this) => {
45111                    let other_repr =
45112                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::ColorPropertyValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45113                    *this == other_repr.value
45114                }
45115                ColorScheme(ref this) => {
45116                    let other_repr =
45117                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::ColorScheme as ToComputedValue>::ComputedValue>);
45118                    *this == other_repr.value
45119                }
45120                ColumnWidth(ref this) => {
45121                    let other_repr =
45122                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::length::NonNegativeLengthOrAuto as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45123                    *this == other_repr.value
45124                }
45125                Content(ref this) => {
45126                    let other_repr =
45127                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::Content as ToComputedValue>::ComputedValue>);
45128                    *this == other_repr.value
45129                }
45130                CounterIncrement(ref this) => {
45131                    let other_repr =
45132                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::CounterIncrement as ToComputedValue>::ComputedValue>);
45133                    *this == other_repr.value
45134                }
45135                CounterReset(ref this) => {
45136                    let other_repr =
45137                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::CounterReset as ToComputedValue>::ComputedValue>);
45138                    *this == other_repr.value
45139                }
45140                Cursor(ref this) => {
45141                    let other_repr =
45142                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::Cursor as ToComputedValue>::ComputedValue>);
45143                    *this == other_repr.value
45144                }
45145                Filter(ref this) => {
45146                    let other_repr =
45147                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::filter::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45148                    *this == other_repr.value
45149                }
45150                FlexBasis(ref this) => {
45151                    let other_repr =
45152                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::FlexBasis as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45153                    *this == other_repr.value
45154                }
45155                FontFamily(ref this) => {
45156                    let other_repr =
45157                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::FontFamily as ToComputedValue>::ComputedValue>);
45158                    *this == other_repr.value
45159                }
45160                FontSize(ref this) => {
45161                    let other_repr =
45162                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::FontSize as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45163                    *this == other_repr.value
45164                }
45165                FontVariationSettings(ref this) => {
45166                    let other_repr =
45167                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::FontVariationSettings as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45168                    *this == other_repr.value
45169                }
45170                GridTemplateAreas(ref this) => {
45171                    let other_repr =
45172                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::GridTemplateAreas as ToComputedValue>::ComputedValue>);
45173                    *this == other_repr.value
45174                }
45175                LetterSpacing(ref this) => {
45176                    let other_repr =
45177                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::LetterSpacing as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45178                    *this == other_repr.value
45179                }
45180                LineHeight(ref this) => {
45181                    let other_repr =
45182                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::LineHeight as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45183                    *this == other_repr.value
45184                }
45185                MaskImage(ref this) => {
45186                    let other_repr =
45187                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::mask_image::SpecifiedValue as ToComputedValue>::ComputedValue>);
45188                    *this == other_repr.value
45189                }
45190                OffsetPath(ref this) => {
45191                    let other_repr =
45192                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::OffsetPath as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45193                    *this == other_repr.value
45194                }
45195                Perspective(ref this) => {
45196                    let other_repr =
45197                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Perspective as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45198                    *this == other_repr.value
45199                }
45200                Quotes(ref this) => {
45201                    let other_repr =
45202                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::Quotes as ToComputedValue>::ComputedValue>);
45203                    *this == other_repr.value
45204                }
45205                Rotate(ref this) => {
45206                    let other_repr =
45207                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Rotate as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45208                    *this == other_repr.value
45209                }
45210                Scale(ref this) => {
45211                    let other_repr =
45212                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Scale as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45213                    *this == other_repr.value
45214                }
45215                TextIndent(ref this) => {
45216                    let other_repr =
45217                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::TextIndent as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45218                    *this == other_repr.value
45219                }
45220                TextOverflow(ref this) => {
45221                    let other_repr =
45222                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::TextOverflow as ToComputedValue>::ComputedValue>);
45223                    *this == other_repr.value
45224                }
45225                TextShadow(ref this) => {
45226                    let other_repr =
45227                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::text_shadow::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45228                    *this == other_repr.value
45229                }
45230                Transform(ref this) => {
45231                    let other_repr =
45232                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Transform as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45233                    *this == other_repr.value
45234                }
45235                TransformOrigin(ref this) => {
45236                    let other_repr =
45237                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::TransformOrigin as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45238                    *this == other_repr.value
45239                }
45240                Translate(ref this) => {
45241                    let other_repr =
45242                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Translate as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45243                    *this == other_repr.value
45244                }
45245                VerticalAlign(ref this) => {
45246                    let other_repr =
45247                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::VerticalAlign as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45248                    *this == other_repr.value
45249                }
45250                ViewTransitionClass(ref this) => {
45251                    let other_repr =
45252                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::ViewTransitionClass as ToComputedValue>::ComputedValue>);
45253                    *this == other_repr.value
45254                }
45255                ViewTransitionName(ref this) => {
45256                    let other_repr =
45257                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::ViewTransitionName as ToComputedValue>::ComputedValue>);
45258                    *this == other_repr.value
45259                }
45260                WordSpacing(ref this) => {
45261                    let other_repr =
45262                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::WordSpacing as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45263                    *this == other_repr.value
45264                }
45265                ObjectPosition(ref this) |
45266PerspectiveOrigin(ref this) => {
45267                    let other_repr =
45268                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Position as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45269                    *this == other_repr.value
45270                }
45271                GridTemplateColumns(ref this) |
45272GridTemplateRows(ref this) => {
45273                    let other_repr =
45274                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::GridTemplateComponent as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45275                    *this == other_repr.value
45276                }
45277                BorderImageSource(ref this) |
45278ListStyleImage(ref this) => {
45279                    let other_repr =
45280                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::Image as ToComputedValue>::ComputedValue>);
45281                    *this == other_repr.value
45282                }
45283                GridAutoColumns(ref this) |
45284GridAutoRows(ref this) => {
45285                    let other_repr =
45286                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::ImplicitGridTracks as ToComputedValue>::ComputedValue>);
45287                    *this == other_repr.value
45288                }
45289                OutlineOffset(ref this) |
45290OverflowClipMargin(ref this) => {
45291                    let other_repr =
45292                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Length as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45293                    *this == other_repr.value
45294                }
45295                ColumnGap(ref this) |
45296RowGap(ref this) => {
45297                    let other_repr =
45298                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::length::NonNegativeLengthPercentageOrNormal as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45299                    *this == other_repr.value
45300                }
45301                GridColumnEnd(ref this) |
45302GridColumnStart(ref this) |
45303GridRowEnd(ref this) |
45304GridRowStart(ref this) => {
45305                    let other_repr =
45306                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::GridLine as ToComputedValue>::ComputedValue>);
45307                    *this == other_repr.value
45308                }
45309                MaxHeight(ref this) |
45310MaxWidth(ref this) => {
45311                    let other_repr =
45312                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::MaxSize as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45313                    *this == other_repr.value
45314                }
45315                BorderBottomLeftRadius(ref this) |
45316BorderBottomRightRadius(ref this) |
45317BorderTopLeftRadius(ref this) |
45318BorderTopRightRadius(ref this) => {
45319                    let other_repr =
45320                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::BorderCornerRadius as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45321                    *this == other_repr.value
45322                }
45323                Bottom(ref this) |
45324Left(ref this) |
45325Right(ref this) |
45326Top(ref this) => {
45327                    let other_repr =
45328                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Inset as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45329                    *this == other_repr.value
45330                }
45331                MarginBottom(ref this) |
45332MarginLeft(ref this) |
45333MarginRight(ref this) |
45334MarginTop(ref this) => {
45335                    let other_repr =
45336                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Margin as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45337                    *this == other_repr.value
45338                }
45339                PaddingBottom(ref this) |
45340PaddingLeft(ref this) |
45341PaddingRight(ref this) |
45342PaddingTop(ref this) => {
45343                    let other_repr =
45344                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::NonNegativeLengthPercentage as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45345                    *this == other_repr.value
45346                }
45347                Height(ref this) |
45348MinHeight(ref this) |
45349MinWidth(ref this) |
45350Width(ref this) => {
45351                    let other_repr =
45352                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Size as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45353                    *this == other_repr.value
45354                }
45355                BorderBottomWidth(ref this) |
45356BorderLeftWidth(ref this) |
45357BorderRightWidth(ref this) |
45358BorderTopWidth(ref this) |
45359OutlineWidth(ref this) => {
45360                    let other_repr =
45361                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::BorderSideWidth as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45362                    *this == other_repr.value
45363                }
45364                BackgroundColor(ref this) |
45365BorderBottomColor(ref this) |
45366BorderLeftColor(ref this) |
45367BorderRightColor(ref this) |
45368BorderTopColor(ref this) |
45369OutlineColor(ref this) |
45370TextDecorationColor(ref this) => {
45371                    let other_repr =
45372                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Color as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
45373                    *this == other_repr.value
45374                }
45375                Contain(void) |
45376ContainerType(void) |
45377Direction(void) |
45378ServoOverflowClipBox(void) |
45379ServoTopLayer(void) |
45380UnicodeBidi(void) |
45381WritingMode(void) |
45382OverflowBlock(void) |
45383OverflowInline(void) |
45384BorderBlockEndStyle(void) |
45385BorderBlockStartStyle(void) |
45386BorderInlineEndStyle(void) |
45387BorderInlineStartStyle(void) |
45388AnimationComposition(void) |
45389AnimationDelay(void) |
45390AnimationDirection(void) |
45391AnimationDuration(void) |
45392AnimationFillMode(void) |
45393AnimationIterationCount(void) |
45394AnimationName(void) |
45395AnimationPlayState(void) |
45396AnimationTimeline(void) |
45397AnimationTimingFunction(void) |
45398ContainerName(void) |
45399TransitionBehavior(void) |
45400TransitionDelay(void) |
45401TransitionDuration(void) |
45402TransitionProperty(void) |
45403TransitionTimingFunction(void) |
45404WillChange(void) |
45405XLang(void) |
45406MaxBlockSize(void) |
45407MaxInlineSize(void) |
45408BorderEndEndRadius(void) |
45409BorderEndStartRadius(void) |
45410BorderStartEndRadius(void) |
45411BorderStartStartRadius(void) |
45412InsetBlockEnd(void) |
45413InsetBlockStart(void) |
45414InsetInlineEnd(void) |
45415InsetInlineStart(void) |
45416MarginBlockEnd(void) |
45417MarginBlockStart(void) |
45418MarginInlineEnd(void) |
45419MarginInlineStart(void) |
45420PaddingBlockEnd(void) |
45421PaddingBlockStart(void) |
45422PaddingInlineEnd(void) |
45423PaddingInlineStart(void) |
45424BlockSize(void) |
45425InlineSize(void) |
45426MinBlockSize(void) |
45427MinInlineSize(void) |
45428BorderBlockEndWidth(void) |
45429BorderBlockStartWidth(void) |
45430BorderInlineEndWidth(void) |
45431BorderInlineStartWidth(void) |
45432BorderBlockEndColor(void) |
45433BorderBlockStartColor(void) |
45434BorderInlineEndColor(void) |
45435BorderInlineStartColor(void) => {
45436                    void::unreachable(void)
45437                },
45438                AnimationValue::Custom(ref this) => {
45439                    let other_repr =
45440                        &*(other as *const _ as *const AnimationValueVariantRepr<CustomAnimatedValue>);
45441                    *this == other_repr.value
45442                },
45443            }
45444        }
45445    }
45446}
45447
45448impl AnimationValue {
45449    /// Returns the longhand id this animated value corresponds to.
45450    #[inline]
45451    pub fn id(&self) -> PropertyDeclarationId {
45452        if let AnimationValue::Custom(animated_value) = self {
45453            return PropertyDeclarationId::Custom(&animated_value.name);
45454        }
45455
45456        let id = unsafe { *(self as *const _ as *const LonghandId) };
45457        debug_assert_eq!(id, match *self {
45458            AnimationValue::AlignContent(..) => LonghandId::AlignContent,
45459            AnimationValue::AlignItems(..) => LonghandId::AlignItems,
45460            AnimationValue::AlignSelf(..) => LonghandId::AlignSelf,
45461            AnimationValue::AspectRatio(..) => LonghandId::AspectRatio,
45462            AnimationValue::BackfaceVisibility(..) => LonghandId::BackfaceVisibility,
45463            AnimationValue::BaselineSource(..) => LonghandId::BaselineSource,
45464            AnimationValue::BorderCollapse(..) => LonghandId::BorderCollapse,
45465            AnimationValue::BorderImageRepeat(..) => LonghandId::BorderImageRepeat,
45466            AnimationValue::BoxSizing(..) => LonghandId::BoxSizing,
45467            AnimationValue::CaptionSide(..) => LonghandId::CaptionSide,
45468            AnimationValue::Clear(..) => LonghandId::Clear,
45469            AnimationValue::ColumnCount(..) => LonghandId::ColumnCount,
45470            AnimationValue::ColumnSpan(..) => LonghandId::ColumnSpan,
45471            AnimationValue::Contain(void) => void::unreachable(void),
45472            AnimationValue::ContainerType(void) => void::unreachable(void),
45473            AnimationValue::Direction(void) => void::unreachable(void),
45474            AnimationValue::Display(..) => LonghandId::Display,
45475            AnimationValue::EmptyCells(..) => LonghandId::EmptyCells,
45476            AnimationValue::FlexDirection(..) => LonghandId::FlexDirection,
45477            AnimationValue::FlexWrap(..) => LonghandId::FlexWrap,
45478            AnimationValue::Float(..) => LonghandId::Float,
45479            AnimationValue::FontLanguageOverride(..) => LonghandId::FontLanguageOverride,
45480            AnimationValue::FontStretch(..) => LonghandId::FontStretch,
45481            AnimationValue::FontStyle(..) => LonghandId::FontStyle,
45482            AnimationValue::FontVariantCaps(..) => LonghandId::FontVariantCaps,
45483            AnimationValue::FontWeight(..) => LonghandId::FontWeight,
45484            AnimationValue::GridAutoFlow(..) => LonghandId::GridAutoFlow,
45485            AnimationValue::ImageRendering(..) => LonghandId::ImageRendering,
45486            AnimationValue::Isolation(..) => LonghandId::Isolation,
45487            AnimationValue::JustifyContent(..) => LonghandId::JustifyContent,
45488            AnimationValue::JustifyItems(..) => LonghandId::JustifyItems,
45489            AnimationValue::JustifySelf(..) => LonghandId::JustifySelf,
45490            AnimationValue::ListStylePosition(..) => LonghandId::ListStylePosition,
45491            AnimationValue::ListStyleType(..) => LonghandId::ListStyleType,
45492            AnimationValue::MixBlendMode(..) => LonghandId::MixBlendMode,
45493            AnimationValue::ObjectFit(..) => LonghandId::ObjectFit,
45494            AnimationValue::Opacity(..) => LonghandId::Opacity,
45495            AnimationValue::Order(..) => LonghandId::Order,
45496            AnimationValue::OutlineStyle(..) => LonghandId::OutlineStyle,
45497            AnimationValue::OverflowWrap(..) => LonghandId::OverflowWrap,
45498            AnimationValue::PointerEvents(..) => LonghandId::PointerEvents,
45499            AnimationValue::Position(..) => LonghandId::Position,
45500            AnimationValue::ServoOverflowClipBox(void) => void::unreachable(void),
45501            AnimationValue::ServoTopLayer(void) => void::unreachable(void),
45502            AnimationValue::TableLayout(..) => LonghandId::TableLayout,
45503            AnimationValue::TextAlign(..) => LonghandId::TextAlign,
45504            AnimationValue::TextAlignLast(..) => LonghandId::TextAlignLast,
45505            AnimationValue::TextDecorationLine(..) => LonghandId::TextDecorationLine,
45506            AnimationValue::TextDecorationStyle(..) => LonghandId::TextDecorationStyle,
45507            AnimationValue::TextJustify(..) => LonghandId::TextJustify,
45508            AnimationValue::TextRendering(..) => LonghandId::TextRendering,
45509            AnimationValue::TextTransform(..) => LonghandId::TextTransform,
45510            AnimationValue::TextWrapMode(..) => LonghandId::TextWrapMode,
45511            AnimationValue::TransformStyle(..) => LonghandId::TransformStyle,
45512            AnimationValue::UnicodeBidi(void) => void::unreachable(void),
45513            AnimationValue::Visibility(..) => LonghandId::Visibility,
45514            AnimationValue::WhiteSpaceCollapse(..) => LonghandId::WhiteSpaceCollapse,
45515            AnimationValue::WordBreak(..) => LonghandId::WordBreak,
45516            AnimationValue::WritingMode(void) => void::unreachable(void),
45517            AnimationValue::ZIndex(..) => LonghandId::ZIndex,
45518            AnimationValue::Zoom(..) => LonghandId::Zoom,
45519            AnimationValue::FlexGrow(..) => LonghandId::FlexGrow,
45520            AnimationValue::FlexShrink(..) => LonghandId::FlexShrink,
45521            AnimationValue::OverflowBlock(void) => void::unreachable(void),
45522            AnimationValue::OverflowInline(void) => void::unreachable(void),
45523            AnimationValue::OverflowX(..) => LonghandId::OverflowX,
45524            AnimationValue::OverflowY(..) => LonghandId::OverflowY,
45525            AnimationValue::BorderBlockEndStyle(void) => void::unreachable(void),
45526            AnimationValue::BorderBlockStartStyle(void) => void::unreachable(void),
45527            AnimationValue::BorderBottomStyle(..) => LonghandId::BorderBottomStyle,
45528            AnimationValue::BorderInlineEndStyle(void) => void::unreachable(void),
45529            AnimationValue::BorderInlineStartStyle(void) => void::unreachable(void),
45530            AnimationValue::BorderLeftStyle(..) => LonghandId::BorderLeftStyle,
45531            AnimationValue::BorderRightStyle(..) => LonghandId::BorderRightStyle,
45532            AnimationValue::BorderTopStyle(..) => LonghandId::BorderTopStyle,
45533            AnimationValue::AnimationComposition(void) => void::unreachable(void),
45534            AnimationValue::AnimationDelay(void) => void::unreachable(void),
45535            AnimationValue::AnimationDirection(void) => void::unreachable(void),
45536            AnimationValue::AnimationDuration(void) => void::unreachable(void),
45537            AnimationValue::AnimationFillMode(void) => void::unreachable(void),
45538            AnimationValue::AnimationIterationCount(void) => void::unreachable(void),
45539            AnimationValue::AnimationName(void) => void::unreachable(void),
45540            AnimationValue::AnimationPlayState(void) => void::unreachable(void),
45541            AnimationValue::AnimationTimeline(void) => void::unreachable(void),
45542            AnimationValue::AnimationTimingFunction(void) => void::unreachable(void),
45543            AnimationValue::BackdropFilter(..) => LonghandId::BackdropFilter,
45544            AnimationValue::BackgroundAttachment(..) => LonghandId::BackgroundAttachment,
45545            AnimationValue::BackgroundClip(..) => LonghandId::BackgroundClip,
45546            AnimationValue::BackgroundImage(..) => LonghandId::BackgroundImage,
45547            AnimationValue::BackgroundOrigin(..) => LonghandId::BackgroundOrigin,
45548            AnimationValue::BackgroundPositionX(..) => LonghandId::BackgroundPositionX,
45549            AnimationValue::BackgroundPositionY(..) => LonghandId::BackgroundPositionY,
45550            AnimationValue::BackgroundRepeat(..) => LonghandId::BackgroundRepeat,
45551            AnimationValue::BackgroundSize(..) => LonghandId::BackgroundSize,
45552            AnimationValue::BorderImageOutset(..) => LonghandId::BorderImageOutset,
45553            AnimationValue::BorderImageSlice(..) => LonghandId::BorderImageSlice,
45554            AnimationValue::BorderImageWidth(..) => LonghandId::BorderImageWidth,
45555            AnimationValue::BorderSpacing(..) => LonghandId::BorderSpacing,
45556            AnimationValue::BoxShadow(..) => LonghandId::BoxShadow,
45557            AnimationValue::Clip(..) => LonghandId::Clip,
45558            AnimationValue::ClipPath(..) => LonghandId::ClipPath,
45559            AnimationValue::Color(..) => LonghandId::Color,
45560            AnimationValue::ColorScheme(..) => LonghandId::ColorScheme,
45561            AnimationValue::ColumnWidth(..) => LonghandId::ColumnWidth,
45562            AnimationValue::ContainerName(void) => void::unreachable(void),
45563            AnimationValue::Content(..) => LonghandId::Content,
45564            AnimationValue::CounterIncrement(..) => LonghandId::CounterIncrement,
45565            AnimationValue::CounterReset(..) => LonghandId::CounterReset,
45566            AnimationValue::Cursor(..) => LonghandId::Cursor,
45567            AnimationValue::Filter(..) => LonghandId::Filter,
45568            AnimationValue::FlexBasis(..) => LonghandId::FlexBasis,
45569            AnimationValue::FontFamily(..) => LonghandId::FontFamily,
45570            AnimationValue::FontSize(..) => LonghandId::FontSize,
45571            AnimationValue::FontVariationSettings(..) => LonghandId::FontVariationSettings,
45572            AnimationValue::GridTemplateAreas(..) => LonghandId::GridTemplateAreas,
45573            AnimationValue::LetterSpacing(..) => LonghandId::LetterSpacing,
45574            AnimationValue::LineHeight(..) => LonghandId::LineHeight,
45575            AnimationValue::MaskImage(..) => LonghandId::MaskImage,
45576            AnimationValue::OffsetPath(..) => LonghandId::OffsetPath,
45577            AnimationValue::Perspective(..) => LonghandId::Perspective,
45578            AnimationValue::Quotes(..) => LonghandId::Quotes,
45579            AnimationValue::Rotate(..) => LonghandId::Rotate,
45580            AnimationValue::Scale(..) => LonghandId::Scale,
45581            AnimationValue::TextIndent(..) => LonghandId::TextIndent,
45582            AnimationValue::TextOverflow(..) => LonghandId::TextOverflow,
45583            AnimationValue::TextShadow(..) => LonghandId::TextShadow,
45584            AnimationValue::Transform(..) => LonghandId::Transform,
45585            AnimationValue::TransformOrigin(..) => LonghandId::TransformOrigin,
45586            AnimationValue::TransitionBehavior(void) => void::unreachable(void),
45587            AnimationValue::TransitionDelay(void) => void::unreachable(void),
45588            AnimationValue::TransitionDuration(void) => void::unreachable(void),
45589            AnimationValue::TransitionProperty(void) => void::unreachable(void),
45590            AnimationValue::TransitionTimingFunction(void) => void::unreachable(void),
45591            AnimationValue::Translate(..) => LonghandId::Translate,
45592            AnimationValue::VerticalAlign(..) => LonghandId::VerticalAlign,
45593            AnimationValue::ViewTransitionClass(..) => LonghandId::ViewTransitionClass,
45594            AnimationValue::ViewTransitionName(..) => LonghandId::ViewTransitionName,
45595            AnimationValue::WillChange(void) => void::unreachable(void),
45596            AnimationValue::WordSpacing(..) => LonghandId::WordSpacing,
45597            AnimationValue::XLang(void) => void::unreachable(void),
45598            AnimationValue::ObjectPosition(..) => LonghandId::ObjectPosition,
45599            AnimationValue::PerspectiveOrigin(..) => LonghandId::PerspectiveOrigin,
45600            AnimationValue::GridTemplateColumns(..) => LonghandId::GridTemplateColumns,
45601            AnimationValue::GridTemplateRows(..) => LonghandId::GridTemplateRows,
45602            AnimationValue::BorderImageSource(..) => LonghandId::BorderImageSource,
45603            AnimationValue::ListStyleImage(..) => LonghandId::ListStyleImage,
45604            AnimationValue::GridAutoColumns(..) => LonghandId::GridAutoColumns,
45605            AnimationValue::GridAutoRows(..) => LonghandId::GridAutoRows,
45606            AnimationValue::OutlineOffset(..) => LonghandId::OutlineOffset,
45607            AnimationValue::OverflowClipMargin(..) => LonghandId::OverflowClipMargin,
45608            AnimationValue::ColumnGap(..) => LonghandId::ColumnGap,
45609            AnimationValue::RowGap(..) => LonghandId::RowGap,
45610            AnimationValue::GridColumnEnd(..) => LonghandId::GridColumnEnd,
45611            AnimationValue::GridColumnStart(..) => LonghandId::GridColumnStart,
45612            AnimationValue::GridRowEnd(..) => LonghandId::GridRowEnd,
45613            AnimationValue::GridRowStart(..) => LonghandId::GridRowStart,
45614            AnimationValue::MaxBlockSize(void) => void::unreachable(void),
45615            AnimationValue::MaxHeight(..) => LonghandId::MaxHeight,
45616            AnimationValue::MaxInlineSize(void) => void::unreachable(void),
45617            AnimationValue::MaxWidth(..) => LonghandId::MaxWidth,
45618            AnimationValue::BorderBottomLeftRadius(..) => LonghandId::BorderBottomLeftRadius,
45619            AnimationValue::BorderBottomRightRadius(..) => LonghandId::BorderBottomRightRadius,
45620            AnimationValue::BorderEndEndRadius(void) => void::unreachable(void),
45621            AnimationValue::BorderEndStartRadius(void) => void::unreachable(void),
45622            AnimationValue::BorderStartEndRadius(void) => void::unreachable(void),
45623            AnimationValue::BorderStartStartRadius(void) => void::unreachable(void),
45624            AnimationValue::BorderTopLeftRadius(..) => LonghandId::BorderTopLeftRadius,
45625            AnimationValue::BorderTopRightRadius(..) => LonghandId::BorderTopRightRadius,
45626            AnimationValue::Bottom(..) => LonghandId::Bottom,
45627            AnimationValue::InsetBlockEnd(void) => void::unreachable(void),
45628            AnimationValue::InsetBlockStart(void) => void::unreachable(void),
45629            AnimationValue::InsetInlineEnd(void) => void::unreachable(void),
45630            AnimationValue::InsetInlineStart(void) => void::unreachable(void),
45631            AnimationValue::Left(..) => LonghandId::Left,
45632            AnimationValue::Right(..) => LonghandId::Right,
45633            AnimationValue::Top(..) => LonghandId::Top,
45634            AnimationValue::MarginBlockEnd(void) => void::unreachable(void),
45635            AnimationValue::MarginBlockStart(void) => void::unreachable(void),
45636            AnimationValue::MarginBottom(..) => LonghandId::MarginBottom,
45637            AnimationValue::MarginInlineEnd(void) => void::unreachable(void),
45638            AnimationValue::MarginInlineStart(void) => void::unreachable(void),
45639            AnimationValue::MarginLeft(..) => LonghandId::MarginLeft,
45640            AnimationValue::MarginRight(..) => LonghandId::MarginRight,
45641            AnimationValue::MarginTop(..) => LonghandId::MarginTop,
45642            AnimationValue::PaddingBlockEnd(void) => void::unreachable(void),
45643            AnimationValue::PaddingBlockStart(void) => void::unreachable(void),
45644            AnimationValue::PaddingBottom(..) => LonghandId::PaddingBottom,
45645            AnimationValue::PaddingInlineEnd(void) => void::unreachable(void),
45646            AnimationValue::PaddingInlineStart(void) => void::unreachable(void),
45647            AnimationValue::PaddingLeft(..) => LonghandId::PaddingLeft,
45648            AnimationValue::PaddingRight(..) => LonghandId::PaddingRight,
45649            AnimationValue::PaddingTop(..) => LonghandId::PaddingTop,
45650            AnimationValue::BlockSize(void) => void::unreachable(void),
45651            AnimationValue::Height(..) => LonghandId::Height,
45652            AnimationValue::InlineSize(void) => void::unreachable(void),
45653            AnimationValue::MinBlockSize(void) => void::unreachable(void),
45654            AnimationValue::MinHeight(..) => LonghandId::MinHeight,
45655            AnimationValue::MinInlineSize(void) => void::unreachable(void),
45656            AnimationValue::MinWidth(..) => LonghandId::MinWidth,
45657            AnimationValue::Width(..) => LonghandId::Width,
45658            AnimationValue::BorderBlockEndWidth(void) => void::unreachable(void),
45659            AnimationValue::BorderBlockStartWidth(void) => void::unreachable(void),
45660            AnimationValue::BorderBottomWidth(..) => LonghandId::BorderBottomWidth,
45661            AnimationValue::BorderInlineEndWidth(void) => void::unreachable(void),
45662            AnimationValue::BorderInlineStartWidth(void) => void::unreachable(void),
45663            AnimationValue::BorderLeftWidth(..) => LonghandId::BorderLeftWidth,
45664            AnimationValue::BorderRightWidth(..) => LonghandId::BorderRightWidth,
45665            AnimationValue::BorderTopWidth(..) => LonghandId::BorderTopWidth,
45666            AnimationValue::OutlineWidth(..) => LonghandId::OutlineWidth,
45667            AnimationValue::BackgroundColor(..) => LonghandId::BackgroundColor,
45668            AnimationValue::BorderBlockEndColor(void) => void::unreachable(void),
45669            AnimationValue::BorderBlockStartColor(void) => void::unreachable(void),
45670            AnimationValue::BorderBottomColor(..) => LonghandId::BorderBottomColor,
45671            AnimationValue::BorderInlineEndColor(void) => void::unreachable(void),
45672            AnimationValue::BorderInlineStartColor(void) => void::unreachable(void),
45673            AnimationValue::BorderLeftColor(..) => LonghandId::BorderLeftColor,
45674            AnimationValue::BorderRightColor(..) => LonghandId::BorderRightColor,
45675            AnimationValue::BorderTopColor(..) => LonghandId::BorderTopColor,
45676            AnimationValue::OutlineColor(..) => LonghandId::OutlineColor,
45677            AnimationValue::TextDecorationColor(..) => LonghandId::TextDecorationColor,
45678            AnimationValue::Custom(..) => unsafe { debug_unreachable!() },
45679        });
45680        PropertyDeclarationId::Longhand(id)
45681    }
45682
45683    /// Returns whether this value is interpolable with another one.
45684    pub fn interpolable_with(&self, other: &Self) -> bool {
45685        self.animate(other, Procedure::Interpolate { progress: 0.5 }).is_ok()
45686    }
45687
45688    /// "Uncompute" this animation value in order to be used inside the CSS
45689    /// cascade.
45690    pub fn uncompute(&self) -> PropertyDeclaration {
45691        use crate::properties::longhands;
45692        use self::AnimationValue::*;
45693
45694        use super::PropertyDeclarationVariantRepr;
45695
45696        match *self {
45697            
45698            
45699            AlignContent(ref value) => {
45700                let value = crate::values::specified::AlignContent::from_computed_value(&value);
45701                PropertyDeclaration::AlignContent(value)
45702            }
45703            
45704            AlignItems(ref value) => {
45705                let value = crate::values::specified::AlignItems::from_computed_value(&value);
45706                PropertyDeclaration::AlignItems(value)
45707            }
45708            
45709            AlignSelf(ref value) => {
45710                let value = crate::values::specified::AlignSelf::from_computed_value(&value);
45711                PropertyDeclaration::AlignSelf(value)
45712            }
45713            
45714            AspectRatio(ref value) => {
45715                let value = ToAnimatedValue::from_animated_value(value.clone());
45716                let value = crate::values::specified::AspectRatio::from_computed_value(&value);
45717                PropertyDeclaration::AspectRatio(value)
45718            }
45719            
45720            BackfaceVisibility(ref value) => {
45721                let value = longhands::backface_visibility::SpecifiedValue::from_computed_value(&value);
45722                PropertyDeclaration::BackfaceVisibility(value)
45723            }
45724            
45725            BaselineSource(ref value) => {
45726                let value = crate::values::specified::BaselineSource::from_computed_value(&value);
45727                PropertyDeclaration::BaselineSource(value)
45728            }
45729            
45730            BorderCollapse(ref value) => {
45731                let value = longhands::border_collapse::SpecifiedValue::from_computed_value(&value);
45732                PropertyDeclaration::BorderCollapse(value)
45733            }
45734            
45735            BorderImageRepeat(ref value) => {
45736                let value = crate::values::specified::BorderImageRepeat::from_computed_value(&value);
45737                PropertyDeclaration::BorderImageRepeat(value)
45738            }
45739            
45740            BoxSizing(ref value) => {
45741                let value = longhands::box_sizing::SpecifiedValue::from_computed_value(&value);
45742                PropertyDeclaration::BoxSizing(value)
45743            }
45744            
45745            CaptionSide(ref value) => {
45746                let value = crate::values::specified::table::CaptionSide::from_computed_value(&value);
45747                PropertyDeclaration::CaptionSide(value)
45748            }
45749            
45750            Clear(ref value) => {
45751                let value = crate::values::specified::Clear::from_computed_value(&value);
45752                PropertyDeclaration::Clear(value)
45753            }
45754            
45755            ColumnCount(ref value) => {
45756                let value = ToAnimatedValue::from_animated_value(value.clone());
45757                let value = crate::values::specified::ColumnCount::from_computed_value(&value);
45758                PropertyDeclaration::ColumnCount(value)
45759            }
45760            
45761            ColumnSpan(ref value) => {
45762                let value = longhands::column_span::SpecifiedValue::from_computed_value(&value);
45763                PropertyDeclaration::ColumnSpan(value)
45764            }
45765            
45766            Display(ref value) => {
45767                let value = crate::values::specified::Display::from_computed_value(&value);
45768                PropertyDeclaration::Display(value)
45769            }
45770            
45771            EmptyCells(ref value) => {
45772                let value = longhands::empty_cells::SpecifiedValue::from_computed_value(&value);
45773                PropertyDeclaration::EmptyCells(value)
45774            }
45775            
45776            FlexDirection(ref value) => {
45777                let value = longhands::flex_direction::SpecifiedValue::from_computed_value(&value);
45778                PropertyDeclaration::FlexDirection(value)
45779            }
45780            
45781            FlexWrap(ref value) => {
45782                let value = longhands::flex_wrap::SpecifiedValue::from_computed_value(&value);
45783                PropertyDeclaration::FlexWrap(value)
45784            }
45785            
45786            Float(ref value) => {
45787                let value = crate::values::specified::Float::from_computed_value(&value);
45788                PropertyDeclaration::Float(value)
45789            }
45790            
45791            FontLanguageOverride(ref value) => {
45792                let value = crate::values::specified::FontLanguageOverride::from_computed_value(&value);
45793                PropertyDeclaration::FontLanguageOverride(value)
45794            }
45795            
45796            FontStretch(ref value) => {
45797                let value = ToAnimatedValue::from_animated_value(value.clone());
45798                let value = crate::values::specified::FontStretch::from_computed_value(&value);
45799                PropertyDeclaration::FontStretch(value)
45800            }
45801            
45802            FontStyle(ref value) => {
45803                let value = ToAnimatedValue::from_animated_value(value.clone());
45804                let value = crate::values::specified::FontStyle::from_computed_value(&value);
45805                PropertyDeclaration::FontStyle(value)
45806            }
45807            
45808            FontVariantCaps(ref value) => {
45809                let value = longhands::font_variant_caps::SpecifiedValue::from_computed_value(&value);
45810                PropertyDeclaration::FontVariantCaps(value)
45811            }
45812            
45813            FontWeight(ref value) => {
45814                let value = ToAnimatedValue::from_animated_value(value.clone());
45815                let value = crate::values::specified::FontWeight::from_computed_value(&value);
45816                PropertyDeclaration::FontWeight(value)
45817            }
45818            
45819            GridAutoFlow(ref value) => {
45820                let value = crate::values::specified::GridAutoFlow::from_computed_value(&value);
45821                PropertyDeclaration::GridAutoFlow(value)
45822            }
45823            
45824            ImageRendering(ref value) => {
45825                let value = crate::values::specified::ImageRendering::from_computed_value(&value);
45826                PropertyDeclaration::ImageRendering(value)
45827            }
45828            
45829            Isolation(ref value) => {
45830                let value = longhands::isolation::SpecifiedValue::from_computed_value(&value);
45831                PropertyDeclaration::Isolation(value)
45832            }
45833            
45834            JustifyContent(ref value) => {
45835                let value = crate::values::specified::JustifyContent::from_computed_value(&value);
45836                PropertyDeclaration::JustifyContent(value)
45837            }
45838            
45839            JustifyItems(ref value) => {
45840                let value = crate::values::specified::JustifyItems::from_computed_value(&value);
45841                PropertyDeclaration::JustifyItems(value)
45842            }
45843            
45844            JustifySelf(ref value) => {
45845                let value = crate::values::specified::JustifySelf::from_computed_value(&value);
45846                PropertyDeclaration::JustifySelf(value)
45847            }
45848            
45849            ListStylePosition(ref value) => {
45850                let value = longhands::list_style_position::SpecifiedValue::from_computed_value(&value);
45851                PropertyDeclaration::ListStylePosition(value)
45852            }
45853            
45854            ListStyleType(ref value) => {
45855                let value = longhands::list_style_type::SpecifiedValue::from_computed_value(&value);
45856                PropertyDeclaration::ListStyleType(value)
45857            }
45858            
45859            MixBlendMode(ref value) => {
45860                let value = longhands::mix_blend_mode::SpecifiedValue::from_computed_value(&value);
45861                PropertyDeclaration::MixBlendMode(value)
45862            }
45863            
45864            ObjectFit(ref value) => {
45865                let value = longhands::object_fit::SpecifiedValue::from_computed_value(&value);
45866                PropertyDeclaration::ObjectFit(value)
45867            }
45868            
45869            Opacity(ref value) => {
45870                let value = ToAnimatedValue::from_animated_value(value.clone());
45871                let value = crate::values::specified::Opacity::from_computed_value(&value);
45872                PropertyDeclaration::Opacity(value)
45873            }
45874            
45875            Order(ref value) => {
45876                let value = ToAnimatedValue::from_animated_value(value.clone());
45877                let value = crate::values::specified::Integer::from_computed_value(&value);
45878                PropertyDeclaration::Order(value)
45879            }
45880            
45881            OutlineStyle(ref value) => {
45882                let value = crate::values::specified::OutlineStyle::from_computed_value(&value);
45883                PropertyDeclaration::OutlineStyle(value)
45884            }
45885            
45886            OverflowWrap(ref value) => {
45887                let value = crate::values::specified::OverflowWrap::from_computed_value(&value);
45888                PropertyDeclaration::OverflowWrap(value)
45889            }
45890            
45891            PointerEvents(ref value) => {
45892                let value = crate::values::specified::PointerEvents::from_computed_value(&value);
45893                PropertyDeclaration::PointerEvents(value)
45894            }
45895            
45896            Position(ref value) => {
45897                let value = crate::values::specified::PositionProperty::from_computed_value(&value);
45898                PropertyDeclaration::Position(value)
45899            }
45900            
45901            TableLayout(ref value) => {
45902                let value = longhands::table_layout::SpecifiedValue::from_computed_value(&value);
45903                PropertyDeclaration::TableLayout(value)
45904            }
45905            
45906            TextAlign(ref value) => {
45907                let value = crate::values::specified::TextAlign::from_computed_value(&value);
45908                PropertyDeclaration::TextAlign(value)
45909            }
45910            
45911            TextAlignLast(ref value) => {
45912                let value = crate::values::specified::TextAlignLast::from_computed_value(&value);
45913                PropertyDeclaration::TextAlignLast(value)
45914            }
45915            
45916            TextDecorationLine(ref value) => {
45917                let value = crate::values::specified::TextDecorationLine::from_computed_value(&value);
45918                PropertyDeclaration::TextDecorationLine(value)
45919            }
45920            
45921            TextDecorationStyle(ref value) => {
45922                let value = longhands::text_decoration_style::SpecifiedValue::from_computed_value(&value);
45923                PropertyDeclaration::TextDecorationStyle(value)
45924            }
45925            
45926            TextJustify(ref value) => {
45927                let value = crate::values::specified::TextJustify::from_computed_value(&value);
45928                PropertyDeclaration::TextJustify(value)
45929            }
45930            
45931            TextRendering(ref value) => {
45932                let value = longhands::text_rendering::SpecifiedValue::from_computed_value(&value);
45933                PropertyDeclaration::TextRendering(value)
45934            }
45935            
45936            TextTransform(ref value) => {
45937                let value = crate::values::specified::TextTransform::from_computed_value(&value);
45938                PropertyDeclaration::TextTransform(value)
45939            }
45940            
45941            TextWrapMode(ref value) => {
45942                let value = longhands::text_wrap_mode::SpecifiedValue::from_computed_value(&value);
45943                PropertyDeclaration::TextWrapMode(value)
45944            }
45945            
45946            TransformStyle(ref value) => {
45947                let value = crate::values::specified::TransformStyle::from_computed_value(&value);
45948                PropertyDeclaration::TransformStyle(value)
45949            }
45950            
45951            Visibility(ref value) => {
45952                let value = ToAnimatedValue::from_animated_value(value.clone());
45953                let value = longhands::visibility::SpecifiedValue::from_computed_value(&value);
45954                PropertyDeclaration::Visibility(value)
45955            }
45956            
45957            WhiteSpaceCollapse(ref value) => {
45958                let value = longhands::white_space_collapse::SpecifiedValue::from_computed_value(&value);
45959                PropertyDeclaration::WhiteSpaceCollapse(value)
45960            }
45961            
45962            WordBreak(ref value) => {
45963                let value = crate::values::specified::WordBreak::from_computed_value(&value);
45964                PropertyDeclaration::WordBreak(value)
45965            }
45966            
45967            ZIndex(ref value) => {
45968                let value = ToAnimatedValue::from_animated_value(value.clone());
45969                let value = crate::values::specified::ZIndex::from_computed_value(&value);
45970                PropertyDeclaration::ZIndex(value)
45971            }
45972            
45973            Zoom(ref value) => {
45974                let value = ToAnimatedValue::from_animated_value(value.clone());
45975                let value = crate::values::specified::Zoom::from_computed_value(&value);
45976                PropertyDeclaration::Zoom(value)
45977            }
45978            
45979            FlexGrow(ref value) |
45980FlexShrink(ref value) => {
45981                let value = ToAnimatedValue::from_animated_value(value.clone());
45982                let value = crate::values::specified::NonNegativeNumber::from_computed_value(&value);
45983                unsafe {
45984                    let mut out = mem::MaybeUninit::uninit();
45985                    ptr::write(
45986                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::NonNegativeNumber>,
45987                        PropertyDeclarationVariantRepr {
45988                            tag: *(self as *const _ as *const u16),
45989                            value,
45990                        },
45991                    );
45992                    out.assume_init()
45993                }
45994            }
45995            
45996            OverflowX(ref value) |
45997OverflowY(ref value) => {
45998                let value = crate::values::specified::Overflow::from_computed_value(&value);
45999                unsafe {
46000                    let mut out = mem::MaybeUninit::uninit();
46001                    ptr::write(
46002                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::Overflow>,
46003                        PropertyDeclarationVariantRepr {
46004                            tag: *(self as *const _ as *const u16),
46005                            value,
46006                        },
46007                    );
46008                    out.assume_init()
46009                }
46010            }
46011            
46012            BorderBottomStyle(ref value) |
46013BorderLeftStyle(ref value) |
46014BorderRightStyle(ref value) |
46015BorderTopStyle(ref value) => {
46016                let value = crate::values::specified::BorderStyle::from_computed_value(&value);
46017                unsafe {
46018                    let mut out = mem::MaybeUninit::uninit();
46019                    ptr::write(
46020                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::BorderStyle>,
46021                        PropertyDeclarationVariantRepr {
46022                            tag: *(self as *const _ as *const u16),
46023                            value,
46024                        },
46025                    );
46026                    out.assume_init()
46027                }
46028            }
46029            
46030            BackdropFilter(ref value) => {
46031                let value = ToAnimatedValue::from_animated_value(value.clone());
46032                let value = longhands::backdrop_filter::SpecifiedValue::from_computed_value(&value);
46033                PropertyDeclaration::BackdropFilter(value)
46034            }
46035            
46036            BackgroundAttachment(ref value) => {
46037                let value = longhands::background_attachment::SpecifiedValue::from_computed_value(&value);
46038                PropertyDeclaration::BackgroundAttachment(value)
46039            }
46040            
46041            BackgroundClip(ref value) => {
46042                let value = longhands::background_clip::SpecifiedValue::from_computed_value(&value);
46043                PropertyDeclaration::BackgroundClip(value)
46044            }
46045            
46046            BackgroundImage(ref value) => {
46047                let value = longhands::background_image::SpecifiedValue::from_computed_value(&value);
46048                PropertyDeclaration::BackgroundImage(value)
46049            }
46050            
46051            BackgroundOrigin(ref value) => {
46052                let value = longhands::background_origin::SpecifiedValue::from_computed_value(&value);
46053                PropertyDeclaration::BackgroundOrigin(value)
46054            }
46055            
46056            BackgroundPositionX(ref value) => {
46057                let value = ToAnimatedValue::from_animated_value(value.clone());
46058                let value = longhands::background_position_x::SpecifiedValue::from_computed_value(&value);
46059                PropertyDeclaration::BackgroundPositionX(value)
46060            }
46061            
46062            BackgroundPositionY(ref value) => {
46063                let value = ToAnimatedValue::from_animated_value(value.clone());
46064                let value = longhands::background_position_y::SpecifiedValue::from_computed_value(&value);
46065                PropertyDeclaration::BackgroundPositionY(value)
46066            }
46067            
46068            BackgroundRepeat(ref value) => {
46069                let value = longhands::background_repeat::SpecifiedValue::from_computed_value(&value);
46070                PropertyDeclaration::BackgroundRepeat(value)
46071            }
46072            
46073            BackgroundSize(ref value) => {
46074                let value = ToAnimatedValue::from_animated_value(value.clone());
46075                let value = longhands::background_size::SpecifiedValue::from_computed_value(&value);
46076                PropertyDeclaration::BackgroundSize(value)
46077            }
46078            
46079            BorderImageOutset(ref value) => {
46080                let value = ToAnimatedValue::from_animated_value(value.clone());
46081                let value = crate::values::specified::NonNegativeLengthOrNumberRect::from_computed_value(&value);
46082                let value = Box::new(value);
46083                PropertyDeclaration::BorderImageOutset(value)
46084            }
46085            
46086            BorderImageSlice(ref value) => {
46087                let value = ToAnimatedValue::from_animated_value(value.clone());
46088                let value = crate::values::specified::BorderImageSlice::from_computed_value(&value);
46089                let value = Box::new(value);
46090                PropertyDeclaration::BorderImageSlice(value)
46091            }
46092            
46093            BorderImageWidth(ref value) => {
46094                let value = ToAnimatedValue::from_animated_value(value.clone());
46095                let value = crate::values::specified::BorderImageWidth::from_computed_value(&value);
46096                let value = Box::new(value);
46097                PropertyDeclaration::BorderImageWidth(value)
46098            }
46099            
46100            BorderSpacing(ref value) => {
46101                let value = ToAnimatedValue::from_animated_value(value.clone());
46102                let value = crate::values::specified::BorderSpacing::from_computed_value(&value);
46103                let value = Box::new(value);
46104                PropertyDeclaration::BorderSpacing(value)
46105            }
46106            
46107            BoxShadow(ref value) => {
46108                let value = ToAnimatedValue::from_animated_value(value.clone());
46109                let value = longhands::box_shadow::SpecifiedValue::from_computed_value(&value);
46110                PropertyDeclaration::BoxShadow(value)
46111            }
46112            
46113            Clip(ref value) => {
46114                let value = ToAnimatedValue::from_animated_value(value.clone());
46115                let value = crate::values::specified::ClipRectOrAuto::from_computed_value(&value);
46116                let value = Box::new(value);
46117                PropertyDeclaration::Clip(value)
46118            }
46119            
46120            ClipPath(ref value) => {
46121                let value = ToAnimatedValue::from_animated_value(value.clone());
46122                let value = crate::values::specified::basic_shape::ClipPath::from_computed_value(&value);
46123                PropertyDeclaration::ClipPath(value)
46124            }
46125            
46126            Color(ref value) => {
46127                let value = ToAnimatedValue::from_animated_value(value.clone());
46128                let value = crate::values::specified::ColorPropertyValue::from_computed_value(&value);
46129                PropertyDeclaration::Color(value)
46130            }
46131            
46132            ColorScheme(ref value) => {
46133                let value = crate::values::specified::ColorScheme::from_computed_value(&value);
46134                PropertyDeclaration::ColorScheme(value)
46135            }
46136            
46137            ColumnWidth(ref value) => {
46138                let value = ToAnimatedValue::from_animated_value(value.clone());
46139                let value = crate::values::specified::length::NonNegativeLengthOrAuto::from_computed_value(&value);
46140                PropertyDeclaration::ColumnWidth(value)
46141            }
46142            
46143            Content(ref value) => {
46144                let value = crate::values::specified::Content::from_computed_value(&value);
46145                PropertyDeclaration::Content(value)
46146            }
46147            
46148            CounterIncrement(ref value) => {
46149                let value = crate::values::specified::CounterIncrement::from_computed_value(&value);
46150                PropertyDeclaration::CounterIncrement(value)
46151            }
46152            
46153            CounterReset(ref value) => {
46154                let value = crate::values::specified::CounterReset::from_computed_value(&value);
46155                PropertyDeclaration::CounterReset(value)
46156            }
46157            
46158            Cursor(ref value) => {
46159                let value = crate::values::specified::Cursor::from_computed_value(&value);
46160                PropertyDeclaration::Cursor(value)
46161            }
46162            
46163            Filter(ref value) => {
46164                let value = ToAnimatedValue::from_animated_value(value.clone());
46165                let value = longhands::filter::SpecifiedValue::from_computed_value(&value);
46166                PropertyDeclaration::Filter(value)
46167            }
46168            
46169            FlexBasis(ref value) => {
46170                let value = ToAnimatedValue::from_animated_value(value.clone());
46171                let value = crate::values::specified::FlexBasis::from_computed_value(&value);
46172                let value = Box::new(value);
46173                PropertyDeclaration::FlexBasis(value)
46174            }
46175            
46176            FontFamily(ref value) => {
46177                let value = crate::values::specified::FontFamily::from_computed_value(&value);
46178                PropertyDeclaration::FontFamily(value)
46179            }
46180            
46181            FontSize(ref value) => {
46182                let value = ToAnimatedValue::from_animated_value(value.clone());
46183                let value = crate::values::specified::FontSize::from_computed_value(&value);
46184                PropertyDeclaration::FontSize(value)
46185            }
46186            
46187            FontVariationSettings(ref value) => {
46188                let value = ToAnimatedValue::from_animated_value(value.clone());
46189                let value = crate::values::specified::FontVariationSettings::from_computed_value(&value);
46190                PropertyDeclaration::FontVariationSettings(value)
46191            }
46192            
46193            GridTemplateAreas(ref value) => {
46194                let value = crate::values::specified::GridTemplateAreas::from_computed_value(&value);
46195                PropertyDeclaration::GridTemplateAreas(value)
46196            }
46197            
46198            LetterSpacing(ref value) => {
46199                let value = ToAnimatedValue::from_animated_value(value.clone());
46200                let value = crate::values::specified::LetterSpacing::from_computed_value(&value);
46201                PropertyDeclaration::LetterSpacing(value)
46202            }
46203            
46204            LineHeight(ref value) => {
46205                let value = ToAnimatedValue::from_animated_value(value.clone());
46206                let value = crate::values::specified::LineHeight::from_computed_value(&value);
46207                PropertyDeclaration::LineHeight(value)
46208            }
46209            
46210            MaskImage(ref value) => {
46211                let value = longhands::mask_image::SpecifiedValue::from_computed_value(&value);
46212                PropertyDeclaration::MaskImage(value)
46213            }
46214            
46215            OffsetPath(ref value) => {
46216                let value = ToAnimatedValue::from_animated_value(value.clone());
46217                let value = crate::values::specified::OffsetPath::from_computed_value(&value);
46218                PropertyDeclaration::OffsetPath(value)
46219            }
46220            
46221            Perspective(ref value) => {
46222                let value = ToAnimatedValue::from_animated_value(value.clone());
46223                let value = crate::values::specified::Perspective::from_computed_value(&value);
46224                PropertyDeclaration::Perspective(value)
46225            }
46226            
46227            Quotes(ref value) => {
46228                let value = crate::values::specified::Quotes::from_computed_value(&value);
46229                PropertyDeclaration::Quotes(value)
46230            }
46231            
46232            Rotate(ref value) => {
46233                let value = ToAnimatedValue::from_animated_value(value.clone());
46234                let value = crate::values::specified::Rotate::from_computed_value(&value);
46235                let value = Box::new(value);
46236                PropertyDeclaration::Rotate(value)
46237            }
46238            
46239            Scale(ref value) => {
46240                let value = ToAnimatedValue::from_animated_value(value.clone());
46241                let value = crate::values::specified::Scale::from_computed_value(&value);
46242                let value = Box::new(value);
46243                PropertyDeclaration::Scale(value)
46244            }
46245            
46246            TextIndent(ref value) => {
46247                let value = ToAnimatedValue::from_animated_value(value.clone());
46248                let value = crate::values::specified::TextIndent::from_computed_value(&value);
46249                PropertyDeclaration::TextIndent(value)
46250            }
46251            
46252            TextOverflow(ref value) => {
46253                let value = crate::values::specified::TextOverflow::from_computed_value(&value);
46254                let value = Box::new(value);
46255                PropertyDeclaration::TextOverflow(value)
46256            }
46257            
46258            TextShadow(ref value) => {
46259                let value = ToAnimatedValue::from_animated_value(value.clone());
46260                let value = longhands::text_shadow::SpecifiedValue::from_computed_value(&value);
46261                PropertyDeclaration::TextShadow(value)
46262            }
46263            
46264            Transform(ref value) => {
46265                let value = ToAnimatedValue::from_animated_value(value.clone());
46266                let value = crate::values::specified::Transform::from_computed_value(&value);
46267                PropertyDeclaration::Transform(value)
46268            }
46269            
46270            TransformOrigin(ref value) => {
46271                let value = ToAnimatedValue::from_animated_value(value.clone());
46272                let value = crate::values::specified::TransformOrigin::from_computed_value(&value);
46273                let value = Box::new(value);
46274                PropertyDeclaration::TransformOrigin(value)
46275            }
46276            
46277            Translate(ref value) => {
46278                let value = ToAnimatedValue::from_animated_value(value.clone());
46279                let value = crate::values::specified::Translate::from_computed_value(&value);
46280                let value = Box::new(value);
46281                PropertyDeclaration::Translate(value)
46282            }
46283            
46284            VerticalAlign(ref value) => {
46285                let value = ToAnimatedValue::from_animated_value(value.clone());
46286                let value = crate::values::specified::VerticalAlign::from_computed_value(&value);
46287                PropertyDeclaration::VerticalAlign(value)
46288            }
46289            
46290            ViewTransitionClass(ref value) => {
46291                let value = crate::values::specified::ViewTransitionClass::from_computed_value(&value);
46292                PropertyDeclaration::ViewTransitionClass(value)
46293            }
46294            
46295            ViewTransitionName(ref value) => {
46296                let value = crate::values::specified::ViewTransitionName::from_computed_value(&value);
46297                PropertyDeclaration::ViewTransitionName(value)
46298            }
46299            
46300            WordSpacing(ref value) => {
46301                let value = ToAnimatedValue::from_animated_value(value.clone());
46302                let value = crate::values::specified::WordSpacing::from_computed_value(&value);
46303                PropertyDeclaration::WordSpacing(value)
46304            }
46305            
46306            ObjectPosition(ref value) |
46307PerspectiveOrigin(ref value) => {
46308                let value = ToAnimatedValue::from_animated_value(value.clone());
46309                let value = crate::values::specified::Position::from_computed_value(&value);
46310                let value = Box::new(value);
46311                unsafe {
46312                    let mut out = mem::MaybeUninit::uninit();
46313                    ptr::write(
46314                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<Box<crate::values::specified::Position>>,
46315                        PropertyDeclarationVariantRepr {
46316                            tag: *(self as *const _ as *const u16),
46317                            value,
46318                        },
46319                    );
46320                    out.assume_init()
46321                }
46322            }
46323            
46324            GridTemplateColumns(ref value) |
46325GridTemplateRows(ref value) => {
46326                let value = ToAnimatedValue::from_animated_value(value.clone());
46327                let value = crate::values::specified::GridTemplateComponent::from_computed_value(&value);
46328                unsafe {
46329                    let mut out = mem::MaybeUninit::uninit();
46330                    ptr::write(
46331                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::GridTemplateComponent>,
46332                        PropertyDeclarationVariantRepr {
46333                            tag: *(self as *const _ as *const u16),
46334                            value,
46335                        },
46336                    );
46337                    out.assume_init()
46338                }
46339            }
46340            
46341            BorderImageSource(ref value) |
46342ListStyleImage(ref value) => {
46343                let value = crate::values::specified::Image::from_computed_value(&value);
46344                unsafe {
46345                    let mut out = mem::MaybeUninit::uninit();
46346                    ptr::write(
46347                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::Image>,
46348                        PropertyDeclarationVariantRepr {
46349                            tag: *(self as *const _ as *const u16),
46350                            value,
46351                        },
46352                    );
46353                    out.assume_init()
46354                }
46355            }
46356            
46357            GridAutoColumns(ref value) |
46358GridAutoRows(ref value) => {
46359                let value = crate::values::specified::ImplicitGridTracks::from_computed_value(&value);
46360                unsafe {
46361                    let mut out = mem::MaybeUninit::uninit();
46362                    ptr::write(
46363                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::ImplicitGridTracks>,
46364                        PropertyDeclarationVariantRepr {
46365                            tag: *(self as *const _ as *const u16),
46366                            value,
46367                        },
46368                    );
46369                    out.assume_init()
46370                }
46371            }
46372            
46373            OutlineOffset(ref value) |
46374OverflowClipMargin(ref value) => {
46375                let value = ToAnimatedValue::from_animated_value(value.clone());
46376                let value = crate::values::specified::Length::from_computed_value(&value);
46377                unsafe {
46378                    let mut out = mem::MaybeUninit::uninit();
46379                    ptr::write(
46380                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::Length>,
46381                        PropertyDeclarationVariantRepr {
46382                            tag: *(self as *const _ as *const u16),
46383                            value,
46384                        },
46385                    );
46386                    out.assume_init()
46387                }
46388            }
46389            
46390            ColumnGap(ref value) |
46391RowGap(ref value) => {
46392                let value = ToAnimatedValue::from_animated_value(value.clone());
46393                let value = crate::values::specified::length::NonNegativeLengthPercentageOrNormal::from_computed_value(&value);
46394                unsafe {
46395                    let mut out = mem::MaybeUninit::uninit();
46396                    ptr::write(
46397                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::length::NonNegativeLengthPercentageOrNormal>,
46398                        PropertyDeclarationVariantRepr {
46399                            tag: *(self as *const _ as *const u16),
46400                            value,
46401                        },
46402                    );
46403                    out.assume_init()
46404                }
46405            }
46406            
46407            GridColumnEnd(ref value) |
46408GridColumnStart(ref value) |
46409GridRowEnd(ref value) |
46410GridRowStart(ref value) => {
46411                let value = crate::values::specified::GridLine::from_computed_value(&value);
46412                unsafe {
46413                    let mut out = mem::MaybeUninit::uninit();
46414                    ptr::write(
46415                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::GridLine>,
46416                        PropertyDeclarationVariantRepr {
46417                            tag: *(self as *const _ as *const u16),
46418                            value,
46419                        },
46420                    );
46421                    out.assume_init()
46422                }
46423            }
46424            
46425            MaxHeight(ref value) |
46426MaxWidth(ref value) => {
46427                let value = ToAnimatedValue::from_animated_value(value.clone());
46428                let value = crate::values::specified::MaxSize::from_computed_value(&value);
46429                unsafe {
46430                    let mut out = mem::MaybeUninit::uninit();
46431                    ptr::write(
46432                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::MaxSize>,
46433                        PropertyDeclarationVariantRepr {
46434                            tag: *(self as *const _ as *const u16),
46435                            value,
46436                        },
46437                    );
46438                    out.assume_init()
46439                }
46440            }
46441            
46442            BorderBottomLeftRadius(ref value) |
46443BorderBottomRightRadius(ref value) |
46444BorderTopLeftRadius(ref value) |
46445BorderTopRightRadius(ref value) => {
46446                let value = ToAnimatedValue::from_animated_value(value.clone());
46447                let value = crate::values::specified::BorderCornerRadius::from_computed_value(&value);
46448                let value = Box::new(value);
46449                unsafe {
46450                    let mut out = mem::MaybeUninit::uninit();
46451                    ptr::write(
46452                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<Box<crate::values::specified::BorderCornerRadius>>,
46453                        PropertyDeclarationVariantRepr {
46454                            tag: *(self as *const _ as *const u16),
46455                            value,
46456                        },
46457                    );
46458                    out.assume_init()
46459                }
46460            }
46461            
46462            Bottom(ref value) |
46463Left(ref value) |
46464Right(ref value) |
46465Top(ref value) => {
46466                let value = ToAnimatedValue::from_animated_value(value.clone());
46467                let value = crate::values::specified::Inset::from_computed_value(&value);
46468                unsafe {
46469                    let mut out = mem::MaybeUninit::uninit();
46470                    ptr::write(
46471                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::Inset>,
46472                        PropertyDeclarationVariantRepr {
46473                            tag: *(self as *const _ as *const u16),
46474                            value,
46475                        },
46476                    );
46477                    out.assume_init()
46478                }
46479            }
46480            
46481            MarginBottom(ref value) |
46482MarginLeft(ref value) |
46483MarginRight(ref value) |
46484MarginTop(ref value) => {
46485                let value = ToAnimatedValue::from_animated_value(value.clone());
46486                let value = crate::values::specified::Margin::from_computed_value(&value);
46487                unsafe {
46488                    let mut out = mem::MaybeUninit::uninit();
46489                    ptr::write(
46490                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::Margin>,
46491                        PropertyDeclarationVariantRepr {
46492                            tag: *(self as *const _ as *const u16),
46493                            value,
46494                        },
46495                    );
46496                    out.assume_init()
46497                }
46498            }
46499            
46500            PaddingBottom(ref value) |
46501PaddingLeft(ref value) |
46502PaddingRight(ref value) |
46503PaddingTop(ref value) => {
46504                let value = ToAnimatedValue::from_animated_value(value.clone());
46505                let value = crate::values::specified::NonNegativeLengthPercentage::from_computed_value(&value);
46506                unsafe {
46507                    let mut out = mem::MaybeUninit::uninit();
46508                    ptr::write(
46509                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::NonNegativeLengthPercentage>,
46510                        PropertyDeclarationVariantRepr {
46511                            tag: *(self as *const _ as *const u16),
46512                            value,
46513                        },
46514                    );
46515                    out.assume_init()
46516                }
46517            }
46518            
46519            Height(ref value) |
46520MinHeight(ref value) |
46521MinWidth(ref value) |
46522Width(ref value) => {
46523                let value = ToAnimatedValue::from_animated_value(value.clone());
46524                let value = crate::values::specified::Size::from_computed_value(&value);
46525                unsafe {
46526                    let mut out = mem::MaybeUninit::uninit();
46527                    ptr::write(
46528                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::Size>,
46529                        PropertyDeclarationVariantRepr {
46530                            tag: *(self as *const _ as *const u16),
46531                            value,
46532                        },
46533                    );
46534                    out.assume_init()
46535                }
46536            }
46537            
46538            BorderBottomWidth(ref value) |
46539BorderLeftWidth(ref value) |
46540BorderRightWidth(ref value) |
46541BorderTopWidth(ref value) |
46542OutlineWidth(ref value) => {
46543                let value = ToAnimatedValue::from_animated_value(value.clone());
46544                let value = crate::values::specified::BorderSideWidth::from_computed_value(&value);
46545                unsafe {
46546                    let mut out = mem::MaybeUninit::uninit();
46547                    ptr::write(
46548                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::BorderSideWidth>,
46549                        PropertyDeclarationVariantRepr {
46550                            tag: *(self as *const _ as *const u16),
46551                            value,
46552                        },
46553                    );
46554                    out.assume_init()
46555                }
46556            }
46557            
46558            BackgroundColor(ref value) |
46559BorderBottomColor(ref value) |
46560BorderLeftColor(ref value) |
46561BorderRightColor(ref value) |
46562BorderTopColor(ref value) |
46563OutlineColor(ref value) |
46564TextDecorationColor(ref value) => {
46565                let value = ToAnimatedValue::from_animated_value(value.clone());
46566                let value = crate::values::specified::Color::from_computed_value(&value);
46567                unsafe {
46568                    let mut out = mem::MaybeUninit::uninit();
46569                    ptr::write(
46570                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::Color>,
46571                        PropertyDeclarationVariantRepr {
46572                            tag: *(self as *const _ as *const u16),
46573                            value,
46574                        },
46575                    );
46576                    out.assume_init()
46577                }
46578            }
46579            Contain(void) |
46580ContainerType(void) |
46581Direction(void) |
46582ServoOverflowClipBox(void) |
46583ServoTopLayer(void) |
46584UnicodeBidi(void) |
46585WritingMode(void) |
46586OverflowBlock(void) |
46587OverflowInline(void) |
46588BorderBlockEndStyle(void) |
46589BorderBlockStartStyle(void) |
46590BorderInlineEndStyle(void) |
46591BorderInlineStartStyle(void) |
46592AnimationComposition(void) |
46593AnimationDelay(void) |
46594AnimationDirection(void) |
46595AnimationDuration(void) |
46596AnimationFillMode(void) |
46597AnimationIterationCount(void) |
46598AnimationName(void) |
46599AnimationPlayState(void) |
46600AnimationTimeline(void) |
46601AnimationTimingFunction(void) |
46602ContainerName(void) |
46603TransitionBehavior(void) |
46604TransitionDelay(void) |
46605TransitionDuration(void) |
46606TransitionProperty(void) |
46607TransitionTimingFunction(void) |
46608WillChange(void) |
46609XLang(void) |
46610MaxBlockSize(void) |
46611MaxInlineSize(void) |
46612BorderEndEndRadius(void) |
46613BorderEndStartRadius(void) |
46614BorderStartEndRadius(void) |
46615BorderStartStartRadius(void) |
46616InsetBlockEnd(void) |
46617InsetBlockStart(void) |
46618InsetInlineEnd(void) |
46619InsetInlineStart(void) |
46620MarginBlockEnd(void) |
46621MarginBlockStart(void) |
46622MarginInlineEnd(void) |
46623MarginInlineStart(void) |
46624PaddingBlockEnd(void) |
46625PaddingBlockStart(void) |
46626PaddingInlineEnd(void) |
46627PaddingInlineStart(void) |
46628BlockSize(void) |
46629InlineSize(void) |
46630MinBlockSize(void) |
46631MinInlineSize(void) |
46632BorderBlockEndWidth(void) |
46633BorderBlockStartWidth(void) |
46634BorderInlineEndWidth(void) |
46635BorderInlineStartWidth(void) |
46636BorderBlockEndColor(void) |
46637BorderBlockStartColor(void) |
46638BorderInlineEndColor(void) |
46639BorderInlineStartColor(void) => {
46640                void::unreachable(void)
46641            },
46642            Custom(ref animated_value) => animated_value.to_declaration(),
46643        }
46644    }
46645
46646    /// Construct an AnimationValue from a property declaration.
46647    pub fn from_declaration(
46648        decl: &PropertyDeclaration,
46649        context: &mut Context,
46650        style: &ComputedValues,
46651        initial: &ComputedValues,
46652    ) -> Option<Self> {
46653        use super::PropertyDeclarationVariantRepr;
46654
46655        
46656
46657        let animatable = match *decl {
46658            PropertyDeclaration::AlignContent(ref value) => {
46659                let decl_repr = unsafe {
46660                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::AlignContent>)
46661                };
46662                let longhand_id = unsafe {
46663                    *(&decl_repr.tag as *const u16 as *const LonghandId)
46664                };
46665                context.for_non_inherited_property = true;
46666                let value = value.to_computed_value(context);
46667
46668                unsafe {
46669                    let mut out = mem::MaybeUninit::uninit();
46670                    ptr::write(
46671                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::AlignContent as ToComputedValue>::ComputedValue>,
46672                        AnimationValueVariantRepr {
46673                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
46674                            value,
46675                        },
46676                    );
46677                    out.assume_init()
46678                }
46679            }
46680            PropertyDeclaration::AlignItems(ref value) => {
46681                let decl_repr = unsafe {
46682                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::AlignItems>)
46683                };
46684                let longhand_id = unsafe {
46685                    *(&decl_repr.tag as *const u16 as *const LonghandId)
46686                };
46687                context.for_non_inherited_property = true;
46688                let value = value.to_computed_value(context);
46689
46690                unsafe {
46691                    let mut out = mem::MaybeUninit::uninit();
46692                    ptr::write(
46693                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::AlignItems as ToComputedValue>::ComputedValue>,
46694                        AnimationValueVariantRepr {
46695                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
46696                            value,
46697                        },
46698                    );
46699                    out.assume_init()
46700                }
46701            }
46702            PropertyDeclaration::AlignSelf(ref value) => {
46703                let decl_repr = unsafe {
46704                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::AlignSelf>)
46705                };
46706                let longhand_id = unsafe {
46707                    *(&decl_repr.tag as *const u16 as *const LonghandId)
46708                };
46709                context.for_non_inherited_property = true;
46710                let value = value.to_computed_value(context);
46711
46712                unsafe {
46713                    let mut out = mem::MaybeUninit::uninit();
46714                    ptr::write(
46715                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::AlignSelf as ToComputedValue>::ComputedValue>,
46716                        AnimationValueVariantRepr {
46717                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
46718                            value,
46719                        },
46720                    );
46721                    out.assume_init()
46722                }
46723            }
46724            PropertyDeclaration::AspectRatio(ref value) => {
46725                let decl_repr = unsafe {
46726                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::AspectRatio>)
46727                };
46728                let longhand_id = unsafe {
46729                    *(&decl_repr.tag as *const u16 as *const LonghandId)
46730                };
46731                context.for_non_inherited_property = true;
46732                let value = value.to_computed_value(context);
46733                let value = value.to_animated_value(&crate::values::animated::Context { style });
46734
46735                unsafe {
46736                    let mut out = mem::MaybeUninit::uninit();
46737                    ptr::write(
46738                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::AspectRatio as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
46739                        AnimationValueVariantRepr {
46740                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
46741                            value,
46742                        },
46743                    );
46744                    out.assume_init()
46745                }
46746            }
46747            PropertyDeclaration::BackfaceVisibility(ref value) => {
46748                let decl_repr = unsafe {
46749                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::backface_visibility::SpecifiedValue>)
46750                };
46751                let longhand_id = unsafe {
46752                    *(&decl_repr.tag as *const u16 as *const LonghandId)
46753                };
46754                context.for_non_inherited_property = true;
46755                let value = value.to_computed_value(context);
46756
46757                unsafe {
46758                    let mut out = mem::MaybeUninit::uninit();
46759                    ptr::write(
46760                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::backface_visibility::SpecifiedValue as ToComputedValue>::ComputedValue>,
46761                        AnimationValueVariantRepr {
46762                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
46763                            value,
46764                        },
46765                    );
46766                    out.assume_init()
46767                }
46768            }
46769            PropertyDeclaration::BaselineSource(ref value) => {
46770                let decl_repr = unsafe {
46771                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::BaselineSource>)
46772                };
46773                let longhand_id = unsafe {
46774                    *(&decl_repr.tag as *const u16 as *const LonghandId)
46775                };
46776                context.for_non_inherited_property = true;
46777                let value = value.to_computed_value(context);
46778
46779                unsafe {
46780                    let mut out = mem::MaybeUninit::uninit();
46781                    ptr::write(
46782                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::BaselineSource as ToComputedValue>::ComputedValue>,
46783                        AnimationValueVariantRepr {
46784                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
46785                            value,
46786                        },
46787                    );
46788                    out.assume_init()
46789                }
46790            }
46791            PropertyDeclaration::BorderCollapse(ref value) => {
46792                let decl_repr = unsafe {
46793                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::border_collapse::SpecifiedValue>)
46794                };
46795                let longhand_id = unsafe {
46796                    *(&decl_repr.tag as *const u16 as *const LonghandId)
46797                };
46798                context.for_non_inherited_property = false;
46799                let value = value.to_computed_value(context);
46800
46801                unsafe {
46802                    let mut out = mem::MaybeUninit::uninit();
46803                    ptr::write(
46804                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::border_collapse::SpecifiedValue as ToComputedValue>::ComputedValue>,
46805                        AnimationValueVariantRepr {
46806                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
46807                            value,
46808                        },
46809                    );
46810                    out.assume_init()
46811                }
46812            }
46813            PropertyDeclaration::BorderImageRepeat(ref value) => {
46814                let decl_repr = unsafe {
46815                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::BorderImageRepeat>)
46816                };
46817                let longhand_id = unsafe {
46818                    *(&decl_repr.tag as *const u16 as *const LonghandId)
46819                };
46820                context.for_non_inherited_property = true;
46821                let value = value.to_computed_value(context);
46822
46823                unsafe {
46824                    let mut out = mem::MaybeUninit::uninit();
46825                    ptr::write(
46826                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::BorderImageRepeat as ToComputedValue>::ComputedValue>,
46827                        AnimationValueVariantRepr {
46828                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
46829                            value,
46830                        },
46831                    );
46832                    out.assume_init()
46833                }
46834            }
46835            PropertyDeclaration::BoxSizing(ref value) => {
46836                let decl_repr = unsafe {
46837                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::box_sizing::SpecifiedValue>)
46838                };
46839                let longhand_id = unsafe {
46840                    *(&decl_repr.tag as *const u16 as *const LonghandId)
46841                };
46842                context.for_non_inherited_property = true;
46843                let value = value.to_computed_value(context);
46844
46845                unsafe {
46846                    let mut out = mem::MaybeUninit::uninit();
46847                    ptr::write(
46848                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::box_sizing::SpecifiedValue as ToComputedValue>::ComputedValue>,
46849                        AnimationValueVariantRepr {
46850                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
46851                            value,
46852                        },
46853                    );
46854                    out.assume_init()
46855                }
46856            }
46857            PropertyDeclaration::CaptionSide(ref value) => {
46858                let decl_repr = unsafe {
46859                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::table::CaptionSide>)
46860                };
46861                let longhand_id = unsafe {
46862                    *(&decl_repr.tag as *const u16 as *const LonghandId)
46863                };
46864                context.for_non_inherited_property = false;
46865                let value = value.to_computed_value(context);
46866
46867                unsafe {
46868                    let mut out = mem::MaybeUninit::uninit();
46869                    ptr::write(
46870                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::table::CaptionSide as ToComputedValue>::ComputedValue>,
46871                        AnimationValueVariantRepr {
46872                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
46873                            value,
46874                        },
46875                    );
46876                    out.assume_init()
46877                }
46878            }
46879            PropertyDeclaration::Clear(ref value) => {
46880                let decl_repr = unsafe {
46881                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Clear>)
46882                };
46883                let longhand_id = unsafe {
46884                    *(&decl_repr.tag as *const u16 as *const LonghandId)
46885                };
46886                context.for_non_inherited_property = true;
46887                let value = value.to_computed_value(context);
46888
46889                unsafe {
46890                    let mut out = mem::MaybeUninit::uninit();
46891                    ptr::write(
46892                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::Clear as ToComputedValue>::ComputedValue>,
46893                        AnimationValueVariantRepr {
46894                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
46895                            value,
46896                        },
46897                    );
46898                    out.assume_init()
46899                }
46900            }
46901            PropertyDeclaration::ColumnCount(ref value) => {
46902                let decl_repr = unsafe {
46903                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::ColumnCount>)
46904                };
46905                let longhand_id = unsafe {
46906                    *(&decl_repr.tag as *const u16 as *const LonghandId)
46907                };
46908                context.for_non_inherited_property = true;
46909                let value = value.to_computed_value(context);
46910                let value = value.to_animated_value(&crate::values::animated::Context { style });
46911
46912                unsafe {
46913                    let mut out = mem::MaybeUninit::uninit();
46914                    ptr::write(
46915                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::ColumnCount as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
46916                        AnimationValueVariantRepr {
46917                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
46918                            value,
46919                        },
46920                    );
46921                    out.assume_init()
46922                }
46923            }
46924            PropertyDeclaration::ColumnSpan(ref value) => {
46925                let decl_repr = unsafe {
46926                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::column_span::SpecifiedValue>)
46927                };
46928                let longhand_id = unsafe {
46929                    *(&decl_repr.tag as *const u16 as *const LonghandId)
46930                };
46931                context.for_non_inherited_property = true;
46932                let value = value.to_computed_value(context);
46933
46934                unsafe {
46935                    let mut out = mem::MaybeUninit::uninit();
46936                    ptr::write(
46937                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::column_span::SpecifiedValue as ToComputedValue>::ComputedValue>,
46938                        AnimationValueVariantRepr {
46939                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
46940                            value,
46941                        },
46942                    );
46943                    out.assume_init()
46944                }
46945            }
46946            PropertyDeclaration::Display(ref value) => {
46947                let decl_repr = unsafe {
46948                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Display>)
46949                };
46950                let longhand_id = unsafe {
46951                    *(&decl_repr.tag as *const u16 as *const LonghandId)
46952                };
46953                context.for_non_inherited_property = true;
46954                let value = value.to_computed_value(context);
46955
46956                unsafe {
46957                    let mut out = mem::MaybeUninit::uninit();
46958                    ptr::write(
46959                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::Display as ToComputedValue>::ComputedValue>,
46960                        AnimationValueVariantRepr {
46961                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
46962                            value,
46963                        },
46964                    );
46965                    out.assume_init()
46966                }
46967            }
46968            PropertyDeclaration::EmptyCells(ref value) => {
46969                let decl_repr = unsafe {
46970                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::empty_cells::SpecifiedValue>)
46971                };
46972                let longhand_id = unsafe {
46973                    *(&decl_repr.tag as *const u16 as *const LonghandId)
46974                };
46975                context.for_non_inherited_property = false;
46976                let value = value.to_computed_value(context);
46977
46978                unsafe {
46979                    let mut out = mem::MaybeUninit::uninit();
46980                    ptr::write(
46981                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::empty_cells::SpecifiedValue as ToComputedValue>::ComputedValue>,
46982                        AnimationValueVariantRepr {
46983                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
46984                            value,
46985                        },
46986                    );
46987                    out.assume_init()
46988                }
46989            }
46990            PropertyDeclaration::FlexDirection(ref value) => {
46991                let decl_repr = unsafe {
46992                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::flex_direction::SpecifiedValue>)
46993                };
46994                let longhand_id = unsafe {
46995                    *(&decl_repr.tag as *const u16 as *const LonghandId)
46996                };
46997                context.for_non_inherited_property = true;
46998                let value = value.to_computed_value(context);
46999
47000                unsafe {
47001                    let mut out = mem::MaybeUninit::uninit();
47002                    ptr::write(
47003                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::flex_direction::SpecifiedValue as ToComputedValue>::ComputedValue>,
47004                        AnimationValueVariantRepr {
47005                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47006                            value,
47007                        },
47008                    );
47009                    out.assume_init()
47010                }
47011            }
47012            PropertyDeclaration::FlexWrap(ref value) => {
47013                let decl_repr = unsafe {
47014                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::flex_wrap::SpecifiedValue>)
47015                };
47016                let longhand_id = unsafe {
47017                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47018                };
47019                context.for_non_inherited_property = true;
47020                let value = value.to_computed_value(context);
47021
47022                unsafe {
47023                    let mut out = mem::MaybeUninit::uninit();
47024                    ptr::write(
47025                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::flex_wrap::SpecifiedValue as ToComputedValue>::ComputedValue>,
47026                        AnimationValueVariantRepr {
47027                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47028                            value,
47029                        },
47030                    );
47031                    out.assume_init()
47032                }
47033            }
47034            PropertyDeclaration::Float(ref value) => {
47035                let decl_repr = unsafe {
47036                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Float>)
47037                };
47038                let longhand_id = unsafe {
47039                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47040                };
47041                context.for_non_inherited_property = true;
47042                let value = value.to_computed_value(context);
47043
47044                unsafe {
47045                    let mut out = mem::MaybeUninit::uninit();
47046                    ptr::write(
47047                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::Float as ToComputedValue>::ComputedValue>,
47048                        AnimationValueVariantRepr {
47049                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47050                            value,
47051                        },
47052                    );
47053                    out.assume_init()
47054                }
47055            }
47056            PropertyDeclaration::FontLanguageOverride(ref value) => {
47057                let decl_repr = unsafe {
47058                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::FontLanguageOverride>)
47059                };
47060                let longhand_id = unsafe {
47061                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47062                };
47063                context.for_non_inherited_property = false;
47064                let value = value.to_computed_value(context);
47065
47066                unsafe {
47067                    let mut out = mem::MaybeUninit::uninit();
47068                    ptr::write(
47069                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::FontLanguageOverride as ToComputedValue>::ComputedValue>,
47070                        AnimationValueVariantRepr {
47071                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47072                            value,
47073                        },
47074                    );
47075                    out.assume_init()
47076                }
47077            }
47078            PropertyDeclaration::FontStretch(ref value) => {
47079                let decl_repr = unsafe {
47080                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::FontStretch>)
47081                };
47082                let longhand_id = unsafe {
47083                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47084                };
47085                context.for_non_inherited_property = false;
47086                let value = value.to_computed_value(context);
47087                let value = value.to_animated_value(&crate::values::animated::Context { style });
47088
47089                unsafe {
47090                    let mut out = mem::MaybeUninit::uninit();
47091                    ptr::write(
47092                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::FontStretch as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
47093                        AnimationValueVariantRepr {
47094                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47095                            value,
47096                        },
47097                    );
47098                    out.assume_init()
47099                }
47100            }
47101            PropertyDeclaration::FontStyle(ref value) => {
47102                let decl_repr = unsafe {
47103                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::FontStyle>)
47104                };
47105                let longhand_id = unsafe {
47106                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47107                };
47108                context.for_non_inherited_property = false;
47109                let value = value.to_computed_value(context);
47110                let value = value.to_animated_value(&crate::values::animated::Context { style });
47111
47112                unsafe {
47113                    let mut out = mem::MaybeUninit::uninit();
47114                    ptr::write(
47115                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::FontStyle as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
47116                        AnimationValueVariantRepr {
47117                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47118                            value,
47119                        },
47120                    );
47121                    out.assume_init()
47122                }
47123            }
47124            PropertyDeclaration::FontVariantCaps(ref value) => {
47125                let decl_repr = unsafe {
47126                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::font_variant_caps::SpecifiedValue>)
47127                };
47128                let longhand_id = unsafe {
47129                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47130                };
47131                context.for_non_inherited_property = false;
47132                let value = value.to_computed_value(context);
47133
47134                unsafe {
47135                    let mut out = mem::MaybeUninit::uninit();
47136                    ptr::write(
47137                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::font_variant_caps::SpecifiedValue as ToComputedValue>::ComputedValue>,
47138                        AnimationValueVariantRepr {
47139                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47140                            value,
47141                        },
47142                    );
47143                    out.assume_init()
47144                }
47145            }
47146            PropertyDeclaration::FontWeight(ref value) => {
47147                let decl_repr = unsafe {
47148                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::FontWeight>)
47149                };
47150                let longhand_id = unsafe {
47151                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47152                };
47153                context.for_non_inherited_property = false;
47154                let value = value.to_computed_value(context);
47155                let value = value.to_animated_value(&crate::values::animated::Context { style });
47156
47157                unsafe {
47158                    let mut out = mem::MaybeUninit::uninit();
47159                    ptr::write(
47160                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::FontWeight as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
47161                        AnimationValueVariantRepr {
47162                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47163                            value,
47164                        },
47165                    );
47166                    out.assume_init()
47167                }
47168            }
47169            PropertyDeclaration::GridAutoFlow(ref value) => {
47170                let decl_repr = unsafe {
47171                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::GridAutoFlow>)
47172                };
47173                let longhand_id = unsafe {
47174                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47175                };
47176                context.for_non_inherited_property = true;
47177                let value = value.to_computed_value(context);
47178
47179                unsafe {
47180                    let mut out = mem::MaybeUninit::uninit();
47181                    ptr::write(
47182                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::GridAutoFlow as ToComputedValue>::ComputedValue>,
47183                        AnimationValueVariantRepr {
47184                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47185                            value,
47186                        },
47187                    );
47188                    out.assume_init()
47189                }
47190            }
47191            PropertyDeclaration::ImageRendering(ref value) => {
47192                let decl_repr = unsafe {
47193                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::ImageRendering>)
47194                };
47195                let longhand_id = unsafe {
47196                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47197                };
47198                context.for_non_inherited_property = false;
47199                let value = value.to_computed_value(context);
47200
47201                unsafe {
47202                    let mut out = mem::MaybeUninit::uninit();
47203                    ptr::write(
47204                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::ImageRendering as ToComputedValue>::ComputedValue>,
47205                        AnimationValueVariantRepr {
47206                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47207                            value,
47208                        },
47209                    );
47210                    out.assume_init()
47211                }
47212            }
47213            PropertyDeclaration::Isolation(ref value) => {
47214                let decl_repr = unsafe {
47215                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::isolation::SpecifiedValue>)
47216                };
47217                let longhand_id = unsafe {
47218                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47219                };
47220                context.for_non_inherited_property = true;
47221                let value = value.to_computed_value(context);
47222
47223                unsafe {
47224                    let mut out = mem::MaybeUninit::uninit();
47225                    ptr::write(
47226                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::isolation::SpecifiedValue as ToComputedValue>::ComputedValue>,
47227                        AnimationValueVariantRepr {
47228                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47229                            value,
47230                        },
47231                    );
47232                    out.assume_init()
47233                }
47234            }
47235            PropertyDeclaration::JustifyContent(ref value) => {
47236                let decl_repr = unsafe {
47237                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::JustifyContent>)
47238                };
47239                let longhand_id = unsafe {
47240                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47241                };
47242                context.for_non_inherited_property = true;
47243                let value = value.to_computed_value(context);
47244
47245                unsafe {
47246                    let mut out = mem::MaybeUninit::uninit();
47247                    ptr::write(
47248                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::JustifyContent as ToComputedValue>::ComputedValue>,
47249                        AnimationValueVariantRepr {
47250                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47251                            value,
47252                        },
47253                    );
47254                    out.assume_init()
47255                }
47256            }
47257            PropertyDeclaration::JustifyItems(ref value) => {
47258                let decl_repr = unsafe {
47259                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::JustifyItems>)
47260                };
47261                let longhand_id = unsafe {
47262                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47263                };
47264                context.for_non_inherited_property = true;
47265                let value = value.to_computed_value(context);
47266
47267                unsafe {
47268                    let mut out = mem::MaybeUninit::uninit();
47269                    ptr::write(
47270                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::JustifyItems as ToComputedValue>::ComputedValue>,
47271                        AnimationValueVariantRepr {
47272                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47273                            value,
47274                        },
47275                    );
47276                    out.assume_init()
47277                }
47278            }
47279            PropertyDeclaration::JustifySelf(ref value) => {
47280                let decl_repr = unsafe {
47281                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::JustifySelf>)
47282                };
47283                let longhand_id = unsafe {
47284                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47285                };
47286                context.for_non_inherited_property = true;
47287                let value = value.to_computed_value(context);
47288
47289                unsafe {
47290                    let mut out = mem::MaybeUninit::uninit();
47291                    ptr::write(
47292                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::JustifySelf as ToComputedValue>::ComputedValue>,
47293                        AnimationValueVariantRepr {
47294                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47295                            value,
47296                        },
47297                    );
47298                    out.assume_init()
47299                }
47300            }
47301            PropertyDeclaration::ListStylePosition(ref value) => {
47302                let decl_repr = unsafe {
47303                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::list_style_position::SpecifiedValue>)
47304                };
47305                let longhand_id = unsafe {
47306                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47307                };
47308                context.for_non_inherited_property = false;
47309                let value = value.to_computed_value(context);
47310
47311                unsafe {
47312                    let mut out = mem::MaybeUninit::uninit();
47313                    ptr::write(
47314                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::list_style_position::SpecifiedValue as ToComputedValue>::ComputedValue>,
47315                        AnimationValueVariantRepr {
47316                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47317                            value,
47318                        },
47319                    );
47320                    out.assume_init()
47321                }
47322            }
47323            PropertyDeclaration::ListStyleType(ref value) => {
47324                let decl_repr = unsafe {
47325                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::list_style_type::SpecifiedValue>)
47326                };
47327                let longhand_id = unsafe {
47328                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47329                };
47330                context.for_non_inherited_property = false;
47331                let value = value.to_computed_value(context);
47332
47333                unsafe {
47334                    let mut out = mem::MaybeUninit::uninit();
47335                    ptr::write(
47336                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::list_style_type::SpecifiedValue as ToComputedValue>::ComputedValue>,
47337                        AnimationValueVariantRepr {
47338                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47339                            value,
47340                        },
47341                    );
47342                    out.assume_init()
47343                }
47344            }
47345            PropertyDeclaration::MixBlendMode(ref value) => {
47346                let decl_repr = unsafe {
47347                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::mix_blend_mode::SpecifiedValue>)
47348                };
47349                let longhand_id = unsafe {
47350                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47351                };
47352                context.for_non_inherited_property = true;
47353                let value = value.to_computed_value(context);
47354
47355                unsafe {
47356                    let mut out = mem::MaybeUninit::uninit();
47357                    ptr::write(
47358                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::mix_blend_mode::SpecifiedValue as ToComputedValue>::ComputedValue>,
47359                        AnimationValueVariantRepr {
47360                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47361                            value,
47362                        },
47363                    );
47364                    out.assume_init()
47365                }
47366            }
47367            PropertyDeclaration::ObjectFit(ref value) => {
47368                let decl_repr = unsafe {
47369                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::object_fit::SpecifiedValue>)
47370                };
47371                let longhand_id = unsafe {
47372                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47373                };
47374                context.for_non_inherited_property = true;
47375                let value = value.to_computed_value(context);
47376
47377                unsafe {
47378                    let mut out = mem::MaybeUninit::uninit();
47379                    ptr::write(
47380                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::object_fit::SpecifiedValue as ToComputedValue>::ComputedValue>,
47381                        AnimationValueVariantRepr {
47382                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47383                            value,
47384                        },
47385                    );
47386                    out.assume_init()
47387                }
47388            }
47389            PropertyDeclaration::Opacity(ref value) => {
47390                let decl_repr = unsafe {
47391                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Opacity>)
47392                };
47393                let longhand_id = unsafe {
47394                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47395                };
47396                context.for_non_inherited_property = true;
47397                let value = value.to_computed_value(context);
47398                let value = value.to_animated_value(&crate::values::animated::Context { style });
47399
47400                unsafe {
47401                    let mut out = mem::MaybeUninit::uninit();
47402                    ptr::write(
47403                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Opacity as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
47404                        AnimationValueVariantRepr {
47405                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47406                            value,
47407                        },
47408                    );
47409                    out.assume_init()
47410                }
47411            }
47412            PropertyDeclaration::Order(ref value) => {
47413                let decl_repr = unsafe {
47414                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Integer>)
47415                };
47416                let longhand_id = unsafe {
47417                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47418                };
47419                context.for_non_inherited_property = true;
47420                let value = value.to_computed_value(context);
47421                let value = value.to_animated_value(&crate::values::animated::Context { style });
47422
47423                unsafe {
47424                    let mut out = mem::MaybeUninit::uninit();
47425                    ptr::write(
47426                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Integer as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
47427                        AnimationValueVariantRepr {
47428                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47429                            value,
47430                        },
47431                    );
47432                    out.assume_init()
47433                }
47434            }
47435            PropertyDeclaration::OutlineStyle(ref value) => {
47436                let decl_repr = unsafe {
47437                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::OutlineStyle>)
47438                };
47439                let longhand_id = unsafe {
47440                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47441                };
47442                context.for_non_inherited_property = true;
47443                let value = value.to_computed_value(context);
47444
47445                unsafe {
47446                    let mut out = mem::MaybeUninit::uninit();
47447                    ptr::write(
47448                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::OutlineStyle as ToComputedValue>::ComputedValue>,
47449                        AnimationValueVariantRepr {
47450                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47451                            value,
47452                        },
47453                    );
47454                    out.assume_init()
47455                }
47456            }
47457            PropertyDeclaration::OverflowWrap(ref value) => {
47458                let decl_repr = unsafe {
47459                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::OverflowWrap>)
47460                };
47461                let longhand_id = unsafe {
47462                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47463                };
47464                context.for_non_inherited_property = false;
47465                let value = value.to_computed_value(context);
47466
47467                unsafe {
47468                    let mut out = mem::MaybeUninit::uninit();
47469                    ptr::write(
47470                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::OverflowWrap as ToComputedValue>::ComputedValue>,
47471                        AnimationValueVariantRepr {
47472                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47473                            value,
47474                        },
47475                    );
47476                    out.assume_init()
47477                }
47478            }
47479            PropertyDeclaration::PointerEvents(ref value) => {
47480                let decl_repr = unsafe {
47481                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::PointerEvents>)
47482                };
47483                let longhand_id = unsafe {
47484                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47485                };
47486                context.for_non_inherited_property = false;
47487                let value = value.to_computed_value(context);
47488
47489                unsafe {
47490                    let mut out = mem::MaybeUninit::uninit();
47491                    ptr::write(
47492                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::PointerEvents as ToComputedValue>::ComputedValue>,
47493                        AnimationValueVariantRepr {
47494                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47495                            value,
47496                        },
47497                    );
47498                    out.assume_init()
47499                }
47500            }
47501            PropertyDeclaration::Position(ref value) => {
47502                let decl_repr = unsafe {
47503                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::PositionProperty>)
47504                };
47505                let longhand_id = unsafe {
47506                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47507                };
47508                context.for_non_inherited_property = true;
47509                let value = value.to_computed_value(context);
47510
47511                unsafe {
47512                    let mut out = mem::MaybeUninit::uninit();
47513                    ptr::write(
47514                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::PositionProperty as ToComputedValue>::ComputedValue>,
47515                        AnimationValueVariantRepr {
47516                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47517                            value,
47518                        },
47519                    );
47520                    out.assume_init()
47521                }
47522            }
47523            PropertyDeclaration::TableLayout(ref value) => {
47524                let decl_repr = unsafe {
47525                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::table_layout::SpecifiedValue>)
47526                };
47527                let longhand_id = unsafe {
47528                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47529                };
47530                context.for_non_inherited_property = true;
47531                let value = value.to_computed_value(context);
47532
47533                unsafe {
47534                    let mut out = mem::MaybeUninit::uninit();
47535                    ptr::write(
47536                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::table_layout::SpecifiedValue as ToComputedValue>::ComputedValue>,
47537                        AnimationValueVariantRepr {
47538                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47539                            value,
47540                        },
47541                    );
47542                    out.assume_init()
47543                }
47544            }
47545            PropertyDeclaration::TextAlign(ref value) => {
47546                let decl_repr = unsafe {
47547                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::TextAlign>)
47548                };
47549                let longhand_id = unsafe {
47550                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47551                };
47552                context.for_non_inherited_property = false;
47553                let value = value.to_computed_value(context);
47554
47555                unsafe {
47556                    let mut out = mem::MaybeUninit::uninit();
47557                    ptr::write(
47558                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::TextAlign as ToComputedValue>::ComputedValue>,
47559                        AnimationValueVariantRepr {
47560                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47561                            value,
47562                        },
47563                    );
47564                    out.assume_init()
47565                }
47566            }
47567            PropertyDeclaration::TextAlignLast(ref value) => {
47568                let decl_repr = unsafe {
47569                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::TextAlignLast>)
47570                };
47571                let longhand_id = unsafe {
47572                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47573                };
47574                context.for_non_inherited_property = false;
47575                let value = value.to_computed_value(context);
47576
47577                unsafe {
47578                    let mut out = mem::MaybeUninit::uninit();
47579                    ptr::write(
47580                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::TextAlignLast as ToComputedValue>::ComputedValue>,
47581                        AnimationValueVariantRepr {
47582                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47583                            value,
47584                        },
47585                    );
47586                    out.assume_init()
47587                }
47588            }
47589            PropertyDeclaration::TextDecorationLine(ref value) => {
47590                let decl_repr = unsafe {
47591                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::TextDecorationLine>)
47592                };
47593                let longhand_id = unsafe {
47594                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47595                };
47596                context.for_non_inherited_property = true;
47597                let value = value.to_computed_value(context);
47598
47599                unsafe {
47600                    let mut out = mem::MaybeUninit::uninit();
47601                    ptr::write(
47602                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::TextDecorationLine as ToComputedValue>::ComputedValue>,
47603                        AnimationValueVariantRepr {
47604                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47605                            value,
47606                        },
47607                    );
47608                    out.assume_init()
47609                }
47610            }
47611            PropertyDeclaration::TextDecorationStyle(ref value) => {
47612                let decl_repr = unsafe {
47613                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::text_decoration_style::SpecifiedValue>)
47614                };
47615                let longhand_id = unsafe {
47616                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47617                };
47618                context.for_non_inherited_property = true;
47619                let value = value.to_computed_value(context);
47620
47621                unsafe {
47622                    let mut out = mem::MaybeUninit::uninit();
47623                    ptr::write(
47624                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::text_decoration_style::SpecifiedValue as ToComputedValue>::ComputedValue>,
47625                        AnimationValueVariantRepr {
47626                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47627                            value,
47628                        },
47629                    );
47630                    out.assume_init()
47631                }
47632            }
47633            PropertyDeclaration::TextJustify(ref value) => {
47634                let decl_repr = unsafe {
47635                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::TextJustify>)
47636                };
47637                let longhand_id = unsafe {
47638                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47639                };
47640                context.for_non_inherited_property = false;
47641                let value = value.to_computed_value(context);
47642
47643                unsafe {
47644                    let mut out = mem::MaybeUninit::uninit();
47645                    ptr::write(
47646                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::TextJustify as ToComputedValue>::ComputedValue>,
47647                        AnimationValueVariantRepr {
47648                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47649                            value,
47650                        },
47651                    );
47652                    out.assume_init()
47653                }
47654            }
47655            PropertyDeclaration::TextRendering(ref value) => {
47656                let decl_repr = unsafe {
47657                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::text_rendering::SpecifiedValue>)
47658                };
47659                let longhand_id = unsafe {
47660                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47661                };
47662                context.for_non_inherited_property = false;
47663                let value = value.to_computed_value(context);
47664
47665                unsafe {
47666                    let mut out = mem::MaybeUninit::uninit();
47667                    ptr::write(
47668                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::text_rendering::SpecifiedValue as ToComputedValue>::ComputedValue>,
47669                        AnimationValueVariantRepr {
47670                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47671                            value,
47672                        },
47673                    );
47674                    out.assume_init()
47675                }
47676            }
47677            PropertyDeclaration::TextTransform(ref value) => {
47678                let decl_repr = unsafe {
47679                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::TextTransform>)
47680                };
47681                let longhand_id = unsafe {
47682                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47683                };
47684                context.for_non_inherited_property = false;
47685                let value = value.to_computed_value(context);
47686
47687                unsafe {
47688                    let mut out = mem::MaybeUninit::uninit();
47689                    ptr::write(
47690                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::TextTransform as ToComputedValue>::ComputedValue>,
47691                        AnimationValueVariantRepr {
47692                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47693                            value,
47694                        },
47695                    );
47696                    out.assume_init()
47697                }
47698            }
47699            PropertyDeclaration::TextWrapMode(ref value) => {
47700                let decl_repr = unsafe {
47701                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::text_wrap_mode::SpecifiedValue>)
47702                };
47703                let longhand_id = unsafe {
47704                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47705                };
47706                context.for_non_inherited_property = false;
47707                let value = value.to_computed_value(context);
47708
47709                unsafe {
47710                    let mut out = mem::MaybeUninit::uninit();
47711                    ptr::write(
47712                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::text_wrap_mode::SpecifiedValue as ToComputedValue>::ComputedValue>,
47713                        AnimationValueVariantRepr {
47714                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47715                            value,
47716                        },
47717                    );
47718                    out.assume_init()
47719                }
47720            }
47721            PropertyDeclaration::TransformStyle(ref value) => {
47722                let decl_repr = unsafe {
47723                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::TransformStyle>)
47724                };
47725                let longhand_id = unsafe {
47726                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47727                };
47728                context.for_non_inherited_property = true;
47729                let value = value.to_computed_value(context);
47730
47731                unsafe {
47732                    let mut out = mem::MaybeUninit::uninit();
47733                    ptr::write(
47734                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::TransformStyle as ToComputedValue>::ComputedValue>,
47735                        AnimationValueVariantRepr {
47736                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47737                            value,
47738                        },
47739                    );
47740                    out.assume_init()
47741                }
47742            }
47743            PropertyDeclaration::Visibility(ref value) => {
47744                let decl_repr = unsafe {
47745                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::visibility::SpecifiedValue>)
47746                };
47747                let longhand_id = unsafe {
47748                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47749                };
47750                context.for_non_inherited_property = false;
47751                let value = value.to_computed_value(context);
47752                let value = value.to_animated_value(&crate::values::animated::Context { style });
47753
47754                unsafe {
47755                    let mut out = mem::MaybeUninit::uninit();
47756                    ptr::write(
47757                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<longhands::visibility::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
47758                        AnimationValueVariantRepr {
47759                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47760                            value,
47761                        },
47762                    );
47763                    out.assume_init()
47764                }
47765            }
47766            PropertyDeclaration::WhiteSpaceCollapse(ref value) => {
47767                let decl_repr = unsafe {
47768                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::white_space_collapse::SpecifiedValue>)
47769                };
47770                let longhand_id = unsafe {
47771                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47772                };
47773                context.for_non_inherited_property = false;
47774                let value = value.to_computed_value(context);
47775
47776                unsafe {
47777                    let mut out = mem::MaybeUninit::uninit();
47778                    ptr::write(
47779                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::white_space_collapse::SpecifiedValue as ToComputedValue>::ComputedValue>,
47780                        AnimationValueVariantRepr {
47781                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47782                            value,
47783                        },
47784                    );
47785                    out.assume_init()
47786                }
47787            }
47788            PropertyDeclaration::WordBreak(ref value) => {
47789                let decl_repr = unsafe {
47790                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::WordBreak>)
47791                };
47792                let longhand_id = unsafe {
47793                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47794                };
47795                context.for_non_inherited_property = false;
47796                let value = value.to_computed_value(context);
47797
47798                unsafe {
47799                    let mut out = mem::MaybeUninit::uninit();
47800                    ptr::write(
47801                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::WordBreak as ToComputedValue>::ComputedValue>,
47802                        AnimationValueVariantRepr {
47803                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47804                            value,
47805                        },
47806                    );
47807                    out.assume_init()
47808                }
47809            }
47810            PropertyDeclaration::ZIndex(ref value) => {
47811                let decl_repr = unsafe {
47812                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::ZIndex>)
47813                };
47814                let longhand_id = unsafe {
47815                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47816                };
47817                context.for_non_inherited_property = true;
47818                let value = value.to_computed_value(context);
47819                let value = value.to_animated_value(&crate::values::animated::Context { style });
47820
47821                unsafe {
47822                    let mut out = mem::MaybeUninit::uninit();
47823                    ptr::write(
47824                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::ZIndex as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
47825                        AnimationValueVariantRepr {
47826                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47827                            value,
47828                        },
47829                    );
47830                    out.assume_init()
47831                }
47832            }
47833            PropertyDeclaration::Zoom(ref value) => {
47834                let decl_repr = unsafe {
47835                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Zoom>)
47836                };
47837                let longhand_id = unsafe {
47838                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47839                };
47840                context.for_non_inherited_property = true;
47841                let value = value.to_computed_value(context);
47842                let value = value.to_animated_value(&crate::values::animated::Context { style });
47843
47844                unsafe {
47845                    let mut out = mem::MaybeUninit::uninit();
47846                    ptr::write(
47847                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Zoom as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
47848                        AnimationValueVariantRepr {
47849                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47850                            value,
47851                        },
47852                    );
47853                    out.assume_init()
47854                }
47855            }
47856            PropertyDeclaration::FlexGrow(ref value) |
47857PropertyDeclaration::FlexShrink(ref value) => {
47858                let decl_repr = unsafe {
47859                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::NonNegativeNumber>)
47860                };
47861                let longhand_id = unsafe {
47862                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47863                };
47864                context.for_non_inherited_property = true;
47865                let value = value.to_computed_value(context);
47866                let value = value.to_animated_value(&crate::values::animated::Context { style });
47867
47868                unsafe {
47869                    let mut out = mem::MaybeUninit::uninit();
47870                    ptr::write(
47871                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::NonNegativeNumber as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
47872                        AnimationValueVariantRepr {
47873                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47874                            value,
47875                        },
47876                    );
47877                    out.assume_init()
47878                }
47879            }
47880            PropertyDeclaration::OverflowBlock(ref value) |
47881PropertyDeclaration::OverflowInline(ref value) |
47882PropertyDeclaration::OverflowX(ref value) |
47883PropertyDeclaration::OverflowY(ref value) => {
47884                let decl_repr = unsafe {
47885                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Overflow>)
47886                };
47887                let longhand_id = unsafe {
47888                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47889                };
47890                context.for_non_inherited_property = true;
47891                let value = value.to_computed_value(context);
47892
47893                unsafe {
47894                    let mut out = mem::MaybeUninit::uninit();
47895                    ptr::write(
47896                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::Overflow as ToComputedValue>::ComputedValue>,
47897                        AnimationValueVariantRepr {
47898                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47899                            value,
47900                        },
47901                    );
47902                    out.assume_init()
47903                }
47904            }
47905            PropertyDeclaration::BorderBottomStyle(ref value) |
47906PropertyDeclaration::BorderLeftStyle(ref value) |
47907PropertyDeclaration::BorderRightStyle(ref value) |
47908PropertyDeclaration::BorderTopStyle(ref value) => {
47909                let decl_repr = unsafe {
47910                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::BorderStyle>)
47911                };
47912                let longhand_id = unsafe {
47913                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47914                };
47915                context.for_non_inherited_property = true;
47916                let value = value.to_computed_value(context);
47917
47918                unsafe {
47919                    let mut out = mem::MaybeUninit::uninit();
47920                    ptr::write(
47921                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::BorderStyle as ToComputedValue>::ComputedValue>,
47922                        AnimationValueVariantRepr {
47923                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47924                            value,
47925                        },
47926                    );
47927                    out.assume_init()
47928                }
47929            }
47930            PropertyDeclaration::BackdropFilter(ref value) => {
47931                let decl_repr = unsafe {
47932                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::backdrop_filter::SpecifiedValue>)
47933                };
47934                let longhand_id = unsafe {
47935                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47936                };
47937                context.for_non_inherited_property = true;
47938                let value = value.to_computed_value(context);
47939                let value = value.to_animated_value(&crate::values::animated::Context { style });
47940
47941                unsafe {
47942                    let mut out = mem::MaybeUninit::uninit();
47943                    ptr::write(
47944                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<longhands::backdrop_filter::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
47945                        AnimationValueVariantRepr {
47946                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47947                            value,
47948                        },
47949                    );
47950                    out.assume_init()
47951                }
47952            }
47953            PropertyDeclaration::BackgroundAttachment(ref value) => {
47954                let decl_repr = unsafe {
47955                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::background_attachment::SpecifiedValue>)
47956                };
47957                let longhand_id = unsafe {
47958                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47959                };
47960                context.for_non_inherited_property = true;
47961                let value = value.to_computed_value(context);
47962
47963                unsafe {
47964                    let mut out = mem::MaybeUninit::uninit();
47965                    ptr::write(
47966                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::background_attachment::SpecifiedValue as ToComputedValue>::ComputedValue>,
47967                        AnimationValueVariantRepr {
47968                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47969                            value,
47970                        },
47971                    );
47972                    out.assume_init()
47973                }
47974            }
47975            PropertyDeclaration::BackgroundClip(ref value) => {
47976                let decl_repr = unsafe {
47977                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::background_clip::SpecifiedValue>)
47978                };
47979                let longhand_id = unsafe {
47980                    *(&decl_repr.tag as *const u16 as *const LonghandId)
47981                };
47982                context.for_non_inherited_property = true;
47983                let value = value.to_computed_value(context);
47984
47985                unsafe {
47986                    let mut out = mem::MaybeUninit::uninit();
47987                    ptr::write(
47988                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::background_clip::SpecifiedValue as ToComputedValue>::ComputedValue>,
47989                        AnimationValueVariantRepr {
47990                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
47991                            value,
47992                        },
47993                    );
47994                    out.assume_init()
47995                }
47996            }
47997            PropertyDeclaration::BackgroundImage(ref value) => {
47998                let decl_repr = unsafe {
47999                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::background_image::SpecifiedValue>)
48000                };
48001                let longhand_id = unsafe {
48002                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48003                };
48004                context.for_non_inherited_property = true;
48005                let value = value.to_computed_value(context);
48006
48007                unsafe {
48008                    let mut out = mem::MaybeUninit::uninit();
48009                    ptr::write(
48010                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::background_image::SpecifiedValue as ToComputedValue>::ComputedValue>,
48011                        AnimationValueVariantRepr {
48012                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48013                            value,
48014                        },
48015                    );
48016                    out.assume_init()
48017                }
48018            }
48019            PropertyDeclaration::BackgroundOrigin(ref value) => {
48020                let decl_repr = unsafe {
48021                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::background_origin::SpecifiedValue>)
48022                };
48023                let longhand_id = unsafe {
48024                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48025                };
48026                context.for_non_inherited_property = true;
48027                let value = value.to_computed_value(context);
48028
48029                unsafe {
48030                    let mut out = mem::MaybeUninit::uninit();
48031                    ptr::write(
48032                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::background_origin::SpecifiedValue as ToComputedValue>::ComputedValue>,
48033                        AnimationValueVariantRepr {
48034                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48035                            value,
48036                        },
48037                    );
48038                    out.assume_init()
48039                }
48040            }
48041            PropertyDeclaration::BackgroundPositionX(ref value) => {
48042                let decl_repr = unsafe {
48043                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::background_position_x::SpecifiedValue>)
48044                };
48045                let longhand_id = unsafe {
48046                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48047                };
48048                context.for_non_inherited_property = true;
48049                let value = value.to_computed_value(context);
48050                let value = value.to_animated_value(&crate::values::animated::Context { style });
48051
48052                unsafe {
48053                    let mut out = mem::MaybeUninit::uninit();
48054                    ptr::write(
48055                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<longhands::background_position_x::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48056                        AnimationValueVariantRepr {
48057                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48058                            value,
48059                        },
48060                    );
48061                    out.assume_init()
48062                }
48063            }
48064            PropertyDeclaration::BackgroundPositionY(ref value) => {
48065                let decl_repr = unsafe {
48066                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::background_position_y::SpecifiedValue>)
48067                };
48068                let longhand_id = unsafe {
48069                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48070                };
48071                context.for_non_inherited_property = true;
48072                let value = value.to_computed_value(context);
48073                let value = value.to_animated_value(&crate::values::animated::Context { style });
48074
48075                unsafe {
48076                    let mut out = mem::MaybeUninit::uninit();
48077                    ptr::write(
48078                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<longhands::background_position_y::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48079                        AnimationValueVariantRepr {
48080                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48081                            value,
48082                        },
48083                    );
48084                    out.assume_init()
48085                }
48086            }
48087            PropertyDeclaration::BackgroundRepeat(ref value) => {
48088                let decl_repr = unsafe {
48089                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::background_repeat::SpecifiedValue>)
48090                };
48091                let longhand_id = unsafe {
48092                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48093                };
48094                context.for_non_inherited_property = true;
48095                let value = value.to_computed_value(context);
48096
48097                unsafe {
48098                    let mut out = mem::MaybeUninit::uninit();
48099                    ptr::write(
48100                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::background_repeat::SpecifiedValue as ToComputedValue>::ComputedValue>,
48101                        AnimationValueVariantRepr {
48102                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48103                            value,
48104                        },
48105                    );
48106                    out.assume_init()
48107                }
48108            }
48109            PropertyDeclaration::BackgroundSize(ref value) => {
48110                let decl_repr = unsafe {
48111                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::background_size::SpecifiedValue>)
48112                };
48113                let longhand_id = unsafe {
48114                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48115                };
48116                context.for_non_inherited_property = true;
48117                let value = value.to_computed_value(context);
48118                let value = value.to_animated_value(&crate::values::animated::Context { style });
48119
48120                unsafe {
48121                    let mut out = mem::MaybeUninit::uninit();
48122                    ptr::write(
48123                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<longhands::background_size::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48124                        AnimationValueVariantRepr {
48125                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48126                            value,
48127                        },
48128                    );
48129                    out.assume_init()
48130                }
48131            }
48132            PropertyDeclaration::BorderImageOutset(ref value) => {
48133                let decl_repr = unsafe {
48134                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::NonNegativeLengthOrNumberRect>>)
48135                };
48136                let longhand_id = unsafe {
48137                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48138                };
48139                context.for_non_inherited_property = true;
48140                let value = (**value).to_computed_value(context);
48141                let value = value.to_animated_value(&crate::values::animated::Context { style });
48142
48143                unsafe {
48144                    let mut out = mem::MaybeUninit::uninit();
48145                    ptr::write(
48146                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::NonNegativeLengthOrNumberRect as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48147                        AnimationValueVariantRepr {
48148                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48149                            value,
48150                        },
48151                    );
48152                    out.assume_init()
48153                }
48154            }
48155            PropertyDeclaration::BorderImageSlice(ref value) => {
48156                let decl_repr = unsafe {
48157                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::BorderImageSlice>>)
48158                };
48159                let longhand_id = unsafe {
48160                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48161                };
48162                context.for_non_inherited_property = true;
48163                let value = (**value).to_computed_value(context);
48164                let value = value.to_animated_value(&crate::values::animated::Context { style });
48165
48166                unsafe {
48167                    let mut out = mem::MaybeUninit::uninit();
48168                    ptr::write(
48169                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::BorderImageSlice as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48170                        AnimationValueVariantRepr {
48171                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48172                            value,
48173                        },
48174                    );
48175                    out.assume_init()
48176                }
48177            }
48178            PropertyDeclaration::BorderImageWidth(ref value) => {
48179                let decl_repr = unsafe {
48180                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::BorderImageWidth>>)
48181                };
48182                let longhand_id = unsafe {
48183                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48184                };
48185                context.for_non_inherited_property = true;
48186                let value = (**value).to_computed_value(context);
48187                let value = value.to_animated_value(&crate::values::animated::Context { style });
48188
48189                unsafe {
48190                    let mut out = mem::MaybeUninit::uninit();
48191                    ptr::write(
48192                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::BorderImageWidth as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48193                        AnimationValueVariantRepr {
48194                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48195                            value,
48196                        },
48197                    );
48198                    out.assume_init()
48199                }
48200            }
48201            PropertyDeclaration::BorderSpacing(ref value) => {
48202                let decl_repr = unsafe {
48203                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::BorderSpacing>>)
48204                };
48205                let longhand_id = unsafe {
48206                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48207                };
48208                context.for_non_inherited_property = false;
48209                let value = (**value).to_computed_value(context);
48210                let value = value.to_animated_value(&crate::values::animated::Context { style });
48211
48212                unsafe {
48213                    let mut out = mem::MaybeUninit::uninit();
48214                    ptr::write(
48215                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::BorderSpacing as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48216                        AnimationValueVariantRepr {
48217                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48218                            value,
48219                        },
48220                    );
48221                    out.assume_init()
48222                }
48223            }
48224            PropertyDeclaration::BoxShadow(ref value) => {
48225                let decl_repr = unsafe {
48226                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::box_shadow::SpecifiedValue>)
48227                };
48228                let longhand_id = unsafe {
48229                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48230                };
48231                context.for_non_inherited_property = true;
48232                let value = value.to_computed_value(context);
48233                let value = value.to_animated_value(&crate::values::animated::Context { style });
48234
48235                unsafe {
48236                    let mut out = mem::MaybeUninit::uninit();
48237                    ptr::write(
48238                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<longhands::box_shadow::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48239                        AnimationValueVariantRepr {
48240                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48241                            value,
48242                        },
48243                    );
48244                    out.assume_init()
48245                }
48246            }
48247            PropertyDeclaration::Clip(ref value) => {
48248                let decl_repr = unsafe {
48249                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::ClipRectOrAuto>>)
48250                };
48251                let longhand_id = unsafe {
48252                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48253                };
48254                context.for_non_inherited_property = true;
48255                let value = (**value).to_computed_value(context);
48256                let value = value.to_animated_value(&crate::values::animated::Context { style });
48257
48258                unsafe {
48259                    let mut out = mem::MaybeUninit::uninit();
48260                    ptr::write(
48261                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::ClipRectOrAuto as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48262                        AnimationValueVariantRepr {
48263                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48264                            value,
48265                        },
48266                    );
48267                    out.assume_init()
48268                }
48269            }
48270            PropertyDeclaration::ClipPath(ref value) => {
48271                let decl_repr = unsafe {
48272                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::basic_shape::ClipPath>)
48273                };
48274                let longhand_id = unsafe {
48275                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48276                };
48277                context.for_non_inherited_property = true;
48278                let value = value.to_computed_value(context);
48279                let value = value.to_animated_value(&crate::values::animated::Context { style });
48280
48281                unsafe {
48282                    let mut out = mem::MaybeUninit::uninit();
48283                    ptr::write(
48284                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::basic_shape::ClipPath as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48285                        AnimationValueVariantRepr {
48286                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48287                            value,
48288                        },
48289                    );
48290                    out.assume_init()
48291                }
48292            }
48293            PropertyDeclaration::Color(ref value) => {
48294                let decl_repr = unsafe {
48295                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::ColorPropertyValue>)
48296                };
48297                let longhand_id = unsafe {
48298                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48299                };
48300                context.for_non_inherited_property = false;
48301                let value = value.to_computed_value(context);
48302                let value = value.to_animated_value(&crate::values::animated::Context { style });
48303
48304                unsafe {
48305                    let mut out = mem::MaybeUninit::uninit();
48306                    ptr::write(
48307                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::ColorPropertyValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48308                        AnimationValueVariantRepr {
48309                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48310                            value,
48311                        },
48312                    );
48313                    out.assume_init()
48314                }
48315            }
48316            PropertyDeclaration::ColorScheme(ref value) => {
48317                let decl_repr = unsafe {
48318                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::ColorScheme>)
48319                };
48320                let longhand_id = unsafe {
48321                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48322                };
48323                context.for_non_inherited_property = false;
48324                let value = value.to_computed_value(context);
48325
48326                unsafe {
48327                    let mut out = mem::MaybeUninit::uninit();
48328                    ptr::write(
48329                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::ColorScheme as ToComputedValue>::ComputedValue>,
48330                        AnimationValueVariantRepr {
48331                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48332                            value,
48333                        },
48334                    );
48335                    out.assume_init()
48336                }
48337            }
48338            PropertyDeclaration::ColumnWidth(ref value) => {
48339                let decl_repr = unsafe {
48340                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::length::NonNegativeLengthOrAuto>)
48341                };
48342                let longhand_id = unsafe {
48343                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48344                };
48345                context.for_non_inherited_property = true;
48346                let value = value.to_computed_value(context);
48347                let value = value.to_animated_value(&crate::values::animated::Context { style });
48348
48349                unsafe {
48350                    let mut out = mem::MaybeUninit::uninit();
48351                    ptr::write(
48352                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::length::NonNegativeLengthOrAuto as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48353                        AnimationValueVariantRepr {
48354                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48355                            value,
48356                        },
48357                    );
48358                    out.assume_init()
48359                }
48360            }
48361            PropertyDeclaration::Content(ref value) => {
48362                let decl_repr = unsafe {
48363                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Content>)
48364                };
48365                let longhand_id = unsafe {
48366                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48367                };
48368                context.for_non_inherited_property = true;
48369                let value = value.to_computed_value(context);
48370
48371                unsafe {
48372                    let mut out = mem::MaybeUninit::uninit();
48373                    ptr::write(
48374                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::Content as ToComputedValue>::ComputedValue>,
48375                        AnimationValueVariantRepr {
48376                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48377                            value,
48378                        },
48379                    );
48380                    out.assume_init()
48381                }
48382            }
48383            PropertyDeclaration::CounterIncrement(ref value) => {
48384                let decl_repr = unsafe {
48385                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::CounterIncrement>)
48386                };
48387                let longhand_id = unsafe {
48388                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48389                };
48390                context.for_non_inherited_property = true;
48391                let value = value.to_computed_value(context);
48392
48393                unsafe {
48394                    let mut out = mem::MaybeUninit::uninit();
48395                    ptr::write(
48396                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::CounterIncrement as ToComputedValue>::ComputedValue>,
48397                        AnimationValueVariantRepr {
48398                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48399                            value,
48400                        },
48401                    );
48402                    out.assume_init()
48403                }
48404            }
48405            PropertyDeclaration::CounterReset(ref value) => {
48406                let decl_repr = unsafe {
48407                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::CounterReset>)
48408                };
48409                let longhand_id = unsafe {
48410                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48411                };
48412                context.for_non_inherited_property = true;
48413                let value = value.to_computed_value(context);
48414
48415                unsafe {
48416                    let mut out = mem::MaybeUninit::uninit();
48417                    ptr::write(
48418                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::CounterReset as ToComputedValue>::ComputedValue>,
48419                        AnimationValueVariantRepr {
48420                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48421                            value,
48422                        },
48423                    );
48424                    out.assume_init()
48425                }
48426            }
48427            PropertyDeclaration::Cursor(ref value) => {
48428                let decl_repr = unsafe {
48429                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Cursor>)
48430                };
48431                let longhand_id = unsafe {
48432                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48433                };
48434                context.for_non_inherited_property = false;
48435                let value = value.to_computed_value(context);
48436
48437                unsafe {
48438                    let mut out = mem::MaybeUninit::uninit();
48439                    ptr::write(
48440                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::Cursor as ToComputedValue>::ComputedValue>,
48441                        AnimationValueVariantRepr {
48442                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48443                            value,
48444                        },
48445                    );
48446                    out.assume_init()
48447                }
48448            }
48449            PropertyDeclaration::Filter(ref value) => {
48450                let decl_repr = unsafe {
48451                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::filter::SpecifiedValue>)
48452                };
48453                let longhand_id = unsafe {
48454                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48455                };
48456                context.for_non_inherited_property = true;
48457                let value = value.to_computed_value(context);
48458                let value = value.to_animated_value(&crate::values::animated::Context { style });
48459
48460                unsafe {
48461                    let mut out = mem::MaybeUninit::uninit();
48462                    ptr::write(
48463                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<longhands::filter::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48464                        AnimationValueVariantRepr {
48465                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48466                            value,
48467                        },
48468                    );
48469                    out.assume_init()
48470                }
48471            }
48472            PropertyDeclaration::FlexBasis(ref value) => {
48473                let decl_repr = unsafe {
48474                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::FlexBasis>>)
48475                };
48476                let longhand_id = unsafe {
48477                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48478                };
48479                context.for_non_inherited_property = true;
48480                let value = (**value).to_computed_value(context);
48481                let value = value.to_animated_value(&crate::values::animated::Context { style });
48482
48483                unsafe {
48484                    let mut out = mem::MaybeUninit::uninit();
48485                    ptr::write(
48486                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::FlexBasis as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48487                        AnimationValueVariantRepr {
48488                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48489                            value,
48490                        },
48491                    );
48492                    out.assume_init()
48493                }
48494            }
48495            PropertyDeclaration::FontFamily(ref value) => {
48496                let decl_repr = unsafe {
48497                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::FontFamily>)
48498                };
48499                let longhand_id = unsafe {
48500                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48501                };
48502                context.for_non_inherited_property = false;
48503                let value = value.to_computed_value(context);
48504
48505                unsafe {
48506                    let mut out = mem::MaybeUninit::uninit();
48507                    ptr::write(
48508                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::FontFamily as ToComputedValue>::ComputedValue>,
48509                        AnimationValueVariantRepr {
48510                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48511                            value,
48512                        },
48513                    );
48514                    out.assume_init()
48515                }
48516            }
48517            PropertyDeclaration::FontSize(ref value) => {
48518                let decl_repr = unsafe {
48519                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::FontSize>)
48520                };
48521                let longhand_id = unsafe {
48522                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48523                };
48524                context.for_non_inherited_property = false;
48525                let value = value.to_computed_value(context);
48526                let value = value.to_animated_value(&crate::values::animated::Context { style });
48527
48528                unsafe {
48529                    let mut out = mem::MaybeUninit::uninit();
48530                    ptr::write(
48531                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::FontSize as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48532                        AnimationValueVariantRepr {
48533                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48534                            value,
48535                        },
48536                    );
48537                    out.assume_init()
48538                }
48539            }
48540            PropertyDeclaration::FontVariationSettings(ref value) => {
48541                let decl_repr = unsafe {
48542                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::FontVariationSettings>)
48543                };
48544                let longhand_id = unsafe {
48545                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48546                };
48547                context.for_non_inherited_property = false;
48548                let value = value.to_computed_value(context);
48549                let value = value.to_animated_value(&crate::values::animated::Context { style });
48550
48551                unsafe {
48552                    let mut out = mem::MaybeUninit::uninit();
48553                    ptr::write(
48554                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::FontVariationSettings as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48555                        AnimationValueVariantRepr {
48556                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48557                            value,
48558                        },
48559                    );
48560                    out.assume_init()
48561                }
48562            }
48563            PropertyDeclaration::GridTemplateAreas(ref value) => {
48564                let decl_repr = unsafe {
48565                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::GridTemplateAreas>)
48566                };
48567                let longhand_id = unsafe {
48568                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48569                };
48570                context.for_non_inherited_property = true;
48571                let value = value.to_computed_value(context);
48572
48573                unsafe {
48574                    let mut out = mem::MaybeUninit::uninit();
48575                    ptr::write(
48576                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::GridTemplateAreas as ToComputedValue>::ComputedValue>,
48577                        AnimationValueVariantRepr {
48578                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48579                            value,
48580                        },
48581                    );
48582                    out.assume_init()
48583                }
48584            }
48585            PropertyDeclaration::LetterSpacing(ref value) => {
48586                let decl_repr = unsafe {
48587                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::LetterSpacing>)
48588                };
48589                let longhand_id = unsafe {
48590                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48591                };
48592                context.for_non_inherited_property = false;
48593                let value = value.to_computed_value(context);
48594                let value = value.to_animated_value(&crate::values::animated::Context { style });
48595
48596                unsafe {
48597                    let mut out = mem::MaybeUninit::uninit();
48598                    ptr::write(
48599                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::LetterSpacing as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48600                        AnimationValueVariantRepr {
48601                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48602                            value,
48603                        },
48604                    );
48605                    out.assume_init()
48606                }
48607            }
48608            PropertyDeclaration::LineHeight(ref value) => {
48609                let decl_repr = unsafe {
48610                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::LineHeight>)
48611                };
48612                let longhand_id = unsafe {
48613                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48614                };
48615                context.for_non_inherited_property = false;
48616                let value = value.to_computed_value(context);
48617                let value = value.to_animated_value(&crate::values::animated::Context { style });
48618
48619                unsafe {
48620                    let mut out = mem::MaybeUninit::uninit();
48621                    ptr::write(
48622                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::LineHeight as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48623                        AnimationValueVariantRepr {
48624                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48625                            value,
48626                        },
48627                    );
48628                    out.assume_init()
48629                }
48630            }
48631            PropertyDeclaration::MaskImage(ref value) => {
48632                let decl_repr = unsafe {
48633                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::mask_image::SpecifiedValue>)
48634                };
48635                let longhand_id = unsafe {
48636                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48637                };
48638                context.for_non_inherited_property = true;
48639                let value = value.to_computed_value(context);
48640
48641                unsafe {
48642                    let mut out = mem::MaybeUninit::uninit();
48643                    ptr::write(
48644                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::mask_image::SpecifiedValue as ToComputedValue>::ComputedValue>,
48645                        AnimationValueVariantRepr {
48646                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48647                            value,
48648                        },
48649                    );
48650                    out.assume_init()
48651                }
48652            }
48653            PropertyDeclaration::OffsetPath(ref value) => {
48654                let decl_repr = unsafe {
48655                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::OffsetPath>)
48656                };
48657                let longhand_id = unsafe {
48658                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48659                };
48660                context.for_non_inherited_property = true;
48661                let value = value.to_computed_value(context);
48662                let value = value.to_animated_value(&crate::values::animated::Context { style });
48663
48664                unsafe {
48665                    let mut out = mem::MaybeUninit::uninit();
48666                    ptr::write(
48667                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::OffsetPath as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48668                        AnimationValueVariantRepr {
48669                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48670                            value,
48671                        },
48672                    );
48673                    out.assume_init()
48674                }
48675            }
48676            PropertyDeclaration::Perspective(ref value) => {
48677                let decl_repr = unsafe {
48678                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Perspective>)
48679                };
48680                let longhand_id = unsafe {
48681                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48682                };
48683                context.for_non_inherited_property = true;
48684                let value = value.to_computed_value(context);
48685                let value = value.to_animated_value(&crate::values::animated::Context { style });
48686
48687                unsafe {
48688                    let mut out = mem::MaybeUninit::uninit();
48689                    ptr::write(
48690                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Perspective as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48691                        AnimationValueVariantRepr {
48692                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48693                            value,
48694                        },
48695                    );
48696                    out.assume_init()
48697                }
48698            }
48699            PropertyDeclaration::Quotes(ref value) => {
48700                let decl_repr = unsafe {
48701                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Quotes>)
48702                };
48703                let longhand_id = unsafe {
48704                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48705                };
48706                context.for_non_inherited_property = false;
48707                let value = value.to_computed_value(context);
48708
48709                unsafe {
48710                    let mut out = mem::MaybeUninit::uninit();
48711                    ptr::write(
48712                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::Quotes as ToComputedValue>::ComputedValue>,
48713                        AnimationValueVariantRepr {
48714                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48715                            value,
48716                        },
48717                    );
48718                    out.assume_init()
48719                }
48720            }
48721            PropertyDeclaration::Rotate(ref value) => {
48722                let decl_repr = unsafe {
48723                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::Rotate>>)
48724                };
48725                let longhand_id = unsafe {
48726                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48727                };
48728                context.for_non_inherited_property = true;
48729                let value = (**value).to_computed_value(context);
48730                let value = value.to_animated_value(&crate::values::animated::Context { style });
48731
48732                unsafe {
48733                    let mut out = mem::MaybeUninit::uninit();
48734                    ptr::write(
48735                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Rotate as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48736                        AnimationValueVariantRepr {
48737                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48738                            value,
48739                        },
48740                    );
48741                    out.assume_init()
48742                }
48743            }
48744            PropertyDeclaration::Scale(ref value) => {
48745                let decl_repr = unsafe {
48746                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::Scale>>)
48747                };
48748                let longhand_id = unsafe {
48749                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48750                };
48751                context.for_non_inherited_property = true;
48752                let value = (**value).to_computed_value(context);
48753                let value = value.to_animated_value(&crate::values::animated::Context { style });
48754
48755                unsafe {
48756                    let mut out = mem::MaybeUninit::uninit();
48757                    ptr::write(
48758                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Scale as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48759                        AnimationValueVariantRepr {
48760                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48761                            value,
48762                        },
48763                    );
48764                    out.assume_init()
48765                }
48766            }
48767            PropertyDeclaration::TextIndent(ref value) => {
48768                let decl_repr = unsafe {
48769                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::TextIndent>)
48770                };
48771                let longhand_id = unsafe {
48772                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48773                };
48774                context.for_non_inherited_property = false;
48775                let value = value.to_computed_value(context);
48776                let value = value.to_animated_value(&crate::values::animated::Context { style });
48777
48778                unsafe {
48779                    let mut out = mem::MaybeUninit::uninit();
48780                    ptr::write(
48781                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::TextIndent as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48782                        AnimationValueVariantRepr {
48783                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48784                            value,
48785                        },
48786                    );
48787                    out.assume_init()
48788                }
48789            }
48790            PropertyDeclaration::TextOverflow(ref value) => {
48791                let decl_repr = unsafe {
48792                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::TextOverflow>>)
48793                };
48794                let longhand_id = unsafe {
48795                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48796                };
48797                context.for_non_inherited_property = true;
48798                let value = (**value).to_computed_value(context);
48799
48800                unsafe {
48801                    let mut out = mem::MaybeUninit::uninit();
48802                    ptr::write(
48803                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::TextOverflow as ToComputedValue>::ComputedValue>,
48804                        AnimationValueVariantRepr {
48805                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48806                            value,
48807                        },
48808                    );
48809                    out.assume_init()
48810                }
48811            }
48812            PropertyDeclaration::TextShadow(ref value) => {
48813                let decl_repr = unsafe {
48814                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<longhands::text_shadow::SpecifiedValue>)
48815                };
48816                let longhand_id = unsafe {
48817                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48818                };
48819                context.for_non_inherited_property = false;
48820                let value = value.to_computed_value(context);
48821                let value = value.to_animated_value(&crate::values::animated::Context { style });
48822
48823                unsafe {
48824                    let mut out = mem::MaybeUninit::uninit();
48825                    ptr::write(
48826                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<longhands::text_shadow::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48827                        AnimationValueVariantRepr {
48828                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48829                            value,
48830                        },
48831                    );
48832                    out.assume_init()
48833                }
48834            }
48835            PropertyDeclaration::Transform(ref value) => {
48836                let decl_repr = unsafe {
48837                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Transform>)
48838                };
48839                let longhand_id = unsafe {
48840                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48841                };
48842                context.for_non_inherited_property = true;
48843                let value = value.to_computed_value(context);
48844                let value = value.to_animated_value(&crate::values::animated::Context { style });
48845
48846                unsafe {
48847                    let mut out = mem::MaybeUninit::uninit();
48848                    ptr::write(
48849                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Transform as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48850                        AnimationValueVariantRepr {
48851                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48852                            value,
48853                        },
48854                    );
48855                    out.assume_init()
48856                }
48857            }
48858            PropertyDeclaration::TransformOrigin(ref value) => {
48859                let decl_repr = unsafe {
48860                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::TransformOrigin>>)
48861                };
48862                let longhand_id = unsafe {
48863                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48864                };
48865                context.for_non_inherited_property = true;
48866                let value = (**value).to_computed_value(context);
48867                let value = value.to_animated_value(&crate::values::animated::Context { style });
48868
48869                unsafe {
48870                    let mut out = mem::MaybeUninit::uninit();
48871                    ptr::write(
48872                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::TransformOrigin as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48873                        AnimationValueVariantRepr {
48874                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48875                            value,
48876                        },
48877                    );
48878                    out.assume_init()
48879                }
48880            }
48881            PropertyDeclaration::Translate(ref value) => {
48882                let decl_repr = unsafe {
48883                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::Translate>>)
48884                };
48885                let longhand_id = unsafe {
48886                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48887                };
48888                context.for_non_inherited_property = true;
48889                let value = (**value).to_computed_value(context);
48890                let value = value.to_animated_value(&crate::values::animated::Context { style });
48891
48892                unsafe {
48893                    let mut out = mem::MaybeUninit::uninit();
48894                    ptr::write(
48895                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Translate as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48896                        AnimationValueVariantRepr {
48897                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48898                            value,
48899                        },
48900                    );
48901                    out.assume_init()
48902                }
48903            }
48904            PropertyDeclaration::VerticalAlign(ref value) => {
48905                let decl_repr = unsafe {
48906                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::VerticalAlign>)
48907                };
48908                let longhand_id = unsafe {
48909                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48910                };
48911                context.for_non_inherited_property = true;
48912                let value = value.to_computed_value(context);
48913                let value = value.to_animated_value(&crate::values::animated::Context { style });
48914
48915                unsafe {
48916                    let mut out = mem::MaybeUninit::uninit();
48917                    ptr::write(
48918                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::VerticalAlign as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48919                        AnimationValueVariantRepr {
48920                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48921                            value,
48922                        },
48923                    );
48924                    out.assume_init()
48925                }
48926            }
48927            PropertyDeclaration::ViewTransitionClass(ref value) => {
48928                let decl_repr = unsafe {
48929                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::ViewTransitionClass>)
48930                };
48931                let longhand_id = unsafe {
48932                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48933                };
48934                context.for_non_inherited_property = true;
48935                let value = value.to_computed_value(context);
48936
48937                unsafe {
48938                    let mut out = mem::MaybeUninit::uninit();
48939                    ptr::write(
48940                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::ViewTransitionClass as ToComputedValue>::ComputedValue>,
48941                        AnimationValueVariantRepr {
48942                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48943                            value,
48944                        },
48945                    );
48946                    out.assume_init()
48947                }
48948            }
48949            PropertyDeclaration::ViewTransitionName(ref value) => {
48950                let decl_repr = unsafe {
48951                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::ViewTransitionName>)
48952                };
48953                let longhand_id = unsafe {
48954                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48955                };
48956                context.for_non_inherited_property = true;
48957                let value = value.to_computed_value(context);
48958
48959                unsafe {
48960                    let mut out = mem::MaybeUninit::uninit();
48961                    ptr::write(
48962                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::ViewTransitionName as ToComputedValue>::ComputedValue>,
48963                        AnimationValueVariantRepr {
48964                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48965                            value,
48966                        },
48967                    );
48968                    out.assume_init()
48969                }
48970            }
48971            PropertyDeclaration::WordSpacing(ref value) => {
48972                let decl_repr = unsafe {
48973                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::WordSpacing>)
48974                };
48975                let longhand_id = unsafe {
48976                    *(&decl_repr.tag as *const u16 as *const LonghandId)
48977                };
48978                context.for_non_inherited_property = false;
48979                let value = value.to_computed_value(context);
48980                let value = value.to_animated_value(&crate::values::animated::Context { style });
48981
48982                unsafe {
48983                    let mut out = mem::MaybeUninit::uninit();
48984                    ptr::write(
48985                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::WordSpacing as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
48986                        AnimationValueVariantRepr {
48987                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
48988                            value,
48989                        },
48990                    );
48991                    out.assume_init()
48992                }
48993            }
48994            PropertyDeclaration::ObjectPosition(ref value) |
48995PropertyDeclaration::PerspectiveOrigin(ref value) => {
48996                let decl_repr = unsafe {
48997                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::Position>>)
48998                };
48999                let longhand_id = unsafe {
49000                    *(&decl_repr.tag as *const u16 as *const LonghandId)
49001                };
49002                context.for_non_inherited_property = true;
49003                let value = (**value).to_computed_value(context);
49004                let value = value.to_animated_value(&crate::values::animated::Context { style });
49005
49006                unsafe {
49007                    let mut out = mem::MaybeUninit::uninit();
49008                    ptr::write(
49009                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Position as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
49010                        AnimationValueVariantRepr {
49011                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
49012                            value,
49013                        },
49014                    );
49015                    out.assume_init()
49016                }
49017            }
49018            PropertyDeclaration::GridTemplateColumns(ref value) |
49019PropertyDeclaration::GridTemplateRows(ref value) => {
49020                let decl_repr = unsafe {
49021                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::GridTemplateComponent>)
49022                };
49023                let longhand_id = unsafe {
49024                    *(&decl_repr.tag as *const u16 as *const LonghandId)
49025                };
49026                context.for_non_inherited_property = true;
49027                let value = value.to_computed_value(context);
49028                let value = value.to_animated_value(&crate::values::animated::Context { style });
49029
49030                unsafe {
49031                    let mut out = mem::MaybeUninit::uninit();
49032                    ptr::write(
49033                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::GridTemplateComponent as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
49034                        AnimationValueVariantRepr {
49035                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
49036                            value,
49037                        },
49038                    );
49039                    out.assume_init()
49040                }
49041            }
49042            PropertyDeclaration::BorderImageSource(ref value) => {
49043                let decl_repr = unsafe {
49044                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Image>)
49045                };
49046                let longhand_id = unsafe {
49047                    *(&decl_repr.tag as *const u16 as *const LonghandId)
49048                };
49049                context.for_non_inherited_property = true;
49050                let value = value.to_computed_value(context);
49051
49052                unsafe {
49053                    let mut out = mem::MaybeUninit::uninit();
49054                    ptr::write(
49055                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::Image as ToComputedValue>::ComputedValue>,
49056                        AnimationValueVariantRepr {
49057                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
49058                            value,
49059                        },
49060                    );
49061                    out.assume_init()
49062                }
49063            }
49064            PropertyDeclaration::ListStyleImage(ref value) => {
49065                let decl_repr = unsafe {
49066                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Image>)
49067                };
49068                let longhand_id = unsafe {
49069                    *(&decl_repr.tag as *const u16 as *const LonghandId)
49070                };
49071                context.for_non_inherited_property = false;
49072                let value = value.to_computed_value(context);
49073
49074                unsafe {
49075                    let mut out = mem::MaybeUninit::uninit();
49076                    ptr::write(
49077                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::Image as ToComputedValue>::ComputedValue>,
49078                        AnimationValueVariantRepr {
49079                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
49080                            value,
49081                        },
49082                    );
49083                    out.assume_init()
49084                }
49085            }
49086            PropertyDeclaration::GridAutoColumns(ref value) |
49087PropertyDeclaration::GridAutoRows(ref value) => {
49088                let decl_repr = unsafe {
49089                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::ImplicitGridTracks>)
49090                };
49091                let longhand_id = unsafe {
49092                    *(&decl_repr.tag as *const u16 as *const LonghandId)
49093                };
49094                context.for_non_inherited_property = true;
49095                let value = value.to_computed_value(context);
49096
49097                unsafe {
49098                    let mut out = mem::MaybeUninit::uninit();
49099                    ptr::write(
49100                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::ImplicitGridTracks as ToComputedValue>::ComputedValue>,
49101                        AnimationValueVariantRepr {
49102                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
49103                            value,
49104                        },
49105                    );
49106                    out.assume_init()
49107                }
49108            }
49109            PropertyDeclaration::OutlineOffset(ref value) |
49110PropertyDeclaration::OverflowClipMargin(ref value) => {
49111                let decl_repr = unsafe {
49112                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Length>)
49113                };
49114                let longhand_id = unsafe {
49115                    *(&decl_repr.tag as *const u16 as *const LonghandId)
49116                };
49117                context.for_non_inherited_property = true;
49118                let value = value.to_computed_value(context);
49119                let value = value.to_animated_value(&crate::values::animated::Context { style });
49120
49121                unsafe {
49122                    let mut out = mem::MaybeUninit::uninit();
49123                    ptr::write(
49124                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Length as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
49125                        AnimationValueVariantRepr {
49126                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
49127                            value,
49128                        },
49129                    );
49130                    out.assume_init()
49131                }
49132            }
49133            PropertyDeclaration::ColumnGap(ref value) |
49134PropertyDeclaration::RowGap(ref value) => {
49135                let decl_repr = unsafe {
49136                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::length::NonNegativeLengthPercentageOrNormal>)
49137                };
49138                let longhand_id = unsafe {
49139                    *(&decl_repr.tag as *const u16 as *const LonghandId)
49140                };
49141                context.for_non_inherited_property = true;
49142                let value = value.to_computed_value(context);
49143                let value = value.to_animated_value(&crate::values::animated::Context { style });
49144
49145                unsafe {
49146                    let mut out = mem::MaybeUninit::uninit();
49147                    ptr::write(
49148                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::length::NonNegativeLengthPercentageOrNormal as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
49149                        AnimationValueVariantRepr {
49150                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
49151                            value,
49152                        },
49153                    );
49154                    out.assume_init()
49155                }
49156            }
49157            PropertyDeclaration::GridColumnEnd(ref value) |
49158PropertyDeclaration::GridColumnStart(ref value) |
49159PropertyDeclaration::GridRowEnd(ref value) |
49160PropertyDeclaration::GridRowStart(ref value) => {
49161                let decl_repr = unsafe {
49162                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::GridLine>)
49163                };
49164                let longhand_id = unsafe {
49165                    *(&decl_repr.tag as *const u16 as *const LonghandId)
49166                };
49167                context.for_non_inherited_property = true;
49168                let value = value.to_computed_value(context);
49169
49170                unsafe {
49171                    let mut out = mem::MaybeUninit::uninit();
49172                    ptr::write(
49173                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::GridLine as ToComputedValue>::ComputedValue>,
49174                        AnimationValueVariantRepr {
49175                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
49176                            value,
49177                        },
49178                    );
49179                    out.assume_init()
49180                }
49181            }
49182            PropertyDeclaration::MaxBlockSize(ref value) |
49183PropertyDeclaration::MaxHeight(ref value) |
49184PropertyDeclaration::MaxInlineSize(ref value) |
49185PropertyDeclaration::MaxWidth(ref value) => {
49186                let decl_repr = unsafe {
49187                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::MaxSize>)
49188                };
49189                let longhand_id = unsafe {
49190                    *(&decl_repr.tag as *const u16 as *const LonghandId)
49191                };
49192                context.for_non_inherited_property = true;
49193                let value = value.to_computed_value(context);
49194                let value = value.to_animated_value(&crate::values::animated::Context { style });
49195
49196                unsafe {
49197                    let mut out = mem::MaybeUninit::uninit();
49198                    ptr::write(
49199                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::MaxSize as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
49200                        AnimationValueVariantRepr {
49201                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
49202                            value,
49203                        },
49204                    );
49205                    out.assume_init()
49206                }
49207            }
49208            PropertyDeclaration::BorderBottomLeftRadius(ref value) |
49209PropertyDeclaration::BorderBottomRightRadius(ref value) |
49210PropertyDeclaration::BorderEndEndRadius(ref value) |
49211PropertyDeclaration::BorderEndStartRadius(ref value) |
49212PropertyDeclaration::BorderStartEndRadius(ref value) |
49213PropertyDeclaration::BorderStartStartRadius(ref value) |
49214PropertyDeclaration::BorderTopLeftRadius(ref value) |
49215PropertyDeclaration::BorderTopRightRadius(ref value) => {
49216                let decl_repr = unsafe {
49217                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<Box<crate::values::specified::BorderCornerRadius>>)
49218                };
49219                let longhand_id = unsafe {
49220                    *(&decl_repr.tag as *const u16 as *const LonghandId)
49221                };
49222                context.for_non_inherited_property = true;
49223                let value = (**value).to_computed_value(context);
49224                let value = value.to_animated_value(&crate::values::animated::Context { style });
49225
49226                unsafe {
49227                    let mut out = mem::MaybeUninit::uninit();
49228                    ptr::write(
49229                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::BorderCornerRadius as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
49230                        AnimationValueVariantRepr {
49231                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
49232                            value,
49233                        },
49234                    );
49235                    out.assume_init()
49236                }
49237            }
49238            PropertyDeclaration::Bottom(ref value) |
49239PropertyDeclaration::InsetBlockEnd(ref value) |
49240PropertyDeclaration::InsetBlockStart(ref value) |
49241PropertyDeclaration::InsetInlineEnd(ref value) |
49242PropertyDeclaration::InsetInlineStart(ref value) |
49243PropertyDeclaration::Left(ref value) |
49244PropertyDeclaration::Right(ref value) |
49245PropertyDeclaration::Top(ref value) => {
49246                let decl_repr = unsafe {
49247                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Inset>)
49248                };
49249                let longhand_id = unsafe {
49250                    *(&decl_repr.tag as *const u16 as *const LonghandId)
49251                };
49252                context.for_non_inherited_property = true;
49253                let value = value.to_computed_value(context);
49254                let value = value.to_animated_value(&crate::values::animated::Context { style });
49255
49256                unsafe {
49257                    let mut out = mem::MaybeUninit::uninit();
49258                    ptr::write(
49259                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Inset as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
49260                        AnimationValueVariantRepr {
49261                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
49262                            value,
49263                        },
49264                    );
49265                    out.assume_init()
49266                }
49267            }
49268            PropertyDeclaration::MarginBlockEnd(ref value) |
49269PropertyDeclaration::MarginBlockStart(ref value) |
49270PropertyDeclaration::MarginBottom(ref value) |
49271PropertyDeclaration::MarginInlineEnd(ref value) |
49272PropertyDeclaration::MarginInlineStart(ref value) |
49273PropertyDeclaration::MarginLeft(ref value) |
49274PropertyDeclaration::MarginRight(ref value) |
49275PropertyDeclaration::MarginTop(ref value) => {
49276                let decl_repr = unsafe {
49277                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Margin>)
49278                };
49279                let longhand_id = unsafe {
49280                    *(&decl_repr.tag as *const u16 as *const LonghandId)
49281                };
49282                context.for_non_inherited_property = true;
49283                let value = value.to_computed_value(context);
49284                let value = value.to_animated_value(&crate::values::animated::Context { style });
49285
49286                unsafe {
49287                    let mut out = mem::MaybeUninit::uninit();
49288                    ptr::write(
49289                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Margin as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
49290                        AnimationValueVariantRepr {
49291                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
49292                            value,
49293                        },
49294                    );
49295                    out.assume_init()
49296                }
49297            }
49298            PropertyDeclaration::PaddingBlockEnd(ref value) |
49299PropertyDeclaration::PaddingBlockStart(ref value) |
49300PropertyDeclaration::PaddingBottom(ref value) |
49301PropertyDeclaration::PaddingInlineEnd(ref value) |
49302PropertyDeclaration::PaddingInlineStart(ref value) |
49303PropertyDeclaration::PaddingLeft(ref value) |
49304PropertyDeclaration::PaddingRight(ref value) |
49305PropertyDeclaration::PaddingTop(ref value) => {
49306                let decl_repr = unsafe {
49307                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::NonNegativeLengthPercentage>)
49308                };
49309                let longhand_id = unsafe {
49310                    *(&decl_repr.tag as *const u16 as *const LonghandId)
49311                };
49312                context.for_non_inherited_property = true;
49313                let value = value.to_computed_value(context);
49314                let value = value.to_animated_value(&crate::values::animated::Context { style });
49315
49316                unsafe {
49317                    let mut out = mem::MaybeUninit::uninit();
49318                    ptr::write(
49319                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::NonNegativeLengthPercentage as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
49320                        AnimationValueVariantRepr {
49321                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
49322                            value,
49323                        },
49324                    );
49325                    out.assume_init()
49326                }
49327            }
49328            PropertyDeclaration::BlockSize(ref value) |
49329PropertyDeclaration::Height(ref value) |
49330PropertyDeclaration::InlineSize(ref value) |
49331PropertyDeclaration::MinBlockSize(ref value) |
49332PropertyDeclaration::MinHeight(ref value) |
49333PropertyDeclaration::MinInlineSize(ref value) |
49334PropertyDeclaration::MinWidth(ref value) |
49335PropertyDeclaration::Width(ref value) => {
49336                let decl_repr = unsafe {
49337                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Size>)
49338                };
49339                let longhand_id = unsafe {
49340                    *(&decl_repr.tag as *const u16 as *const LonghandId)
49341                };
49342                context.for_non_inherited_property = true;
49343                let value = value.to_computed_value(context);
49344                let value = value.to_animated_value(&crate::values::animated::Context { style });
49345
49346                unsafe {
49347                    let mut out = mem::MaybeUninit::uninit();
49348                    ptr::write(
49349                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Size as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
49350                        AnimationValueVariantRepr {
49351                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
49352                            value,
49353                        },
49354                    );
49355                    out.assume_init()
49356                }
49357            }
49358            PropertyDeclaration::BorderBlockEndWidth(ref value) |
49359PropertyDeclaration::BorderBlockStartWidth(ref value) |
49360PropertyDeclaration::BorderBottomWidth(ref value) |
49361PropertyDeclaration::BorderInlineEndWidth(ref value) |
49362PropertyDeclaration::BorderInlineStartWidth(ref value) |
49363PropertyDeclaration::BorderLeftWidth(ref value) |
49364PropertyDeclaration::BorderRightWidth(ref value) |
49365PropertyDeclaration::BorderTopWidth(ref value) |
49366PropertyDeclaration::OutlineWidth(ref value) => {
49367                let decl_repr = unsafe {
49368                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::BorderSideWidth>)
49369                };
49370                let longhand_id = unsafe {
49371                    *(&decl_repr.tag as *const u16 as *const LonghandId)
49372                };
49373                context.for_non_inherited_property = true;
49374                let value = value.to_computed_value(context);
49375                let value = value.to_animated_value(&crate::values::animated::Context { style });
49376
49377                unsafe {
49378                    let mut out = mem::MaybeUninit::uninit();
49379                    ptr::write(
49380                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::BorderSideWidth as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
49381                        AnimationValueVariantRepr {
49382                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
49383                            value,
49384                        },
49385                    );
49386                    out.assume_init()
49387                }
49388            }
49389            PropertyDeclaration::BackgroundColor(ref value) |
49390PropertyDeclaration::BorderBlockEndColor(ref value) |
49391PropertyDeclaration::BorderBlockStartColor(ref value) |
49392PropertyDeclaration::BorderBottomColor(ref value) |
49393PropertyDeclaration::BorderInlineEndColor(ref value) |
49394PropertyDeclaration::BorderInlineStartColor(ref value) |
49395PropertyDeclaration::BorderLeftColor(ref value) |
49396PropertyDeclaration::BorderRightColor(ref value) |
49397PropertyDeclaration::BorderTopColor(ref value) |
49398PropertyDeclaration::OutlineColor(ref value) |
49399PropertyDeclaration::TextDecorationColor(ref value) => {
49400                let decl_repr = unsafe {
49401                    &*(decl as *const _ as *const PropertyDeclarationVariantRepr<crate::values::specified::Color>)
49402                };
49403                let longhand_id = unsafe {
49404                    *(&decl_repr.tag as *const u16 as *const LonghandId)
49405                };
49406                context.for_non_inherited_property = true;
49407                let value = value.to_computed_value(context);
49408                let value = value.to_animated_value(&crate::values::animated::Context { style });
49409
49410                unsafe {
49411                    let mut out = mem::MaybeUninit::uninit();
49412                    ptr::write(
49413                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Color as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
49414                        AnimationValueVariantRepr {
49415                            tag: longhand_id.to_physical(context.builder.writing_mode) as u16,
49416                            value,
49417                        },
49418                    );
49419                    out.assume_init()
49420                }
49421            }
49422            PropertyDeclaration::CSSWideKeyword(ref declaration) => {
49423                match declaration.id.to_physical(context.builder.writing_mode) {
49424                    // We put all the animatable properties first in the hopes
49425                    // that it might increase match locality.
49426                    LonghandId::AlignContent => {
49427                        // FIXME(emilio, bug 1533327): I think revert (and
49428                        // revert-layer) handling is not fine here, but what to
49429                        // do instead?
49430                        //
49431                        // Seems we'd need the computed value as if it was
49432                        // revert, somehow. Treating it as `unset` seems fine
49433                        // for now...
49434                        let style_struct = match declaration.keyword {
49435                            CSSWideKeyword::Revert |
49436                            CSSWideKeyword::RevertLayer |
49437                            CSSWideKeyword::Unset |
49438                            CSSWideKeyword::Initial => {
49439                                initial.get_position()
49440                            },
49441                            CSSWideKeyword::Inherit => {
49442                                context.builder
49443                                       .get_parent_position()
49444                            },
49445                        };
49446                        let computed = style_struct
49447                            .clone_align_content();
49448
49449                        AnimationValue::AlignContent(computed)
49450                    },
49451                    LonghandId::AlignItems => {
49452                        // FIXME(emilio, bug 1533327): I think revert (and
49453                        // revert-layer) handling is not fine here, but what to
49454                        // do instead?
49455                        //
49456                        // Seems we'd need the computed value as if it was
49457                        // revert, somehow. Treating it as `unset` seems fine
49458                        // for now...
49459                        let style_struct = match declaration.keyword {
49460                            CSSWideKeyword::Revert |
49461                            CSSWideKeyword::RevertLayer |
49462                            CSSWideKeyword::Unset |
49463                            CSSWideKeyword::Initial => {
49464                                initial.get_position()
49465                            },
49466                            CSSWideKeyword::Inherit => {
49467                                context.builder
49468                                       .get_parent_position()
49469                            },
49470                        };
49471                        let computed = style_struct
49472                            .clone_align_items();
49473
49474                        AnimationValue::AlignItems(computed)
49475                    },
49476                    LonghandId::AlignSelf => {
49477                        // FIXME(emilio, bug 1533327): I think revert (and
49478                        // revert-layer) handling is not fine here, but what to
49479                        // do instead?
49480                        //
49481                        // Seems we'd need the computed value as if it was
49482                        // revert, somehow. Treating it as `unset` seems fine
49483                        // for now...
49484                        let style_struct = match declaration.keyword {
49485                            CSSWideKeyword::Revert |
49486                            CSSWideKeyword::RevertLayer |
49487                            CSSWideKeyword::Unset |
49488                            CSSWideKeyword::Initial => {
49489                                initial.get_position()
49490                            },
49491                            CSSWideKeyword::Inherit => {
49492                                context.builder
49493                                       .get_parent_position()
49494                            },
49495                        };
49496                        let computed = style_struct
49497                            .clone_align_self();
49498
49499                        AnimationValue::AlignSelf(computed)
49500                    },
49501                    LonghandId::AspectRatio => {
49502                        // FIXME(emilio, bug 1533327): I think revert (and
49503                        // revert-layer) handling is not fine here, but what to
49504                        // do instead?
49505                        //
49506                        // Seems we'd need the computed value as if it was
49507                        // revert, somehow. Treating it as `unset` seems fine
49508                        // for now...
49509                        let style_struct = match declaration.keyword {
49510                            CSSWideKeyword::Revert |
49511                            CSSWideKeyword::RevertLayer |
49512                            CSSWideKeyword::Unset |
49513                            CSSWideKeyword::Initial => {
49514                                initial.get_position()
49515                            },
49516                            CSSWideKeyword::Inherit => {
49517                                context.builder
49518                                       .get_parent_position()
49519                            },
49520                        };
49521                        let computed = style_struct
49522                            .clone_aspect_ratio();
49523
49524                        let computed = computed.to_animated_value(&crate::values::animated::Context {
49525                            style
49526                        });
49527                        AnimationValue::AspectRatio(computed)
49528                    },
49529                    LonghandId::BackfaceVisibility => {
49530                        // FIXME(emilio, bug 1533327): I think revert (and
49531                        // revert-layer) handling is not fine here, but what to
49532                        // do instead?
49533                        //
49534                        // Seems we'd need the computed value as if it was
49535                        // revert, somehow. Treating it as `unset` seems fine
49536                        // for now...
49537                        let style_struct = match declaration.keyword {
49538                            CSSWideKeyword::Revert |
49539                            CSSWideKeyword::RevertLayer |
49540                            CSSWideKeyword::Unset |
49541                            CSSWideKeyword::Initial => {
49542                                initial.get_box()
49543                            },
49544                            CSSWideKeyword::Inherit => {
49545                                context.builder
49546                                       .get_parent_box()
49547                            },
49548                        };
49549                        let computed = style_struct
49550                            .clone_backface_visibility();
49551
49552                        AnimationValue::BackfaceVisibility(computed)
49553                    },
49554                    LonghandId::BaselineSource => {
49555                        // FIXME(emilio, bug 1533327): I think revert (and
49556                        // revert-layer) handling is not fine here, but what to
49557                        // do instead?
49558                        //
49559                        // Seems we'd need the computed value as if it was
49560                        // revert, somehow. Treating it as `unset` seems fine
49561                        // for now...
49562                        let style_struct = match declaration.keyword {
49563                            CSSWideKeyword::Revert |
49564                            CSSWideKeyword::RevertLayer |
49565                            CSSWideKeyword::Unset |
49566                            CSSWideKeyword::Initial => {
49567                                initial.get_box()
49568                            },
49569                            CSSWideKeyword::Inherit => {
49570                                context.builder
49571                                       .get_parent_box()
49572                            },
49573                        };
49574                        let computed = style_struct
49575                            .clone_baseline_source();
49576
49577                        AnimationValue::BaselineSource(computed)
49578                    },
49579                    LonghandId::BorderCollapse => {
49580                        // FIXME(emilio, bug 1533327): I think revert (and
49581                        // revert-layer) handling is not fine here, but what to
49582                        // do instead?
49583                        //
49584                        // Seems we'd need the computed value as if it was
49585                        // revert, somehow. Treating it as `unset` seems fine
49586                        // for now...
49587                        let style_struct = match declaration.keyword {
49588                            CSSWideKeyword::Initial => {
49589                                initial.get_inherited_table()
49590                            },
49591                            CSSWideKeyword::Revert |
49592                            CSSWideKeyword::RevertLayer |
49593                            CSSWideKeyword::Unset |
49594                            CSSWideKeyword::Inherit => {
49595                                context.builder
49596                                       .get_parent_inherited_table()
49597                            },
49598                        };
49599                        let computed = style_struct
49600                            .clone_border_collapse();
49601
49602                        AnimationValue::BorderCollapse(computed)
49603                    },
49604                    LonghandId::BorderImageRepeat => {
49605                        // FIXME(emilio, bug 1533327): I think revert (and
49606                        // revert-layer) handling is not fine here, but what to
49607                        // do instead?
49608                        //
49609                        // Seems we'd need the computed value as if it was
49610                        // revert, somehow. Treating it as `unset` seems fine
49611                        // for now...
49612                        let style_struct = match declaration.keyword {
49613                            CSSWideKeyword::Revert |
49614                            CSSWideKeyword::RevertLayer |
49615                            CSSWideKeyword::Unset |
49616                            CSSWideKeyword::Initial => {
49617                                initial.get_border()
49618                            },
49619                            CSSWideKeyword::Inherit => {
49620                                context.builder
49621                                       .get_parent_border()
49622                            },
49623                        };
49624                        let computed = style_struct
49625                            .clone_border_image_repeat();
49626
49627                        AnimationValue::BorderImageRepeat(computed)
49628                    },
49629                    LonghandId::BoxSizing => {
49630                        // FIXME(emilio, bug 1533327): I think revert (and
49631                        // revert-layer) handling is not fine here, but what to
49632                        // do instead?
49633                        //
49634                        // Seems we'd need the computed value as if it was
49635                        // revert, somehow. Treating it as `unset` seems fine
49636                        // for now...
49637                        let style_struct = match declaration.keyword {
49638                            CSSWideKeyword::Revert |
49639                            CSSWideKeyword::RevertLayer |
49640                            CSSWideKeyword::Unset |
49641                            CSSWideKeyword::Initial => {
49642                                initial.get_position()
49643                            },
49644                            CSSWideKeyword::Inherit => {
49645                                context.builder
49646                                       .get_parent_position()
49647                            },
49648                        };
49649                        let computed = style_struct
49650                            .clone_box_sizing();
49651
49652                        AnimationValue::BoxSizing(computed)
49653                    },
49654                    LonghandId::CaptionSide => {
49655                        // FIXME(emilio, bug 1533327): I think revert (and
49656                        // revert-layer) handling is not fine here, but what to
49657                        // do instead?
49658                        //
49659                        // Seems we'd need the computed value as if it was
49660                        // revert, somehow. Treating it as `unset` seems fine
49661                        // for now...
49662                        let style_struct = match declaration.keyword {
49663                            CSSWideKeyword::Initial => {
49664                                initial.get_inherited_table()
49665                            },
49666                            CSSWideKeyword::Revert |
49667                            CSSWideKeyword::RevertLayer |
49668                            CSSWideKeyword::Unset |
49669                            CSSWideKeyword::Inherit => {
49670                                context.builder
49671                                       .get_parent_inherited_table()
49672                            },
49673                        };
49674                        let computed = style_struct
49675                            .clone_caption_side();
49676
49677                        AnimationValue::CaptionSide(computed)
49678                    },
49679                    LonghandId::Clear => {
49680                        // FIXME(emilio, bug 1533327): I think revert (and
49681                        // revert-layer) handling is not fine here, but what to
49682                        // do instead?
49683                        //
49684                        // Seems we'd need the computed value as if it was
49685                        // revert, somehow. Treating it as `unset` seems fine
49686                        // for now...
49687                        let style_struct = match declaration.keyword {
49688                            CSSWideKeyword::Revert |
49689                            CSSWideKeyword::RevertLayer |
49690                            CSSWideKeyword::Unset |
49691                            CSSWideKeyword::Initial => {
49692                                initial.get_box()
49693                            },
49694                            CSSWideKeyword::Inherit => {
49695                                context.builder
49696                                       .get_parent_box()
49697                            },
49698                        };
49699                        let computed = style_struct
49700                            .clone_clear();
49701
49702                        AnimationValue::Clear(computed)
49703                    },
49704                    LonghandId::ColumnCount => {
49705                        // FIXME(emilio, bug 1533327): I think revert (and
49706                        // revert-layer) handling is not fine here, but what to
49707                        // do instead?
49708                        //
49709                        // Seems we'd need the computed value as if it was
49710                        // revert, somehow. Treating it as `unset` seems fine
49711                        // for now...
49712                        let style_struct = match declaration.keyword {
49713                            CSSWideKeyword::Revert |
49714                            CSSWideKeyword::RevertLayer |
49715                            CSSWideKeyword::Unset |
49716                            CSSWideKeyword::Initial => {
49717                                initial.get_column()
49718                            },
49719                            CSSWideKeyword::Inherit => {
49720                                context.builder
49721                                       .get_parent_column()
49722                            },
49723                        };
49724                        let computed = style_struct
49725                            .clone_column_count();
49726
49727                        let computed = computed.to_animated_value(&crate::values::animated::Context {
49728                            style
49729                        });
49730                        AnimationValue::ColumnCount(computed)
49731                    },
49732                    LonghandId::ColumnSpan => {
49733                        // FIXME(emilio, bug 1533327): I think revert (and
49734                        // revert-layer) handling is not fine here, but what to
49735                        // do instead?
49736                        //
49737                        // Seems we'd need the computed value as if it was
49738                        // revert, somehow. Treating it as `unset` seems fine
49739                        // for now...
49740                        let style_struct = match declaration.keyword {
49741                            CSSWideKeyword::Revert |
49742                            CSSWideKeyword::RevertLayer |
49743                            CSSWideKeyword::Unset |
49744                            CSSWideKeyword::Initial => {
49745                                initial.get_column()
49746                            },
49747                            CSSWideKeyword::Inherit => {
49748                                context.builder
49749                                       .get_parent_column()
49750                            },
49751                        };
49752                        let computed = style_struct
49753                            .clone_column_span();
49754
49755                        AnimationValue::ColumnSpan(computed)
49756                    },
49757                    LonghandId::Display => {
49758                        // FIXME(emilio, bug 1533327): I think revert (and
49759                        // revert-layer) handling is not fine here, but what to
49760                        // do instead?
49761                        //
49762                        // Seems we'd need the computed value as if it was
49763                        // revert, somehow. Treating it as `unset` seems fine
49764                        // for now...
49765                        let style_struct = match declaration.keyword {
49766                            CSSWideKeyword::Revert |
49767                            CSSWideKeyword::RevertLayer |
49768                            CSSWideKeyword::Unset |
49769                            CSSWideKeyword::Initial => {
49770                                initial.get_box()
49771                            },
49772                            CSSWideKeyword::Inherit => {
49773                                context.builder
49774                                       .get_parent_box()
49775                            },
49776                        };
49777                        let computed = style_struct
49778                            .clone_display();
49779
49780                        AnimationValue::Display(computed)
49781                    },
49782                    LonghandId::EmptyCells => {
49783                        // FIXME(emilio, bug 1533327): I think revert (and
49784                        // revert-layer) handling is not fine here, but what to
49785                        // do instead?
49786                        //
49787                        // Seems we'd need the computed value as if it was
49788                        // revert, somehow. Treating it as `unset` seems fine
49789                        // for now...
49790                        let style_struct = match declaration.keyword {
49791                            CSSWideKeyword::Initial => {
49792                                initial.get_inherited_table()
49793                            },
49794                            CSSWideKeyword::Revert |
49795                            CSSWideKeyword::RevertLayer |
49796                            CSSWideKeyword::Unset |
49797                            CSSWideKeyword::Inherit => {
49798                                context.builder
49799                                       .get_parent_inherited_table()
49800                            },
49801                        };
49802                        let computed = style_struct
49803                            .clone_empty_cells();
49804
49805                        AnimationValue::EmptyCells(computed)
49806                    },
49807                    LonghandId::FlexDirection => {
49808                        // FIXME(emilio, bug 1533327): I think revert (and
49809                        // revert-layer) handling is not fine here, but what to
49810                        // do instead?
49811                        //
49812                        // Seems we'd need the computed value as if it was
49813                        // revert, somehow. Treating it as `unset` seems fine
49814                        // for now...
49815                        let style_struct = match declaration.keyword {
49816                            CSSWideKeyword::Revert |
49817                            CSSWideKeyword::RevertLayer |
49818                            CSSWideKeyword::Unset |
49819                            CSSWideKeyword::Initial => {
49820                                initial.get_position()
49821                            },
49822                            CSSWideKeyword::Inherit => {
49823                                context.builder
49824                                       .get_parent_position()
49825                            },
49826                        };
49827                        let computed = style_struct
49828                            .clone_flex_direction();
49829
49830                        AnimationValue::FlexDirection(computed)
49831                    },
49832                    LonghandId::FlexWrap => {
49833                        // FIXME(emilio, bug 1533327): I think revert (and
49834                        // revert-layer) handling is not fine here, but what to
49835                        // do instead?
49836                        //
49837                        // Seems we'd need the computed value as if it was
49838                        // revert, somehow. Treating it as `unset` seems fine
49839                        // for now...
49840                        let style_struct = match declaration.keyword {
49841                            CSSWideKeyword::Revert |
49842                            CSSWideKeyword::RevertLayer |
49843                            CSSWideKeyword::Unset |
49844                            CSSWideKeyword::Initial => {
49845                                initial.get_position()
49846                            },
49847                            CSSWideKeyword::Inherit => {
49848                                context.builder
49849                                       .get_parent_position()
49850                            },
49851                        };
49852                        let computed = style_struct
49853                            .clone_flex_wrap();
49854
49855                        AnimationValue::FlexWrap(computed)
49856                    },
49857                    LonghandId::Float => {
49858                        // FIXME(emilio, bug 1533327): I think revert (and
49859                        // revert-layer) handling is not fine here, but what to
49860                        // do instead?
49861                        //
49862                        // Seems we'd need the computed value as if it was
49863                        // revert, somehow. Treating it as `unset` seems fine
49864                        // for now...
49865                        let style_struct = match declaration.keyword {
49866                            CSSWideKeyword::Revert |
49867                            CSSWideKeyword::RevertLayer |
49868                            CSSWideKeyword::Unset |
49869                            CSSWideKeyword::Initial => {
49870                                initial.get_box()
49871                            },
49872                            CSSWideKeyword::Inherit => {
49873                                context.builder
49874                                       .get_parent_box()
49875                            },
49876                        };
49877                        let computed = style_struct
49878                            .clone_float();
49879
49880                        AnimationValue::Float(computed)
49881                    },
49882                    LonghandId::FontLanguageOverride => {
49883                        // FIXME(emilio, bug 1533327): I think revert (and
49884                        // revert-layer) handling is not fine here, but what to
49885                        // do instead?
49886                        //
49887                        // Seems we'd need the computed value as if it was
49888                        // revert, somehow. Treating it as `unset` seems fine
49889                        // for now...
49890                        let style_struct = match declaration.keyword {
49891                            CSSWideKeyword::Initial => {
49892                                initial.get_font()
49893                            },
49894                            CSSWideKeyword::Revert |
49895                            CSSWideKeyword::RevertLayer |
49896                            CSSWideKeyword::Unset |
49897                            CSSWideKeyword::Inherit => {
49898                                context.builder
49899                                       .get_parent_font()
49900                            },
49901                        };
49902                        let computed = style_struct
49903                            .clone_font_language_override();
49904
49905                        AnimationValue::FontLanguageOverride(computed)
49906                    },
49907                    LonghandId::FontStretch => {
49908                        // FIXME(emilio, bug 1533327): I think revert (and
49909                        // revert-layer) handling is not fine here, but what to
49910                        // do instead?
49911                        //
49912                        // Seems we'd need the computed value as if it was
49913                        // revert, somehow. Treating it as `unset` seems fine
49914                        // for now...
49915                        let style_struct = match declaration.keyword {
49916                            CSSWideKeyword::Initial => {
49917                                initial.get_font()
49918                            },
49919                            CSSWideKeyword::Revert |
49920                            CSSWideKeyword::RevertLayer |
49921                            CSSWideKeyword::Unset |
49922                            CSSWideKeyword::Inherit => {
49923                                context.builder
49924                                       .get_parent_font()
49925                            },
49926                        };
49927                        let computed = style_struct
49928                            .clone_font_stretch();
49929
49930                        let computed = computed.to_animated_value(&crate::values::animated::Context {
49931                            style
49932                        });
49933                        AnimationValue::FontStretch(computed)
49934                    },
49935                    LonghandId::FontStyle => {
49936                        // FIXME(emilio, bug 1533327): I think revert (and
49937                        // revert-layer) handling is not fine here, but what to
49938                        // do instead?
49939                        //
49940                        // Seems we'd need the computed value as if it was
49941                        // revert, somehow. Treating it as `unset` seems fine
49942                        // for now...
49943                        let style_struct = match declaration.keyword {
49944                            CSSWideKeyword::Initial => {
49945                                initial.get_font()
49946                            },
49947                            CSSWideKeyword::Revert |
49948                            CSSWideKeyword::RevertLayer |
49949                            CSSWideKeyword::Unset |
49950                            CSSWideKeyword::Inherit => {
49951                                context.builder
49952                                       .get_parent_font()
49953                            },
49954                        };
49955                        let computed = style_struct
49956                            .clone_font_style();
49957
49958                        let computed = computed.to_animated_value(&crate::values::animated::Context {
49959                            style
49960                        });
49961                        AnimationValue::FontStyle(computed)
49962                    },
49963                    LonghandId::FontVariantCaps => {
49964                        // FIXME(emilio, bug 1533327): I think revert (and
49965                        // revert-layer) handling is not fine here, but what to
49966                        // do instead?
49967                        //
49968                        // Seems we'd need the computed value as if it was
49969                        // revert, somehow. Treating it as `unset` seems fine
49970                        // for now...
49971                        let style_struct = match declaration.keyword {
49972                            CSSWideKeyword::Initial => {
49973                                initial.get_font()
49974                            },
49975                            CSSWideKeyword::Revert |
49976                            CSSWideKeyword::RevertLayer |
49977                            CSSWideKeyword::Unset |
49978                            CSSWideKeyword::Inherit => {
49979                                context.builder
49980                                       .get_parent_font()
49981                            },
49982                        };
49983                        let computed = style_struct
49984                            .clone_font_variant_caps();
49985
49986                        AnimationValue::FontVariantCaps(computed)
49987                    },
49988                    LonghandId::FontWeight => {
49989                        // FIXME(emilio, bug 1533327): I think revert (and
49990                        // revert-layer) handling is not fine here, but what to
49991                        // do instead?
49992                        //
49993                        // Seems we'd need the computed value as if it was
49994                        // revert, somehow. Treating it as `unset` seems fine
49995                        // for now...
49996                        let style_struct = match declaration.keyword {
49997                            CSSWideKeyword::Initial => {
49998                                initial.get_font()
49999                            },
50000                            CSSWideKeyword::Revert |
50001                            CSSWideKeyword::RevertLayer |
50002                            CSSWideKeyword::Unset |
50003                            CSSWideKeyword::Inherit => {
50004                                context.builder
50005                                       .get_parent_font()
50006                            },
50007                        };
50008                        let computed = style_struct
50009                            .clone_font_weight();
50010
50011                        let computed = computed.to_animated_value(&crate::values::animated::Context {
50012                            style
50013                        });
50014                        AnimationValue::FontWeight(computed)
50015                    },
50016                    LonghandId::GridAutoFlow => {
50017                        // FIXME(emilio, bug 1533327): I think revert (and
50018                        // revert-layer) handling is not fine here, but what to
50019                        // do instead?
50020                        //
50021                        // Seems we'd need the computed value as if it was
50022                        // revert, somehow. Treating it as `unset` seems fine
50023                        // for now...
50024                        let style_struct = match declaration.keyword {
50025                            CSSWideKeyword::Revert |
50026                            CSSWideKeyword::RevertLayer |
50027                            CSSWideKeyword::Unset |
50028                            CSSWideKeyword::Initial => {
50029                                initial.get_position()
50030                            },
50031                            CSSWideKeyword::Inherit => {
50032                                context.builder
50033                                       .get_parent_position()
50034                            },
50035                        };
50036                        let computed = style_struct
50037                            .clone_grid_auto_flow();
50038
50039                        AnimationValue::GridAutoFlow(computed)
50040                    },
50041                    LonghandId::ImageRendering => {
50042                        // FIXME(emilio, bug 1533327): I think revert (and
50043                        // revert-layer) handling is not fine here, but what to
50044                        // do instead?
50045                        //
50046                        // Seems we'd need the computed value as if it was
50047                        // revert, somehow. Treating it as `unset` seems fine
50048                        // for now...
50049                        let style_struct = match declaration.keyword {
50050                            CSSWideKeyword::Initial => {
50051                                initial.get_inherited_box()
50052                            },
50053                            CSSWideKeyword::Revert |
50054                            CSSWideKeyword::RevertLayer |
50055                            CSSWideKeyword::Unset |
50056                            CSSWideKeyword::Inherit => {
50057                                context.builder
50058                                       .get_parent_inherited_box()
50059                            },
50060                        };
50061                        let computed = style_struct
50062                            .clone_image_rendering();
50063
50064                        AnimationValue::ImageRendering(computed)
50065                    },
50066                    LonghandId::Isolation => {
50067                        // FIXME(emilio, bug 1533327): I think revert (and
50068                        // revert-layer) handling is not fine here, but what to
50069                        // do instead?
50070                        //
50071                        // Seems we'd need the computed value as if it was
50072                        // revert, somehow. Treating it as `unset` seems fine
50073                        // for now...
50074                        let style_struct = match declaration.keyword {
50075                            CSSWideKeyword::Revert |
50076                            CSSWideKeyword::RevertLayer |
50077                            CSSWideKeyword::Unset |
50078                            CSSWideKeyword::Initial => {
50079                                initial.get_box()
50080                            },
50081                            CSSWideKeyword::Inherit => {
50082                                context.builder
50083                                       .get_parent_box()
50084                            },
50085                        };
50086                        let computed = style_struct
50087                            .clone_isolation();
50088
50089                        AnimationValue::Isolation(computed)
50090                    },
50091                    LonghandId::JustifyContent => {
50092                        // FIXME(emilio, bug 1533327): I think revert (and
50093                        // revert-layer) handling is not fine here, but what to
50094                        // do instead?
50095                        //
50096                        // Seems we'd need the computed value as if it was
50097                        // revert, somehow. Treating it as `unset` seems fine
50098                        // for now...
50099                        let style_struct = match declaration.keyword {
50100                            CSSWideKeyword::Revert |
50101                            CSSWideKeyword::RevertLayer |
50102                            CSSWideKeyword::Unset |
50103                            CSSWideKeyword::Initial => {
50104                                initial.get_position()
50105                            },
50106                            CSSWideKeyword::Inherit => {
50107                                context.builder
50108                                       .get_parent_position()
50109                            },
50110                        };
50111                        let computed = style_struct
50112                            .clone_justify_content();
50113
50114                        AnimationValue::JustifyContent(computed)
50115                    },
50116                    LonghandId::JustifyItems => {
50117                        // FIXME(emilio, bug 1533327): I think revert (and
50118                        // revert-layer) handling is not fine here, but what to
50119                        // do instead?
50120                        //
50121                        // Seems we'd need the computed value as if it was
50122                        // revert, somehow. Treating it as `unset` seems fine
50123                        // for now...
50124                        let style_struct = match declaration.keyword {
50125                            CSSWideKeyword::Revert |
50126                            CSSWideKeyword::RevertLayer |
50127                            CSSWideKeyword::Unset |
50128                            CSSWideKeyword::Initial => {
50129                                initial.get_position()
50130                            },
50131                            CSSWideKeyword::Inherit => {
50132                                context.builder
50133                                       .get_parent_position()
50134                            },
50135                        };
50136                        let computed = style_struct
50137                            .clone_justify_items();
50138
50139                        AnimationValue::JustifyItems(computed)
50140                    },
50141                    LonghandId::JustifySelf => {
50142                        // FIXME(emilio, bug 1533327): I think revert (and
50143                        // revert-layer) handling is not fine here, but what to
50144                        // do instead?
50145                        //
50146                        // Seems we'd need the computed value as if it was
50147                        // revert, somehow. Treating it as `unset` seems fine
50148                        // for now...
50149                        let style_struct = match declaration.keyword {
50150                            CSSWideKeyword::Revert |
50151                            CSSWideKeyword::RevertLayer |
50152                            CSSWideKeyword::Unset |
50153                            CSSWideKeyword::Initial => {
50154                                initial.get_position()
50155                            },
50156                            CSSWideKeyword::Inherit => {
50157                                context.builder
50158                                       .get_parent_position()
50159                            },
50160                        };
50161                        let computed = style_struct
50162                            .clone_justify_self();
50163
50164                        AnimationValue::JustifySelf(computed)
50165                    },
50166                    LonghandId::ListStylePosition => {
50167                        // FIXME(emilio, bug 1533327): I think revert (and
50168                        // revert-layer) handling is not fine here, but what to
50169                        // do instead?
50170                        //
50171                        // Seems we'd need the computed value as if it was
50172                        // revert, somehow. Treating it as `unset` seems fine
50173                        // for now...
50174                        let style_struct = match declaration.keyword {
50175                            CSSWideKeyword::Initial => {
50176                                initial.get_list()
50177                            },
50178                            CSSWideKeyword::Revert |
50179                            CSSWideKeyword::RevertLayer |
50180                            CSSWideKeyword::Unset |
50181                            CSSWideKeyword::Inherit => {
50182                                context.builder
50183                                       .get_parent_list()
50184                            },
50185                        };
50186                        let computed = style_struct
50187                            .clone_list_style_position();
50188
50189                        AnimationValue::ListStylePosition(computed)
50190                    },
50191                    LonghandId::ListStyleType => {
50192                        // FIXME(emilio, bug 1533327): I think revert (and
50193                        // revert-layer) handling is not fine here, but what to
50194                        // do instead?
50195                        //
50196                        // Seems we'd need the computed value as if it was
50197                        // revert, somehow. Treating it as `unset` seems fine
50198                        // for now...
50199                        let style_struct = match declaration.keyword {
50200                            CSSWideKeyword::Initial => {
50201                                initial.get_list()
50202                            },
50203                            CSSWideKeyword::Revert |
50204                            CSSWideKeyword::RevertLayer |
50205                            CSSWideKeyword::Unset |
50206                            CSSWideKeyword::Inherit => {
50207                                context.builder
50208                                       .get_parent_list()
50209                            },
50210                        };
50211                        let computed = style_struct
50212                            .clone_list_style_type();
50213
50214                        AnimationValue::ListStyleType(computed)
50215                    },
50216                    LonghandId::MixBlendMode => {
50217                        // FIXME(emilio, bug 1533327): I think revert (and
50218                        // revert-layer) handling is not fine here, but what to
50219                        // do instead?
50220                        //
50221                        // Seems we'd need the computed value as if it was
50222                        // revert, somehow. Treating it as `unset` seems fine
50223                        // for now...
50224                        let style_struct = match declaration.keyword {
50225                            CSSWideKeyword::Revert |
50226                            CSSWideKeyword::RevertLayer |
50227                            CSSWideKeyword::Unset |
50228                            CSSWideKeyword::Initial => {
50229                                initial.get_effects()
50230                            },
50231                            CSSWideKeyword::Inherit => {
50232                                context.builder
50233                                       .get_parent_effects()
50234                            },
50235                        };
50236                        let computed = style_struct
50237                            .clone_mix_blend_mode();
50238
50239                        AnimationValue::MixBlendMode(computed)
50240                    },
50241                    LonghandId::ObjectFit => {
50242                        // FIXME(emilio, bug 1533327): I think revert (and
50243                        // revert-layer) handling is not fine here, but what to
50244                        // do instead?
50245                        //
50246                        // Seems we'd need the computed value as if it was
50247                        // revert, somehow. Treating it as `unset` seems fine
50248                        // for now...
50249                        let style_struct = match declaration.keyword {
50250                            CSSWideKeyword::Revert |
50251                            CSSWideKeyword::RevertLayer |
50252                            CSSWideKeyword::Unset |
50253                            CSSWideKeyword::Initial => {
50254                                initial.get_position()
50255                            },
50256                            CSSWideKeyword::Inherit => {
50257                                context.builder
50258                                       .get_parent_position()
50259                            },
50260                        };
50261                        let computed = style_struct
50262                            .clone_object_fit();
50263
50264                        AnimationValue::ObjectFit(computed)
50265                    },
50266                    LonghandId::Opacity => {
50267                        // FIXME(emilio, bug 1533327): I think revert (and
50268                        // revert-layer) handling is not fine here, but what to
50269                        // do instead?
50270                        //
50271                        // Seems we'd need the computed value as if it was
50272                        // revert, somehow. Treating it as `unset` seems fine
50273                        // for now...
50274                        let style_struct = match declaration.keyword {
50275                            CSSWideKeyword::Revert |
50276                            CSSWideKeyword::RevertLayer |
50277                            CSSWideKeyword::Unset |
50278                            CSSWideKeyword::Initial => {
50279                                initial.get_effects()
50280                            },
50281                            CSSWideKeyword::Inherit => {
50282                                context.builder
50283                                       .get_parent_effects()
50284                            },
50285                        };
50286                        let computed = style_struct
50287                            .clone_opacity();
50288
50289                        let computed = computed.to_animated_value(&crate::values::animated::Context {
50290                            style
50291                        });
50292                        AnimationValue::Opacity(computed)
50293                    },
50294                    LonghandId::Order => {
50295                        // FIXME(emilio, bug 1533327): I think revert (and
50296                        // revert-layer) handling is not fine here, but what to
50297                        // do instead?
50298                        //
50299                        // Seems we'd need the computed value as if it was
50300                        // revert, somehow. Treating it as `unset` seems fine
50301                        // for now...
50302                        let style_struct = match declaration.keyword {
50303                            CSSWideKeyword::Revert |
50304                            CSSWideKeyword::RevertLayer |
50305                            CSSWideKeyword::Unset |
50306                            CSSWideKeyword::Initial => {
50307                                initial.get_position()
50308                            },
50309                            CSSWideKeyword::Inherit => {
50310                                context.builder
50311                                       .get_parent_position()
50312                            },
50313                        };
50314                        let computed = style_struct
50315                            .clone_order();
50316
50317                        let computed = computed.to_animated_value(&crate::values::animated::Context {
50318                            style
50319                        });
50320                        AnimationValue::Order(computed)
50321                    },
50322                    LonghandId::OutlineStyle => {
50323                        // FIXME(emilio, bug 1533327): I think revert (and
50324                        // revert-layer) handling is not fine here, but what to
50325                        // do instead?
50326                        //
50327                        // Seems we'd need the computed value as if it was
50328                        // revert, somehow. Treating it as `unset` seems fine
50329                        // for now...
50330                        let style_struct = match declaration.keyword {
50331                            CSSWideKeyword::Revert |
50332                            CSSWideKeyword::RevertLayer |
50333                            CSSWideKeyword::Unset |
50334                            CSSWideKeyword::Initial => {
50335                                initial.get_outline()
50336                            },
50337                            CSSWideKeyword::Inherit => {
50338                                context.builder
50339                                       .get_parent_outline()
50340                            },
50341                        };
50342                        let computed = style_struct
50343                            .clone_outline_style();
50344
50345                        AnimationValue::OutlineStyle(computed)
50346                    },
50347                    LonghandId::OverflowWrap => {
50348                        // FIXME(emilio, bug 1533327): I think revert (and
50349                        // revert-layer) handling is not fine here, but what to
50350                        // do instead?
50351                        //
50352                        // Seems we'd need the computed value as if it was
50353                        // revert, somehow. Treating it as `unset` seems fine
50354                        // for now...
50355                        let style_struct = match declaration.keyword {
50356                            CSSWideKeyword::Initial => {
50357                                initial.get_inherited_text()
50358                            },
50359                            CSSWideKeyword::Revert |
50360                            CSSWideKeyword::RevertLayer |
50361                            CSSWideKeyword::Unset |
50362                            CSSWideKeyword::Inherit => {
50363                                context.builder
50364                                       .get_parent_inherited_text()
50365                            },
50366                        };
50367                        let computed = style_struct
50368                            .clone_overflow_wrap();
50369
50370                        AnimationValue::OverflowWrap(computed)
50371                    },
50372                    LonghandId::PointerEvents => {
50373                        // FIXME(emilio, bug 1533327): I think revert (and
50374                        // revert-layer) handling is not fine here, but what to
50375                        // do instead?
50376                        //
50377                        // Seems we'd need the computed value as if it was
50378                        // revert, somehow. Treating it as `unset` seems fine
50379                        // for now...
50380                        let style_struct = match declaration.keyword {
50381                            CSSWideKeyword::Initial => {
50382                                initial.get_inherited_ui()
50383                            },
50384                            CSSWideKeyword::Revert |
50385                            CSSWideKeyword::RevertLayer |
50386                            CSSWideKeyword::Unset |
50387                            CSSWideKeyword::Inherit => {
50388                                context.builder
50389                                       .get_parent_inherited_ui()
50390                            },
50391                        };
50392                        let computed = style_struct
50393                            .clone_pointer_events();
50394
50395                        AnimationValue::PointerEvents(computed)
50396                    },
50397                    LonghandId::Position => {
50398                        // FIXME(emilio, bug 1533327): I think revert (and
50399                        // revert-layer) handling is not fine here, but what to
50400                        // do instead?
50401                        //
50402                        // Seems we'd need the computed value as if it was
50403                        // revert, somehow. Treating it as `unset` seems fine
50404                        // for now...
50405                        let style_struct = match declaration.keyword {
50406                            CSSWideKeyword::Revert |
50407                            CSSWideKeyword::RevertLayer |
50408                            CSSWideKeyword::Unset |
50409                            CSSWideKeyword::Initial => {
50410                                initial.get_box()
50411                            },
50412                            CSSWideKeyword::Inherit => {
50413                                context.builder
50414                                       .get_parent_box()
50415                            },
50416                        };
50417                        let computed = style_struct
50418                            .clone_position();
50419
50420                        AnimationValue::Position(computed)
50421                    },
50422                    LonghandId::TableLayout => {
50423                        // FIXME(emilio, bug 1533327): I think revert (and
50424                        // revert-layer) handling is not fine here, but what to
50425                        // do instead?
50426                        //
50427                        // Seems we'd need the computed value as if it was
50428                        // revert, somehow. Treating it as `unset` seems fine
50429                        // for now...
50430                        let style_struct = match declaration.keyword {
50431                            CSSWideKeyword::Revert |
50432                            CSSWideKeyword::RevertLayer |
50433                            CSSWideKeyword::Unset |
50434                            CSSWideKeyword::Initial => {
50435                                initial.get_table()
50436                            },
50437                            CSSWideKeyword::Inherit => {
50438                                context.builder
50439                                       .get_parent_table()
50440                            },
50441                        };
50442                        let computed = style_struct
50443                            .clone_table_layout();
50444
50445                        AnimationValue::TableLayout(computed)
50446                    },
50447                    LonghandId::TextAlign => {
50448                        // FIXME(emilio, bug 1533327): I think revert (and
50449                        // revert-layer) handling is not fine here, but what to
50450                        // do instead?
50451                        //
50452                        // Seems we'd need the computed value as if it was
50453                        // revert, somehow. Treating it as `unset` seems fine
50454                        // for now...
50455                        let style_struct = match declaration.keyword {
50456                            CSSWideKeyword::Initial => {
50457                                initial.get_inherited_text()
50458                            },
50459                            CSSWideKeyword::Revert |
50460                            CSSWideKeyword::RevertLayer |
50461                            CSSWideKeyword::Unset |
50462                            CSSWideKeyword::Inherit => {
50463                                context.builder
50464                                       .get_parent_inherited_text()
50465                            },
50466                        };
50467                        let computed = style_struct
50468                            .clone_text_align();
50469
50470                        AnimationValue::TextAlign(computed)
50471                    },
50472                    LonghandId::TextAlignLast => {
50473                        // FIXME(emilio, bug 1533327): I think revert (and
50474                        // revert-layer) handling is not fine here, but what to
50475                        // do instead?
50476                        //
50477                        // Seems we'd need the computed value as if it was
50478                        // revert, somehow. Treating it as `unset` seems fine
50479                        // for now...
50480                        let style_struct = match declaration.keyword {
50481                            CSSWideKeyword::Initial => {
50482                                initial.get_inherited_text()
50483                            },
50484                            CSSWideKeyword::Revert |
50485                            CSSWideKeyword::RevertLayer |
50486                            CSSWideKeyword::Unset |
50487                            CSSWideKeyword::Inherit => {
50488                                context.builder
50489                                       .get_parent_inherited_text()
50490                            },
50491                        };
50492                        let computed = style_struct
50493                            .clone_text_align_last();
50494
50495                        AnimationValue::TextAlignLast(computed)
50496                    },
50497                    LonghandId::TextDecorationLine => {
50498                        // FIXME(emilio, bug 1533327): I think revert (and
50499                        // revert-layer) handling is not fine here, but what to
50500                        // do instead?
50501                        //
50502                        // Seems we'd need the computed value as if it was
50503                        // revert, somehow. Treating it as `unset` seems fine
50504                        // for now...
50505                        let style_struct = match declaration.keyword {
50506                            CSSWideKeyword::Revert |
50507                            CSSWideKeyword::RevertLayer |
50508                            CSSWideKeyword::Unset |
50509                            CSSWideKeyword::Initial => {
50510                                initial.get_text()
50511                            },
50512                            CSSWideKeyword::Inherit => {
50513                                context.builder
50514                                       .get_parent_text()
50515                            },
50516                        };
50517                        let computed = style_struct
50518                            .clone_text_decoration_line();
50519
50520                        AnimationValue::TextDecorationLine(computed)
50521                    },
50522                    LonghandId::TextDecorationStyle => {
50523                        // FIXME(emilio, bug 1533327): I think revert (and
50524                        // revert-layer) handling is not fine here, but what to
50525                        // do instead?
50526                        //
50527                        // Seems we'd need the computed value as if it was
50528                        // revert, somehow. Treating it as `unset` seems fine
50529                        // for now...
50530                        let style_struct = match declaration.keyword {
50531                            CSSWideKeyword::Revert |
50532                            CSSWideKeyword::RevertLayer |
50533                            CSSWideKeyword::Unset |
50534                            CSSWideKeyword::Initial => {
50535                                initial.get_text()
50536                            },
50537                            CSSWideKeyword::Inherit => {
50538                                context.builder
50539                                       .get_parent_text()
50540                            },
50541                        };
50542                        let computed = style_struct
50543                            .clone_text_decoration_style();
50544
50545                        AnimationValue::TextDecorationStyle(computed)
50546                    },
50547                    LonghandId::TextJustify => {
50548                        // FIXME(emilio, bug 1533327): I think revert (and
50549                        // revert-layer) handling is not fine here, but what to
50550                        // do instead?
50551                        //
50552                        // Seems we'd need the computed value as if it was
50553                        // revert, somehow. Treating it as `unset` seems fine
50554                        // for now...
50555                        let style_struct = match declaration.keyword {
50556                            CSSWideKeyword::Initial => {
50557                                initial.get_inherited_text()
50558                            },
50559                            CSSWideKeyword::Revert |
50560                            CSSWideKeyword::RevertLayer |
50561                            CSSWideKeyword::Unset |
50562                            CSSWideKeyword::Inherit => {
50563                                context.builder
50564                                       .get_parent_inherited_text()
50565                            },
50566                        };
50567                        let computed = style_struct
50568                            .clone_text_justify();
50569
50570                        AnimationValue::TextJustify(computed)
50571                    },
50572                    LonghandId::TextRendering => {
50573                        // FIXME(emilio, bug 1533327): I think revert (and
50574                        // revert-layer) handling is not fine here, but what to
50575                        // do instead?
50576                        //
50577                        // Seems we'd need the computed value as if it was
50578                        // revert, somehow. Treating it as `unset` seems fine
50579                        // for now...
50580                        let style_struct = match declaration.keyword {
50581                            CSSWideKeyword::Initial => {
50582                                initial.get_inherited_text()
50583                            },
50584                            CSSWideKeyword::Revert |
50585                            CSSWideKeyword::RevertLayer |
50586                            CSSWideKeyword::Unset |
50587                            CSSWideKeyword::Inherit => {
50588                                context.builder
50589                                       .get_parent_inherited_text()
50590                            },
50591                        };
50592                        let computed = style_struct
50593                            .clone_text_rendering();
50594
50595                        AnimationValue::TextRendering(computed)
50596                    },
50597                    LonghandId::TextTransform => {
50598                        // FIXME(emilio, bug 1533327): I think revert (and
50599                        // revert-layer) handling is not fine here, but what to
50600                        // do instead?
50601                        //
50602                        // Seems we'd need the computed value as if it was
50603                        // revert, somehow. Treating it as `unset` seems fine
50604                        // for now...
50605                        let style_struct = match declaration.keyword {
50606                            CSSWideKeyword::Initial => {
50607                                initial.get_inherited_text()
50608                            },
50609                            CSSWideKeyword::Revert |
50610                            CSSWideKeyword::RevertLayer |
50611                            CSSWideKeyword::Unset |
50612                            CSSWideKeyword::Inherit => {
50613                                context.builder
50614                                       .get_parent_inherited_text()
50615                            },
50616                        };
50617                        let computed = style_struct
50618                            .clone_text_transform();
50619
50620                        AnimationValue::TextTransform(computed)
50621                    },
50622                    LonghandId::TextWrapMode => {
50623                        // FIXME(emilio, bug 1533327): I think revert (and
50624                        // revert-layer) handling is not fine here, but what to
50625                        // do instead?
50626                        //
50627                        // Seems we'd need the computed value as if it was
50628                        // revert, somehow. Treating it as `unset` seems fine
50629                        // for now...
50630                        let style_struct = match declaration.keyword {
50631                            CSSWideKeyword::Initial => {
50632                                initial.get_inherited_text()
50633                            },
50634                            CSSWideKeyword::Revert |
50635                            CSSWideKeyword::RevertLayer |
50636                            CSSWideKeyword::Unset |
50637                            CSSWideKeyword::Inherit => {
50638                                context.builder
50639                                       .get_parent_inherited_text()
50640                            },
50641                        };
50642                        let computed = style_struct
50643                            .clone_text_wrap_mode();
50644
50645                        AnimationValue::TextWrapMode(computed)
50646                    },
50647                    LonghandId::TransformStyle => {
50648                        // FIXME(emilio, bug 1533327): I think revert (and
50649                        // revert-layer) handling is not fine here, but what to
50650                        // do instead?
50651                        //
50652                        // Seems we'd need the computed value as if it was
50653                        // revert, somehow. Treating it as `unset` seems fine
50654                        // for now...
50655                        let style_struct = match declaration.keyword {
50656                            CSSWideKeyword::Revert |
50657                            CSSWideKeyword::RevertLayer |
50658                            CSSWideKeyword::Unset |
50659                            CSSWideKeyword::Initial => {
50660                                initial.get_box()
50661                            },
50662                            CSSWideKeyword::Inherit => {
50663                                context.builder
50664                                       .get_parent_box()
50665                            },
50666                        };
50667                        let computed = style_struct
50668                            .clone_transform_style();
50669
50670                        AnimationValue::TransformStyle(computed)
50671                    },
50672                    LonghandId::Visibility => {
50673                        // FIXME(emilio, bug 1533327): I think revert (and
50674                        // revert-layer) handling is not fine here, but what to
50675                        // do instead?
50676                        //
50677                        // Seems we'd need the computed value as if it was
50678                        // revert, somehow. Treating it as `unset` seems fine
50679                        // for now...
50680                        let style_struct = match declaration.keyword {
50681                            CSSWideKeyword::Initial => {
50682                                initial.get_inherited_box()
50683                            },
50684                            CSSWideKeyword::Revert |
50685                            CSSWideKeyword::RevertLayer |
50686                            CSSWideKeyword::Unset |
50687                            CSSWideKeyword::Inherit => {
50688                                context.builder
50689                                       .get_parent_inherited_box()
50690                            },
50691                        };
50692                        let computed = style_struct
50693                            .clone_visibility();
50694
50695                        let computed = computed.to_animated_value(&crate::values::animated::Context {
50696                            style
50697                        });
50698                        AnimationValue::Visibility(computed)
50699                    },
50700                    LonghandId::WhiteSpaceCollapse => {
50701                        // FIXME(emilio, bug 1533327): I think revert (and
50702                        // revert-layer) handling is not fine here, but what to
50703                        // do instead?
50704                        //
50705                        // Seems we'd need the computed value as if it was
50706                        // revert, somehow. Treating it as `unset` seems fine
50707                        // for now...
50708                        let style_struct = match declaration.keyword {
50709                            CSSWideKeyword::Initial => {
50710                                initial.get_inherited_text()
50711                            },
50712                            CSSWideKeyword::Revert |
50713                            CSSWideKeyword::RevertLayer |
50714                            CSSWideKeyword::Unset |
50715                            CSSWideKeyword::Inherit => {
50716                                context.builder
50717                                       .get_parent_inherited_text()
50718                            },
50719                        };
50720                        let computed = style_struct
50721                            .clone_white_space_collapse();
50722
50723                        AnimationValue::WhiteSpaceCollapse(computed)
50724                    },
50725                    LonghandId::WordBreak => {
50726                        // FIXME(emilio, bug 1533327): I think revert (and
50727                        // revert-layer) handling is not fine here, but what to
50728                        // do instead?
50729                        //
50730                        // Seems we'd need the computed value as if it was
50731                        // revert, somehow. Treating it as `unset` seems fine
50732                        // for now...
50733                        let style_struct = match declaration.keyword {
50734                            CSSWideKeyword::Initial => {
50735                                initial.get_inherited_text()
50736                            },
50737                            CSSWideKeyword::Revert |
50738                            CSSWideKeyword::RevertLayer |
50739                            CSSWideKeyword::Unset |
50740                            CSSWideKeyword::Inherit => {
50741                                context.builder
50742                                       .get_parent_inherited_text()
50743                            },
50744                        };
50745                        let computed = style_struct
50746                            .clone_word_break();
50747
50748                        AnimationValue::WordBreak(computed)
50749                    },
50750                    LonghandId::ZIndex => {
50751                        // FIXME(emilio, bug 1533327): I think revert (and
50752                        // revert-layer) handling is not fine here, but what to
50753                        // do instead?
50754                        //
50755                        // Seems we'd need the computed value as if it was
50756                        // revert, somehow. Treating it as `unset` seems fine
50757                        // for now...
50758                        let style_struct = match declaration.keyword {
50759                            CSSWideKeyword::Revert |
50760                            CSSWideKeyword::RevertLayer |
50761                            CSSWideKeyword::Unset |
50762                            CSSWideKeyword::Initial => {
50763                                initial.get_position()
50764                            },
50765                            CSSWideKeyword::Inherit => {
50766                                context.builder
50767                                       .get_parent_position()
50768                            },
50769                        };
50770                        let computed = style_struct
50771                            .clone_z_index();
50772
50773                        let computed = computed.to_animated_value(&crate::values::animated::Context {
50774                            style
50775                        });
50776                        AnimationValue::ZIndex(computed)
50777                    },
50778                    LonghandId::Zoom => {
50779                        // FIXME(emilio, bug 1533327): I think revert (and
50780                        // revert-layer) handling is not fine here, but what to
50781                        // do instead?
50782                        //
50783                        // Seems we'd need the computed value as if it was
50784                        // revert, somehow. Treating it as `unset` seems fine
50785                        // for now...
50786                        let style_struct = match declaration.keyword {
50787                            CSSWideKeyword::Revert |
50788                            CSSWideKeyword::RevertLayer |
50789                            CSSWideKeyword::Unset |
50790                            CSSWideKeyword::Initial => {
50791                                initial.get_box()
50792                            },
50793                            CSSWideKeyword::Inherit => {
50794                                context.builder
50795                                       .get_parent_box()
50796                            },
50797                        };
50798                        let computed = style_struct
50799                            .clone_zoom();
50800
50801                        let computed = computed.to_animated_value(&crate::values::animated::Context {
50802                            style
50803                        });
50804                        AnimationValue::Zoom(computed)
50805                    },
50806                    LonghandId::FlexGrow => {
50807                        // FIXME(emilio, bug 1533327): I think revert (and
50808                        // revert-layer) handling is not fine here, but what to
50809                        // do instead?
50810                        //
50811                        // Seems we'd need the computed value as if it was
50812                        // revert, somehow. Treating it as `unset` seems fine
50813                        // for now...
50814                        let style_struct = match declaration.keyword {
50815                            CSSWideKeyword::Revert |
50816                            CSSWideKeyword::RevertLayer |
50817                            CSSWideKeyword::Unset |
50818                            CSSWideKeyword::Initial => {
50819                                initial.get_position()
50820                            },
50821                            CSSWideKeyword::Inherit => {
50822                                context.builder
50823                                       .get_parent_position()
50824                            },
50825                        };
50826                        let computed = style_struct
50827                            .clone_flex_grow();
50828
50829                        let computed = computed.to_animated_value(&crate::values::animated::Context {
50830                            style
50831                        });
50832                        AnimationValue::FlexGrow(computed)
50833                    },
50834                    LonghandId::FlexShrink => {
50835                        // FIXME(emilio, bug 1533327): I think revert (and
50836                        // revert-layer) handling is not fine here, but what to
50837                        // do instead?
50838                        //
50839                        // Seems we'd need the computed value as if it was
50840                        // revert, somehow. Treating it as `unset` seems fine
50841                        // for now...
50842                        let style_struct = match declaration.keyword {
50843                            CSSWideKeyword::Revert |
50844                            CSSWideKeyword::RevertLayer |
50845                            CSSWideKeyword::Unset |
50846                            CSSWideKeyword::Initial => {
50847                                initial.get_position()
50848                            },
50849                            CSSWideKeyword::Inherit => {
50850                                context.builder
50851                                       .get_parent_position()
50852                            },
50853                        };
50854                        let computed = style_struct
50855                            .clone_flex_shrink();
50856
50857                        let computed = computed.to_animated_value(&crate::values::animated::Context {
50858                            style
50859                        });
50860                        AnimationValue::FlexShrink(computed)
50861                    },
50862                    LonghandId::OverflowX => {
50863                        // FIXME(emilio, bug 1533327): I think revert (and
50864                        // revert-layer) handling is not fine here, but what to
50865                        // do instead?
50866                        //
50867                        // Seems we'd need the computed value as if it was
50868                        // revert, somehow. Treating it as `unset` seems fine
50869                        // for now...
50870                        let style_struct = match declaration.keyword {
50871                            CSSWideKeyword::Revert |
50872                            CSSWideKeyword::RevertLayer |
50873                            CSSWideKeyword::Unset |
50874                            CSSWideKeyword::Initial => {
50875                                initial.get_box()
50876                            },
50877                            CSSWideKeyword::Inherit => {
50878                                context.builder
50879                                       .get_parent_box()
50880                            },
50881                        };
50882                        let computed = style_struct
50883                            .clone_overflow_x();
50884
50885                        AnimationValue::OverflowX(computed)
50886                    },
50887                    LonghandId::OverflowY => {
50888                        // FIXME(emilio, bug 1533327): I think revert (and
50889                        // revert-layer) handling is not fine here, but what to
50890                        // do instead?
50891                        //
50892                        // Seems we'd need the computed value as if it was
50893                        // revert, somehow. Treating it as `unset` seems fine
50894                        // for now...
50895                        let style_struct = match declaration.keyword {
50896                            CSSWideKeyword::Revert |
50897                            CSSWideKeyword::RevertLayer |
50898                            CSSWideKeyword::Unset |
50899                            CSSWideKeyword::Initial => {
50900                                initial.get_box()
50901                            },
50902                            CSSWideKeyword::Inherit => {
50903                                context.builder
50904                                       .get_parent_box()
50905                            },
50906                        };
50907                        let computed = style_struct
50908                            .clone_overflow_y();
50909
50910                        AnimationValue::OverflowY(computed)
50911                    },
50912                    LonghandId::BorderBottomStyle => {
50913                        // FIXME(emilio, bug 1533327): I think revert (and
50914                        // revert-layer) handling is not fine here, but what to
50915                        // do instead?
50916                        //
50917                        // Seems we'd need the computed value as if it was
50918                        // revert, somehow. Treating it as `unset` seems fine
50919                        // for now...
50920                        let style_struct = match declaration.keyword {
50921                            CSSWideKeyword::Revert |
50922                            CSSWideKeyword::RevertLayer |
50923                            CSSWideKeyword::Unset |
50924                            CSSWideKeyword::Initial => {
50925                                initial.get_border()
50926                            },
50927                            CSSWideKeyword::Inherit => {
50928                                context.builder
50929                                       .get_parent_border()
50930                            },
50931                        };
50932                        let computed = style_struct
50933                            .clone_border_bottom_style();
50934
50935                        AnimationValue::BorderBottomStyle(computed)
50936                    },
50937                    LonghandId::BorderLeftStyle => {
50938                        // FIXME(emilio, bug 1533327): I think revert (and
50939                        // revert-layer) handling is not fine here, but what to
50940                        // do instead?
50941                        //
50942                        // Seems we'd need the computed value as if it was
50943                        // revert, somehow. Treating it as `unset` seems fine
50944                        // for now...
50945                        let style_struct = match declaration.keyword {
50946                            CSSWideKeyword::Revert |
50947                            CSSWideKeyword::RevertLayer |
50948                            CSSWideKeyword::Unset |
50949                            CSSWideKeyword::Initial => {
50950                                initial.get_border()
50951                            },
50952                            CSSWideKeyword::Inherit => {
50953                                context.builder
50954                                       .get_parent_border()
50955                            },
50956                        };
50957                        let computed = style_struct
50958                            .clone_border_left_style();
50959
50960                        AnimationValue::BorderLeftStyle(computed)
50961                    },
50962                    LonghandId::BorderRightStyle => {
50963                        // FIXME(emilio, bug 1533327): I think revert (and
50964                        // revert-layer) handling is not fine here, but what to
50965                        // do instead?
50966                        //
50967                        // Seems we'd need the computed value as if it was
50968                        // revert, somehow. Treating it as `unset` seems fine
50969                        // for now...
50970                        let style_struct = match declaration.keyword {
50971                            CSSWideKeyword::Revert |
50972                            CSSWideKeyword::RevertLayer |
50973                            CSSWideKeyword::Unset |
50974                            CSSWideKeyword::Initial => {
50975                                initial.get_border()
50976                            },
50977                            CSSWideKeyword::Inherit => {
50978                                context.builder
50979                                       .get_parent_border()
50980                            },
50981                        };
50982                        let computed = style_struct
50983                            .clone_border_right_style();
50984
50985                        AnimationValue::BorderRightStyle(computed)
50986                    },
50987                    LonghandId::BorderTopStyle => {
50988                        // FIXME(emilio, bug 1533327): I think revert (and
50989                        // revert-layer) handling is not fine here, but what to
50990                        // do instead?
50991                        //
50992                        // Seems we'd need the computed value as if it was
50993                        // revert, somehow. Treating it as `unset` seems fine
50994                        // for now...
50995                        let style_struct = match declaration.keyword {
50996                            CSSWideKeyword::Revert |
50997                            CSSWideKeyword::RevertLayer |
50998                            CSSWideKeyword::Unset |
50999                            CSSWideKeyword::Initial => {
51000                                initial.get_border()
51001                            },
51002                            CSSWideKeyword::Inherit => {
51003                                context.builder
51004                                       .get_parent_border()
51005                            },
51006                        };
51007                        let computed = style_struct
51008                            .clone_border_top_style();
51009
51010                        AnimationValue::BorderTopStyle(computed)
51011                    },
51012                    LonghandId::BackdropFilter => {
51013                        // FIXME(emilio, bug 1533327): I think revert (and
51014                        // revert-layer) handling is not fine here, but what to
51015                        // do instead?
51016                        //
51017                        // Seems we'd need the computed value as if it was
51018                        // revert, somehow. Treating it as `unset` seems fine
51019                        // for now...
51020                        let style_struct = match declaration.keyword {
51021                            CSSWideKeyword::Revert |
51022                            CSSWideKeyword::RevertLayer |
51023                            CSSWideKeyword::Unset |
51024                            CSSWideKeyword::Initial => {
51025                                initial.get_effects()
51026                            },
51027                            CSSWideKeyword::Inherit => {
51028                                context.builder
51029                                       .get_parent_effects()
51030                            },
51031                        };
51032                        let computed = style_struct
51033                            .clone_backdrop_filter();
51034
51035                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51036                            style
51037                        });
51038                        AnimationValue::BackdropFilter(computed)
51039                    },
51040                    LonghandId::BackgroundAttachment => {
51041                        // FIXME(emilio, bug 1533327): I think revert (and
51042                        // revert-layer) handling is not fine here, but what to
51043                        // do instead?
51044                        //
51045                        // Seems we'd need the computed value as if it was
51046                        // revert, somehow. Treating it as `unset` seems fine
51047                        // for now...
51048                        let style_struct = match declaration.keyword {
51049                            CSSWideKeyword::Revert |
51050                            CSSWideKeyword::RevertLayer |
51051                            CSSWideKeyword::Unset |
51052                            CSSWideKeyword::Initial => {
51053                                initial.get_background()
51054                            },
51055                            CSSWideKeyword::Inherit => {
51056                                context.builder
51057                                       .get_parent_background()
51058                            },
51059                        };
51060                        let computed = style_struct
51061                            .clone_background_attachment();
51062
51063                        AnimationValue::BackgroundAttachment(computed)
51064                    },
51065                    LonghandId::BackgroundClip => {
51066                        // FIXME(emilio, bug 1533327): I think revert (and
51067                        // revert-layer) handling is not fine here, but what to
51068                        // do instead?
51069                        //
51070                        // Seems we'd need the computed value as if it was
51071                        // revert, somehow. Treating it as `unset` seems fine
51072                        // for now...
51073                        let style_struct = match declaration.keyword {
51074                            CSSWideKeyword::Revert |
51075                            CSSWideKeyword::RevertLayer |
51076                            CSSWideKeyword::Unset |
51077                            CSSWideKeyword::Initial => {
51078                                initial.get_background()
51079                            },
51080                            CSSWideKeyword::Inherit => {
51081                                context.builder
51082                                       .get_parent_background()
51083                            },
51084                        };
51085                        let computed = style_struct
51086                            .clone_background_clip();
51087
51088                        AnimationValue::BackgroundClip(computed)
51089                    },
51090                    LonghandId::BackgroundImage => {
51091                        // FIXME(emilio, bug 1533327): I think revert (and
51092                        // revert-layer) handling is not fine here, but what to
51093                        // do instead?
51094                        //
51095                        // Seems we'd need the computed value as if it was
51096                        // revert, somehow. Treating it as `unset` seems fine
51097                        // for now...
51098                        let style_struct = match declaration.keyword {
51099                            CSSWideKeyword::Revert |
51100                            CSSWideKeyword::RevertLayer |
51101                            CSSWideKeyword::Unset |
51102                            CSSWideKeyword::Initial => {
51103                                initial.get_background()
51104                            },
51105                            CSSWideKeyword::Inherit => {
51106                                context.builder
51107                                       .get_parent_background()
51108                            },
51109                        };
51110                        let computed = style_struct
51111                            .clone_background_image();
51112
51113                        AnimationValue::BackgroundImage(computed)
51114                    },
51115                    LonghandId::BackgroundOrigin => {
51116                        // FIXME(emilio, bug 1533327): I think revert (and
51117                        // revert-layer) handling is not fine here, but what to
51118                        // do instead?
51119                        //
51120                        // Seems we'd need the computed value as if it was
51121                        // revert, somehow. Treating it as `unset` seems fine
51122                        // for now...
51123                        let style_struct = match declaration.keyword {
51124                            CSSWideKeyword::Revert |
51125                            CSSWideKeyword::RevertLayer |
51126                            CSSWideKeyword::Unset |
51127                            CSSWideKeyword::Initial => {
51128                                initial.get_background()
51129                            },
51130                            CSSWideKeyword::Inherit => {
51131                                context.builder
51132                                       .get_parent_background()
51133                            },
51134                        };
51135                        let computed = style_struct
51136                            .clone_background_origin();
51137
51138                        AnimationValue::BackgroundOrigin(computed)
51139                    },
51140                    LonghandId::BackgroundPositionX => {
51141                        // FIXME(emilio, bug 1533327): I think revert (and
51142                        // revert-layer) handling is not fine here, but what to
51143                        // do instead?
51144                        //
51145                        // Seems we'd need the computed value as if it was
51146                        // revert, somehow. Treating it as `unset` seems fine
51147                        // for now...
51148                        let style_struct = match declaration.keyword {
51149                            CSSWideKeyword::Revert |
51150                            CSSWideKeyword::RevertLayer |
51151                            CSSWideKeyword::Unset |
51152                            CSSWideKeyword::Initial => {
51153                                initial.get_background()
51154                            },
51155                            CSSWideKeyword::Inherit => {
51156                                context.builder
51157                                       .get_parent_background()
51158                            },
51159                        };
51160                        let computed = style_struct
51161                            .clone_background_position_x();
51162
51163                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51164                            style
51165                        });
51166                        AnimationValue::BackgroundPositionX(computed)
51167                    },
51168                    LonghandId::BackgroundPositionY => {
51169                        // FIXME(emilio, bug 1533327): I think revert (and
51170                        // revert-layer) handling is not fine here, but what to
51171                        // do instead?
51172                        //
51173                        // Seems we'd need the computed value as if it was
51174                        // revert, somehow. Treating it as `unset` seems fine
51175                        // for now...
51176                        let style_struct = match declaration.keyword {
51177                            CSSWideKeyword::Revert |
51178                            CSSWideKeyword::RevertLayer |
51179                            CSSWideKeyword::Unset |
51180                            CSSWideKeyword::Initial => {
51181                                initial.get_background()
51182                            },
51183                            CSSWideKeyword::Inherit => {
51184                                context.builder
51185                                       .get_parent_background()
51186                            },
51187                        };
51188                        let computed = style_struct
51189                            .clone_background_position_y();
51190
51191                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51192                            style
51193                        });
51194                        AnimationValue::BackgroundPositionY(computed)
51195                    },
51196                    LonghandId::BackgroundRepeat => {
51197                        // FIXME(emilio, bug 1533327): I think revert (and
51198                        // revert-layer) handling is not fine here, but what to
51199                        // do instead?
51200                        //
51201                        // Seems we'd need the computed value as if it was
51202                        // revert, somehow. Treating it as `unset` seems fine
51203                        // for now...
51204                        let style_struct = match declaration.keyword {
51205                            CSSWideKeyword::Revert |
51206                            CSSWideKeyword::RevertLayer |
51207                            CSSWideKeyword::Unset |
51208                            CSSWideKeyword::Initial => {
51209                                initial.get_background()
51210                            },
51211                            CSSWideKeyword::Inherit => {
51212                                context.builder
51213                                       .get_parent_background()
51214                            },
51215                        };
51216                        let computed = style_struct
51217                            .clone_background_repeat();
51218
51219                        AnimationValue::BackgroundRepeat(computed)
51220                    },
51221                    LonghandId::BackgroundSize => {
51222                        // FIXME(emilio, bug 1533327): I think revert (and
51223                        // revert-layer) handling is not fine here, but what to
51224                        // do instead?
51225                        //
51226                        // Seems we'd need the computed value as if it was
51227                        // revert, somehow. Treating it as `unset` seems fine
51228                        // for now...
51229                        let style_struct = match declaration.keyword {
51230                            CSSWideKeyword::Revert |
51231                            CSSWideKeyword::RevertLayer |
51232                            CSSWideKeyword::Unset |
51233                            CSSWideKeyword::Initial => {
51234                                initial.get_background()
51235                            },
51236                            CSSWideKeyword::Inherit => {
51237                                context.builder
51238                                       .get_parent_background()
51239                            },
51240                        };
51241                        let computed = style_struct
51242                            .clone_background_size();
51243
51244                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51245                            style
51246                        });
51247                        AnimationValue::BackgroundSize(computed)
51248                    },
51249                    LonghandId::BorderImageOutset => {
51250                        // FIXME(emilio, bug 1533327): I think revert (and
51251                        // revert-layer) handling is not fine here, but what to
51252                        // do instead?
51253                        //
51254                        // Seems we'd need the computed value as if it was
51255                        // revert, somehow. Treating it as `unset` seems fine
51256                        // for now...
51257                        let style_struct = match declaration.keyword {
51258                            CSSWideKeyword::Revert |
51259                            CSSWideKeyword::RevertLayer |
51260                            CSSWideKeyword::Unset |
51261                            CSSWideKeyword::Initial => {
51262                                initial.get_border()
51263                            },
51264                            CSSWideKeyword::Inherit => {
51265                                context.builder
51266                                       .get_parent_border()
51267                            },
51268                        };
51269                        let computed = style_struct
51270                            .clone_border_image_outset();
51271
51272                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51273                            style
51274                        });
51275                        AnimationValue::BorderImageOutset(computed)
51276                    },
51277                    LonghandId::BorderImageSlice => {
51278                        // FIXME(emilio, bug 1533327): I think revert (and
51279                        // revert-layer) handling is not fine here, but what to
51280                        // do instead?
51281                        //
51282                        // Seems we'd need the computed value as if it was
51283                        // revert, somehow. Treating it as `unset` seems fine
51284                        // for now...
51285                        let style_struct = match declaration.keyword {
51286                            CSSWideKeyword::Revert |
51287                            CSSWideKeyword::RevertLayer |
51288                            CSSWideKeyword::Unset |
51289                            CSSWideKeyword::Initial => {
51290                                initial.get_border()
51291                            },
51292                            CSSWideKeyword::Inherit => {
51293                                context.builder
51294                                       .get_parent_border()
51295                            },
51296                        };
51297                        let computed = style_struct
51298                            .clone_border_image_slice();
51299
51300                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51301                            style
51302                        });
51303                        AnimationValue::BorderImageSlice(computed)
51304                    },
51305                    LonghandId::BorderImageWidth => {
51306                        // FIXME(emilio, bug 1533327): I think revert (and
51307                        // revert-layer) handling is not fine here, but what to
51308                        // do instead?
51309                        //
51310                        // Seems we'd need the computed value as if it was
51311                        // revert, somehow. Treating it as `unset` seems fine
51312                        // for now...
51313                        let style_struct = match declaration.keyword {
51314                            CSSWideKeyword::Revert |
51315                            CSSWideKeyword::RevertLayer |
51316                            CSSWideKeyword::Unset |
51317                            CSSWideKeyword::Initial => {
51318                                initial.get_border()
51319                            },
51320                            CSSWideKeyword::Inherit => {
51321                                context.builder
51322                                       .get_parent_border()
51323                            },
51324                        };
51325                        let computed = style_struct
51326                            .clone_border_image_width();
51327
51328                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51329                            style
51330                        });
51331                        AnimationValue::BorderImageWidth(computed)
51332                    },
51333                    LonghandId::BorderSpacing => {
51334                        // FIXME(emilio, bug 1533327): I think revert (and
51335                        // revert-layer) handling is not fine here, but what to
51336                        // do instead?
51337                        //
51338                        // Seems we'd need the computed value as if it was
51339                        // revert, somehow. Treating it as `unset` seems fine
51340                        // for now...
51341                        let style_struct = match declaration.keyword {
51342                            CSSWideKeyword::Initial => {
51343                                initial.get_inherited_table()
51344                            },
51345                            CSSWideKeyword::Revert |
51346                            CSSWideKeyword::RevertLayer |
51347                            CSSWideKeyword::Unset |
51348                            CSSWideKeyword::Inherit => {
51349                                context.builder
51350                                       .get_parent_inherited_table()
51351                            },
51352                        };
51353                        let computed = style_struct
51354                            .clone_border_spacing();
51355
51356                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51357                            style
51358                        });
51359                        AnimationValue::BorderSpacing(computed)
51360                    },
51361                    LonghandId::BoxShadow => {
51362                        // FIXME(emilio, bug 1533327): I think revert (and
51363                        // revert-layer) handling is not fine here, but what to
51364                        // do instead?
51365                        //
51366                        // Seems we'd need the computed value as if it was
51367                        // revert, somehow. Treating it as `unset` seems fine
51368                        // for now...
51369                        let style_struct = match declaration.keyword {
51370                            CSSWideKeyword::Revert |
51371                            CSSWideKeyword::RevertLayer |
51372                            CSSWideKeyword::Unset |
51373                            CSSWideKeyword::Initial => {
51374                                initial.get_effects()
51375                            },
51376                            CSSWideKeyword::Inherit => {
51377                                context.builder
51378                                       .get_parent_effects()
51379                            },
51380                        };
51381                        let computed = style_struct
51382                            .clone_box_shadow();
51383
51384                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51385                            style
51386                        });
51387                        AnimationValue::BoxShadow(computed)
51388                    },
51389                    LonghandId::Clip => {
51390                        // FIXME(emilio, bug 1533327): I think revert (and
51391                        // revert-layer) handling is not fine here, but what to
51392                        // do instead?
51393                        //
51394                        // Seems we'd need the computed value as if it was
51395                        // revert, somehow. Treating it as `unset` seems fine
51396                        // for now...
51397                        let style_struct = match declaration.keyword {
51398                            CSSWideKeyword::Revert |
51399                            CSSWideKeyword::RevertLayer |
51400                            CSSWideKeyword::Unset |
51401                            CSSWideKeyword::Initial => {
51402                                initial.get_effects()
51403                            },
51404                            CSSWideKeyword::Inherit => {
51405                                context.builder
51406                                       .get_parent_effects()
51407                            },
51408                        };
51409                        let computed = style_struct
51410                            .clone_clip();
51411
51412                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51413                            style
51414                        });
51415                        AnimationValue::Clip(computed)
51416                    },
51417                    LonghandId::ClipPath => {
51418                        // FIXME(emilio, bug 1533327): I think revert (and
51419                        // revert-layer) handling is not fine here, but what to
51420                        // do instead?
51421                        //
51422                        // Seems we'd need the computed value as if it was
51423                        // revert, somehow. Treating it as `unset` seems fine
51424                        // for now...
51425                        let style_struct = match declaration.keyword {
51426                            CSSWideKeyword::Revert |
51427                            CSSWideKeyword::RevertLayer |
51428                            CSSWideKeyword::Unset |
51429                            CSSWideKeyword::Initial => {
51430                                initial.get_svg()
51431                            },
51432                            CSSWideKeyword::Inherit => {
51433                                context.builder
51434                                       .get_parent_svg()
51435                            },
51436                        };
51437                        let computed = style_struct
51438                            .clone_clip_path();
51439
51440                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51441                            style
51442                        });
51443                        AnimationValue::ClipPath(computed)
51444                    },
51445                    LonghandId::Color => {
51446                        // FIXME(emilio, bug 1533327): I think revert (and
51447                        // revert-layer) handling is not fine here, but what to
51448                        // do instead?
51449                        //
51450                        // Seems we'd need the computed value as if it was
51451                        // revert, somehow. Treating it as `unset` seems fine
51452                        // for now...
51453                        let style_struct = match declaration.keyword {
51454                            CSSWideKeyword::Initial => {
51455                                initial.get_inherited_text()
51456                            },
51457                            CSSWideKeyword::Revert |
51458                            CSSWideKeyword::RevertLayer |
51459                            CSSWideKeyword::Unset |
51460                            CSSWideKeyword::Inherit => {
51461                                context.builder
51462                                       .get_parent_inherited_text()
51463                            },
51464                        };
51465                        let computed = style_struct
51466                            .clone_color();
51467
51468                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51469                            style
51470                        });
51471                        AnimationValue::Color(computed)
51472                    },
51473                    LonghandId::ColorScheme => {
51474                        // FIXME(emilio, bug 1533327): I think revert (and
51475                        // revert-layer) handling is not fine here, but what to
51476                        // do instead?
51477                        //
51478                        // Seems we'd need the computed value as if it was
51479                        // revert, somehow. Treating it as `unset` seems fine
51480                        // for now...
51481                        let style_struct = match declaration.keyword {
51482                            CSSWideKeyword::Initial => {
51483                                initial.get_inherited_ui()
51484                            },
51485                            CSSWideKeyword::Revert |
51486                            CSSWideKeyword::RevertLayer |
51487                            CSSWideKeyword::Unset |
51488                            CSSWideKeyword::Inherit => {
51489                                context.builder
51490                                       .get_parent_inherited_ui()
51491                            },
51492                        };
51493                        let computed = style_struct
51494                            .clone_color_scheme();
51495
51496                        AnimationValue::ColorScheme(computed)
51497                    },
51498                    LonghandId::ColumnWidth => {
51499                        // FIXME(emilio, bug 1533327): I think revert (and
51500                        // revert-layer) handling is not fine here, but what to
51501                        // do instead?
51502                        //
51503                        // Seems we'd need the computed value as if it was
51504                        // revert, somehow. Treating it as `unset` seems fine
51505                        // for now...
51506                        let style_struct = match declaration.keyword {
51507                            CSSWideKeyword::Revert |
51508                            CSSWideKeyword::RevertLayer |
51509                            CSSWideKeyword::Unset |
51510                            CSSWideKeyword::Initial => {
51511                                initial.get_column()
51512                            },
51513                            CSSWideKeyword::Inherit => {
51514                                context.builder
51515                                       .get_parent_column()
51516                            },
51517                        };
51518                        let computed = style_struct
51519                            .clone_column_width();
51520
51521                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51522                            style
51523                        });
51524                        AnimationValue::ColumnWidth(computed)
51525                    },
51526                    LonghandId::Content => {
51527                        // FIXME(emilio, bug 1533327): I think revert (and
51528                        // revert-layer) handling is not fine here, but what to
51529                        // do instead?
51530                        //
51531                        // Seems we'd need the computed value as if it was
51532                        // revert, somehow. Treating it as `unset` seems fine
51533                        // for now...
51534                        let style_struct = match declaration.keyword {
51535                            CSSWideKeyword::Revert |
51536                            CSSWideKeyword::RevertLayer |
51537                            CSSWideKeyword::Unset |
51538                            CSSWideKeyword::Initial => {
51539                                initial.get_counters()
51540                            },
51541                            CSSWideKeyword::Inherit => {
51542                                context.builder
51543                                       .get_parent_counters()
51544                            },
51545                        };
51546                        let computed = style_struct
51547                            .clone_content();
51548
51549                        AnimationValue::Content(computed)
51550                    },
51551                    LonghandId::CounterIncrement => {
51552                        // FIXME(emilio, bug 1533327): I think revert (and
51553                        // revert-layer) handling is not fine here, but what to
51554                        // do instead?
51555                        //
51556                        // Seems we'd need the computed value as if it was
51557                        // revert, somehow. Treating it as `unset` seems fine
51558                        // for now...
51559                        let style_struct = match declaration.keyword {
51560                            CSSWideKeyword::Revert |
51561                            CSSWideKeyword::RevertLayer |
51562                            CSSWideKeyword::Unset |
51563                            CSSWideKeyword::Initial => {
51564                                initial.get_counters()
51565                            },
51566                            CSSWideKeyword::Inherit => {
51567                                context.builder
51568                                       .get_parent_counters()
51569                            },
51570                        };
51571                        let computed = style_struct
51572                            .clone_counter_increment();
51573
51574                        AnimationValue::CounterIncrement(computed)
51575                    },
51576                    LonghandId::CounterReset => {
51577                        // FIXME(emilio, bug 1533327): I think revert (and
51578                        // revert-layer) handling is not fine here, but what to
51579                        // do instead?
51580                        //
51581                        // Seems we'd need the computed value as if it was
51582                        // revert, somehow. Treating it as `unset` seems fine
51583                        // for now...
51584                        let style_struct = match declaration.keyword {
51585                            CSSWideKeyword::Revert |
51586                            CSSWideKeyword::RevertLayer |
51587                            CSSWideKeyword::Unset |
51588                            CSSWideKeyword::Initial => {
51589                                initial.get_counters()
51590                            },
51591                            CSSWideKeyword::Inherit => {
51592                                context.builder
51593                                       .get_parent_counters()
51594                            },
51595                        };
51596                        let computed = style_struct
51597                            .clone_counter_reset();
51598
51599                        AnimationValue::CounterReset(computed)
51600                    },
51601                    LonghandId::Cursor => {
51602                        // FIXME(emilio, bug 1533327): I think revert (and
51603                        // revert-layer) handling is not fine here, but what to
51604                        // do instead?
51605                        //
51606                        // Seems we'd need the computed value as if it was
51607                        // revert, somehow. Treating it as `unset` seems fine
51608                        // for now...
51609                        let style_struct = match declaration.keyword {
51610                            CSSWideKeyword::Initial => {
51611                                initial.get_inherited_ui()
51612                            },
51613                            CSSWideKeyword::Revert |
51614                            CSSWideKeyword::RevertLayer |
51615                            CSSWideKeyword::Unset |
51616                            CSSWideKeyword::Inherit => {
51617                                context.builder
51618                                       .get_parent_inherited_ui()
51619                            },
51620                        };
51621                        let computed = style_struct
51622                            .clone_cursor();
51623
51624                        AnimationValue::Cursor(computed)
51625                    },
51626                    LonghandId::Filter => {
51627                        // FIXME(emilio, bug 1533327): I think revert (and
51628                        // revert-layer) handling is not fine here, but what to
51629                        // do instead?
51630                        //
51631                        // Seems we'd need the computed value as if it was
51632                        // revert, somehow. Treating it as `unset` seems fine
51633                        // for now...
51634                        let style_struct = match declaration.keyword {
51635                            CSSWideKeyword::Revert |
51636                            CSSWideKeyword::RevertLayer |
51637                            CSSWideKeyword::Unset |
51638                            CSSWideKeyword::Initial => {
51639                                initial.get_effects()
51640                            },
51641                            CSSWideKeyword::Inherit => {
51642                                context.builder
51643                                       .get_parent_effects()
51644                            },
51645                        };
51646                        let computed = style_struct
51647                            .clone_filter();
51648
51649                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51650                            style
51651                        });
51652                        AnimationValue::Filter(computed)
51653                    },
51654                    LonghandId::FlexBasis => {
51655                        // FIXME(emilio, bug 1533327): I think revert (and
51656                        // revert-layer) handling is not fine here, but what to
51657                        // do instead?
51658                        //
51659                        // Seems we'd need the computed value as if it was
51660                        // revert, somehow. Treating it as `unset` seems fine
51661                        // for now...
51662                        let style_struct = match declaration.keyword {
51663                            CSSWideKeyword::Revert |
51664                            CSSWideKeyword::RevertLayer |
51665                            CSSWideKeyword::Unset |
51666                            CSSWideKeyword::Initial => {
51667                                initial.get_position()
51668                            },
51669                            CSSWideKeyword::Inherit => {
51670                                context.builder
51671                                       .get_parent_position()
51672                            },
51673                        };
51674                        let computed = style_struct
51675                            .clone_flex_basis();
51676
51677                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51678                            style
51679                        });
51680                        AnimationValue::FlexBasis(computed)
51681                    },
51682                    LonghandId::FontFamily => {
51683                        // FIXME(emilio, bug 1533327): I think revert (and
51684                        // revert-layer) handling is not fine here, but what to
51685                        // do instead?
51686                        //
51687                        // Seems we'd need the computed value as if it was
51688                        // revert, somehow. Treating it as `unset` seems fine
51689                        // for now...
51690                        let style_struct = match declaration.keyword {
51691                            CSSWideKeyword::Initial => {
51692                                initial.get_font()
51693                            },
51694                            CSSWideKeyword::Revert |
51695                            CSSWideKeyword::RevertLayer |
51696                            CSSWideKeyword::Unset |
51697                            CSSWideKeyword::Inherit => {
51698                                context.builder
51699                                       .get_parent_font()
51700                            },
51701                        };
51702                        let computed = style_struct
51703                            .clone_font_family();
51704
51705                        AnimationValue::FontFamily(computed)
51706                    },
51707                    LonghandId::FontSize => {
51708                        // FIXME(emilio, bug 1533327): I think revert (and
51709                        // revert-layer) handling is not fine here, but what to
51710                        // do instead?
51711                        //
51712                        // Seems we'd need the computed value as if it was
51713                        // revert, somehow. Treating it as `unset` seems fine
51714                        // for now...
51715                        let style_struct = match declaration.keyword {
51716                            CSSWideKeyword::Initial => {
51717                                initial.get_font()
51718                            },
51719                            CSSWideKeyword::Revert |
51720                            CSSWideKeyword::RevertLayer |
51721                            CSSWideKeyword::Unset |
51722                            CSSWideKeyword::Inherit => {
51723                                context.builder
51724                                       .get_parent_font()
51725                            },
51726                        };
51727                        let computed = style_struct
51728                            .clone_font_size();
51729
51730                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51731                            style
51732                        });
51733                        AnimationValue::FontSize(computed)
51734                    },
51735                    LonghandId::FontVariationSettings => {
51736                        // FIXME(emilio, bug 1533327): I think revert (and
51737                        // revert-layer) handling is not fine here, but what to
51738                        // do instead?
51739                        //
51740                        // Seems we'd need the computed value as if it was
51741                        // revert, somehow. Treating it as `unset` seems fine
51742                        // for now...
51743                        let style_struct = match declaration.keyword {
51744                            CSSWideKeyword::Initial => {
51745                                initial.get_font()
51746                            },
51747                            CSSWideKeyword::Revert |
51748                            CSSWideKeyword::RevertLayer |
51749                            CSSWideKeyword::Unset |
51750                            CSSWideKeyword::Inherit => {
51751                                context.builder
51752                                       .get_parent_font()
51753                            },
51754                        };
51755                        let computed = style_struct
51756                            .clone_font_variation_settings();
51757
51758                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51759                            style
51760                        });
51761                        AnimationValue::FontVariationSettings(computed)
51762                    },
51763                    LonghandId::GridTemplateAreas => {
51764                        // FIXME(emilio, bug 1533327): I think revert (and
51765                        // revert-layer) handling is not fine here, but what to
51766                        // do instead?
51767                        //
51768                        // Seems we'd need the computed value as if it was
51769                        // revert, somehow. Treating it as `unset` seems fine
51770                        // for now...
51771                        let style_struct = match declaration.keyword {
51772                            CSSWideKeyword::Revert |
51773                            CSSWideKeyword::RevertLayer |
51774                            CSSWideKeyword::Unset |
51775                            CSSWideKeyword::Initial => {
51776                                initial.get_position()
51777                            },
51778                            CSSWideKeyword::Inherit => {
51779                                context.builder
51780                                       .get_parent_position()
51781                            },
51782                        };
51783                        let computed = style_struct
51784                            .clone_grid_template_areas();
51785
51786                        AnimationValue::GridTemplateAreas(computed)
51787                    },
51788                    LonghandId::LetterSpacing => {
51789                        // FIXME(emilio, bug 1533327): I think revert (and
51790                        // revert-layer) handling is not fine here, but what to
51791                        // do instead?
51792                        //
51793                        // Seems we'd need the computed value as if it was
51794                        // revert, somehow. Treating it as `unset` seems fine
51795                        // for now...
51796                        let style_struct = match declaration.keyword {
51797                            CSSWideKeyword::Initial => {
51798                                initial.get_inherited_text()
51799                            },
51800                            CSSWideKeyword::Revert |
51801                            CSSWideKeyword::RevertLayer |
51802                            CSSWideKeyword::Unset |
51803                            CSSWideKeyword::Inherit => {
51804                                context.builder
51805                                       .get_parent_inherited_text()
51806                            },
51807                        };
51808                        let computed = style_struct
51809                            .clone_letter_spacing();
51810
51811                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51812                            style
51813                        });
51814                        AnimationValue::LetterSpacing(computed)
51815                    },
51816                    LonghandId::LineHeight => {
51817                        // FIXME(emilio, bug 1533327): I think revert (and
51818                        // revert-layer) handling is not fine here, but what to
51819                        // do instead?
51820                        //
51821                        // Seems we'd need the computed value as if it was
51822                        // revert, somehow. Treating it as `unset` seems fine
51823                        // for now...
51824                        let style_struct = match declaration.keyword {
51825                            CSSWideKeyword::Initial => {
51826                                initial.get_font()
51827                            },
51828                            CSSWideKeyword::Revert |
51829                            CSSWideKeyword::RevertLayer |
51830                            CSSWideKeyword::Unset |
51831                            CSSWideKeyword::Inherit => {
51832                                context.builder
51833                                       .get_parent_font()
51834                            },
51835                        };
51836                        let computed = style_struct
51837                            .clone_line_height();
51838
51839                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51840                            style
51841                        });
51842                        AnimationValue::LineHeight(computed)
51843                    },
51844                    LonghandId::MaskImage => {
51845                        // FIXME(emilio, bug 1533327): I think revert (and
51846                        // revert-layer) handling is not fine here, but what to
51847                        // do instead?
51848                        //
51849                        // Seems we'd need the computed value as if it was
51850                        // revert, somehow. Treating it as `unset` seems fine
51851                        // for now...
51852                        let style_struct = match declaration.keyword {
51853                            CSSWideKeyword::Revert |
51854                            CSSWideKeyword::RevertLayer |
51855                            CSSWideKeyword::Unset |
51856                            CSSWideKeyword::Initial => {
51857                                initial.get_svg()
51858                            },
51859                            CSSWideKeyword::Inherit => {
51860                                context.builder
51861                                       .get_parent_svg()
51862                            },
51863                        };
51864                        let computed = style_struct
51865                            .clone_mask_image();
51866
51867                        AnimationValue::MaskImage(computed)
51868                    },
51869                    LonghandId::OffsetPath => {
51870                        // FIXME(emilio, bug 1533327): I think revert (and
51871                        // revert-layer) handling is not fine here, but what to
51872                        // do instead?
51873                        //
51874                        // Seems we'd need the computed value as if it was
51875                        // revert, somehow. Treating it as `unset` seems fine
51876                        // for now...
51877                        let style_struct = match declaration.keyword {
51878                            CSSWideKeyword::Revert |
51879                            CSSWideKeyword::RevertLayer |
51880                            CSSWideKeyword::Unset |
51881                            CSSWideKeyword::Initial => {
51882                                initial.get_box()
51883                            },
51884                            CSSWideKeyword::Inherit => {
51885                                context.builder
51886                                       .get_parent_box()
51887                            },
51888                        };
51889                        let computed = style_struct
51890                            .clone_offset_path();
51891
51892                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51893                            style
51894                        });
51895                        AnimationValue::OffsetPath(computed)
51896                    },
51897                    LonghandId::Perspective => {
51898                        // FIXME(emilio, bug 1533327): I think revert (and
51899                        // revert-layer) handling is not fine here, but what to
51900                        // do instead?
51901                        //
51902                        // Seems we'd need the computed value as if it was
51903                        // revert, somehow. Treating it as `unset` seems fine
51904                        // for now...
51905                        let style_struct = match declaration.keyword {
51906                            CSSWideKeyword::Revert |
51907                            CSSWideKeyword::RevertLayer |
51908                            CSSWideKeyword::Unset |
51909                            CSSWideKeyword::Initial => {
51910                                initial.get_box()
51911                            },
51912                            CSSWideKeyword::Inherit => {
51913                                context.builder
51914                                       .get_parent_box()
51915                            },
51916                        };
51917                        let computed = style_struct
51918                            .clone_perspective();
51919
51920                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51921                            style
51922                        });
51923                        AnimationValue::Perspective(computed)
51924                    },
51925                    LonghandId::Quotes => {
51926                        // FIXME(emilio, bug 1533327): I think revert (and
51927                        // revert-layer) handling is not fine here, but what to
51928                        // do instead?
51929                        //
51930                        // Seems we'd need the computed value as if it was
51931                        // revert, somehow. Treating it as `unset` seems fine
51932                        // for now...
51933                        let style_struct = match declaration.keyword {
51934                            CSSWideKeyword::Initial => {
51935                                initial.get_list()
51936                            },
51937                            CSSWideKeyword::Revert |
51938                            CSSWideKeyword::RevertLayer |
51939                            CSSWideKeyword::Unset |
51940                            CSSWideKeyword::Inherit => {
51941                                context.builder
51942                                       .get_parent_list()
51943                            },
51944                        };
51945                        let computed = style_struct
51946                            .clone_quotes();
51947
51948                        AnimationValue::Quotes(computed)
51949                    },
51950                    LonghandId::Rotate => {
51951                        // FIXME(emilio, bug 1533327): I think revert (and
51952                        // revert-layer) handling is not fine here, but what to
51953                        // do instead?
51954                        //
51955                        // Seems we'd need the computed value as if it was
51956                        // revert, somehow. Treating it as `unset` seems fine
51957                        // for now...
51958                        let style_struct = match declaration.keyword {
51959                            CSSWideKeyword::Revert |
51960                            CSSWideKeyword::RevertLayer |
51961                            CSSWideKeyword::Unset |
51962                            CSSWideKeyword::Initial => {
51963                                initial.get_box()
51964                            },
51965                            CSSWideKeyword::Inherit => {
51966                                context.builder
51967                                       .get_parent_box()
51968                            },
51969                        };
51970                        let computed = style_struct
51971                            .clone_rotate();
51972
51973                        let computed = computed.to_animated_value(&crate::values::animated::Context {
51974                            style
51975                        });
51976                        AnimationValue::Rotate(computed)
51977                    },
51978                    LonghandId::Scale => {
51979                        // FIXME(emilio, bug 1533327): I think revert (and
51980                        // revert-layer) handling is not fine here, but what to
51981                        // do instead?
51982                        //
51983                        // Seems we'd need the computed value as if it was
51984                        // revert, somehow. Treating it as `unset` seems fine
51985                        // for now...
51986                        let style_struct = match declaration.keyword {
51987                            CSSWideKeyword::Revert |
51988                            CSSWideKeyword::RevertLayer |
51989                            CSSWideKeyword::Unset |
51990                            CSSWideKeyword::Initial => {
51991                                initial.get_box()
51992                            },
51993                            CSSWideKeyword::Inherit => {
51994                                context.builder
51995                                       .get_parent_box()
51996                            },
51997                        };
51998                        let computed = style_struct
51999                            .clone_scale();
52000
52001                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52002                            style
52003                        });
52004                        AnimationValue::Scale(computed)
52005                    },
52006                    LonghandId::TextIndent => {
52007                        // FIXME(emilio, bug 1533327): I think revert (and
52008                        // revert-layer) handling is not fine here, but what to
52009                        // do instead?
52010                        //
52011                        // Seems we'd need the computed value as if it was
52012                        // revert, somehow. Treating it as `unset` seems fine
52013                        // for now...
52014                        let style_struct = match declaration.keyword {
52015                            CSSWideKeyword::Initial => {
52016                                initial.get_inherited_text()
52017                            },
52018                            CSSWideKeyword::Revert |
52019                            CSSWideKeyword::RevertLayer |
52020                            CSSWideKeyword::Unset |
52021                            CSSWideKeyword::Inherit => {
52022                                context.builder
52023                                       .get_parent_inherited_text()
52024                            },
52025                        };
52026                        let computed = style_struct
52027                            .clone_text_indent();
52028
52029                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52030                            style
52031                        });
52032                        AnimationValue::TextIndent(computed)
52033                    },
52034                    LonghandId::TextOverflow => {
52035                        // FIXME(emilio, bug 1533327): I think revert (and
52036                        // revert-layer) handling is not fine here, but what to
52037                        // do instead?
52038                        //
52039                        // Seems we'd need the computed value as if it was
52040                        // revert, somehow. Treating it as `unset` seems fine
52041                        // for now...
52042                        let style_struct = match declaration.keyword {
52043                            CSSWideKeyword::Revert |
52044                            CSSWideKeyword::RevertLayer |
52045                            CSSWideKeyword::Unset |
52046                            CSSWideKeyword::Initial => {
52047                                initial.get_text()
52048                            },
52049                            CSSWideKeyword::Inherit => {
52050                                context.builder
52051                                       .get_parent_text()
52052                            },
52053                        };
52054                        let computed = style_struct
52055                            .clone_text_overflow();
52056
52057                        AnimationValue::TextOverflow(computed)
52058                    },
52059                    LonghandId::TextShadow => {
52060                        // FIXME(emilio, bug 1533327): I think revert (and
52061                        // revert-layer) handling is not fine here, but what to
52062                        // do instead?
52063                        //
52064                        // Seems we'd need the computed value as if it was
52065                        // revert, somehow. Treating it as `unset` seems fine
52066                        // for now...
52067                        let style_struct = match declaration.keyword {
52068                            CSSWideKeyword::Initial => {
52069                                initial.get_inherited_text()
52070                            },
52071                            CSSWideKeyword::Revert |
52072                            CSSWideKeyword::RevertLayer |
52073                            CSSWideKeyword::Unset |
52074                            CSSWideKeyword::Inherit => {
52075                                context.builder
52076                                       .get_parent_inherited_text()
52077                            },
52078                        };
52079                        let computed = style_struct
52080                            .clone_text_shadow();
52081
52082                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52083                            style
52084                        });
52085                        AnimationValue::TextShadow(computed)
52086                    },
52087                    LonghandId::Transform => {
52088                        // FIXME(emilio, bug 1533327): I think revert (and
52089                        // revert-layer) handling is not fine here, but what to
52090                        // do instead?
52091                        //
52092                        // Seems we'd need the computed value as if it was
52093                        // revert, somehow. Treating it as `unset` seems fine
52094                        // for now...
52095                        let style_struct = match declaration.keyword {
52096                            CSSWideKeyword::Revert |
52097                            CSSWideKeyword::RevertLayer |
52098                            CSSWideKeyword::Unset |
52099                            CSSWideKeyword::Initial => {
52100                                initial.get_box()
52101                            },
52102                            CSSWideKeyword::Inherit => {
52103                                context.builder
52104                                       .get_parent_box()
52105                            },
52106                        };
52107                        let computed = style_struct
52108                            .clone_transform();
52109
52110                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52111                            style
52112                        });
52113                        AnimationValue::Transform(computed)
52114                    },
52115                    LonghandId::TransformOrigin => {
52116                        // FIXME(emilio, bug 1533327): I think revert (and
52117                        // revert-layer) handling is not fine here, but what to
52118                        // do instead?
52119                        //
52120                        // Seems we'd need the computed value as if it was
52121                        // revert, somehow. Treating it as `unset` seems fine
52122                        // for now...
52123                        let style_struct = match declaration.keyword {
52124                            CSSWideKeyword::Revert |
52125                            CSSWideKeyword::RevertLayer |
52126                            CSSWideKeyword::Unset |
52127                            CSSWideKeyword::Initial => {
52128                                initial.get_box()
52129                            },
52130                            CSSWideKeyword::Inherit => {
52131                                context.builder
52132                                       .get_parent_box()
52133                            },
52134                        };
52135                        let computed = style_struct
52136                            .clone_transform_origin();
52137
52138                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52139                            style
52140                        });
52141                        AnimationValue::TransformOrigin(computed)
52142                    },
52143                    LonghandId::Translate => {
52144                        // FIXME(emilio, bug 1533327): I think revert (and
52145                        // revert-layer) handling is not fine here, but what to
52146                        // do instead?
52147                        //
52148                        // Seems we'd need the computed value as if it was
52149                        // revert, somehow. Treating it as `unset` seems fine
52150                        // for now...
52151                        let style_struct = match declaration.keyword {
52152                            CSSWideKeyword::Revert |
52153                            CSSWideKeyword::RevertLayer |
52154                            CSSWideKeyword::Unset |
52155                            CSSWideKeyword::Initial => {
52156                                initial.get_box()
52157                            },
52158                            CSSWideKeyword::Inherit => {
52159                                context.builder
52160                                       .get_parent_box()
52161                            },
52162                        };
52163                        let computed = style_struct
52164                            .clone_translate();
52165
52166                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52167                            style
52168                        });
52169                        AnimationValue::Translate(computed)
52170                    },
52171                    LonghandId::VerticalAlign => {
52172                        // FIXME(emilio, bug 1533327): I think revert (and
52173                        // revert-layer) handling is not fine here, but what to
52174                        // do instead?
52175                        //
52176                        // Seems we'd need the computed value as if it was
52177                        // revert, somehow. Treating it as `unset` seems fine
52178                        // for now...
52179                        let style_struct = match declaration.keyword {
52180                            CSSWideKeyword::Revert |
52181                            CSSWideKeyword::RevertLayer |
52182                            CSSWideKeyword::Unset |
52183                            CSSWideKeyword::Initial => {
52184                                initial.get_box()
52185                            },
52186                            CSSWideKeyword::Inherit => {
52187                                context.builder
52188                                       .get_parent_box()
52189                            },
52190                        };
52191                        let computed = style_struct
52192                            .clone_vertical_align();
52193
52194                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52195                            style
52196                        });
52197                        AnimationValue::VerticalAlign(computed)
52198                    },
52199                    LonghandId::ViewTransitionClass => {
52200                        // FIXME(emilio, bug 1533327): I think revert (and
52201                        // revert-layer) handling is not fine here, but what to
52202                        // do instead?
52203                        //
52204                        // Seems we'd need the computed value as if it was
52205                        // revert, somehow. Treating it as `unset` seems fine
52206                        // for now...
52207                        let style_struct = match declaration.keyword {
52208                            CSSWideKeyword::Revert |
52209                            CSSWideKeyword::RevertLayer |
52210                            CSSWideKeyword::Unset |
52211                            CSSWideKeyword::Initial => {
52212                                initial.get_ui()
52213                            },
52214                            CSSWideKeyword::Inherit => {
52215                                context.builder
52216                                       .get_parent_ui()
52217                            },
52218                        };
52219                        let computed = style_struct
52220                            .clone_view_transition_class();
52221
52222                        AnimationValue::ViewTransitionClass(computed)
52223                    },
52224                    LonghandId::ViewTransitionName => {
52225                        // FIXME(emilio, bug 1533327): I think revert (and
52226                        // revert-layer) handling is not fine here, but what to
52227                        // do instead?
52228                        //
52229                        // Seems we'd need the computed value as if it was
52230                        // revert, somehow. Treating it as `unset` seems fine
52231                        // for now...
52232                        let style_struct = match declaration.keyword {
52233                            CSSWideKeyword::Revert |
52234                            CSSWideKeyword::RevertLayer |
52235                            CSSWideKeyword::Unset |
52236                            CSSWideKeyword::Initial => {
52237                                initial.get_ui()
52238                            },
52239                            CSSWideKeyword::Inherit => {
52240                                context.builder
52241                                       .get_parent_ui()
52242                            },
52243                        };
52244                        let computed = style_struct
52245                            .clone_view_transition_name();
52246
52247                        AnimationValue::ViewTransitionName(computed)
52248                    },
52249                    LonghandId::WordSpacing => {
52250                        // FIXME(emilio, bug 1533327): I think revert (and
52251                        // revert-layer) handling is not fine here, but what to
52252                        // do instead?
52253                        //
52254                        // Seems we'd need the computed value as if it was
52255                        // revert, somehow. Treating it as `unset` seems fine
52256                        // for now...
52257                        let style_struct = match declaration.keyword {
52258                            CSSWideKeyword::Initial => {
52259                                initial.get_inherited_text()
52260                            },
52261                            CSSWideKeyword::Revert |
52262                            CSSWideKeyword::RevertLayer |
52263                            CSSWideKeyword::Unset |
52264                            CSSWideKeyword::Inherit => {
52265                                context.builder
52266                                       .get_parent_inherited_text()
52267                            },
52268                        };
52269                        let computed = style_struct
52270                            .clone_word_spacing();
52271
52272                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52273                            style
52274                        });
52275                        AnimationValue::WordSpacing(computed)
52276                    },
52277                    LonghandId::ObjectPosition => {
52278                        // FIXME(emilio, bug 1533327): I think revert (and
52279                        // revert-layer) handling is not fine here, but what to
52280                        // do instead?
52281                        //
52282                        // Seems we'd need the computed value as if it was
52283                        // revert, somehow. Treating it as `unset` seems fine
52284                        // for now...
52285                        let style_struct = match declaration.keyword {
52286                            CSSWideKeyword::Revert |
52287                            CSSWideKeyword::RevertLayer |
52288                            CSSWideKeyword::Unset |
52289                            CSSWideKeyword::Initial => {
52290                                initial.get_position()
52291                            },
52292                            CSSWideKeyword::Inherit => {
52293                                context.builder
52294                                       .get_parent_position()
52295                            },
52296                        };
52297                        let computed = style_struct
52298                            .clone_object_position();
52299
52300                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52301                            style
52302                        });
52303                        AnimationValue::ObjectPosition(computed)
52304                    },
52305                    LonghandId::PerspectiveOrigin => {
52306                        // FIXME(emilio, bug 1533327): I think revert (and
52307                        // revert-layer) handling is not fine here, but what to
52308                        // do instead?
52309                        //
52310                        // Seems we'd need the computed value as if it was
52311                        // revert, somehow. Treating it as `unset` seems fine
52312                        // for now...
52313                        let style_struct = match declaration.keyword {
52314                            CSSWideKeyword::Revert |
52315                            CSSWideKeyword::RevertLayer |
52316                            CSSWideKeyword::Unset |
52317                            CSSWideKeyword::Initial => {
52318                                initial.get_box()
52319                            },
52320                            CSSWideKeyword::Inherit => {
52321                                context.builder
52322                                       .get_parent_box()
52323                            },
52324                        };
52325                        let computed = style_struct
52326                            .clone_perspective_origin();
52327
52328                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52329                            style
52330                        });
52331                        AnimationValue::PerspectiveOrigin(computed)
52332                    },
52333                    LonghandId::GridTemplateColumns => {
52334                        // FIXME(emilio, bug 1533327): I think revert (and
52335                        // revert-layer) handling is not fine here, but what to
52336                        // do instead?
52337                        //
52338                        // Seems we'd need the computed value as if it was
52339                        // revert, somehow. Treating it as `unset` seems fine
52340                        // for now...
52341                        let style_struct = match declaration.keyword {
52342                            CSSWideKeyword::Revert |
52343                            CSSWideKeyword::RevertLayer |
52344                            CSSWideKeyword::Unset |
52345                            CSSWideKeyword::Initial => {
52346                                initial.get_position()
52347                            },
52348                            CSSWideKeyword::Inherit => {
52349                                context.builder
52350                                       .get_parent_position()
52351                            },
52352                        };
52353                        let computed = style_struct
52354                            .clone_grid_template_columns();
52355
52356                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52357                            style
52358                        });
52359                        AnimationValue::GridTemplateColumns(computed)
52360                    },
52361                    LonghandId::GridTemplateRows => {
52362                        // FIXME(emilio, bug 1533327): I think revert (and
52363                        // revert-layer) handling is not fine here, but what to
52364                        // do instead?
52365                        //
52366                        // Seems we'd need the computed value as if it was
52367                        // revert, somehow. Treating it as `unset` seems fine
52368                        // for now...
52369                        let style_struct = match declaration.keyword {
52370                            CSSWideKeyword::Revert |
52371                            CSSWideKeyword::RevertLayer |
52372                            CSSWideKeyword::Unset |
52373                            CSSWideKeyword::Initial => {
52374                                initial.get_position()
52375                            },
52376                            CSSWideKeyword::Inherit => {
52377                                context.builder
52378                                       .get_parent_position()
52379                            },
52380                        };
52381                        let computed = style_struct
52382                            .clone_grid_template_rows();
52383
52384                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52385                            style
52386                        });
52387                        AnimationValue::GridTemplateRows(computed)
52388                    },
52389                    LonghandId::BorderImageSource => {
52390                        // FIXME(emilio, bug 1533327): I think revert (and
52391                        // revert-layer) handling is not fine here, but what to
52392                        // do instead?
52393                        //
52394                        // Seems we'd need the computed value as if it was
52395                        // revert, somehow. Treating it as `unset` seems fine
52396                        // for now...
52397                        let style_struct = match declaration.keyword {
52398                            CSSWideKeyword::Revert |
52399                            CSSWideKeyword::RevertLayer |
52400                            CSSWideKeyword::Unset |
52401                            CSSWideKeyword::Initial => {
52402                                initial.get_border()
52403                            },
52404                            CSSWideKeyword::Inherit => {
52405                                context.builder
52406                                       .get_parent_border()
52407                            },
52408                        };
52409                        let computed = style_struct
52410                            .clone_border_image_source();
52411
52412                        AnimationValue::BorderImageSource(computed)
52413                    },
52414                    LonghandId::ListStyleImage => {
52415                        // FIXME(emilio, bug 1533327): I think revert (and
52416                        // revert-layer) handling is not fine here, but what to
52417                        // do instead?
52418                        //
52419                        // Seems we'd need the computed value as if it was
52420                        // revert, somehow. Treating it as `unset` seems fine
52421                        // for now...
52422                        let style_struct = match declaration.keyword {
52423                            CSSWideKeyword::Initial => {
52424                                initial.get_list()
52425                            },
52426                            CSSWideKeyword::Revert |
52427                            CSSWideKeyword::RevertLayer |
52428                            CSSWideKeyword::Unset |
52429                            CSSWideKeyword::Inherit => {
52430                                context.builder
52431                                       .get_parent_list()
52432                            },
52433                        };
52434                        let computed = style_struct
52435                            .clone_list_style_image();
52436
52437                        AnimationValue::ListStyleImage(computed)
52438                    },
52439                    LonghandId::GridAutoColumns => {
52440                        // FIXME(emilio, bug 1533327): I think revert (and
52441                        // revert-layer) handling is not fine here, but what to
52442                        // do instead?
52443                        //
52444                        // Seems we'd need the computed value as if it was
52445                        // revert, somehow. Treating it as `unset` seems fine
52446                        // for now...
52447                        let style_struct = match declaration.keyword {
52448                            CSSWideKeyword::Revert |
52449                            CSSWideKeyword::RevertLayer |
52450                            CSSWideKeyword::Unset |
52451                            CSSWideKeyword::Initial => {
52452                                initial.get_position()
52453                            },
52454                            CSSWideKeyword::Inherit => {
52455                                context.builder
52456                                       .get_parent_position()
52457                            },
52458                        };
52459                        let computed = style_struct
52460                            .clone_grid_auto_columns();
52461
52462                        AnimationValue::GridAutoColumns(computed)
52463                    },
52464                    LonghandId::GridAutoRows => {
52465                        // FIXME(emilio, bug 1533327): I think revert (and
52466                        // revert-layer) handling is not fine here, but what to
52467                        // do instead?
52468                        //
52469                        // Seems we'd need the computed value as if it was
52470                        // revert, somehow. Treating it as `unset` seems fine
52471                        // for now...
52472                        let style_struct = match declaration.keyword {
52473                            CSSWideKeyword::Revert |
52474                            CSSWideKeyword::RevertLayer |
52475                            CSSWideKeyword::Unset |
52476                            CSSWideKeyword::Initial => {
52477                                initial.get_position()
52478                            },
52479                            CSSWideKeyword::Inherit => {
52480                                context.builder
52481                                       .get_parent_position()
52482                            },
52483                        };
52484                        let computed = style_struct
52485                            .clone_grid_auto_rows();
52486
52487                        AnimationValue::GridAutoRows(computed)
52488                    },
52489                    LonghandId::OutlineOffset => {
52490                        // FIXME(emilio, bug 1533327): I think revert (and
52491                        // revert-layer) handling is not fine here, but what to
52492                        // do instead?
52493                        //
52494                        // Seems we'd need the computed value as if it was
52495                        // revert, somehow. Treating it as `unset` seems fine
52496                        // for now...
52497                        let style_struct = match declaration.keyword {
52498                            CSSWideKeyword::Revert |
52499                            CSSWideKeyword::RevertLayer |
52500                            CSSWideKeyword::Unset |
52501                            CSSWideKeyword::Initial => {
52502                                initial.get_outline()
52503                            },
52504                            CSSWideKeyword::Inherit => {
52505                                context.builder
52506                                       .get_parent_outline()
52507                            },
52508                        };
52509                        let computed = style_struct
52510                            .clone_outline_offset();
52511
52512                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52513                            style
52514                        });
52515                        AnimationValue::OutlineOffset(computed)
52516                    },
52517                    LonghandId::OverflowClipMargin => {
52518                        // FIXME(emilio, bug 1533327): I think revert (and
52519                        // revert-layer) handling is not fine here, but what to
52520                        // do instead?
52521                        //
52522                        // Seems we'd need the computed value as if it was
52523                        // revert, somehow. Treating it as `unset` seems fine
52524                        // for now...
52525                        let style_struct = match declaration.keyword {
52526                            CSSWideKeyword::Revert |
52527                            CSSWideKeyword::RevertLayer |
52528                            CSSWideKeyword::Unset |
52529                            CSSWideKeyword::Initial => {
52530                                initial.get_margin()
52531                            },
52532                            CSSWideKeyword::Inherit => {
52533                                context.builder
52534                                       .get_parent_margin()
52535                            },
52536                        };
52537                        let computed = style_struct
52538                            .clone_overflow_clip_margin();
52539
52540                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52541                            style
52542                        });
52543                        AnimationValue::OverflowClipMargin(computed)
52544                    },
52545                    LonghandId::ColumnGap => {
52546                        // FIXME(emilio, bug 1533327): I think revert (and
52547                        // revert-layer) handling is not fine here, but what to
52548                        // do instead?
52549                        //
52550                        // Seems we'd need the computed value as if it was
52551                        // revert, somehow. Treating it as `unset` seems fine
52552                        // for now...
52553                        let style_struct = match declaration.keyword {
52554                            CSSWideKeyword::Revert |
52555                            CSSWideKeyword::RevertLayer |
52556                            CSSWideKeyword::Unset |
52557                            CSSWideKeyword::Initial => {
52558                                initial.get_position()
52559                            },
52560                            CSSWideKeyword::Inherit => {
52561                                context.builder
52562                                       .get_parent_position()
52563                            },
52564                        };
52565                        let computed = style_struct
52566                            .clone_column_gap();
52567
52568                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52569                            style
52570                        });
52571                        AnimationValue::ColumnGap(computed)
52572                    },
52573                    LonghandId::RowGap => {
52574                        // FIXME(emilio, bug 1533327): I think revert (and
52575                        // revert-layer) handling is not fine here, but what to
52576                        // do instead?
52577                        //
52578                        // Seems we'd need the computed value as if it was
52579                        // revert, somehow. Treating it as `unset` seems fine
52580                        // for now...
52581                        let style_struct = match declaration.keyword {
52582                            CSSWideKeyword::Revert |
52583                            CSSWideKeyword::RevertLayer |
52584                            CSSWideKeyword::Unset |
52585                            CSSWideKeyword::Initial => {
52586                                initial.get_position()
52587                            },
52588                            CSSWideKeyword::Inherit => {
52589                                context.builder
52590                                       .get_parent_position()
52591                            },
52592                        };
52593                        let computed = style_struct
52594                            .clone_row_gap();
52595
52596                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52597                            style
52598                        });
52599                        AnimationValue::RowGap(computed)
52600                    },
52601                    LonghandId::GridColumnEnd => {
52602                        // FIXME(emilio, bug 1533327): I think revert (and
52603                        // revert-layer) handling is not fine here, but what to
52604                        // do instead?
52605                        //
52606                        // Seems we'd need the computed value as if it was
52607                        // revert, somehow. Treating it as `unset` seems fine
52608                        // for now...
52609                        let style_struct = match declaration.keyword {
52610                            CSSWideKeyword::Revert |
52611                            CSSWideKeyword::RevertLayer |
52612                            CSSWideKeyword::Unset |
52613                            CSSWideKeyword::Initial => {
52614                                initial.get_position()
52615                            },
52616                            CSSWideKeyword::Inherit => {
52617                                context.builder
52618                                       .get_parent_position()
52619                            },
52620                        };
52621                        let computed = style_struct
52622                            .clone_grid_column_end();
52623
52624                        AnimationValue::GridColumnEnd(computed)
52625                    },
52626                    LonghandId::GridColumnStart => {
52627                        // FIXME(emilio, bug 1533327): I think revert (and
52628                        // revert-layer) handling is not fine here, but what to
52629                        // do instead?
52630                        //
52631                        // Seems we'd need the computed value as if it was
52632                        // revert, somehow. Treating it as `unset` seems fine
52633                        // for now...
52634                        let style_struct = match declaration.keyword {
52635                            CSSWideKeyword::Revert |
52636                            CSSWideKeyword::RevertLayer |
52637                            CSSWideKeyword::Unset |
52638                            CSSWideKeyword::Initial => {
52639                                initial.get_position()
52640                            },
52641                            CSSWideKeyword::Inherit => {
52642                                context.builder
52643                                       .get_parent_position()
52644                            },
52645                        };
52646                        let computed = style_struct
52647                            .clone_grid_column_start();
52648
52649                        AnimationValue::GridColumnStart(computed)
52650                    },
52651                    LonghandId::GridRowEnd => {
52652                        // FIXME(emilio, bug 1533327): I think revert (and
52653                        // revert-layer) handling is not fine here, but what to
52654                        // do instead?
52655                        //
52656                        // Seems we'd need the computed value as if it was
52657                        // revert, somehow. Treating it as `unset` seems fine
52658                        // for now...
52659                        let style_struct = match declaration.keyword {
52660                            CSSWideKeyword::Revert |
52661                            CSSWideKeyword::RevertLayer |
52662                            CSSWideKeyword::Unset |
52663                            CSSWideKeyword::Initial => {
52664                                initial.get_position()
52665                            },
52666                            CSSWideKeyword::Inherit => {
52667                                context.builder
52668                                       .get_parent_position()
52669                            },
52670                        };
52671                        let computed = style_struct
52672                            .clone_grid_row_end();
52673
52674                        AnimationValue::GridRowEnd(computed)
52675                    },
52676                    LonghandId::GridRowStart => {
52677                        // FIXME(emilio, bug 1533327): I think revert (and
52678                        // revert-layer) handling is not fine here, but what to
52679                        // do instead?
52680                        //
52681                        // Seems we'd need the computed value as if it was
52682                        // revert, somehow. Treating it as `unset` seems fine
52683                        // for now...
52684                        let style_struct = match declaration.keyword {
52685                            CSSWideKeyword::Revert |
52686                            CSSWideKeyword::RevertLayer |
52687                            CSSWideKeyword::Unset |
52688                            CSSWideKeyword::Initial => {
52689                                initial.get_position()
52690                            },
52691                            CSSWideKeyword::Inherit => {
52692                                context.builder
52693                                       .get_parent_position()
52694                            },
52695                        };
52696                        let computed = style_struct
52697                            .clone_grid_row_start();
52698
52699                        AnimationValue::GridRowStart(computed)
52700                    },
52701                    LonghandId::MaxHeight => {
52702                        // FIXME(emilio, bug 1533327): I think revert (and
52703                        // revert-layer) handling is not fine here, but what to
52704                        // do instead?
52705                        //
52706                        // Seems we'd need the computed value as if it was
52707                        // revert, somehow. Treating it as `unset` seems fine
52708                        // for now...
52709                        let style_struct = match declaration.keyword {
52710                            CSSWideKeyword::Revert |
52711                            CSSWideKeyword::RevertLayer |
52712                            CSSWideKeyword::Unset |
52713                            CSSWideKeyword::Initial => {
52714                                initial.get_position()
52715                            },
52716                            CSSWideKeyword::Inherit => {
52717                                context.builder
52718                                       .get_parent_position()
52719                            },
52720                        };
52721                        let computed = style_struct
52722                            .clone_max_height();
52723
52724                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52725                            style
52726                        });
52727                        AnimationValue::MaxHeight(computed)
52728                    },
52729                    LonghandId::MaxWidth => {
52730                        // FIXME(emilio, bug 1533327): I think revert (and
52731                        // revert-layer) handling is not fine here, but what to
52732                        // do instead?
52733                        //
52734                        // Seems we'd need the computed value as if it was
52735                        // revert, somehow. Treating it as `unset` seems fine
52736                        // for now...
52737                        let style_struct = match declaration.keyword {
52738                            CSSWideKeyword::Revert |
52739                            CSSWideKeyword::RevertLayer |
52740                            CSSWideKeyword::Unset |
52741                            CSSWideKeyword::Initial => {
52742                                initial.get_position()
52743                            },
52744                            CSSWideKeyword::Inherit => {
52745                                context.builder
52746                                       .get_parent_position()
52747                            },
52748                        };
52749                        let computed = style_struct
52750                            .clone_max_width();
52751
52752                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52753                            style
52754                        });
52755                        AnimationValue::MaxWidth(computed)
52756                    },
52757                    LonghandId::BorderBottomLeftRadius => {
52758                        // FIXME(emilio, bug 1533327): I think revert (and
52759                        // revert-layer) handling is not fine here, but what to
52760                        // do instead?
52761                        //
52762                        // Seems we'd need the computed value as if it was
52763                        // revert, somehow. Treating it as `unset` seems fine
52764                        // for now...
52765                        let style_struct = match declaration.keyword {
52766                            CSSWideKeyword::Revert |
52767                            CSSWideKeyword::RevertLayer |
52768                            CSSWideKeyword::Unset |
52769                            CSSWideKeyword::Initial => {
52770                                initial.get_border()
52771                            },
52772                            CSSWideKeyword::Inherit => {
52773                                context.builder
52774                                       .get_parent_border()
52775                            },
52776                        };
52777                        let computed = style_struct
52778                            .clone_border_bottom_left_radius();
52779
52780                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52781                            style
52782                        });
52783                        AnimationValue::BorderBottomLeftRadius(computed)
52784                    },
52785                    LonghandId::BorderBottomRightRadius => {
52786                        // FIXME(emilio, bug 1533327): I think revert (and
52787                        // revert-layer) handling is not fine here, but what to
52788                        // do instead?
52789                        //
52790                        // Seems we'd need the computed value as if it was
52791                        // revert, somehow. Treating it as `unset` seems fine
52792                        // for now...
52793                        let style_struct = match declaration.keyword {
52794                            CSSWideKeyword::Revert |
52795                            CSSWideKeyword::RevertLayer |
52796                            CSSWideKeyword::Unset |
52797                            CSSWideKeyword::Initial => {
52798                                initial.get_border()
52799                            },
52800                            CSSWideKeyword::Inherit => {
52801                                context.builder
52802                                       .get_parent_border()
52803                            },
52804                        };
52805                        let computed = style_struct
52806                            .clone_border_bottom_right_radius();
52807
52808                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52809                            style
52810                        });
52811                        AnimationValue::BorderBottomRightRadius(computed)
52812                    },
52813                    LonghandId::BorderTopLeftRadius => {
52814                        // FIXME(emilio, bug 1533327): I think revert (and
52815                        // revert-layer) handling is not fine here, but what to
52816                        // do instead?
52817                        //
52818                        // Seems we'd need the computed value as if it was
52819                        // revert, somehow. Treating it as `unset` seems fine
52820                        // for now...
52821                        let style_struct = match declaration.keyword {
52822                            CSSWideKeyword::Revert |
52823                            CSSWideKeyword::RevertLayer |
52824                            CSSWideKeyword::Unset |
52825                            CSSWideKeyword::Initial => {
52826                                initial.get_border()
52827                            },
52828                            CSSWideKeyword::Inherit => {
52829                                context.builder
52830                                       .get_parent_border()
52831                            },
52832                        };
52833                        let computed = style_struct
52834                            .clone_border_top_left_radius();
52835
52836                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52837                            style
52838                        });
52839                        AnimationValue::BorderTopLeftRadius(computed)
52840                    },
52841                    LonghandId::BorderTopRightRadius => {
52842                        // FIXME(emilio, bug 1533327): I think revert (and
52843                        // revert-layer) handling is not fine here, but what to
52844                        // do instead?
52845                        //
52846                        // Seems we'd need the computed value as if it was
52847                        // revert, somehow. Treating it as `unset` seems fine
52848                        // for now...
52849                        let style_struct = match declaration.keyword {
52850                            CSSWideKeyword::Revert |
52851                            CSSWideKeyword::RevertLayer |
52852                            CSSWideKeyword::Unset |
52853                            CSSWideKeyword::Initial => {
52854                                initial.get_border()
52855                            },
52856                            CSSWideKeyword::Inherit => {
52857                                context.builder
52858                                       .get_parent_border()
52859                            },
52860                        };
52861                        let computed = style_struct
52862                            .clone_border_top_right_radius();
52863
52864                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52865                            style
52866                        });
52867                        AnimationValue::BorderTopRightRadius(computed)
52868                    },
52869                    LonghandId::Bottom => {
52870                        // FIXME(emilio, bug 1533327): I think revert (and
52871                        // revert-layer) handling is not fine here, but what to
52872                        // do instead?
52873                        //
52874                        // Seems we'd need the computed value as if it was
52875                        // revert, somehow. Treating it as `unset` seems fine
52876                        // for now...
52877                        let style_struct = match declaration.keyword {
52878                            CSSWideKeyword::Revert |
52879                            CSSWideKeyword::RevertLayer |
52880                            CSSWideKeyword::Unset |
52881                            CSSWideKeyword::Initial => {
52882                                initial.get_position()
52883                            },
52884                            CSSWideKeyword::Inherit => {
52885                                context.builder
52886                                       .get_parent_position()
52887                            },
52888                        };
52889                        let computed = style_struct
52890                            .clone_bottom();
52891
52892                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52893                            style
52894                        });
52895                        AnimationValue::Bottom(computed)
52896                    },
52897                    LonghandId::Left => {
52898                        // FIXME(emilio, bug 1533327): I think revert (and
52899                        // revert-layer) handling is not fine here, but what to
52900                        // do instead?
52901                        //
52902                        // Seems we'd need the computed value as if it was
52903                        // revert, somehow. Treating it as `unset` seems fine
52904                        // for now...
52905                        let style_struct = match declaration.keyword {
52906                            CSSWideKeyword::Revert |
52907                            CSSWideKeyword::RevertLayer |
52908                            CSSWideKeyword::Unset |
52909                            CSSWideKeyword::Initial => {
52910                                initial.get_position()
52911                            },
52912                            CSSWideKeyword::Inherit => {
52913                                context.builder
52914                                       .get_parent_position()
52915                            },
52916                        };
52917                        let computed = style_struct
52918                            .clone_left();
52919
52920                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52921                            style
52922                        });
52923                        AnimationValue::Left(computed)
52924                    },
52925                    LonghandId::Right => {
52926                        // FIXME(emilio, bug 1533327): I think revert (and
52927                        // revert-layer) handling is not fine here, but what to
52928                        // do instead?
52929                        //
52930                        // Seems we'd need the computed value as if it was
52931                        // revert, somehow. Treating it as `unset` seems fine
52932                        // for now...
52933                        let style_struct = match declaration.keyword {
52934                            CSSWideKeyword::Revert |
52935                            CSSWideKeyword::RevertLayer |
52936                            CSSWideKeyword::Unset |
52937                            CSSWideKeyword::Initial => {
52938                                initial.get_position()
52939                            },
52940                            CSSWideKeyword::Inherit => {
52941                                context.builder
52942                                       .get_parent_position()
52943                            },
52944                        };
52945                        let computed = style_struct
52946                            .clone_right();
52947
52948                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52949                            style
52950                        });
52951                        AnimationValue::Right(computed)
52952                    },
52953                    LonghandId::Top => {
52954                        // FIXME(emilio, bug 1533327): I think revert (and
52955                        // revert-layer) handling is not fine here, but what to
52956                        // do instead?
52957                        //
52958                        // Seems we'd need the computed value as if it was
52959                        // revert, somehow. Treating it as `unset` seems fine
52960                        // for now...
52961                        let style_struct = match declaration.keyword {
52962                            CSSWideKeyword::Revert |
52963                            CSSWideKeyword::RevertLayer |
52964                            CSSWideKeyword::Unset |
52965                            CSSWideKeyword::Initial => {
52966                                initial.get_position()
52967                            },
52968                            CSSWideKeyword::Inherit => {
52969                                context.builder
52970                                       .get_parent_position()
52971                            },
52972                        };
52973                        let computed = style_struct
52974                            .clone_top();
52975
52976                        let computed = computed.to_animated_value(&crate::values::animated::Context {
52977                            style
52978                        });
52979                        AnimationValue::Top(computed)
52980                    },
52981                    LonghandId::MarginBottom => {
52982                        // FIXME(emilio, bug 1533327): I think revert (and
52983                        // revert-layer) handling is not fine here, but what to
52984                        // do instead?
52985                        //
52986                        // Seems we'd need the computed value as if it was
52987                        // revert, somehow. Treating it as `unset` seems fine
52988                        // for now...
52989                        let style_struct = match declaration.keyword {
52990                            CSSWideKeyword::Revert |
52991                            CSSWideKeyword::RevertLayer |
52992                            CSSWideKeyword::Unset |
52993                            CSSWideKeyword::Initial => {
52994                                initial.get_margin()
52995                            },
52996                            CSSWideKeyword::Inherit => {
52997                                context.builder
52998                                       .get_parent_margin()
52999                            },
53000                        };
53001                        let computed = style_struct
53002                            .clone_margin_bottom();
53003
53004                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53005                            style
53006                        });
53007                        AnimationValue::MarginBottom(computed)
53008                    },
53009                    LonghandId::MarginLeft => {
53010                        // FIXME(emilio, bug 1533327): I think revert (and
53011                        // revert-layer) handling is not fine here, but what to
53012                        // do instead?
53013                        //
53014                        // Seems we'd need the computed value as if it was
53015                        // revert, somehow. Treating it as `unset` seems fine
53016                        // for now...
53017                        let style_struct = match declaration.keyword {
53018                            CSSWideKeyword::Revert |
53019                            CSSWideKeyword::RevertLayer |
53020                            CSSWideKeyword::Unset |
53021                            CSSWideKeyword::Initial => {
53022                                initial.get_margin()
53023                            },
53024                            CSSWideKeyword::Inherit => {
53025                                context.builder
53026                                       .get_parent_margin()
53027                            },
53028                        };
53029                        let computed = style_struct
53030                            .clone_margin_left();
53031
53032                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53033                            style
53034                        });
53035                        AnimationValue::MarginLeft(computed)
53036                    },
53037                    LonghandId::MarginRight => {
53038                        // FIXME(emilio, bug 1533327): I think revert (and
53039                        // revert-layer) handling is not fine here, but what to
53040                        // do instead?
53041                        //
53042                        // Seems we'd need the computed value as if it was
53043                        // revert, somehow. Treating it as `unset` seems fine
53044                        // for now...
53045                        let style_struct = match declaration.keyword {
53046                            CSSWideKeyword::Revert |
53047                            CSSWideKeyword::RevertLayer |
53048                            CSSWideKeyword::Unset |
53049                            CSSWideKeyword::Initial => {
53050                                initial.get_margin()
53051                            },
53052                            CSSWideKeyword::Inherit => {
53053                                context.builder
53054                                       .get_parent_margin()
53055                            },
53056                        };
53057                        let computed = style_struct
53058                            .clone_margin_right();
53059
53060                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53061                            style
53062                        });
53063                        AnimationValue::MarginRight(computed)
53064                    },
53065                    LonghandId::MarginTop => {
53066                        // FIXME(emilio, bug 1533327): I think revert (and
53067                        // revert-layer) handling is not fine here, but what to
53068                        // do instead?
53069                        //
53070                        // Seems we'd need the computed value as if it was
53071                        // revert, somehow. Treating it as `unset` seems fine
53072                        // for now...
53073                        let style_struct = match declaration.keyword {
53074                            CSSWideKeyword::Revert |
53075                            CSSWideKeyword::RevertLayer |
53076                            CSSWideKeyword::Unset |
53077                            CSSWideKeyword::Initial => {
53078                                initial.get_margin()
53079                            },
53080                            CSSWideKeyword::Inherit => {
53081                                context.builder
53082                                       .get_parent_margin()
53083                            },
53084                        };
53085                        let computed = style_struct
53086                            .clone_margin_top();
53087
53088                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53089                            style
53090                        });
53091                        AnimationValue::MarginTop(computed)
53092                    },
53093                    LonghandId::PaddingBottom => {
53094                        // FIXME(emilio, bug 1533327): I think revert (and
53095                        // revert-layer) handling is not fine here, but what to
53096                        // do instead?
53097                        //
53098                        // Seems we'd need the computed value as if it was
53099                        // revert, somehow. Treating it as `unset` seems fine
53100                        // for now...
53101                        let style_struct = match declaration.keyword {
53102                            CSSWideKeyword::Revert |
53103                            CSSWideKeyword::RevertLayer |
53104                            CSSWideKeyword::Unset |
53105                            CSSWideKeyword::Initial => {
53106                                initial.get_padding()
53107                            },
53108                            CSSWideKeyword::Inherit => {
53109                                context.builder
53110                                       .get_parent_padding()
53111                            },
53112                        };
53113                        let computed = style_struct
53114                            .clone_padding_bottom();
53115
53116                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53117                            style
53118                        });
53119                        AnimationValue::PaddingBottom(computed)
53120                    },
53121                    LonghandId::PaddingLeft => {
53122                        // FIXME(emilio, bug 1533327): I think revert (and
53123                        // revert-layer) handling is not fine here, but what to
53124                        // do instead?
53125                        //
53126                        // Seems we'd need the computed value as if it was
53127                        // revert, somehow. Treating it as `unset` seems fine
53128                        // for now...
53129                        let style_struct = match declaration.keyword {
53130                            CSSWideKeyword::Revert |
53131                            CSSWideKeyword::RevertLayer |
53132                            CSSWideKeyword::Unset |
53133                            CSSWideKeyword::Initial => {
53134                                initial.get_padding()
53135                            },
53136                            CSSWideKeyword::Inherit => {
53137                                context.builder
53138                                       .get_parent_padding()
53139                            },
53140                        };
53141                        let computed = style_struct
53142                            .clone_padding_left();
53143
53144                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53145                            style
53146                        });
53147                        AnimationValue::PaddingLeft(computed)
53148                    },
53149                    LonghandId::PaddingRight => {
53150                        // FIXME(emilio, bug 1533327): I think revert (and
53151                        // revert-layer) handling is not fine here, but what to
53152                        // do instead?
53153                        //
53154                        // Seems we'd need the computed value as if it was
53155                        // revert, somehow. Treating it as `unset` seems fine
53156                        // for now...
53157                        let style_struct = match declaration.keyword {
53158                            CSSWideKeyword::Revert |
53159                            CSSWideKeyword::RevertLayer |
53160                            CSSWideKeyword::Unset |
53161                            CSSWideKeyword::Initial => {
53162                                initial.get_padding()
53163                            },
53164                            CSSWideKeyword::Inherit => {
53165                                context.builder
53166                                       .get_parent_padding()
53167                            },
53168                        };
53169                        let computed = style_struct
53170                            .clone_padding_right();
53171
53172                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53173                            style
53174                        });
53175                        AnimationValue::PaddingRight(computed)
53176                    },
53177                    LonghandId::PaddingTop => {
53178                        // FIXME(emilio, bug 1533327): I think revert (and
53179                        // revert-layer) handling is not fine here, but what to
53180                        // do instead?
53181                        //
53182                        // Seems we'd need the computed value as if it was
53183                        // revert, somehow. Treating it as `unset` seems fine
53184                        // for now...
53185                        let style_struct = match declaration.keyword {
53186                            CSSWideKeyword::Revert |
53187                            CSSWideKeyword::RevertLayer |
53188                            CSSWideKeyword::Unset |
53189                            CSSWideKeyword::Initial => {
53190                                initial.get_padding()
53191                            },
53192                            CSSWideKeyword::Inherit => {
53193                                context.builder
53194                                       .get_parent_padding()
53195                            },
53196                        };
53197                        let computed = style_struct
53198                            .clone_padding_top();
53199
53200                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53201                            style
53202                        });
53203                        AnimationValue::PaddingTop(computed)
53204                    },
53205                    LonghandId::Height => {
53206                        // FIXME(emilio, bug 1533327): I think revert (and
53207                        // revert-layer) handling is not fine here, but what to
53208                        // do instead?
53209                        //
53210                        // Seems we'd need the computed value as if it was
53211                        // revert, somehow. Treating it as `unset` seems fine
53212                        // for now...
53213                        let style_struct = match declaration.keyword {
53214                            CSSWideKeyword::Revert |
53215                            CSSWideKeyword::RevertLayer |
53216                            CSSWideKeyword::Unset |
53217                            CSSWideKeyword::Initial => {
53218                                initial.get_position()
53219                            },
53220                            CSSWideKeyword::Inherit => {
53221                                context.builder
53222                                       .get_parent_position()
53223                            },
53224                        };
53225                        let computed = style_struct
53226                            .clone_height();
53227
53228                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53229                            style
53230                        });
53231                        AnimationValue::Height(computed)
53232                    },
53233                    LonghandId::MinHeight => {
53234                        // FIXME(emilio, bug 1533327): I think revert (and
53235                        // revert-layer) handling is not fine here, but what to
53236                        // do instead?
53237                        //
53238                        // Seems we'd need the computed value as if it was
53239                        // revert, somehow. Treating it as `unset` seems fine
53240                        // for now...
53241                        let style_struct = match declaration.keyword {
53242                            CSSWideKeyword::Revert |
53243                            CSSWideKeyword::RevertLayer |
53244                            CSSWideKeyword::Unset |
53245                            CSSWideKeyword::Initial => {
53246                                initial.get_position()
53247                            },
53248                            CSSWideKeyword::Inherit => {
53249                                context.builder
53250                                       .get_parent_position()
53251                            },
53252                        };
53253                        let computed = style_struct
53254                            .clone_min_height();
53255
53256                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53257                            style
53258                        });
53259                        AnimationValue::MinHeight(computed)
53260                    },
53261                    LonghandId::MinWidth => {
53262                        // FIXME(emilio, bug 1533327): I think revert (and
53263                        // revert-layer) handling is not fine here, but what to
53264                        // do instead?
53265                        //
53266                        // Seems we'd need the computed value as if it was
53267                        // revert, somehow. Treating it as `unset` seems fine
53268                        // for now...
53269                        let style_struct = match declaration.keyword {
53270                            CSSWideKeyword::Revert |
53271                            CSSWideKeyword::RevertLayer |
53272                            CSSWideKeyword::Unset |
53273                            CSSWideKeyword::Initial => {
53274                                initial.get_position()
53275                            },
53276                            CSSWideKeyword::Inherit => {
53277                                context.builder
53278                                       .get_parent_position()
53279                            },
53280                        };
53281                        let computed = style_struct
53282                            .clone_min_width();
53283
53284                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53285                            style
53286                        });
53287                        AnimationValue::MinWidth(computed)
53288                    },
53289                    LonghandId::Width => {
53290                        // FIXME(emilio, bug 1533327): I think revert (and
53291                        // revert-layer) handling is not fine here, but what to
53292                        // do instead?
53293                        //
53294                        // Seems we'd need the computed value as if it was
53295                        // revert, somehow. Treating it as `unset` seems fine
53296                        // for now...
53297                        let style_struct = match declaration.keyword {
53298                            CSSWideKeyword::Revert |
53299                            CSSWideKeyword::RevertLayer |
53300                            CSSWideKeyword::Unset |
53301                            CSSWideKeyword::Initial => {
53302                                initial.get_position()
53303                            },
53304                            CSSWideKeyword::Inherit => {
53305                                context.builder
53306                                       .get_parent_position()
53307                            },
53308                        };
53309                        let computed = style_struct
53310                            .clone_width();
53311
53312                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53313                            style
53314                        });
53315                        AnimationValue::Width(computed)
53316                    },
53317                    LonghandId::BorderBottomWidth => {
53318                        // FIXME(emilio, bug 1533327): I think revert (and
53319                        // revert-layer) handling is not fine here, but what to
53320                        // do instead?
53321                        //
53322                        // Seems we'd need the computed value as if it was
53323                        // revert, somehow. Treating it as `unset` seems fine
53324                        // for now...
53325                        let style_struct = match declaration.keyword {
53326                            CSSWideKeyword::Revert |
53327                            CSSWideKeyword::RevertLayer |
53328                            CSSWideKeyword::Unset |
53329                            CSSWideKeyword::Initial => {
53330                                initial.get_border()
53331                            },
53332                            CSSWideKeyword::Inherit => {
53333                                context.builder
53334                                       .get_parent_border()
53335                            },
53336                        };
53337                        let computed = style_struct
53338                            .clone_border_bottom_width();
53339
53340                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53341                            style
53342                        });
53343                        AnimationValue::BorderBottomWidth(computed)
53344                    },
53345                    LonghandId::BorderLeftWidth => {
53346                        // FIXME(emilio, bug 1533327): I think revert (and
53347                        // revert-layer) handling is not fine here, but what to
53348                        // do instead?
53349                        //
53350                        // Seems we'd need the computed value as if it was
53351                        // revert, somehow. Treating it as `unset` seems fine
53352                        // for now...
53353                        let style_struct = match declaration.keyword {
53354                            CSSWideKeyword::Revert |
53355                            CSSWideKeyword::RevertLayer |
53356                            CSSWideKeyword::Unset |
53357                            CSSWideKeyword::Initial => {
53358                                initial.get_border()
53359                            },
53360                            CSSWideKeyword::Inherit => {
53361                                context.builder
53362                                       .get_parent_border()
53363                            },
53364                        };
53365                        let computed = style_struct
53366                            .clone_border_left_width();
53367
53368                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53369                            style
53370                        });
53371                        AnimationValue::BorderLeftWidth(computed)
53372                    },
53373                    LonghandId::BorderRightWidth => {
53374                        // FIXME(emilio, bug 1533327): I think revert (and
53375                        // revert-layer) handling is not fine here, but what to
53376                        // do instead?
53377                        //
53378                        // Seems we'd need the computed value as if it was
53379                        // revert, somehow. Treating it as `unset` seems fine
53380                        // for now...
53381                        let style_struct = match declaration.keyword {
53382                            CSSWideKeyword::Revert |
53383                            CSSWideKeyword::RevertLayer |
53384                            CSSWideKeyword::Unset |
53385                            CSSWideKeyword::Initial => {
53386                                initial.get_border()
53387                            },
53388                            CSSWideKeyword::Inherit => {
53389                                context.builder
53390                                       .get_parent_border()
53391                            },
53392                        };
53393                        let computed = style_struct
53394                            .clone_border_right_width();
53395
53396                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53397                            style
53398                        });
53399                        AnimationValue::BorderRightWidth(computed)
53400                    },
53401                    LonghandId::BorderTopWidth => {
53402                        // FIXME(emilio, bug 1533327): I think revert (and
53403                        // revert-layer) handling is not fine here, but what to
53404                        // do instead?
53405                        //
53406                        // Seems we'd need the computed value as if it was
53407                        // revert, somehow. Treating it as `unset` seems fine
53408                        // for now...
53409                        let style_struct = match declaration.keyword {
53410                            CSSWideKeyword::Revert |
53411                            CSSWideKeyword::RevertLayer |
53412                            CSSWideKeyword::Unset |
53413                            CSSWideKeyword::Initial => {
53414                                initial.get_border()
53415                            },
53416                            CSSWideKeyword::Inherit => {
53417                                context.builder
53418                                       .get_parent_border()
53419                            },
53420                        };
53421                        let computed = style_struct
53422                            .clone_border_top_width();
53423
53424                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53425                            style
53426                        });
53427                        AnimationValue::BorderTopWidth(computed)
53428                    },
53429                    LonghandId::OutlineWidth => {
53430                        // FIXME(emilio, bug 1533327): I think revert (and
53431                        // revert-layer) handling is not fine here, but what to
53432                        // do instead?
53433                        //
53434                        // Seems we'd need the computed value as if it was
53435                        // revert, somehow. Treating it as `unset` seems fine
53436                        // for now...
53437                        let style_struct = match declaration.keyword {
53438                            CSSWideKeyword::Revert |
53439                            CSSWideKeyword::RevertLayer |
53440                            CSSWideKeyword::Unset |
53441                            CSSWideKeyword::Initial => {
53442                                initial.get_outline()
53443                            },
53444                            CSSWideKeyword::Inherit => {
53445                                context.builder
53446                                       .get_parent_outline()
53447                            },
53448                        };
53449                        let computed = style_struct
53450                            .clone_outline_width();
53451
53452                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53453                            style
53454                        });
53455                        AnimationValue::OutlineWidth(computed)
53456                    },
53457                    LonghandId::BackgroundColor => {
53458                        // FIXME(emilio, bug 1533327): I think revert (and
53459                        // revert-layer) handling is not fine here, but what to
53460                        // do instead?
53461                        //
53462                        // Seems we'd need the computed value as if it was
53463                        // revert, somehow. Treating it as `unset` seems fine
53464                        // for now...
53465                        let style_struct = match declaration.keyword {
53466                            CSSWideKeyword::Revert |
53467                            CSSWideKeyword::RevertLayer |
53468                            CSSWideKeyword::Unset |
53469                            CSSWideKeyword::Initial => {
53470                                initial.get_background()
53471                            },
53472                            CSSWideKeyword::Inherit => {
53473                                context.builder
53474                                       .get_parent_background()
53475                            },
53476                        };
53477                        let computed = style_struct
53478                            .clone_background_color();
53479
53480                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53481                            style
53482                        });
53483                        AnimationValue::BackgroundColor(computed)
53484                    },
53485                    LonghandId::BorderBottomColor => {
53486                        // FIXME(emilio, bug 1533327): I think revert (and
53487                        // revert-layer) handling is not fine here, but what to
53488                        // do instead?
53489                        //
53490                        // Seems we'd need the computed value as if it was
53491                        // revert, somehow. Treating it as `unset` seems fine
53492                        // for now...
53493                        let style_struct = match declaration.keyword {
53494                            CSSWideKeyword::Revert |
53495                            CSSWideKeyword::RevertLayer |
53496                            CSSWideKeyword::Unset |
53497                            CSSWideKeyword::Initial => {
53498                                initial.get_border()
53499                            },
53500                            CSSWideKeyword::Inherit => {
53501                                context.builder
53502                                       .get_parent_border()
53503                            },
53504                        };
53505                        let computed = style_struct
53506                            .clone_border_bottom_color();
53507
53508                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53509                            style
53510                        });
53511                        AnimationValue::BorderBottomColor(computed)
53512                    },
53513                    LonghandId::BorderLeftColor => {
53514                        // FIXME(emilio, bug 1533327): I think revert (and
53515                        // revert-layer) handling is not fine here, but what to
53516                        // do instead?
53517                        //
53518                        // Seems we'd need the computed value as if it was
53519                        // revert, somehow. Treating it as `unset` seems fine
53520                        // for now...
53521                        let style_struct = match declaration.keyword {
53522                            CSSWideKeyword::Revert |
53523                            CSSWideKeyword::RevertLayer |
53524                            CSSWideKeyword::Unset |
53525                            CSSWideKeyword::Initial => {
53526                                initial.get_border()
53527                            },
53528                            CSSWideKeyword::Inherit => {
53529                                context.builder
53530                                       .get_parent_border()
53531                            },
53532                        };
53533                        let computed = style_struct
53534                            .clone_border_left_color();
53535
53536                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53537                            style
53538                        });
53539                        AnimationValue::BorderLeftColor(computed)
53540                    },
53541                    LonghandId::BorderRightColor => {
53542                        // FIXME(emilio, bug 1533327): I think revert (and
53543                        // revert-layer) handling is not fine here, but what to
53544                        // do instead?
53545                        //
53546                        // Seems we'd need the computed value as if it was
53547                        // revert, somehow. Treating it as `unset` seems fine
53548                        // for now...
53549                        let style_struct = match declaration.keyword {
53550                            CSSWideKeyword::Revert |
53551                            CSSWideKeyword::RevertLayer |
53552                            CSSWideKeyword::Unset |
53553                            CSSWideKeyword::Initial => {
53554                                initial.get_border()
53555                            },
53556                            CSSWideKeyword::Inherit => {
53557                                context.builder
53558                                       .get_parent_border()
53559                            },
53560                        };
53561                        let computed = style_struct
53562                            .clone_border_right_color();
53563
53564                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53565                            style
53566                        });
53567                        AnimationValue::BorderRightColor(computed)
53568                    },
53569                    LonghandId::BorderTopColor => {
53570                        // FIXME(emilio, bug 1533327): I think revert (and
53571                        // revert-layer) handling is not fine here, but what to
53572                        // do instead?
53573                        //
53574                        // Seems we'd need the computed value as if it was
53575                        // revert, somehow. Treating it as `unset` seems fine
53576                        // for now...
53577                        let style_struct = match declaration.keyword {
53578                            CSSWideKeyword::Revert |
53579                            CSSWideKeyword::RevertLayer |
53580                            CSSWideKeyword::Unset |
53581                            CSSWideKeyword::Initial => {
53582                                initial.get_border()
53583                            },
53584                            CSSWideKeyword::Inherit => {
53585                                context.builder
53586                                       .get_parent_border()
53587                            },
53588                        };
53589                        let computed = style_struct
53590                            .clone_border_top_color();
53591
53592                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53593                            style
53594                        });
53595                        AnimationValue::BorderTopColor(computed)
53596                    },
53597                    LonghandId::OutlineColor => {
53598                        // FIXME(emilio, bug 1533327): I think revert (and
53599                        // revert-layer) handling is not fine here, but what to
53600                        // do instead?
53601                        //
53602                        // Seems we'd need the computed value as if it was
53603                        // revert, somehow. Treating it as `unset` seems fine
53604                        // for now...
53605                        let style_struct = match declaration.keyword {
53606                            CSSWideKeyword::Revert |
53607                            CSSWideKeyword::RevertLayer |
53608                            CSSWideKeyword::Unset |
53609                            CSSWideKeyword::Initial => {
53610                                initial.get_outline()
53611                            },
53612                            CSSWideKeyword::Inherit => {
53613                                context.builder
53614                                       .get_parent_outline()
53615                            },
53616                        };
53617                        let computed = style_struct
53618                            .clone_outline_color();
53619
53620                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53621                            style
53622                        });
53623                        AnimationValue::OutlineColor(computed)
53624                    },
53625                    LonghandId::TextDecorationColor => {
53626                        // FIXME(emilio, bug 1533327): I think revert (and
53627                        // revert-layer) handling is not fine here, but what to
53628                        // do instead?
53629                        //
53630                        // Seems we'd need the computed value as if it was
53631                        // revert, somehow. Treating it as `unset` seems fine
53632                        // for now...
53633                        let style_struct = match declaration.keyword {
53634                            CSSWideKeyword::Revert |
53635                            CSSWideKeyword::RevertLayer |
53636                            CSSWideKeyword::Unset |
53637                            CSSWideKeyword::Initial => {
53638                                initial.get_text()
53639                            },
53640                            CSSWideKeyword::Inherit => {
53641                                context.builder
53642                                       .get_parent_text()
53643                            },
53644                        };
53645                        let computed = style_struct
53646                            .clone_text_decoration_color();
53647
53648                        let computed = computed.to_animated_value(&crate::values::animated::Context {
53649                            style
53650                        });
53651                        AnimationValue::TextDecorationColor(computed)
53652                    },
53653                    LonghandId::Contain => return None,
53654                    LonghandId::ContainerType => return None,
53655                    LonghandId::Direction => return None,
53656                    LonghandId::ServoOverflowClipBox => return None,
53657                    LonghandId::ServoTopLayer => return None,
53658                    LonghandId::UnicodeBidi => return None,
53659                    LonghandId::WritingMode => return None,
53660                    LonghandId::OverflowBlock => return None,
53661                    LonghandId::OverflowInline => return None,
53662                    LonghandId::BorderBlockEndStyle => return None,
53663                    LonghandId::BorderBlockStartStyle => return None,
53664                    LonghandId::BorderInlineEndStyle => return None,
53665                    LonghandId::BorderInlineStartStyle => return None,
53666                    LonghandId::AnimationComposition => return None,
53667                    LonghandId::AnimationDelay => return None,
53668                    LonghandId::AnimationDirection => return None,
53669                    LonghandId::AnimationDuration => return None,
53670                    LonghandId::AnimationFillMode => return None,
53671                    LonghandId::AnimationIterationCount => return None,
53672                    LonghandId::AnimationName => return None,
53673                    LonghandId::AnimationPlayState => return None,
53674                    LonghandId::AnimationTimeline => return None,
53675                    LonghandId::AnimationTimingFunction => return None,
53676                    LonghandId::ContainerName => return None,
53677                    LonghandId::TransitionBehavior => return None,
53678                    LonghandId::TransitionDelay => return None,
53679                    LonghandId::TransitionDuration => return None,
53680                    LonghandId::TransitionProperty => return None,
53681                    LonghandId::TransitionTimingFunction => return None,
53682                    LonghandId::WillChange => return None,
53683                    LonghandId::XLang => return None,
53684                    LonghandId::MaxBlockSize => return None,
53685                    LonghandId::MaxInlineSize => return None,
53686                    LonghandId::BorderEndEndRadius => return None,
53687                    LonghandId::BorderEndStartRadius => return None,
53688                    LonghandId::BorderStartEndRadius => return None,
53689                    LonghandId::BorderStartStartRadius => return None,
53690                    LonghandId::InsetBlockEnd => return None,
53691                    LonghandId::InsetBlockStart => return None,
53692                    LonghandId::InsetInlineEnd => return None,
53693                    LonghandId::InsetInlineStart => return None,
53694                    LonghandId::MarginBlockEnd => return None,
53695                    LonghandId::MarginBlockStart => return None,
53696                    LonghandId::MarginInlineEnd => return None,
53697                    LonghandId::MarginInlineStart => return None,
53698                    LonghandId::PaddingBlockEnd => return None,
53699                    LonghandId::PaddingBlockStart => return None,
53700                    LonghandId::PaddingInlineEnd => return None,
53701                    LonghandId::PaddingInlineStart => return None,
53702                    LonghandId::BlockSize => return None,
53703                    LonghandId::InlineSize => return None,
53704                    LonghandId::MinBlockSize => return None,
53705                    LonghandId::MinInlineSize => return None,
53706                    LonghandId::BorderBlockEndWidth => return None,
53707                    LonghandId::BorderBlockStartWidth => return None,
53708                    LonghandId::BorderInlineEndWidth => return None,
53709                    LonghandId::BorderInlineStartWidth => return None,
53710                    LonghandId::BorderBlockEndColor => return None,
53711                    LonghandId::BorderBlockStartColor => return None,
53712                    LonghandId::BorderInlineEndColor => return None,
53713                    LonghandId::BorderInlineStartColor => return None,
53714                }
53715            },
53716            PropertyDeclaration::WithVariables(ref declaration) => {
53717                let mut cache = Default::default();
53718                let substituted = {
53719                    let custom_properties = &context.style().custom_properties();
53720
53721                    debug_assert!(
53722                        context.builder.stylist.is_some(),
53723                        "Need a Stylist to substitute variables!"
53724                    );
53725                    declaration.value.substitute_variables(
53726                        declaration.id,
53727                        custom_properties,
53728                        context.builder.stylist.unwrap(),
53729                        context,
53730                        &mut cache,
53731                    )
53732                };
53733                return AnimationValue::from_declaration(
53734                    &substituted,
53735                    context,
53736                    style,
53737                    initial,
53738                )
53739            },
53740            PropertyDeclaration::Custom(ref declaration) => {
53741                AnimationValue::Custom(CustomAnimatedValue::from_declaration(
53742                    declaration,
53743                    context,
53744                    initial,
53745                )?)
53746            },
53747            _ => return None // non animatable properties will get included because of shorthands. ignore.
53748        };
53749        Some(animatable)
53750    }
53751
53752    /// Get an AnimationValue for an declaration id from a given computed values.
53753    pub fn from_computed_values(
53754        property: PropertyDeclarationId,
53755        style: &ComputedValues,
53756    ) -> Option<Self> {
53757        let property = match property {
53758            PropertyDeclarationId::Longhand(id) => id,
53759            PropertyDeclarationId::Custom(ref name) => {
53760                // FIXME(bug 1869476): This should use a stylist to determine whether the name
53761                // corresponds to an inherited custom property and then choose the
53762                // inherited/non_inherited map accordingly.
53763                let p = &style.custom_properties();
53764                let value = p.inherited.get(*name).or_else(|| p.non_inherited.get(*name))?;
53765                return Some(AnimationValue::Custom(CustomAnimatedValue::from_computed(name, value)))
53766            }
53767        };
53768
53769        Some(match property {
53770            LonghandId::AlignContent => {
53771                let computed = style.clone_align_content();
53772                AnimationValue::AlignContent(
53773                    computed
53774                )
53775            }
53776            LonghandId::AlignItems => {
53777                let computed = style.clone_align_items();
53778                AnimationValue::AlignItems(
53779                    computed
53780                )
53781            }
53782            LonghandId::AlignSelf => {
53783                let computed = style.clone_align_self();
53784                AnimationValue::AlignSelf(
53785                    computed
53786                )
53787            }
53788            LonghandId::AspectRatio => {
53789                let computed = style.clone_aspect_ratio();
53790                AnimationValue::AspectRatio(
53791                    computed.to_animated_value(&crate::values::animated::Context { style })
53792                )
53793            }
53794            LonghandId::BackfaceVisibility => {
53795                let computed = style.clone_backface_visibility();
53796                AnimationValue::BackfaceVisibility(
53797                    computed
53798                )
53799            }
53800            LonghandId::BaselineSource => {
53801                let computed = style.clone_baseline_source();
53802                AnimationValue::BaselineSource(
53803                    computed
53804                )
53805            }
53806            LonghandId::BorderCollapse => {
53807                let computed = style.clone_border_collapse();
53808                AnimationValue::BorderCollapse(
53809                    computed
53810                )
53811            }
53812            LonghandId::BorderImageRepeat => {
53813                let computed = style.clone_border_image_repeat();
53814                AnimationValue::BorderImageRepeat(
53815                    computed
53816                )
53817            }
53818            LonghandId::BoxSizing => {
53819                let computed = style.clone_box_sizing();
53820                AnimationValue::BoxSizing(
53821                    computed
53822                )
53823            }
53824            LonghandId::CaptionSide => {
53825                let computed = style.clone_caption_side();
53826                AnimationValue::CaptionSide(
53827                    computed
53828                )
53829            }
53830            LonghandId::Clear => {
53831                let computed = style.clone_clear();
53832                AnimationValue::Clear(
53833                    computed
53834                )
53835            }
53836            LonghandId::ColumnCount => {
53837                let computed = style.clone_column_count();
53838                AnimationValue::ColumnCount(
53839                    computed.to_animated_value(&crate::values::animated::Context { style })
53840                )
53841            }
53842            LonghandId::ColumnSpan => {
53843                let computed = style.clone_column_span();
53844                AnimationValue::ColumnSpan(
53845                    computed
53846                )
53847            }
53848            LonghandId::Display => {
53849                let computed = style.clone_display();
53850                AnimationValue::Display(
53851                    computed
53852                )
53853            }
53854            LonghandId::EmptyCells => {
53855                let computed = style.clone_empty_cells();
53856                AnimationValue::EmptyCells(
53857                    computed
53858                )
53859            }
53860            LonghandId::FlexDirection => {
53861                let computed = style.clone_flex_direction();
53862                AnimationValue::FlexDirection(
53863                    computed
53864                )
53865            }
53866            LonghandId::FlexWrap => {
53867                let computed = style.clone_flex_wrap();
53868                AnimationValue::FlexWrap(
53869                    computed
53870                )
53871            }
53872            LonghandId::Float => {
53873                let computed = style.clone_float();
53874                AnimationValue::Float(
53875                    computed
53876                )
53877            }
53878            LonghandId::FontLanguageOverride => {
53879                let computed = style.clone_font_language_override();
53880                AnimationValue::FontLanguageOverride(
53881                    computed
53882                )
53883            }
53884            LonghandId::FontStretch => {
53885                let computed = style.clone_font_stretch();
53886                AnimationValue::FontStretch(
53887                    computed.to_animated_value(&crate::values::animated::Context { style })
53888                )
53889            }
53890            LonghandId::FontStyle => {
53891                let computed = style.clone_font_style();
53892                AnimationValue::FontStyle(
53893                    computed.to_animated_value(&crate::values::animated::Context { style })
53894                )
53895            }
53896            LonghandId::FontVariantCaps => {
53897                let computed = style.clone_font_variant_caps();
53898                AnimationValue::FontVariantCaps(
53899                    computed
53900                )
53901            }
53902            LonghandId::FontWeight => {
53903                let computed = style.clone_font_weight();
53904                AnimationValue::FontWeight(
53905                    computed.to_animated_value(&crate::values::animated::Context { style })
53906                )
53907            }
53908            LonghandId::GridAutoFlow => {
53909                let computed = style.clone_grid_auto_flow();
53910                AnimationValue::GridAutoFlow(
53911                    computed
53912                )
53913            }
53914            LonghandId::ImageRendering => {
53915                let computed = style.clone_image_rendering();
53916                AnimationValue::ImageRendering(
53917                    computed
53918                )
53919            }
53920            LonghandId::Isolation => {
53921                let computed = style.clone_isolation();
53922                AnimationValue::Isolation(
53923                    computed
53924                )
53925            }
53926            LonghandId::JustifyContent => {
53927                let computed = style.clone_justify_content();
53928                AnimationValue::JustifyContent(
53929                    computed
53930                )
53931            }
53932            LonghandId::JustifyItems => {
53933                let computed = style.clone_justify_items();
53934                AnimationValue::JustifyItems(
53935                    computed
53936                )
53937            }
53938            LonghandId::JustifySelf => {
53939                let computed = style.clone_justify_self();
53940                AnimationValue::JustifySelf(
53941                    computed
53942                )
53943            }
53944            LonghandId::ListStylePosition => {
53945                let computed = style.clone_list_style_position();
53946                AnimationValue::ListStylePosition(
53947                    computed
53948                )
53949            }
53950            LonghandId::ListStyleType => {
53951                let computed = style.clone_list_style_type();
53952                AnimationValue::ListStyleType(
53953                    computed
53954                )
53955            }
53956            LonghandId::MixBlendMode => {
53957                let computed = style.clone_mix_blend_mode();
53958                AnimationValue::MixBlendMode(
53959                    computed
53960                )
53961            }
53962            LonghandId::ObjectFit => {
53963                let computed = style.clone_object_fit();
53964                AnimationValue::ObjectFit(
53965                    computed
53966                )
53967            }
53968            LonghandId::Opacity => {
53969                let computed = style.clone_opacity();
53970                AnimationValue::Opacity(
53971                    computed.to_animated_value(&crate::values::animated::Context { style })
53972                )
53973            }
53974            LonghandId::Order => {
53975                let computed = style.clone_order();
53976                AnimationValue::Order(
53977                    computed.to_animated_value(&crate::values::animated::Context { style })
53978                )
53979            }
53980            LonghandId::OutlineStyle => {
53981                let computed = style.clone_outline_style();
53982                AnimationValue::OutlineStyle(
53983                    computed
53984                )
53985            }
53986            LonghandId::OverflowWrap => {
53987                let computed = style.clone_overflow_wrap();
53988                AnimationValue::OverflowWrap(
53989                    computed
53990                )
53991            }
53992            LonghandId::PointerEvents => {
53993                let computed = style.clone_pointer_events();
53994                AnimationValue::PointerEvents(
53995                    computed
53996                )
53997            }
53998            LonghandId::Position => {
53999                let computed = style.clone_position();
54000                AnimationValue::Position(
54001                    computed
54002                )
54003            }
54004            LonghandId::TableLayout => {
54005                let computed = style.clone_table_layout();
54006                AnimationValue::TableLayout(
54007                    computed
54008                )
54009            }
54010            LonghandId::TextAlign => {
54011                let computed = style.clone_text_align();
54012                AnimationValue::TextAlign(
54013                    computed
54014                )
54015            }
54016            LonghandId::TextAlignLast => {
54017                let computed = style.clone_text_align_last();
54018                AnimationValue::TextAlignLast(
54019                    computed
54020                )
54021            }
54022            LonghandId::TextDecorationLine => {
54023                let computed = style.clone_text_decoration_line();
54024                AnimationValue::TextDecorationLine(
54025                    computed
54026                )
54027            }
54028            LonghandId::TextDecorationStyle => {
54029                let computed = style.clone_text_decoration_style();
54030                AnimationValue::TextDecorationStyle(
54031                    computed
54032                )
54033            }
54034            LonghandId::TextJustify => {
54035                let computed = style.clone_text_justify();
54036                AnimationValue::TextJustify(
54037                    computed
54038                )
54039            }
54040            LonghandId::TextRendering => {
54041                let computed = style.clone_text_rendering();
54042                AnimationValue::TextRendering(
54043                    computed
54044                )
54045            }
54046            LonghandId::TextTransform => {
54047                let computed = style.clone_text_transform();
54048                AnimationValue::TextTransform(
54049                    computed
54050                )
54051            }
54052            LonghandId::TextWrapMode => {
54053                let computed = style.clone_text_wrap_mode();
54054                AnimationValue::TextWrapMode(
54055                    computed
54056                )
54057            }
54058            LonghandId::TransformStyle => {
54059                let computed = style.clone_transform_style();
54060                AnimationValue::TransformStyle(
54061                    computed
54062                )
54063            }
54064            LonghandId::Visibility => {
54065                let computed = style.clone_visibility();
54066                AnimationValue::Visibility(
54067                    computed.to_animated_value(&crate::values::animated::Context { style })
54068                )
54069            }
54070            LonghandId::WhiteSpaceCollapse => {
54071                let computed = style.clone_white_space_collapse();
54072                AnimationValue::WhiteSpaceCollapse(
54073                    computed
54074                )
54075            }
54076            LonghandId::WordBreak => {
54077                let computed = style.clone_word_break();
54078                AnimationValue::WordBreak(
54079                    computed
54080                )
54081            }
54082            LonghandId::ZIndex => {
54083                let computed = style.clone_z_index();
54084                AnimationValue::ZIndex(
54085                    computed.to_animated_value(&crate::values::animated::Context { style })
54086                )
54087            }
54088            LonghandId::Zoom => {
54089                let computed = style.clone_zoom();
54090                AnimationValue::Zoom(
54091                    computed.to_animated_value(&crate::values::animated::Context { style })
54092                )
54093            }
54094            LonghandId::FlexGrow => {
54095                let computed = style.clone_flex_grow();
54096                AnimationValue::FlexGrow(
54097                    computed.to_animated_value(&crate::values::animated::Context { style })
54098                )
54099            }
54100            LonghandId::FlexShrink => {
54101                let computed = style.clone_flex_shrink();
54102                AnimationValue::FlexShrink(
54103                    computed.to_animated_value(&crate::values::animated::Context { style })
54104                )
54105            }
54106            LonghandId::OverflowX => {
54107                let computed = style.clone_overflow_x();
54108                AnimationValue::OverflowX(
54109                    computed
54110                )
54111            }
54112            LonghandId::OverflowY => {
54113                let computed = style.clone_overflow_y();
54114                AnimationValue::OverflowY(
54115                    computed
54116                )
54117            }
54118            LonghandId::BorderBottomStyle => {
54119                let computed = style.clone_border_bottom_style();
54120                AnimationValue::BorderBottomStyle(
54121                    computed
54122                )
54123            }
54124            LonghandId::BorderLeftStyle => {
54125                let computed = style.clone_border_left_style();
54126                AnimationValue::BorderLeftStyle(
54127                    computed
54128                )
54129            }
54130            LonghandId::BorderRightStyle => {
54131                let computed = style.clone_border_right_style();
54132                AnimationValue::BorderRightStyle(
54133                    computed
54134                )
54135            }
54136            LonghandId::BorderTopStyle => {
54137                let computed = style.clone_border_top_style();
54138                AnimationValue::BorderTopStyle(
54139                    computed
54140                )
54141            }
54142            LonghandId::BackdropFilter => {
54143                let computed = style.clone_backdrop_filter();
54144                AnimationValue::BackdropFilter(
54145                    computed.to_animated_value(&crate::values::animated::Context { style })
54146                )
54147            }
54148            LonghandId::BackgroundAttachment => {
54149                let computed = style.clone_background_attachment();
54150                AnimationValue::BackgroundAttachment(
54151                    computed
54152                )
54153            }
54154            LonghandId::BackgroundClip => {
54155                let computed = style.clone_background_clip();
54156                AnimationValue::BackgroundClip(
54157                    computed
54158                )
54159            }
54160            LonghandId::BackgroundImage => {
54161                let computed = style.clone_background_image();
54162                AnimationValue::BackgroundImage(
54163                    computed
54164                )
54165            }
54166            LonghandId::BackgroundOrigin => {
54167                let computed = style.clone_background_origin();
54168                AnimationValue::BackgroundOrigin(
54169                    computed
54170                )
54171            }
54172            LonghandId::BackgroundPositionX => {
54173                let computed = style.clone_background_position_x();
54174                AnimationValue::BackgroundPositionX(
54175                    computed.to_animated_value(&crate::values::animated::Context { style })
54176                )
54177            }
54178            LonghandId::BackgroundPositionY => {
54179                let computed = style.clone_background_position_y();
54180                AnimationValue::BackgroundPositionY(
54181                    computed.to_animated_value(&crate::values::animated::Context { style })
54182                )
54183            }
54184            LonghandId::BackgroundRepeat => {
54185                let computed = style.clone_background_repeat();
54186                AnimationValue::BackgroundRepeat(
54187                    computed
54188                )
54189            }
54190            LonghandId::BackgroundSize => {
54191                let computed = style.clone_background_size();
54192                AnimationValue::BackgroundSize(
54193                    computed.to_animated_value(&crate::values::animated::Context { style })
54194                )
54195            }
54196            LonghandId::BorderImageOutset => {
54197                let computed = style.clone_border_image_outset();
54198                AnimationValue::BorderImageOutset(
54199                    computed.to_animated_value(&crate::values::animated::Context { style })
54200                )
54201            }
54202            LonghandId::BorderImageSlice => {
54203                let computed = style.clone_border_image_slice();
54204                AnimationValue::BorderImageSlice(
54205                    computed.to_animated_value(&crate::values::animated::Context { style })
54206                )
54207            }
54208            LonghandId::BorderImageWidth => {
54209                let computed = style.clone_border_image_width();
54210                AnimationValue::BorderImageWidth(
54211                    computed.to_animated_value(&crate::values::animated::Context { style })
54212                )
54213            }
54214            LonghandId::BorderSpacing => {
54215                let computed = style.clone_border_spacing();
54216                AnimationValue::BorderSpacing(
54217                    computed.to_animated_value(&crate::values::animated::Context { style })
54218                )
54219            }
54220            LonghandId::BoxShadow => {
54221                let computed = style.clone_box_shadow();
54222                AnimationValue::BoxShadow(
54223                    computed.to_animated_value(&crate::values::animated::Context { style })
54224                )
54225            }
54226            LonghandId::Clip => {
54227                let computed = style.clone_clip();
54228                AnimationValue::Clip(
54229                    computed.to_animated_value(&crate::values::animated::Context { style })
54230                )
54231            }
54232            LonghandId::ClipPath => {
54233                let computed = style.clone_clip_path();
54234                AnimationValue::ClipPath(
54235                    computed.to_animated_value(&crate::values::animated::Context { style })
54236                )
54237            }
54238            LonghandId::Color => {
54239                let computed = style.clone_color();
54240                AnimationValue::Color(
54241                    computed.to_animated_value(&crate::values::animated::Context { style })
54242                )
54243            }
54244            LonghandId::ColorScheme => {
54245                let computed = style.clone_color_scheme();
54246                AnimationValue::ColorScheme(
54247                    computed
54248                )
54249            }
54250            LonghandId::ColumnWidth => {
54251                let computed = style.clone_column_width();
54252                AnimationValue::ColumnWidth(
54253                    computed.to_animated_value(&crate::values::animated::Context { style })
54254                )
54255            }
54256            LonghandId::Content => {
54257                let computed = style.clone_content();
54258                AnimationValue::Content(
54259                    computed
54260                )
54261            }
54262            LonghandId::CounterIncrement => {
54263                let computed = style.clone_counter_increment();
54264                AnimationValue::CounterIncrement(
54265                    computed
54266                )
54267            }
54268            LonghandId::CounterReset => {
54269                let computed = style.clone_counter_reset();
54270                AnimationValue::CounterReset(
54271                    computed
54272                )
54273            }
54274            LonghandId::Cursor => {
54275                let computed = style.clone_cursor();
54276                AnimationValue::Cursor(
54277                    computed
54278                )
54279            }
54280            LonghandId::Filter => {
54281                let computed = style.clone_filter();
54282                AnimationValue::Filter(
54283                    computed.to_animated_value(&crate::values::animated::Context { style })
54284                )
54285            }
54286            LonghandId::FlexBasis => {
54287                let computed = style.clone_flex_basis();
54288                AnimationValue::FlexBasis(
54289                    computed.to_animated_value(&crate::values::animated::Context { style })
54290                )
54291            }
54292            LonghandId::FontFamily => {
54293                let computed = style.clone_font_family();
54294                AnimationValue::FontFamily(
54295                    computed
54296                )
54297            }
54298            LonghandId::FontSize => {
54299                let computed = style.clone_font_size();
54300                AnimationValue::FontSize(
54301                    computed.to_animated_value(&crate::values::animated::Context { style })
54302                )
54303            }
54304            LonghandId::FontVariationSettings => {
54305                let computed = style.clone_font_variation_settings();
54306                AnimationValue::FontVariationSettings(
54307                    computed.to_animated_value(&crate::values::animated::Context { style })
54308                )
54309            }
54310            LonghandId::GridTemplateAreas => {
54311                let computed = style.clone_grid_template_areas();
54312                AnimationValue::GridTemplateAreas(
54313                    computed
54314                )
54315            }
54316            LonghandId::LetterSpacing => {
54317                let computed = style.clone_letter_spacing();
54318                AnimationValue::LetterSpacing(
54319                    computed.to_animated_value(&crate::values::animated::Context { style })
54320                )
54321            }
54322            LonghandId::LineHeight => {
54323                let computed = style.clone_line_height();
54324                AnimationValue::LineHeight(
54325                    computed.to_animated_value(&crate::values::animated::Context { style })
54326                )
54327            }
54328            LonghandId::MaskImage => {
54329                let computed = style.clone_mask_image();
54330                AnimationValue::MaskImage(
54331                    computed
54332                )
54333            }
54334            LonghandId::OffsetPath => {
54335                let computed = style.clone_offset_path();
54336                AnimationValue::OffsetPath(
54337                    computed.to_animated_value(&crate::values::animated::Context { style })
54338                )
54339            }
54340            LonghandId::Perspective => {
54341                let computed = style.clone_perspective();
54342                AnimationValue::Perspective(
54343                    computed.to_animated_value(&crate::values::animated::Context { style })
54344                )
54345            }
54346            LonghandId::Quotes => {
54347                let computed = style.clone_quotes();
54348                AnimationValue::Quotes(
54349                    computed
54350                )
54351            }
54352            LonghandId::Rotate => {
54353                let computed = style.clone_rotate();
54354                AnimationValue::Rotate(
54355                    computed.to_animated_value(&crate::values::animated::Context { style })
54356                )
54357            }
54358            LonghandId::Scale => {
54359                let computed = style.clone_scale();
54360                AnimationValue::Scale(
54361                    computed.to_animated_value(&crate::values::animated::Context { style })
54362                )
54363            }
54364            LonghandId::TextIndent => {
54365                let computed = style.clone_text_indent();
54366                AnimationValue::TextIndent(
54367                    computed.to_animated_value(&crate::values::animated::Context { style })
54368                )
54369            }
54370            LonghandId::TextOverflow => {
54371                let computed = style.clone_text_overflow();
54372                AnimationValue::TextOverflow(
54373                    computed
54374                )
54375            }
54376            LonghandId::TextShadow => {
54377                let computed = style.clone_text_shadow();
54378                AnimationValue::TextShadow(
54379                    computed.to_animated_value(&crate::values::animated::Context { style })
54380                )
54381            }
54382            LonghandId::Transform => {
54383                let computed = style.clone_transform();
54384                AnimationValue::Transform(
54385                    computed.to_animated_value(&crate::values::animated::Context { style })
54386                )
54387            }
54388            LonghandId::TransformOrigin => {
54389                let computed = style.clone_transform_origin();
54390                AnimationValue::TransformOrigin(
54391                    computed.to_animated_value(&crate::values::animated::Context { style })
54392                )
54393            }
54394            LonghandId::Translate => {
54395                let computed = style.clone_translate();
54396                AnimationValue::Translate(
54397                    computed.to_animated_value(&crate::values::animated::Context { style })
54398                )
54399            }
54400            LonghandId::VerticalAlign => {
54401                let computed = style.clone_vertical_align();
54402                AnimationValue::VerticalAlign(
54403                    computed.to_animated_value(&crate::values::animated::Context { style })
54404                )
54405            }
54406            LonghandId::ViewTransitionClass => {
54407                let computed = style.clone_view_transition_class();
54408                AnimationValue::ViewTransitionClass(
54409                    computed
54410                )
54411            }
54412            LonghandId::ViewTransitionName => {
54413                let computed = style.clone_view_transition_name();
54414                AnimationValue::ViewTransitionName(
54415                    computed
54416                )
54417            }
54418            LonghandId::WordSpacing => {
54419                let computed = style.clone_word_spacing();
54420                AnimationValue::WordSpacing(
54421                    computed.to_animated_value(&crate::values::animated::Context { style })
54422                )
54423            }
54424            LonghandId::ObjectPosition => {
54425                let computed = style.clone_object_position();
54426                AnimationValue::ObjectPosition(
54427                    computed.to_animated_value(&crate::values::animated::Context { style })
54428                )
54429            }
54430            LonghandId::PerspectiveOrigin => {
54431                let computed = style.clone_perspective_origin();
54432                AnimationValue::PerspectiveOrigin(
54433                    computed.to_animated_value(&crate::values::animated::Context { style })
54434                )
54435            }
54436            LonghandId::GridTemplateColumns => {
54437                let computed = style.clone_grid_template_columns();
54438                AnimationValue::GridTemplateColumns(
54439                    computed.to_animated_value(&crate::values::animated::Context { style })
54440                )
54441            }
54442            LonghandId::GridTemplateRows => {
54443                let computed = style.clone_grid_template_rows();
54444                AnimationValue::GridTemplateRows(
54445                    computed.to_animated_value(&crate::values::animated::Context { style })
54446                )
54447            }
54448            LonghandId::BorderImageSource => {
54449                let computed = style.clone_border_image_source();
54450                AnimationValue::BorderImageSource(
54451                    computed
54452                )
54453            }
54454            LonghandId::ListStyleImage => {
54455                let computed = style.clone_list_style_image();
54456                AnimationValue::ListStyleImage(
54457                    computed
54458                )
54459            }
54460            LonghandId::GridAutoColumns => {
54461                let computed = style.clone_grid_auto_columns();
54462                AnimationValue::GridAutoColumns(
54463                    computed
54464                )
54465            }
54466            LonghandId::GridAutoRows => {
54467                let computed = style.clone_grid_auto_rows();
54468                AnimationValue::GridAutoRows(
54469                    computed
54470                )
54471            }
54472            LonghandId::OutlineOffset => {
54473                let computed = style.clone_outline_offset();
54474                AnimationValue::OutlineOffset(
54475                    computed.to_animated_value(&crate::values::animated::Context { style })
54476                )
54477            }
54478            LonghandId::OverflowClipMargin => {
54479                let computed = style.clone_overflow_clip_margin();
54480                AnimationValue::OverflowClipMargin(
54481                    computed.to_animated_value(&crate::values::animated::Context { style })
54482                )
54483            }
54484            LonghandId::ColumnGap => {
54485                let computed = style.clone_column_gap();
54486                AnimationValue::ColumnGap(
54487                    computed.to_animated_value(&crate::values::animated::Context { style })
54488                )
54489            }
54490            LonghandId::RowGap => {
54491                let computed = style.clone_row_gap();
54492                AnimationValue::RowGap(
54493                    computed.to_animated_value(&crate::values::animated::Context { style })
54494                )
54495            }
54496            LonghandId::GridColumnEnd => {
54497                let computed = style.clone_grid_column_end();
54498                AnimationValue::GridColumnEnd(
54499                    computed
54500                )
54501            }
54502            LonghandId::GridColumnStart => {
54503                let computed = style.clone_grid_column_start();
54504                AnimationValue::GridColumnStart(
54505                    computed
54506                )
54507            }
54508            LonghandId::GridRowEnd => {
54509                let computed = style.clone_grid_row_end();
54510                AnimationValue::GridRowEnd(
54511                    computed
54512                )
54513            }
54514            LonghandId::GridRowStart => {
54515                let computed = style.clone_grid_row_start();
54516                AnimationValue::GridRowStart(
54517                    computed
54518                )
54519            }
54520            LonghandId::MaxHeight => {
54521                let computed = style.clone_max_height();
54522                AnimationValue::MaxHeight(
54523                    computed.to_animated_value(&crate::values::animated::Context { style })
54524                )
54525            }
54526            LonghandId::MaxWidth => {
54527                let computed = style.clone_max_width();
54528                AnimationValue::MaxWidth(
54529                    computed.to_animated_value(&crate::values::animated::Context { style })
54530                )
54531            }
54532            LonghandId::BorderBottomLeftRadius => {
54533                let computed = style.clone_border_bottom_left_radius();
54534                AnimationValue::BorderBottomLeftRadius(
54535                    computed.to_animated_value(&crate::values::animated::Context { style })
54536                )
54537            }
54538            LonghandId::BorderBottomRightRadius => {
54539                let computed = style.clone_border_bottom_right_radius();
54540                AnimationValue::BorderBottomRightRadius(
54541                    computed.to_animated_value(&crate::values::animated::Context { style })
54542                )
54543            }
54544            LonghandId::BorderTopLeftRadius => {
54545                let computed = style.clone_border_top_left_radius();
54546                AnimationValue::BorderTopLeftRadius(
54547                    computed.to_animated_value(&crate::values::animated::Context { style })
54548                )
54549            }
54550            LonghandId::BorderTopRightRadius => {
54551                let computed = style.clone_border_top_right_radius();
54552                AnimationValue::BorderTopRightRadius(
54553                    computed.to_animated_value(&crate::values::animated::Context { style })
54554                )
54555            }
54556            LonghandId::Bottom => {
54557                let computed = style.clone_bottom();
54558                AnimationValue::Bottom(
54559                    computed.to_animated_value(&crate::values::animated::Context { style })
54560                )
54561            }
54562            LonghandId::Left => {
54563                let computed = style.clone_left();
54564                AnimationValue::Left(
54565                    computed.to_animated_value(&crate::values::animated::Context { style })
54566                )
54567            }
54568            LonghandId::Right => {
54569                let computed = style.clone_right();
54570                AnimationValue::Right(
54571                    computed.to_animated_value(&crate::values::animated::Context { style })
54572                )
54573            }
54574            LonghandId::Top => {
54575                let computed = style.clone_top();
54576                AnimationValue::Top(
54577                    computed.to_animated_value(&crate::values::animated::Context { style })
54578                )
54579            }
54580            LonghandId::MarginBottom => {
54581                let computed = style.clone_margin_bottom();
54582                AnimationValue::MarginBottom(
54583                    computed.to_animated_value(&crate::values::animated::Context { style })
54584                )
54585            }
54586            LonghandId::MarginLeft => {
54587                let computed = style.clone_margin_left();
54588                AnimationValue::MarginLeft(
54589                    computed.to_animated_value(&crate::values::animated::Context { style })
54590                )
54591            }
54592            LonghandId::MarginRight => {
54593                let computed = style.clone_margin_right();
54594                AnimationValue::MarginRight(
54595                    computed.to_animated_value(&crate::values::animated::Context { style })
54596                )
54597            }
54598            LonghandId::MarginTop => {
54599                let computed = style.clone_margin_top();
54600                AnimationValue::MarginTop(
54601                    computed.to_animated_value(&crate::values::animated::Context { style })
54602                )
54603            }
54604            LonghandId::PaddingBottom => {
54605                let computed = style.clone_padding_bottom();
54606                AnimationValue::PaddingBottom(
54607                    computed.to_animated_value(&crate::values::animated::Context { style })
54608                )
54609            }
54610            LonghandId::PaddingLeft => {
54611                let computed = style.clone_padding_left();
54612                AnimationValue::PaddingLeft(
54613                    computed.to_animated_value(&crate::values::animated::Context { style })
54614                )
54615            }
54616            LonghandId::PaddingRight => {
54617                let computed = style.clone_padding_right();
54618                AnimationValue::PaddingRight(
54619                    computed.to_animated_value(&crate::values::animated::Context { style })
54620                )
54621            }
54622            LonghandId::PaddingTop => {
54623                let computed = style.clone_padding_top();
54624                AnimationValue::PaddingTop(
54625                    computed.to_animated_value(&crate::values::animated::Context { style })
54626                )
54627            }
54628            LonghandId::Height => {
54629                let computed = style.clone_height();
54630                AnimationValue::Height(
54631                    computed.to_animated_value(&crate::values::animated::Context { style })
54632                )
54633            }
54634            LonghandId::MinHeight => {
54635                let computed = style.clone_min_height();
54636                AnimationValue::MinHeight(
54637                    computed.to_animated_value(&crate::values::animated::Context { style })
54638                )
54639            }
54640            LonghandId::MinWidth => {
54641                let computed = style.clone_min_width();
54642                AnimationValue::MinWidth(
54643                    computed.to_animated_value(&crate::values::animated::Context { style })
54644                )
54645            }
54646            LonghandId::Width => {
54647                let computed = style.clone_width();
54648                AnimationValue::Width(
54649                    computed.to_animated_value(&crate::values::animated::Context { style })
54650                )
54651            }
54652            LonghandId::BorderBottomWidth => {
54653                let computed = style.clone_border_bottom_width();
54654                AnimationValue::BorderBottomWidth(
54655                    computed.to_animated_value(&crate::values::animated::Context { style })
54656                )
54657            }
54658            LonghandId::BorderLeftWidth => {
54659                let computed = style.clone_border_left_width();
54660                AnimationValue::BorderLeftWidth(
54661                    computed.to_animated_value(&crate::values::animated::Context { style })
54662                )
54663            }
54664            LonghandId::BorderRightWidth => {
54665                let computed = style.clone_border_right_width();
54666                AnimationValue::BorderRightWidth(
54667                    computed.to_animated_value(&crate::values::animated::Context { style })
54668                )
54669            }
54670            LonghandId::BorderTopWidth => {
54671                let computed = style.clone_border_top_width();
54672                AnimationValue::BorderTopWidth(
54673                    computed.to_animated_value(&crate::values::animated::Context { style })
54674                )
54675            }
54676            LonghandId::OutlineWidth => {
54677                let computed = style.clone_outline_width();
54678                AnimationValue::OutlineWidth(
54679                    computed.to_animated_value(&crate::values::animated::Context { style })
54680                )
54681            }
54682            LonghandId::BackgroundColor => {
54683                let computed = style.clone_background_color();
54684                AnimationValue::BackgroundColor(
54685                    computed.to_animated_value(&crate::values::animated::Context { style })
54686                )
54687            }
54688            LonghandId::BorderBottomColor => {
54689                let computed = style.clone_border_bottom_color();
54690                AnimationValue::BorderBottomColor(
54691                    computed.to_animated_value(&crate::values::animated::Context { style })
54692                )
54693            }
54694            LonghandId::BorderLeftColor => {
54695                let computed = style.clone_border_left_color();
54696                AnimationValue::BorderLeftColor(
54697                    computed.to_animated_value(&crate::values::animated::Context { style })
54698                )
54699            }
54700            LonghandId::BorderRightColor => {
54701                let computed = style.clone_border_right_color();
54702                AnimationValue::BorderRightColor(
54703                    computed.to_animated_value(&crate::values::animated::Context { style })
54704                )
54705            }
54706            LonghandId::BorderTopColor => {
54707                let computed = style.clone_border_top_color();
54708                AnimationValue::BorderTopColor(
54709                    computed.to_animated_value(&crate::values::animated::Context { style })
54710                )
54711            }
54712            LonghandId::OutlineColor => {
54713                let computed = style.clone_outline_color();
54714                AnimationValue::OutlineColor(
54715                    computed.to_animated_value(&crate::values::animated::Context { style })
54716                )
54717            }
54718            LonghandId::TextDecorationColor => {
54719                let computed = style.clone_text_decoration_color();
54720                AnimationValue::TextDecorationColor(
54721                    computed.to_animated_value(&crate::values::animated::Context { style })
54722                )
54723            }
54724            _ => return None,
54725        })
54726    }
54727
54728    /// Update `style` with the value of this `AnimationValue`.
54729    ///
54730    /// SERVO ONLY: This doesn't properly handle things like updating 'em' units
54731    /// when animated font-size.
54732    #[cfg(feature = "servo")]
54733    pub fn set_in_style_for_servo(&self, style: &mut ComputedValues) {
54734        match self {
54735            AnimationValue::AlignContent(ref value) => {
54736                let value: longhands::align_content::computed_value::T =
54737                    value.clone();
54738                style.mutate_position().set_align_content(value);
54739            }
54740            AnimationValue::AlignItems(ref value) => {
54741                let value: longhands::align_items::computed_value::T =
54742                    value.clone();
54743                style.mutate_position().set_align_items(value);
54744            }
54745            AnimationValue::AlignSelf(ref value) => {
54746                let value: longhands::align_self::computed_value::T =
54747                    value.clone();
54748                style.mutate_position().set_align_self(value);
54749            }
54750            AnimationValue::AspectRatio(ref value) => {
54751                let value: longhands::aspect_ratio::computed_value::T =
54752                    ToAnimatedValue::from_animated_value(value.clone());
54753                style.mutate_position().set_aspect_ratio(value);
54754            }
54755            AnimationValue::BackfaceVisibility(ref value) => {
54756                let value: longhands::backface_visibility::computed_value::T =
54757                    value.clone();
54758                style.mutate_box().set_backface_visibility(value);
54759            }
54760            AnimationValue::BaselineSource(ref value) => {
54761                let value: longhands::baseline_source::computed_value::T =
54762                    value.clone();
54763                style.mutate_box().set_baseline_source(value);
54764            }
54765            AnimationValue::BorderCollapse(ref value) => {
54766                let value: longhands::border_collapse::computed_value::T =
54767                    value.clone();
54768                style.mutate_inherited_table().set_border_collapse(value);
54769            }
54770            AnimationValue::BorderImageRepeat(ref value) => {
54771                let value: longhands::border_image_repeat::computed_value::T =
54772                    value.clone();
54773                style.mutate_border().set_border_image_repeat(value);
54774            }
54775            AnimationValue::BoxSizing(ref value) => {
54776                let value: longhands::box_sizing::computed_value::T =
54777                    value.clone();
54778                style.mutate_position().set_box_sizing(value);
54779            }
54780            AnimationValue::CaptionSide(ref value) => {
54781                let value: longhands::caption_side::computed_value::T =
54782                    value.clone();
54783                style.mutate_inherited_table().set_caption_side(value);
54784            }
54785            AnimationValue::Clear(ref value) => {
54786                let value: longhands::clear::computed_value::T =
54787                    value.clone();
54788                style.mutate_box().set_clear(value);
54789            }
54790            AnimationValue::ColumnCount(ref value) => {
54791                let value: longhands::column_count::computed_value::T =
54792                    ToAnimatedValue::from_animated_value(value.clone());
54793                style.mutate_column().set_column_count(value);
54794            }
54795            AnimationValue::ColumnSpan(ref value) => {
54796                let value: longhands::column_span::computed_value::T =
54797                    value.clone();
54798                style.mutate_column().set_column_span(value);
54799            }
54800            AnimationValue::Contain(..) => unreachable!(),
54801            AnimationValue::ContainerType(..) => unreachable!(),
54802            AnimationValue::Direction(..) => unreachable!(),
54803            AnimationValue::Display(ref value) => {
54804                let value: longhands::display::computed_value::T =
54805                    value.clone();
54806                style.mutate_box().set_display(value);
54807            }
54808            AnimationValue::EmptyCells(ref value) => {
54809                let value: longhands::empty_cells::computed_value::T =
54810                    value.clone();
54811                style.mutate_inherited_table().set_empty_cells(value);
54812            }
54813            AnimationValue::FlexDirection(ref value) => {
54814                let value: longhands::flex_direction::computed_value::T =
54815                    value.clone();
54816                style.mutate_position().set_flex_direction(value);
54817            }
54818            AnimationValue::FlexWrap(ref value) => {
54819                let value: longhands::flex_wrap::computed_value::T =
54820                    value.clone();
54821                style.mutate_position().set_flex_wrap(value);
54822            }
54823            AnimationValue::Float(ref value) => {
54824                let value: longhands::float::computed_value::T =
54825                    value.clone();
54826                style.mutate_box().set_float(value);
54827            }
54828            AnimationValue::FontLanguageOverride(ref value) => {
54829                let value: longhands::font_language_override::computed_value::T =
54830                    value.clone();
54831                style.mutate_font().set_font_language_override(value);
54832            }
54833            AnimationValue::FontStretch(ref value) => {
54834                let value: longhands::font_stretch::computed_value::T =
54835                    ToAnimatedValue::from_animated_value(value.clone());
54836                style.mutate_font().set_font_stretch(value);
54837            }
54838            AnimationValue::FontStyle(ref value) => {
54839                let value: longhands::font_style::computed_value::T =
54840                    ToAnimatedValue::from_animated_value(value.clone());
54841                style.mutate_font().set_font_style(value);
54842            }
54843            AnimationValue::FontVariantCaps(ref value) => {
54844                let value: longhands::font_variant_caps::computed_value::T =
54845                    value.clone();
54846                style.mutate_font().set_font_variant_caps(value);
54847            }
54848            AnimationValue::FontWeight(ref value) => {
54849                let value: longhands::font_weight::computed_value::T =
54850                    ToAnimatedValue::from_animated_value(value.clone());
54851                style.mutate_font().set_font_weight(value);
54852            }
54853            AnimationValue::GridAutoFlow(ref value) => {
54854                let value: longhands::grid_auto_flow::computed_value::T =
54855                    value.clone();
54856                style.mutate_position().set_grid_auto_flow(value);
54857            }
54858            AnimationValue::ImageRendering(ref value) => {
54859                let value: longhands::image_rendering::computed_value::T =
54860                    value.clone();
54861                style.mutate_inherited_box().set_image_rendering(value);
54862            }
54863            AnimationValue::Isolation(ref value) => {
54864                let value: longhands::isolation::computed_value::T =
54865                    value.clone();
54866                style.mutate_box().set_isolation(value);
54867            }
54868            AnimationValue::JustifyContent(ref value) => {
54869                let value: longhands::justify_content::computed_value::T =
54870                    value.clone();
54871                style.mutate_position().set_justify_content(value);
54872            }
54873            AnimationValue::JustifyItems(ref value) => {
54874                let value: longhands::justify_items::computed_value::T =
54875                    value.clone();
54876                style.mutate_position().set_justify_items(value);
54877            }
54878            AnimationValue::JustifySelf(ref value) => {
54879                let value: longhands::justify_self::computed_value::T =
54880                    value.clone();
54881                style.mutate_position().set_justify_self(value);
54882            }
54883            AnimationValue::ListStylePosition(ref value) => {
54884                let value: longhands::list_style_position::computed_value::T =
54885                    value.clone();
54886                style.mutate_list().set_list_style_position(value);
54887            }
54888            AnimationValue::ListStyleType(ref value) => {
54889                let value: longhands::list_style_type::computed_value::T =
54890                    value.clone();
54891                style.mutate_list().set_list_style_type(value);
54892            }
54893            AnimationValue::MixBlendMode(ref value) => {
54894                let value: longhands::mix_blend_mode::computed_value::T =
54895                    value.clone();
54896                style.mutate_effects().set_mix_blend_mode(value);
54897            }
54898            AnimationValue::ObjectFit(ref value) => {
54899                let value: longhands::object_fit::computed_value::T =
54900                    value.clone();
54901                style.mutate_position().set_object_fit(value);
54902            }
54903            AnimationValue::Opacity(ref value) => {
54904                let value: longhands::opacity::computed_value::T =
54905                    ToAnimatedValue::from_animated_value(value.clone());
54906                style.mutate_effects().set_opacity(value);
54907            }
54908            AnimationValue::Order(ref value) => {
54909                let value: longhands::order::computed_value::T =
54910                    ToAnimatedValue::from_animated_value(value.clone());
54911                style.mutate_position().set_order(value);
54912            }
54913            AnimationValue::OutlineStyle(ref value) => {
54914                let value: longhands::outline_style::computed_value::T =
54915                    value.clone();
54916                style.mutate_outline().set_outline_style(value);
54917            }
54918            AnimationValue::OverflowWrap(ref value) => {
54919                let value: longhands::overflow_wrap::computed_value::T =
54920                    value.clone();
54921                style.mutate_inherited_text().set_overflow_wrap(value);
54922            }
54923            AnimationValue::PointerEvents(ref value) => {
54924                let value: longhands::pointer_events::computed_value::T =
54925                    value.clone();
54926                style.mutate_inherited_ui().set_pointer_events(value);
54927            }
54928            AnimationValue::Position(ref value) => {
54929                let value: longhands::position::computed_value::T =
54930                    value.clone();
54931                style.mutate_box().set_position(value);
54932            }
54933            AnimationValue::ServoOverflowClipBox(..) => unreachable!(),
54934            AnimationValue::ServoTopLayer(..) => unreachable!(),
54935            AnimationValue::TableLayout(ref value) => {
54936                let value: longhands::table_layout::computed_value::T =
54937                    value.clone();
54938                style.mutate_table().set_table_layout(value);
54939            }
54940            AnimationValue::TextAlign(ref value) => {
54941                let value: longhands::text_align::computed_value::T =
54942                    value.clone();
54943                style.mutate_inherited_text().set_text_align(value);
54944            }
54945            AnimationValue::TextAlignLast(ref value) => {
54946                let value: longhands::text_align_last::computed_value::T =
54947                    value.clone();
54948                style.mutate_inherited_text().set_text_align_last(value);
54949            }
54950            AnimationValue::TextDecorationLine(ref value) => {
54951                let value: longhands::text_decoration_line::computed_value::T =
54952                    value.clone();
54953                style.mutate_text().set_text_decoration_line(value);
54954            }
54955            AnimationValue::TextDecorationStyle(ref value) => {
54956                let value: longhands::text_decoration_style::computed_value::T =
54957                    value.clone();
54958                style.mutate_text().set_text_decoration_style(value);
54959            }
54960            AnimationValue::TextJustify(ref value) => {
54961                let value: longhands::text_justify::computed_value::T =
54962                    value.clone();
54963                style.mutate_inherited_text().set_text_justify(value);
54964            }
54965            AnimationValue::TextRendering(ref value) => {
54966                let value: longhands::text_rendering::computed_value::T =
54967                    value.clone();
54968                style.mutate_inherited_text().set_text_rendering(value);
54969            }
54970            AnimationValue::TextTransform(ref value) => {
54971                let value: longhands::text_transform::computed_value::T =
54972                    value.clone();
54973                style.mutate_inherited_text().set_text_transform(value);
54974            }
54975            AnimationValue::TextWrapMode(ref value) => {
54976                let value: longhands::text_wrap_mode::computed_value::T =
54977                    value.clone();
54978                style.mutate_inherited_text().set_text_wrap_mode(value);
54979            }
54980            AnimationValue::TransformStyle(ref value) => {
54981                let value: longhands::transform_style::computed_value::T =
54982                    value.clone();
54983                style.mutate_box().set_transform_style(value);
54984            }
54985            AnimationValue::UnicodeBidi(..) => unreachable!(),
54986            AnimationValue::Visibility(ref value) => {
54987                let value: longhands::visibility::computed_value::T =
54988                    ToAnimatedValue::from_animated_value(value.clone());
54989                style.mutate_inherited_box().set_visibility(value);
54990            }
54991            AnimationValue::WhiteSpaceCollapse(ref value) => {
54992                let value: longhands::white_space_collapse::computed_value::T =
54993                    value.clone();
54994                style.mutate_inherited_text().set_white_space_collapse(value);
54995            }
54996            AnimationValue::WordBreak(ref value) => {
54997                let value: longhands::word_break::computed_value::T =
54998                    value.clone();
54999                style.mutate_inherited_text().set_word_break(value);
55000            }
55001            AnimationValue::WritingMode(..) => unreachable!(),
55002            AnimationValue::ZIndex(ref value) => {
55003                let value: longhands::z_index::computed_value::T =
55004                    ToAnimatedValue::from_animated_value(value.clone());
55005                style.mutate_position().set_z_index(value);
55006            }
55007            AnimationValue::Zoom(ref value) => {
55008                let value: longhands::zoom::computed_value::T =
55009                    ToAnimatedValue::from_animated_value(value.clone());
55010                style.mutate_box().set_zoom(value);
55011            }
55012            AnimationValue::FlexGrow(ref value) => {
55013                let value: longhands::flex_grow::computed_value::T =
55014                    ToAnimatedValue::from_animated_value(value.clone());
55015                style.mutate_position().set_flex_grow(value);
55016            }
55017            AnimationValue::FlexShrink(ref value) => {
55018                let value: longhands::flex_shrink::computed_value::T =
55019                    ToAnimatedValue::from_animated_value(value.clone());
55020                style.mutate_position().set_flex_shrink(value);
55021            }
55022            AnimationValue::OverflowBlock(..) => unreachable!(),
55023            AnimationValue::OverflowInline(..) => unreachable!(),
55024            AnimationValue::OverflowX(ref value) => {
55025                let value: longhands::overflow_x::computed_value::T =
55026                    value.clone();
55027                style.mutate_box().set_overflow_x(value);
55028            }
55029            AnimationValue::OverflowY(ref value) => {
55030                let value: longhands::overflow_y::computed_value::T =
55031                    value.clone();
55032                style.mutate_box().set_overflow_y(value);
55033            }
55034            AnimationValue::BorderBlockEndStyle(..) => unreachable!(),
55035            AnimationValue::BorderBlockStartStyle(..) => unreachable!(),
55036            AnimationValue::BorderBottomStyle(ref value) => {
55037                let value: longhands::border_bottom_style::computed_value::T =
55038                    value.clone();
55039                style.mutate_border().set_border_bottom_style(value);
55040            }
55041            AnimationValue::BorderInlineEndStyle(..) => unreachable!(),
55042            AnimationValue::BorderInlineStartStyle(..) => unreachable!(),
55043            AnimationValue::BorderLeftStyle(ref value) => {
55044                let value: longhands::border_left_style::computed_value::T =
55045                    value.clone();
55046                style.mutate_border().set_border_left_style(value);
55047            }
55048            AnimationValue::BorderRightStyle(ref value) => {
55049                let value: longhands::border_right_style::computed_value::T =
55050                    value.clone();
55051                style.mutate_border().set_border_right_style(value);
55052            }
55053            AnimationValue::BorderTopStyle(ref value) => {
55054                let value: longhands::border_top_style::computed_value::T =
55055                    value.clone();
55056                style.mutate_border().set_border_top_style(value);
55057            }
55058            AnimationValue::AnimationComposition(..) => unreachable!(),
55059            AnimationValue::AnimationDelay(..) => unreachable!(),
55060            AnimationValue::AnimationDirection(..) => unreachable!(),
55061            AnimationValue::AnimationDuration(..) => unreachable!(),
55062            AnimationValue::AnimationFillMode(..) => unreachable!(),
55063            AnimationValue::AnimationIterationCount(..) => unreachable!(),
55064            AnimationValue::AnimationName(..) => unreachable!(),
55065            AnimationValue::AnimationPlayState(..) => unreachable!(),
55066            AnimationValue::AnimationTimeline(..) => unreachable!(),
55067            AnimationValue::AnimationTimingFunction(..) => unreachable!(),
55068            AnimationValue::BackdropFilter(ref value) => {
55069                let value: longhands::backdrop_filter::computed_value::T =
55070                    ToAnimatedValue::from_animated_value(value.clone());
55071                style.mutate_effects().set_backdrop_filter(value);
55072            }
55073            AnimationValue::BackgroundAttachment(ref value) => {
55074                let value: longhands::background_attachment::computed_value::T =
55075                    value.clone();
55076                style.mutate_background().set_background_attachment(value);
55077            }
55078            AnimationValue::BackgroundClip(ref value) => {
55079                let value: longhands::background_clip::computed_value::T =
55080                    value.clone();
55081                style.mutate_background().set_background_clip(value);
55082            }
55083            AnimationValue::BackgroundImage(ref value) => {
55084                let value: longhands::background_image::computed_value::T =
55085                    value.clone();
55086                style.mutate_background().set_background_image(value);
55087            }
55088            AnimationValue::BackgroundOrigin(ref value) => {
55089                let value: longhands::background_origin::computed_value::T =
55090                    value.clone();
55091                style.mutate_background().set_background_origin(value);
55092            }
55093            AnimationValue::BackgroundPositionX(ref value) => {
55094                let value: longhands::background_position_x::computed_value::T =
55095                    ToAnimatedValue::from_animated_value(value.clone());
55096                style.mutate_background().set_background_position_x(value);
55097            }
55098            AnimationValue::BackgroundPositionY(ref value) => {
55099                let value: longhands::background_position_y::computed_value::T =
55100                    ToAnimatedValue::from_animated_value(value.clone());
55101                style.mutate_background().set_background_position_y(value);
55102            }
55103            AnimationValue::BackgroundRepeat(ref value) => {
55104                let value: longhands::background_repeat::computed_value::T =
55105                    value.clone();
55106                style.mutate_background().set_background_repeat(value);
55107            }
55108            AnimationValue::BackgroundSize(ref value) => {
55109                let value: longhands::background_size::computed_value::T =
55110                    ToAnimatedValue::from_animated_value(value.clone());
55111                style.mutate_background().set_background_size(value);
55112            }
55113            AnimationValue::BorderImageOutset(ref value) => {
55114                let value: longhands::border_image_outset::computed_value::T =
55115                    ToAnimatedValue::from_animated_value(value.clone());
55116                style.mutate_border().set_border_image_outset(value);
55117            }
55118            AnimationValue::BorderImageSlice(ref value) => {
55119                let value: longhands::border_image_slice::computed_value::T =
55120                    ToAnimatedValue::from_animated_value(value.clone());
55121                style.mutate_border().set_border_image_slice(value);
55122            }
55123            AnimationValue::BorderImageWidth(ref value) => {
55124                let value: longhands::border_image_width::computed_value::T =
55125                    ToAnimatedValue::from_animated_value(value.clone());
55126                style.mutate_border().set_border_image_width(value);
55127            }
55128            AnimationValue::BorderSpacing(ref value) => {
55129                let value: longhands::border_spacing::computed_value::T =
55130                    ToAnimatedValue::from_animated_value(value.clone());
55131                style.mutate_inherited_table().set_border_spacing(value);
55132            }
55133            AnimationValue::BoxShadow(ref value) => {
55134                let value: longhands::box_shadow::computed_value::T =
55135                    ToAnimatedValue::from_animated_value(value.clone());
55136                style.mutate_effects().set_box_shadow(value);
55137            }
55138            AnimationValue::Clip(ref value) => {
55139                let value: longhands::clip::computed_value::T =
55140                    ToAnimatedValue::from_animated_value(value.clone());
55141                style.mutate_effects().set_clip(value);
55142            }
55143            AnimationValue::ClipPath(ref value) => {
55144                let value: longhands::clip_path::computed_value::T =
55145                    ToAnimatedValue::from_animated_value(value.clone());
55146                style.mutate_svg().set_clip_path(value);
55147            }
55148            AnimationValue::Color(ref value) => {
55149                let value: longhands::color::computed_value::T =
55150                    ToAnimatedValue::from_animated_value(value.clone());
55151                style.mutate_inherited_text().set_color(value);
55152            }
55153            AnimationValue::ColorScheme(ref value) => {
55154                let value: longhands::color_scheme::computed_value::T =
55155                    value.clone();
55156                style.mutate_inherited_ui().set_color_scheme(value);
55157            }
55158            AnimationValue::ColumnWidth(ref value) => {
55159                let value: longhands::column_width::computed_value::T =
55160                    ToAnimatedValue::from_animated_value(value.clone());
55161                style.mutate_column().set_column_width(value);
55162            }
55163            AnimationValue::ContainerName(..) => unreachable!(),
55164            AnimationValue::Content(ref value) => {
55165                let value: longhands::content::computed_value::T =
55166                    value.clone();
55167                style.mutate_counters().set_content(value);
55168            }
55169            AnimationValue::CounterIncrement(ref value) => {
55170                let value: longhands::counter_increment::computed_value::T =
55171                    value.clone();
55172                style.mutate_counters().set_counter_increment(value);
55173            }
55174            AnimationValue::CounterReset(ref value) => {
55175                let value: longhands::counter_reset::computed_value::T =
55176                    value.clone();
55177                style.mutate_counters().set_counter_reset(value);
55178            }
55179            AnimationValue::Cursor(ref value) => {
55180                let value: longhands::cursor::computed_value::T =
55181                    value.clone();
55182                style.mutate_inherited_ui().set_cursor(value);
55183            }
55184            AnimationValue::Filter(ref value) => {
55185                let value: longhands::filter::computed_value::T =
55186                    ToAnimatedValue::from_animated_value(value.clone());
55187                style.mutate_effects().set_filter(value);
55188            }
55189            AnimationValue::FlexBasis(ref value) => {
55190                let value: longhands::flex_basis::computed_value::T =
55191                    ToAnimatedValue::from_animated_value(value.clone());
55192                style.mutate_position().set_flex_basis(value);
55193            }
55194            AnimationValue::FontFamily(ref value) => {
55195                let value: longhands::font_family::computed_value::T =
55196                    value.clone();
55197                style.mutate_font().set_font_family(value);
55198            }
55199            AnimationValue::FontSize(ref value) => {
55200                let value: longhands::font_size::computed_value::T =
55201                    ToAnimatedValue::from_animated_value(value.clone());
55202                style.mutate_font().set_font_size(value);
55203            }
55204            AnimationValue::FontVariationSettings(ref value) => {
55205                let value: longhands::font_variation_settings::computed_value::T =
55206                    ToAnimatedValue::from_animated_value(value.clone());
55207                style.mutate_font().set_font_variation_settings(value);
55208            }
55209            AnimationValue::GridTemplateAreas(ref value) => {
55210                let value: longhands::grid_template_areas::computed_value::T =
55211                    value.clone();
55212                style.mutate_position().set_grid_template_areas(value);
55213            }
55214            AnimationValue::LetterSpacing(ref value) => {
55215                let value: longhands::letter_spacing::computed_value::T =
55216                    ToAnimatedValue::from_animated_value(value.clone());
55217                style.mutate_inherited_text().set_letter_spacing(value);
55218            }
55219            AnimationValue::LineHeight(ref value) => {
55220                let value: longhands::line_height::computed_value::T =
55221                    ToAnimatedValue::from_animated_value(value.clone());
55222                style.mutate_font().set_line_height(value);
55223            }
55224            AnimationValue::MaskImage(ref value) => {
55225                let value: longhands::mask_image::computed_value::T =
55226                    value.clone();
55227                style.mutate_svg().set_mask_image(value);
55228            }
55229            AnimationValue::OffsetPath(ref value) => {
55230                let value: longhands::offset_path::computed_value::T =
55231                    ToAnimatedValue::from_animated_value(value.clone());
55232                style.mutate_box().set_offset_path(value);
55233            }
55234            AnimationValue::Perspective(ref value) => {
55235                let value: longhands::perspective::computed_value::T =
55236                    ToAnimatedValue::from_animated_value(value.clone());
55237                style.mutate_box().set_perspective(value);
55238            }
55239            AnimationValue::Quotes(ref value) => {
55240                let value: longhands::quotes::computed_value::T =
55241                    value.clone();
55242                style.mutate_list().set_quotes(value);
55243            }
55244            AnimationValue::Rotate(ref value) => {
55245                let value: longhands::rotate::computed_value::T =
55246                    ToAnimatedValue::from_animated_value(value.clone());
55247                style.mutate_box().set_rotate(value);
55248            }
55249            AnimationValue::Scale(ref value) => {
55250                let value: longhands::scale::computed_value::T =
55251                    ToAnimatedValue::from_animated_value(value.clone());
55252                style.mutate_box().set_scale(value);
55253            }
55254            AnimationValue::TextIndent(ref value) => {
55255                let value: longhands::text_indent::computed_value::T =
55256                    ToAnimatedValue::from_animated_value(value.clone());
55257                style.mutate_inherited_text().set_text_indent(value);
55258            }
55259            AnimationValue::TextOverflow(ref value) => {
55260                let value: longhands::text_overflow::computed_value::T =
55261                    value.clone();
55262                style.mutate_text().set_text_overflow(value);
55263            }
55264            AnimationValue::TextShadow(ref value) => {
55265                let value: longhands::text_shadow::computed_value::T =
55266                    ToAnimatedValue::from_animated_value(value.clone());
55267                style.mutate_inherited_text().set_text_shadow(value);
55268            }
55269            AnimationValue::Transform(ref value) => {
55270                let value: longhands::transform::computed_value::T =
55271                    ToAnimatedValue::from_animated_value(value.clone());
55272                style.mutate_box().set_transform(value);
55273            }
55274            AnimationValue::TransformOrigin(ref value) => {
55275                let value: longhands::transform_origin::computed_value::T =
55276                    ToAnimatedValue::from_animated_value(value.clone());
55277                style.mutate_box().set_transform_origin(value);
55278            }
55279            AnimationValue::TransitionBehavior(..) => unreachable!(),
55280            AnimationValue::TransitionDelay(..) => unreachable!(),
55281            AnimationValue::TransitionDuration(..) => unreachable!(),
55282            AnimationValue::TransitionProperty(..) => unreachable!(),
55283            AnimationValue::TransitionTimingFunction(..) => unreachable!(),
55284            AnimationValue::Translate(ref value) => {
55285                let value: longhands::translate::computed_value::T =
55286                    ToAnimatedValue::from_animated_value(value.clone());
55287                style.mutate_box().set_translate(value);
55288            }
55289            AnimationValue::VerticalAlign(ref value) => {
55290                let value: longhands::vertical_align::computed_value::T =
55291                    ToAnimatedValue::from_animated_value(value.clone());
55292                style.mutate_box().set_vertical_align(value);
55293            }
55294            AnimationValue::ViewTransitionClass(ref value) => {
55295                let value: longhands::view_transition_class::computed_value::T =
55296                    value.clone();
55297                style.mutate_ui().set_view_transition_class(value);
55298            }
55299            AnimationValue::ViewTransitionName(ref value) => {
55300                let value: longhands::view_transition_name::computed_value::T =
55301                    value.clone();
55302                style.mutate_ui().set_view_transition_name(value);
55303            }
55304            AnimationValue::WillChange(..) => unreachable!(),
55305            AnimationValue::WordSpacing(ref value) => {
55306                let value: longhands::word_spacing::computed_value::T =
55307                    ToAnimatedValue::from_animated_value(value.clone());
55308                style.mutate_inherited_text().set_word_spacing(value);
55309            }
55310            AnimationValue::XLang(..) => unreachable!(),
55311            AnimationValue::ObjectPosition(ref value) => {
55312                let value: longhands::object_position::computed_value::T =
55313                    ToAnimatedValue::from_animated_value(value.clone());
55314                style.mutate_position().set_object_position(value);
55315            }
55316            AnimationValue::PerspectiveOrigin(ref value) => {
55317                let value: longhands::perspective_origin::computed_value::T =
55318                    ToAnimatedValue::from_animated_value(value.clone());
55319                style.mutate_box().set_perspective_origin(value);
55320            }
55321            AnimationValue::GridTemplateColumns(ref value) => {
55322                let value: longhands::grid_template_columns::computed_value::T =
55323                    ToAnimatedValue::from_animated_value(value.clone());
55324                style.mutate_position().set_grid_template_columns(value);
55325            }
55326            AnimationValue::GridTemplateRows(ref value) => {
55327                let value: longhands::grid_template_rows::computed_value::T =
55328                    ToAnimatedValue::from_animated_value(value.clone());
55329                style.mutate_position().set_grid_template_rows(value);
55330            }
55331            AnimationValue::BorderImageSource(ref value) => {
55332                let value: longhands::border_image_source::computed_value::T =
55333                    value.clone();
55334                style.mutate_border().set_border_image_source(value);
55335            }
55336            AnimationValue::ListStyleImage(ref value) => {
55337                let value: longhands::list_style_image::computed_value::T =
55338                    value.clone();
55339                style.mutate_list().set_list_style_image(value);
55340            }
55341            AnimationValue::GridAutoColumns(ref value) => {
55342                let value: longhands::grid_auto_columns::computed_value::T =
55343                    value.clone();
55344                style.mutate_position().set_grid_auto_columns(value);
55345            }
55346            AnimationValue::GridAutoRows(ref value) => {
55347                let value: longhands::grid_auto_rows::computed_value::T =
55348                    value.clone();
55349                style.mutate_position().set_grid_auto_rows(value);
55350            }
55351            AnimationValue::OutlineOffset(ref value) => {
55352                let value: longhands::outline_offset::computed_value::T =
55353                    ToAnimatedValue::from_animated_value(value.clone());
55354                style.mutate_outline().set_outline_offset(value);
55355            }
55356            AnimationValue::OverflowClipMargin(ref value) => {
55357                let value: longhands::overflow_clip_margin::computed_value::T =
55358                    ToAnimatedValue::from_animated_value(value.clone());
55359                style.mutate_margin().set_overflow_clip_margin(value);
55360            }
55361            AnimationValue::ColumnGap(ref value) => {
55362                let value: longhands::column_gap::computed_value::T =
55363                    ToAnimatedValue::from_animated_value(value.clone());
55364                style.mutate_position().set_column_gap(value);
55365            }
55366            AnimationValue::RowGap(ref value) => {
55367                let value: longhands::row_gap::computed_value::T =
55368                    ToAnimatedValue::from_animated_value(value.clone());
55369                style.mutate_position().set_row_gap(value);
55370            }
55371            AnimationValue::GridColumnEnd(ref value) => {
55372                let value: longhands::grid_column_end::computed_value::T =
55373                    value.clone();
55374                style.mutate_position().set_grid_column_end(value);
55375            }
55376            AnimationValue::GridColumnStart(ref value) => {
55377                let value: longhands::grid_column_start::computed_value::T =
55378                    value.clone();
55379                style.mutate_position().set_grid_column_start(value);
55380            }
55381            AnimationValue::GridRowEnd(ref value) => {
55382                let value: longhands::grid_row_end::computed_value::T =
55383                    value.clone();
55384                style.mutate_position().set_grid_row_end(value);
55385            }
55386            AnimationValue::GridRowStart(ref value) => {
55387                let value: longhands::grid_row_start::computed_value::T =
55388                    value.clone();
55389                style.mutate_position().set_grid_row_start(value);
55390            }
55391            AnimationValue::MaxBlockSize(..) => unreachable!(),
55392            AnimationValue::MaxHeight(ref value) => {
55393                let value: longhands::max_height::computed_value::T =
55394                    ToAnimatedValue::from_animated_value(value.clone());
55395                style.mutate_position().set_max_height(value);
55396            }
55397            AnimationValue::MaxInlineSize(..) => unreachable!(),
55398            AnimationValue::MaxWidth(ref value) => {
55399                let value: longhands::max_width::computed_value::T =
55400                    ToAnimatedValue::from_animated_value(value.clone());
55401                style.mutate_position().set_max_width(value);
55402            }
55403            AnimationValue::BorderBottomLeftRadius(ref value) => {
55404                let value: longhands::border_bottom_left_radius::computed_value::T =
55405                    ToAnimatedValue::from_animated_value(value.clone());
55406                style.mutate_border().set_border_bottom_left_radius(value);
55407            }
55408            AnimationValue::BorderBottomRightRadius(ref value) => {
55409                let value: longhands::border_bottom_right_radius::computed_value::T =
55410                    ToAnimatedValue::from_animated_value(value.clone());
55411                style.mutate_border().set_border_bottom_right_radius(value);
55412            }
55413            AnimationValue::BorderEndEndRadius(..) => unreachable!(),
55414            AnimationValue::BorderEndStartRadius(..) => unreachable!(),
55415            AnimationValue::BorderStartEndRadius(..) => unreachable!(),
55416            AnimationValue::BorderStartStartRadius(..) => unreachable!(),
55417            AnimationValue::BorderTopLeftRadius(ref value) => {
55418                let value: longhands::border_top_left_radius::computed_value::T =
55419                    ToAnimatedValue::from_animated_value(value.clone());
55420                style.mutate_border().set_border_top_left_radius(value);
55421            }
55422            AnimationValue::BorderTopRightRadius(ref value) => {
55423                let value: longhands::border_top_right_radius::computed_value::T =
55424                    ToAnimatedValue::from_animated_value(value.clone());
55425                style.mutate_border().set_border_top_right_radius(value);
55426            }
55427            AnimationValue::Bottom(ref value) => {
55428                let value: longhands::bottom::computed_value::T =
55429                    ToAnimatedValue::from_animated_value(value.clone());
55430                style.mutate_position().set_bottom(value);
55431            }
55432            AnimationValue::InsetBlockEnd(..) => unreachable!(),
55433            AnimationValue::InsetBlockStart(..) => unreachable!(),
55434            AnimationValue::InsetInlineEnd(..) => unreachable!(),
55435            AnimationValue::InsetInlineStart(..) => unreachable!(),
55436            AnimationValue::Left(ref value) => {
55437                let value: longhands::left::computed_value::T =
55438                    ToAnimatedValue::from_animated_value(value.clone());
55439                style.mutate_position().set_left(value);
55440            }
55441            AnimationValue::Right(ref value) => {
55442                let value: longhands::right::computed_value::T =
55443                    ToAnimatedValue::from_animated_value(value.clone());
55444                style.mutate_position().set_right(value);
55445            }
55446            AnimationValue::Top(ref value) => {
55447                let value: longhands::top::computed_value::T =
55448                    ToAnimatedValue::from_animated_value(value.clone());
55449                style.mutate_position().set_top(value);
55450            }
55451            AnimationValue::MarginBlockEnd(..) => unreachable!(),
55452            AnimationValue::MarginBlockStart(..) => unreachable!(),
55453            AnimationValue::MarginBottom(ref value) => {
55454                let value: longhands::margin_bottom::computed_value::T =
55455                    ToAnimatedValue::from_animated_value(value.clone());
55456                style.mutate_margin().set_margin_bottom(value);
55457            }
55458            AnimationValue::MarginInlineEnd(..) => unreachable!(),
55459            AnimationValue::MarginInlineStart(..) => unreachable!(),
55460            AnimationValue::MarginLeft(ref value) => {
55461                let value: longhands::margin_left::computed_value::T =
55462                    ToAnimatedValue::from_animated_value(value.clone());
55463                style.mutate_margin().set_margin_left(value);
55464            }
55465            AnimationValue::MarginRight(ref value) => {
55466                let value: longhands::margin_right::computed_value::T =
55467                    ToAnimatedValue::from_animated_value(value.clone());
55468                style.mutate_margin().set_margin_right(value);
55469            }
55470            AnimationValue::MarginTop(ref value) => {
55471                let value: longhands::margin_top::computed_value::T =
55472                    ToAnimatedValue::from_animated_value(value.clone());
55473                style.mutate_margin().set_margin_top(value);
55474            }
55475            AnimationValue::PaddingBlockEnd(..) => unreachable!(),
55476            AnimationValue::PaddingBlockStart(..) => unreachable!(),
55477            AnimationValue::PaddingBottom(ref value) => {
55478                let value: longhands::padding_bottom::computed_value::T =
55479                    ToAnimatedValue::from_animated_value(value.clone());
55480                style.mutate_padding().set_padding_bottom(value);
55481            }
55482            AnimationValue::PaddingInlineEnd(..) => unreachable!(),
55483            AnimationValue::PaddingInlineStart(..) => unreachable!(),
55484            AnimationValue::PaddingLeft(ref value) => {
55485                let value: longhands::padding_left::computed_value::T =
55486                    ToAnimatedValue::from_animated_value(value.clone());
55487                style.mutate_padding().set_padding_left(value);
55488            }
55489            AnimationValue::PaddingRight(ref value) => {
55490                let value: longhands::padding_right::computed_value::T =
55491                    ToAnimatedValue::from_animated_value(value.clone());
55492                style.mutate_padding().set_padding_right(value);
55493            }
55494            AnimationValue::PaddingTop(ref value) => {
55495                let value: longhands::padding_top::computed_value::T =
55496                    ToAnimatedValue::from_animated_value(value.clone());
55497                style.mutate_padding().set_padding_top(value);
55498            }
55499            AnimationValue::BlockSize(..) => unreachable!(),
55500            AnimationValue::Height(ref value) => {
55501                let value: longhands::height::computed_value::T =
55502                    ToAnimatedValue::from_animated_value(value.clone());
55503                style.mutate_position().set_height(value);
55504            }
55505            AnimationValue::InlineSize(..) => unreachable!(),
55506            AnimationValue::MinBlockSize(..) => unreachable!(),
55507            AnimationValue::MinHeight(ref value) => {
55508                let value: longhands::min_height::computed_value::T =
55509                    ToAnimatedValue::from_animated_value(value.clone());
55510                style.mutate_position().set_min_height(value);
55511            }
55512            AnimationValue::MinInlineSize(..) => unreachable!(),
55513            AnimationValue::MinWidth(ref value) => {
55514                let value: longhands::min_width::computed_value::T =
55515                    ToAnimatedValue::from_animated_value(value.clone());
55516                style.mutate_position().set_min_width(value);
55517            }
55518            AnimationValue::Width(ref value) => {
55519                let value: longhands::width::computed_value::T =
55520                    ToAnimatedValue::from_animated_value(value.clone());
55521                style.mutate_position().set_width(value);
55522            }
55523            AnimationValue::BorderBlockEndWidth(..) => unreachable!(),
55524            AnimationValue::BorderBlockStartWidth(..) => unreachable!(),
55525            AnimationValue::BorderBottomWidth(ref value) => {
55526                let value: longhands::border_bottom_width::computed_value::T =
55527                    ToAnimatedValue::from_animated_value(value.clone());
55528                style.mutate_border().set_border_bottom_width(value);
55529            }
55530            AnimationValue::BorderInlineEndWidth(..) => unreachable!(),
55531            AnimationValue::BorderInlineStartWidth(..) => unreachable!(),
55532            AnimationValue::BorderLeftWidth(ref value) => {
55533                let value: longhands::border_left_width::computed_value::T =
55534                    ToAnimatedValue::from_animated_value(value.clone());
55535                style.mutate_border().set_border_left_width(value);
55536            }
55537            AnimationValue::BorderRightWidth(ref value) => {
55538                let value: longhands::border_right_width::computed_value::T =
55539                    ToAnimatedValue::from_animated_value(value.clone());
55540                style.mutate_border().set_border_right_width(value);
55541            }
55542            AnimationValue::BorderTopWidth(ref value) => {
55543                let value: longhands::border_top_width::computed_value::T =
55544                    ToAnimatedValue::from_animated_value(value.clone());
55545                style.mutate_border().set_border_top_width(value);
55546            }
55547            AnimationValue::OutlineWidth(ref value) => {
55548                let value: longhands::outline_width::computed_value::T =
55549                    ToAnimatedValue::from_animated_value(value.clone());
55550                style.mutate_outline().set_outline_width(value);
55551            }
55552            AnimationValue::BackgroundColor(ref value) => {
55553                let value: longhands::background_color::computed_value::T =
55554                    ToAnimatedValue::from_animated_value(value.clone());
55555                style.mutate_background().set_background_color(value);
55556            }
55557            AnimationValue::BorderBlockEndColor(..) => unreachable!(),
55558            AnimationValue::BorderBlockStartColor(..) => unreachable!(),
55559            AnimationValue::BorderBottomColor(ref value) => {
55560                let value: longhands::border_bottom_color::computed_value::T =
55561                    ToAnimatedValue::from_animated_value(value.clone());
55562                style.mutate_border().set_border_bottom_color(value);
55563            }
55564            AnimationValue::BorderInlineEndColor(..) => unreachable!(),
55565            AnimationValue::BorderInlineStartColor(..) => unreachable!(),
55566            AnimationValue::BorderLeftColor(ref value) => {
55567                let value: longhands::border_left_color::computed_value::T =
55568                    ToAnimatedValue::from_animated_value(value.clone());
55569                style.mutate_border().set_border_left_color(value);
55570            }
55571            AnimationValue::BorderRightColor(ref value) => {
55572                let value: longhands::border_right_color::computed_value::T =
55573                    ToAnimatedValue::from_animated_value(value.clone());
55574                style.mutate_border().set_border_right_color(value);
55575            }
55576            AnimationValue::BorderTopColor(ref value) => {
55577                let value: longhands::border_top_color::computed_value::T =
55578                    ToAnimatedValue::from_animated_value(value.clone());
55579                style.mutate_border().set_border_top_color(value);
55580            }
55581            AnimationValue::OutlineColor(ref value) => {
55582                let value: longhands::outline_color::computed_value::T =
55583                    ToAnimatedValue::from_animated_value(value.clone());
55584                style.mutate_outline().set_outline_color(value);
55585            }
55586            AnimationValue::TextDecorationColor(ref value) => {
55587                let value: longhands::text_decoration_color::computed_value::T =
55588                    ToAnimatedValue::from_animated_value(value.clone());
55589                style.mutate_text().set_text_decoration_color(value);
55590            }
55591            AnimationValue::Custom(..) => unreachable!(),
55592        }
55593    }
55594
55595    /// As above, but a stub for Gecko.
55596    #[cfg(feature = "gecko")]
55597    pub fn set_in_style_for_servo(&self, _: &mut ComputedValues) {
55598    }
55599}
55600
55601fn animate_discrete<T: Clone>(this: &T, other: &T, procedure: Procedure) -> Result<T, ()> {
55602    if let Procedure::Interpolate { progress } = procedure {
55603        Ok(if progress < 0.5 { this.clone() } else { other.clone() })
55604    } else {
55605        Err(())
55606    }
55607}
55608
55609impl Animate for AnimationValue {
55610    fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
55611        Ok(unsafe {
55612            use self::AnimationValue::*;
55613
55614            let this_tag = *(self as *const _ as *const u16);
55615            let other_tag = *(other as *const _ as *const u16);
55616            if this_tag != other_tag {
55617                panic!("Unexpected AnimationValue::animate call");
55618            }
55619
55620            match *self {
55621                
55622                AlignContent(ref this) => {
55623                    let other_repr =
55624                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::AlignContent as ToComputedValue>::ComputedValue>);
55625                    let value = animate_discrete(this, &other_repr.value, procedure)?;
55626
55627                    let mut out = mem::MaybeUninit::uninit();
55628                    ptr::write(
55629                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::AlignContent as ToComputedValue>::ComputedValue>,
55630                        AnimationValueVariantRepr {
55631                            tag: this_tag,
55632                            value,
55633                        },
55634                    );
55635                    out.assume_init()
55636                },
55637                AlignItems(ref this) => {
55638                    let other_repr =
55639                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::AlignItems as ToComputedValue>::ComputedValue>);
55640                    let value = animate_discrete(this, &other_repr.value, procedure)?;
55641
55642                    let mut out = mem::MaybeUninit::uninit();
55643                    ptr::write(
55644                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::AlignItems as ToComputedValue>::ComputedValue>,
55645                        AnimationValueVariantRepr {
55646                            tag: this_tag,
55647                            value,
55648                        },
55649                    );
55650                    out.assume_init()
55651                },
55652                AlignSelf(ref this) => {
55653                    let other_repr =
55654                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::AlignSelf as ToComputedValue>::ComputedValue>);
55655                    let value = animate_discrete(this, &other_repr.value, procedure)?;
55656
55657                    let mut out = mem::MaybeUninit::uninit();
55658                    ptr::write(
55659                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::AlignSelf as ToComputedValue>::ComputedValue>,
55660                        AnimationValueVariantRepr {
55661                            tag: this_tag,
55662                            value,
55663                        },
55664                    );
55665                    out.assume_init()
55666                },
55667                AspectRatio(ref this) => {
55668                    let other_repr =
55669                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::AspectRatio as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
55670                    let value = this.animate(&other_repr.value, procedure)?;
55671
55672                    let mut out = mem::MaybeUninit::uninit();
55673                    ptr::write(
55674                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::AspectRatio as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
55675                        AnimationValueVariantRepr {
55676                            tag: this_tag,
55677                            value,
55678                        },
55679                    );
55680                    out.assume_init()
55681                },
55682                BackfaceVisibility(ref this) => {
55683                    let other_repr =
55684                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::backface_visibility::SpecifiedValue as ToComputedValue>::ComputedValue>);
55685                    let value = animate_discrete(this, &other_repr.value, procedure)?;
55686
55687                    let mut out = mem::MaybeUninit::uninit();
55688                    ptr::write(
55689                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::backface_visibility::SpecifiedValue as ToComputedValue>::ComputedValue>,
55690                        AnimationValueVariantRepr {
55691                            tag: this_tag,
55692                            value,
55693                        },
55694                    );
55695                    out.assume_init()
55696                },
55697                BaselineSource(ref this) => {
55698                    let other_repr =
55699                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::BaselineSource as ToComputedValue>::ComputedValue>);
55700                    let value = animate_discrete(this, &other_repr.value, procedure)?;
55701
55702                    let mut out = mem::MaybeUninit::uninit();
55703                    ptr::write(
55704                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::BaselineSource as ToComputedValue>::ComputedValue>,
55705                        AnimationValueVariantRepr {
55706                            tag: this_tag,
55707                            value,
55708                        },
55709                    );
55710                    out.assume_init()
55711                },
55712                BorderCollapse(ref this) => {
55713                    let other_repr =
55714                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::border_collapse::SpecifiedValue as ToComputedValue>::ComputedValue>);
55715                    let value = animate_discrete(this, &other_repr.value, procedure)?;
55716
55717                    let mut out = mem::MaybeUninit::uninit();
55718                    ptr::write(
55719                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::border_collapse::SpecifiedValue as ToComputedValue>::ComputedValue>,
55720                        AnimationValueVariantRepr {
55721                            tag: this_tag,
55722                            value,
55723                        },
55724                    );
55725                    out.assume_init()
55726                },
55727                BorderImageRepeat(ref this) => {
55728                    let other_repr =
55729                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::BorderImageRepeat as ToComputedValue>::ComputedValue>);
55730                    let value = animate_discrete(this, &other_repr.value, procedure)?;
55731
55732                    let mut out = mem::MaybeUninit::uninit();
55733                    ptr::write(
55734                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::BorderImageRepeat as ToComputedValue>::ComputedValue>,
55735                        AnimationValueVariantRepr {
55736                            tag: this_tag,
55737                            value,
55738                        },
55739                    );
55740                    out.assume_init()
55741                },
55742                BoxSizing(ref this) => {
55743                    let other_repr =
55744                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::box_sizing::SpecifiedValue as ToComputedValue>::ComputedValue>);
55745                    let value = animate_discrete(this, &other_repr.value, procedure)?;
55746
55747                    let mut out = mem::MaybeUninit::uninit();
55748                    ptr::write(
55749                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::box_sizing::SpecifiedValue as ToComputedValue>::ComputedValue>,
55750                        AnimationValueVariantRepr {
55751                            tag: this_tag,
55752                            value,
55753                        },
55754                    );
55755                    out.assume_init()
55756                },
55757                CaptionSide(ref this) => {
55758                    let other_repr =
55759                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::table::CaptionSide as ToComputedValue>::ComputedValue>);
55760                    let value = animate_discrete(this, &other_repr.value, procedure)?;
55761
55762                    let mut out = mem::MaybeUninit::uninit();
55763                    ptr::write(
55764                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::table::CaptionSide as ToComputedValue>::ComputedValue>,
55765                        AnimationValueVariantRepr {
55766                            tag: this_tag,
55767                            value,
55768                        },
55769                    );
55770                    out.assume_init()
55771                },
55772                Clear(ref this) => {
55773                    let other_repr =
55774                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::Clear as ToComputedValue>::ComputedValue>);
55775                    let value = animate_discrete(this, &other_repr.value, procedure)?;
55776
55777                    let mut out = mem::MaybeUninit::uninit();
55778                    ptr::write(
55779                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::Clear as ToComputedValue>::ComputedValue>,
55780                        AnimationValueVariantRepr {
55781                            tag: this_tag,
55782                            value,
55783                        },
55784                    );
55785                    out.assume_init()
55786                },
55787                ColumnCount(ref this) => {
55788                    let other_repr =
55789                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::ColumnCount as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
55790                    let value = this.animate(&other_repr.value, procedure)?;
55791
55792                    let mut out = mem::MaybeUninit::uninit();
55793                    ptr::write(
55794                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::ColumnCount as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
55795                        AnimationValueVariantRepr {
55796                            tag: this_tag,
55797                            value,
55798                        },
55799                    );
55800                    out.assume_init()
55801                },
55802                ColumnSpan(ref this) => {
55803                    let other_repr =
55804                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::column_span::SpecifiedValue as ToComputedValue>::ComputedValue>);
55805                    let value = animate_discrete(this, &other_repr.value, procedure)?;
55806
55807                    let mut out = mem::MaybeUninit::uninit();
55808                    ptr::write(
55809                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::column_span::SpecifiedValue as ToComputedValue>::ComputedValue>,
55810                        AnimationValueVariantRepr {
55811                            tag: this_tag,
55812                            value,
55813                        },
55814                    );
55815                    out.assume_init()
55816                },
55817                Display(ref this) => {
55818                    let other_repr =
55819                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::Display as ToComputedValue>::ComputedValue>);
55820                    let value = animate_discrete(this, &other_repr.value, procedure)?;
55821
55822                    let mut out = mem::MaybeUninit::uninit();
55823                    ptr::write(
55824                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::Display as ToComputedValue>::ComputedValue>,
55825                        AnimationValueVariantRepr {
55826                            tag: this_tag,
55827                            value,
55828                        },
55829                    );
55830                    out.assume_init()
55831                },
55832                EmptyCells(ref this) => {
55833                    let other_repr =
55834                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::empty_cells::SpecifiedValue as ToComputedValue>::ComputedValue>);
55835                    let value = animate_discrete(this, &other_repr.value, procedure)?;
55836
55837                    let mut out = mem::MaybeUninit::uninit();
55838                    ptr::write(
55839                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::empty_cells::SpecifiedValue as ToComputedValue>::ComputedValue>,
55840                        AnimationValueVariantRepr {
55841                            tag: this_tag,
55842                            value,
55843                        },
55844                    );
55845                    out.assume_init()
55846                },
55847                FlexDirection(ref this) => {
55848                    let other_repr =
55849                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::flex_direction::SpecifiedValue as ToComputedValue>::ComputedValue>);
55850                    let value = animate_discrete(this, &other_repr.value, procedure)?;
55851
55852                    let mut out = mem::MaybeUninit::uninit();
55853                    ptr::write(
55854                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::flex_direction::SpecifiedValue as ToComputedValue>::ComputedValue>,
55855                        AnimationValueVariantRepr {
55856                            tag: this_tag,
55857                            value,
55858                        },
55859                    );
55860                    out.assume_init()
55861                },
55862                FlexWrap(ref this) => {
55863                    let other_repr =
55864                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::flex_wrap::SpecifiedValue as ToComputedValue>::ComputedValue>);
55865                    let value = animate_discrete(this, &other_repr.value, procedure)?;
55866
55867                    let mut out = mem::MaybeUninit::uninit();
55868                    ptr::write(
55869                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::flex_wrap::SpecifiedValue as ToComputedValue>::ComputedValue>,
55870                        AnimationValueVariantRepr {
55871                            tag: this_tag,
55872                            value,
55873                        },
55874                    );
55875                    out.assume_init()
55876                },
55877                Float(ref this) => {
55878                    let other_repr =
55879                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::Float as ToComputedValue>::ComputedValue>);
55880                    let value = animate_discrete(this, &other_repr.value, procedure)?;
55881
55882                    let mut out = mem::MaybeUninit::uninit();
55883                    ptr::write(
55884                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::Float as ToComputedValue>::ComputedValue>,
55885                        AnimationValueVariantRepr {
55886                            tag: this_tag,
55887                            value,
55888                        },
55889                    );
55890                    out.assume_init()
55891                },
55892                FontLanguageOverride(ref this) => {
55893                    let other_repr =
55894                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::FontLanguageOverride as ToComputedValue>::ComputedValue>);
55895                    let value = animate_discrete(this, &other_repr.value, procedure)?;
55896
55897                    let mut out = mem::MaybeUninit::uninit();
55898                    ptr::write(
55899                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::FontLanguageOverride as ToComputedValue>::ComputedValue>,
55900                        AnimationValueVariantRepr {
55901                            tag: this_tag,
55902                            value,
55903                        },
55904                    );
55905                    out.assume_init()
55906                },
55907                FontStretch(ref this) => {
55908                    let other_repr =
55909                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::FontStretch as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
55910                    let value = this.animate(&other_repr.value, procedure)?;
55911
55912                    let mut out = mem::MaybeUninit::uninit();
55913                    ptr::write(
55914                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::FontStretch as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
55915                        AnimationValueVariantRepr {
55916                            tag: this_tag,
55917                            value,
55918                        },
55919                    );
55920                    out.assume_init()
55921                },
55922                FontStyle(ref this) => {
55923                    let other_repr =
55924                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::FontStyle as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
55925                    let value = this.animate(&other_repr.value, procedure)?;
55926
55927                    let mut out = mem::MaybeUninit::uninit();
55928                    ptr::write(
55929                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::FontStyle as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
55930                        AnimationValueVariantRepr {
55931                            tag: this_tag,
55932                            value,
55933                        },
55934                    );
55935                    out.assume_init()
55936                },
55937                FontVariantCaps(ref this) => {
55938                    let other_repr =
55939                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::font_variant_caps::SpecifiedValue as ToComputedValue>::ComputedValue>);
55940                    let value = animate_discrete(this, &other_repr.value, procedure)?;
55941
55942                    let mut out = mem::MaybeUninit::uninit();
55943                    ptr::write(
55944                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::font_variant_caps::SpecifiedValue as ToComputedValue>::ComputedValue>,
55945                        AnimationValueVariantRepr {
55946                            tag: this_tag,
55947                            value,
55948                        },
55949                    );
55950                    out.assume_init()
55951                },
55952                FontWeight(ref this) => {
55953                    let other_repr =
55954                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::FontWeight as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
55955                    let value = this.animate(&other_repr.value, procedure)?;
55956
55957                    let mut out = mem::MaybeUninit::uninit();
55958                    ptr::write(
55959                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::FontWeight as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
55960                        AnimationValueVariantRepr {
55961                            tag: this_tag,
55962                            value,
55963                        },
55964                    );
55965                    out.assume_init()
55966                },
55967                GridAutoFlow(ref this) => {
55968                    let other_repr =
55969                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::GridAutoFlow as ToComputedValue>::ComputedValue>);
55970                    let value = animate_discrete(this, &other_repr.value, procedure)?;
55971
55972                    let mut out = mem::MaybeUninit::uninit();
55973                    ptr::write(
55974                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::GridAutoFlow as ToComputedValue>::ComputedValue>,
55975                        AnimationValueVariantRepr {
55976                            tag: this_tag,
55977                            value,
55978                        },
55979                    );
55980                    out.assume_init()
55981                },
55982                ImageRendering(ref this) => {
55983                    let other_repr =
55984                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::ImageRendering as ToComputedValue>::ComputedValue>);
55985                    let value = animate_discrete(this, &other_repr.value, procedure)?;
55986
55987                    let mut out = mem::MaybeUninit::uninit();
55988                    ptr::write(
55989                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::ImageRendering as ToComputedValue>::ComputedValue>,
55990                        AnimationValueVariantRepr {
55991                            tag: this_tag,
55992                            value,
55993                        },
55994                    );
55995                    out.assume_init()
55996                },
55997                Isolation(ref this) => {
55998                    let other_repr =
55999                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::isolation::SpecifiedValue as ToComputedValue>::ComputedValue>);
56000                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56001
56002                    let mut out = mem::MaybeUninit::uninit();
56003                    ptr::write(
56004                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::isolation::SpecifiedValue as ToComputedValue>::ComputedValue>,
56005                        AnimationValueVariantRepr {
56006                            tag: this_tag,
56007                            value,
56008                        },
56009                    );
56010                    out.assume_init()
56011                },
56012                JustifyContent(ref this) => {
56013                    let other_repr =
56014                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::JustifyContent as ToComputedValue>::ComputedValue>);
56015                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56016
56017                    let mut out = mem::MaybeUninit::uninit();
56018                    ptr::write(
56019                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::JustifyContent as ToComputedValue>::ComputedValue>,
56020                        AnimationValueVariantRepr {
56021                            tag: this_tag,
56022                            value,
56023                        },
56024                    );
56025                    out.assume_init()
56026                },
56027                JustifyItems(ref this) => {
56028                    let other_repr =
56029                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::JustifyItems as ToComputedValue>::ComputedValue>);
56030                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56031
56032                    let mut out = mem::MaybeUninit::uninit();
56033                    ptr::write(
56034                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::JustifyItems as ToComputedValue>::ComputedValue>,
56035                        AnimationValueVariantRepr {
56036                            tag: this_tag,
56037                            value,
56038                        },
56039                    );
56040                    out.assume_init()
56041                },
56042                JustifySelf(ref this) => {
56043                    let other_repr =
56044                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::JustifySelf as ToComputedValue>::ComputedValue>);
56045                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56046
56047                    let mut out = mem::MaybeUninit::uninit();
56048                    ptr::write(
56049                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::JustifySelf as ToComputedValue>::ComputedValue>,
56050                        AnimationValueVariantRepr {
56051                            tag: this_tag,
56052                            value,
56053                        },
56054                    );
56055                    out.assume_init()
56056                },
56057                ListStylePosition(ref this) => {
56058                    let other_repr =
56059                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::list_style_position::SpecifiedValue as ToComputedValue>::ComputedValue>);
56060                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56061
56062                    let mut out = mem::MaybeUninit::uninit();
56063                    ptr::write(
56064                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::list_style_position::SpecifiedValue as ToComputedValue>::ComputedValue>,
56065                        AnimationValueVariantRepr {
56066                            tag: this_tag,
56067                            value,
56068                        },
56069                    );
56070                    out.assume_init()
56071                },
56072                ListStyleType(ref this) => {
56073                    let other_repr =
56074                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::list_style_type::SpecifiedValue as ToComputedValue>::ComputedValue>);
56075                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56076
56077                    let mut out = mem::MaybeUninit::uninit();
56078                    ptr::write(
56079                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::list_style_type::SpecifiedValue as ToComputedValue>::ComputedValue>,
56080                        AnimationValueVariantRepr {
56081                            tag: this_tag,
56082                            value,
56083                        },
56084                    );
56085                    out.assume_init()
56086                },
56087                MixBlendMode(ref this) => {
56088                    let other_repr =
56089                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::mix_blend_mode::SpecifiedValue as ToComputedValue>::ComputedValue>);
56090                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56091
56092                    let mut out = mem::MaybeUninit::uninit();
56093                    ptr::write(
56094                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::mix_blend_mode::SpecifiedValue as ToComputedValue>::ComputedValue>,
56095                        AnimationValueVariantRepr {
56096                            tag: this_tag,
56097                            value,
56098                        },
56099                    );
56100                    out.assume_init()
56101                },
56102                ObjectFit(ref this) => {
56103                    let other_repr =
56104                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::object_fit::SpecifiedValue as ToComputedValue>::ComputedValue>);
56105                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56106
56107                    let mut out = mem::MaybeUninit::uninit();
56108                    ptr::write(
56109                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::object_fit::SpecifiedValue as ToComputedValue>::ComputedValue>,
56110                        AnimationValueVariantRepr {
56111                            tag: this_tag,
56112                            value,
56113                        },
56114                    );
56115                    out.assume_init()
56116                },
56117                Opacity(ref this) => {
56118                    let other_repr =
56119                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Opacity as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56120                    let value = this.animate(&other_repr.value, procedure)?;
56121
56122                    let mut out = mem::MaybeUninit::uninit();
56123                    ptr::write(
56124                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Opacity as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56125                        AnimationValueVariantRepr {
56126                            tag: this_tag,
56127                            value,
56128                        },
56129                    );
56130                    out.assume_init()
56131                },
56132                Order(ref this) => {
56133                    let other_repr =
56134                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Integer as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56135                    let value = this.animate(&other_repr.value, procedure)?;
56136
56137                    let mut out = mem::MaybeUninit::uninit();
56138                    ptr::write(
56139                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Integer as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56140                        AnimationValueVariantRepr {
56141                            tag: this_tag,
56142                            value,
56143                        },
56144                    );
56145                    out.assume_init()
56146                },
56147                OutlineStyle(ref this) => {
56148                    let other_repr =
56149                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::OutlineStyle as ToComputedValue>::ComputedValue>);
56150                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56151
56152                    let mut out = mem::MaybeUninit::uninit();
56153                    ptr::write(
56154                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::OutlineStyle as ToComputedValue>::ComputedValue>,
56155                        AnimationValueVariantRepr {
56156                            tag: this_tag,
56157                            value,
56158                        },
56159                    );
56160                    out.assume_init()
56161                },
56162                OverflowWrap(ref this) => {
56163                    let other_repr =
56164                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::OverflowWrap as ToComputedValue>::ComputedValue>);
56165                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56166
56167                    let mut out = mem::MaybeUninit::uninit();
56168                    ptr::write(
56169                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::OverflowWrap as ToComputedValue>::ComputedValue>,
56170                        AnimationValueVariantRepr {
56171                            tag: this_tag,
56172                            value,
56173                        },
56174                    );
56175                    out.assume_init()
56176                },
56177                PointerEvents(ref this) => {
56178                    let other_repr =
56179                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::PointerEvents as ToComputedValue>::ComputedValue>);
56180                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56181
56182                    let mut out = mem::MaybeUninit::uninit();
56183                    ptr::write(
56184                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::PointerEvents as ToComputedValue>::ComputedValue>,
56185                        AnimationValueVariantRepr {
56186                            tag: this_tag,
56187                            value,
56188                        },
56189                    );
56190                    out.assume_init()
56191                },
56192                Position(ref this) => {
56193                    let other_repr =
56194                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::PositionProperty as ToComputedValue>::ComputedValue>);
56195                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56196
56197                    let mut out = mem::MaybeUninit::uninit();
56198                    ptr::write(
56199                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::PositionProperty as ToComputedValue>::ComputedValue>,
56200                        AnimationValueVariantRepr {
56201                            tag: this_tag,
56202                            value,
56203                        },
56204                    );
56205                    out.assume_init()
56206                },
56207                TableLayout(ref this) => {
56208                    let other_repr =
56209                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::table_layout::SpecifiedValue as ToComputedValue>::ComputedValue>);
56210                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56211
56212                    let mut out = mem::MaybeUninit::uninit();
56213                    ptr::write(
56214                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::table_layout::SpecifiedValue as ToComputedValue>::ComputedValue>,
56215                        AnimationValueVariantRepr {
56216                            tag: this_tag,
56217                            value,
56218                        },
56219                    );
56220                    out.assume_init()
56221                },
56222                TextAlign(ref this) => {
56223                    let other_repr =
56224                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::TextAlign as ToComputedValue>::ComputedValue>);
56225                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56226
56227                    let mut out = mem::MaybeUninit::uninit();
56228                    ptr::write(
56229                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::TextAlign as ToComputedValue>::ComputedValue>,
56230                        AnimationValueVariantRepr {
56231                            tag: this_tag,
56232                            value,
56233                        },
56234                    );
56235                    out.assume_init()
56236                },
56237                TextAlignLast(ref this) => {
56238                    let other_repr =
56239                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::TextAlignLast as ToComputedValue>::ComputedValue>);
56240                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56241
56242                    let mut out = mem::MaybeUninit::uninit();
56243                    ptr::write(
56244                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::TextAlignLast as ToComputedValue>::ComputedValue>,
56245                        AnimationValueVariantRepr {
56246                            tag: this_tag,
56247                            value,
56248                        },
56249                    );
56250                    out.assume_init()
56251                },
56252                TextDecorationLine(ref this) => {
56253                    let other_repr =
56254                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::TextDecorationLine as ToComputedValue>::ComputedValue>);
56255                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56256
56257                    let mut out = mem::MaybeUninit::uninit();
56258                    ptr::write(
56259                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::TextDecorationLine as ToComputedValue>::ComputedValue>,
56260                        AnimationValueVariantRepr {
56261                            tag: this_tag,
56262                            value,
56263                        },
56264                    );
56265                    out.assume_init()
56266                },
56267                TextDecorationStyle(ref this) => {
56268                    let other_repr =
56269                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::text_decoration_style::SpecifiedValue as ToComputedValue>::ComputedValue>);
56270                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56271
56272                    let mut out = mem::MaybeUninit::uninit();
56273                    ptr::write(
56274                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::text_decoration_style::SpecifiedValue as ToComputedValue>::ComputedValue>,
56275                        AnimationValueVariantRepr {
56276                            tag: this_tag,
56277                            value,
56278                        },
56279                    );
56280                    out.assume_init()
56281                },
56282                TextJustify(ref this) => {
56283                    let other_repr =
56284                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::TextJustify as ToComputedValue>::ComputedValue>);
56285                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56286
56287                    let mut out = mem::MaybeUninit::uninit();
56288                    ptr::write(
56289                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::TextJustify as ToComputedValue>::ComputedValue>,
56290                        AnimationValueVariantRepr {
56291                            tag: this_tag,
56292                            value,
56293                        },
56294                    );
56295                    out.assume_init()
56296                },
56297                TextRendering(ref this) => {
56298                    let other_repr =
56299                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::text_rendering::SpecifiedValue as ToComputedValue>::ComputedValue>);
56300                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56301
56302                    let mut out = mem::MaybeUninit::uninit();
56303                    ptr::write(
56304                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::text_rendering::SpecifiedValue as ToComputedValue>::ComputedValue>,
56305                        AnimationValueVariantRepr {
56306                            tag: this_tag,
56307                            value,
56308                        },
56309                    );
56310                    out.assume_init()
56311                },
56312                TextTransform(ref this) => {
56313                    let other_repr =
56314                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::TextTransform as ToComputedValue>::ComputedValue>);
56315                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56316
56317                    let mut out = mem::MaybeUninit::uninit();
56318                    ptr::write(
56319                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::TextTransform as ToComputedValue>::ComputedValue>,
56320                        AnimationValueVariantRepr {
56321                            tag: this_tag,
56322                            value,
56323                        },
56324                    );
56325                    out.assume_init()
56326                },
56327                TextWrapMode(ref this) => {
56328                    let other_repr =
56329                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::text_wrap_mode::SpecifiedValue as ToComputedValue>::ComputedValue>);
56330                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56331
56332                    let mut out = mem::MaybeUninit::uninit();
56333                    ptr::write(
56334                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::text_wrap_mode::SpecifiedValue as ToComputedValue>::ComputedValue>,
56335                        AnimationValueVariantRepr {
56336                            tag: this_tag,
56337                            value,
56338                        },
56339                    );
56340                    out.assume_init()
56341                },
56342                TransformStyle(ref this) => {
56343                    let other_repr =
56344                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::TransformStyle as ToComputedValue>::ComputedValue>);
56345                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56346
56347                    let mut out = mem::MaybeUninit::uninit();
56348                    ptr::write(
56349                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::TransformStyle as ToComputedValue>::ComputedValue>,
56350                        AnimationValueVariantRepr {
56351                            tag: this_tag,
56352                            value,
56353                        },
56354                    );
56355                    out.assume_init()
56356                },
56357                Visibility(ref this) => {
56358                    let other_repr =
56359                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::visibility::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56360                    let value = this.animate(&other_repr.value, procedure)?;
56361
56362                    let mut out = mem::MaybeUninit::uninit();
56363                    ptr::write(
56364                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<longhands::visibility::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56365                        AnimationValueVariantRepr {
56366                            tag: this_tag,
56367                            value,
56368                        },
56369                    );
56370                    out.assume_init()
56371                },
56372                WhiteSpaceCollapse(ref this) => {
56373                    let other_repr =
56374                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::white_space_collapse::SpecifiedValue as ToComputedValue>::ComputedValue>);
56375                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56376
56377                    let mut out = mem::MaybeUninit::uninit();
56378                    ptr::write(
56379                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::white_space_collapse::SpecifiedValue as ToComputedValue>::ComputedValue>,
56380                        AnimationValueVariantRepr {
56381                            tag: this_tag,
56382                            value,
56383                        },
56384                    );
56385                    out.assume_init()
56386                },
56387                WordBreak(ref this) => {
56388                    let other_repr =
56389                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::WordBreak as ToComputedValue>::ComputedValue>);
56390                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56391
56392                    let mut out = mem::MaybeUninit::uninit();
56393                    ptr::write(
56394                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::WordBreak as ToComputedValue>::ComputedValue>,
56395                        AnimationValueVariantRepr {
56396                            tag: this_tag,
56397                            value,
56398                        },
56399                    );
56400                    out.assume_init()
56401                },
56402                ZIndex(ref this) => {
56403                    let other_repr =
56404                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::ZIndex as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56405                    let value = this.animate(&other_repr.value, procedure)?;
56406
56407                    let mut out = mem::MaybeUninit::uninit();
56408                    ptr::write(
56409                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::ZIndex as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56410                        AnimationValueVariantRepr {
56411                            tag: this_tag,
56412                            value,
56413                        },
56414                    );
56415                    out.assume_init()
56416                },
56417                Zoom(ref this) => {
56418                    let other_repr =
56419                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Zoom as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56420                    let value = this.animate(&other_repr.value, procedure)?;
56421
56422                    let mut out = mem::MaybeUninit::uninit();
56423                    ptr::write(
56424                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Zoom as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56425                        AnimationValueVariantRepr {
56426                            tag: this_tag,
56427                            value,
56428                        },
56429                    );
56430                    out.assume_init()
56431                },
56432                FlexGrow(ref this) |
56433FlexShrink(ref this) => {
56434                    let other_repr =
56435                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::NonNegativeNumber as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56436                    let value = this.animate(&other_repr.value, procedure)?;
56437
56438                    let mut out = mem::MaybeUninit::uninit();
56439                    ptr::write(
56440                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::NonNegativeNumber as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56441                        AnimationValueVariantRepr {
56442                            tag: this_tag,
56443                            value,
56444                        },
56445                    );
56446                    out.assume_init()
56447                },
56448                OverflowX(ref this) |
56449OverflowY(ref this) => {
56450                    let other_repr =
56451                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::Overflow as ToComputedValue>::ComputedValue>);
56452                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56453
56454                    let mut out = mem::MaybeUninit::uninit();
56455                    ptr::write(
56456                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::Overflow as ToComputedValue>::ComputedValue>,
56457                        AnimationValueVariantRepr {
56458                            tag: this_tag,
56459                            value,
56460                        },
56461                    );
56462                    out.assume_init()
56463                },
56464                BorderBottomStyle(ref this) |
56465BorderLeftStyle(ref this) |
56466BorderRightStyle(ref this) |
56467BorderTopStyle(ref this) => {
56468                    let other_repr =
56469                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::BorderStyle as ToComputedValue>::ComputedValue>);
56470                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56471
56472                    let mut out = mem::MaybeUninit::uninit();
56473                    ptr::write(
56474                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::BorderStyle as ToComputedValue>::ComputedValue>,
56475                        AnimationValueVariantRepr {
56476                            tag: this_tag,
56477                            value,
56478                        },
56479                    );
56480                    out.assume_init()
56481                },
56482                BackdropFilter(ref this) => {
56483                    let other_repr =
56484                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::backdrop_filter::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56485                    let value = this.animate(&other_repr.value, procedure)?;
56486
56487                    let mut out = mem::MaybeUninit::uninit();
56488                    ptr::write(
56489                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<longhands::backdrop_filter::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56490                        AnimationValueVariantRepr {
56491                            tag: this_tag,
56492                            value,
56493                        },
56494                    );
56495                    out.assume_init()
56496                },
56497                BackgroundAttachment(ref this) => {
56498                    let other_repr =
56499                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::background_attachment::SpecifiedValue as ToComputedValue>::ComputedValue>);
56500                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56501
56502                    let mut out = mem::MaybeUninit::uninit();
56503                    ptr::write(
56504                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::background_attachment::SpecifiedValue as ToComputedValue>::ComputedValue>,
56505                        AnimationValueVariantRepr {
56506                            tag: this_tag,
56507                            value,
56508                        },
56509                    );
56510                    out.assume_init()
56511                },
56512                BackgroundClip(ref this) => {
56513                    let other_repr =
56514                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::background_clip::SpecifiedValue as ToComputedValue>::ComputedValue>);
56515                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56516
56517                    let mut out = mem::MaybeUninit::uninit();
56518                    ptr::write(
56519                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::background_clip::SpecifiedValue as ToComputedValue>::ComputedValue>,
56520                        AnimationValueVariantRepr {
56521                            tag: this_tag,
56522                            value,
56523                        },
56524                    );
56525                    out.assume_init()
56526                },
56527                BackgroundImage(ref this) => {
56528                    let other_repr =
56529                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::background_image::SpecifiedValue as ToComputedValue>::ComputedValue>);
56530                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56531
56532                    let mut out = mem::MaybeUninit::uninit();
56533                    ptr::write(
56534                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::background_image::SpecifiedValue as ToComputedValue>::ComputedValue>,
56535                        AnimationValueVariantRepr {
56536                            tag: this_tag,
56537                            value,
56538                        },
56539                    );
56540                    out.assume_init()
56541                },
56542                BackgroundOrigin(ref this) => {
56543                    let other_repr =
56544                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::background_origin::SpecifiedValue as ToComputedValue>::ComputedValue>);
56545                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56546
56547                    let mut out = mem::MaybeUninit::uninit();
56548                    ptr::write(
56549                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::background_origin::SpecifiedValue as ToComputedValue>::ComputedValue>,
56550                        AnimationValueVariantRepr {
56551                            tag: this_tag,
56552                            value,
56553                        },
56554                    );
56555                    out.assume_init()
56556                },
56557                BackgroundPositionX(ref this) => {
56558                    let other_repr =
56559                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::background_position_x::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56560                    let value = this.animate(&other_repr.value, procedure)?;
56561
56562                    let mut out = mem::MaybeUninit::uninit();
56563                    ptr::write(
56564                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<longhands::background_position_x::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56565                        AnimationValueVariantRepr {
56566                            tag: this_tag,
56567                            value,
56568                        },
56569                    );
56570                    out.assume_init()
56571                },
56572                BackgroundPositionY(ref this) => {
56573                    let other_repr =
56574                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::background_position_y::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56575                    let value = this.animate(&other_repr.value, procedure)?;
56576
56577                    let mut out = mem::MaybeUninit::uninit();
56578                    ptr::write(
56579                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<longhands::background_position_y::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56580                        AnimationValueVariantRepr {
56581                            tag: this_tag,
56582                            value,
56583                        },
56584                    );
56585                    out.assume_init()
56586                },
56587                BackgroundRepeat(ref this) => {
56588                    let other_repr =
56589                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::background_repeat::SpecifiedValue as ToComputedValue>::ComputedValue>);
56590                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56591
56592                    let mut out = mem::MaybeUninit::uninit();
56593                    ptr::write(
56594                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::background_repeat::SpecifiedValue as ToComputedValue>::ComputedValue>,
56595                        AnimationValueVariantRepr {
56596                            tag: this_tag,
56597                            value,
56598                        },
56599                    );
56600                    out.assume_init()
56601                },
56602                BackgroundSize(ref this) => {
56603                    let other_repr =
56604                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::background_size::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56605                    let value = this.animate(&other_repr.value, procedure)?;
56606
56607                    let mut out = mem::MaybeUninit::uninit();
56608                    ptr::write(
56609                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<longhands::background_size::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56610                        AnimationValueVariantRepr {
56611                            tag: this_tag,
56612                            value,
56613                        },
56614                    );
56615                    out.assume_init()
56616                },
56617                BorderImageOutset(ref this) => {
56618                    let other_repr =
56619                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::NonNegativeLengthOrNumberRect as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56620                    let value = this.animate(&other_repr.value, procedure)?;
56621
56622                    let mut out = mem::MaybeUninit::uninit();
56623                    ptr::write(
56624                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::NonNegativeLengthOrNumberRect as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56625                        AnimationValueVariantRepr {
56626                            tag: this_tag,
56627                            value,
56628                        },
56629                    );
56630                    out.assume_init()
56631                },
56632                BorderImageSlice(ref this) => {
56633                    let other_repr =
56634                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::BorderImageSlice as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56635                    let value = this.animate(&other_repr.value, procedure)?;
56636
56637                    let mut out = mem::MaybeUninit::uninit();
56638                    ptr::write(
56639                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::BorderImageSlice as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56640                        AnimationValueVariantRepr {
56641                            tag: this_tag,
56642                            value,
56643                        },
56644                    );
56645                    out.assume_init()
56646                },
56647                BorderImageWidth(ref this) => {
56648                    let other_repr =
56649                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::BorderImageWidth as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56650                    let value = this.animate(&other_repr.value, procedure)?;
56651
56652                    let mut out = mem::MaybeUninit::uninit();
56653                    ptr::write(
56654                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::BorderImageWidth as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56655                        AnimationValueVariantRepr {
56656                            tag: this_tag,
56657                            value,
56658                        },
56659                    );
56660                    out.assume_init()
56661                },
56662                BorderSpacing(ref this) => {
56663                    let other_repr =
56664                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::BorderSpacing as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56665                    let value = this.animate(&other_repr.value, procedure)?;
56666
56667                    let mut out = mem::MaybeUninit::uninit();
56668                    ptr::write(
56669                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::BorderSpacing as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56670                        AnimationValueVariantRepr {
56671                            tag: this_tag,
56672                            value,
56673                        },
56674                    );
56675                    out.assume_init()
56676                },
56677                BoxShadow(ref this) => {
56678                    let other_repr =
56679                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::box_shadow::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56680                    let value = this.animate(&other_repr.value, procedure)?;
56681
56682                    let mut out = mem::MaybeUninit::uninit();
56683                    ptr::write(
56684                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<longhands::box_shadow::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56685                        AnimationValueVariantRepr {
56686                            tag: this_tag,
56687                            value,
56688                        },
56689                    );
56690                    out.assume_init()
56691                },
56692                Clip(ref this) => {
56693                    let other_repr =
56694                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::ClipRectOrAuto as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56695                    let value = this.animate(&other_repr.value, procedure)?;
56696
56697                    let mut out = mem::MaybeUninit::uninit();
56698                    ptr::write(
56699                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::ClipRectOrAuto as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56700                        AnimationValueVariantRepr {
56701                            tag: this_tag,
56702                            value,
56703                        },
56704                    );
56705                    out.assume_init()
56706                },
56707                ClipPath(ref this) => {
56708                    let other_repr =
56709                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::basic_shape::ClipPath as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56710                    let value = this.animate(&other_repr.value, procedure)?;
56711
56712                    let mut out = mem::MaybeUninit::uninit();
56713                    ptr::write(
56714                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::basic_shape::ClipPath as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56715                        AnimationValueVariantRepr {
56716                            tag: this_tag,
56717                            value,
56718                        },
56719                    );
56720                    out.assume_init()
56721                },
56722                Color(ref this) => {
56723                    let other_repr =
56724                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::ColorPropertyValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56725                    let value = this.animate(&other_repr.value, procedure)?;
56726
56727                    let mut out = mem::MaybeUninit::uninit();
56728                    ptr::write(
56729                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::ColorPropertyValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56730                        AnimationValueVariantRepr {
56731                            tag: this_tag,
56732                            value,
56733                        },
56734                    );
56735                    out.assume_init()
56736                },
56737                ColorScheme(ref this) => {
56738                    let other_repr =
56739                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::ColorScheme as ToComputedValue>::ComputedValue>);
56740                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56741
56742                    let mut out = mem::MaybeUninit::uninit();
56743                    ptr::write(
56744                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::ColorScheme as ToComputedValue>::ComputedValue>,
56745                        AnimationValueVariantRepr {
56746                            tag: this_tag,
56747                            value,
56748                        },
56749                    );
56750                    out.assume_init()
56751                },
56752                ColumnWidth(ref this) => {
56753                    let other_repr =
56754                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::length::NonNegativeLengthOrAuto as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56755                    let value = this.animate(&other_repr.value, procedure)?;
56756
56757                    let mut out = mem::MaybeUninit::uninit();
56758                    ptr::write(
56759                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::length::NonNegativeLengthOrAuto as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56760                        AnimationValueVariantRepr {
56761                            tag: this_tag,
56762                            value,
56763                        },
56764                    );
56765                    out.assume_init()
56766                },
56767                Content(ref this) => {
56768                    let other_repr =
56769                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::Content as ToComputedValue>::ComputedValue>);
56770                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56771
56772                    let mut out = mem::MaybeUninit::uninit();
56773                    ptr::write(
56774                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::Content as ToComputedValue>::ComputedValue>,
56775                        AnimationValueVariantRepr {
56776                            tag: this_tag,
56777                            value,
56778                        },
56779                    );
56780                    out.assume_init()
56781                },
56782                CounterIncrement(ref this) => {
56783                    let other_repr =
56784                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::CounterIncrement as ToComputedValue>::ComputedValue>);
56785                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56786
56787                    let mut out = mem::MaybeUninit::uninit();
56788                    ptr::write(
56789                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::CounterIncrement as ToComputedValue>::ComputedValue>,
56790                        AnimationValueVariantRepr {
56791                            tag: this_tag,
56792                            value,
56793                        },
56794                    );
56795                    out.assume_init()
56796                },
56797                CounterReset(ref this) => {
56798                    let other_repr =
56799                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::CounterReset as ToComputedValue>::ComputedValue>);
56800                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56801
56802                    let mut out = mem::MaybeUninit::uninit();
56803                    ptr::write(
56804                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::CounterReset as ToComputedValue>::ComputedValue>,
56805                        AnimationValueVariantRepr {
56806                            tag: this_tag,
56807                            value,
56808                        },
56809                    );
56810                    out.assume_init()
56811                },
56812                Cursor(ref this) => {
56813                    let other_repr =
56814                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::Cursor as ToComputedValue>::ComputedValue>);
56815                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56816
56817                    let mut out = mem::MaybeUninit::uninit();
56818                    ptr::write(
56819                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::Cursor as ToComputedValue>::ComputedValue>,
56820                        AnimationValueVariantRepr {
56821                            tag: this_tag,
56822                            value,
56823                        },
56824                    );
56825                    out.assume_init()
56826                },
56827                Filter(ref this) => {
56828                    let other_repr =
56829                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::filter::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56830                    let value = this.animate(&other_repr.value, procedure)?;
56831
56832                    let mut out = mem::MaybeUninit::uninit();
56833                    ptr::write(
56834                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<longhands::filter::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56835                        AnimationValueVariantRepr {
56836                            tag: this_tag,
56837                            value,
56838                        },
56839                    );
56840                    out.assume_init()
56841                },
56842                FlexBasis(ref this) => {
56843                    let other_repr =
56844                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::FlexBasis as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56845                    let value = this.animate(&other_repr.value, procedure)?;
56846
56847                    let mut out = mem::MaybeUninit::uninit();
56848                    ptr::write(
56849                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::FlexBasis as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56850                        AnimationValueVariantRepr {
56851                            tag: this_tag,
56852                            value,
56853                        },
56854                    );
56855                    out.assume_init()
56856                },
56857                FontFamily(ref this) => {
56858                    let other_repr =
56859                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::FontFamily as ToComputedValue>::ComputedValue>);
56860                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56861
56862                    let mut out = mem::MaybeUninit::uninit();
56863                    ptr::write(
56864                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::FontFamily as ToComputedValue>::ComputedValue>,
56865                        AnimationValueVariantRepr {
56866                            tag: this_tag,
56867                            value,
56868                        },
56869                    );
56870                    out.assume_init()
56871                },
56872                FontSize(ref this) => {
56873                    let other_repr =
56874                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::FontSize as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56875                    let value = this.animate(&other_repr.value, procedure)?;
56876
56877                    let mut out = mem::MaybeUninit::uninit();
56878                    ptr::write(
56879                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::FontSize as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56880                        AnimationValueVariantRepr {
56881                            tag: this_tag,
56882                            value,
56883                        },
56884                    );
56885                    out.assume_init()
56886                },
56887                FontVariationSettings(ref this) => {
56888                    let other_repr =
56889                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::FontVariationSettings as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56890                    let value = this.animate(&other_repr.value, procedure)?;
56891
56892                    let mut out = mem::MaybeUninit::uninit();
56893                    ptr::write(
56894                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::FontVariationSettings as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56895                        AnimationValueVariantRepr {
56896                            tag: this_tag,
56897                            value,
56898                        },
56899                    );
56900                    out.assume_init()
56901                },
56902                GridTemplateAreas(ref this) => {
56903                    let other_repr =
56904                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::GridTemplateAreas as ToComputedValue>::ComputedValue>);
56905                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56906
56907                    let mut out = mem::MaybeUninit::uninit();
56908                    ptr::write(
56909                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::GridTemplateAreas as ToComputedValue>::ComputedValue>,
56910                        AnimationValueVariantRepr {
56911                            tag: this_tag,
56912                            value,
56913                        },
56914                    );
56915                    out.assume_init()
56916                },
56917                LetterSpacing(ref this) => {
56918                    let other_repr =
56919                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::LetterSpacing as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56920                    let value = this.animate(&other_repr.value, procedure)?;
56921
56922                    let mut out = mem::MaybeUninit::uninit();
56923                    ptr::write(
56924                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::LetterSpacing as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56925                        AnimationValueVariantRepr {
56926                            tag: this_tag,
56927                            value,
56928                        },
56929                    );
56930                    out.assume_init()
56931                },
56932                LineHeight(ref this) => {
56933                    let other_repr =
56934                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::LineHeight as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56935                    let value = this.animate(&other_repr.value, procedure)?;
56936
56937                    let mut out = mem::MaybeUninit::uninit();
56938                    ptr::write(
56939                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::LineHeight as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56940                        AnimationValueVariantRepr {
56941                            tag: this_tag,
56942                            value,
56943                        },
56944                    );
56945                    out.assume_init()
56946                },
56947                MaskImage(ref this) => {
56948                    let other_repr =
56949                        &*(other as *const _ as *const AnimationValueVariantRepr<<longhands::mask_image::SpecifiedValue as ToComputedValue>::ComputedValue>);
56950                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56951
56952                    let mut out = mem::MaybeUninit::uninit();
56953                    ptr::write(
56954                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<longhands::mask_image::SpecifiedValue as ToComputedValue>::ComputedValue>,
56955                        AnimationValueVariantRepr {
56956                            tag: this_tag,
56957                            value,
56958                        },
56959                    );
56960                    out.assume_init()
56961                },
56962                OffsetPath(ref this) => {
56963                    let other_repr =
56964                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::OffsetPath as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56965                    let value = this.animate(&other_repr.value, procedure)?;
56966
56967                    let mut out = mem::MaybeUninit::uninit();
56968                    ptr::write(
56969                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::OffsetPath as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56970                        AnimationValueVariantRepr {
56971                            tag: this_tag,
56972                            value,
56973                        },
56974                    );
56975                    out.assume_init()
56976                },
56977                Perspective(ref this) => {
56978                    let other_repr =
56979                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Perspective as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
56980                    let value = this.animate(&other_repr.value, procedure)?;
56981
56982                    let mut out = mem::MaybeUninit::uninit();
56983                    ptr::write(
56984                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Perspective as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
56985                        AnimationValueVariantRepr {
56986                            tag: this_tag,
56987                            value,
56988                        },
56989                    );
56990                    out.assume_init()
56991                },
56992                Quotes(ref this) => {
56993                    let other_repr =
56994                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::Quotes as ToComputedValue>::ComputedValue>);
56995                    let value = animate_discrete(this, &other_repr.value, procedure)?;
56996
56997                    let mut out = mem::MaybeUninit::uninit();
56998                    ptr::write(
56999                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::Quotes as ToComputedValue>::ComputedValue>,
57000                        AnimationValueVariantRepr {
57001                            tag: this_tag,
57002                            value,
57003                        },
57004                    );
57005                    out.assume_init()
57006                },
57007                Rotate(ref this) => {
57008                    let other_repr =
57009                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Rotate as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57010                    let value = this.animate(&other_repr.value, procedure)?;
57011
57012                    let mut out = mem::MaybeUninit::uninit();
57013                    ptr::write(
57014                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Rotate as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57015                        AnimationValueVariantRepr {
57016                            tag: this_tag,
57017                            value,
57018                        },
57019                    );
57020                    out.assume_init()
57021                },
57022                Scale(ref this) => {
57023                    let other_repr =
57024                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Scale as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57025                    let value = this.animate(&other_repr.value, procedure)?;
57026
57027                    let mut out = mem::MaybeUninit::uninit();
57028                    ptr::write(
57029                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Scale as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57030                        AnimationValueVariantRepr {
57031                            tag: this_tag,
57032                            value,
57033                        },
57034                    );
57035                    out.assume_init()
57036                },
57037                TextIndent(ref this) => {
57038                    let other_repr =
57039                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::TextIndent as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57040                    let value = this.animate(&other_repr.value, procedure)?;
57041
57042                    let mut out = mem::MaybeUninit::uninit();
57043                    ptr::write(
57044                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::TextIndent as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57045                        AnimationValueVariantRepr {
57046                            tag: this_tag,
57047                            value,
57048                        },
57049                    );
57050                    out.assume_init()
57051                },
57052                TextOverflow(ref this) => {
57053                    let other_repr =
57054                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::TextOverflow as ToComputedValue>::ComputedValue>);
57055                    let value = animate_discrete(this, &other_repr.value, procedure)?;
57056
57057                    let mut out = mem::MaybeUninit::uninit();
57058                    ptr::write(
57059                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::TextOverflow as ToComputedValue>::ComputedValue>,
57060                        AnimationValueVariantRepr {
57061                            tag: this_tag,
57062                            value,
57063                        },
57064                    );
57065                    out.assume_init()
57066                },
57067                TextShadow(ref this) => {
57068                    let other_repr =
57069                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::text_shadow::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57070                    let value = this.animate(&other_repr.value, procedure)?;
57071
57072                    let mut out = mem::MaybeUninit::uninit();
57073                    ptr::write(
57074                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<longhands::text_shadow::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57075                        AnimationValueVariantRepr {
57076                            tag: this_tag,
57077                            value,
57078                        },
57079                    );
57080                    out.assume_init()
57081                },
57082                Transform(ref this) => {
57083                    let other_repr =
57084                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Transform as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57085                    let value = this.animate(&other_repr.value, procedure)?;
57086
57087                    let mut out = mem::MaybeUninit::uninit();
57088                    ptr::write(
57089                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Transform as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57090                        AnimationValueVariantRepr {
57091                            tag: this_tag,
57092                            value,
57093                        },
57094                    );
57095                    out.assume_init()
57096                },
57097                TransformOrigin(ref this) => {
57098                    let other_repr =
57099                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::TransformOrigin as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57100                    let value = this.animate(&other_repr.value, procedure)?;
57101
57102                    let mut out = mem::MaybeUninit::uninit();
57103                    ptr::write(
57104                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::TransformOrigin as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57105                        AnimationValueVariantRepr {
57106                            tag: this_tag,
57107                            value,
57108                        },
57109                    );
57110                    out.assume_init()
57111                },
57112                Translate(ref this) => {
57113                    let other_repr =
57114                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Translate as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57115                    let value = this.animate(&other_repr.value, procedure)?;
57116
57117                    let mut out = mem::MaybeUninit::uninit();
57118                    ptr::write(
57119                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Translate as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57120                        AnimationValueVariantRepr {
57121                            tag: this_tag,
57122                            value,
57123                        },
57124                    );
57125                    out.assume_init()
57126                },
57127                VerticalAlign(ref this) => {
57128                    let other_repr =
57129                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::VerticalAlign as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57130                    let value = this.animate(&other_repr.value, procedure)?;
57131
57132                    let mut out = mem::MaybeUninit::uninit();
57133                    ptr::write(
57134                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::VerticalAlign as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57135                        AnimationValueVariantRepr {
57136                            tag: this_tag,
57137                            value,
57138                        },
57139                    );
57140                    out.assume_init()
57141                },
57142                ViewTransitionClass(ref this) => {
57143                    let other_repr =
57144                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::ViewTransitionClass as ToComputedValue>::ComputedValue>);
57145                    let value = animate_discrete(this, &other_repr.value, procedure)?;
57146
57147                    let mut out = mem::MaybeUninit::uninit();
57148                    ptr::write(
57149                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::ViewTransitionClass as ToComputedValue>::ComputedValue>,
57150                        AnimationValueVariantRepr {
57151                            tag: this_tag,
57152                            value,
57153                        },
57154                    );
57155                    out.assume_init()
57156                },
57157                ViewTransitionName(ref this) => {
57158                    let other_repr =
57159                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::ViewTransitionName as ToComputedValue>::ComputedValue>);
57160                    let value = animate_discrete(this, &other_repr.value, procedure)?;
57161
57162                    let mut out = mem::MaybeUninit::uninit();
57163                    ptr::write(
57164                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::ViewTransitionName as ToComputedValue>::ComputedValue>,
57165                        AnimationValueVariantRepr {
57166                            tag: this_tag,
57167                            value,
57168                        },
57169                    );
57170                    out.assume_init()
57171                },
57172                WordSpacing(ref this) => {
57173                    let other_repr =
57174                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::WordSpacing as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57175                    let value = this.animate(&other_repr.value, procedure)?;
57176
57177                    let mut out = mem::MaybeUninit::uninit();
57178                    ptr::write(
57179                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::WordSpacing as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57180                        AnimationValueVariantRepr {
57181                            tag: this_tag,
57182                            value,
57183                        },
57184                    );
57185                    out.assume_init()
57186                },
57187                ObjectPosition(ref this) |
57188PerspectiveOrigin(ref this) => {
57189                    let other_repr =
57190                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Position as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57191                    let value = this.animate(&other_repr.value, procedure)?;
57192
57193                    let mut out = mem::MaybeUninit::uninit();
57194                    ptr::write(
57195                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Position as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57196                        AnimationValueVariantRepr {
57197                            tag: this_tag,
57198                            value,
57199                        },
57200                    );
57201                    out.assume_init()
57202                },
57203                GridTemplateColumns(ref this) |
57204GridTemplateRows(ref this) => {
57205                    let other_repr =
57206                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::GridTemplateComponent as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57207                    let value = this.animate(&other_repr.value, procedure)?;
57208
57209                    let mut out = mem::MaybeUninit::uninit();
57210                    ptr::write(
57211                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::GridTemplateComponent as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57212                        AnimationValueVariantRepr {
57213                            tag: this_tag,
57214                            value,
57215                        },
57216                    );
57217                    out.assume_init()
57218                },
57219                BorderImageSource(ref this) |
57220ListStyleImage(ref this) => {
57221                    let other_repr =
57222                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::Image as ToComputedValue>::ComputedValue>);
57223                    let value = animate_discrete(this, &other_repr.value, procedure)?;
57224
57225                    let mut out = mem::MaybeUninit::uninit();
57226                    ptr::write(
57227                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::Image as ToComputedValue>::ComputedValue>,
57228                        AnimationValueVariantRepr {
57229                            tag: this_tag,
57230                            value,
57231                        },
57232                    );
57233                    out.assume_init()
57234                },
57235                GridAutoColumns(ref this) |
57236GridAutoRows(ref this) => {
57237                    let other_repr =
57238                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::ImplicitGridTracks as ToComputedValue>::ComputedValue>);
57239                    let value = animate_discrete(this, &other_repr.value, procedure)?;
57240
57241                    let mut out = mem::MaybeUninit::uninit();
57242                    ptr::write(
57243                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::ImplicitGridTracks as ToComputedValue>::ComputedValue>,
57244                        AnimationValueVariantRepr {
57245                            tag: this_tag,
57246                            value,
57247                        },
57248                    );
57249                    out.assume_init()
57250                },
57251                OutlineOffset(ref this) |
57252OverflowClipMargin(ref this) => {
57253                    let other_repr =
57254                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Length as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57255                    let value = this.animate(&other_repr.value, procedure)?;
57256
57257                    let mut out = mem::MaybeUninit::uninit();
57258                    ptr::write(
57259                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Length as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57260                        AnimationValueVariantRepr {
57261                            tag: this_tag,
57262                            value,
57263                        },
57264                    );
57265                    out.assume_init()
57266                },
57267                ColumnGap(ref this) |
57268RowGap(ref this) => {
57269                    let other_repr =
57270                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::length::NonNegativeLengthPercentageOrNormal as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57271                    let value = this.animate(&other_repr.value, procedure)?;
57272
57273                    let mut out = mem::MaybeUninit::uninit();
57274                    ptr::write(
57275                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::length::NonNegativeLengthPercentageOrNormal as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57276                        AnimationValueVariantRepr {
57277                            tag: this_tag,
57278                            value,
57279                        },
57280                    );
57281                    out.assume_init()
57282                },
57283                GridColumnEnd(ref this) |
57284GridColumnStart(ref this) |
57285GridRowEnd(ref this) |
57286GridRowStart(ref this) => {
57287                    let other_repr =
57288                        &*(other as *const _ as *const AnimationValueVariantRepr<<crate::values::specified::GridLine as ToComputedValue>::ComputedValue>);
57289                    let value = animate_discrete(this, &other_repr.value, procedure)?;
57290
57291                    let mut out = mem::MaybeUninit::uninit();
57292                    ptr::write(
57293                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<crate::values::specified::GridLine as ToComputedValue>::ComputedValue>,
57294                        AnimationValueVariantRepr {
57295                            tag: this_tag,
57296                            value,
57297                        },
57298                    );
57299                    out.assume_init()
57300                },
57301                MaxHeight(ref this) |
57302MaxWidth(ref this) => {
57303                    let other_repr =
57304                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::MaxSize as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57305                    let value = this.animate(&other_repr.value, procedure)?;
57306
57307                    let mut out = mem::MaybeUninit::uninit();
57308                    ptr::write(
57309                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::MaxSize as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57310                        AnimationValueVariantRepr {
57311                            tag: this_tag,
57312                            value,
57313                        },
57314                    );
57315                    out.assume_init()
57316                },
57317                BorderBottomLeftRadius(ref this) |
57318BorderBottomRightRadius(ref this) |
57319BorderTopLeftRadius(ref this) |
57320BorderTopRightRadius(ref this) => {
57321                    let other_repr =
57322                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::BorderCornerRadius as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57323                    let value = this.animate(&other_repr.value, procedure)?;
57324
57325                    let mut out = mem::MaybeUninit::uninit();
57326                    ptr::write(
57327                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::BorderCornerRadius as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57328                        AnimationValueVariantRepr {
57329                            tag: this_tag,
57330                            value,
57331                        },
57332                    );
57333                    out.assume_init()
57334                },
57335                Bottom(ref this) |
57336Left(ref this) |
57337Right(ref this) |
57338Top(ref this) => {
57339                    let other_repr =
57340                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Inset as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57341                    let value = this.animate(&other_repr.value, procedure)?;
57342
57343                    let mut out = mem::MaybeUninit::uninit();
57344                    ptr::write(
57345                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Inset as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57346                        AnimationValueVariantRepr {
57347                            tag: this_tag,
57348                            value,
57349                        },
57350                    );
57351                    out.assume_init()
57352                },
57353                MarginBottom(ref this) |
57354MarginLeft(ref this) |
57355MarginRight(ref this) |
57356MarginTop(ref this) => {
57357                    let other_repr =
57358                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Margin as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57359                    let value = this.animate(&other_repr.value, procedure)?;
57360
57361                    let mut out = mem::MaybeUninit::uninit();
57362                    ptr::write(
57363                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Margin as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57364                        AnimationValueVariantRepr {
57365                            tag: this_tag,
57366                            value,
57367                        },
57368                    );
57369                    out.assume_init()
57370                },
57371                PaddingBottom(ref this) |
57372PaddingLeft(ref this) |
57373PaddingRight(ref this) |
57374PaddingTop(ref this) => {
57375                    let other_repr =
57376                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::NonNegativeLengthPercentage as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57377                    let value = this.animate(&other_repr.value, procedure)?;
57378
57379                    let mut out = mem::MaybeUninit::uninit();
57380                    ptr::write(
57381                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::NonNegativeLengthPercentage as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57382                        AnimationValueVariantRepr {
57383                            tag: this_tag,
57384                            value,
57385                        },
57386                    );
57387                    out.assume_init()
57388                },
57389                Height(ref this) |
57390MinHeight(ref this) |
57391MinWidth(ref this) |
57392Width(ref this) => {
57393                    let other_repr =
57394                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Size as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57395                    let value = this.animate(&other_repr.value, procedure)?;
57396
57397                    let mut out = mem::MaybeUninit::uninit();
57398                    ptr::write(
57399                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Size as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57400                        AnimationValueVariantRepr {
57401                            tag: this_tag,
57402                            value,
57403                        },
57404                    );
57405                    out.assume_init()
57406                },
57407                BorderBottomWidth(ref this) |
57408BorderLeftWidth(ref this) |
57409BorderRightWidth(ref this) |
57410BorderTopWidth(ref this) |
57411OutlineWidth(ref this) => {
57412                    let other_repr =
57413                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::BorderSideWidth as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57414                    let value = this.animate(&other_repr.value, procedure)?;
57415
57416                    let mut out = mem::MaybeUninit::uninit();
57417                    ptr::write(
57418                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::BorderSideWidth as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57419                        AnimationValueVariantRepr {
57420                            tag: this_tag,
57421                            value,
57422                        },
57423                    );
57424                    out.assume_init()
57425                },
57426                BackgroundColor(ref this) |
57427BorderBottomColor(ref this) |
57428BorderLeftColor(ref this) |
57429BorderRightColor(ref this) |
57430BorderTopColor(ref this) |
57431OutlineColor(ref this) |
57432TextDecorationColor(ref this) => {
57433                    let other_repr =
57434                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Color as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57435                    let value = this.animate(&other_repr.value, procedure)?;
57436
57437                    let mut out = mem::MaybeUninit::uninit();
57438                    ptr::write(
57439                        out.as_mut_ptr() as *mut AnimationValueVariantRepr<<<crate::values::specified::Color as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>,
57440                        AnimationValueVariantRepr {
57441                            tag: this_tag,
57442                            value,
57443                        },
57444                    );
57445                    out.assume_init()
57446                },
57447                Contain(void) |
57448ContainerType(void) |
57449Direction(void) |
57450ServoOverflowClipBox(void) |
57451ServoTopLayer(void) |
57452UnicodeBidi(void) |
57453WritingMode(void) |
57454OverflowBlock(void) |
57455OverflowInline(void) |
57456BorderBlockEndStyle(void) |
57457BorderBlockStartStyle(void) |
57458BorderInlineEndStyle(void) |
57459BorderInlineStartStyle(void) |
57460AnimationComposition(void) |
57461AnimationDelay(void) |
57462AnimationDirection(void) |
57463AnimationDuration(void) |
57464AnimationFillMode(void) |
57465AnimationIterationCount(void) |
57466AnimationName(void) |
57467AnimationPlayState(void) |
57468AnimationTimeline(void) |
57469AnimationTimingFunction(void) |
57470ContainerName(void) |
57471TransitionBehavior(void) |
57472TransitionDelay(void) |
57473TransitionDuration(void) |
57474TransitionProperty(void) |
57475TransitionTimingFunction(void) |
57476WillChange(void) |
57477XLang(void) |
57478MaxBlockSize(void) |
57479MaxInlineSize(void) |
57480BorderEndEndRadius(void) |
57481BorderEndStartRadius(void) |
57482BorderStartEndRadius(void) |
57483BorderStartStartRadius(void) |
57484InsetBlockEnd(void) |
57485InsetBlockStart(void) |
57486InsetInlineEnd(void) |
57487InsetInlineStart(void) |
57488MarginBlockEnd(void) |
57489MarginBlockStart(void) |
57490MarginInlineEnd(void) |
57491MarginInlineStart(void) |
57492PaddingBlockEnd(void) |
57493PaddingBlockStart(void) |
57494PaddingInlineEnd(void) |
57495PaddingInlineStart(void) |
57496BlockSize(void) |
57497InlineSize(void) |
57498MinBlockSize(void) |
57499MinInlineSize(void) |
57500BorderBlockEndWidth(void) |
57501BorderBlockStartWidth(void) |
57502BorderInlineEndWidth(void) |
57503BorderInlineStartWidth(void) |
57504BorderBlockEndColor(void) |
57505BorderBlockStartColor(void) |
57506BorderInlineEndColor(void) |
57507BorderInlineStartColor(void) => {
57508                    void::unreachable(void)
57509                },
57510                Custom(ref self_value) => {
57511                    let Custom(ref other_value) = *other else { unreachable!() };
57512                    Custom(self_value.animate(other_value, procedure)?)
57513                },
57514            }
57515        })
57516    }
57517}
57518
57519
57520
57521impl ComputeSquaredDistance for AnimationValue {
57522    fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()> {
57523        unsafe {
57524            use self::AnimationValue::*;
57525
57526            let this_tag = *(self as *const _ as *const u16);
57527            let other_tag = *(other as *const _ as *const u16);
57528            if this_tag != other_tag {
57529                panic!("Unexpected AnimationValue::compute_squared_distance call");
57530            }
57531
57532            match *self {
57533                AspectRatio(ref this) => {
57534                    let other_repr =
57535                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::AspectRatio as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57536
57537                    this.compute_squared_distance(&other_repr.value)
57538                }
57539                ColumnCount(ref this) => {
57540                    let other_repr =
57541                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::ColumnCount as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57542
57543                    this.compute_squared_distance(&other_repr.value)
57544                }
57545                FontStretch(ref this) => {
57546                    let other_repr =
57547                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::FontStretch as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57548
57549                    this.compute_squared_distance(&other_repr.value)
57550                }
57551                FontStyle(ref this) => {
57552                    let other_repr =
57553                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::FontStyle as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57554
57555                    this.compute_squared_distance(&other_repr.value)
57556                }
57557                FontWeight(ref this) => {
57558                    let other_repr =
57559                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::FontWeight as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57560
57561                    this.compute_squared_distance(&other_repr.value)
57562                }
57563                Opacity(ref this) => {
57564                    let other_repr =
57565                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Opacity as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57566
57567                    this.compute_squared_distance(&other_repr.value)
57568                }
57569                Order(ref this) => {
57570                    let other_repr =
57571                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Integer as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57572
57573                    this.compute_squared_distance(&other_repr.value)
57574                }
57575                Visibility(ref this) => {
57576                    let other_repr =
57577                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::visibility::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57578
57579                    this.compute_squared_distance(&other_repr.value)
57580                }
57581                ZIndex(ref this) => {
57582                    let other_repr =
57583                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::ZIndex as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57584
57585                    this.compute_squared_distance(&other_repr.value)
57586                }
57587                Zoom(ref this) => {
57588                    let other_repr =
57589                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Zoom as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57590
57591                    this.compute_squared_distance(&other_repr.value)
57592                }
57593                FlexGrow(ref this) |
57594FlexShrink(ref this) => {
57595                    let other_repr =
57596                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::NonNegativeNumber as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57597
57598                    this.compute_squared_distance(&other_repr.value)
57599                }
57600                BackdropFilter(ref this) => {
57601                    let other_repr =
57602                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::backdrop_filter::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57603
57604                    this.compute_squared_distance(&other_repr.value)
57605                }
57606                BackgroundPositionX(ref this) => {
57607                    let other_repr =
57608                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::background_position_x::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57609
57610                    this.compute_squared_distance(&other_repr.value)
57611                }
57612                BackgroundPositionY(ref this) => {
57613                    let other_repr =
57614                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::background_position_y::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57615
57616                    this.compute_squared_distance(&other_repr.value)
57617                }
57618                BackgroundSize(ref this) => {
57619                    let other_repr =
57620                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::background_size::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57621
57622                    this.compute_squared_distance(&other_repr.value)
57623                }
57624                BorderImageOutset(ref this) => {
57625                    let other_repr =
57626                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::NonNegativeLengthOrNumberRect as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57627
57628                    this.compute_squared_distance(&other_repr.value)
57629                }
57630                BorderImageSlice(ref this) => {
57631                    let other_repr =
57632                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::BorderImageSlice as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57633
57634                    this.compute_squared_distance(&other_repr.value)
57635                }
57636                BorderImageWidth(ref this) => {
57637                    let other_repr =
57638                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::BorderImageWidth as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57639
57640                    this.compute_squared_distance(&other_repr.value)
57641                }
57642                BorderSpacing(ref this) => {
57643                    let other_repr =
57644                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::BorderSpacing as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57645
57646                    this.compute_squared_distance(&other_repr.value)
57647                }
57648                BoxShadow(ref this) => {
57649                    let other_repr =
57650                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::box_shadow::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57651
57652                    this.compute_squared_distance(&other_repr.value)
57653                }
57654                Clip(ref this) => {
57655                    let other_repr =
57656                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::ClipRectOrAuto as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57657
57658                    this.compute_squared_distance(&other_repr.value)
57659                }
57660                ClipPath(ref this) => {
57661                    let other_repr =
57662                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::basic_shape::ClipPath as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57663
57664                    this.compute_squared_distance(&other_repr.value)
57665                }
57666                Color(ref this) => {
57667                    let other_repr =
57668                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::ColorPropertyValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57669
57670                    this.compute_squared_distance(&other_repr.value)
57671                }
57672                ColumnWidth(ref this) => {
57673                    let other_repr =
57674                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::length::NonNegativeLengthOrAuto as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57675
57676                    this.compute_squared_distance(&other_repr.value)
57677                }
57678                Filter(ref this) => {
57679                    let other_repr =
57680                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::filter::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57681
57682                    this.compute_squared_distance(&other_repr.value)
57683                }
57684                FlexBasis(ref this) => {
57685                    let other_repr =
57686                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::FlexBasis as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57687
57688                    this.compute_squared_distance(&other_repr.value)
57689                }
57690                FontSize(ref this) => {
57691                    let other_repr =
57692                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::FontSize as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57693
57694                    this.compute_squared_distance(&other_repr.value)
57695                }
57696                FontVariationSettings(ref this) => {
57697                    let other_repr =
57698                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::FontVariationSettings as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57699
57700                    this.compute_squared_distance(&other_repr.value)
57701                }
57702                LetterSpacing(ref this) => {
57703                    let other_repr =
57704                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::LetterSpacing as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57705
57706                    this.compute_squared_distance(&other_repr.value)
57707                }
57708                LineHeight(ref this) => {
57709                    let other_repr =
57710                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::LineHeight as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57711
57712                    this.compute_squared_distance(&other_repr.value)
57713                }
57714                OffsetPath(ref this) => {
57715                    let other_repr =
57716                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::OffsetPath as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57717
57718                    this.compute_squared_distance(&other_repr.value)
57719                }
57720                Perspective(ref this) => {
57721                    let other_repr =
57722                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Perspective as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57723
57724                    this.compute_squared_distance(&other_repr.value)
57725                }
57726                Rotate(ref this) => {
57727                    let other_repr =
57728                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Rotate as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57729
57730                    this.compute_squared_distance(&other_repr.value)
57731                }
57732                Scale(ref this) => {
57733                    let other_repr =
57734                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Scale as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57735
57736                    this.compute_squared_distance(&other_repr.value)
57737                }
57738                TextIndent(ref this) => {
57739                    let other_repr =
57740                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::TextIndent as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57741
57742                    this.compute_squared_distance(&other_repr.value)
57743                }
57744                TextShadow(ref this) => {
57745                    let other_repr =
57746                        &*(other as *const _ as *const AnimationValueVariantRepr<<<longhands::text_shadow::SpecifiedValue as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57747
57748                    this.compute_squared_distance(&other_repr.value)
57749                }
57750                Transform(ref this) => {
57751                    let other_repr =
57752                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Transform as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57753
57754                    this.compute_squared_distance(&other_repr.value)
57755                }
57756                TransformOrigin(ref this) => {
57757                    let other_repr =
57758                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::TransformOrigin as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57759
57760                    this.compute_squared_distance(&other_repr.value)
57761                }
57762                Translate(ref this) => {
57763                    let other_repr =
57764                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Translate as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57765
57766                    this.compute_squared_distance(&other_repr.value)
57767                }
57768                VerticalAlign(ref this) => {
57769                    let other_repr =
57770                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::VerticalAlign as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57771
57772                    this.compute_squared_distance(&other_repr.value)
57773                }
57774                WordSpacing(ref this) => {
57775                    let other_repr =
57776                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::WordSpacing as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57777
57778                    this.compute_squared_distance(&other_repr.value)
57779                }
57780                ObjectPosition(ref this) |
57781PerspectiveOrigin(ref this) => {
57782                    let other_repr =
57783                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Position as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57784
57785                    this.compute_squared_distance(&other_repr.value)
57786                }
57787                GridTemplateColumns(ref this) |
57788GridTemplateRows(ref this) => {
57789                    let other_repr =
57790                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::GridTemplateComponent as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57791
57792                    this.compute_squared_distance(&other_repr.value)
57793                }
57794                OutlineOffset(ref this) |
57795OverflowClipMargin(ref this) => {
57796                    let other_repr =
57797                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Length as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57798
57799                    this.compute_squared_distance(&other_repr.value)
57800                }
57801                ColumnGap(ref this) |
57802RowGap(ref this) => {
57803                    let other_repr =
57804                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::length::NonNegativeLengthPercentageOrNormal as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57805
57806                    this.compute_squared_distance(&other_repr.value)
57807                }
57808                MaxHeight(ref this) |
57809MaxWidth(ref this) => {
57810                    let other_repr =
57811                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::MaxSize as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57812
57813                    this.compute_squared_distance(&other_repr.value)
57814                }
57815                BorderBottomLeftRadius(ref this) |
57816BorderBottomRightRadius(ref this) |
57817BorderTopLeftRadius(ref this) |
57818BorderTopRightRadius(ref this) => {
57819                    let other_repr =
57820                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::BorderCornerRadius as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57821
57822                    this.compute_squared_distance(&other_repr.value)
57823                }
57824                Bottom(ref this) |
57825Left(ref this) |
57826Right(ref this) |
57827Top(ref this) => {
57828                    let other_repr =
57829                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Inset as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57830
57831                    this.compute_squared_distance(&other_repr.value)
57832                }
57833                MarginBottom(ref this) |
57834MarginLeft(ref this) |
57835MarginRight(ref this) |
57836MarginTop(ref this) => {
57837                    let other_repr =
57838                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Margin as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57839
57840                    this.compute_squared_distance(&other_repr.value)
57841                }
57842                PaddingBottom(ref this) |
57843PaddingLeft(ref this) |
57844PaddingRight(ref this) |
57845PaddingTop(ref this) => {
57846                    let other_repr =
57847                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::NonNegativeLengthPercentage as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57848
57849                    this.compute_squared_distance(&other_repr.value)
57850                }
57851                Height(ref this) |
57852MinHeight(ref this) |
57853MinWidth(ref this) |
57854Width(ref this) => {
57855                    let other_repr =
57856                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Size as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57857
57858                    this.compute_squared_distance(&other_repr.value)
57859                }
57860                BorderBottomWidth(ref this) |
57861BorderLeftWidth(ref this) |
57862BorderRightWidth(ref this) |
57863BorderTopWidth(ref this) |
57864OutlineWidth(ref this) => {
57865                    let other_repr =
57866                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::BorderSideWidth as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57867
57868                    this.compute_squared_distance(&other_repr.value)
57869                }
57870                BackgroundColor(ref this) |
57871BorderBottomColor(ref this) |
57872BorderLeftColor(ref this) |
57873BorderRightColor(ref this) |
57874BorderTopColor(ref this) |
57875OutlineColor(ref this) |
57876TextDecorationColor(ref this) => {
57877                    let other_repr =
57878                        &*(other as *const _ as *const AnimationValueVariantRepr<<<crate::values::specified::Color as ToComputedValue>::ComputedValue as ToAnimatedValue>::AnimatedValue>);
57879
57880                    this.compute_squared_distance(&other_repr.value)
57881                }
57882                _ => Err(()),
57883            }
57884        }
57885    }
57886}
57887
57888impl ToAnimatedZero for AnimationValue {
57889    #[inline]
57890    fn to_animated_zero(&self) -> Result<Self, ()> {
57891        match *self {
57892            AnimationValue::AspectRatio(ref base) => {
57893                Ok(AnimationValue::AspectRatio(base.to_animated_zero()?))
57894            },
57895            AnimationValue::ColumnCount(ref base) => {
57896                Ok(AnimationValue::ColumnCount(base.to_animated_zero()?))
57897            },
57898            AnimationValue::FontStretch(ref base) => {
57899                Ok(AnimationValue::FontStretch(base.to_animated_zero()?))
57900            },
57901            AnimationValue::FontStyle(ref base) => {
57902                Ok(AnimationValue::FontStyle(base.to_animated_zero()?))
57903            },
57904            AnimationValue::FontWeight(ref base) => {
57905                Ok(AnimationValue::FontWeight(base.to_animated_zero()?))
57906            },
57907            AnimationValue::Opacity(ref base) => {
57908                Ok(AnimationValue::Opacity(base.to_animated_zero()?))
57909            },
57910            AnimationValue::Order(ref base) => {
57911                Ok(AnimationValue::Order(base.to_animated_zero()?))
57912            },
57913            AnimationValue::Visibility(ref base) => {
57914                Ok(AnimationValue::Visibility(base.to_animated_zero()?))
57915            },
57916            AnimationValue::ZIndex(ref base) => {
57917                Ok(AnimationValue::ZIndex(base.to_animated_zero()?))
57918            },
57919            AnimationValue::Zoom(ref base) => {
57920                Ok(AnimationValue::Zoom(base.to_animated_zero()?))
57921            },
57922            AnimationValue::FlexGrow(ref base) => {
57923                Ok(AnimationValue::FlexGrow(base.to_animated_zero()?))
57924            },
57925            AnimationValue::FlexShrink(ref base) => {
57926                Ok(AnimationValue::FlexShrink(base.to_animated_zero()?))
57927            },
57928            AnimationValue::BackdropFilter(ref base) => {
57929                Ok(AnimationValue::BackdropFilter(base.to_animated_zero()?))
57930            },
57931            AnimationValue::BackgroundPositionX(ref base) => {
57932                Ok(AnimationValue::BackgroundPositionX(base.to_animated_zero()?))
57933            },
57934            AnimationValue::BackgroundPositionY(ref base) => {
57935                Ok(AnimationValue::BackgroundPositionY(base.to_animated_zero()?))
57936            },
57937            AnimationValue::BackgroundSize(ref base) => {
57938                Ok(AnimationValue::BackgroundSize(base.to_animated_zero()?))
57939            },
57940            AnimationValue::BorderImageOutset(ref base) => {
57941                Ok(AnimationValue::BorderImageOutset(base.to_animated_zero()?))
57942            },
57943            AnimationValue::BorderImageSlice(ref base) => {
57944                Ok(AnimationValue::BorderImageSlice(base.to_animated_zero()?))
57945            },
57946            AnimationValue::BorderImageWidth(ref base) => {
57947                Ok(AnimationValue::BorderImageWidth(base.to_animated_zero()?))
57948            },
57949            AnimationValue::BorderSpacing(ref base) => {
57950                Ok(AnimationValue::BorderSpacing(base.to_animated_zero()?))
57951            },
57952            AnimationValue::BoxShadow(ref base) => {
57953                Ok(AnimationValue::BoxShadow(base.to_animated_zero()?))
57954            },
57955            AnimationValue::Clip(ref base) => {
57956                Ok(AnimationValue::Clip(base.to_animated_zero()?))
57957            },
57958            AnimationValue::ClipPath(ref base) => {
57959                Ok(AnimationValue::ClipPath(base.to_animated_zero()?))
57960            },
57961            AnimationValue::Color(ref base) => {
57962                Ok(AnimationValue::Color(base.to_animated_zero()?))
57963            },
57964            AnimationValue::ColumnWidth(ref base) => {
57965                Ok(AnimationValue::ColumnWidth(base.to_animated_zero()?))
57966            },
57967            AnimationValue::Filter(ref base) => {
57968                Ok(AnimationValue::Filter(base.to_animated_zero()?))
57969            },
57970            AnimationValue::FlexBasis(ref base) => {
57971                Ok(AnimationValue::FlexBasis(base.to_animated_zero()?))
57972            },
57973            AnimationValue::FontSize(ref base) => {
57974                Ok(AnimationValue::FontSize(base.to_animated_zero()?))
57975            },
57976            AnimationValue::FontVariationSettings(ref base) => {
57977                Ok(AnimationValue::FontVariationSettings(base.to_animated_zero()?))
57978            },
57979            AnimationValue::LetterSpacing(ref base) => {
57980                Ok(AnimationValue::LetterSpacing(base.to_animated_zero()?))
57981            },
57982            AnimationValue::LineHeight(ref base) => {
57983                Ok(AnimationValue::LineHeight(base.to_animated_zero()?))
57984            },
57985            AnimationValue::OffsetPath(ref base) => {
57986                Ok(AnimationValue::OffsetPath(base.to_animated_zero()?))
57987            },
57988            AnimationValue::Perspective(ref base) => {
57989                Ok(AnimationValue::Perspective(base.to_animated_zero()?))
57990            },
57991            AnimationValue::Rotate(ref base) => {
57992                Ok(AnimationValue::Rotate(base.to_animated_zero()?))
57993            },
57994            AnimationValue::Scale(ref base) => {
57995                Ok(AnimationValue::Scale(base.to_animated_zero()?))
57996            },
57997            AnimationValue::TextIndent(ref base) => {
57998                Ok(AnimationValue::TextIndent(base.to_animated_zero()?))
57999            },
58000            AnimationValue::TextShadow(ref base) => {
58001                Ok(AnimationValue::TextShadow(base.to_animated_zero()?))
58002            },
58003            AnimationValue::Transform(ref base) => {
58004                Ok(AnimationValue::Transform(base.to_animated_zero()?))
58005            },
58006            AnimationValue::TransformOrigin(ref base) => {
58007                Ok(AnimationValue::TransformOrigin(base.to_animated_zero()?))
58008            },
58009            AnimationValue::Translate(ref base) => {
58010                Ok(AnimationValue::Translate(base.to_animated_zero()?))
58011            },
58012            AnimationValue::VerticalAlign(ref base) => {
58013                Ok(AnimationValue::VerticalAlign(base.to_animated_zero()?))
58014            },
58015            AnimationValue::WordSpacing(ref base) => {
58016                Ok(AnimationValue::WordSpacing(base.to_animated_zero()?))
58017            },
58018            AnimationValue::ObjectPosition(ref base) => {
58019                Ok(AnimationValue::ObjectPosition(base.to_animated_zero()?))
58020            },
58021            AnimationValue::PerspectiveOrigin(ref base) => {
58022                Ok(AnimationValue::PerspectiveOrigin(base.to_animated_zero()?))
58023            },
58024            AnimationValue::GridTemplateColumns(ref base) => {
58025                Ok(AnimationValue::GridTemplateColumns(base.to_animated_zero()?))
58026            },
58027            AnimationValue::GridTemplateRows(ref base) => {
58028                Ok(AnimationValue::GridTemplateRows(base.to_animated_zero()?))
58029            },
58030            AnimationValue::OutlineOffset(ref base) => {
58031                Ok(AnimationValue::OutlineOffset(base.to_animated_zero()?))
58032            },
58033            AnimationValue::OverflowClipMargin(ref base) => {
58034                Ok(AnimationValue::OverflowClipMargin(base.to_animated_zero()?))
58035            },
58036            AnimationValue::ColumnGap(ref base) => {
58037                Ok(AnimationValue::ColumnGap(base.to_animated_zero()?))
58038            },
58039            AnimationValue::RowGap(ref base) => {
58040                Ok(AnimationValue::RowGap(base.to_animated_zero()?))
58041            },
58042            AnimationValue::MaxHeight(ref base) => {
58043                Ok(AnimationValue::MaxHeight(base.to_animated_zero()?))
58044            },
58045            AnimationValue::MaxWidth(ref base) => {
58046                Ok(AnimationValue::MaxWidth(base.to_animated_zero()?))
58047            },
58048            AnimationValue::BorderBottomLeftRadius(ref base) => {
58049                Ok(AnimationValue::BorderBottomLeftRadius(base.to_animated_zero()?))
58050            },
58051            AnimationValue::BorderBottomRightRadius(ref base) => {
58052                Ok(AnimationValue::BorderBottomRightRadius(base.to_animated_zero()?))
58053            },
58054            AnimationValue::BorderTopLeftRadius(ref base) => {
58055                Ok(AnimationValue::BorderTopLeftRadius(base.to_animated_zero()?))
58056            },
58057            AnimationValue::BorderTopRightRadius(ref base) => {
58058                Ok(AnimationValue::BorderTopRightRadius(base.to_animated_zero()?))
58059            },
58060            AnimationValue::Bottom(ref base) => {
58061                Ok(AnimationValue::Bottom(base.to_animated_zero()?))
58062            },
58063            AnimationValue::Left(ref base) => {
58064                Ok(AnimationValue::Left(base.to_animated_zero()?))
58065            },
58066            AnimationValue::Right(ref base) => {
58067                Ok(AnimationValue::Right(base.to_animated_zero()?))
58068            },
58069            AnimationValue::Top(ref base) => {
58070                Ok(AnimationValue::Top(base.to_animated_zero()?))
58071            },
58072            AnimationValue::MarginBottom(ref base) => {
58073                Ok(AnimationValue::MarginBottom(base.to_animated_zero()?))
58074            },
58075            AnimationValue::MarginLeft(ref base) => {
58076                Ok(AnimationValue::MarginLeft(base.to_animated_zero()?))
58077            },
58078            AnimationValue::MarginRight(ref base) => {
58079                Ok(AnimationValue::MarginRight(base.to_animated_zero()?))
58080            },
58081            AnimationValue::MarginTop(ref base) => {
58082                Ok(AnimationValue::MarginTop(base.to_animated_zero()?))
58083            },
58084            AnimationValue::PaddingBottom(ref base) => {
58085                Ok(AnimationValue::PaddingBottom(base.to_animated_zero()?))
58086            },
58087            AnimationValue::PaddingLeft(ref base) => {
58088                Ok(AnimationValue::PaddingLeft(base.to_animated_zero()?))
58089            },
58090            AnimationValue::PaddingRight(ref base) => {
58091                Ok(AnimationValue::PaddingRight(base.to_animated_zero()?))
58092            },
58093            AnimationValue::PaddingTop(ref base) => {
58094                Ok(AnimationValue::PaddingTop(base.to_animated_zero()?))
58095            },
58096            AnimationValue::Height(ref base) => {
58097                Ok(AnimationValue::Height(base.to_animated_zero()?))
58098            },
58099            AnimationValue::MinHeight(ref base) => {
58100                Ok(AnimationValue::MinHeight(base.to_animated_zero()?))
58101            },
58102            AnimationValue::MinWidth(ref base) => {
58103                Ok(AnimationValue::MinWidth(base.to_animated_zero()?))
58104            },
58105            AnimationValue::Width(ref base) => {
58106                Ok(AnimationValue::Width(base.to_animated_zero()?))
58107            },
58108            AnimationValue::BorderBottomWidth(ref base) => {
58109                Ok(AnimationValue::BorderBottomWidth(base.to_animated_zero()?))
58110            },
58111            AnimationValue::BorderLeftWidth(ref base) => {
58112                Ok(AnimationValue::BorderLeftWidth(base.to_animated_zero()?))
58113            },
58114            AnimationValue::BorderRightWidth(ref base) => {
58115                Ok(AnimationValue::BorderRightWidth(base.to_animated_zero()?))
58116            },
58117            AnimationValue::BorderTopWidth(ref base) => {
58118                Ok(AnimationValue::BorderTopWidth(base.to_animated_zero()?))
58119            },
58120            AnimationValue::OutlineWidth(ref base) => {
58121                Ok(AnimationValue::OutlineWidth(base.to_animated_zero()?))
58122            },
58123            AnimationValue::BackgroundColor(ref base) => {
58124                Ok(AnimationValue::BackgroundColor(base.to_animated_zero()?))
58125            },
58126            AnimationValue::BorderBottomColor(ref base) => {
58127                Ok(AnimationValue::BorderBottomColor(base.to_animated_zero()?))
58128            },
58129            AnimationValue::BorderLeftColor(ref base) => {
58130                Ok(AnimationValue::BorderLeftColor(base.to_animated_zero()?))
58131            },
58132            AnimationValue::BorderRightColor(ref base) => {
58133                Ok(AnimationValue::BorderRightColor(base.to_animated_zero()?))
58134            },
58135            AnimationValue::BorderTopColor(ref base) => {
58136                Ok(AnimationValue::BorderTopColor(base.to_animated_zero()?))
58137            },
58138            AnimationValue::OutlineColor(ref base) => {
58139                Ok(AnimationValue::OutlineColor(base.to_animated_zero()?))
58140            },
58141            AnimationValue::TextDecorationColor(ref base) => {
58142                Ok(AnimationValue::TextDecorationColor(base.to_animated_zero()?))
58143            },
58144            AnimationValue::Custom(..) => {
58145                // TODO(bug 1869185): For some non-universal registered custom properties, it may make sense to implement this.
58146                Err(())
58147            },
58148            _ => Err(()),
58149        }
58150    }
58151}
58152
58153/// <https://drafts.csswg.org/web-animations-1/#animating-visibility>
58154impl Animate for Visibility {
58155    #[inline]
58156    fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
58157        match procedure {
58158            Procedure::Interpolate { .. } => {
58159                let (this_weight, other_weight) = procedure.weights();
58160                match (*self, *other) {
58161                    (Visibility::Visible, _) => {
58162                        Ok(if this_weight > 0.0 { *self } else { *other })
58163                    },
58164                    (_, Visibility::Visible) => {
58165                        Ok(if other_weight > 0.0 { *other } else { *self })
58166                    },
58167                    _ => Err(()),
58168                }
58169            },
58170            _ => Err(()),
58171        }
58172    }
58173}
58174
58175impl ComputeSquaredDistance for Visibility {
58176    #[inline]
58177    fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()> {
58178        Ok(SquaredDistance::from_sqrt(if *self == *other { 0. } else { 1. }))
58179    }
58180}
58181
58182impl ToAnimatedZero for Visibility {
58183    #[inline]
58184    fn to_animated_zero(&self) -> Result<Self, ()> {
58185        Err(())
58186    }
58187}
58188
58189/// <https://drafts.csswg.org/css-contain-3/#content-visibility-animation>
58190#[cfg(feature = "gecko")]
58191impl Animate for ContentVisibility {
58192    #[inline]
58193    fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
58194        match procedure {
58195            Procedure::Interpolate { .. } => {
58196                let (this_weight, other_weight) = procedure.weights();
58197                match (*self, *other) {
58198                    (ContentVisibility::Hidden, _) => {
58199                        Ok(if other_weight > 0.0 { *other } else { *self })
58200                    },
58201                    (_, ContentVisibility::Hidden) => {
58202                        Ok(if this_weight > 0.0 { *self } else { *other })
58203                    },
58204                    _ => Err(()),
58205                }
58206            },
58207            _ => Err(()),
58208        }
58209    }
58210}
58211
58212#[cfg(feature = "gecko")]
58213impl ComputeSquaredDistance for ContentVisibility {
58214    #[inline]
58215    fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()> {
58216        Ok(SquaredDistance::from_sqrt(if *self == *other { 0. } else { 1. }))
58217    }
58218}
58219
58220#[cfg(feature = "gecko")]
58221impl ToAnimatedZero for ContentVisibility {
58222    #[inline]
58223    fn to_animated_zero(&self) -> Result<Self, ()> {
58224        Err(())
58225    }
58226}
58227
58228/// <https://drafts.csswg.org/css-transitions/#animtype-rect>
58229impl Animate for ClipRect {
58230    #[inline]
58231    fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> {
58232        use crate::values::computed::LengthOrAuto;
58233        let animate_component = |this: &LengthOrAuto, other: &LengthOrAuto| {
58234            let result = this.animate(other, procedure)?;
58235            if let Procedure::Interpolate { .. } = procedure {
58236                return Ok(result);
58237            }
58238            if result.is_auto() {
58239                // FIXME(emilio): Why? A couple SMIL tests fail without this,
58240                // but it seems extremely fishy.
58241                return Err(());
58242            }
58243            Ok(result)
58244        };
58245
58246        Ok(ClipRect {
58247            top: animate_component(&self.top, &other.top)?,
58248            right: animate_component(&self.right, &other.right)?,
58249            bottom: animate_component(&self.bottom, &other.bottom)?,
58250            left: animate_component(&self.left, &other.left)?,
58251        })
58252    }
58253}
58254
58255
58256
58257/// <https://drafts.fxtf.org/filters/#animation-of-filters>
58258impl Animate for AnimatedFilter {
58259    fn animate(
58260        &self,
58261        other: &Self,
58262        procedure: Procedure,
58263    ) -> Result<Self, ()> {
58264        use crate::values::animated::animate_multiplicative_factor;
58265        match (self, other) {
58266            (&Filter::Blur(ref this), &Filter::Blur(ref other)) => {
58267                Ok(Filter::Blur(this.animate(other, procedure)?))
58268            },
58269            (&Filter::DropShadow(ref this), &Filter::DropShadow(ref other)) => {
58270                Ok(Filter::DropShadow(this.animate(other, procedure)?))
58271            },
58272            (&Filter::Grayscale(ref this), &Filter::Grayscale(ref other)) => {
58273                Ok(Filter::Grayscale(this.animate(other, procedure)?))
58274            },
58275            (&Filter::HueRotate(ref this), &Filter::HueRotate(ref other)) => {
58276                Ok(Filter::HueRotate(this.animate(other, procedure)?))
58277            },
58278            (&Filter::Invert(ref this), &Filter::Invert(ref other)) => {
58279                Ok(Filter::Invert(this.animate(other, procedure)?))
58280            },
58281            (&Filter::Sepia(ref this), &Filter::Sepia(ref other)) => {
58282                Ok(Filter::Sepia(this.animate(other, procedure)?))
58283            },
58284            (&Filter::Brightness(this), &Filter::Brightness(other)) => {
58285                Ok(Filter::Brightness(animate_multiplicative_factor(this, other, procedure)?))
58286            },
58287            (&Filter::Contrast(this), &Filter::Contrast(other)) => {
58288                Ok(Filter::Contrast(animate_multiplicative_factor(this, other, procedure)?))
58289            },
58290            (&Filter::Opacity(this), &Filter::Opacity(other)) => {
58291                Ok(Filter::Opacity(animate_multiplicative_factor(this, other, procedure)?))
58292            },
58293            (&Filter::Saturate(this), &Filter::Saturate(other)) => {
58294                Ok(Filter::Saturate(animate_multiplicative_factor(this, other, procedure)?))
58295            },
58296            _ => Err(()),
58297        }
58298    }
58299}
58300
58301/// <http://dev.w3.org/csswg/css-transforms/#none-transform-animation>
58302impl ToAnimatedZero for AnimatedFilter {
58303    fn to_animated_zero(&self) -> Result<Self, ()> {
58304        match *self {
58305            Filter::Blur(ref this) => Ok(Filter::Blur(this.to_animated_zero()?)),
58306            Filter::DropShadow(ref this) => Ok(Filter::DropShadow(this.to_animated_zero()?)),
58307            Filter::Grayscale(ref this) => Ok(Filter::Grayscale(this.to_animated_zero()?)),
58308            Filter::HueRotate(ref this) => Ok(Filter::HueRotate(this.to_animated_zero()?)),
58309            Filter::Invert(ref this) => Ok(Filter::Invert(this.to_animated_zero()?)),
58310            Filter::Sepia(ref this) => Ok(Filter::Sepia(this.to_animated_zero()?)),
58311            Filter::Brightness(_) => Ok(Filter::Brightness(1.)),
58312            Filter::Contrast(_) => Ok(Filter::Contrast(1.)),
58313            Filter::Opacity(_) => Ok(Filter::Opacity(1.)),
58314            Filter::Saturate(_) => Ok(Filter::Saturate(1.)),
58315            _ => Err(()),
58316        }
58317    }
58318}
58319
58320/// An iterator over all the properties that transition on a given style.
58321pub struct TransitionPropertyIterator<'a> {
58322    style: &'a ComputedValues,
58323    index_range: core::ops::Range<usize>,
58324    longhand_iterator: Option<NonCustomPropertyIterator<LonghandId>>,
58325}
58326
58327impl<'a> TransitionPropertyIterator<'a> {
58328    /// Create a `TransitionPropertyIterator` for the given style.
58329    pub fn from_style(style: &'a ComputedValues) -> Self {
58330        Self {
58331            style,
58332            index_range: 0..style.get_ui().transition_property_count(),
58333            longhand_iterator: None,
58334        }
58335    }
58336}
58337
58338/// A single iteration of the TransitionPropertyIterator.
58339pub struct TransitionPropertyIteration {
58340    /// The id of the longhand for this property.
58341    pub property: OwnedPropertyDeclarationId,
58342
58343    /// The index of this property in the list of transition properties for this
58344    /// iterator's style.
58345    pub index: usize,
58346}
58347
58348impl<'a> Iterator for TransitionPropertyIterator<'a> {
58349    type Item = TransitionPropertyIteration;
58350
58351    fn next(&mut self) -> Option<Self::Item> {
58352        use crate::values::computed::TransitionProperty;
58353        loop {
58354            if let Some(ref mut longhand_iterator) = self.longhand_iterator {
58355                if let Some(longhand_id) = longhand_iterator.next() {
58356                    return Some(TransitionPropertyIteration {
58357                        property: OwnedPropertyDeclarationId::Longhand(longhand_id),
58358                        index: self.index_range.start - 1,
58359                    });
58360                }
58361                self.longhand_iterator = None;
58362            }
58363
58364            let index = self.index_range.next()?;
58365            match self.style.get_ui().transition_property_at(index) {
58366                TransitionProperty::NonCustom(id) => {
58367                    match id.longhand_or_shorthand() {
58368                        Ok(longhand_id) => {
58369                            return Some(TransitionPropertyIteration {
58370                                property: OwnedPropertyDeclarationId::Longhand(longhand_id),
58371                                index,
58372                            });
58373                        },
58374                        Err(shorthand_id) => {
58375                            // In the other cases, we set up our state so that we are ready to
58376                            // compute the next value of the iterator and then loop (equivalent
58377                            // to calling self.next()).
58378                            self.longhand_iterator = Some(shorthand_id.longhands());
58379                        },
58380                    }
58381                }
58382                TransitionProperty::Custom(name) => {
58383                    return Some(TransitionPropertyIteration {
58384                        property: OwnedPropertyDeclarationId::Custom(name),
58385                        index,
58386                    })
58387                },
58388                TransitionProperty::Unsupported(..) => {},
58389            }
58390        }
58391    }
58392}
58393
58394}
58395
58396/// A module to group various interesting property counts.
58397pub mod property_counts {
58398    /// The number of (non-alias) longhand properties.
58399    pub const LONGHANDS: usize = 220;
58400    /// The number of (non-alias) shorthand properties.
58401    pub const SHORTHANDS: usize = 55;
58402    /// The number of aliases.
58403    pub const ALIASES: usize = 4;
58404    /// The number of counted unknown properties.
58405    pub const COUNTED_UNKNOWN: usize = 102;
58406    /// The number of (non-alias) longhands and shorthands.
58407    pub const LONGHANDS_AND_SHORTHANDS: usize = LONGHANDS + SHORTHANDS;
58408    /// The number of non-custom properties.
58409    pub const NON_CUSTOM: usize = LONGHANDS_AND_SHORTHANDS + ALIASES;
58410    /// The number of prioritary properties that we have.
58411    
58412    
58413    pub const PRIORITARY: usize = 11;
58414    /// The max number of longhands that a shorthand other than "all" expands to.
58415    pub const MAX_SHORTHAND_EXPANDED: usize =
58416        17;
58417    /// The max amount of longhands that the `all` shorthand will ever contain.
58418    pub const ALL_SHORTHAND_EXPANDED: usize = 215;
58419    /// The number of animatable properties.
58420    pub const ANIMATABLE: usize = 191;
58421}
58422
58423
58424impl NonCustomPropertyId {
58425    /// Get the property name.
58426    #[inline]
58427    pub fn name(self) -> &'static str {
58428        static MAP: [&'static str; property_counts::NON_CUSTOM] = [
58429            "align-content",
58430            "align-items",
58431            "align-self",
58432            "aspect-ratio",
58433            "backface-visibility",
58434            "baseline-source",
58435            "border-collapse",
58436            "border-image-repeat",
58437            "box-sizing",
58438            "caption-side",
58439            "clear",
58440            "column-count",
58441            "column-span",
58442            "contain",
58443            "container-type",
58444            "direction",
58445            "display",
58446            "empty-cells",
58447            "flex-direction",
58448            "flex-wrap",
58449            "float",
58450            "font-language-override",
58451            "font-stretch",
58452            "font-style",
58453            "font-variant-caps",
58454            "font-weight",
58455            "grid-auto-flow",
58456            "image-rendering",
58457            "isolation",
58458            "justify-content",
58459            "justify-items",
58460            "justify-self",
58461            "list-style-position",
58462            "list-style-type",
58463            "mix-blend-mode",
58464            "object-fit",
58465            "opacity",
58466            "order",
58467            "outline-style",
58468            "overflow-wrap",
58469            "pointer-events",
58470            "position",
58471            "-servo-overflow-clip-box",
58472            "-servo-top-layer",
58473            "table-layout",
58474            "text-align",
58475            "text-align-last",
58476            "text-decoration-line",
58477            "text-decoration-style",
58478            "text-justify",
58479            "text-rendering",
58480            "text-transform",
58481            "text-wrap-mode",
58482            "transform-style",
58483            "unicode-bidi",
58484            "visibility",
58485            "white-space-collapse",
58486            "word-break",
58487            "writing-mode",
58488            "z-index",
58489            "zoom",
58490            "flex-grow",
58491            "flex-shrink",
58492            "overflow-block",
58493            "overflow-inline",
58494            "overflow-x",
58495            "overflow-y",
58496            "border-block-end-style",
58497            "border-block-start-style",
58498            "border-bottom-style",
58499            "border-inline-end-style",
58500            "border-inline-start-style",
58501            "border-left-style",
58502            "border-right-style",
58503            "border-top-style",
58504            "animation-composition",
58505            "animation-delay",
58506            "animation-direction",
58507            "animation-duration",
58508            "animation-fill-mode",
58509            "animation-iteration-count",
58510            "animation-name",
58511            "animation-play-state",
58512            "animation-timeline",
58513            "animation-timing-function",
58514            "backdrop-filter",
58515            "background-attachment",
58516            "background-clip",
58517            "background-image",
58518            "background-origin",
58519            "background-position-x",
58520            "background-position-y",
58521            "background-repeat",
58522            "background-size",
58523            "border-image-outset",
58524            "border-image-slice",
58525            "border-image-width",
58526            "border-spacing",
58527            "box-shadow",
58528            "clip",
58529            "clip-path",
58530            "color",
58531            "color-scheme",
58532            "column-width",
58533            "container-name",
58534            "content",
58535            "counter-increment",
58536            "counter-reset",
58537            "cursor",
58538            "filter",
58539            "flex-basis",
58540            "font-family",
58541            "font-size",
58542            "font-variation-settings",
58543            "grid-template-areas",
58544            "letter-spacing",
58545            "line-height",
58546            "mask-image",
58547            "offset-path",
58548            "perspective",
58549            "quotes",
58550            "rotate",
58551            "scale",
58552            "text-indent",
58553            "text-overflow",
58554            "text-shadow",
58555            "transform",
58556            "transform-origin",
58557            "transition-behavior",
58558            "transition-delay",
58559            "transition-duration",
58560            "transition-property",
58561            "transition-timing-function",
58562            "translate",
58563            "vertical-align",
58564            "view-transition-class",
58565            "view-transition-name",
58566            "will-change",
58567            "word-spacing",
58568            "-x-lang",
58569            "object-position",
58570            "perspective-origin",
58571            "grid-template-columns",
58572            "grid-template-rows",
58573            "border-image-source",
58574            "list-style-image",
58575            "grid-auto-columns",
58576            "grid-auto-rows",
58577            "outline-offset",
58578            "overflow-clip-margin",
58579            "column-gap",
58580            "row-gap",
58581            "grid-column-end",
58582            "grid-column-start",
58583            "grid-row-end",
58584            "grid-row-start",
58585            "max-block-size",
58586            "max-height",
58587            "max-inline-size",
58588            "max-width",
58589            "border-bottom-left-radius",
58590            "border-bottom-right-radius",
58591            "border-end-end-radius",
58592            "border-end-start-radius",
58593            "border-start-end-radius",
58594            "border-start-start-radius",
58595            "border-top-left-radius",
58596            "border-top-right-radius",
58597            "bottom",
58598            "inset-block-end",
58599            "inset-block-start",
58600            "inset-inline-end",
58601            "inset-inline-start",
58602            "left",
58603            "right",
58604            "top",
58605            "margin-block-end",
58606            "margin-block-start",
58607            "margin-bottom",
58608            "margin-inline-end",
58609            "margin-inline-start",
58610            "margin-left",
58611            "margin-right",
58612            "margin-top",
58613            "padding-block-end",
58614            "padding-block-start",
58615            "padding-bottom",
58616            "padding-inline-end",
58617            "padding-inline-start",
58618            "padding-left",
58619            "padding-right",
58620            "padding-top",
58621            "block-size",
58622            "height",
58623            "inline-size",
58624            "min-block-size",
58625            "min-height",
58626            "min-inline-size",
58627            "min-width",
58628            "width",
58629            "border-block-end-width",
58630            "border-block-start-width",
58631            "border-bottom-width",
58632            "border-inline-end-width",
58633            "border-inline-start-width",
58634            "border-left-width",
58635            "border-right-width",
58636            "border-top-width",
58637            "outline-width",
58638            "background-color",
58639            "border-block-end-color",
58640            "border-block-start-color",
58641            "border-bottom-color",
58642            "border-inline-end-color",
58643            "border-inline-start-color",
58644            "border-left-color",
58645            "border-right-color",
58646            "border-top-color",
58647            "outline-color",
58648            "text-decoration-color",
58649            "background",
58650            "background-position",
58651            "border-color",
58652            "border-style",
58653            "border-width",
58654            "border-top",
58655            "border-right",
58656            "border-bottom",
58657            "border-left",
58658            "border-block-start",
58659            "border-block-end",
58660            "border-inline-start",
58661            "border-inline-end",
58662            "border",
58663            "border-radius",
58664            "border-image",
58665            "border-block-width",
58666            "border-block-style",
58667            "border-block-color",
58668            "border-inline-width",
58669            "border-inline-style",
58670            "border-inline-color",
58671            "border-block",
58672            "border-inline",
58673            "overflow",
58674            "columns",
58675            "font",
58676            "font-variant",
58677            "white-space",
58678            "list-style",
58679            "margin",
58680            "margin-block",
58681            "margin-inline",
58682            "outline",
58683            "padding",
58684            "padding-block",
58685            "padding-inline",
58686            "flex-flow",
58687            "flex",
58688            "gap",
58689            "grid-row",
58690            "grid-column",
58691            "grid-area",
58692            "grid-template",
58693            "grid",
58694            "place-content",
58695            "place-self",
58696            "place-items",
58697            "inset",
58698            "inset-block",
58699            "inset-inline",
58700            "text-decoration",
58701            "transition",
58702            "animation",
58703            "all",
58704            "word-wrap",
58705            "grid-column-gap",
58706            "grid-row-gap",
58707            "grid-gap",
58708        ];
58709        MAP[self.0 as usize]
58710    }
58711
58712    /// Returns whether this property is animatable.
58713    #[inline]
58714    pub fn is_animatable(self) -> bool {
58715        
58716static ANIMATABLE: NonCustomPropertyIdSet = NonCustomPropertyIdSet {
58717    
58718    storage: [0xffff1fff, 0xfbbff3ff, 0xffe00727, 0xfffffeff, 0xfffff5e0, 0xffffffff, 0xffffffff, 0xfffedfff, 0x7cffff]
58719};
58720
58721        ANIMATABLE.contains(self)
58722    }
58723
58724    /// Whether this property is enabled for all content right now.
58725    #[inline]
58726    pub(super) fn enabled_for_all_content(self) -> bool {
58727        
58728static EXPERIMENTAL: NonCustomPropertyIdSet = NonCustomPropertyIdSet {
58729    
58730    storage: [0x4007800, 0x14000000, 0x280800, 0x10660dc0, 0xf0cc180, 0x0, 0x0, 0x200000, 0x1f0]
58731};
58732
58733
58734        
58735static ALWAYS_ENABLED: NonCustomPropertyIdSet = NonCustomPropertyIdSet {
58736    
58737    storage: [0xfbff87ff, 0xebfff3ff, 0xffd7f7ff, 0xef99f23f, 0xf0f3367f, 0xffffffff, 0xffffffff, 0xffdfffff, 0x7ffe0f]
58738};
58739
58740
58741        let passes_pref_check = || {
58742                static PREF_NAME: [Option<&str>; 279] = [
58743                        
58744                            None,
58745                        
58746                            None,
58747                        
58748                            None,
58749                        
58750                            None,
58751                        
58752                            None,
58753                        
58754                            None,
58755                        
58756                            None,
58757                        
58758                            None,
58759                        
58760                            None,
58761                        
58762                            None,
58763                        
58764                            None,
58765                        
58766                            Some("layout.columns.enabled"),
58767                        
58768                            Some("layout.columns.enabled"),
58769                        
58770                            Some("layout.unimplemented"),
58771                        
58772                            Some("layout.container-queries.enabled"),
58773                        
58774                            None,
58775                        
58776                            None,
58777                        
58778                            None,
58779                        
58780                            None,
58781                        
58782                            None,
58783                        
58784                            None,
58785                        
58786                            None,
58787                        
58788                            None,
58789                        
58790                            None,
58791                        
58792                            None,
58793                        
58794                            None,
58795                        
58796                            Some("layout.grid.enabled"),
58797                        
58798                            None,
58799                        
58800                            None,
58801                        
58802                            None,
58803                        
58804                            None,
58805                        
58806                            None,
58807                        
58808                            None,
58809                        
58810                            None,
58811                        
58812                            None,
58813                        
58814                            None,
58815                        
58816                            None,
58817                        
58818                            None,
58819                        
58820                            None,
58821                        
58822                            None,
58823                        
58824                            None,
58825                        
58826                            None,
58827                        
58828                            None,
58829                        
58830                            None,
58831                        
58832                            None,
58833                        
58834                            None,
58835                        
58836                            None,
58837                        
58838                            None,
58839                        
58840                            None,
58841                        
58842                            None,
58843                        
58844                            None,
58845                        
58846                            None,
58847                        
58848                            None,
58849                        
58850                            None,
58851                        
58852                            None,
58853                        
58854                            None,
58855                        
58856                            None,
58857                        
58858                            None,
58859                        
58860                            Some("layout.writing-mode.enabled"),
58861                        
58862                            None,
58863                        
58864                            Some("layout.unimplemented"),
58865                        
58866                            None,
58867                        
58868                            None,
58869                        
58870                            None,
58871                        
58872                            None,
58873                        
58874                            None,
58875                        
58876                            None,
58877                        
58878                            None,
58879                        
58880                            None,
58881                        
58882                            None,
58883                        
58884                            None,
58885                        
58886                            None,
58887                        
58888                            None,
58889                        
58890                            None,
58891                        
58892                            None,
58893                        
58894                            Some("layout.unimplemented"),
58895                        
58896                            None,
58897                        
58898                            None,
58899                        
58900                            None,
58901                        
58902                            None,
58903                        
58904                            None,
58905                        
58906                            None,
58907                        
58908                            None,
58909                        
58910                            Some("layout.unimplemented"),
58911                        
58912                            None,
58913                        
58914                            Some("layout.unimplemented"),
58915                        
58916                            None,
58917                        
58918                            None,
58919                        
58920                            None,
58921                        
58922                            None,
58923                        
58924                            None,
58925                        
58926                            None,
58927                        
58928                            None,
58929                        
58930                            None,
58931                        
58932                            None,
58933                        
58934                            None,
58935                        
58936                            None,
58937                        
58938                            None,
58939                        
58940                            None,
58941                        
58942                            None,
58943                        
58944                            None,
58945                        
58946                            None,
58947                        
58948                            Some("layout.unimplemented"),
58949                        
58950                            Some("layout.columns.enabled"),
58951                        
58952                            Some("layout.container-queries.enabled"),
58953                        
58954                            None,
58955                        
58956                            Some("layout.unimplemented"),
58957                        
58958                            Some("layout.unimplemented"),
58959                        
58960                            None,
58961                        
58962                            None,
58963                        
58964                            None,
58965                        
58966                            None,
58967                        
58968                            None,
58969                        
58970                            Some("layout.variable_fonts.enabled"),
58971                        
58972                            Some("layout.grid.enabled"),
58973                        
58974                            None,
58975                        
58976                            None,
58977                        
58978                            Some("layout.unimplemented"),
58979                        
58980                            Some("layout.unimplemented"),
58981                        
58982                            None,
58983                        
58984                            None,
58985                        
58986                            None,
58987                        
58988                            None,
58989                        
58990                            None,
58991                        
58992                            Some("layout.unimplemented"),
58993                        
58994                            None,
58995                        
58996                            None,
58997                        
58998                            None,
58999                        
59000                            None,
59001                        
59002                            None,
59003                        
59004                            None,
59005                        
59006                            None,
59007                        
59008                            None,
59009                        
59010                            None,
59011                        
59012                            None,
59013                        
59014                            Some("layout.unimplemented"),
59015                        
59016                            Some("layout.unimplemented"),
59017                        
59018                            None,
59019                        
59020                            None,
59021                        
59022                            None,
59023                        
59024                            None,
59025                        
59026                            None,
59027                        
59028                            Some("layout.grid.enabled"),
59029                        
59030                            Some("layout.grid.enabled"),
59031                        
59032                            None,
59033                        
59034                            None,
59035                        
59036                            Some("layout.grid.enabled"),
59037                        
59038                            Some("layout.grid.enabled"),
59039                        
59040                            None,
59041                        
59042                            None,
59043                        
59044                            None,
59045                        
59046                            None,
59047                        
59048                            Some("layout.grid.enabled"),
59049                        
59050                            Some("layout.grid.enabled"),
59051                        
59052                            Some("layout.grid.enabled"),
59053                        
59054                            Some("layout.grid.enabled"),
59055                        
59056                            None,
59057                        
59058                            None,
59059                        
59060                            None,
59061                        
59062                            None,
59063                        
59064                            None,
59065                        
59066                            None,
59067                        
59068                            None,
59069                        
59070                            None,
59071                        
59072                            None,
59073                        
59074                            None,
59075                        
59076                            None,
59077                        
59078                            None,
59079                        
59080                            None,
59081                        
59082                            None,
59083                        
59084                            None,
59085                        
59086                            None,
59087                        
59088                            None,
59089                        
59090                            None,
59091                        
59092                            None,
59093                        
59094                            None,
59095                        
59096                            None,
59097                        
59098                            None,
59099                        
59100                            None,
59101                        
59102                            None,
59103                        
59104                            None,
59105                        
59106                            None,
59107                        
59108                            None,
59109                        
59110                            None,
59111                        
59112                            None,
59113                        
59114                            None,
59115                        
59116                            None,
59117                        
59118                            None,
59119                        
59120                            None,
59121                        
59122                            None,
59123                        
59124                            None,
59125                        
59126                            None,
59127                        
59128                            None,
59129                        
59130                            None,
59131                        
59132                            None,
59133                        
59134                            None,
59135                        
59136                            None,
59137                        
59138                            None,
59139                        
59140                            None,
59141                        
59142                            None,
59143                        
59144                            None,
59145                        
59146                            None,
59147                        
59148                            None,
59149                        
59150                            None,
59151                        
59152                            None,
59153                        
59154                            None,
59155                        
59156                            None,
59157                        
59158                            None,
59159                        
59160                            None,
59161                        
59162                            None,
59163                        
59164                            None,
59165                        
59166                            None,
59167                        
59168                            None,
59169                        
59170                            None,
59171                        
59172                            None,
59173                        
59174                            None,
59175                        
59176                            None,
59177                        
59178                            None,
59179                        
59180                            None,
59181                        
59182                            None,
59183                        
59184                            None,
59185                        
59186                            None,
59187                        
59188                            None,
59189                        
59190                            None,
59191                        
59192                            None,
59193                        
59194                            None,
59195                        
59196                            None,
59197                        
59198                            None,
59199                        
59200                            None,
59201                        
59202                            None,
59203                        
59204                            None,
59205                        
59206                            None,
59207                        
59208                            None,
59209                        
59210                            None,
59211                        
59212                            None,
59213                        
59214                            None,
59215                        
59216                            None,
59217                        
59218                            None,
59219                        
59220                            None,
59221                        
59222                            None,
59223                        
59224                            None,
59225                        
59226                            None,
59227                        
59228                            None,
59229                        
59230                            None,
59231                        
59232                            None,
59233                        
59234                            Some("layout.columns.enabled"),
59235                        
59236                            None,
59237                        
59238                            None,
59239                        
59240                            None,
59241                        
59242                            None,
59243                        
59244                            None,
59245                        
59246                            None,
59247                        
59248                            None,
59249                        
59250                            None,
59251                        
59252                            None,
59253                        
59254                            None,
59255                        
59256                            None,
59257                        
59258                            None,
59259                        
59260                            None,
59261                        
59262                            None,
59263                        
59264                            Some("layout.grid.enabled"),
59265                        
59266                            Some("layout.grid.enabled"),
59267                        
59268                            Some("layout.grid.enabled"),
59269                        
59270                            Some("layout.grid.enabled"),
59271                        
59272                            Some("layout.grid.enabled"),
59273                        
59274                            None,
59275                        
59276                            None,
59277                        
59278                            None,
59279                        
59280                            None,
59281                        
59282                            None,
59283                        
59284                            None,
59285                        
59286                            None,
59287                        
59288                            None,
59289                        
59290                            None,
59291                        
59292                            None,
59293                        
59294                            None,
59295                        
59296                            None,
59297                        
59298                            None,
59299                        
59300                            None,
59301                ];
59302                let pref = match PREF_NAME[self.0 as usize] {
59303                    None => return true,
59304                    Some(pref) => pref,
59305                };
59306
59307                style_config::get_bool(pref)
59308        };
59309
59310        if ALWAYS_ENABLED.contains(self) {
59311            return true
59312        }
59313
59314        if EXPERIMENTAL.contains(self) && passes_pref_check() {
59315            return true
59316        }
59317
59318        false
59319    }
59320
59321    /// Returns whether a given rule allows a given property.
59322    #[inline]
59323    pub fn allowed_in_rule(self, rule_types: CssRuleTypes) -> bool {
59324        debug_assert!(
59325            rule_types.contains(CssRuleType::Keyframe) ||
59326            rule_types.contains(CssRuleType::Page) ||
59327            rule_types.contains(CssRuleType::Style) ||
59328            rule_types.contains(CssRuleType::Scope) ||
59329            rule_types.contains(CssRuleType::PositionTry),
59330            "Given rule type does not allow declarations."
59331        );
59332
59333        static MAP: [u32; property_counts::NON_CUSTOM] = [
59334            CssRuleType::Style.bit() |
59335            CssRuleType::Keyframe.bit() |
59336            CssRuleType::Scope.bit() |
59337            0,
59338            CssRuleType::Style.bit() |
59339            CssRuleType::Keyframe.bit() |
59340            CssRuleType::Scope.bit() |
59341            0,
59342            CssRuleType::Style.bit() |
59343            CssRuleType::Keyframe.bit() |
59344            CssRuleType::PositionTry.bit() |
59345            CssRuleType::Scope.bit() |
59346            0,
59347            CssRuleType::Style.bit() |
59348            CssRuleType::Keyframe.bit() |
59349            CssRuleType::Scope.bit() |
59350            0,
59351            CssRuleType::Style.bit() |
59352            CssRuleType::Keyframe.bit() |
59353            CssRuleType::Scope.bit() |
59354            0,
59355            CssRuleType::Style.bit() |
59356            CssRuleType::Keyframe.bit() |
59357            CssRuleType::Scope.bit() |
59358            0,
59359            CssRuleType::Style.bit() |
59360            CssRuleType::Keyframe.bit() |
59361            CssRuleType::Scope.bit() |
59362            0,
59363            CssRuleType::Style.bit() |
59364            CssRuleType::Keyframe.bit() |
59365            CssRuleType::Scope.bit() |
59366            0,
59367            CssRuleType::Style.bit() |
59368            CssRuleType::Keyframe.bit() |
59369            CssRuleType::Scope.bit() |
59370            0,
59371            CssRuleType::Style.bit() |
59372            CssRuleType::Keyframe.bit() |
59373            CssRuleType::Scope.bit() |
59374            0,
59375            CssRuleType::Style.bit() |
59376            CssRuleType::Keyframe.bit() |
59377            CssRuleType::Scope.bit() |
59378            0,
59379            CssRuleType::Style.bit() |
59380            CssRuleType::Keyframe.bit() |
59381            CssRuleType::Scope.bit() |
59382            0,
59383            CssRuleType::Style.bit() |
59384            CssRuleType::Keyframe.bit() |
59385            CssRuleType::Scope.bit() |
59386            0,
59387            CssRuleType::Style.bit() |
59388            CssRuleType::Keyframe.bit() |
59389            CssRuleType::Scope.bit() |
59390            0,
59391            CssRuleType::Style.bit() |
59392            CssRuleType::Keyframe.bit() |
59393            CssRuleType::Scope.bit() |
59394            0,
59395            CssRuleType::Style.bit() |
59396            CssRuleType::Keyframe.bit() |
59397            CssRuleType::Scope.bit() |
59398            0,
59399            CssRuleType::Style.bit() |
59400            CssRuleType::Keyframe.bit() |
59401            CssRuleType::Scope.bit() |
59402            0,
59403            CssRuleType::Style.bit() |
59404            CssRuleType::Keyframe.bit() |
59405            CssRuleType::Scope.bit() |
59406            0,
59407            CssRuleType::Style.bit() |
59408            CssRuleType::Keyframe.bit() |
59409            CssRuleType::Scope.bit() |
59410            0,
59411            CssRuleType::Style.bit() |
59412            CssRuleType::Keyframe.bit() |
59413            CssRuleType::Scope.bit() |
59414            0,
59415            CssRuleType::Style.bit() |
59416            CssRuleType::Keyframe.bit() |
59417            CssRuleType::Scope.bit() |
59418            0,
59419            CssRuleType::Style.bit() |
59420            CssRuleType::Keyframe.bit() |
59421            CssRuleType::Scope.bit() |
59422            0,
59423            CssRuleType::Style.bit() |
59424            CssRuleType::Keyframe.bit() |
59425            CssRuleType::Scope.bit() |
59426            0,
59427            CssRuleType::Style.bit() |
59428            CssRuleType::Keyframe.bit() |
59429            CssRuleType::Scope.bit() |
59430            0,
59431            CssRuleType::Style.bit() |
59432            CssRuleType::Keyframe.bit() |
59433            CssRuleType::Scope.bit() |
59434            0,
59435            CssRuleType::Style.bit() |
59436            CssRuleType::Keyframe.bit() |
59437            CssRuleType::Scope.bit() |
59438            0,
59439            CssRuleType::Style.bit() |
59440            CssRuleType::Keyframe.bit() |
59441            CssRuleType::Scope.bit() |
59442            0,
59443            CssRuleType::Style.bit() |
59444            CssRuleType::Keyframe.bit() |
59445            CssRuleType::Scope.bit() |
59446            0,
59447            CssRuleType::Style.bit() |
59448            CssRuleType::Keyframe.bit() |
59449            CssRuleType::Scope.bit() |
59450            0,
59451            CssRuleType::Style.bit() |
59452            CssRuleType::Keyframe.bit() |
59453            CssRuleType::Scope.bit() |
59454            0,
59455            CssRuleType::Style.bit() |
59456            CssRuleType::Keyframe.bit() |
59457            CssRuleType::Scope.bit() |
59458            0,
59459            CssRuleType::Style.bit() |
59460            CssRuleType::Keyframe.bit() |
59461            CssRuleType::PositionTry.bit() |
59462            CssRuleType::Scope.bit() |
59463            0,
59464            CssRuleType::Style.bit() |
59465            CssRuleType::Keyframe.bit() |
59466            CssRuleType::Scope.bit() |
59467            0,
59468            CssRuleType::Style.bit() |
59469            CssRuleType::Keyframe.bit() |
59470            CssRuleType::Scope.bit() |
59471            0,
59472            CssRuleType::Style.bit() |
59473            CssRuleType::Keyframe.bit() |
59474            CssRuleType::Scope.bit() |
59475            0,
59476            CssRuleType::Style.bit() |
59477            CssRuleType::Keyframe.bit() |
59478            CssRuleType::Scope.bit() |
59479            0,
59480            CssRuleType::Style.bit() |
59481            CssRuleType::Keyframe.bit() |
59482            CssRuleType::Scope.bit() |
59483            0,
59484            CssRuleType::Style.bit() |
59485            CssRuleType::Keyframe.bit() |
59486            CssRuleType::Scope.bit() |
59487            0,
59488            CssRuleType::Style.bit() |
59489            CssRuleType::Keyframe.bit() |
59490            CssRuleType::Scope.bit() |
59491            0,
59492            CssRuleType::Style.bit() |
59493            CssRuleType::Keyframe.bit() |
59494            CssRuleType::Scope.bit() |
59495            0,
59496            CssRuleType::Style.bit() |
59497            CssRuleType::Keyframe.bit() |
59498            CssRuleType::Scope.bit() |
59499            0,
59500            CssRuleType::Style.bit() |
59501            CssRuleType::Keyframe.bit() |
59502            CssRuleType::Scope.bit() |
59503            0,
59504            CssRuleType::Style.bit() |
59505            CssRuleType::Keyframe.bit() |
59506            CssRuleType::Scope.bit() |
59507            0,
59508            CssRuleType::Style.bit() |
59509            CssRuleType::Keyframe.bit() |
59510            CssRuleType::Scope.bit() |
59511            0,
59512            CssRuleType::Style.bit() |
59513            CssRuleType::Keyframe.bit() |
59514            CssRuleType::Scope.bit() |
59515            0,
59516            CssRuleType::Style.bit() |
59517            CssRuleType::Keyframe.bit() |
59518            CssRuleType::Scope.bit() |
59519            0,
59520            CssRuleType::Style.bit() |
59521            CssRuleType::Keyframe.bit() |
59522            CssRuleType::Scope.bit() |
59523            0,
59524            CssRuleType::Style.bit() |
59525            CssRuleType::Keyframe.bit() |
59526            CssRuleType::Scope.bit() |
59527            0,
59528            CssRuleType::Style.bit() |
59529            CssRuleType::Keyframe.bit() |
59530            CssRuleType::Scope.bit() |
59531            0,
59532            CssRuleType::Style.bit() |
59533            CssRuleType::Keyframe.bit() |
59534            CssRuleType::Scope.bit() |
59535            0,
59536            CssRuleType::Style.bit() |
59537            CssRuleType::Keyframe.bit() |
59538            CssRuleType::Scope.bit() |
59539            0,
59540            CssRuleType::Style.bit() |
59541            CssRuleType::Keyframe.bit() |
59542            CssRuleType::Scope.bit() |
59543            0,
59544            CssRuleType::Style.bit() |
59545            CssRuleType::Keyframe.bit() |
59546            CssRuleType::Scope.bit() |
59547            0,
59548            CssRuleType::Style.bit() |
59549            CssRuleType::Keyframe.bit() |
59550            CssRuleType::Scope.bit() |
59551            0,
59552            CssRuleType::Style.bit() |
59553            CssRuleType::Keyframe.bit() |
59554            CssRuleType::Scope.bit() |
59555            0,
59556            CssRuleType::Style.bit() |
59557            CssRuleType::Keyframe.bit() |
59558            CssRuleType::Scope.bit() |
59559            0,
59560            CssRuleType::Style.bit() |
59561            CssRuleType::Keyframe.bit() |
59562            CssRuleType::Scope.bit() |
59563            0,
59564            CssRuleType::Style.bit() |
59565            CssRuleType::Keyframe.bit() |
59566            CssRuleType::Scope.bit() |
59567            0,
59568            CssRuleType::Style.bit() |
59569            CssRuleType::Keyframe.bit() |
59570            CssRuleType::Scope.bit() |
59571            0,
59572            CssRuleType::Style.bit() |
59573            CssRuleType::Keyframe.bit() |
59574            CssRuleType::Scope.bit() |
59575            0,
59576            CssRuleType::Style.bit() |
59577            CssRuleType::Keyframe.bit() |
59578            CssRuleType::Scope.bit() |
59579            0,
59580            CssRuleType::Style.bit() |
59581            CssRuleType::Keyframe.bit() |
59582            CssRuleType::Scope.bit() |
59583            0,
59584            CssRuleType::Style.bit() |
59585            CssRuleType::Keyframe.bit() |
59586            CssRuleType::Scope.bit() |
59587            0,
59588            CssRuleType::Style.bit() |
59589            CssRuleType::Keyframe.bit() |
59590            CssRuleType::Scope.bit() |
59591            0,
59592            CssRuleType::Style.bit() |
59593            CssRuleType::Keyframe.bit() |
59594            CssRuleType::Scope.bit() |
59595            0,
59596            CssRuleType::Style.bit() |
59597            CssRuleType::Keyframe.bit() |
59598            CssRuleType::Scope.bit() |
59599            0,
59600            CssRuleType::Style.bit() |
59601            CssRuleType::Keyframe.bit() |
59602            CssRuleType::Scope.bit() |
59603            0,
59604            CssRuleType::Style.bit() |
59605            CssRuleType::Keyframe.bit() |
59606            CssRuleType::Scope.bit() |
59607            0,
59608            CssRuleType::Style.bit() |
59609            CssRuleType::Keyframe.bit() |
59610            CssRuleType::Scope.bit() |
59611            0,
59612            CssRuleType::Style.bit() |
59613            CssRuleType::Keyframe.bit() |
59614            CssRuleType::Scope.bit() |
59615            0,
59616            CssRuleType::Style.bit() |
59617            CssRuleType::Keyframe.bit() |
59618            CssRuleType::Scope.bit() |
59619            0,
59620            CssRuleType::Style.bit() |
59621            CssRuleType::Keyframe.bit() |
59622            CssRuleType::Scope.bit() |
59623            0,
59624            CssRuleType::Style.bit() |
59625            CssRuleType::Keyframe.bit() |
59626            CssRuleType::Scope.bit() |
59627            0,
59628            CssRuleType::Style.bit() |
59629            CssRuleType::Keyframe.bit() |
59630            CssRuleType::Scope.bit() |
59631            0,
59632            CssRuleType::Style.bit() |
59633            CssRuleType::Keyframe.bit() |
59634            CssRuleType::Scope.bit() |
59635            0,
59636            CssRuleType::Style.bit() |
59637            CssRuleType::Keyframe.bit() |
59638            CssRuleType::Scope.bit() |
59639            0,
59640            CssRuleType::Style.bit() |
59641            CssRuleType::Scope.bit() |
59642            0,
59643            CssRuleType::Style.bit() |
59644            CssRuleType::Scope.bit() |
59645            0,
59646            CssRuleType::Style.bit() |
59647            CssRuleType::Keyframe.bit() |
59648            CssRuleType::Scope.bit() |
59649            0,
59650            CssRuleType::Style.bit() |
59651            CssRuleType::Scope.bit() |
59652            0,
59653            CssRuleType::Style.bit() |
59654            CssRuleType::Scope.bit() |
59655            0,
59656            CssRuleType::Style.bit() |
59657            CssRuleType::Scope.bit() |
59658            0,
59659            CssRuleType::Style.bit() |
59660            CssRuleType::Scope.bit() |
59661            0,
59662            CssRuleType::Style.bit() |
59663            CssRuleType::Scope.bit() |
59664            0,
59665            CssRuleType::Style.bit() |
59666            CssRuleType::Keyframe.bit() |
59667            CssRuleType::Scope.bit() |
59668            0,
59669            CssRuleType::Style.bit() |
59670            CssRuleType::Keyframe.bit() |
59671            CssRuleType::Scope.bit() |
59672            0,
59673            CssRuleType::Style.bit() |
59674            CssRuleType::Keyframe.bit() |
59675            CssRuleType::Scope.bit() |
59676            0,
59677            CssRuleType::Style.bit() |
59678            CssRuleType::Keyframe.bit() |
59679            CssRuleType::Scope.bit() |
59680            0,
59681            CssRuleType::Style.bit() |
59682            CssRuleType::Keyframe.bit() |
59683            CssRuleType::Scope.bit() |
59684            0,
59685            CssRuleType::Style.bit() |
59686            CssRuleType::Keyframe.bit() |
59687            CssRuleType::Scope.bit() |
59688            0,
59689            CssRuleType::Style.bit() |
59690            CssRuleType::Keyframe.bit() |
59691            CssRuleType::Scope.bit() |
59692            0,
59693            CssRuleType::Style.bit() |
59694            CssRuleType::Keyframe.bit() |
59695            CssRuleType::Scope.bit() |
59696            0,
59697            CssRuleType::Style.bit() |
59698            CssRuleType::Keyframe.bit() |
59699            CssRuleType::Scope.bit() |
59700            0,
59701            CssRuleType::Style.bit() |
59702            CssRuleType::Keyframe.bit() |
59703            CssRuleType::Scope.bit() |
59704            0,
59705            CssRuleType::Style.bit() |
59706            CssRuleType::Keyframe.bit() |
59707            CssRuleType::Scope.bit() |
59708            0,
59709            CssRuleType::Style.bit() |
59710            CssRuleType::Keyframe.bit() |
59711            CssRuleType::Scope.bit() |
59712            0,
59713            CssRuleType::Style.bit() |
59714            CssRuleType::Keyframe.bit() |
59715            CssRuleType::Scope.bit() |
59716            0,
59717            CssRuleType::Style.bit() |
59718            CssRuleType::Keyframe.bit() |
59719            CssRuleType::Scope.bit() |
59720            0,
59721            CssRuleType::Style.bit() |
59722            CssRuleType::Keyframe.bit() |
59723            CssRuleType::Scope.bit() |
59724            0,
59725            CssRuleType::Style.bit() |
59726            CssRuleType::Keyframe.bit() |
59727            CssRuleType::Scope.bit() |
59728            0,
59729            CssRuleType::Style.bit() |
59730            CssRuleType::Keyframe.bit() |
59731            CssRuleType::Scope.bit() |
59732            0,
59733            CssRuleType::Style.bit() |
59734            CssRuleType::Keyframe.bit() |
59735            CssRuleType::Scope.bit() |
59736            0,
59737            CssRuleType::Style.bit() |
59738            CssRuleType::Keyframe.bit() |
59739            CssRuleType::Scope.bit() |
59740            0,
59741            CssRuleType::Style.bit() |
59742            CssRuleType::Keyframe.bit() |
59743            CssRuleType::Scope.bit() |
59744            0,
59745            CssRuleType::Style.bit() |
59746            CssRuleType::Keyframe.bit() |
59747            CssRuleType::Scope.bit() |
59748            0,
59749            CssRuleType::Style.bit() |
59750            CssRuleType::Keyframe.bit() |
59751            CssRuleType::Scope.bit() |
59752            0,
59753            CssRuleType::Style.bit() |
59754            CssRuleType::Keyframe.bit() |
59755            CssRuleType::Scope.bit() |
59756            0,
59757            CssRuleType::Style.bit() |
59758            CssRuleType::Keyframe.bit() |
59759            CssRuleType::Scope.bit() |
59760            0,
59761            CssRuleType::Style.bit() |
59762            CssRuleType::Keyframe.bit() |
59763            CssRuleType::Scope.bit() |
59764            0,
59765            CssRuleType::Style.bit() |
59766            CssRuleType::Keyframe.bit() |
59767            CssRuleType::Scope.bit() |
59768            0,
59769            CssRuleType::Style.bit() |
59770            CssRuleType::Keyframe.bit() |
59771            CssRuleType::Scope.bit() |
59772            0,
59773            CssRuleType::Style.bit() |
59774            CssRuleType::Keyframe.bit() |
59775            CssRuleType::Scope.bit() |
59776            0,
59777            CssRuleType::Style.bit() |
59778            CssRuleType::Keyframe.bit() |
59779            CssRuleType::Scope.bit() |
59780            0,
59781            CssRuleType::Style.bit() |
59782            CssRuleType::Keyframe.bit() |
59783            CssRuleType::Scope.bit() |
59784            0,
59785            CssRuleType::Style.bit() |
59786            CssRuleType::Keyframe.bit() |
59787            CssRuleType::Scope.bit() |
59788            0,
59789            CssRuleType::Style.bit() |
59790            CssRuleType::Keyframe.bit() |
59791            CssRuleType::Scope.bit() |
59792            0,
59793            CssRuleType::Style.bit() |
59794            CssRuleType::Keyframe.bit() |
59795            CssRuleType::Scope.bit() |
59796            0,
59797            CssRuleType::Style.bit() |
59798            CssRuleType::Keyframe.bit() |
59799            CssRuleType::Scope.bit() |
59800            0,
59801            CssRuleType::Style.bit() |
59802            CssRuleType::Keyframe.bit() |
59803            CssRuleType::Scope.bit() |
59804            0,
59805            CssRuleType::Style.bit() |
59806            CssRuleType::Keyframe.bit() |
59807            CssRuleType::Scope.bit() |
59808            0,
59809            CssRuleType::Style.bit() |
59810            CssRuleType::Keyframe.bit() |
59811            CssRuleType::Scope.bit() |
59812            0,
59813            CssRuleType::Style.bit() |
59814            CssRuleType::Keyframe.bit() |
59815            CssRuleType::Scope.bit() |
59816            0,
59817            CssRuleType::Style.bit() |
59818            CssRuleType::Keyframe.bit() |
59819            CssRuleType::Scope.bit() |
59820            0,
59821            CssRuleType::Style.bit() |
59822            CssRuleType::Keyframe.bit() |
59823            CssRuleType::Scope.bit() |
59824            0,
59825            CssRuleType::Style.bit() |
59826            CssRuleType::Keyframe.bit() |
59827            CssRuleType::Scope.bit() |
59828            0,
59829            CssRuleType::Style.bit() |
59830            CssRuleType::Keyframe.bit() |
59831            CssRuleType::Scope.bit() |
59832            0,
59833            CssRuleType::Style.bit() |
59834            CssRuleType::Keyframe.bit() |
59835            CssRuleType::Scope.bit() |
59836            0,
59837            CssRuleType::Style.bit() |
59838            CssRuleType::Keyframe.bit() |
59839            CssRuleType::Scope.bit() |
59840            0,
59841            CssRuleType::Style.bit() |
59842            CssRuleType::Keyframe.bit() |
59843            CssRuleType::Scope.bit() |
59844            0,
59845            CssRuleType::Style.bit() |
59846            CssRuleType::Keyframe.bit() |
59847            CssRuleType::Scope.bit() |
59848            0,
59849            CssRuleType::Style.bit() |
59850            CssRuleType::Keyframe.bit() |
59851            CssRuleType::Scope.bit() |
59852            0,
59853            CssRuleType::Style.bit() |
59854            CssRuleType::Keyframe.bit() |
59855            CssRuleType::Scope.bit() |
59856            0,
59857            CssRuleType::Style.bit() |
59858            CssRuleType::Keyframe.bit() |
59859            CssRuleType::Scope.bit() |
59860            0,
59861            CssRuleType::Style.bit() |
59862            CssRuleType::Keyframe.bit() |
59863            CssRuleType::Scope.bit() |
59864            0,
59865            CssRuleType::Style.bit() |
59866            CssRuleType::Keyframe.bit() |
59867            CssRuleType::Scope.bit() |
59868            0,
59869            CssRuleType::Style.bit() |
59870            CssRuleType::Keyframe.bit() |
59871            CssRuleType::Scope.bit() |
59872            0,
59873            CssRuleType::Style.bit() |
59874            CssRuleType::Keyframe.bit() |
59875            CssRuleType::Scope.bit() |
59876            0,
59877            CssRuleType::Style.bit() |
59878            CssRuleType::Keyframe.bit() |
59879            CssRuleType::Scope.bit() |
59880            0,
59881            CssRuleType::Style.bit() |
59882            CssRuleType::Keyframe.bit() |
59883            CssRuleType::Scope.bit() |
59884            0,
59885            CssRuleType::Style.bit() |
59886            CssRuleType::Keyframe.bit() |
59887            CssRuleType::Scope.bit() |
59888            0,
59889            CssRuleType::Style.bit() |
59890            CssRuleType::Keyframe.bit() |
59891            CssRuleType::Scope.bit() |
59892            0,
59893            CssRuleType::Style.bit() |
59894            CssRuleType::Keyframe.bit() |
59895            CssRuleType::Scope.bit() |
59896            0,
59897            CssRuleType::Style.bit() |
59898            CssRuleType::Keyframe.bit() |
59899            CssRuleType::Scope.bit() |
59900            0,
59901            CssRuleType::Style.bit() |
59902            CssRuleType::Keyframe.bit() |
59903            CssRuleType::Scope.bit() |
59904            0,
59905            CssRuleType::Style.bit() |
59906            CssRuleType::Keyframe.bit() |
59907            CssRuleType::Scope.bit() |
59908            0,
59909            CssRuleType::Style.bit() |
59910            CssRuleType::Keyframe.bit() |
59911            CssRuleType::Scope.bit() |
59912            0,
59913            CssRuleType::Style.bit() |
59914            CssRuleType::Keyframe.bit() |
59915            CssRuleType::Scope.bit() |
59916            0,
59917            CssRuleType::Style.bit() |
59918            CssRuleType::Keyframe.bit() |
59919            CssRuleType::Scope.bit() |
59920            0,
59921            CssRuleType::Style.bit() |
59922            CssRuleType::Keyframe.bit() |
59923            CssRuleType::Scope.bit() |
59924            0,
59925            CssRuleType::Style.bit() |
59926            CssRuleType::Keyframe.bit() |
59927            CssRuleType::Scope.bit() |
59928            0,
59929            CssRuleType::Style.bit() |
59930            CssRuleType::Keyframe.bit() |
59931            CssRuleType::Scope.bit() |
59932            0,
59933            CssRuleType::Style.bit() |
59934            CssRuleType::Keyframe.bit() |
59935            CssRuleType::Scope.bit() |
59936            0,
59937            CssRuleType::Style.bit() |
59938            CssRuleType::Keyframe.bit() |
59939            CssRuleType::Scope.bit() |
59940            0,
59941            CssRuleType::Style.bit() |
59942            CssRuleType::Keyframe.bit() |
59943            CssRuleType::Scope.bit() |
59944            0,
59945            CssRuleType::Style.bit() |
59946            CssRuleType::Keyframe.bit() |
59947            CssRuleType::Scope.bit() |
59948            0,
59949            CssRuleType::Style.bit() |
59950            CssRuleType::Keyframe.bit() |
59951            CssRuleType::Scope.bit() |
59952            0,
59953            CssRuleType::Style.bit() |
59954            CssRuleType::Keyframe.bit() |
59955            CssRuleType::PositionTry.bit() |
59956            CssRuleType::Scope.bit() |
59957            0,
59958            CssRuleType::Style.bit() |
59959            CssRuleType::Keyframe.bit() |
59960            CssRuleType::PositionTry.bit() |
59961            CssRuleType::Scope.bit() |
59962            0,
59963            CssRuleType::Style.bit() |
59964            CssRuleType::Keyframe.bit() |
59965            CssRuleType::PositionTry.bit() |
59966            CssRuleType::Scope.bit() |
59967            0,
59968            CssRuleType::Style.bit() |
59969            CssRuleType::Keyframe.bit() |
59970            CssRuleType::PositionTry.bit() |
59971            CssRuleType::Scope.bit() |
59972            0,
59973            CssRuleType::Style.bit() |
59974            CssRuleType::Keyframe.bit() |
59975            CssRuleType::Scope.bit() |
59976            0,
59977            CssRuleType::Style.bit() |
59978            CssRuleType::Keyframe.bit() |
59979            CssRuleType::Scope.bit() |
59980            0,
59981            CssRuleType::Style.bit() |
59982            CssRuleType::Keyframe.bit() |
59983            CssRuleType::Scope.bit() |
59984            0,
59985            CssRuleType::Style.bit() |
59986            CssRuleType::Keyframe.bit() |
59987            CssRuleType::Scope.bit() |
59988            0,
59989            CssRuleType::Style.bit() |
59990            CssRuleType::Keyframe.bit() |
59991            CssRuleType::Scope.bit() |
59992            0,
59993            CssRuleType::Style.bit() |
59994            CssRuleType::Keyframe.bit() |
59995            CssRuleType::Scope.bit() |
59996            0,
59997            CssRuleType::Style.bit() |
59998            CssRuleType::Keyframe.bit() |
59999            CssRuleType::Scope.bit() |
60000            0,
60001            CssRuleType::Style.bit() |
60002            CssRuleType::Keyframe.bit() |
60003            CssRuleType::Scope.bit() |
60004            0,
60005            CssRuleType::Style.bit() |
60006            CssRuleType::Keyframe.bit() |
60007            CssRuleType::PositionTry.bit() |
60008            CssRuleType::Scope.bit() |
60009            0,
60010            CssRuleType::Style.bit() |
60011            CssRuleType::Keyframe.bit() |
60012            CssRuleType::PositionTry.bit() |
60013            CssRuleType::Scope.bit() |
60014            0,
60015            CssRuleType::Style.bit() |
60016            CssRuleType::Keyframe.bit() |
60017            CssRuleType::PositionTry.bit() |
60018            CssRuleType::Scope.bit() |
60019            0,
60020            CssRuleType::Style.bit() |
60021            CssRuleType::Keyframe.bit() |
60022            CssRuleType::PositionTry.bit() |
60023            CssRuleType::Scope.bit() |
60024            0,
60025            CssRuleType::Style.bit() |
60026            CssRuleType::Keyframe.bit() |
60027            CssRuleType::PositionTry.bit() |
60028            CssRuleType::Scope.bit() |
60029            0,
60030            CssRuleType::Style.bit() |
60031            CssRuleType::Keyframe.bit() |
60032            CssRuleType::PositionTry.bit() |
60033            CssRuleType::Scope.bit() |
60034            0,
60035            CssRuleType::Style.bit() |
60036            CssRuleType::Keyframe.bit() |
60037            CssRuleType::PositionTry.bit() |
60038            CssRuleType::Scope.bit() |
60039            0,
60040            CssRuleType::Style.bit() |
60041            CssRuleType::Keyframe.bit() |
60042            CssRuleType::PositionTry.bit() |
60043            CssRuleType::Scope.bit() |
60044            0,
60045            CssRuleType::Style.bit() |
60046            CssRuleType::Keyframe.bit() |
60047            CssRuleType::PositionTry.bit() |
60048            CssRuleType::Scope.bit() |
60049            0,
60050            CssRuleType::Style.bit() |
60051            CssRuleType::Keyframe.bit() |
60052            CssRuleType::PositionTry.bit() |
60053            CssRuleType::Scope.bit() |
60054            0,
60055            CssRuleType::Style.bit() |
60056            CssRuleType::Page.bit() |
60057            CssRuleType::Keyframe.bit() |
60058            CssRuleType::PositionTry.bit() |
60059            CssRuleType::Scope.bit() |
60060            0,
60061            CssRuleType::Style.bit() |
60062            CssRuleType::Keyframe.bit() |
60063            CssRuleType::PositionTry.bit() |
60064            CssRuleType::Scope.bit() |
60065            0,
60066            CssRuleType::Style.bit() |
60067            CssRuleType::Keyframe.bit() |
60068            CssRuleType::PositionTry.bit() |
60069            CssRuleType::Scope.bit() |
60070            0,
60071            CssRuleType::Style.bit() |
60072            CssRuleType::Page.bit() |
60073            CssRuleType::Keyframe.bit() |
60074            CssRuleType::PositionTry.bit() |
60075            CssRuleType::Scope.bit() |
60076            0,
60077            CssRuleType::Style.bit() |
60078            CssRuleType::Page.bit() |
60079            CssRuleType::Keyframe.bit() |
60080            CssRuleType::PositionTry.bit() |
60081            CssRuleType::Scope.bit() |
60082            0,
60083            CssRuleType::Style.bit() |
60084            CssRuleType::Page.bit() |
60085            CssRuleType::Keyframe.bit() |
60086            CssRuleType::PositionTry.bit() |
60087            CssRuleType::Scope.bit() |
60088            0,
60089            CssRuleType::Style.bit() |
60090            CssRuleType::Keyframe.bit() |
60091            CssRuleType::Scope.bit() |
60092            0,
60093            CssRuleType::Style.bit() |
60094            CssRuleType::Keyframe.bit() |
60095            CssRuleType::Scope.bit() |
60096            0,
60097            CssRuleType::Style.bit() |
60098            CssRuleType::Keyframe.bit() |
60099            CssRuleType::Scope.bit() |
60100            0,
60101            CssRuleType::Style.bit() |
60102            CssRuleType::Keyframe.bit() |
60103            CssRuleType::Scope.bit() |
60104            0,
60105            CssRuleType::Style.bit() |
60106            CssRuleType::Keyframe.bit() |
60107            CssRuleType::Scope.bit() |
60108            0,
60109            CssRuleType::Style.bit() |
60110            CssRuleType::Keyframe.bit() |
60111            CssRuleType::Scope.bit() |
60112            0,
60113            CssRuleType::Style.bit() |
60114            CssRuleType::Keyframe.bit() |
60115            CssRuleType::Scope.bit() |
60116            0,
60117            CssRuleType::Style.bit() |
60118            CssRuleType::Keyframe.bit() |
60119            CssRuleType::Scope.bit() |
60120            0,
60121            CssRuleType::Style.bit() |
60122            CssRuleType::Keyframe.bit() |
60123            CssRuleType::PositionTry.bit() |
60124            CssRuleType::Scope.bit() |
60125            0,
60126            CssRuleType::Style.bit() |
60127            CssRuleType::Keyframe.bit() |
60128            CssRuleType::PositionTry.bit() |
60129            CssRuleType::Scope.bit() |
60130            0,
60131            CssRuleType::Style.bit() |
60132            CssRuleType::Keyframe.bit() |
60133            CssRuleType::PositionTry.bit() |
60134            CssRuleType::Scope.bit() |
60135            0,
60136            CssRuleType::Style.bit() |
60137            CssRuleType::Keyframe.bit() |
60138            CssRuleType::PositionTry.bit() |
60139            CssRuleType::Scope.bit() |
60140            0,
60141            CssRuleType::Style.bit() |
60142            CssRuleType::Keyframe.bit() |
60143            CssRuleType::PositionTry.bit() |
60144            CssRuleType::Scope.bit() |
60145            0,
60146            CssRuleType::Style.bit() |
60147            CssRuleType::Keyframe.bit() |
60148            CssRuleType::PositionTry.bit() |
60149            CssRuleType::Scope.bit() |
60150            0,
60151            CssRuleType::Style.bit() |
60152            CssRuleType::Keyframe.bit() |
60153            CssRuleType::PositionTry.bit() |
60154            CssRuleType::Scope.bit() |
60155            0,
60156            CssRuleType::Style.bit() |
60157            CssRuleType::Keyframe.bit() |
60158            CssRuleType::PositionTry.bit() |
60159            CssRuleType::Scope.bit() |
60160            0,
60161            CssRuleType::Style.bit() |
60162            CssRuleType::Keyframe.bit() |
60163            CssRuleType::Scope.bit() |
60164            0,
60165            CssRuleType::Style.bit() |
60166            CssRuleType::Keyframe.bit() |
60167            CssRuleType::Scope.bit() |
60168            0,
60169            CssRuleType::Style.bit() |
60170            CssRuleType::Keyframe.bit() |
60171            CssRuleType::Scope.bit() |
60172            0,
60173            CssRuleType::Style.bit() |
60174            CssRuleType::Keyframe.bit() |
60175            CssRuleType::Scope.bit() |
60176            0,
60177            CssRuleType::Style.bit() |
60178            CssRuleType::Keyframe.bit() |
60179            CssRuleType::Scope.bit() |
60180            0,
60181            CssRuleType::Style.bit() |
60182            CssRuleType::Keyframe.bit() |
60183            CssRuleType::Scope.bit() |
60184            0,
60185            CssRuleType::Style.bit() |
60186            CssRuleType::Keyframe.bit() |
60187            CssRuleType::Scope.bit() |
60188            0,
60189            CssRuleType::Style.bit() |
60190            CssRuleType::Keyframe.bit() |
60191            CssRuleType::Scope.bit() |
60192            0,
60193            CssRuleType::Style.bit() |
60194            CssRuleType::Keyframe.bit() |
60195            CssRuleType::Scope.bit() |
60196            0,
60197            CssRuleType::Style.bit() |
60198            CssRuleType::Keyframe.bit() |
60199            CssRuleType::Scope.bit() |
60200            0,
60201            CssRuleType::Style.bit() |
60202            CssRuleType::Keyframe.bit() |
60203            CssRuleType::Scope.bit() |
60204            0,
60205            CssRuleType::Style.bit() |
60206            CssRuleType::Keyframe.bit() |
60207            CssRuleType::Scope.bit() |
60208            0,
60209            CssRuleType::Style.bit() |
60210            CssRuleType::Keyframe.bit() |
60211            CssRuleType::Scope.bit() |
60212            0,
60213            CssRuleType::Style.bit() |
60214            CssRuleType::Keyframe.bit() |
60215            CssRuleType::Scope.bit() |
60216            0,
60217            CssRuleType::Style.bit() |
60218            CssRuleType::Keyframe.bit() |
60219            CssRuleType::Scope.bit() |
60220            0,
60221            CssRuleType::Style.bit() |
60222            CssRuleType::Keyframe.bit() |
60223            CssRuleType::Scope.bit() |
60224            0,
60225            CssRuleType::Style.bit() |
60226            CssRuleType::Keyframe.bit() |
60227            CssRuleType::Scope.bit() |
60228            0,
60229            CssRuleType::Style.bit() |
60230            CssRuleType::Keyframe.bit() |
60231            CssRuleType::Scope.bit() |
60232            0,
60233            CssRuleType::Style.bit() |
60234            CssRuleType::Keyframe.bit() |
60235            CssRuleType::Scope.bit() |
60236            0,
60237            CssRuleType::Style.bit() |
60238            CssRuleType::Keyframe.bit() |
60239            CssRuleType::Scope.bit() |
60240            0,
60241            CssRuleType::Style.bit() |
60242            CssRuleType::Keyframe.bit() |
60243            CssRuleType::Scope.bit() |
60244            0,
60245            CssRuleType::Style.bit() |
60246            CssRuleType::Keyframe.bit() |
60247            CssRuleType::Scope.bit() |
60248            0,
60249            CssRuleType::Style.bit() |
60250            CssRuleType::Keyframe.bit() |
60251            CssRuleType::Scope.bit() |
60252            0,
60253            CssRuleType::Style.bit() |
60254            CssRuleType::Keyframe.bit() |
60255            CssRuleType::Scope.bit() |
60256            0,
60257            CssRuleType::Style.bit() |
60258            CssRuleType::Keyframe.bit() |
60259            CssRuleType::Scope.bit() |
60260            0,
60261            CssRuleType::Style.bit() |
60262            CssRuleType::Keyframe.bit() |
60263            CssRuleType::Scope.bit() |
60264            0,
60265            CssRuleType::Style.bit() |
60266            CssRuleType::Keyframe.bit() |
60267            CssRuleType::Scope.bit() |
60268            0,
60269            CssRuleType::Style.bit() |
60270            CssRuleType::Keyframe.bit() |
60271            CssRuleType::Scope.bit() |
60272            0,
60273            CssRuleType::Style.bit() |
60274            CssRuleType::Keyframe.bit() |
60275            CssRuleType::Scope.bit() |
60276            0,
60277            CssRuleType::Style.bit() |
60278            CssRuleType::Keyframe.bit() |
60279            CssRuleType::Scope.bit() |
60280            0,
60281            CssRuleType::Style.bit() |
60282            CssRuleType::Keyframe.bit() |
60283            CssRuleType::Scope.bit() |
60284            0,
60285            CssRuleType::Style.bit() |
60286            CssRuleType::Keyframe.bit() |
60287            CssRuleType::Scope.bit() |
60288            0,
60289            CssRuleType::Style.bit() |
60290            CssRuleType::Keyframe.bit() |
60291            CssRuleType::Scope.bit() |
60292            0,
60293            CssRuleType::Style.bit() |
60294            CssRuleType::Keyframe.bit() |
60295            CssRuleType::Scope.bit() |
60296            0,
60297            CssRuleType::Style.bit() |
60298            CssRuleType::Keyframe.bit() |
60299            CssRuleType::Scope.bit() |
60300            0,
60301            CssRuleType::Style.bit() |
60302            CssRuleType::Keyframe.bit() |
60303            CssRuleType::Scope.bit() |
60304            0,
60305            CssRuleType::Style.bit() |
60306            CssRuleType::Keyframe.bit() |
60307            CssRuleType::Scope.bit() |
60308            0,
60309            CssRuleType::Style.bit() |
60310            CssRuleType::Keyframe.bit() |
60311            CssRuleType::Scope.bit() |
60312            0,
60313            CssRuleType::Style.bit() |
60314            CssRuleType::Keyframe.bit() |
60315            CssRuleType::Scope.bit() |
60316            0,
60317            CssRuleType::Style.bit() |
60318            CssRuleType::Keyframe.bit() |
60319            CssRuleType::Scope.bit() |
60320            0,
60321            CssRuleType::Style.bit() |
60322            CssRuleType::Keyframe.bit() |
60323            CssRuleType::Scope.bit() |
60324            0,
60325            CssRuleType::Style.bit() |
60326            CssRuleType::Keyframe.bit() |
60327            CssRuleType::Scope.bit() |
60328            0,
60329            CssRuleType::Style.bit() |
60330            CssRuleType::Keyframe.bit() |
60331            CssRuleType::Scope.bit() |
60332            0,
60333            CssRuleType::Style.bit() |
60334            CssRuleType::Keyframe.bit() |
60335            CssRuleType::Scope.bit() |
60336            0,
60337            CssRuleType::Style.bit() |
60338            CssRuleType::Keyframe.bit() |
60339            CssRuleType::Scope.bit() |
60340            0,
60341            CssRuleType::Style.bit() |
60342            CssRuleType::Keyframe.bit() |
60343            CssRuleType::Scope.bit() |
60344            0,
60345            CssRuleType::Style.bit() |
60346            CssRuleType::Keyframe.bit() |
60347            CssRuleType::Scope.bit() |
60348            0,
60349            CssRuleType::Style.bit() |
60350            CssRuleType::Keyframe.bit() |
60351            CssRuleType::Scope.bit() |
60352            0,
60353            CssRuleType::Style.bit() |
60354            CssRuleType::Keyframe.bit() |
60355            CssRuleType::Scope.bit() |
60356            0,
60357            CssRuleType::Style.bit() |
60358            CssRuleType::Keyframe.bit() |
60359            CssRuleType::Scope.bit() |
60360            0,
60361            CssRuleType::Style.bit() |
60362            CssRuleType::Page.bit() |
60363            CssRuleType::Keyframe.bit() |
60364            CssRuleType::PositionTry.bit() |
60365            CssRuleType::Scope.bit() |
60366            0,
60367            CssRuleType::Style.bit() |
60368            CssRuleType::Keyframe.bit() |
60369            CssRuleType::PositionTry.bit() |
60370            CssRuleType::Scope.bit() |
60371            0,
60372            CssRuleType::Style.bit() |
60373            CssRuleType::Keyframe.bit() |
60374            CssRuleType::PositionTry.bit() |
60375            CssRuleType::Scope.bit() |
60376            0,
60377            CssRuleType::Style.bit() |
60378            CssRuleType::Keyframe.bit() |
60379            CssRuleType::Scope.bit() |
60380            0,
60381            CssRuleType::Style.bit() |
60382            CssRuleType::Keyframe.bit() |
60383            CssRuleType::Scope.bit() |
60384            0,
60385            CssRuleType::Style.bit() |
60386            CssRuleType::Keyframe.bit() |
60387            CssRuleType::Scope.bit() |
60388            0,
60389            CssRuleType::Style.bit() |
60390            CssRuleType::Keyframe.bit() |
60391            CssRuleType::Scope.bit() |
60392            0,
60393            CssRuleType::Style.bit() |
60394            CssRuleType::Keyframe.bit() |
60395            CssRuleType::Scope.bit() |
60396            0,
60397            CssRuleType::Style.bit() |
60398            CssRuleType::Keyframe.bit() |
60399            CssRuleType::Scope.bit() |
60400            0,
60401            CssRuleType::Style.bit() |
60402            CssRuleType::Keyframe.bit() |
60403            CssRuleType::Scope.bit() |
60404            0,
60405            CssRuleType::Style.bit() |
60406            CssRuleType::Keyframe.bit() |
60407            CssRuleType::Scope.bit() |
60408            0,
60409            CssRuleType::Style.bit() |
60410            CssRuleType::Keyframe.bit() |
60411            CssRuleType::Scope.bit() |
60412            0,
60413            CssRuleType::Style.bit() |
60414            CssRuleType::Keyframe.bit() |
60415            CssRuleType::Scope.bit() |
60416            0,
60417            CssRuleType::Style.bit() |
60418            CssRuleType::Keyframe.bit() |
60419            CssRuleType::Scope.bit() |
60420            0,
60421            CssRuleType::Style.bit() |
60422            CssRuleType::Keyframe.bit() |
60423            CssRuleType::Scope.bit() |
60424            0,
60425            CssRuleType::Style.bit() |
60426            CssRuleType::Keyframe.bit() |
60427            CssRuleType::Scope.bit() |
60428            0,
60429            CssRuleType::Style.bit() |
60430            CssRuleType::PositionTry.bit() |
60431            0,
60432            CssRuleType::Style.bit() |
60433            CssRuleType::Keyframe.bit() |
60434            CssRuleType::Scope.bit() |
60435            0,
60436            CssRuleType::Style.bit() |
60437            CssRuleType::Keyframe.bit() |
60438            CssRuleType::PositionTry.bit() |
60439            CssRuleType::Scope.bit() |
60440            0,
60441            CssRuleType::Style.bit() |
60442            CssRuleType::Keyframe.bit() |
60443            CssRuleType::PositionTry.bit() |
60444            CssRuleType::Scope.bit() |
60445            0,
60446            CssRuleType::Style.bit() |
60447            CssRuleType::Keyframe.bit() |
60448            CssRuleType::PositionTry.bit() |
60449            CssRuleType::Scope.bit() |
60450            0,
60451            CssRuleType::Style.bit() |
60452            CssRuleType::Keyframe.bit() |
60453            CssRuleType::Scope.bit() |
60454            0,
60455            CssRuleType::Style.bit() |
60456            CssRuleType::Keyframe.bit() |
60457            CssRuleType::Scope.bit() |
60458            0,
60459            CssRuleType::Style.bit() |
60460            0,
60461            CssRuleType::Style.bit() |
60462            CssRuleType::Keyframe.bit() |
60463            CssRuleType::Scope.bit() |
60464            0,
60465            CssRuleType::Style.bit() |
60466            CssRuleType::Keyframe.bit() |
60467            CssRuleType::Scope.bit() |
60468            0,
60469            CssRuleType::Style.bit() |
60470            CssRuleType::Keyframe.bit() |
60471            CssRuleType::Scope.bit() |
60472            0,
60473            CssRuleType::Style.bit() |
60474            CssRuleType::Keyframe.bit() |
60475            CssRuleType::Scope.bit() |
60476            0,
60477            CssRuleType::Style.bit() |
60478            CssRuleType::Keyframe.bit() |
60479            CssRuleType::Scope.bit() |
60480            0,
60481        ];
60482        MAP[self.0 as usize] & rule_types.bits() != 0
60483    }
60484
60485    pub(super) fn allowed_in(self, context: &ParserContext) -> bool {
60486        if !self.allowed_in_rule(context.rule_types()) {
60487            return false;
60488        }
60489
60490        self.allowed_in_ignoring_rule_type(context)
60491    }
60492
60493
60494    pub(super) fn allowed_in_ignoring_rule_type(self, context: &ParserContext) -> bool {
60495        // The semantics of these are kinda hard to reason about, what follows
60496        // is a description of the different combinations that can happen with
60497        // these three sets.
60498        //
60499        // Experimental properties are generally controlled by prefs, but an
60500        // experimental property explicitly enabled in certain context (UA or
60501        // chrome sheets) is always usable in the context regardless of the
60502        // pref value.
60503        //
60504        // Non-experimental properties are either normal properties which are
60505        // usable everywhere, or internal-only properties which are only usable
60506        // in certain context they are explicitly enabled in.
60507        if self.enabled_for_all_content() {
60508            return true;
60509        }
60510
60511        
60512static ENABLED_IN_UA_SHEETS: NonCustomPropertyIdSet = NonCustomPropertyIdSet {
60513    
60514    storage: [0x0, 0x10000c00, 0x0, 0x0, 0x180, 0x0, 0x0, 0x0, 0x0]
60515};
60516
60517        
60518static ENABLED_IN_CHROME: NonCustomPropertyIdSet = NonCustomPropertyIdSet {
60519    
60520    storage: [0x0, 0x10000000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]
60521};
60522
60523
60524        if context.stylesheet_origin == Origin::UserAgent &&
60525            ENABLED_IN_UA_SHEETS.contains(self)
60526        {
60527            return true
60528        }
60529
60530        if context.chrome_rules_enabled() && ENABLED_IN_CHROME.contains(self) {
60531            return true
60532        }
60533
60534        false
60535    }
60536
60537    /// The supported types of this property. The return value should be
60538    /// style_traits::CssType when it can become a bitflags type.
60539    pub(super) fn supported_types(&self) -> u8 {
60540        const SUPPORTED_TYPES: [u8; 275] = [
60541                <crate::values::specified::AlignContent as SpecifiedValueInfo>::SUPPORTED_TYPES,
60542                <crate::values::specified::AlignItems as SpecifiedValueInfo>::SUPPORTED_TYPES,
60543                <crate::values::specified::AlignSelf as SpecifiedValueInfo>::SUPPORTED_TYPES,
60544                <crate::values::specified::AspectRatio as SpecifiedValueInfo>::SUPPORTED_TYPES,
60545                <longhands::backface_visibility::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60546                <crate::values::specified::BaselineSource as SpecifiedValueInfo>::SUPPORTED_TYPES,
60547                <longhands::border_collapse::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60548                <crate::values::specified::BorderImageRepeat as SpecifiedValueInfo>::SUPPORTED_TYPES,
60549                <longhands::box_sizing::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60550                <crate::values::specified::table::CaptionSide as SpecifiedValueInfo>::SUPPORTED_TYPES,
60551                <crate::values::specified::Clear as SpecifiedValueInfo>::SUPPORTED_TYPES,
60552                <crate::values::specified::ColumnCount as SpecifiedValueInfo>::SUPPORTED_TYPES,
60553                <longhands::column_span::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60554                <crate::values::specified::Contain as SpecifiedValueInfo>::SUPPORTED_TYPES,
60555                <crate::values::specified::ContainerType as SpecifiedValueInfo>::SUPPORTED_TYPES,
60556                <longhands::direction::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60557                <crate::values::specified::Display as SpecifiedValueInfo>::SUPPORTED_TYPES,
60558                <longhands::empty_cells::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60559                <longhands::flex_direction::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60560                <longhands::flex_wrap::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60561                <crate::values::specified::Float as SpecifiedValueInfo>::SUPPORTED_TYPES,
60562                <crate::values::specified::FontLanguageOverride as SpecifiedValueInfo>::SUPPORTED_TYPES,
60563                <crate::values::specified::FontStretch as SpecifiedValueInfo>::SUPPORTED_TYPES,
60564                <crate::values::specified::FontStyle as SpecifiedValueInfo>::SUPPORTED_TYPES,
60565                <longhands::font_variant_caps::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60566                <crate::values::specified::FontWeight as SpecifiedValueInfo>::SUPPORTED_TYPES,
60567                <crate::values::specified::GridAutoFlow as SpecifiedValueInfo>::SUPPORTED_TYPES,
60568                <crate::values::specified::ImageRendering as SpecifiedValueInfo>::SUPPORTED_TYPES,
60569                <longhands::isolation::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60570                <crate::values::specified::JustifyContent as SpecifiedValueInfo>::SUPPORTED_TYPES,
60571                <crate::values::specified::JustifyItems as SpecifiedValueInfo>::SUPPORTED_TYPES,
60572                <crate::values::specified::JustifySelf as SpecifiedValueInfo>::SUPPORTED_TYPES,
60573                <longhands::list_style_position::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60574                <longhands::list_style_type::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60575                <longhands::mix_blend_mode::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60576                <longhands::object_fit::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60577                <crate::values::specified::Opacity as SpecifiedValueInfo>::SUPPORTED_TYPES,
60578                <crate::values::specified::Integer as SpecifiedValueInfo>::SUPPORTED_TYPES,
60579                <crate::values::specified::OutlineStyle as SpecifiedValueInfo>::SUPPORTED_TYPES,
60580                <crate::values::specified::OverflowWrap as SpecifiedValueInfo>::SUPPORTED_TYPES,
60581                <crate::values::specified::PointerEvents as SpecifiedValueInfo>::SUPPORTED_TYPES,
60582                <crate::values::specified::PositionProperty as SpecifiedValueInfo>::SUPPORTED_TYPES,
60583                <longhands::_servo_overflow_clip_box::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60584                <longhands::_servo_top_layer::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60585                <longhands::table_layout::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60586                <crate::values::specified::TextAlign as SpecifiedValueInfo>::SUPPORTED_TYPES,
60587                <crate::values::specified::TextAlignLast as SpecifiedValueInfo>::SUPPORTED_TYPES,
60588                <crate::values::specified::TextDecorationLine as SpecifiedValueInfo>::SUPPORTED_TYPES,
60589                <longhands::text_decoration_style::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60590                <crate::values::specified::TextJustify as SpecifiedValueInfo>::SUPPORTED_TYPES,
60591                <longhands::text_rendering::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60592                <crate::values::specified::TextTransform as SpecifiedValueInfo>::SUPPORTED_TYPES,
60593                <longhands::text_wrap_mode::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60594                <crate::values::specified::TransformStyle as SpecifiedValueInfo>::SUPPORTED_TYPES,
60595                <longhands::unicode_bidi::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60596                <longhands::visibility::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60597                <longhands::white_space_collapse::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60598                <crate::values::specified::WordBreak as SpecifiedValueInfo>::SUPPORTED_TYPES,
60599                <crate::values::specified::WritingModeProperty as SpecifiedValueInfo>::SUPPORTED_TYPES,
60600                <crate::values::specified::ZIndex as SpecifiedValueInfo>::SUPPORTED_TYPES,
60601                <crate::values::specified::Zoom as SpecifiedValueInfo>::SUPPORTED_TYPES,
60602                <crate::values::specified::NonNegativeNumber as SpecifiedValueInfo>::SUPPORTED_TYPES,
60603                <crate::values::specified::NonNegativeNumber as SpecifiedValueInfo>::SUPPORTED_TYPES,
60604                <crate::values::specified::Overflow as SpecifiedValueInfo>::SUPPORTED_TYPES,
60605                <crate::values::specified::Overflow as SpecifiedValueInfo>::SUPPORTED_TYPES,
60606                <crate::values::specified::Overflow as SpecifiedValueInfo>::SUPPORTED_TYPES,
60607                <crate::values::specified::Overflow as SpecifiedValueInfo>::SUPPORTED_TYPES,
60608                <crate::values::specified::BorderStyle as SpecifiedValueInfo>::SUPPORTED_TYPES,
60609                <crate::values::specified::BorderStyle as SpecifiedValueInfo>::SUPPORTED_TYPES,
60610                <crate::values::specified::BorderStyle as SpecifiedValueInfo>::SUPPORTED_TYPES,
60611                <crate::values::specified::BorderStyle as SpecifiedValueInfo>::SUPPORTED_TYPES,
60612                <crate::values::specified::BorderStyle as SpecifiedValueInfo>::SUPPORTED_TYPES,
60613                <crate::values::specified::BorderStyle as SpecifiedValueInfo>::SUPPORTED_TYPES,
60614                <crate::values::specified::BorderStyle as SpecifiedValueInfo>::SUPPORTED_TYPES,
60615                <crate::values::specified::BorderStyle as SpecifiedValueInfo>::SUPPORTED_TYPES,
60616                <longhands::animation_composition::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60617                <longhands::animation_delay::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60618                <longhands::animation_direction::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60619                <longhands::animation_duration::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60620                <longhands::animation_fill_mode::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60621                <longhands::animation_iteration_count::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60622                <longhands::animation_name::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60623                <longhands::animation_play_state::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60624                <longhands::animation_timeline::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60625                <longhands::animation_timing_function::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60626                <longhands::backdrop_filter::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60627                <longhands::background_attachment::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60628                <longhands::background_clip::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60629                <longhands::background_image::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60630                <longhands::background_origin::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60631                <longhands::background_position_x::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60632                <longhands::background_position_y::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60633                <longhands::background_repeat::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60634                <longhands::background_size::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60635                <Box<crate::values::specified::NonNegativeLengthOrNumberRect> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60636                <Box<crate::values::specified::BorderImageSlice> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60637                <Box<crate::values::specified::BorderImageWidth> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60638                <Box<crate::values::specified::BorderSpacing> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60639                <longhands::box_shadow::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60640                <Box<crate::values::specified::ClipRectOrAuto> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60641                <crate::values::specified::basic_shape::ClipPath as SpecifiedValueInfo>::SUPPORTED_TYPES,
60642                <crate::values::specified::ColorPropertyValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60643                <crate::values::specified::ColorScheme as SpecifiedValueInfo>::SUPPORTED_TYPES,
60644                <crate::values::specified::length::NonNegativeLengthOrAuto as SpecifiedValueInfo>::SUPPORTED_TYPES,
60645                <crate::values::specified::ContainerName as SpecifiedValueInfo>::SUPPORTED_TYPES,
60646                <crate::values::specified::Content as SpecifiedValueInfo>::SUPPORTED_TYPES,
60647                <crate::values::specified::CounterIncrement as SpecifiedValueInfo>::SUPPORTED_TYPES,
60648                <crate::values::specified::CounterReset as SpecifiedValueInfo>::SUPPORTED_TYPES,
60649                <crate::values::specified::Cursor as SpecifiedValueInfo>::SUPPORTED_TYPES,
60650                <longhands::filter::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60651                <Box<crate::values::specified::FlexBasis> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60652                <crate::values::specified::FontFamily as SpecifiedValueInfo>::SUPPORTED_TYPES,
60653                <crate::values::specified::FontSize as SpecifiedValueInfo>::SUPPORTED_TYPES,
60654                <crate::values::specified::FontVariationSettings as SpecifiedValueInfo>::SUPPORTED_TYPES,
60655                <crate::values::specified::GridTemplateAreas as SpecifiedValueInfo>::SUPPORTED_TYPES,
60656                <crate::values::specified::LetterSpacing as SpecifiedValueInfo>::SUPPORTED_TYPES,
60657                <crate::values::specified::LineHeight as SpecifiedValueInfo>::SUPPORTED_TYPES,
60658                <longhands::mask_image::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60659                <crate::values::specified::OffsetPath as SpecifiedValueInfo>::SUPPORTED_TYPES,
60660                <crate::values::specified::Perspective as SpecifiedValueInfo>::SUPPORTED_TYPES,
60661                <crate::values::specified::Quotes as SpecifiedValueInfo>::SUPPORTED_TYPES,
60662                <Box<crate::values::specified::Rotate> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60663                <Box<crate::values::specified::Scale> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60664                <crate::values::specified::TextIndent as SpecifiedValueInfo>::SUPPORTED_TYPES,
60665                <Box<crate::values::specified::TextOverflow> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60666                <longhands::text_shadow::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60667                <crate::values::specified::Transform as SpecifiedValueInfo>::SUPPORTED_TYPES,
60668                <Box<crate::values::specified::TransformOrigin> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60669                <longhands::transition_behavior::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60670                <longhands::transition_delay::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60671                <longhands::transition_duration::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60672                <longhands::transition_property::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60673                <longhands::transition_timing_function::SpecifiedValue as SpecifiedValueInfo>::SUPPORTED_TYPES,
60674                <Box<crate::values::specified::Translate> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60675                <crate::values::specified::VerticalAlign as SpecifiedValueInfo>::SUPPORTED_TYPES,
60676                <crate::values::specified::ViewTransitionClass as SpecifiedValueInfo>::SUPPORTED_TYPES,
60677                <crate::values::specified::ViewTransitionName as SpecifiedValueInfo>::SUPPORTED_TYPES,
60678                <crate::values::specified::WillChange as SpecifiedValueInfo>::SUPPORTED_TYPES,
60679                <crate::values::specified::WordSpacing as SpecifiedValueInfo>::SUPPORTED_TYPES,
60680                <crate::values::specified::XLang as SpecifiedValueInfo>::SUPPORTED_TYPES,
60681                <Box<crate::values::specified::Position> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60682                <Box<crate::values::specified::Position> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60683                <crate::values::specified::GridTemplateComponent as SpecifiedValueInfo>::SUPPORTED_TYPES,
60684                <crate::values::specified::GridTemplateComponent as SpecifiedValueInfo>::SUPPORTED_TYPES,
60685                <crate::values::specified::Image as SpecifiedValueInfo>::SUPPORTED_TYPES,
60686                <crate::values::specified::Image as SpecifiedValueInfo>::SUPPORTED_TYPES,
60687                <crate::values::specified::ImplicitGridTracks as SpecifiedValueInfo>::SUPPORTED_TYPES,
60688                <crate::values::specified::ImplicitGridTracks as SpecifiedValueInfo>::SUPPORTED_TYPES,
60689                <crate::values::specified::Length as SpecifiedValueInfo>::SUPPORTED_TYPES,
60690                <crate::values::specified::Length as SpecifiedValueInfo>::SUPPORTED_TYPES,
60691                <crate::values::specified::length::NonNegativeLengthPercentageOrNormal as SpecifiedValueInfo>::SUPPORTED_TYPES,
60692                <crate::values::specified::length::NonNegativeLengthPercentageOrNormal as SpecifiedValueInfo>::SUPPORTED_TYPES,
60693                <crate::values::specified::GridLine as SpecifiedValueInfo>::SUPPORTED_TYPES,
60694                <crate::values::specified::GridLine as SpecifiedValueInfo>::SUPPORTED_TYPES,
60695                <crate::values::specified::GridLine as SpecifiedValueInfo>::SUPPORTED_TYPES,
60696                <crate::values::specified::GridLine as SpecifiedValueInfo>::SUPPORTED_TYPES,
60697                <crate::values::specified::MaxSize as SpecifiedValueInfo>::SUPPORTED_TYPES,
60698                <crate::values::specified::MaxSize as SpecifiedValueInfo>::SUPPORTED_TYPES,
60699                <crate::values::specified::MaxSize as SpecifiedValueInfo>::SUPPORTED_TYPES,
60700                <crate::values::specified::MaxSize as SpecifiedValueInfo>::SUPPORTED_TYPES,
60701                <Box<crate::values::specified::BorderCornerRadius> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60702                <Box<crate::values::specified::BorderCornerRadius> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60703                <Box<crate::values::specified::BorderCornerRadius> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60704                <Box<crate::values::specified::BorderCornerRadius> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60705                <Box<crate::values::specified::BorderCornerRadius> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60706                <Box<crate::values::specified::BorderCornerRadius> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60707                <Box<crate::values::specified::BorderCornerRadius> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60708                <Box<crate::values::specified::BorderCornerRadius> as SpecifiedValueInfo>::SUPPORTED_TYPES,
60709                <crate::values::specified::Inset as SpecifiedValueInfo>::SUPPORTED_TYPES,
60710                <crate::values::specified::Inset as SpecifiedValueInfo>::SUPPORTED_TYPES,
60711                <crate::values::specified::Inset as SpecifiedValueInfo>::SUPPORTED_TYPES,
60712                <crate::values::specified::Inset as SpecifiedValueInfo>::SUPPORTED_TYPES,
60713                <crate::values::specified::Inset as SpecifiedValueInfo>::SUPPORTED_TYPES,
60714                <crate::values::specified::Inset as SpecifiedValueInfo>::SUPPORTED_TYPES,
60715                <crate::values::specified::Inset as SpecifiedValueInfo>::SUPPORTED_TYPES,
60716                <crate::values::specified::Inset as SpecifiedValueInfo>::SUPPORTED_TYPES,
60717                <crate::values::specified::Margin as SpecifiedValueInfo>::SUPPORTED_TYPES,
60718                <crate::values::specified::Margin as SpecifiedValueInfo>::SUPPORTED_TYPES,
60719                <crate::values::specified::Margin as SpecifiedValueInfo>::SUPPORTED_TYPES,
60720                <crate::values::specified::Margin as SpecifiedValueInfo>::SUPPORTED_TYPES,
60721                <crate::values::specified::Margin as SpecifiedValueInfo>::SUPPORTED_TYPES,
60722                <crate::values::specified::Margin as SpecifiedValueInfo>::SUPPORTED_TYPES,
60723                <crate::values::specified::Margin as SpecifiedValueInfo>::SUPPORTED_TYPES,
60724                <crate::values::specified::Margin as SpecifiedValueInfo>::SUPPORTED_TYPES,
60725                <crate::values::specified::NonNegativeLengthPercentage as SpecifiedValueInfo>::SUPPORTED_TYPES,
60726                <crate::values::specified::NonNegativeLengthPercentage as SpecifiedValueInfo>::SUPPORTED_TYPES,
60727                <crate::values::specified::NonNegativeLengthPercentage as SpecifiedValueInfo>::SUPPORTED_TYPES,
60728                <crate::values::specified::NonNegativeLengthPercentage as SpecifiedValueInfo>::SUPPORTED_TYPES,
60729                <crate::values::specified::NonNegativeLengthPercentage as SpecifiedValueInfo>::SUPPORTED_TYPES,
60730                <crate::values::specified::NonNegativeLengthPercentage as SpecifiedValueInfo>::SUPPORTED_TYPES,
60731                <crate::values::specified::NonNegativeLengthPercentage as SpecifiedValueInfo>::SUPPORTED_TYPES,
60732                <crate::values::specified::NonNegativeLengthPercentage as SpecifiedValueInfo>::SUPPORTED_TYPES,
60733                <crate::values::specified::Size as SpecifiedValueInfo>::SUPPORTED_TYPES,
60734                <crate::values::specified::Size as SpecifiedValueInfo>::SUPPORTED_TYPES,
60735                <crate::values::specified::Size as SpecifiedValueInfo>::SUPPORTED_TYPES,
60736                <crate::values::specified::Size as SpecifiedValueInfo>::SUPPORTED_TYPES,
60737                <crate::values::specified::Size as SpecifiedValueInfo>::SUPPORTED_TYPES,
60738                <crate::values::specified::Size as SpecifiedValueInfo>::SUPPORTED_TYPES,
60739                <crate::values::specified::Size as SpecifiedValueInfo>::SUPPORTED_TYPES,
60740                <crate::values::specified::Size as SpecifiedValueInfo>::SUPPORTED_TYPES,
60741                <crate::values::specified::BorderSideWidth as SpecifiedValueInfo>::SUPPORTED_TYPES,
60742                <crate::values::specified::BorderSideWidth as SpecifiedValueInfo>::SUPPORTED_TYPES,
60743                <crate::values::specified::BorderSideWidth as SpecifiedValueInfo>::SUPPORTED_TYPES,
60744                <crate::values::specified::BorderSideWidth as SpecifiedValueInfo>::SUPPORTED_TYPES,
60745                <crate::values::specified::BorderSideWidth as SpecifiedValueInfo>::SUPPORTED_TYPES,
60746                <crate::values::specified::BorderSideWidth as SpecifiedValueInfo>::SUPPORTED_TYPES,
60747                <crate::values::specified::BorderSideWidth as SpecifiedValueInfo>::SUPPORTED_TYPES,
60748                <crate::values::specified::BorderSideWidth as SpecifiedValueInfo>::SUPPORTED_TYPES,
60749                <crate::values::specified::BorderSideWidth as SpecifiedValueInfo>::SUPPORTED_TYPES,
60750                <crate::values::specified::Color as SpecifiedValueInfo>::SUPPORTED_TYPES,
60751                <crate::values::specified::Color as SpecifiedValueInfo>::SUPPORTED_TYPES,
60752                <crate::values::specified::Color as SpecifiedValueInfo>::SUPPORTED_TYPES,
60753                <crate::values::specified::Color as SpecifiedValueInfo>::SUPPORTED_TYPES,
60754                <crate::values::specified::Color as SpecifiedValueInfo>::SUPPORTED_TYPES,
60755                <crate::values::specified::Color as SpecifiedValueInfo>::SUPPORTED_TYPES,
60756                <crate::values::specified::Color as SpecifiedValueInfo>::SUPPORTED_TYPES,
60757                <crate::values::specified::Color as SpecifiedValueInfo>::SUPPORTED_TYPES,
60758                <crate::values::specified::Color as SpecifiedValueInfo>::SUPPORTED_TYPES,
60759                <crate::values::specified::Color as SpecifiedValueInfo>::SUPPORTED_TYPES,
60760                <crate::values::specified::Color as SpecifiedValueInfo>::SUPPORTED_TYPES,
60761                <shorthands::background::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60762                <shorthands::background_position::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60763                <shorthands::border_color::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60764                <shorthands::border_style::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60765                <shorthands::border_width::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60766                <shorthands::border_top::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60767                <shorthands::border_right::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60768                <shorthands::border_bottom::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60769                <shorthands::border_left::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60770                <shorthands::border_block_start::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60771                <shorthands::border_block_end::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60772                <shorthands::border_inline_start::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60773                <shorthands::border_inline_end::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60774                <shorthands::border::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60775                <shorthands::border_radius::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60776                <shorthands::border_image::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60777                <shorthands::border_block_width::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60778                <shorthands::border_block_style::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60779                <shorthands::border_block_color::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60780                <shorthands::border_inline_width::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60781                <shorthands::border_inline_style::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60782                <shorthands::border_inline_color::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60783                <shorthands::border_block::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60784                <shorthands::border_inline::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60785                <shorthands::overflow::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60786                <shorthands::columns::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60787                <shorthands::font::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60788                <shorthands::font_variant::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60789                <shorthands::white_space::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60790                <shorthands::list_style::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60791                <shorthands::margin::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60792                <shorthands::margin_block::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60793                <shorthands::margin_inline::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60794                <shorthands::outline::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60795                <shorthands::padding::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60796                <shorthands::padding_block::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60797                <shorthands::padding_inline::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60798                <shorthands::flex_flow::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60799                <shorthands::flex::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60800                <shorthands::gap::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60801                <shorthands::grid_row::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60802                <shorthands::grid_column::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60803                <shorthands::grid_area::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60804                <shorthands::grid_template::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60805                <shorthands::grid::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60806                <shorthands::place_content::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60807                <shorthands::place_self::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60808                <shorthands::place_items::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60809                <shorthands::inset::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60810                <shorthands::inset_block::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60811                <shorthands::inset_inline::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60812                <shorthands::text_decoration::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60813                <shorthands::transition::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60814                <shorthands::animation::Longhands as SpecifiedValueInfo>::SUPPORTED_TYPES,
60815                0, // 'all' accepts no value other than CSS-wide keywords
60816        ];
60817        SUPPORTED_TYPES[self.0 as usize]
60818    }
60819
60820    /// See PropertyId::collect_property_completion_keywords.
60821    pub(super) fn collect_property_completion_keywords(&self, f: KeywordsCollectFn) {
60822        fn do_nothing(_: KeywordsCollectFn) {}
60823        const COLLECT_FUNCTIONS: [fn(KeywordsCollectFn);
60824                                  275] = [
60825                <crate::values::specified::AlignContent as SpecifiedValueInfo>::collect_completion_keywords,
60826                <crate::values::specified::AlignItems as SpecifiedValueInfo>::collect_completion_keywords,
60827                <crate::values::specified::AlignSelf as SpecifiedValueInfo>::collect_completion_keywords,
60828                <crate::values::specified::AspectRatio as SpecifiedValueInfo>::collect_completion_keywords,
60829                <longhands::backface_visibility::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60830                <crate::values::specified::BaselineSource as SpecifiedValueInfo>::collect_completion_keywords,
60831                <longhands::border_collapse::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60832                <crate::values::specified::BorderImageRepeat as SpecifiedValueInfo>::collect_completion_keywords,
60833                <longhands::box_sizing::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60834                <crate::values::specified::table::CaptionSide as SpecifiedValueInfo>::collect_completion_keywords,
60835                <crate::values::specified::Clear as SpecifiedValueInfo>::collect_completion_keywords,
60836                <crate::values::specified::ColumnCount as SpecifiedValueInfo>::collect_completion_keywords,
60837                <longhands::column_span::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60838                <crate::values::specified::Contain as SpecifiedValueInfo>::collect_completion_keywords,
60839                <crate::values::specified::ContainerType as SpecifiedValueInfo>::collect_completion_keywords,
60840                <longhands::direction::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60841                <crate::values::specified::Display as SpecifiedValueInfo>::collect_completion_keywords,
60842                <longhands::empty_cells::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60843                <longhands::flex_direction::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60844                <longhands::flex_wrap::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60845                <crate::values::specified::Float as SpecifiedValueInfo>::collect_completion_keywords,
60846                <crate::values::specified::FontLanguageOverride as SpecifiedValueInfo>::collect_completion_keywords,
60847                <crate::values::specified::FontStretch as SpecifiedValueInfo>::collect_completion_keywords,
60848                <crate::values::specified::FontStyle as SpecifiedValueInfo>::collect_completion_keywords,
60849                <longhands::font_variant_caps::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60850                <crate::values::specified::FontWeight as SpecifiedValueInfo>::collect_completion_keywords,
60851                <crate::values::specified::GridAutoFlow as SpecifiedValueInfo>::collect_completion_keywords,
60852                <crate::values::specified::ImageRendering as SpecifiedValueInfo>::collect_completion_keywords,
60853                <longhands::isolation::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60854                <crate::values::specified::JustifyContent as SpecifiedValueInfo>::collect_completion_keywords,
60855                <crate::values::specified::JustifyItems as SpecifiedValueInfo>::collect_completion_keywords,
60856                <crate::values::specified::JustifySelf as SpecifiedValueInfo>::collect_completion_keywords,
60857                <longhands::list_style_position::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60858                <longhands::list_style_type::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60859                <longhands::mix_blend_mode::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60860                <longhands::object_fit::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60861                <crate::values::specified::Opacity as SpecifiedValueInfo>::collect_completion_keywords,
60862                <crate::values::specified::Integer as SpecifiedValueInfo>::collect_completion_keywords,
60863                <crate::values::specified::OutlineStyle as SpecifiedValueInfo>::collect_completion_keywords,
60864                <crate::values::specified::OverflowWrap as SpecifiedValueInfo>::collect_completion_keywords,
60865                <crate::values::specified::PointerEvents as SpecifiedValueInfo>::collect_completion_keywords,
60866                <crate::values::specified::PositionProperty as SpecifiedValueInfo>::collect_completion_keywords,
60867                <longhands::_servo_overflow_clip_box::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60868                <longhands::_servo_top_layer::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60869                <longhands::table_layout::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60870                <crate::values::specified::TextAlign as SpecifiedValueInfo>::collect_completion_keywords,
60871                <crate::values::specified::TextAlignLast as SpecifiedValueInfo>::collect_completion_keywords,
60872                <crate::values::specified::TextDecorationLine as SpecifiedValueInfo>::collect_completion_keywords,
60873                <longhands::text_decoration_style::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60874                <crate::values::specified::TextJustify as SpecifiedValueInfo>::collect_completion_keywords,
60875                <longhands::text_rendering::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60876                <crate::values::specified::TextTransform as SpecifiedValueInfo>::collect_completion_keywords,
60877                <longhands::text_wrap_mode::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60878                <crate::values::specified::TransformStyle as SpecifiedValueInfo>::collect_completion_keywords,
60879                <longhands::unicode_bidi::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60880                <longhands::visibility::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60881                <longhands::white_space_collapse::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60882                <crate::values::specified::WordBreak as SpecifiedValueInfo>::collect_completion_keywords,
60883                <crate::values::specified::WritingModeProperty as SpecifiedValueInfo>::collect_completion_keywords,
60884                <crate::values::specified::ZIndex as SpecifiedValueInfo>::collect_completion_keywords,
60885                <crate::values::specified::Zoom as SpecifiedValueInfo>::collect_completion_keywords,
60886                <crate::values::specified::NonNegativeNumber as SpecifiedValueInfo>::collect_completion_keywords,
60887                <crate::values::specified::NonNegativeNumber as SpecifiedValueInfo>::collect_completion_keywords,
60888                <crate::values::specified::Overflow as SpecifiedValueInfo>::collect_completion_keywords,
60889                <crate::values::specified::Overflow as SpecifiedValueInfo>::collect_completion_keywords,
60890                <crate::values::specified::Overflow as SpecifiedValueInfo>::collect_completion_keywords,
60891                <crate::values::specified::Overflow as SpecifiedValueInfo>::collect_completion_keywords,
60892                <crate::values::specified::BorderStyle as SpecifiedValueInfo>::collect_completion_keywords,
60893                <crate::values::specified::BorderStyle as SpecifiedValueInfo>::collect_completion_keywords,
60894                <crate::values::specified::BorderStyle as SpecifiedValueInfo>::collect_completion_keywords,
60895                <crate::values::specified::BorderStyle as SpecifiedValueInfo>::collect_completion_keywords,
60896                <crate::values::specified::BorderStyle as SpecifiedValueInfo>::collect_completion_keywords,
60897                <crate::values::specified::BorderStyle as SpecifiedValueInfo>::collect_completion_keywords,
60898                <crate::values::specified::BorderStyle as SpecifiedValueInfo>::collect_completion_keywords,
60899                <crate::values::specified::BorderStyle as SpecifiedValueInfo>::collect_completion_keywords,
60900                <longhands::animation_composition::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60901                <longhands::animation_delay::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60902                <longhands::animation_direction::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60903                <longhands::animation_duration::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60904                <longhands::animation_fill_mode::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60905                <longhands::animation_iteration_count::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60906                <longhands::animation_name::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60907                <longhands::animation_play_state::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60908                <longhands::animation_timeline::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60909                <longhands::animation_timing_function::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60910                <longhands::backdrop_filter::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60911                <longhands::background_attachment::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60912                <longhands::background_clip::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60913                <longhands::background_image::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60914                <longhands::background_origin::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60915                <longhands::background_position_x::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60916                <longhands::background_position_y::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60917                <longhands::background_repeat::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60918                <longhands::background_size::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60919                <Box<crate::values::specified::NonNegativeLengthOrNumberRect> as SpecifiedValueInfo>::collect_completion_keywords,
60920                <Box<crate::values::specified::BorderImageSlice> as SpecifiedValueInfo>::collect_completion_keywords,
60921                <Box<crate::values::specified::BorderImageWidth> as SpecifiedValueInfo>::collect_completion_keywords,
60922                <Box<crate::values::specified::BorderSpacing> as SpecifiedValueInfo>::collect_completion_keywords,
60923                <longhands::box_shadow::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60924                <Box<crate::values::specified::ClipRectOrAuto> as SpecifiedValueInfo>::collect_completion_keywords,
60925                <crate::values::specified::basic_shape::ClipPath as SpecifiedValueInfo>::collect_completion_keywords,
60926                <crate::values::specified::ColorPropertyValue as SpecifiedValueInfo>::collect_completion_keywords,
60927                <crate::values::specified::ColorScheme as SpecifiedValueInfo>::collect_completion_keywords,
60928                <crate::values::specified::length::NonNegativeLengthOrAuto as SpecifiedValueInfo>::collect_completion_keywords,
60929                <crate::values::specified::ContainerName as SpecifiedValueInfo>::collect_completion_keywords,
60930                <crate::values::specified::Content as SpecifiedValueInfo>::collect_completion_keywords,
60931                <crate::values::specified::CounterIncrement as SpecifiedValueInfo>::collect_completion_keywords,
60932                <crate::values::specified::CounterReset as SpecifiedValueInfo>::collect_completion_keywords,
60933                <crate::values::specified::Cursor as SpecifiedValueInfo>::collect_completion_keywords,
60934                <longhands::filter::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60935                <Box<crate::values::specified::FlexBasis> as SpecifiedValueInfo>::collect_completion_keywords,
60936                <crate::values::specified::FontFamily as SpecifiedValueInfo>::collect_completion_keywords,
60937                <crate::values::specified::FontSize as SpecifiedValueInfo>::collect_completion_keywords,
60938                <crate::values::specified::FontVariationSettings as SpecifiedValueInfo>::collect_completion_keywords,
60939                <crate::values::specified::GridTemplateAreas as SpecifiedValueInfo>::collect_completion_keywords,
60940                <crate::values::specified::LetterSpacing as SpecifiedValueInfo>::collect_completion_keywords,
60941                <crate::values::specified::LineHeight as SpecifiedValueInfo>::collect_completion_keywords,
60942                <longhands::mask_image::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60943                <crate::values::specified::OffsetPath as SpecifiedValueInfo>::collect_completion_keywords,
60944                <crate::values::specified::Perspective as SpecifiedValueInfo>::collect_completion_keywords,
60945                <crate::values::specified::Quotes as SpecifiedValueInfo>::collect_completion_keywords,
60946                <Box<crate::values::specified::Rotate> as SpecifiedValueInfo>::collect_completion_keywords,
60947                <Box<crate::values::specified::Scale> as SpecifiedValueInfo>::collect_completion_keywords,
60948                <crate::values::specified::TextIndent as SpecifiedValueInfo>::collect_completion_keywords,
60949                <Box<crate::values::specified::TextOverflow> as SpecifiedValueInfo>::collect_completion_keywords,
60950                <longhands::text_shadow::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60951                <crate::values::specified::Transform as SpecifiedValueInfo>::collect_completion_keywords,
60952                <Box<crate::values::specified::TransformOrigin> as SpecifiedValueInfo>::collect_completion_keywords,
60953                <longhands::transition_behavior::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60954                <longhands::transition_delay::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60955                <longhands::transition_duration::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60956                <longhands::transition_property::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60957                <longhands::transition_timing_function::SpecifiedValue as SpecifiedValueInfo>::collect_completion_keywords,
60958                <Box<crate::values::specified::Translate> as SpecifiedValueInfo>::collect_completion_keywords,
60959                <crate::values::specified::VerticalAlign as SpecifiedValueInfo>::collect_completion_keywords,
60960                <crate::values::specified::ViewTransitionClass as SpecifiedValueInfo>::collect_completion_keywords,
60961                <crate::values::specified::ViewTransitionName as SpecifiedValueInfo>::collect_completion_keywords,
60962                <crate::values::specified::WillChange as SpecifiedValueInfo>::collect_completion_keywords,
60963                <crate::values::specified::WordSpacing as SpecifiedValueInfo>::collect_completion_keywords,
60964                <crate::values::specified::XLang as SpecifiedValueInfo>::collect_completion_keywords,
60965                <Box<crate::values::specified::Position> as SpecifiedValueInfo>::collect_completion_keywords,
60966                <Box<crate::values::specified::Position> as SpecifiedValueInfo>::collect_completion_keywords,
60967                <crate::values::specified::GridTemplateComponent as SpecifiedValueInfo>::collect_completion_keywords,
60968                <crate::values::specified::GridTemplateComponent as SpecifiedValueInfo>::collect_completion_keywords,
60969                <crate::values::specified::Image as SpecifiedValueInfo>::collect_completion_keywords,
60970                <crate::values::specified::Image as SpecifiedValueInfo>::collect_completion_keywords,
60971                <crate::values::specified::ImplicitGridTracks as SpecifiedValueInfo>::collect_completion_keywords,
60972                <crate::values::specified::ImplicitGridTracks as SpecifiedValueInfo>::collect_completion_keywords,
60973                <crate::values::specified::Length as SpecifiedValueInfo>::collect_completion_keywords,
60974                <crate::values::specified::Length as SpecifiedValueInfo>::collect_completion_keywords,
60975                <crate::values::specified::length::NonNegativeLengthPercentageOrNormal as SpecifiedValueInfo>::collect_completion_keywords,
60976                <crate::values::specified::length::NonNegativeLengthPercentageOrNormal as SpecifiedValueInfo>::collect_completion_keywords,
60977                <crate::values::specified::GridLine as SpecifiedValueInfo>::collect_completion_keywords,
60978                <crate::values::specified::GridLine as SpecifiedValueInfo>::collect_completion_keywords,
60979                <crate::values::specified::GridLine as SpecifiedValueInfo>::collect_completion_keywords,
60980                <crate::values::specified::GridLine as SpecifiedValueInfo>::collect_completion_keywords,
60981                <crate::values::specified::MaxSize as SpecifiedValueInfo>::collect_completion_keywords,
60982                <crate::values::specified::MaxSize as SpecifiedValueInfo>::collect_completion_keywords,
60983                <crate::values::specified::MaxSize as SpecifiedValueInfo>::collect_completion_keywords,
60984                <crate::values::specified::MaxSize as SpecifiedValueInfo>::collect_completion_keywords,
60985                <Box<crate::values::specified::BorderCornerRadius> as SpecifiedValueInfo>::collect_completion_keywords,
60986                <Box<crate::values::specified::BorderCornerRadius> as SpecifiedValueInfo>::collect_completion_keywords,
60987                <Box<crate::values::specified::BorderCornerRadius> as SpecifiedValueInfo>::collect_completion_keywords,
60988                <Box<crate::values::specified::BorderCornerRadius> as SpecifiedValueInfo>::collect_completion_keywords,
60989                <Box<crate::values::specified::BorderCornerRadius> as SpecifiedValueInfo>::collect_completion_keywords,
60990                <Box<crate::values::specified::BorderCornerRadius> as SpecifiedValueInfo>::collect_completion_keywords,
60991                <Box<crate::values::specified::BorderCornerRadius> as SpecifiedValueInfo>::collect_completion_keywords,
60992                <Box<crate::values::specified::BorderCornerRadius> as SpecifiedValueInfo>::collect_completion_keywords,
60993                <crate::values::specified::Inset as SpecifiedValueInfo>::collect_completion_keywords,
60994                <crate::values::specified::Inset as SpecifiedValueInfo>::collect_completion_keywords,
60995                <crate::values::specified::Inset as SpecifiedValueInfo>::collect_completion_keywords,
60996                <crate::values::specified::Inset as SpecifiedValueInfo>::collect_completion_keywords,
60997                <crate::values::specified::Inset as SpecifiedValueInfo>::collect_completion_keywords,
60998                <crate::values::specified::Inset as SpecifiedValueInfo>::collect_completion_keywords,
60999                <crate::values::specified::Inset as SpecifiedValueInfo>::collect_completion_keywords,
61000                <crate::values::specified::Inset as SpecifiedValueInfo>::collect_completion_keywords,
61001                <crate::values::specified::Margin as SpecifiedValueInfo>::collect_completion_keywords,
61002                <crate::values::specified::Margin as SpecifiedValueInfo>::collect_completion_keywords,
61003                <crate::values::specified::Margin as SpecifiedValueInfo>::collect_completion_keywords,
61004                <crate::values::specified::Margin as SpecifiedValueInfo>::collect_completion_keywords,
61005                <crate::values::specified::Margin as SpecifiedValueInfo>::collect_completion_keywords,
61006                <crate::values::specified::Margin as SpecifiedValueInfo>::collect_completion_keywords,
61007                <crate::values::specified::Margin as SpecifiedValueInfo>::collect_completion_keywords,
61008                <crate::values::specified::Margin as SpecifiedValueInfo>::collect_completion_keywords,
61009                <crate::values::specified::NonNegativeLengthPercentage as SpecifiedValueInfo>::collect_completion_keywords,
61010                <crate::values::specified::NonNegativeLengthPercentage as SpecifiedValueInfo>::collect_completion_keywords,
61011                <crate::values::specified::NonNegativeLengthPercentage as SpecifiedValueInfo>::collect_completion_keywords,
61012                <crate::values::specified::NonNegativeLengthPercentage as SpecifiedValueInfo>::collect_completion_keywords,
61013                <crate::values::specified::NonNegativeLengthPercentage as SpecifiedValueInfo>::collect_completion_keywords,
61014                <crate::values::specified::NonNegativeLengthPercentage as SpecifiedValueInfo>::collect_completion_keywords,
61015                <crate::values::specified::NonNegativeLengthPercentage as SpecifiedValueInfo>::collect_completion_keywords,
61016                <crate::values::specified::NonNegativeLengthPercentage as SpecifiedValueInfo>::collect_completion_keywords,
61017                <crate::values::specified::Size as SpecifiedValueInfo>::collect_completion_keywords,
61018                <crate::values::specified::Size as SpecifiedValueInfo>::collect_completion_keywords,
61019                <crate::values::specified::Size as SpecifiedValueInfo>::collect_completion_keywords,
61020                <crate::values::specified::Size as SpecifiedValueInfo>::collect_completion_keywords,
61021                <crate::values::specified::Size as SpecifiedValueInfo>::collect_completion_keywords,
61022                <crate::values::specified::Size as SpecifiedValueInfo>::collect_completion_keywords,
61023                <crate::values::specified::Size as SpecifiedValueInfo>::collect_completion_keywords,
61024                <crate::values::specified::Size as SpecifiedValueInfo>::collect_completion_keywords,
61025                <crate::values::specified::BorderSideWidth as SpecifiedValueInfo>::collect_completion_keywords,
61026                <crate::values::specified::BorderSideWidth as SpecifiedValueInfo>::collect_completion_keywords,
61027                <crate::values::specified::BorderSideWidth as SpecifiedValueInfo>::collect_completion_keywords,
61028                <crate::values::specified::BorderSideWidth as SpecifiedValueInfo>::collect_completion_keywords,
61029                <crate::values::specified::BorderSideWidth as SpecifiedValueInfo>::collect_completion_keywords,
61030                <crate::values::specified::BorderSideWidth as SpecifiedValueInfo>::collect_completion_keywords,
61031                <crate::values::specified::BorderSideWidth as SpecifiedValueInfo>::collect_completion_keywords,
61032                <crate::values::specified::BorderSideWidth as SpecifiedValueInfo>::collect_completion_keywords,
61033                <crate::values::specified::BorderSideWidth as SpecifiedValueInfo>::collect_completion_keywords,
61034                <crate::values::specified::Color as SpecifiedValueInfo>::collect_completion_keywords,
61035                <crate::values::specified::Color as SpecifiedValueInfo>::collect_completion_keywords,
61036                <crate::values::specified::Color as SpecifiedValueInfo>::collect_completion_keywords,
61037                <crate::values::specified::Color as SpecifiedValueInfo>::collect_completion_keywords,
61038                <crate::values::specified::Color as SpecifiedValueInfo>::collect_completion_keywords,
61039                <crate::values::specified::Color as SpecifiedValueInfo>::collect_completion_keywords,
61040                <crate::values::specified::Color as SpecifiedValueInfo>::collect_completion_keywords,
61041                <crate::values::specified::Color as SpecifiedValueInfo>::collect_completion_keywords,
61042                <crate::values::specified::Color as SpecifiedValueInfo>::collect_completion_keywords,
61043                <crate::values::specified::Color as SpecifiedValueInfo>::collect_completion_keywords,
61044                <crate::values::specified::Color as SpecifiedValueInfo>::collect_completion_keywords,
61045                <shorthands::background::Longhands as SpecifiedValueInfo>::
61046                    collect_completion_keywords,
61047                <shorthands::background_position::Longhands as SpecifiedValueInfo>::
61048                    collect_completion_keywords,
61049                <shorthands::border_color::Longhands as SpecifiedValueInfo>::
61050                    collect_completion_keywords,
61051                <shorthands::border_style::Longhands as SpecifiedValueInfo>::
61052                    collect_completion_keywords,
61053                <shorthands::border_width::Longhands as SpecifiedValueInfo>::
61054                    collect_completion_keywords,
61055                <shorthands::border_top::Longhands as SpecifiedValueInfo>::
61056                    collect_completion_keywords,
61057                <shorthands::border_right::Longhands as SpecifiedValueInfo>::
61058                    collect_completion_keywords,
61059                <shorthands::border_bottom::Longhands as SpecifiedValueInfo>::
61060                    collect_completion_keywords,
61061                <shorthands::border_left::Longhands as SpecifiedValueInfo>::
61062                    collect_completion_keywords,
61063                <shorthands::border_block_start::Longhands as SpecifiedValueInfo>::
61064                    collect_completion_keywords,
61065                <shorthands::border_block_end::Longhands as SpecifiedValueInfo>::
61066                    collect_completion_keywords,
61067                <shorthands::border_inline_start::Longhands as SpecifiedValueInfo>::
61068                    collect_completion_keywords,
61069                <shorthands::border_inline_end::Longhands as SpecifiedValueInfo>::
61070                    collect_completion_keywords,
61071                <shorthands::border::Longhands as SpecifiedValueInfo>::
61072                    collect_completion_keywords,
61073                <shorthands::border_radius::Longhands as SpecifiedValueInfo>::
61074                    collect_completion_keywords,
61075                <shorthands::border_image::Longhands as SpecifiedValueInfo>::
61076                    collect_completion_keywords,
61077                <shorthands::border_block_width::Longhands as SpecifiedValueInfo>::
61078                    collect_completion_keywords,
61079                <shorthands::border_block_style::Longhands as SpecifiedValueInfo>::
61080                    collect_completion_keywords,
61081                <shorthands::border_block_color::Longhands as SpecifiedValueInfo>::
61082                    collect_completion_keywords,
61083                <shorthands::border_inline_width::Longhands as SpecifiedValueInfo>::
61084                    collect_completion_keywords,
61085                <shorthands::border_inline_style::Longhands as SpecifiedValueInfo>::
61086                    collect_completion_keywords,
61087                <shorthands::border_inline_color::Longhands as SpecifiedValueInfo>::
61088                    collect_completion_keywords,
61089                <shorthands::border_block::Longhands as SpecifiedValueInfo>::
61090                    collect_completion_keywords,
61091                <shorthands::border_inline::Longhands as SpecifiedValueInfo>::
61092                    collect_completion_keywords,
61093                <shorthands::overflow::Longhands as SpecifiedValueInfo>::
61094                    collect_completion_keywords,
61095                <shorthands::columns::Longhands as SpecifiedValueInfo>::
61096                    collect_completion_keywords,
61097                <shorthands::font::Longhands as SpecifiedValueInfo>::
61098                    collect_completion_keywords,
61099                <shorthands::font_variant::Longhands as SpecifiedValueInfo>::
61100                    collect_completion_keywords,
61101                <shorthands::white_space::Longhands as SpecifiedValueInfo>::
61102                    collect_completion_keywords,
61103                <shorthands::list_style::Longhands as SpecifiedValueInfo>::
61104                    collect_completion_keywords,
61105                <shorthands::margin::Longhands as SpecifiedValueInfo>::
61106                    collect_completion_keywords,
61107                <shorthands::margin_block::Longhands as SpecifiedValueInfo>::
61108                    collect_completion_keywords,
61109                <shorthands::margin_inline::Longhands as SpecifiedValueInfo>::
61110                    collect_completion_keywords,
61111                <shorthands::outline::Longhands as SpecifiedValueInfo>::
61112                    collect_completion_keywords,
61113                <shorthands::padding::Longhands as SpecifiedValueInfo>::
61114                    collect_completion_keywords,
61115                <shorthands::padding_block::Longhands as SpecifiedValueInfo>::
61116                    collect_completion_keywords,
61117                <shorthands::padding_inline::Longhands as SpecifiedValueInfo>::
61118                    collect_completion_keywords,
61119                <shorthands::flex_flow::Longhands as SpecifiedValueInfo>::
61120                    collect_completion_keywords,
61121                <shorthands::flex::Longhands as SpecifiedValueInfo>::
61122                    collect_completion_keywords,
61123                <shorthands::gap::Longhands as SpecifiedValueInfo>::
61124                    collect_completion_keywords,
61125                <shorthands::grid_row::Longhands as SpecifiedValueInfo>::
61126                    collect_completion_keywords,
61127                <shorthands::grid_column::Longhands as SpecifiedValueInfo>::
61128                    collect_completion_keywords,
61129                <shorthands::grid_area::Longhands as SpecifiedValueInfo>::
61130                    collect_completion_keywords,
61131                <shorthands::grid_template::Longhands as SpecifiedValueInfo>::
61132                    collect_completion_keywords,
61133                <shorthands::grid::Longhands as SpecifiedValueInfo>::
61134                    collect_completion_keywords,
61135                <shorthands::place_content::Longhands as SpecifiedValueInfo>::
61136                    collect_completion_keywords,
61137                <shorthands::place_self::Longhands as SpecifiedValueInfo>::
61138                    collect_completion_keywords,
61139                <shorthands::place_items::Longhands as SpecifiedValueInfo>::
61140                    collect_completion_keywords,
61141                <shorthands::inset::Longhands as SpecifiedValueInfo>::
61142                    collect_completion_keywords,
61143                <shorthands::inset_block::Longhands as SpecifiedValueInfo>::
61144                    collect_completion_keywords,
61145                <shorthands::inset_inline::Longhands as SpecifiedValueInfo>::
61146                    collect_completion_keywords,
61147                <shorthands::text_decoration::Longhands as SpecifiedValueInfo>::
61148                    collect_completion_keywords,
61149                <shorthands::transition::Longhands as SpecifiedValueInfo>::
61150                    collect_completion_keywords,
61151                <shorthands::animation::Longhands as SpecifiedValueInfo>::
61152                    collect_completion_keywords,
61153                do_nothing, // 'all' accepts no value other than CSS-wide keywords
61154        ];
61155        COLLECT_FUNCTIONS[self.0 as usize](f);
61156    }
61157}
61158
61159
61160
61161
61162
61163
61164
61165/// A group for properties which may override each other via logical resolution.
61166#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
61167#[repr(u8)]
61168pub enum LogicalGroupId {
61169    /// overflow
61170    Overflow = 0,
61171    /// border-style
61172    BorderStyle = 1,
61173    /// max-size
61174    MaxSize = 2,
61175    /// border-radius
61176    BorderRadius = 3,
61177    /// inset
61178    Inset = 4,
61179    /// margin
61180    Margin = 5,
61181    /// padding
61182    Padding = 6,
61183    /// size
61184    Size = 7,
61185    /// min-size
61186    MinSize = 8,
61187    /// border-width
61188    BorderWidth = 9,
61189    /// border-color
61190    BorderColor = 10,
61191}
61192
61193impl LogicalGroupId {
61194    /// Return the list of physical mapped properties for a given logical group.
61195    fn physical_properties(self) -> &'static [LonghandId] {
61196        static PROPS: [[LonghandId; 4]; 11] = [
61197        [
61198            
61199            LonghandId::OverflowY,
61200            LonghandId::OverflowX,
61201            LonghandId::OverflowY,
61202            LonghandId::OverflowY,
61203        ],
61204        [
61205            
61206            LonghandId::BorderTopStyle,
61207            LonghandId::BorderRightStyle,
61208            LonghandId::BorderBottomStyle,
61209            LonghandId::BorderLeftStyle,
61210        ],
61211        [
61212            
61213            LonghandId::MaxHeight,
61214            LonghandId::MaxWidth,
61215            LonghandId::MaxHeight,
61216            LonghandId::MaxHeight,
61217        ],
61218        [
61219            
61220            LonghandId::BorderTopLeftRadius,
61221            LonghandId::BorderTopRightRadius,
61222            LonghandId::BorderBottomRightRadius,
61223            LonghandId::BorderBottomLeftRadius,
61224        ],
61225        [
61226            
61227            LonghandId::Top,
61228            LonghandId::Right,
61229            LonghandId::Bottom,
61230            LonghandId::Left,
61231        ],
61232        [
61233            
61234            LonghandId::MarginTop,
61235            LonghandId::MarginRight,
61236            LonghandId::MarginBottom,
61237            LonghandId::MarginLeft,
61238        ],
61239        [
61240            
61241            LonghandId::PaddingTop,
61242            LonghandId::PaddingRight,
61243            LonghandId::PaddingBottom,
61244            LonghandId::PaddingLeft,
61245        ],
61246        [
61247            
61248            LonghandId::Height,
61249            LonghandId::Width,
61250            LonghandId::Height,
61251            LonghandId::Height,
61252        ],
61253        [
61254            
61255            LonghandId::MinHeight,
61256            LonghandId::MinWidth,
61257            LonghandId::MinHeight,
61258            LonghandId::MinHeight,
61259        ],
61260        [
61261            
61262            LonghandId::BorderTopWidth,
61263            LonghandId::BorderRightWidth,
61264            LonghandId::BorderBottomWidth,
61265            LonghandId::BorderLeftWidth,
61266        ],
61267        [
61268            
61269            LonghandId::BorderTopColor,
61270            LonghandId::BorderRightColor,
61271            LonghandId::BorderBottomColor,
61272            LonghandId::BorderLeftColor,
61273        ],
61274        ];
61275        &PROPS[self as usize]
61276    }
61277}
61278
61279/// A set of logical groups.
61280#[derive(Clone, Copy, Debug, Default, MallocSizeOf, PartialEq)]
61281pub struct LogicalGroupSet {
61282    storage: [u32; (11 - 1 + 32) / 32]
61283}
61284
61285impl LogicalGroupSet {
61286    /// Creates an empty `NonCustomPropertyIdSet`.
61287    pub fn new() -> Self {
61288        Self {
61289            storage: Default::default(),
61290        }
61291    }
61292
61293    /// Return whether the given group is in the set
61294    #[inline]
61295    pub fn contains(&self, g: LogicalGroupId) -> bool {
61296        let bit = g as usize;
61297        (self.storage[bit / 32] & (1 << (bit % 32))) != 0
61298    }
61299
61300    /// Insert a group the set.
61301    #[inline]
61302    pub fn insert(&mut self, g: LogicalGroupId) {
61303        let bit = g as usize;
61304        self.storage[bit / 32] |= 1 << (bit % 32);
61305    }
61306}
61307
61308
61309#[repr(u8)]
61310#[derive(Copy, Clone, Debug)]
61311pub(crate) enum PrioritaryPropertyId {
61312    Direction,
61313    FontStretch,
61314    FontStyle,
61315    FontWeight,
61316    WritingMode,
61317    Zoom,
61318    ColorScheme,
61319    FontFamily,
61320    FontSize,
61321    LineHeight,
61322    XLang,
61323}
61324
61325impl PrioritaryPropertyId {
61326    #[inline]
61327    pub fn to_longhand(self) -> LonghandId {
61328        static PRIORITARY_TO_LONGHAND: [LonghandId; property_counts::PRIORITARY] = [
61329            LonghandId::Direction,
61330            LonghandId::FontStretch,
61331            LonghandId::FontStyle,
61332            LonghandId::FontWeight,
61333            LonghandId::WritingMode,
61334            LonghandId::Zoom,
61335            LonghandId::ColorScheme,
61336            LonghandId::FontFamily,
61337            LonghandId::FontSize,
61338            LonghandId::LineHeight,
61339            LonghandId::XLang,
61340        ];
61341        PRIORITARY_TO_LONGHAND[self as usize]
61342    }
61343    #[inline]
61344    pub fn from_longhand(l: LonghandId) -> Option<Self> {
61345        static LONGHAND_TO_PRIORITARY: [Option<PrioritaryPropertyId>; 220] = [
61346            None,
61347            None,
61348            None,
61349            None,
61350            None,
61351            None,
61352            None,
61353            None,
61354            None,
61355            None,
61356            None,
61357            None,
61358            None,
61359            None,
61360            None,
61361            Some(PrioritaryPropertyId::Direction),
61362            None,
61363            None,
61364            None,
61365            None,
61366            None,
61367            None,
61368            Some(PrioritaryPropertyId::FontStretch),
61369            Some(PrioritaryPropertyId::FontStyle),
61370            None,
61371            Some(PrioritaryPropertyId::FontWeight),
61372            None,
61373            None,
61374            None,
61375            None,
61376            None,
61377            None,
61378            None,
61379            None,
61380            None,
61381            None,
61382            None,
61383            None,
61384            None,
61385            None,
61386            None,
61387            None,
61388            None,
61389            None,
61390            None,
61391            None,
61392            None,
61393            None,
61394            None,
61395            None,
61396            None,
61397            None,
61398            None,
61399            None,
61400            None,
61401            None,
61402            None,
61403            None,
61404            Some(PrioritaryPropertyId::WritingMode),
61405            None,
61406            Some(PrioritaryPropertyId::Zoom),
61407            None,
61408            None,
61409            None,
61410            None,
61411            None,
61412            None,
61413            None,
61414            None,
61415            None,
61416            None,
61417            None,
61418            None,
61419            None,
61420            None,
61421            None,
61422            None,
61423            None,
61424            None,
61425            None,
61426            None,
61427            None,
61428            None,
61429            None,
61430            None,
61431            None,
61432            None,
61433            None,
61434            None,
61435            None,
61436            None,
61437            None,
61438            None,
61439            None,
61440            None,
61441            None,
61442            None,
61443            None,
61444            None,
61445            None,
61446            None,
61447            None,
61448            Some(PrioritaryPropertyId::ColorScheme),
61449            None,
61450            None,
61451            None,
61452            None,
61453            None,
61454            None,
61455            None,
61456            None,
61457            Some(PrioritaryPropertyId::FontFamily),
61458            Some(PrioritaryPropertyId::FontSize),
61459            None,
61460            None,
61461            None,
61462            Some(PrioritaryPropertyId::LineHeight),
61463            None,
61464            None,
61465            None,
61466            None,
61467            None,
61468            None,
61469            None,
61470            None,
61471            None,
61472            None,
61473            None,
61474            None,
61475            None,
61476            None,
61477            None,
61478            None,
61479            None,
61480            None,
61481            None,
61482            None,
61483            None,
61484            None,
61485            Some(PrioritaryPropertyId::XLang),
61486            None,
61487            None,
61488            None,
61489            None,
61490            None,
61491            None,
61492            None,
61493            None,
61494            None,
61495            None,
61496            None,
61497            None,
61498            None,
61499            None,
61500            None,
61501            None,
61502            None,
61503            None,
61504            None,
61505            None,
61506            None,
61507            None,
61508            None,
61509            None,
61510            None,
61511            None,
61512            None,
61513            None,
61514            None,
61515            None,
61516            None,
61517            None,
61518            None,
61519            None,
61520            None,
61521            None,
61522            None,
61523            None,
61524            None,
61525            None,
61526            None,
61527            None,
61528            None,
61529            None,
61530            None,
61531            None,
61532            None,
61533            None,
61534            None,
61535            None,
61536            None,
61537            None,
61538            None,
61539            None,
61540            None,
61541            None,
61542            None,
61543            None,
61544            None,
61545            None,
61546            None,
61547            None,
61548            None,
61549            None,
61550            None,
61551            None,
61552            None,
61553            None,
61554            None,
61555            None,
61556            None,
61557            None,
61558            None,
61559            None,
61560            None,
61561            None,
61562            None,
61563            None,
61564            None,
61565            None,
61566        ];
61567        LONGHAND_TO_PRIORITARY[l as usize]
61568    }
61569}
61570
61571impl LonghandIdSet {
61572    /// The set of non-inherited longhands.
61573    #[inline]
61574    pub(super) fn reset() -> &'static Self {
61575        
61576static RESET: LonghandIdSet = LonghandIdSet {
61577    
61578    storage: [0xf41d7dbf, 0xf8619e7c, 0xffffffff, 0xd6e46f9d, 0xfffdf3ff, 0xffffffff, 0xfffffff]
61579};
61580
61581        &RESET
61582    }
61583
61584    #[inline]
61585    pub(super) fn discrete_animatable() -> &'static Self {
61586        
61587static DISCRETE_ANIMATABLE: LonghandIdSet = LonghandIdSet {
61588    
61589    storage: [0xfd3f17f7, 0x833ff3cf, 0x13c00727, 0x11249e40, 0xf0f0180, 0x0, 0x0]
61590};
61591
61592        &DISCRETE_ANIMATABLE
61593    }
61594
61595    #[inline]
61596    pub(super) fn logical() -> &'static Self {
61597        
61598static LOGICAL: LonghandIdSet = LonghandIdSet {
61599    
61600    storage: [0x0, 0x80000000, 0xd9, 0x0, 0x50000000, 0x1b1b1e3c, 0x6c1b2d]
61601};
61602
61603        &LOGICAL
61604    }
61605
61606    /// Returns the set of longhands that are ignored when document colors are
61607    /// disabled.
61608    #[inline]
61609    pub(super) fn ignored_when_colors_disabled() -> &'static Self {
61610        
61611static IGNORED_WHEN_COLORS_DISABLED: LonghandIdSet = LonghandIdSet {
61612    
61613    storage: [0x0, 0x0, 0x1000000, 0x20000064, 0x10000, 0x0, 0xffe0000]
61614};
61615
61616        &IGNORED_WHEN_COLORS_DISABLED
61617    }
61618
61619    /// Only a few properties are allowed to depend on the visited state of
61620    /// links. When cascading visited styles, we can save time by only
61621    /// processing these properties.
61622    pub(super) fn visited_dependent() -> &'static Self {
61623        
61624static VISITED_DEPENDENT: LonghandIdSet = LonghandIdSet {
61625    
61626    storage: [0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0xffe0000]
61627};
61628
61629        debug_assert!(Self::late_group().contains_all(&VISITED_DEPENDENT));
61630        &VISITED_DEPENDENT
61631    }
61632
61633    #[inline]
61634    pub(super) fn prioritary_properties() -> &'static Self {
61635        
61636static PRIORITARY_PROPERTIES: LonghandIdSet = LonghandIdSet {
61637    
61638    storage: [0x2c08000, 0x14000000, 0x0, 0x118040, 0x800, 0x0, 0x0]
61639};
61640
61641        &PRIORITARY_PROPERTIES
61642    }
61643
61644    #[inline]
61645    pub(super) fn late_group_only_inherited() -> &'static Self {
61646        
61647static LATE_GROUP_ONLY_INHERITED: LonghandIdSet = LonghandIdSet {
61648    
61649    storage: [0x9220240, 0x39e6183, 0x0, 0x290a1022, 0x20400, 0x0, 0x0]
61650};
61651
61652        &LATE_GROUP_ONLY_INHERITED
61653    }
61654
61655    #[inline]
61656    pub(super) fn late_group() -> &'static Self {
61657        
61658static LATE_GROUP: LonghandIdSet = LonghandIdSet {
61659    
61660    storage: [0xfd3f7fff, 0xebffffff, 0xffffffff, 0xffee7fbf, 0xfffff7ff, 0xffffffff, 0xfffffff]
61661};
61662
61663        &LATE_GROUP
61664    }
61665
61666    /// Returns the set of properties that are declared as having no effect on
61667    /// Gecko <scrollbar> elements or their descendant scrollbar parts.
61668    #[cfg(debug_assertions)]
61669    #[cfg(feature = "gecko")]
61670    #[inline]
61671    pub fn has_no_effect_on_gecko_scrollbars() -> &'static Self {
61672        // data.py asserts that has_no_effect_on_gecko_scrollbars is True or
61673        // False for properties that are inherited and Gecko pref controlled,
61674        // and is None for all other properties.
61675        
61676static HAS_NO_EFFECT_ON_SCROLLBARS: LonghandIdSet = LonghandIdSet {
61677    
61678    storage: [0x0, 0x0, 0x0, 0x20000, 0x800, 0x0, 0x0]
61679};
61680
61681        &HAS_NO_EFFECT_ON_SCROLLBARS
61682    }
61683
61684    /// Returns the set of margin properties, for the purposes of <h1> use counters / warnings.
61685    #[inline]
61686    pub fn margin_properties() -> &'static Self {
61687        
61688static MARGIN_PROPERTIES: LonghandIdSet = LonghandIdSet {
61689    
61690    storage: [0x0, 0x0, 0x0, 0x0, 0x0, 0xff0000, 0x0]
61691};
61692
61693        &MARGIN_PROPERTIES
61694    }
61695
61696    /// Returns the set of border properties for the purpose of disabling native
61697    /// appearance.
61698    #[inline]
61699    pub fn border_background_properties() -> &'static Self {
61700        
61701static BORDER_BACKGROUND_PROPERTIES: LonghandIdSet = LonghandIdSet {
61702    
61703    storage: [0x80, 0x0, 0xefc007f8, 0x1, 0x10000, 0xff, 0x3feff00]
61704};
61705
61706        &BORDER_BACKGROUND_PROPERTIES
61707    }
61708
61709    /// Returns properties that are zoom dependent (basically, that contain lengths).
61710    #[inline]
61711    pub fn zoom_dependent() -> &'static Self {
61712        
61713static ZOOM_DEPENDENT: LonghandIdSet = LonghandIdSet {
61714    
61715    storage: [0x0, 0x0, 0x40000000, 0x28190002, 0xf0303400, 0xff00ff00, 0xff]
61716};
61717
61718        &ZOOM_DEPENDENT
61719    }
61720
61721    /// Note that it's different from zoom_dependent(), as this only includes inherited, physical
61722    /// properties.
61723    #[inline]
61724    pub fn zoom_dependent_inherited_properties() -> &'static Self {
61725        
61726static ZOOM_DEPENDENT_INHERITED: LonghandIdSet = LonghandIdSet {
61727    
61728    storage: [0x0, 0x0, 0x0, 0x28190002, 0x400, 0x0, 0x0]
61729};
61730
61731        &ZOOM_DEPENDENT_INHERITED
61732    }
61733}
61734
61735/// An identifier for a given longhand property.
61736#[derive(Clone, Copy, Eq, Hash, MallocSizeOf, PartialEq, ToComputedValue, ToResolvedValue, ToShmem)]
61737#[repr(u16)]
61738pub enum LonghandId {
61739        /// align-content
61740        AlignContent = 0,
61741        /// align-items
61742        AlignItems = 1,
61743        /// align-self
61744        AlignSelf = 2,
61745        /// aspect-ratio
61746        AspectRatio = 3,
61747        /// backface-visibility
61748        BackfaceVisibility = 4,
61749        /// baseline-source
61750        BaselineSource = 5,
61751        /// border-collapse
61752        BorderCollapse = 6,
61753        /// border-image-repeat
61754        BorderImageRepeat = 7,
61755        /// box-sizing
61756        BoxSizing = 8,
61757        /// caption-side
61758        CaptionSide = 9,
61759        /// clear
61760        Clear = 10,
61761        /// column-count
61762        ColumnCount = 11,
61763        /// column-span
61764        ColumnSpan = 12,
61765        /// contain
61766        Contain = 13,
61767        /// container-type
61768        ContainerType = 14,
61769        /// direction
61770        Direction = 15,
61771        /// display
61772        Display = 16,
61773        /// empty-cells
61774        EmptyCells = 17,
61775        /// flex-direction
61776        FlexDirection = 18,
61777        /// flex-wrap
61778        FlexWrap = 19,
61779        /// float
61780        Float = 20,
61781        /// font-language-override
61782        FontLanguageOverride = 21,
61783        /// font-stretch
61784        FontStretch = 22,
61785        /// font-style
61786        FontStyle = 23,
61787        /// font-variant-caps
61788        FontVariantCaps = 24,
61789        /// font-weight
61790        FontWeight = 25,
61791        /// grid-auto-flow
61792        GridAutoFlow = 26,
61793        /// image-rendering
61794        ImageRendering = 27,
61795        /// isolation
61796        Isolation = 28,
61797        /// justify-content
61798        JustifyContent = 29,
61799        /// justify-items
61800        JustifyItems = 30,
61801        /// justify-self
61802        JustifySelf = 31,
61803        /// list-style-position
61804        ListStylePosition = 32,
61805        /// list-style-type
61806        ListStyleType = 33,
61807        /// mix-blend-mode
61808        MixBlendMode = 34,
61809        /// object-fit
61810        ObjectFit = 35,
61811        /// opacity
61812        Opacity = 36,
61813        /// order
61814        Order = 37,
61815        /// outline-style
61816        OutlineStyle = 38,
61817        /// overflow-wrap
61818        OverflowWrap = 39,
61819        /// pointer-events
61820        PointerEvents = 40,
61821        /// position
61822        Position = 41,
61823        /// -servo-overflow-clip-box
61824        ServoOverflowClipBox = 42,
61825        /// -servo-top-layer
61826        ServoTopLayer = 43,
61827        /// table-layout
61828        TableLayout = 44,
61829        /// text-align
61830        TextAlign = 45,
61831        /// text-align-last
61832        TextAlignLast = 46,
61833        /// text-decoration-line
61834        TextDecorationLine = 47,
61835        /// text-decoration-style
61836        TextDecorationStyle = 48,
61837        /// text-justify
61838        TextJustify = 49,
61839        /// text-rendering
61840        TextRendering = 50,
61841        /// text-transform
61842        TextTransform = 51,
61843        /// text-wrap-mode
61844        TextWrapMode = 52,
61845        /// transform-style
61846        TransformStyle = 53,
61847        /// unicode-bidi
61848        UnicodeBidi = 54,
61849        /// visibility
61850        Visibility = 55,
61851        /// white-space-collapse
61852        WhiteSpaceCollapse = 56,
61853        /// word-break
61854        WordBreak = 57,
61855        /// writing-mode
61856        WritingMode = 58,
61857        /// z-index
61858        ZIndex = 59,
61859        /// zoom
61860        Zoom = 60,
61861        /// flex-grow
61862        FlexGrow = 61,
61863        /// flex-shrink
61864        FlexShrink = 62,
61865        /// overflow-block
61866        OverflowBlock = 63,
61867        /// overflow-inline
61868        OverflowInline = 64,
61869        /// overflow-x
61870        OverflowX = 65,
61871        /// overflow-y
61872        OverflowY = 66,
61873        /// border-block-end-style
61874        BorderBlockEndStyle = 67,
61875        /// border-block-start-style
61876        BorderBlockStartStyle = 68,
61877        /// border-bottom-style
61878        BorderBottomStyle = 69,
61879        /// border-inline-end-style
61880        BorderInlineEndStyle = 70,
61881        /// border-inline-start-style
61882        BorderInlineStartStyle = 71,
61883        /// border-left-style
61884        BorderLeftStyle = 72,
61885        /// border-right-style
61886        BorderRightStyle = 73,
61887        /// border-top-style
61888        BorderTopStyle = 74,
61889        /// animation-composition
61890        AnimationComposition = 75,
61891        /// animation-delay
61892        AnimationDelay = 76,
61893        /// animation-direction
61894        AnimationDirection = 77,
61895        /// animation-duration
61896        AnimationDuration = 78,
61897        /// animation-fill-mode
61898        AnimationFillMode = 79,
61899        /// animation-iteration-count
61900        AnimationIterationCount = 80,
61901        /// animation-name
61902        AnimationName = 81,
61903        /// animation-play-state
61904        AnimationPlayState = 82,
61905        /// animation-timeline
61906        AnimationTimeline = 83,
61907        /// animation-timing-function
61908        AnimationTimingFunction = 84,
61909        /// backdrop-filter
61910        BackdropFilter = 85,
61911        /// background-attachment
61912        BackgroundAttachment = 86,
61913        /// background-clip
61914        BackgroundClip = 87,
61915        /// background-image
61916        BackgroundImage = 88,
61917        /// background-origin
61918        BackgroundOrigin = 89,
61919        /// background-position-x
61920        BackgroundPositionX = 90,
61921        /// background-position-y
61922        BackgroundPositionY = 91,
61923        /// background-repeat
61924        BackgroundRepeat = 92,
61925        /// background-size
61926        BackgroundSize = 93,
61927        /// border-image-outset
61928        BorderImageOutset = 94,
61929        /// border-image-slice
61930        BorderImageSlice = 95,
61931        /// border-image-width
61932        BorderImageWidth = 96,
61933        /// border-spacing
61934        BorderSpacing = 97,
61935        /// box-shadow
61936        BoxShadow = 98,
61937        /// clip
61938        Clip = 99,
61939        /// clip-path
61940        ClipPath = 100,
61941        /// color
61942        Color = 101,
61943        /// color-scheme
61944        ColorScheme = 102,
61945        /// column-width
61946        ColumnWidth = 103,
61947        /// container-name
61948        ContainerName = 104,
61949        /// content
61950        Content = 105,
61951        /// counter-increment
61952        CounterIncrement = 106,
61953        /// counter-reset
61954        CounterReset = 107,
61955        /// cursor
61956        Cursor = 108,
61957        /// filter
61958        Filter = 109,
61959        /// flex-basis
61960        FlexBasis = 110,
61961        /// font-family
61962        FontFamily = 111,
61963        /// font-size
61964        FontSize = 112,
61965        /// font-variation-settings
61966        FontVariationSettings = 113,
61967        /// grid-template-areas
61968        GridTemplateAreas = 114,
61969        /// letter-spacing
61970        LetterSpacing = 115,
61971        /// line-height
61972        LineHeight = 116,
61973        /// mask-image
61974        MaskImage = 117,
61975        /// offset-path
61976        OffsetPath = 118,
61977        /// perspective
61978        Perspective = 119,
61979        /// quotes
61980        Quotes = 120,
61981        /// rotate
61982        Rotate = 121,
61983        /// scale
61984        Scale = 122,
61985        /// text-indent
61986        TextIndent = 123,
61987        /// text-overflow
61988        TextOverflow = 124,
61989        /// text-shadow
61990        TextShadow = 125,
61991        /// transform
61992        Transform = 126,
61993        /// transform-origin
61994        TransformOrigin = 127,
61995        /// transition-behavior
61996        TransitionBehavior = 128,
61997        /// transition-delay
61998        TransitionDelay = 129,
61999        /// transition-duration
62000        TransitionDuration = 130,
62001        /// transition-property
62002        TransitionProperty = 131,
62003        /// transition-timing-function
62004        TransitionTimingFunction = 132,
62005        /// translate
62006        Translate = 133,
62007        /// vertical-align
62008        VerticalAlign = 134,
62009        /// view-transition-class
62010        ViewTransitionClass = 135,
62011        /// view-transition-name
62012        ViewTransitionName = 136,
62013        /// will-change
62014        WillChange = 137,
62015        /// word-spacing
62016        WordSpacing = 138,
62017        /// -x-lang
62018        XLang = 139,
62019        /// object-position
62020        ObjectPosition = 140,
62021        /// perspective-origin
62022        PerspectiveOrigin = 141,
62023        /// grid-template-columns
62024        GridTemplateColumns = 142,
62025        /// grid-template-rows
62026        GridTemplateRows = 143,
62027        /// border-image-source
62028        BorderImageSource = 144,
62029        /// list-style-image
62030        ListStyleImage = 145,
62031        /// grid-auto-columns
62032        GridAutoColumns = 146,
62033        /// grid-auto-rows
62034        GridAutoRows = 147,
62035        /// outline-offset
62036        OutlineOffset = 148,
62037        /// overflow-clip-margin
62038        OverflowClipMargin = 149,
62039        /// column-gap
62040        ColumnGap = 150,
62041        /// row-gap
62042        RowGap = 151,
62043        /// grid-column-end
62044        GridColumnEnd = 152,
62045        /// grid-column-start
62046        GridColumnStart = 153,
62047        /// grid-row-end
62048        GridRowEnd = 154,
62049        /// grid-row-start
62050        GridRowStart = 155,
62051        /// max-block-size
62052        MaxBlockSize = 156,
62053        /// max-height
62054        MaxHeight = 157,
62055        /// max-inline-size
62056        MaxInlineSize = 158,
62057        /// max-width
62058        MaxWidth = 159,
62059        /// border-bottom-left-radius
62060        BorderBottomLeftRadius = 160,
62061        /// border-bottom-right-radius
62062        BorderBottomRightRadius = 161,
62063        /// border-end-end-radius
62064        BorderEndEndRadius = 162,
62065        /// border-end-start-radius
62066        BorderEndStartRadius = 163,
62067        /// border-start-end-radius
62068        BorderStartEndRadius = 164,
62069        /// border-start-start-radius
62070        BorderStartStartRadius = 165,
62071        /// border-top-left-radius
62072        BorderTopLeftRadius = 166,
62073        /// border-top-right-radius
62074        BorderTopRightRadius = 167,
62075        /// bottom
62076        Bottom = 168,
62077        /// inset-block-end
62078        InsetBlockEnd = 169,
62079        /// inset-block-start
62080        InsetBlockStart = 170,
62081        /// inset-inline-end
62082        InsetInlineEnd = 171,
62083        /// inset-inline-start
62084        InsetInlineStart = 172,
62085        /// left
62086        Left = 173,
62087        /// right
62088        Right = 174,
62089        /// top
62090        Top = 175,
62091        /// margin-block-end
62092        MarginBlockEnd = 176,
62093        /// margin-block-start
62094        MarginBlockStart = 177,
62095        /// margin-bottom
62096        MarginBottom = 178,
62097        /// margin-inline-end
62098        MarginInlineEnd = 179,
62099        /// margin-inline-start
62100        MarginInlineStart = 180,
62101        /// margin-left
62102        MarginLeft = 181,
62103        /// margin-right
62104        MarginRight = 182,
62105        /// margin-top
62106        MarginTop = 183,
62107        /// padding-block-end
62108        PaddingBlockEnd = 184,
62109        /// padding-block-start
62110        PaddingBlockStart = 185,
62111        /// padding-bottom
62112        PaddingBottom = 186,
62113        /// padding-inline-end
62114        PaddingInlineEnd = 187,
62115        /// padding-inline-start
62116        PaddingInlineStart = 188,
62117        /// padding-left
62118        PaddingLeft = 189,
62119        /// padding-right
62120        PaddingRight = 190,
62121        /// padding-top
62122        PaddingTop = 191,
62123        /// block-size
62124        BlockSize = 192,
62125        /// height
62126        Height = 193,
62127        /// inline-size
62128        InlineSize = 194,
62129        /// min-block-size
62130        MinBlockSize = 195,
62131        /// min-height
62132        MinHeight = 196,
62133        /// min-inline-size
62134        MinInlineSize = 197,
62135        /// min-width
62136        MinWidth = 198,
62137        /// width
62138        Width = 199,
62139        /// border-block-end-width
62140        BorderBlockEndWidth = 200,
62141        /// border-block-start-width
62142        BorderBlockStartWidth = 201,
62143        /// border-bottom-width
62144        BorderBottomWidth = 202,
62145        /// border-inline-end-width
62146        BorderInlineEndWidth = 203,
62147        /// border-inline-start-width
62148        BorderInlineStartWidth = 204,
62149        /// border-left-width
62150        BorderLeftWidth = 205,
62151        /// border-right-width
62152        BorderRightWidth = 206,
62153        /// border-top-width
62154        BorderTopWidth = 207,
62155        /// outline-width
62156        OutlineWidth = 208,
62157        /// background-color
62158        BackgroundColor = 209,
62159        /// border-block-end-color
62160        BorderBlockEndColor = 210,
62161        /// border-block-start-color
62162        BorderBlockStartColor = 211,
62163        /// border-bottom-color
62164        BorderBottomColor = 212,
62165        /// border-inline-end-color
62166        BorderInlineEndColor = 213,
62167        /// border-inline-start-color
62168        BorderInlineStartColor = 214,
62169        /// border-left-color
62170        BorderLeftColor = 215,
62171        /// border-right-color
62172        BorderRightColor = 216,
62173        /// border-top-color
62174        BorderTopColor = 217,
62175        /// outline-color
62176        OutlineColor = 218,
62177        /// text-decoration-color
62178        TextDecorationColor = 219,
62179}
62180
62181enum LogicalMappingKind {
62182    Side(LogicalSide),
62183    Corner(LogicalCorner),
62184    Axis(LogicalAxis),
62185}
62186
62187struct LogicalMappingData {
62188    group: LogicalGroupId,
62189    kind: LogicalMappingKind,
62190}
62191
62192impl LogicalMappingData {
62193    fn to_physical(&self, wm: WritingMode) -> LonghandId {
62194        let index = match self.kind {
62195            LogicalMappingKind::Side(s) => s.to_physical(wm) as usize,
62196            LogicalMappingKind::Corner(c) => c.to_physical(wm) as usize,
62197            LogicalMappingKind::Axis(a) => a.to_physical(wm) as usize,
62198        };
62199        self.group.physical_properties()[index]
62200    }
62201}
62202
62203impl LonghandId {
62204    /// Returns an iterator over all the shorthands that include this longhand.
62205    pub fn shorthands(self) -> NonCustomPropertyIterator<ShorthandId> {
62206        // first generate longhand to shorthands lookup map
62207        //
62208        // NOTE(emilio): This currently doesn't exclude the "all" shorthand. It
62209        // could potentially do so, which would speed up serialization
62210        // algorithms and what not, I guess.
62211        
62212
62213        // based on lookup results for each longhand, create result arrays
62214        static MAP: [&'static [ShorthandId]; property_counts::LONGHANDS] = [
62215            &[
62216                    ShorthandId::All,
62217                    ShorthandId::PlaceContent,
62218            ],
62219            &[
62220                    ShorthandId::All,
62221                    ShorthandId::PlaceItems,
62222            ],
62223            &[
62224                    ShorthandId::All,
62225                    ShorthandId::PlaceSelf,
62226            ],
62227            &[
62228                    ShorthandId::All,
62229            ],
62230            &[
62231                    ShorthandId::All,
62232            ],
62233            &[
62234                    ShorthandId::All,
62235            ],
62236            &[
62237                    ShorthandId::All,
62238            ],
62239            &[
62240                    ShorthandId::All,
62241                    ShorthandId::Border,
62242                    ShorthandId::BorderImage,
62243            ],
62244            &[
62245                    ShorthandId::All,
62246            ],
62247            &[
62248                    ShorthandId::All,
62249            ],
62250            &[
62251                    ShorthandId::All,
62252            ],
62253            &[
62254                    ShorthandId::All,
62255                    ShorthandId::Columns,
62256            ],
62257            &[
62258                    ShorthandId::All,
62259            ],
62260            &[
62261                    ShorthandId::All,
62262            ],
62263            &[
62264                    ShorthandId::All,
62265            ],
62266            &[
62267            ],
62268            &[
62269                    ShorthandId::All,
62270            ],
62271            &[
62272                    ShorthandId::All,
62273            ],
62274            &[
62275                    ShorthandId::All,
62276                    ShorthandId::FlexFlow,
62277            ],
62278            &[
62279                    ShorthandId::All,
62280                    ShorthandId::FlexFlow,
62281            ],
62282            &[
62283                    ShorthandId::All,
62284            ],
62285            &[
62286                    ShorthandId::All,
62287            ],
62288            &[
62289                    ShorthandId::All,
62290                    ShorthandId::Font,
62291            ],
62292            &[
62293                    ShorthandId::All,
62294                    ShorthandId::Font,
62295            ],
62296            &[
62297                    ShorthandId::All,
62298                    ShorthandId::Font,
62299                    ShorthandId::FontVariant,
62300            ],
62301            &[
62302                    ShorthandId::All,
62303                    ShorthandId::Font,
62304            ],
62305            &[
62306                    ShorthandId::All,
62307                    ShorthandId::Grid,
62308            ],
62309            &[
62310                    ShorthandId::All,
62311            ],
62312            &[
62313                    ShorthandId::All,
62314            ],
62315            &[
62316                    ShorthandId::All,
62317                    ShorthandId::PlaceContent,
62318            ],
62319            &[
62320                    ShorthandId::All,
62321                    ShorthandId::PlaceItems,
62322            ],
62323            &[
62324                    ShorthandId::All,
62325                    ShorthandId::PlaceSelf,
62326            ],
62327            &[
62328                    ShorthandId::All,
62329                    ShorthandId::ListStyle,
62330            ],
62331            &[
62332                    ShorthandId::All,
62333                    ShorthandId::ListStyle,
62334            ],
62335            &[
62336                    ShorthandId::All,
62337            ],
62338            &[
62339                    ShorthandId::All,
62340            ],
62341            &[
62342                    ShorthandId::All,
62343            ],
62344            &[
62345                    ShorthandId::All,
62346            ],
62347            &[
62348                    ShorthandId::All,
62349                    ShorthandId::Outline,
62350            ],
62351            &[
62352                    ShorthandId::All,
62353            ],
62354            &[
62355                    ShorthandId::All,
62356            ],
62357            &[
62358                    ShorthandId::All,
62359            ],
62360            &[
62361            ],
62362            &[
62363            ],
62364            &[
62365                    ShorthandId::All,
62366            ],
62367            &[
62368                    ShorthandId::All,
62369            ],
62370            &[
62371                    ShorthandId::All,
62372            ],
62373            &[
62374                    ShorthandId::All,
62375                    ShorthandId::TextDecoration,
62376            ],
62377            &[
62378                    ShorthandId::All,
62379                    ShorthandId::TextDecoration,
62380            ],
62381            &[
62382                    ShorthandId::All,
62383            ],
62384            &[
62385                    ShorthandId::All,
62386            ],
62387            &[
62388                    ShorthandId::All,
62389            ],
62390            &[
62391                    ShorthandId::All,
62392                    ShorthandId::WhiteSpace,
62393            ],
62394            &[
62395                    ShorthandId::All,
62396            ],
62397            &[
62398            ],
62399            &[
62400                    ShorthandId::All,
62401            ],
62402            &[
62403                    ShorthandId::All,
62404                    ShorthandId::WhiteSpace,
62405            ],
62406            &[
62407                    ShorthandId::All,
62408            ],
62409            &[
62410                    ShorthandId::All,
62411            ],
62412            &[
62413                    ShorthandId::All,
62414            ],
62415            &[
62416                    ShorthandId::All,
62417            ],
62418            &[
62419                    ShorthandId::All,
62420                    ShorthandId::Flex,
62421            ],
62422            &[
62423                    ShorthandId::All,
62424                    ShorthandId::Flex,
62425            ],
62426            &[
62427                    ShorthandId::All,
62428            ],
62429            &[
62430                    ShorthandId::All,
62431            ],
62432            &[
62433                    ShorthandId::All,
62434                    ShorthandId::Overflow,
62435            ],
62436            &[
62437                    ShorthandId::All,
62438                    ShorthandId::Overflow,
62439            ],
62440            &[
62441                    ShorthandId::All,
62442                    ShorthandId::BorderBlock,
62443                    ShorthandId::BorderBlockEnd,
62444                    ShorthandId::BorderBlockStyle,
62445            ],
62446            &[
62447                    ShorthandId::All,
62448                    ShorthandId::BorderBlock,
62449                    ShorthandId::BorderBlockStart,
62450                    ShorthandId::BorderBlockStyle,
62451            ],
62452            &[
62453                    ShorthandId::All,
62454                    ShorthandId::Border,
62455                    ShorthandId::BorderStyle,
62456                    ShorthandId::BorderBottom,
62457            ],
62458            &[
62459                    ShorthandId::All,
62460                    ShorthandId::BorderInline,
62461                    ShorthandId::BorderInlineEnd,
62462                    ShorthandId::BorderInlineStyle,
62463            ],
62464            &[
62465                    ShorthandId::All,
62466                    ShorthandId::BorderInline,
62467                    ShorthandId::BorderInlineStart,
62468                    ShorthandId::BorderInlineStyle,
62469            ],
62470            &[
62471                    ShorthandId::All,
62472                    ShorthandId::Border,
62473                    ShorthandId::BorderStyle,
62474                    ShorthandId::BorderLeft,
62475            ],
62476            &[
62477                    ShorthandId::All,
62478                    ShorthandId::Border,
62479                    ShorthandId::BorderStyle,
62480                    ShorthandId::BorderRight,
62481            ],
62482            &[
62483                    ShorthandId::All,
62484                    ShorthandId::Border,
62485                    ShorthandId::BorderStyle,
62486                    ShorthandId::BorderTop,
62487            ],
62488            &[
62489                    ShorthandId::All,
62490            ],
62491            &[
62492                    ShorthandId::All,
62493                    ShorthandId::Animation,
62494            ],
62495            &[
62496                    ShorthandId::All,
62497                    ShorthandId::Animation,
62498            ],
62499            &[
62500                    ShorthandId::All,
62501                    ShorthandId::Animation,
62502            ],
62503            &[
62504                    ShorthandId::All,
62505                    ShorthandId::Animation,
62506            ],
62507            &[
62508                    ShorthandId::All,
62509                    ShorthandId::Animation,
62510            ],
62511            &[
62512                    ShorthandId::All,
62513                    ShorthandId::Animation,
62514            ],
62515            &[
62516                    ShorthandId::All,
62517                    ShorthandId::Animation,
62518            ],
62519            &[
62520                    ShorthandId::All,
62521                    ShorthandId::Animation,
62522            ],
62523            &[
62524                    ShorthandId::All,
62525                    ShorthandId::Animation,
62526            ],
62527            &[
62528                    ShorthandId::All,
62529            ],
62530            &[
62531                    ShorthandId::All,
62532                    ShorthandId::Background,
62533            ],
62534            &[
62535                    ShorthandId::All,
62536                    ShorthandId::Background,
62537            ],
62538            &[
62539                    ShorthandId::All,
62540                    ShorthandId::Background,
62541            ],
62542            &[
62543                    ShorthandId::All,
62544                    ShorthandId::Background,
62545            ],
62546            &[
62547                    ShorthandId::All,
62548                    ShorthandId::Background,
62549                    ShorthandId::BackgroundPosition,
62550            ],
62551            &[
62552                    ShorthandId::All,
62553                    ShorthandId::Background,
62554                    ShorthandId::BackgroundPosition,
62555            ],
62556            &[
62557                    ShorthandId::All,
62558                    ShorthandId::Background,
62559            ],
62560            &[
62561                    ShorthandId::All,
62562                    ShorthandId::Background,
62563            ],
62564            &[
62565                    ShorthandId::All,
62566                    ShorthandId::Border,
62567                    ShorthandId::BorderImage,
62568            ],
62569            &[
62570                    ShorthandId::All,
62571                    ShorthandId::Border,
62572                    ShorthandId::BorderImage,
62573            ],
62574            &[
62575                    ShorthandId::All,
62576                    ShorthandId::Border,
62577                    ShorthandId::BorderImage,
62578            ],
62579            &[
62580                    ShorthandId::All,
62581            ],
62582            &[
62583                    ShorthandId::All,
62584            ],
62585            &[
62586                    ShorthandId::All,
62587            ],
62588            &[
62589                    ShorthandId::All,
62590            ],
62591            &[
62592                    ShorthandId::All,
62593            ],
62594            &[
62595                    ShorthandId::All,
62596            ],
62597            &[
62598                    ShorthandId::All,
62599                    ShorthandId::Columns,
62600            ],
62601            &[
62602                    ShorthandId::All,
62603            ],
62604            &[
62605                    ShorthandId::All,
62606            ],
62607            &[
62608                    ShorthandId::All,
62609            ],
62610            &[
62611                    ShorthandId::All,
62612            ],
62613            &[
62614                    ShorthandId::All,
62615            ],
62616            &[
62617                    ShorthandId::All,
62618            ],
62619            &[
62620                    ShorthandId::All,
62621                    ShorthandId::Flex,
62622            ],
62623            &[
62624                    ShorthandId::All,
62625                    ShorthandId::Font,
62626            ],
62627            &[
62628                    ShorthandId::All,
62629                    ShorthandId::Font,
62630            ],
62631            &[
62632                    ShorthandId::All,
62633            ],
62634            &[
62635                    ShorthandId::All,
62636                    ShorthandId::Grid,
62637                    ShorthandId::GridTemplate,
62638            ],
62639            &[
62640                    ShorthandId::All,
62641            ],
62642            &[
62643                    ShorthandId::All,
62644                    ShorthandId::Font,
62645            ],
62646            &[
62647                    ShorthandId::All,
62648            ],
62649            &[
62650                    ShorthandId::All,
62651            ],
62652            &[
62653                    ShorthandId::All,
62654            ],
62655            &[
62656                    ShorthandId::All,
62657            ],
62658            &[
62659                    ShorthandId::All,
62660            ],
62661            &[
62662                    ShorthandId::All,
62663            ],
62664            &[
62665                    ShorthandId::All,
62666            ],
62667            &[
62668                    ShorthandId::All,
62669            ],
62670            &[
62671                    ShorthandId::All,
62672            ],
62673            &[
62674                    ShorthandId::All,
62675            ],
62676            &[
62677                    ShorthandId::All,
62678            ],
62679            &[
62680                    ShorthandId::All,
62681                    ShorthandId::Transition,
62682            ],
62683            &[
62684                    ShorthandId::All,
62685                    ShorthandId::Transition,
62686            ],
62687            &[
62688                    ShorthandId::All,
62689                    ShorthandId::Transition,
62690            ],
62691            &[
62692                    ShorthandId::All,
62693                    ShorthandId::Transition,
62694            ],
62695            &[
62696                    ShorthandId::All,
62697                    ShorthandId::Transition,
62698            ],
62699            &[
62700                    ShorthandId::All,
62701            ],
62702            &[
62703                    ShorthandId::All,
62704            ],
62705            &[
62706                    ShorthandId::All,
62707            ],
62708            &[
62709                    ShorthandId::All,
62710            ],
62711            &[
62712                    ShorthandId::All,
62713            ],
62714            &[
62715                    ShorthandId::All,
62716            ],
62717            &[
62718            ],
62719            &[
62720                    ShorthandId::All,
62721            ],
62722            &[
62723                    ShorthandId::All,
62724            ],
62725            &[
62726                    ShorthandId::All,
62727                    ShorthandId::Grid,
62728                    ShorthandId::GridTemplate,
62729            ],
62730            &[
62731                    ShorthandId::All,
62732                    ShorthandId::Grid,
62733                    ShorthandId::GridTemplate,
62734            ],
62735            &[
62736                    ShorthandId::All,
62737                    ShorthandId::Border,
62738                    ShorthandId::BorderImage,
62739            ],
62740            &[
62741                    ShorthandId::All,
62742                    ShorthandId::ListStyle,
62743            ],
62744            &[
62745                    ShorthandId::All,
62746                    ShorthandId::Grid,
62747            ],
62748            &[
62749                    ShorthandId::All,
62750                    ShorthandId::Grid,
62751            ],
62752            &[
62753                    ShorthandId::All,
62754            ],
62755            &[
62756                    ShorthandId::All,
62757            ],
62758            &[
62759                    ShorthandId::All,
62760                    ShorthandId::Gap,
62761            ],
62762            &[
62763                    ShorthandId::All,
62764                    ShorthandId::Gap,
62765            ],
62766            &[
62767                    ShorthandId::All,
62768                    ShorthandId::GridArea,
62769                    ShorthandId::GridColumn,
62770            ],
62771            &[
62772                    ShorthandId::All,
62773                    ShorthandId::GridArea,
62774                    ShorthandId::GridColumn,
62775            ],
62776            &[
62777                    ShorthandId::All,
62778                    ShorthandId::GridArea,
62779                    ShorthandId::GridRow,
62780            ],
62781            &[
62782                    ShorthandId::All,
62783                    ShorthandId::GridArea,
62784                    ShorthandId::GridRow,
62785            ],
62786            &[
62787                    ShorthandId::All,
62788            ],
62789            &[
62790                    ShorthandId::All,
62791            ],
62792            &[
62793                    ShorthandId::All,
62794            ],
62795            &[
62796                    ShorthandId::All,
62797            ],
62798            &[
62799                    ShorthandId::All,
62800                    ShorthandId::BorderRadius,
62801            ],
62802            &[
62803                    ShorthandId::All,
62804                    ShorthandId::BorderRadius,
62805            ],
62806            &[
62807                    ShorthandId::All,
62808            ],
62809            &[
62810                    ShorthandId::All,
62811            ],
62812            &[
62813                    ShorthandId::All,
62814            ],
62815            &[
62816                    ShorthandId::All,
62817            ],
62818            &[
62819                    ShorthandId::All,
62820                    ShorthandId::BorderRadius,
62821            ],
62822            &[
62823                    ShorthandId::All,
62824                    ShorthandId::BorderRadius,
62825            ],
62826            &[
62827                    ShorthandId::All,
62828                    ShorthandId::Inset,
62829            ],
62830            &[
62831                    ShorthandId::All,
62832                    ShorthandId::InsetBlock,
62833            ],
62834            &[
62835                    ShorthandId::All,
62836                    ShorthandId::InsetBlock,
62837            ],
62838            &[
62839                    ShorthandId::All,
62840                    ShorthandId::InsetInline,
62841            ],
62842            &[
62843                    ShorthandId::All,
62844                    ShorthandId::InsetInline,
62845            ],
62846            &[
62847                    ShorthandId::All,
62848                    ShorthandId::Inset,
62849            ],
62850            &[
62851                    ShorthandId::All,
62852                    ShorthandId::Inset,
62853            ],
62854            &[
62855                    ShorthandId::All,
62856                    ShorthandId::Inset,
62857            ],
62858            &[
62859                    ShorthandId::All,
62860                    ShorthandId::MarginBlock,
62861            ],
62862            &[
62863                    ShorthandId::All,
62864                    ShorthandId::MarginBlock,
62865            ],
62866            &[
62867                    ShorthandId::All,
62868                    ShorthandId::Margin,
62869            ],
62870            &[
62871                    ShorthandId::All,
62872                    ShorthandId::MarginInline,
62873            ],
62874            &[
62875                    ShorthandId::All,
62876                    ShorthandId::MarginInline,
62877            ],
62878            &[
62879                    ShorthandId::All,
62880                    ShorthandId::Margin,
62881            ],
62882            &[
62883                    ShorthandId::All,
62884                    ShorthandId::Margin,
62885            ],
62886            &[
62887                    ShorthandId::All,
62888                    ShorthandId::Margin,
62889            ],
62890            &[
62891                    ShorthandId::All,
62892                    ShorthandId::PaddingBlock,
62893            ],
62894            &[
62895                    ShorthandId::All,
62896                    ShorthandId::PaddingBlock,
62897            ],
62898            &[
62899                    ShorthandId::All,
62900                    ShorthandId::Padding,
62901            ],
62902            &[
62903                    ShorthandId::All,
62904                    ShorthandId::PaddingInline,
62905            ],
62906            &[
62907                    ShorthandId::All,
62908                    ShorthandId::PaddingInline,
62909            ],
62910            &[
62911                    ShorthandId::All,
62912                    ShorthandId::Padding,
62913            ],
62914            &[
62915                    ShorthandId::All,
62916                    ShorthandId::Padding,
62917            ],
62918            &[
62919                    ShorthandId::All,
62920                    ShorthandId::Padding,
62921            ],
62922            &[
62923                    ShorthandId::All,
62924            ],
62925            &[
62926                    ShorthandId::All,
62927            ],
62928            &[
62929                    ShorthandId::All,
62930            ],
62931            &[
62932                    ShorthandId::All,
62933            ],
62934            &[
62935                    ShorthandId::All,
62936            ],
62937            &[
62938                    ShorthandId::All,
62939            ],
62940            &[
62941                    ShorthandId::All,
62942            ],
62943            &[
62944                    ShorthandId::All,
62945            ],
62946            &[
62947                    ShorthandId::All,
62948                    ShorthandId::BorderBlock,
62949                    ShorthandId::BorderBlockEnd,
62950                    ShorthandId::BorderBlockWidth,
62951            ],
62952            &[
62953                    ShorthandId::All,
62954                    ShorthandId::BorderBlock,
62955                    ShorthandId::BorderBlockStart,
62956                    ShorthandId::BorderBlockWidth,
62957            ],
62958            &[
62959                    ShorthandId::All,
62960                    ShorthandId::Border,
62961                    ShorthandId::BorderWidth,
62962                    ShorthandId::BorderBottom,
62963            ],
62964            &[
62965                    ShorthandId::All,
62966                    ShorthandId::BorderInline,
62967                    ShorthandId::BorderInlineEnd,
62968                    ShorthandId::BorderInlineWidth,
62969            ],
62970            &[
62971                    ShorthandId::All,
62972                    ShorthandId::BorderInline,
62973                    ShorthandId::BorderInlineStart,
62974                    ShorthandId::BorderInlineWidth,
62975            ],
62976            &[
62977                    ShorthandId::All,
62978                    ShorthandId::Border,
62979                    ShorthandId::BorderWidth,
62980                    ShorthandId::BorderLeft,
62981            ],
62982            &[
62983                    ShorthandId::All,
62984                    ShorthandId::Border,
62985                    ShorthandId::BorderWidth,
62986                    ShorthandId::BorderRight,
62987            ],
62988            &[
62989                    ShorthandId::All,
62990                    ShorthandId::Border,
62991                    ShorthandId::BorderWidth,
62992                    ShorthandId::BorderTop,
62993            ],
62994            &[
62995                    ShorthandId::All,
62996                    ShorthandId::Outline,
62997            ],
62998            &[
62999                    ShorthandId::All,
63000                    ShorthandId::Background,
63001            ],
63002            &[
63003                    ShorthandId::All,
63004                    ShorthandId::BorderBlock,
63005                    ShorthandId::BorderBlockEnd,
63006                    ShorthandId::BorderBlockColor,
63007            ],
63008            &[
63009                    ShorthandId::All,
63010                    ShorthandId::BorderBlock,
63011                    ShorthandId::BorderBlockStart,
63012                    ShorthandId::BorderBlockColor,
63013            ],
63014            &[
63015                    ShorthandId::All,
63016                    ShorthandId::Border,
63017                    ShorthandId::BorderColor,
63018                    ShorthandId::BorderBottom,
63019            ],
63020            &[
63021                    ShorthandId::All,
63022                    ShorthandId::BorderInline,
63023                    ShorthandId::BorderInlineEnd,
63024                    ShorthandId::BorderInlineColor,
63025            ],
63026            &[
63027                    ShorthandId::All,
63028                    ShorthandId::BorderInline,
63029                    ShorthandId::BorderInlineStart,
63030                    ShorthandId::BorderInlineColor,
63031            ],
63032            &[
63033                    ShorthandId::All,
63034                    ShorthandId::Border,
63035                    ShorthandId::BorderColor,
63036                    ShorthandId::BorderLeft,
63037            ],
63038            &[
63039                    ShorthandId::All,
63040                    ShorthandId::Border,
63041                    ShorthandId::BorderColor,
63042                    ShorthandId::BorderRight,
63043            ],
63044            &[
63045                    ShorthandId::All,
63046                    ShorthandId::Border,
63047                    ShorthandId::BorderColor,
63048                    ShorthandId::BorderTop,
63049            ],
63050            &[
63051                    ShorthandId::All,
63052                    ShorthandId::Outline,
63053            ],
63054            &[
63055                    ShorthandId::All,
63056                    ShorthandId::TextDecoration,
63057            ],
63058        ];
63059
63060        NonCustomPropertyIterator {
63061            filter: NonCustomPropertyId::from(self).enabled_for_all_content(),
63062            iter: MAP[self as usize].iter(),
63063        }
63064    }
63065
63066    pub(super) fn parse_value<'i, 't>(
63067        self,
63068        context: &ParserContext,
63069        input: &mut Parser<'i, 't>,
63070    ) -> Result<PropertyDeclaration, ParseError<'i>> {
63071        type ParsePropertyFn = for<'i, 't> fn(
63072            context: &ParserContext,
63073            input: &mut Parser<'i, 't>,
63074        ) -> Result<PropertyDeclaration, ParseError<'i>>;
63075        static PARSE_PROPERTY: [ParsePropertyFn; 220] = [
63076            longhands::align_content::parse_declared,
63077            longhands::align_items::parse_declared,
63078            longhands::align_self::parse_declared,
63079            longhands::aspect_ratio::parse_declared,
63080            longhands::backface_visibility::parse_declared,
63081            longhands::baseline_source::parse_declared,
63082            longhands::border_collapse::parse_declared,
63083            longhands::border_image_repeat::parse_declared,
63084            longhands::box_sizing::parse_declared,
63085            longhands::caption_side::parse_declared,
63086            longhands::clear::parse_declared,
63087            longhands::column_count::parse_declared,
63088            longhands::column_span::parse_declared,
63089            longhands::contain::parse_declared,
63090            longhands::container_type::parse_declared,
63091            longhands::direction::parse_declared,
63092            longhands::display::parse_declared,
63093            longhands::empty_cells::parse_declared,
63094            longhands::flex_direction::parse_declared,
63095            longhands::flex_wrap::parse_declared,
63096            longhands::float::parse_declared,
63097            longhands::font_language_override::parse_declared,
63098            longhands::font_stretch::parse_declared,
63099            longhands::font_style::parse_declared,
63100            longhands::font_variant_caps::parse_declared,
63101            longhands::font_weight::parse_declared,
63102            longhands::grid_auto_flow::parse_declared,
63103            longhands::image_rendering::parse_declared,
63104            longhands::isolation::parse_declared,
63105            longhands::justify_content::parse_declared,
63106            longhands::justify_items::parse_declared,
63107            longhands::justify_self::parse_declared,
63108            longhands::list_style_position::parse_declared,
63109            longhands::list_style_type::parse_declared,
63110            longhands::mix_blend_mode::parse_declared,
63111            longhands::object_fit::parse_declared,
63112            longhands::opacity::parse_declared,
63113            longhands::order::parse_declared,
63114            longhands::outline_style::parse_declared,
63115            longhands::overflow_wrap::parse_declared,
63116            longhands::pointer_events::parse_declared,
63117            longhands::position::parse_declared,
63118            longhands::_servo_overflow_clip_box::parse_declared,
63119            longhands::_servo_top_layer::parse_declared,
63120            longhands::table_layout::parse_declared,
63121            longhands::text_align::parse_declared,
63122            longhands::text_align_last::parse_declared,
63123            longhands::text_decoration_line::parse_declared,
63124            longhands::text_decoration_style::parse_declared,
63125            longhands::text_justify::parse_declared,
63126            longhands::text_rendering::parse_declared,
63127            longhands::text_transform::parse_declared,
63128            longhands::text_wrap_mode::parse_declared,
63129            longhands::transform_style::parse_declared,
63130            longhands::unicode_bidi::parse_declared,
63131            longhands::visibility::parse_declared,
63132            longhands::white_space_collapse::parse_declared,
63133            longhands::word_break::parse_declared,
63134            longhands::writing_mode::parse_declared,
63135            longhands::z_index::parse_declared,
63136            longhands::zoom::parse_declared,
63137            longhands::flex_grow::parse_declared,
63138            longhands::flex_shrink::parse_declared,
63139            longhands::overflow_block::parse_declared,
63140            longhands::overflow_inline::parse_declared,
63141            longhands::overflow_x::parse_declared,
63142            longhands::overflow_y::parse_declared,
63143            longhands::border_block_end_style::parse_declared,
63144            longhands::border_block_start_style::parse_declared,
63145            longhands::border_bottom_style::parse_declared,
63146            longhands::border_inline_end_style::parse_declared,
63147            longhands::border_inline_start_style::parse_declared,
63148            longhands::border_left_style::parse_declared,
63149            longhands::border_right_style::parse_declared,
63150            longhands::border_top_style::parse_declared,
63151            longhands::animation_composition::parse_declared,
63152            longhands::animation_delay::parse_declared,
63153            longhands::animation_direction::parse_declared,
63154            longhands::animation_duration::parse_declared,
63155            longhands::animation_fill_mode::parse_declared,
63156            longhands::animation_iteration_count::parse_declared,
63157            longhands::animation_name::parse_declared,
63158            longhands::animation_play_state::parse_declared,
63159            longhands::animation_timeline::parse_declared,
63160            longhands::animation_timing_function::parse_declared,
63161            longhands::backdrop_filter::parse_declared,
63162            longhands::background_attachment::parse_declared,
63163            longhands::background_clip::parse_declared,
63164            longhands::background_image::parse_declared,
63165            longhands::background_origin::parse_declared,
63166            longhands::background_position_x::parse_declared,
63167            longhands::background_position_y::parse_declared,
63168            longhands::background_repeat::parse_declared,
63169            longhands::background_size::parse_declared,
63170            longhands::border_image_outset::parse_declared,
63171            longhands::border_image_slice::parse_declared,
63172            longhands::border_image_width::parse_declared,
63173            longhands::border_spacing::parse_declared,
63174            longhands::box_shadow::parse_declared,
63175            longhands::clip::parse_declared,
63176            longhands::clip_path::parse_declared,
63177            longhands::color::parse_declared,
63178            longhands::color_scheme::parse_declared,
63179            longhands::column_width::parse_declared,
63180            longhands::container_name::parse_declared,
63181            longhands::content::parse_declared,
63182            longhands::counter_increment::parse_declared,
63183            longhands::counter_reset::parse_declared,
63184            longhands::cursor::parse_declared,
63185            longhands::filter::parse_declared,
63186            longhands::flex_basis::parse_declared,
63187            longhands::font_family::parse_declared,
63188            longhands::font_size::parse_declared,
63189            longhands::font_variation_settings::parse_declared,
63190            longhands::grid_template_areas::parse_declared,
63191            longhands::letter_spacing::parse_declared,
63192            longhands::line_height::parse_declared,
63193            longhands::mask_image::parse_declared,
63194            longhands::offset_path::parse_declared,
63195            longhands::perspective::parse_declared,
63196            longhands::quotes::parse_declared,
63197            longhands::rotate::parse_declared,
63198            longhands::scale::parse_declared,
63199            longhands::text_indent::parse_declared,
63200            longhands::text_overflow::parse_declared,
63201            longhands::text_shadow::parse_declared,
63202            longhands::transform::parse_declared,
63203            longhands::transform_origin::parse_declared,
63204            longhands::transition_behavior::parse_declared,
63205            longhands::transition_delay::parse_declared,
63206            longhands::transition_duration::parse_declared,
63207            longhands::transition_property::parse_declared,
63208            longhands::transition_timing_function::parse_declared,
63209            longhands::translate::parse_declared,
63210            longhands::vertical_align::parse_declared,
63211            longhands::view_transition_class::parse_declared,
63212            longhands::view_transition_name::parse_declared,
63213            longhands::will_change::parse_declared,
63214            longhands::word_spacing::parse_declared,
63215            longhands::_x_lang::parse_declared,
63216            longhands::object_position::parse_declared,
63217            longhands::perspective_origin::parse_declared,
63218            longhands::grid_template_columns::parse_declared,
63219            longhands::grid_template_rows::parse_declared,
63220            longhands::border_image_source::parse_declared,
63221            longhands::list_style_image::parse_declared,
63222            longhands::grid_auto_columns::parse_declared,
63223            longhands::grid_auto_rows::parse_declared,
63224            longhands::outline_offset::parse_declared,
63225            longhands::overflow_clip_margin::parse_declared,
63226            longhands::column_gap::parse_declared,
63227            longhands::row_gap::parse_declared,
63228            longhands::grid_column_end::parse_declared,
63229            longhands::grid_column_start::parse_declared,
63230            longhands::grid_row_end::parse_declared,
63231            longhands::grid_row_start::parse_declared,
63232            longhands::max_block_size::parse_declared,
63233            longhands::max_height::parse_declared,
63234            longhands::max_inline_size::parse_declared,
63235            longhands::max_width::parse_declared,
63236            longhands::border_bottom_left_radius::parse_declared,
63237            longhands::border_bottom_right_radius::parse_declared,
63238            longhands::border_end_end_radius::parse_declared,
63239            longhands::border_end_start_radius::parse_declared,
63240            longhands::border_start_end_radius::parse_declared,
63241            longhands::border_start_start_radius::parse_declared,
63242            longhands::border_top_left_radius::parse_declared,
63243            longhands::border_top_right_radius::parse_declared,
63244            longhands::bottom::parse_declared,
63245            longhands::inset_block_end::parse_declared,
63246            longhands::inset_block_start::parse_declared,
63247            longhands::inset_inline_end::parse_declared,
63248            longhands::inset_inline_start::parse_declared,
63249            longhands::left::parse_declared,
63250            longhands::right::parse_declared,
63251            longhands::top::parse_declared,
63252            longhands::margin_block_end::parse_declared,
63253            longhands::margin_block_start::parse_declared,
63254            longhands::margin_bottom::parse_declared,
63255            longhands::margin_inline_end::parse_declared,
63256            longhands::margin_inline_start::parse_declared,
63257            longhands::margin_left::parse_declared,
63258            longhands::margin_right::parse_declared,
63259            longhands::margin_top::parse_declared,
63260            longhands::padding_block_end::parse_declared,
63261            longhands::padding_block_start::parse_declared,
63262            longhands::padding_bottom::parse_declared,
63263            longhands::padding_inline_end::parse_declared,
63264            longhands::padding_inline_start::parse_declared,
63265            longhands::padding_left::parse_declared,
63266            longhands::padding_right::parse_declared,
63267            longhands::padding_top::parse_declared,
63268            longhands::block_size::parse_declared,
63269            longhands::height::parse_declared,
63270            longhands::inline_size::parse_declared,
63271            longhands::min_block_size::parse_declared,
63272            longhands::min_height::parse_declared,
63273            longhands::min_inline_size::parse_declared,
63274            longhands::min_width::parse_declared,
63275            longhands::width::parse_declared,
63276            longhands::border_block_end_width::parse_declared,
63277            longhands::border_block_start_width::parse_declared,
63278            longhands::border_bottom_width::parse_declared,
63279            longhands::border_inline_end_width::parse_declared,
63280            longhands::border_inline_start_width::parse_declared,
63281            longhands::border_left_width::parse_declared,
63282            longhands::border_right_width::parse_declared,
63283            longhands::border_top_width::parse_declared,
63284            longhands::outline_width::parse_declared,
63285            longhands::background_color::parse_declared,
63286            longhands::border_block_end_color::parse_declared,
63287            longhands::border_block_start_color::parse_declared,
63288            longhands::border_bottom_color::parse_declared,
63289            longhands::border_inline_end_color::parse_declared,
63290            longhands::border_inline_start_color::parse_declared,
63291            longhands::border_left_color::parse_declared,
63292            longhands::border_right_color::parse_declared,
63293            longhands::border_top_color::parse_declared,
63294            longhands::outline_color::parse_declared,
63295            longhands::text_decoration_color::parse_declared,
63296        ];
63297        (PARSE_PROPERTY[self as usize])(context, input)
63298    }
63299
63300    /// Return the relevant data to map a particular logical property into physical.
63301    fn logical_mapping_data(self) -> Option<&'static LogicalMappingData> {
63302        const LOGICAL_MAPPING_DATA: [Option<LogicalMappingData>; 220] = [
63303            None,
63304            None,
63305            None,
63306            None,
63307            None,
63308            None,
63309            None,
63310            None,
63311            None,
63312            None,
63313            None,
63314            None,
63315            None,
63316            None,
63317            None,
63318            None,
63319            None,
63320            None,
63321            None,
63322            None,
63323            None,
63324            None,
63325            None,
63326            None,
63327            None,
63328            None,
63329            None,
63330            None,
63331            None,
63332            None,
63333            None,
63334            None,
63335            None,
63336            None,
63337            None,
63338            None,
63339            None,
63340            None,
63341            None,
63342            None,
63343            None,
63344            None,
63345            None,
63346            None,
63347            None,
63348            None,
63349            None,
63350            None,
63351            None,
63352            None,
63353            None,
63354            None,
63355            None,
63356            None,
63357            None,
63358            None,
63359            None,
63360            None,
63361            None,
63362            None,
63363            None,
63364            None,
63365            None,
63366            Some(LogicalMappingData {
63367                group: LogicalGroupId::Overflow,
63368                kind: LogicalMappingKind::Axis(LogicalAxis::Block)
63369            }),
63370            Some(LogicalMappingData {
63371                group: LogicalGroupId::Overflow,
63372                kind: LogicalMappingKind::Axis(LogicalAxis::Inline)
63373            }),
63374            None,
63375            None,
63376            Some(LogicalMappingData {
63377                group: LogicalGroupId::BorderStyle,
63378                kind: LogicalMappingKind::Side(LogicalSide::BlockEnd)
63379            }),
63380            Some(LogicalMappingData {
63381                group: LogicalGroupId::BorderStyle,
63382                kind: LogicalMappingKind::Side(LogicalSide::BlockStart)
63383            }),
63384            None,
63385            Some(LogicalMappingData {
63386                group: LogicalGroupId::BorderStyle,
63387                kind: LogicalMappingKind::Side(LogicalSide::InlineEnd)
63388            }),
63389            Some(LogicalMappingData {
63390                group: LogicalGroupId::BorderStyle,
63391                kind: LogicalMappingKind::Side(LogicalSide::InlineStart)
63392            }),
63393            None,
63394            None,
63395            None,
63396            None,
63397            None,
63398            None,
63399            None,
63400            None,
63401            None,
63402            None,
63403            None,
63404            None,
63405            None,
63406            None,
63407            None,
63408            None,
63409            None,
63410            None,
63411            None,
63412            None,
63413            None,
63414            None,
63415            None,
63416            None,
63417            None,
63418            None,
63419            None,
63420            None,
63421            None,
63422            None,
63423            None,
63424            None,
63425            None,
63426            None,
63427            None,
63428            None,
63429            None,
63430            None,
63431            None,
63432            None,
63433            None,
63434            None,
63435            None,
63436            None,
63437            None,
63438            None,
63439            None,
63440            None,
63441            None,
63442            None,
63443            None,
63444            None,
63445            None,
63446            None,
63447            None,
63448            None,
63449            None,
63450            None,
63451            None,
63452            None,
63453            None,
63454            None,
63455            None,
63456            None,
63457            None,
63458            None,
63459            None,
63460            None,
63461            None,
63462            None,
63463            None,
63464            None,
63465            None,
63466            None,
63467            None,
63468            None,
63469            None,
63470            None,
63471            None,
63472            None,
63473            None,
63474            None,
63475            None,
63476            None,
63477            Some(LogicalMappingData {
63478                group: LogicalGroupId::MaxSize,
63479                kind: LogicalMappingKind::Axis(LogicalAxis::Block)
63480            }),
63481            None,
63482            Some(LogicalMappingData {
63483                group: LogicalGroupId::MaxSize,
63484                kind: LogicalMappingKind::Axis(LogicalAxis::Inline)
63485            }),
63486            None,
63487            None,
63488            None,
63489            Some(LogicalMappingData {
63490                group: LogicalGroupId::BorderRadius,
63491                kind: LogicalMappingKind::Corner(LogicalCorner::EndEnd)
63492            }),
63493            Some(LogicalMappingData {
63494                group: LogicalGroupId::BorderRadius,
63495                kind: LogicalMappingKind::Corner(LogicalCorner::EndStart)
63496            }),
63497            Some(LogicalMappingData {
63498                group: LogicalGroupId::BorderRadius,
63499                kind: LogicalMappingKind::Corner(LogicalCorner::StartEnd)
63500            }),
63501            Some(LogicalMappingData {
63502                group: LogicalGroupId::BorderRadius,
63503                kind: LogicalMappingKind::Corner(LogicalCorner::StartStart)
63504            }),
63505            None,
63506            None,
63507            None,
63508            Some(LogicalMappingData {
63509                group: LogicalGroupId::Inset,
63510                kind: LogicalMappingKind::Side(LogicalSide::BlockEnd)
63511            }),
63512            Some(LogicalMappingData {
63513                group: LogicalGroupId::Inset,
63514                kind: LogicalMappingKind::Side(LogicalSide::BlockStart)
63515            }),
63516            Some(LogicalMappingData {
63517                group: LogicalGroupId::Inset,
63518                kind: LogicalMappingKind::Side(LogicalSide::InlineEnd)
63519            }),
63520            Some(LogicalMappingData {
63521                group: LogicalGroupId::Inset,
63522                kind: LogicalMappingKind::Side(LogicalSide::InlineStart)
63523            }),
63524            None,
63525            None,
63526            None,
63527            Some(LogicalMappingData {
63528                group: LogicalGroupId::Margin,
63529                kind: LogicalMappingKind::Side(LogicalSide::BlockEnd)
63530            }),
63531            Some(LogicalMappingData {
63532                group: LogicalGroupId::Margin,
63533                kind: LogicalMappingKind::Side(LogicalSide::BlockStart)
63534            }),
63535            None,
63536            Some(LogicalMappingData {
63537                group: LogicalGroupId::Margin,
63538                kind: LogicalMappingKind::Side(LogicalSide::InlineEnd)
63539            }),
63540            Some(LogicalMappingData {
63541                group: LogicalGroupId::Margin,
63542                kind: LogicalMappingKind::Side(LogicalSide::InlineStart)
63543            }),
63544            None,
63545            None,
63546            None,
63547            Some(LogicalMappingData {
63548                group: LogicalGroupId::Padding,
63549                kind: LogicalMappingKind::Side(LogicalSide::BlockEnd)
63550            }),
63551            Some(LogicalMappingData {
63552                group: LogicalGroupId::Padding,
63553                kind: LogicalMappingKind::Side(LogicalSide::BlockStart)
63554            }),
63555            None,
63556            Some(LogicalMappingData {
63557                group: LogicalGroupId::Padding,
63558                kind: LogicalMappingKind::Side(LogicalSide::InlineEnd)
63559            }),
63560            Some(LogicalMappingData {
63561                group: LogicalGroupId::Padding,
63562                kind: LogicalMappingKind::Side(LogicalSide::InlineStart)
63563            }),
63564            None,
63565            None,
63566            None,
63567            Some(LogicalMappingData {
63568                group: LogicalGroupId::Size,
63569                kind: LogicalMappingKind::Axis(LogicalAxis::Block)
63570            }),
63571            None,
63572            Some(LogicalMappingData {
63573                group: LogicalGroupId::Size,
63574                kind: LogicalMappingKind::Axis(LogicalAxis::Inline)
63575            }),
63576            Some(LogicalMappingData {
63577                group: LogicalGroupId::MinSize,
63578                kind: LogicalMappingKind::Axis(LogicalAxis::Block)
63579            }),
63580            None,
63581            Some(LogicalMappingData {
63582                group: LogicalGroupId::MinSize,
63583                kind: LogicalMappingKind::Axis(LogicalAxis::Inline)
63584            }),
63585            None,
63586            None,
63587            Some(LogicalMappingData {
63588                group: LogicalGroupId::BorderWidth,
63589                kind: LogicalMappingKind::Side(LogicalSide::BlockEnd)
63590            }),
63591            Some(LogicalMappingData {
63592                group: LogicalGroupId::BorderWidth,
63593                kind: LogicalMappingKind::Side(LogicalSide::BlockStart)
63594            }),
63595            None,
63596            Some(LogicalMappingData {
63597                group: LogicalGroupId::BorderWidth,
63598                kind: LogicalMappingKind::Side(LogicalSide::InlineEnd)
63599            }),
63600            Some(LogicalMappingData {
63601                group: LogicalGroupId::BorderWidth,
63602                kind: LogicalMappingKind::Side(LogicalSide::InlineStart)
63603            }),
63604            None,
63605            None,
63606            None,
63607            None,
63608            None,
63609            Some(LogicalMappingData {
63610                group: LogicalGroupId::BorderColor,
63611                kind: LogicalMappingKind::Side(LogicalSide::BlockEnd)
63612            }),
63613            Some(LogicalMappingData {
63614                group: LogicalGroupId::BorderColor,
63615                kind: LogicalMappingKind::Side(LogicalSide::BlockStart)
63616            }),
63617            None,
63618            Some(LogicalMappingData {
63619                group: LogicalGroupId::BorderColor,
63620                kind: LogicalMappingKind::Side(LogicalSide::InlineEnd)
63621            }),
63622            Some(LogicalMappingData {
63623                group: LogicalGroupId::BorderColor,
63624                kind: LogicalMappingKind::Side(LogicalSide::InlineStart)
63625            }),
63626            None,
63627            None,
63628            None,
63629            None,
63630            None,
63631        ];
63632        LOGICAL_MAPPING_DATA[self as usize].as_ref()
63633    }
63634
63635    /// If this is a logical property, return the corresponding physical one in the given
63636    /// writing mode. Otherwise, return unchanged.
63637    #[inline]
63638    pub fn to_physical(self, wm: WritingMode) -> Self {
63639        let Some(data) = self.logical_mapping_data() else { return self };
63640        data.to_physical(wm)
63641    }
63642
63643    /// Return the logical group of this longhand property.
63644    pub fn logical_group(self) -> Option<LogicalGroupId> {
63645        const LOGICAL_GROUP_IDS: [Option<LogicalGroupId>; 220] = [
63646            None,
63647            None,
63648            None,
63649            None,
63650            None,
63651            None,
63652            None,
63653            None,
63654            None,
63655            None,
63656            None,
63657            None,
63658            None,
63659            None,
63660            None,
63661            None,
63662            None,
63663            None,
63664            None,
63665            None,
63666            None,
63667            None,
63668            None,
63669            None,
63670            None,
63671            None,
63672            None,
63673            None,
63674            None,
63675            None,
63676            None,
63677            None,
63678            None,
63679            None,
63680            None,
63681            None,
63682            None,
63683            None,
63684            None,
63685            None,
63686            None,
63687            None,
63688            None,
63689            None,
63690            None,
63691            None,
63692            None,
63693            None,
63694            None,
63695            None,
63696            None,
63697            None,
63698            None,
63699            None,
63700            None,
63701            None,
63702            None,
63703            None,
63704            None,
63705            None,
63706            None,
63707            None,
63708            None,
63709            Some(LogicalGroupId::Overflow),
63710            Some(LogicalGroupId::Overflow),
63711            Some(LogicalGroupId::Overflow),
63712            Some(LogicalGroupId::Overflow),
63713            Some(LogicalGroupId::BorderStyle),
63714            Some(LogicalGroupId::BorderStyle),
63715            Some(LogicalGroupId::BorderStyle),
63716            Some(LogicalGroupId::BorderStyle),
63717            Some(LogicalGroupId::BorderStyle),
63718            Some(LogicalGroupId::BorderStyle),
63719            Some(LogicalGroupId::BorderStyle),
63720            Some(LogicalGroupId::BorderStyle),
63721            None,
63722            None,
63723            None,
63724            None,
63725            None,
63726            None,
63727            None,
63728            None,
63729            None,
63730            None,
63731            None,
63732            None,
63733            None,
63734            None,
63735            None,
63736            None,
63737            None,
63738            None,
63739            None,
63740            None,
63741            None,
63742            None,
63743            None,
63744            None,
63745            None,
63746            None,
63747            None,
63748            None,
63749            None,
63750            None,
63751            None,
63752            None,
63753            None,
63754            None,
63755            None,
63756            None,
63757            None,
63758            None,
63759            None,
63760            None,
63761            None,
63762            None,
63763            None,
63764            None,
63765            None,
63766            None,
63767            None,
63768            None,
63769            None,
63770            None,
63771            None,
63772            None,
63773            None,
63774            None,
63775            None,
63776            None,
63777            None,
63778            None,
63779            None,
63780            None,
63781            None,
63782            None,
63783            None,
63784            None,
63785            None,
63786            None,
63787            None,
63788            None,
63789            None,
63790            None,
63791            None,
63792            None,
63793            None,
63794            None,
63795            None,
63796            None,
63797            None,
63798            None,
63799            None,
63800            None,
63801            None,
63802            Some(LogicalGroupId::MaxSize),
63803            Some(LogicalGroupId::MaxSize),
63804            Some(LogicalGroupId::MaxSize),
63805            Some(LogicalGroupId::MaxSize),
63806            Some(LogicalGroupId::BorderRadius),
63807            Some(LogicalGroupId::BorderRadius),
63808            Some(LogicalGroupId::BorderRadius),
63809            Some(LogicalGroupId::BorderRadius),
63810            Some(LogicalGroupId::BorderRadius),
63811            Some(LogicalGroupId::BorderRadius),
63812            Some(LogicalGroupId::BorderRadius),
63813            Some(LogicalGroupId::BorderRadius),
63814            Some(LogicalGroupId::Inset),
63815            Some(LogicalGroupId::Inset),
63816            Some(LogicalGroupId::Inset),
63817            Some(LogicalGroupId::Inset),
63818            Some(LogicalGroupId::Inset),
63819            Some(LogicalGroupId::Inset),
63820            Some(LogicalGroupId::Inset),
63821            Some(LogicalGroupId::Inset),
63822            Some(LogicalGroupId::Margin),
63823            Some(LogicalGroupId::Margin),
63824            Some(LogicalGroupId::Margin),
63825            Some(LogicalGroupId::Margin),
63826            Some(LogicalGroupId::Margin),
63827            Some(LogicalGroupId::Margin),
63828            Some(LogicalGroupId::Margin),
63829            Some(LogicalGroupId::Margin),
63830            Some(LogicalGroupId::Padding),
63831            Some(LogicalGroupId::Padding),
63832            Some(LogicalGroupId::Padding),
63833            Some(LogicalGroupId::Padding),
63834            Some(LogicalGroupId::Padding),
63835            Some(LogicalGroupId::Padding),
63836            Some(LogicalGroupId::Padding),
63837            Some(LogicalGroupId::Padding),
63838            Some(LogicalGroupId::Size),
63839            Some(LogicalGroupId::Size),
63840            Some(LogicalGroupId::Size),
63841            Some(LogicalGroupId::MinSize),
63842            Some(LogicalGroupId::MinSize),
63843            Some(LogicalGroupId::MinSize),
63844            Some(LogicalGroupId::MinSize),
63845            Some(LogicalGroupId::Size),
63846            Some(LogicalGroupId::BorderWidth),
63847            Some(LogicalGroupId::BorderWidth),
63848            Some(LogicalGroupId::BorderWidth),
63849            Some(LogicalGroupId::BorderWidth),
63850            Some(LogicalGroupId::BorderWidth),
63851            Some(LogicalGroupId::BorderWidth),
63852            Some(LogicalGroupId::BorderWidth),
63853            Some(LogicalGroupId::BorderWidth),
63854            None,
63855            None,
63856            Some(LogicalGroupId::BorderColor),
63857            Some(LogicalGroupId::BorderColor),
63858            Some(LogicalGroupId::BorderColor),
63859            Some(LogicalGroupId::BorderColor),
63860            Some(LogicalGroupId::BorderColor),
63861            Some(LogicalGroupId::BorderColor),
63862            Some(LogicalGroupId::BorderColor),
63863            Some(LogicalGroupId::BorderColor),
63864            None,
63865            None,
63866        ];
63867        LOGICAL_GROUP_IDS[self as usize]
63868    }
63869
63870    /// Returns PropertyFlags for given longhand property.
63871    #[inline(always)]
63872    pub fn flags(self) -> PropertyFlags {
63873        const FLAGS: [PropertyFlags; 220] = [
63874                PropertyFlags::empty()
63875                    .union(PropertyFlags::AFFECTS_LAYOUT)
63876                ,
63877                PropertyFlags::empty()
63878                    .union(PropertyFlags::AFFECTS_LAYOUT)
63879                ,
63880                PropertyFlags::empty()
63881                    .union(PropertyFlags::AFFECTS_LAYOUT)
63882                ,
63883                PropertyFlags::empty()
63884                    .union(PropertyFlags::AFFECTS_LAYOUT)
63885                ,
63886                PropertyFlags::empty()
63887                    .union(PropertyFlags::AFFECTS_PAINT)
63888                ,
63889                PropertyFlags::empty()
63890                    .union(PropertyFlags::AFFECTS_LAYOUT)
63891                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
63892                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
63893                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
63894                ,
63895                PropertyFlags::empty()
63896                    .union(PropertyFlags::AFFECTS_LAYOUT)
63897                ,
63898                PropertyFlags::empty()
63899                    .union(PropertyFlags::AFFECTS_PAINT)
63900                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
63901                ,
63902                PropertyFlags::empty()
63903                    .union(PropertyFlags::AFFECTS_LAYOUT)
63904                ,
63905                PropertyFlags::empty()
63906                    .union(PropertyFlags::AFFECTS_LAYOUT)
63907                ,
63908                PropertyFlags::empty()
63909                    .union(PropertyFlags::AFFECTS_LAYOUT)
63910                ,
63911                PropertyFlags::empty()
63912                    .union(PropertyFlags::AFFECTS_LAYOUT)
63913                ,
63914                PropertyFlags::empty()
63915                    .union(PropertyFlags::AFFECTS_LAYOUT)
63916                ,
63917                PropertyFlags::empty()
63918                    .union(PropertyFlags::AFFECTS_LAYOUT)
63919                ,
63920                PropertyFlags::empty()
63921                    .union(PropertyFlags::AFFECTS_LAYOUT)
63922                ,
63923                PropertyFlags::empty()
63924                    .union(PropertyFlags::AFFECTS_LAYOUT)
63925                    .union(PropertyFlags::APPLIES_TO_MARKER)
63926                ,
63927                PropertyFlags::empty()
63928                    .union(PropertyFlags::AFFECTS_LAYOUT)
63929                ,
63930                PropertyFlags::empty()
63931                    .union(PropertyFlags::AFFECTS_PAINT)
63932                ,
63933                PropertyFlags::empty()
63934                    .union(PropertyFlags::AFFECTS_LAYOUT)
63935                ,
63936                PropertyFlags::empty()
63937                    .union(PropertyFlags::AFFECTS_LAYOUT)
63938                ,
63939                PropertyFlags::empty()
63940                    .union(PropertyFlags::AFFECTS_LAYOUT)
63941                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
63942                ,
63943                PropertyFlags::empty()
63944                    .union(PropertyFlags::AFFECTS_LAYOUT)
63945                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
63946                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
63947                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
63948                    .union(PropertyFlags::APPLIES_TO_MARKER)
63949                ,
63950                PropertyFlags::empty()
63951                    .union(PropertyFlags::AFFECTS_LAYOUT)
63952                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
63953                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
63954                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
63955                    .union(PropertyFlags::APPLIES_TO_MARKER)
63956                    .union(PropertyFlags::APPLIES_TO_CUE)
63957                ,
63958                PropertyFlags::empty()
63959                    .union(PropertyFlags::AFFECTS_LAYOUT)
63960                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
63961                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
63962                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
63963                    .union(PropertyFlags::APPLIES_TO_MARKER)
63964                    .union(PropertyFlags::APPLIES_TO_CUE)
63965                ,
63966                PropertyFlags::empty()
63967                    .union(PropertyFlags::AFFECTS_LAYOUT)
63968                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
63969                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
63970                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
63971                    .union(PropertyFlags::APPLIES_TO_MARKER)
63972                    .union(PropertyFlags::APPLIES_TO_CUE)
63973                ,
63974                PropertyFlags::empty()
63975                    .union(PropertyFlags::AFFECTS_LAYOUT)
63976                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
63977                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
63978                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
63979                    .union(PropertyFlags::APPLIES_TO_MARKER)
63980                    .union(PropertyFlags::APPLIES_TO_CUE)
63981                ,
63982                PropertyFlags::empty()
63983                    .union(PropertyFlags::AFFECTS_LAYOUT)
63984                ,
63985                PropertyFlags::empty()
63986                    .union(PropertyFlags::AFFECTS_PAINT)
63987                ,
63988                PropertyFlags::empty()
63989                    .union(PropertyFlags::AFFECTS_PAINT)
63990                ,
63991                PropertyFlags::empty()
63992                    .union(PropertyFlags::AFFECTS_LAYOUT)
63993                ,
63994                PropertyFlags::empty()
63995                    .union(PropertyFlags::AFFECTS_LAYOUT)
63996                ,
63997                PropertyFlags::empty()
63998                    .union(PropertyFlags::AFFECTS_LAYOUT)
63999                ,
64000                PropertyFlags::empty()
64001                    .union(PropertyFlags::AFFECTS_LAYOUT)
64002                ,
64003                PropertyFlags::empty()
64004                    .union(PropertyFlags::AFFECTS_LAYOUT)
64005                ,
64006                PropertyFlags::empty()
64007                    .union(PropertyFlags::AFFECTS_PAINT)
64008                ,
64009                PropertyFlags::empty()
64010                    .union(PropertyFlags::AFFECTS_LAYOUT)
64011                ,
64012                PropertyFlags::empty()
64013                    .union(PropertyFlags::CAN_ANIMATE_ON_COMPOSITOR)
64014                    .union(PropertyFlags::AFFECTS_PAINT)
64015                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64016                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64017                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64018                    .union(PropertyFlags::APPLIES_TO_CUE)
64019                ,
64020                PropertyFlags::empty()
64021                    .union(PropertyFlags::AFFECTS_LAYOUT)
64022                ,
64023                PropertyFlags::empty()
64024                    .union(PropertyFlags::AFFECTS_OVERFLOW)
64025                    .union(PropertyFlags::APPLIES_TO_CUE)
64026                ,
64027                PropertyFlags::empty()
64028                    .union(PropertyFlags::AFFECTS_LAYOUT)
64029                ,
64030                PropertyFlags::empty()
64031                    .union(PropertyFlags::AFFECTS_PAINT)
64032                ,
64033                PropertyFlags::empty()
64034                    .union(PropertyFlags::AFFECTS_LAYOUT)
64035                ,
64036                PropertyFlags::empty()
64037                    .union(PropertyFlags::AFFECTS_LAYOUT)
64038                ,
64039                PropertyFlags::empty()
64040                    .union(PropertyFlags::AFFECTS_LAYOUT)
64041                ,
64042                PropertyFlags::empty()
64043                    .union(PropertyFlags::AFFECTS_LAYOUT)
64044                ,
64045                PropertyFlags::empty()
64046                    .union(PropertyFlags::AFFECTS_LAYOUT)
64047                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64048                ,
64049                PropertyFlags::empty()
64050                    .union(PropertyFlags::AFFECTS_LAYOUT)
64051                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64052                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64053                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64054                ,
64055                PropertyFlags::empty()
64056                    .union(PropertyFlags::AFFECTS_OVERFLOW)
64057                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64058                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64059                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64060                    .union(PropertyFlags::APPLIES_TO_CUE)
64061                ,
64062                PropertyFlags::empty()
64063                    .union(PropertyFlags::AFFECTS_OVERFLOW)
64064                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64065                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64066                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64067                    .union(PropertyFlags::APPLIES_TO_CUE)
64068                ,
64069                PropertyFlags::empty()
64070                    .union(PropertyFlags::AFFECTS_LAYOUT)
64071                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64072                ,
64073                PropertyFlags::empty()
64074                    .union(PropertyFlags::AFFECTS_LAYOUT)
64075                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64076                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64077                ,
64078                PropertyFlags::empty()
64079                    .union(PropertyFlags::AFFECTS_LAYOUT)
64080                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64081                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64082                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64083                    .union(PropertyFlags::APPLIES_TO_MARKER)
64084                ,
64085                PropertyFlags::empty()
64086                    .union(PropertyFlags::AFFECTS_LAYOUT)
64087                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64088                    .union(PropertyFlags::APPLIES_TO_MARKER)
64089                    .union(PropertyFlags::APPLIES_TO_CUE)
64090                ,
64091                PropertyFlags::empty()
64092                    .union(PropertyFlags::AFFECTS_OVERFLOW)
64093                ,
64094                PropertyFlags::empty()
64095                    .union(PropertyFlags::AFFECTS_LAYOUT)
64096                    .union(PropertyFlags::APPLIES_TO_MARKER)
64097                ,
64098                PropertyFlags::empty()
64099                    .union(PropertyFlags::AFFECTS_PAINT)
64100                    .union(PropertyFlags::APPLIES_TO_CUE)
64101                ,
64102                PropertyFlags::empty()
64103                    .union(PropertyFlags::AFFECTS_LAYOUT)
64104                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64105                    .union(PropertyFlags::APPLIES_TO_MARKER)
64106                    .union(PropertyFlags::APPLIES_TO_CUE)
64107                ,
64108                PropertyFlags::empty()
64109                    .union(PropertyFlags::AFFECTS_LAYOUT)
64110                ,
64111                PropertyFlags::empty()
64112                    .union(PropertyFlags::AFFECTS_LAYOUT)
64113                ,
64114                PropertyFlags::empty()
64115                    .union(PropertyFlags::AFFECTS_PAINT)
64116                ,
64117                PropertyFlags::empty()
64118                    .union(PropertyFlags::AFFECTS_LAYOUT)
64119                ,
64120                PropertyFlags::empty()
64121                    .union(PropertyFlags::AFFECTS_LAYOUT)
64122                ,
64123                PropertyFlags::empty()
64124                    .union(PropertyFlags::AFFECTS_LAYOUT)
64125                ,
64126                PropertyFlags::empty()
64127                    .union(PropertyFlags::AFFECTS_LAYOUT)
64128                ,
64129                PropertyFlags::empty()
64130                    .union(PropertyFlags::AFFECTS_LAYOUT)
64131                ,
64132                PropertyFlags::empty()
64133                    .union(PropertyFlags::AFFECTS_LAYOUT)
64134                ,
64135                PropertyFlags::empty()
64136                    .union(PropertyFlags::AFFECTS_LAYOUT)
64137                ,
64138                PropertyFlags::empty()
64139                    .union(PropertyFlags::AFFECTS_LAYOUT)
64140                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64141                ,
64142                PropertyFlags::empty()
64143                    .union(PropertyFlags::AFFECTS_LAYOUT)
64144                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64145                ,
64146                PropertyFlags::empty()
64147                    .union(PropertyFlags::AFFECTS_LAYOUT)
64148                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64149                ,
64150                PropertyFlags::empty()
64151                    .union(PropertyFlags::AFFECTS_LAYOUT)
64152                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64153                ,
64154                PropertyFlags::empty()
64155                    .union(PropertyFlags::AFFECTS_LAYOUT)
64156                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64157                ,
64158                PropertyFlags::empty()
64159                    .union(PropertyFlags::AFFECTS_LAYOUT)
64160                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64161                ,
64162                PropertyFlags::empty()
64163                    .union(PropertyFlags::AFFECTS_LAYOUT)
64164                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64165                ,
64166                PropertyFlags::empty()
64167                    .union(PropertyFlags::AFFECTS_LAYOUT)
64168                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64169                ,
64170                PropertyFlags::empty()
64171                    .union(PropertyFlags::APPLIES_TO_MARKER)
64172                ,
64173                PropertyFlags::empty()
64174                    .union(PropertyFlags::APPLIES_TO_MARKER)
64175                ,
64176                PropertyFlags::empty()
64177                    .union(PropertyFlags::APPLIES_TO_MARKER)
64178                ,
64179                PropertyFlags::empty()
64180                    .union(PropertyFlags::APPLIES_TO_MARKER)
64181                ,
64182                PropertyFlags::empty()
64183                    .union(PropertyFlags::APPLIES_TO_MARKER)
64184                ,
64185                PropertyFlags::empty()
64186                    .union(PropertyFlags::APPLIES_TO_MARKER)
64187                ,
64188                PropertyFlags::empty()
64189                    .union(PropertyFlags::APPLIES_TO_MARKER)
64190                ,
64191                PropertyFlags::empty()
64192                    .union(PropertyFlags::APPLIES_TO_MARKER)
64193                ,
64194                PropertyFlags::empty()
64195                    .union(PropertyFlags::APPLIES_TO_MARKER)
64196                ,
64197                PropertyFlags::empty()
64198                    .union(PropertyFlags::APPLIES_TO_MARKER)
64199                ,
64200                PropertyFlags::empty()
64201                    .union(PropertyFlags::AFFECTS_OVERFLOW)
64202                ,
64203                PropertyFlags::empty()
64204                    .union(PropertyFlags::AFFECTS_PAINT)
64205                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64206                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64207                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64208                    .union(PropertyFlags::APPLIES_TO_CUE)
64209                ,
64210                PropertyFlags::empty()
64211                    .union(PropertyFlags::AFFECTS_PAINT)
64212                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64213                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64214                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64215                    .union(PropertyFlags::APPLIES_TO_CUE)
64216                ,
64217                PropertyFlags::empty()
64218                    .union(PropertyFlags::AFFECTS_PAINT)
64219                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64220                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64221                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64222                    .union(PropertyFlags::APPLIES_TO_CUE)
64223                ,
64224                PropertyFlags::empty()
64225                    .union(PropertyFlags::AFFECTS_PAINT)
64226                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64227                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64228                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64229                    .union(PropertyFlags::APPLIES_TO_CUE)
64230                ,
64231                PropertyFlags::empty()
64232                    .union(PropertyFlags::AFFECTS_PAINT)
64233                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64234                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64235                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64236                    .union(PropertyFlags::APPLIES_TO_CUE)
64237                ,
64238                PropertyFlags::empty()
64239                    .union(PropertyFlags::AFFECTS_PAINT)
64240                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64241                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64242                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64243                    .union(PropertyFlags::APPLIES_TO_CUE)
64244                ,
64245                PropertyFlags::empty()
64246                    .union(PropertyFlags::AFFECTS_PAINT)
64247                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64248                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64249                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64250                    .union(PropertyFlags::APPLIES_TO_CUE)
64251                ,
64252                PropertyFlags::empty()
64253                    .union(PropertyFlags::AFFECTS_PAINT)
64254                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64255                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64256                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64257                    .union(PropertyFlags::APPLIES_TO_CUE)
64258                ,
64259                PropertyFlags::empty()
64260                    .union(PropertyFlags::AFFECTS_PAINT)
64261                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64262                ,
64263                PropertyFlags::empty()
64264                    .union(PropertyFlags::AFFECTS_PAINT)
64265                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64266                ,
64267                PropertyFlags::empty()
64268                    .union(PropertyFlags::AFFECTS_PAINT)
64269                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64270                ,
64271                PropertyFlags::empty()
64272                    .union(PropertyFlags::AFFECTS_LAYOUT)
64273                ,
64274                PropertyFlags::empty()
64275                    .union(PropertyFlags::AFFECTS_OVERFLOW)
64276                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64277                ,
64278                PropertyFlags::empty()
64279                    .union(PropertyFlags::AFFECTS_OVERFLOW)
64280                ,
64281                PropertyFlags::empty()
64282                    .union(PropertyFlags::AFFECTS_PAINT)
64283                ,
64284                PropertyFlags::empty()
64285                    .union(PropertyFlags::AFFECTS_PAINT)
64286                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64287                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64288                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64289                    .union(PropertyFlags::APPLIES_TO_MARKER)
64290                    .union(PropertyFlags::APPLIES_TO_CUE)
64291                ,
64292                PropertyFlags::empty()
64293                    .union(PropertyFlags::AFFECTS_PAINT)
64294                ,
64295                PropertyFlags::empty()
64296                    .union(PropertyFlags::AFFECTS_LAYOUT)
64297                ,
64298                PropertyFlags::empty()
64299                ,
64300                PropertyFlags::empty()
64301                    .union(PropertyFlags::AFFECTS_LAYOUT)
64302                    .union(PropertyFlags::APPLIES_TO_MARKER)
64303                ,
64304                PropertyFlags::empty()
64305                    .union(PropertyFlags::AFFECTS_LAYOUT)
64306                ,
64307                PropertyFlags::empty()
64308                    .union(PropertyFlags::AFFECTS_LAYOUT)
64309                ,
64310                PropertyFlags::empty()
64311                    .union(PropertyFlags::AFFECTS_PAINT)
64312                ,
64313                PropertyFlags::empty()
64314                    .union(PropertyFlags::AFFECTS_OVERFLOW)
64315                ,
64316                PropertyFlags::empty()
64317                    .union(PropertyFlags::AFFECTS_LAYOUT)
64318                ,
64319                PropertyFlags::empty()
64320                    .union(PropertyFlags::AFFECTS_LAYOUT)
64321                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64322                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64323                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64324                    .union(PropertyFlags::APPLIES_TO_MARKER)
64325                    .union(PropertyFlags::APPLIES_TO_CUE)
64326                ,
64327                PropertyFlags::empty()
64328                    .union(PropertyFlags::AFFECTS_LAYOUT)
64329                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64330                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64331                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64332                    .union(PropertyFlags::APPLIES_TO_MARKER)
64333                    .union(PropertyFlags::APPLIES_TO_CUE)
64334                ,
64335                PropertyFlags::empty()
64336                    .union(PropertyFlags::AFFECTS_LAYOUT)
64337                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64338                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64339                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64340                    .union(PropertyFlags::APPLIES_TO_MARKER)
64341                ,
64342                PropertyFlags::empty()
64343                    .union(PropertyFlags::AFFECTS_LAYOUT)
64344                ,
64345                PropertyFlags::empty()
64346                    .union(PropertyFlags::AFFECTS_LAYOUT)
64347                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64348                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64349                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64350                ,
64351                PropertyFlags::empty()
64352                    .union(PropertyFlags::AFFECTS_LAYOUT)
64353                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64354                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64355                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64356                    .union(PropertyFlags::APPLIES_TO_MARKER)
64357                    .union(PropertyFlags::APPLIES_TO_CUE)
64358                ,
64359                PropertyFlags::empty()
64360                    .union(PropertyFlags::AFFECTS_PAINT)
64361                ,
64362                PropertyFlags::empty()
64363                    .union(PropertyFlags::CAN_ANIMATE_ON_COMPOSITOR)
64364                    .union(PropertyFlags::AFFECTS_OVERFLOW)
64365                ,
64366                PropertyFlags::empty()
64367                    .union(PropertyFlags::AFFECTS_OVERFLOW)
64368                ,
64369                PropertyFlags::empty()
64370                    .union(PropertyFlags::AFFECTS_LAYOUT)
64371                ,
64372                PropertyFlags::empty()
64373                    .union(PropertyFlags::CAN_ANIMATE_ON_COMPOSITOR)
64374                    .union(PropertyFlags::AFFECTS_OVERFLOW)
64375                ,
64376                PropertyFlags::empty()
64377                    .union(PropertyFlags::CAN_ANIMATE_ON_COMPOSITOR)
64378                    .union(PropertyFlags::AFFECTS_OVERFLOW)
64379                ,
64380                PropertyFlags::empty()
64381                    .union(PropertyFlags::AFFECTS_LAYOUT)
64382                ,
64383                PropertyFlags::empty()
64384                    .union(PropertyFlags::AFFECTS_PAINT)
64385                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64386                ,
64387                PropertyFlags::empty()
64388                    .union(PropertyFlags::AFFECTS_OVERFLOW)
64389                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64390                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64391                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64392                    .union(PropertyFlags::APPLIES_TO_CUE)
64393                ,
64394                PropertyFlags::empty()
64395                    .union(PropertyFlags::CAN_ANIMATE_ON_COMPOSITOR)
64396                    .union(PropertyFlags::AFFECTS_OVERFLOW)
64397                ,
64398                PropertyFlags::empty()
64399                    .union(PropertyFlags::AFFECTS_OVERFLOW)
64400                ,
64401                PropertyFlags::empty()
64402                    .union(PropertyFlags::APPLIES_TO_MARKER)
64403                ,
64404                PropertyFlags::empty()
64405                    .union(PropertyFlags::APPLIES_TO_MARKER)
64406                ,
64407                PropertyFlags::empty()
64408                    .union(PropertyFlags::APPLIES_TO_MARKER)
64409                ,
64410                PropertyFlags::empty()
64411                    .union(PropertyFlags::APPLIES_TO_MARKER)
64412                ,
64413                PropertyFlags::empty()
64414                    .union(PropertyFlags::APPLIES_TO_MARKER)
64415                ,
64416                PropertyFlags::empty()
64417                    .union(PropertyFlags::CAN_ANIMATE_ON_COMPOSITOR)
64418                    .union(PropertyFlags::AFFECTS_OVERFLOW)
64419                ,
64420                PropertyFlags::empty()
64421                    .union(PropertyFlags::AFFECTS_LAYOUT)
64422                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64423                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64424                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64425                ,
64426                PropertyFlags::empty()
64427                ,
64428                PropertyFlags::empty()
64429                ,
64430                PropertyFlags::empty()
64431                    .union(PropertyFlags::AFFECTS_LAYOUT)
64432                ,
64433                PropertyFlags::empty()
64434                    .union(PropertyFlags::AFFECTS_LAYOUT)
64435                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64436                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64437                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64438                ,
64439                PropertyFlags::empty()
64440                    .union(PropertyFlags::AFFECTS_LAYOUT)
64441                ,
64442                PropertyFlags::empty()
64443                    .union(PropertyFlags::AFFECTS_LAYOUT)
64444                ,
64445                PropertyFlags::empty()
64446                    .union(PropertyFlags::AFFECTS_OVERFLOW)
64447                ,
64448                PropertyFlags::empty()
64449                    .union(PropertyFlags::AFFECTS_LAYOUT)
64450                ,
64451                PropertyFlags::empty()
64452                    .union(PropertyFlags::AFFECTS_LAYOUT)
64453                ,
64454                PropertyFlags::empty()
64455                    .union(PropertyFlags::AFFECTS_PAINT)
64456                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64457                ,
64458                PropertyFlags::empty()
64459                    .union(PropertyFlags::AFFECTS_LAYOUT)
64460                ,
64461                PropertyFlags::empty()
64462                    .union(PropertyFlags::AFFECTS_LAYOUT)
64463                ,
64464                PropertyFlags::empty()
64465                    .union(PropertyFlags::AFFECTS_LAYOUT)
64466                ,
64467                PropertyFlags::empty()
64468                    .union(PropertyFlags::AFFECTS_OVERFLOW)
64469                ,
64470                PropertyFlags::empty()
64471                    .union(PropertyFlags::AFFECTS_OVERFLOW)
64472                ,
64473                PropertyFlags::empty()
64474                    .union(PropertyFlags::AFFECTS_LAYOUT)
64475                ,
64476                PropertyFlags::empty()
64477                    .union(PropertyFlags::AFFECTS_LAYOUT)
64478                ,
64479                PropertyFlags::empty()
64480                    .union(PropertyFlags::AFFECTS_LAYOUT)
64481                ,
64482                PropertyFlags::empty()
64483                    .union(PropertyFlags::AFFECTS_LAYOUT)
64484                ,
64485                PropertyFlags::empty()
64486                    .union(PropertyFlags::AFFECTS_LAYOUT)
64487                ,
64488                PropertyFlags::empty()
64489                    .union(PropertyFlags::AFFECTS_LAYOUT)
64490                ,
64491                PropertyFlags::empty()
64492                    .union(PropertyFlags::AFFECTS_LAYOUT)
64493                ,
64494                PropertyFlags::empty()
64495                    .union(PropertyFlags::AFFECTS_LAYOUT)
64496                ,
64497                PropertyFlags::empty()
64498                    .union(PropertyFlags::AFFECTS_LAYOUT)
64499                ,
64500                PropertyFlags::empty()
64501                    .union(PropertyFlags::AFFECTS_LAYOUT)
64502                ,
64503                PropertyFlags::empty()
64504                    .union(PropertyFlags::AFFECTS_PAINT)
64505                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64506                ,
64507                PropertyFlags::empty()
64508                    .union(PropertyFlags::AFFECTS_PAINT)
64509                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64510                ,
64511                PropertyFlags::empty()
64512                    .union(PropertyFlags::AFFECTS_PAINT)
64513                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64514                ,
64515                PropertyFlags::empty()
64516                    .union(PropertyFlags::AFFECTS_PAINT)
64517                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64518                ,
64519                PropertyFlags::empty()
64520                    .union(PropertyFlags::AFFECTS_PAINT)
64521                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64522                ,
64523                PropertyFlags::empty()
64524                    .union(PropertyFlags::AFFECTS_PAINT)
64525                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64526                ,
64527                PropertyFlags::empty()
64528                    .union(PropertyFlags::AFFECTS_PAINT)
64529                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64530                ,
64531                PropertyFlags::empty()
64532                    .union(PropertyFlags::AFFECTS_PAINT)
64533                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64534                ,
64535                PropertyFlags::empty()
64536                    .union(PropertyFlags::AFFECTS_LAYOUT)
64537                ,
64538                PropertyFlags::empty()
64539                    .union(PropertyFlags::AFFECTS_LAYOUT)
64540                ,
64541                PropertyFlags::empty()
64542                    .union(PropertyFlags::AFFECTS_LAYOUT)
64543                ,
64544                PropertyFlags::empty()
64545                    .union(PropertyFlags::AFFECTS_LAYOUT)
64546                ,
64547                PropertyFlags::empty()
64548                    .union(PropertyFlags::AFFECTS_LAYOUT)
64549                ,
64550                PropertyFlags::empty()
64551                    .union(PropertyFlags::AFFECTS_LAYOUT)
64552                ,
64553                PropertyFlags::empty()
64554                    .union(PropertyFlags::AFFECTS_LAYOUT)
64555                ,
64556                PropertyFlags::empty()
64557                    .union(PropertyFlags::AFFECTS_LAYOUT)
64558                ,
64559                PropertyFlags::empty()
64560                    .union(PropertyFlags::AFFECTS_LAYOUT)
64561                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64562                ,
64563                PropertyFlags::empty()
64564                    .union(PropertyFlags::AFFECTS_LAYOUT)
64565                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64566                ,
64567                PropertyFlags::empty()
64568                    .union(PropertyFlags::AFFECTS_LAYOUT)
64569                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64570                ,
64571                PropertyFlags::empty()
64572                    .union(PropertyFlags::AFFECTS_LAYOUT)
64573                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64574                ,
64575                PropertyFlags::empty()
64576                    .union(PropertyFlags::AFFECTS_LAYOUT)
64577                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64578                ,
64579                PropertyFlags::empty()
64580                    .union(PropertyFlags::AFFECTS_LAYOUT)
64581                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64582                ,
64583                PropertyFlags::empty()
64584                    .union(PropertyFlags::AFFECTS_LAYOUT)
64585                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64586                ,
64587                PropertyFlags::empty()
64588                    .union(PropertyFlags::AFFECTS_LAYOUT)
64589                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64590                ,
64591                PropertyFlags::empty()
64592                    .union(PropertyFlags::AFFECTS_LAYOUT)
64593                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64594                ,
64595                PropertyFlags::empty()
64596                    .union(PropertyFlags::AFFECTS_LAYOUT)
64597                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64598                ,
64599                PropertyFlags::empty()
64600                    .union(PropertyFlags::AFFECTS_LAYOUT)
64601                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64602                ,
64603                PropertyFlags::empty()
64604                    .union(PropertyFlags::AFFECTS_LAYOUT)
64605                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64606                ,
64607                PropertyFlags::empty()
64608                    .union(PropertyFlags::AFFECTS_LAYOUT)
64609                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64610                ,
64611                PropertyFlags::empty()
64612                    .union(PropertyFlags::AFFECTS_LAYOUT)
64613                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64614                ,
64615                PropertyFlags::empty()
64616                    .union(PropertyFlags::AFFECTS_LAYOUT)
64617                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64618                ,
64619                PropertyFlags::empty()
64620                    .union(PropertyFlags::AFFECTS_LAYOUT)
64621                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64622                ,
64623                PropertyFlags::empty()
64624                    .union(PropertyFlags::AFFECTS_LAYOUT)
64625                ,
64626                PropertyFlags::empty()
64627                    .union(PropertyFlags::AFFECTS_LAYOUT)
64628                ,
64629                PropertyFlags::empty()
64630                    .union(PropertyFlags::AFFECTS_LAYOUT)
64631                ,
64632                PropertyFlags::empty()
64633                    .union(PropertyFlags::AFFECTS_LAYOUT)
64634                ,
64635                PropertyFlags::empty()
64636                    .union(PropertyFlags::AFFECTS_LAYOUT)
64637                ,
64638                PropertyFlags::empty()
64639                    .union(PropertyFlags::AFFECTS_LAYOUT)
64640                ,
64641                PropertyFlags::empty()
64642                    .union(PropertyFlags::AFFECTS_LAYOUT)
64643                ,
64644                PropertyFlags::empty()
64645                    .union(PropertyFlags::AFFECTS_LAYOUT)
64646                ,
64647                PropertyFlags::empty()
64648                    .union(PropertyFlags::AFFECTS_LAYOUT)
64649                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64650                ,
64651                PropertyFlags::empty()
64652                    .union(PropertyFlags::AFFECTS_LAYOUT)
64653                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64654                ,
64655                PropertyFlags::empty()
64656                    .union(PropertyFlags::AFFECTS_LAYOUT)
64657                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64658                ,
64659                PropertyFlags::empty()
64660                    .union(PropertyFlags::AFFECTS_LAYOUT)
64661                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64662                ,
64663                PropertyFlags::empty()
64664                    .union(PropertyFlags::AFFECTS_LAYOUT)
64665                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64666                ,
64667                PropertyFlags::empty()
64668                    .union(PropertyFlags::AFFECTS_LAYOUT)
64669                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64670                ,
64671                PropertyFlags::empty()
64672                    .union(PropertyFlags::AFFECTS_LAYOUT)
64673                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64674                ,
64675                PropertyFlags::empty()
64676                    .union(PropertyFlags::AFFECTS_LAYOUT)
64677                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64678                ,
64679                PropertyFlags::empty()
64680                    .union(PropertyFlags::AFFECTS_OVERFLOW)
64681                    .union(PropertyFlags::APPLIES_TO_CUE)
64682                ,
64683                PropertyFlags::empty()
64684                    .union(PropertyFlags::CAN_ANIMATE_ON_COMPOSITOR)
64685                    .union(PropertyFlags::AFFECTS_PAINT)
64686                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64687                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64688                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64689                    .union(PropertyFlags::APPLIES_TO_CUE)
64690                ,
64691                PropertyFlags::empty()
64692                    .union(PropertyFlags::AFFECTS_PAINT)
64693                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64694                ,
64695                PropertyFlags::empty()
64696                    .union(PropertyFlags::AFFECTS_PAINT)
64697                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64698                ,
64699                PropertyFlags::empty()
64700                    .union(PropertyFlags::AFFECTS_PAINT)
64701                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64702                ,
64703                PropertyFlags::empty()
64704                    .union(PropertyFlags::AFFECTS_PAINT)
64705                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64706                ,
64707                PropertyFlags::empty()
64708                    .union(PropertyFlags::AFFECTS_PAINT)
64709                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64710                ,
64711                PropertyFlags::empty()
64712                    .union(PropertyFlags::AFFECTS_PAINT)
64713                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64714                ,
64715                PropertyFlags::empty()
64716                    .union(PropertyFlags::AFFECTS_PAINT)
64717                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64718                ,
64719                PropertyFlags::empty()
64720                    .union(PropertyFlags::AFFECTS_PAINT)
64721                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64722                ,
64723                PropertyFlags::empty()
64724                    .union(PropertyFlags::AFFECTS_PAINT)
64725                    .union(PropertyFlags::APPLIES_TO_CUE)
64726                ,
64727                PropertyFlags::empty()
64728                    .union(PropertyFlags::AFFECTS_PAINT)
64729                    .union(PropertyFlags::APPLIES_TO_FIRST_LINE)
64730                    .union(PropertyFlags::APPLIES_TO_FIRST_LETTER)
64731                    .union(PropertyFlags::APPLIES_TO_PLACEHOLDER)
64732                    .union(PropertyFlags::APPLIES_TO_CUE)
64733                ,
64734        ];
64735        FLAGS[self as usize]
64736    }
64737}
64738
64739/// An identifier for a given shorthand property.
64740#[derive(Clone, Copy, Debug, Eq, Hash, MallocSizeOf, PartialEq, ToComputedValue, ToResolvedValue, ToShmem)]
64741#[repr(u16)]
64742pub enum ShorthandId {
64743        /// background
64744        Background = 0,
64745        /// background-position
64746        BackgroundPosition = 1,
64747        /// border-color
64748        BorderColor = 2,
64749        /// border-style
64750        BorderStyle = 3,
64751        /// border-width
64752        BorderWidth = 4,
64753        /// border-top
64754        BorderTop = 5,
64755        /// border-right
64756        BorderRight = 6,
64757        /// border-bottom
64758        BorderBottom = 7,
64759        /// border-left
64760        BorderLeft = 8,
64761        /// border-block-start
64762        BorderBlockStart = 9,
64763        /// border-block-end
64764        BorderBlockEnd = 10,
64765        /// border-inline-start
64766        BorderInlineStart = 11,
64767        /// border-inline-end
64768        BorderInlineEnd = 12,
64769        /// border
64770        Border = 13,
64771        /// border-radius
64772        BorderRadius = 14,
64773        /// border-image
64774        BorderImage = 15,
64775        /// border-block-width
64776        BorderBlockWidth = 16,
64777        /// border-block-style
64778        BorderBlockStyle = 17,
64779        /// border-block-color
64780        BorderBlockColor = 18,
64781        /// border-inline-width
64782        BorderInlineWidth = 19,
64783        /// border-inline-style
64784        BorderInlineStyle = 20,
64785        /// border-inline-color
64786        BorderInlineColor = 21,
64787        /// border-block
64788        BorderBlock = 22,
64789        /// border-inline
64790        BorderInline = 23,
64791        /// overflow
64792        Overflow = 24,
64793        /// columns
64794        Columns = 25,
64795        /// font
64796        Font = 26,
64797        /// font-variant
64798        FontVariant = 27,
64799        /// white-space
64800        WhiteSpace = 28,
64801        /// list-style
64802        ListStyle = 29,
64803        /// margin
64804        Margin = 30,
64805        /// margin-block
64806        MarginBlock = 31,
64807        /// margin-inline
64808        MarginInline = 32,
64809        /// outline
64810        Outline = 33,
64811        /// padding
64812        Padding = 34,
64813        /// padding-block
64814        PaddingBlock = 35,
64815        /// padding-inline
64816        PaddingInline = 36,
64817        /// flex-flow
64818        FlexFlow = 37,
64819        /// flex
64820        Flex = 38,
64821        /// gap
64822        Gap = 39,
64823        /// grid-row
64824        GridRow = 40,
64825        /// grid-column
64826        GridColumn = 41,
64827        /// grid-area
64828        GridArea = 42,
64829        /// grid-template
64830        GridTemplate = 43,
64831        /// grid
64832        Grid = 44,
64833        /// place-content
64834        PlaceContent = 45,
64835        /// place-self
64836        PlaceSelf = 46,
64837        /// place-items
64838        PlaceItems = 47,
64839        /// inset
64840        Inset = 48,
64841        /// inset-block
64842        InsetBlock = 49,
64843        /// inset-inline
64844        InsetInline = 50,
64845        /// text-decoration
64846        TextDecoration = 51,
64847        /// transition
64848        Transition = 52,
64849        /// animation
64850        Animation = 53,
64851        /// all
64852        All = 54,
64853}
64854
64855impl ShorthandId {
64856    /// Get the longhand ids that form this shorthand.
64857    pub fn longhands(self) -> NonCustomPropertyIterator<LonghandId> {
64858        static MAP: [&'static [LonghandId]; property_counts::SHORTHANDS] = [
64859            &[
64860                    LonghandId::BackgroundColor,
64861                    LonghandId::BackgroundPositionX,
64862                    LonghandId::BackgroundPositionY,
64863                    LonghandId::BackgroundRepeat,
64864                    LonghandId::BackgroundAttachment,
64865                    LonghandId::BackgroundImage,
64866                    LonghandId::BackgroundSize,
64867                    LonghandId::BackgroundOrigin,
64868                    LonghandId::BackgroundClip,
64869            ],
64870            &[
64871                    LonghandId::BackgroundPositionX,
64872                    LonghandId::BackgroundPositionY,
64873            ],
64874            &[
64875                    LonghandId::BorderTopColor,
64876                    LonghandId::BorderRightColor,
64877                    LonghandId::BorderBottomColor,
64878                    LonghandId::BorderLeftColor,
64879            ],
64880            &[
64881                    LonghandId::BorderTopStyle,
64882                    LonghandId::BorderRightStyle,
64883                    LonghandId::BorderBottomStyle,
64884                    LonghandId::BorderLeftStyle,
64885            ],
64886            &[
64887                    LonghandId::BorderTopWidth,
64888                    LonghandId::BorderRightWidth,
64889                    LonghandId::BorderBottomWidth,
64890                    LonghandId::BorderLeftWidth,
64891            ],
64892            &[
64893                    LonghandId::BorderTopWidth,
64894                    LonghandId::BorderTopStyle,
64895                    LonghandId::BorderTopColor,
64896            ],
64897            &[
64898                    LonghandId::BorderRightWidth,
64899                    LonghandId::BorderRightStyle,
64900                    LonghandId::BorderRightColor,
64901            ],
64902            &[
64903                    LonghandId::BorderBottomWidth,
64904                    LonghandId::BorderBottomStyle,
64905                    LonghandId::BorderBottomColor,
64906            ],
64907            &[
64908                    LonghandId::BorderLeftWidth,
64909                    LonghandId::BorderLeftStyle,
64910                    LonghandId::BorderLeftColor,
64911            ],
64912            &[
64913                    LonghandId::BorderBlockStartWidth,
64914                    LonghandId::BorderBlockStartStyle,
64915                    LonghandId::BorderBlockStartColor,
64916            ],
64917            &[
64918                    LonghandId::BorderBlockEndWidth,
64919                    LonghandId::BorderBlockEndStyle,
64920                    LonghandId::BorderBlockEndColor,
64921            ],
64922            &[
64923                    LonghandId::BorderInlineStartWidth,
64924                    LonghandId::BorderInlineStartStyle,
64925                    LonghandId::BorderInlineStartColor,
64926            ],
64927            &[
64928                    LonghandId::BorderInlineEndWidth,
64929                    LonghandId::BorderInlineEndStyle,
64930                    LonghandId::BorderInlineEndColor,
64931            ],
64932            &[
64933                    LonghandId::BorderTopWidth,
64934                    LonghandId::BorderTopStyle,
64935                    LonghandId::BorderTopColor,
64936                    LonghandId::BorderRightWidth,
64937                    LonghandId::BorderRightStyle,
64938                    LonghandId::BorderRightColor,
64939                    LonghandId::BorderBottomWidth,
64940                    LonghandId::BorderBottomStyle,
64941                    LonghandId::BorderBottomColor,
64942                    LonghandId::BorderLeftWidth,
64943                    LonghandId::BorderLeftStyle,
64944                    LonghandId::BorderLeftColor,
64945                    LonghandId::BorderImageOutset,
64946                    LonghandId::BorderImageRepeat,
64947                    LonghandId::BorderImageSlice,
64948                    LonghandId::BorderImageSource,
64949                    LonghandId::BorderImageWidth,
64950            ],
64951            &[
64952                    LonghandId::BorderTopLeftRadius,
64953                    LonghandId::BorderTopRightRadius,
64954                    LonghandId::BorderBottomRightRadius,
64955                    LonghandId::BorderBottomLeftRadius,
64956            ],
64957            &[
64958                    LonghandId::BorderImageOutset,
64959                    LonghandId::BorderImageRepeat,
64960                    LonghandId::BorderImageSlice,
64961                    LonghandId::BorderImageSource,
64962                    LonghandId::BorderImageWidth,
64963            ],
64964            &[
64965                    LonghandId::BorderBlockStartWidth,
64966                    LonghandId::BorderBlockEndWidth,
64967            ],
64968            &[
64969                    LonghandId::BorderBlockStartStyle,
64970                    LonghandId::BorderBlockEndStyle,
64971            ],
64972            &[
64973                    LonghandId::BorderBlockStartColor,
64974                    LonghandId::BorderBlockEndColor,
64975            ],
64976            &[
64977                    LonghandId::BorderInlineStartWidth,
64978                    LonghandId::BorderInlineEndWidth,
64979            ],
64980            &[
64981                    LonghandId::BorderInlineStartStyle,
64982                    LonghandId::BorderInlineEndStyle,
64983            ],
64984            &[
64985                    LonghandId::BorderInlineStartColor,
64986                    LonghandId::BorderInlineEndColor,
64987            ],
64988            &[
64989                    LonghandId::BorderBlockStartWidth,
64990                    LonghandId::BorderBlockEndWidth,
64991                    LonghandId::BorderBlockStartStyle,
64992                    LonghandId::BorderBlockEndStyle,
64993                    LonghandId::BorderBlockStartColor,
64994                    LonghandId::BorderBlockEndColor,
64995            ],
64996            &[
64997                    LonghandId::BorderInlineStartWidth,
64998                    LonghandId::BorderInlineEndWidth,
64999                    LonghandId::BorderInlineStartStyle,
65000                    LonghandId::BorderInlineEndStyle,
65001                    LonghandId::BorderInlineStartColor,
65002                    LonghandId::BorderInlineEndColor,
65003            ],
65004            &[
65005                    LonghandId::OverflowX,
65006                    LonghandId::OverflowY,
65007            ],
65008            &[
65009                    LonghandId::ColumnWidth,
65010                    LonghandId::ColumnCount,
65011            ],
65012            &[
65013                    LonghandId::FontStyle,
65014                    LonghandId::FontVariantCaps,
65015                    LonghandId::FontWeight,
65016                    LonghandId::FontStretch,
65017                    LonghandId::FontSize,
65018                    LonghandId::LineHeight,
65019                    LonghandId::FontFamily,
65020            ],
65021            &[
65022                    LonghandId::FontVariantCaps,
65023            ],
65024            &[
65025                    LonghandId::TextWrapMode,
65026                    LonghandId::WhiteSpaceCollapse,
65027            ],
65028            &[
65029                    LonghandId::ListStylePosition,
65030                    LonghandId::ListStyleImage,
65031                    LonghandId::ListStyleType,
65032            ],
65033            &[
65034                    LonghandId::MarginTop,
65035                    LonghandId::MarginRight,
65036                    LonghandId::MarginBottom,
65037                    LonghandId::MarginLeft,
65038            ],
65039            &[
65040                    LonghandId::MarginBlockStart,
65041                    LonghandId::MarginBlockEnd,
65042            ],
65043            &[
65044                    LonghandId::MarginInlineStart,
65045                    LonghandId::MarginInlineEnd,
65046            ],
65047            &[
65048                    LonghandId::OutlineColor,
65049                    LonghandId::OutlineStyle,
65050                    LonghandId::OutlineWidth,
65051            ],
65052            &[
65053                    LonghandId::PaddingTop,
65054                    LonghandId::PaddingRight,
65055                    LonghandId::PaddingBottom,
65056                    LonghandId::PaddingLeft,
65057            ],
65058            &[
65059                    LonghandId::PaddingBlockStart,
65060                    LonghandId::PaddingBlockEnd,
65061            ],
65062            &[
65063                    LonghandId::PaddingInlineStart,
65064                    LonghandId::PaddingInlineEnd,
65065            ],
65066            &[
65067                    LonghandId::FlexDirection,
65068                    LonghandId::FlexWrap,
65069            ],
65070            &[
65071                    LonghandId::FlexGrow,
65072                    LonghandId::FlexShrink,
65073                    LonghandId::FlexBasis,
65074            ],
65075            &[
65076                    LonghandId::RowGap,
65077                    LonghandId::ColumnGap,
65078            ],
65079            &[
65080                    LonghandId::GridRowStart,
65081                    LonghandId::GridRowEnd,
65082            ],
65083            &[
65084                    LonghandId::GridColumnStart,
65085                    LonghandId::GridColumnEnd,
65086            ],
65087            &[
65088                    LonghandId::GridRowStart,
65089                    LonghandId::GridRowEnd,
65090                    LonghandId::GridColumnStart,
65091                    LonghandId::GridColumnEnd,
65092            ],
65093            &[
65094                    LonghandId::GridTemplateRows,
65095                    LonghandId::GridTemplateColumns,
65096                    LonghandId::GridTemplateAreas,
65097            ],
65098            &[
65099                    LonghandId::GridTemplateRows,
65100                    LonghandId::GridTemplateColumns,
65101                    LonghandId::GridTemplateAreas,
65102                    LonghandId::GridAutoRows,
65103                    LonghandId::GridAutoColumns,
65104                    LonghandId::GridAutoFlow,
65105            ],
65106            &[
65107                    LonghandId::AlignContent,
65108                    LonghandId::JustifyContent,
65109            ],
65110            &[
65111                    LonghandId::AlignSelf,
65112                    LonghandId::JustifySelf,
65113            ],
65114            &[
65115                    LonghandId::AlignItems,
65116                    LonghandId::JustifyItems,
65117            ],
65118            &[
65119                    LonghandId::Top,
65120                    LonghandId::Right,
65121                    LonghandId::Bottom,
65122                    LonghandId::Left,
65123            ],
65124            &[
65125                    LonghandId::InsetBlockStart,
65126                    LonghandId::InsetBlockEnd,
65127            ],
65128            &[
65129                    LonghandId::InsetInlineStart,
65130                    LonghandId::InsetInlineEnd,
65131            ],
65132            &[
65133                    LonghandId::TextDecorationColor,
65134                    LonghandId::TextDecorationLine,
65135                    LonghandId::TextDecorationStyle,
65136            ],
65137            &[
65138                    LonghandId::TransitionProperty,
65139                    LonghandId::TransitionDuration,
65140                    LonghandId::TransitionTimingFunction,
65141                    LonghandId::TransitionDelay,
65142                    LonghandId::TransitionBehavior,
65143            ],
65144            &[
65145                    LonghandId::AnimationName,
65146                    LonghandId::AnimationDuration,
65147                    LonghandId::AnimationTimingFunction,
65148                    LonghandId::AnimationDelay,
65149                    LonghandId::AnimationIterationCount,
65150                    LonghandId::AnimationDirection,
65151                    LonghandId::AnimationFillMode,
65152                    LonghandId::AnimationPlayState,
65153                    LonghandId::AnimationTimeline,
65154            ],
65155            &[
65156                    LonghandId::BorderBlockStartColor,
65157                    LonghandId::BorderBlockStartStyle,
65158                    LonghandId::BorderBlockStartWidth,
65159                    LonghandId::BorderBlockEndColor,
65160                    LonghandId::BorderBlockEndStyle,
65161                    LonghandId::BorderBlockEndWidth,
65162                    LonghandId::BorderInlineStartColor,
65163                    LonghandId::BorderInlineStartStyle,
65164                    LonghandId::BorderInlineStartWidth,
65165                    LonghandId::BorderInlineEndColor,
65166                    LonghandId::BorderInlineEndStyle,
65167                    LonghandId::BorderInlineEndWidth,
65168                    LonghandId::BorderStartStartRadius,
65169                    LonghandId::BorderStartEndRadius,
65170                    LonghandId::BorderEndStartRadius,
65171                    LonghandId::BorderEndEndRadius,
65172                    LonghandId::OverflowBlock,
65173                    LonghandId::OverflowInline,
65174                    LonghandId::MarginBlockStart,
65175                    LonghandId::MarginBlockEnd,
65176                    LonghandId::MarginInlineStart,
65177                    LonghandId::MarginInlineEnd,
65178                    LonghandId::PaddingBlockStart,
65179                    LonghandId::PaddingBlockEnd,
65180                    LonghandId::PaddingInlineStart,
65181                    LonghandId::PaddingInlineEnd,
65182                    LonghandId::InsetBlockStart,
65183                    LonghandId::InsetBlockEnd,
65184                    LonghandId::InsetInlineStart,
65185                    LonghandId::InsetInlineEnd,
65186                    LonghandId::BlockSize,
65187                    LonghandId::MinBlockSize,
65188                    LonghandId::MaxBlockSize,
65189                    LonghandId::InlineSize,
65190                    LonghandId::MinInlineSize,
65191                    LonghandId::MaxInlineSize,
65192                    LonghandId::BackgroundColor,
65193                    LonghandId::BackgroundImage,
65194                    LonghandId::BackgroundPositionX,
65195                    LonghandId::BackgroundPositionY,
65196                    LonghandId::BackgroundRepeat,
65197                    LonghandId::BackgroundAttachment,
65198                    LonghandId::BackgroundClip,
65199                    LonghandId::BackgroundOrigin,
65200                    LonghandId::BackgroundSize,
65201                    LonghandId::BorderTopColor,
65202                    LonghandId::BorderTopStyle,
65203                    LonghandId::BorderTopWidth,
65204                    LonghandId::BorderRightColor,
65205                    LonghandId::BorderRightStyle,
65206                    LonghandId::BorderRightWidth,
65207                    LonghandId::BorderBottomColor,
65208                    LonghandId::BorderBottomStyle,
65209                    LonghandId::BorderBottomWidth,
65210                    LonghandId::BorderLeftColor,
65211                    LonghandId::BorderLeftStyle,
65212                    LonghandId::BorderLeftWidth,
65213                    LonghandId::BorderTopLeftRadius,
65214                    LonghandId::BorderTopRightRadius,
65215                    LonghandId::BorderBottomRightRadius,
65216                    LonghandId::BorderBottomLeftRadius,
65217                    LonghandId::BorderImageSource,
65218                    LonghandId::BorderImageOutset,
65219                    LonghandId::BorderImageRepeat,
65220                    LonghandId::BorderImageWidth,
65221                    LonghandId::BorderImageSlice,
65222                    LonghandId::Display,
65223                    LonghandId::Position,
65224                    LonghandId::Float,
65225                    LonghandId::Clear,
65226                    LonghandId::VerticalAlign,
65227                    LonghandId::BaselineSource,
65228                    LonghandId::OverflowY,
65229                    LonghandId::OverflowX,
65230                    LonghandId::Transform,
65231                    LonghandId::Rotate,
65232                    LonghandId::Scale,
65233                    LonghandId::Translate,
65234                    LonghandId::OffsetPath,
65235                    LonghandId::Isolation,
65236                    LonghandId::Perspective,
65237                    LonghandId::PerspectiveOrigin,
65238                    LonghandId::BackfaceVisibility,
65239                    LonghandId::TransformStyle,
65240                    LonghandId::TransformOrigin,
65241                    LonghandId::Contain,
65242                    LonghandId::ContainerType,
65243                    LonghandId::ContainerName,
65244                    LonghandId::WillChange,
65245                    LonghandId::Zoom,
65246                    LonghandId::ColumnWidth,
65247                    LonghandId::ColumnCount,
65248                    LonghandId::ColumnSpan,
65249                    LonghandId::Content,
65250                    LonghandId::CounterIncrement,
65251                    LonghandId::CounterReset,
65252                    LonghandId::Opacity,
65253                    LonghandId::BoxShadow,
65254                    LonghandId::Clip,
65255                    LonghandId::Filter,
65256                    LonghandId::BackdropFilter,
65257                    LonghandId::MixBlendMode,
65258                    LonghandId::FontFamily,
65259                    LonghandId::FontStyle,
65260                    LonghandId::FontVariantCaps,
65261                    LonghandId::FontWeight,
65262                    LonghandId::FontSize,
65263                    LonghandId::FontStretch,
65264                    LonghandId::FontVariationSettings,
65265                    LonghandId::FontLanguageOverride,
65266                    LonghandId::LineHeight,
65267                    LonghandId::Visibility,
65268                    LonghandId::WritingMode,
65269                    LonghandId::ImageRendering,
65270                    LonghandId::BorderCollapse,
65271                    LonghandId::EmptyCells,
65272                    LonghandId::CaptionSide,
65273                    LonghandId::BorderSpacing,
65274                    LonghandId::Color,
65275                    LonghandId::TextTransform,
65276                    LonghandId::TextIndent,
65277                    LonghandId::OverflowWrap,
65278                    LonghandId::WordBreak,
65279                    LonghandId::TextJustify,
65280                    LonghandId::TextAlignLast,
65281                    LonghandId::TextAlign,
65282                    LonghandId::LetterSpacing,
65283                    LonghandId::WordSpacing,
65284                    LonghandId::WhiteSpaceCollapse,
65285                    LonghandId::TextShadow,
65286                    LonghandId::TextRendering,
65287                    LonghandId::TextWrapMode,
65288                    LonghandId::Cursor,
65289                    LonghandId::PointerEvents,
65290                    LonghandId::ColorScheme,
65291                    LonghandId::ListStylePosition,
65292                    LonghandId::ListStyleType,
65293                    LonghandId::ListStyleImage,
65294                    LonghandId::Quotes,
65295                    LonghandId::MarginTop,
65296                    LonghandId::MarginRight,
65297                    LonghandId::MarginBottom,
65298                    LonghandId::MarginLeft,
65299                    LonghandId::OverflowClipMargin,
65300                    LonghandId::OutlineColor,
65301                    LonghandId::OutlineStyle,
65302                    LonghandId::OutlineWidth,
65303                    LonghandId::OutlineOffset,
65304                    LonghandId::PaddingTop,
65305                    LonghandId::PaddingRight,
65306                    LonghandId::PaddingBottom,
65307                    LonghandId::PaddingLeft,
65308                    LonghandId::Top,
65309                    LonghandId::Right,
65310                    LonghandId::Bottom,
65311                    LonghandId::Left,
65312                    LonghandId::ZIndex,
65313                    LonghandId::FlexDirection,
65314                    LonghandId::FlexWrap,
65315                    LonghandId::JustifyContent,
65316                    LonghandId::AlignContent,
65317                    LonghandId::AlignItems,
65318                    LonghandId::JustifyItems,
65319                    LonghandId::FlexGrow,
65320                    LonghandId::FlexShrink,
65321                    LonghandId::AlignSelf,
65322                    LonghandId::JustifySelf,
65323                    LonghandId::Order,
65324                    LonghandId::FlexBasis,
65325                    LonghandId::Height,
65326                    LonghandId::MinHeight,
65327                    LonghandId::MaxHeight,
65328                    LonghandId::Width,
65329                    LonghandId::MinWidth,
65330                    LonghandId::MaxWidth,
65331                    LonghandId::BoxSizing,
65332                    LonghandId::ObjectFit,
65333                    LonghandId::ObjectPosition,
65334                    LonghandId::GridRowStart,
65335                    LonghandId::GridRowEnd,
65336                    LonghandId::GridAutoRows,
65337                    LonghandId::GridTemplateRows,
65338                    LonghandId::GridColumnStart,
65339                    LonghandId::GridColumnEnd,
65340                    LonghandId::GridAutoColumns,
65341                    LonghandId::GridTemplateColumns,
65342                    LonghandId::GridAutoFlow,
65343                    LonghandId::GridTemplateAreas,
65344                    LonghandId::ColumnGap,
65345                    LonghandId::RowGap,
65346                    LonghandId::AspectRatio,
65347                    LonghandId::ClipPath,
65348                    LonghandId::MaskImage,
65349                    LonghandId::TableLayout,
65350                    LonghandId::TextOverflow,
65351                    LonghandId::TextDecorationLine,
65352                    LonghandId::TextDecorationStyle,
65353                    LonghandId::TextDecorationColor,
65354                    LonghandId::TransitionDuration,
65355                    LonghandId::TransitionTimingFunction,
65356                    LonghandId::TransitionProperty,
65357                    LonghandId::TransitionDelay,
65358                    LonghandId::TransitionBehavior,
65359                    LonghandId::AnimationName,
65360                    LonghandId::AnimationDuration,
65361                    LonghandId::AnimationTimingFunction,
65362                    LonghandId::AnimationIterationCount,
65363                    LonghandId::AnimationDirection,
65364                    LonghandId::AnimationPlayState,
65365                    LonghandId::AnimationFillMode,
65366                    LonghandId::AnimationComposition,
65367                    LonghandId::AnimationDelay,
65368                    LonghandId::AnimationTimeline,
65369                    LonghandId::ViewTransitionName,
65370                    LonghandId::ViewTransitionClass,
65371            ],
65372        ];
65373        NonCustomPropertyIterator {
65374            filter: NonCustomPropertyId::from(self).enabled_for_all_content(),
65375            iter: MAP[self as usize].iter(),
65376        }
65377    }
65378
65379    /// Try to serialize the given declarations as this shorthand.
65380    ///
65381    /// Returns an error if writing to the stream fails, or if the declarations
65382    /// do not map to a shorthand.
65383    pub fn longhands_to_css(
65384        self,
65385        declarations: &[&PropertyDeclaration],
65386        dest: &mut CssStringWriter,
65387    ) -> fmt::Result {
65388        type LonghandsToCssFn = for<'a, 'b> fn(&'a [&'b PropertyDeclaration], &mut CssStringWriter) -> fmt::Result;
65389        fn all_to_css(_: &[&PropertyDeclaration], _: &mut CssStringWriter) -> fmt::Result {
65390            // No need to try to serialize the declarations as the 'all'
65391            // shorthand, since it only accepts CSS-wide keywords (and variable
65392            // references), which will be handled in
65393            // get_shorthand_appendable_value.
65394            Ok(())
65395        }
65396
65397        static LONGHANDS_TO_CSS: [LonghandsToCssFn; 55] = [
65398                shorthands::background::to_css,
65399                shorthands::background_position::to_css,
65400                shorthands::border_color::to_css,
65401                shorthands::border_style::to_css,
65402                shorthands::border_width::to_css,
65403                shorthands::border_top::to_css,
65404                shorthands::border_right::to_css,
65405                shorthands::border_bottom::to_css,
65406                shorthands::border_left::to_css,
65407                shorthands::border_block_start::to_css,
65408                shorthands::border_block_end::to_css,
65409                shorthands::border_inline_start::to_css,
65410                shorthands::border_inline_end::to_css,
65411                shorthands::border::to_css,
65412                shorthands::border_radius::to_css,
65413                shorthands::border_image::to_css,
65414                shorthands::border_block_width::to_css,
65415                shorthands::border_block_style::to_css,
65416                shorthands::border_block_color::to_css,
65417                shorthands::border_inline_width::to_css,
65418                shorthands::border_inline_style::to_css,
65419                shorthands::border_inline_color::to_css,
65420                shorthands::border_block::to_css,
65421                shorthands::border_inline::to_css,
65422                shorthands::overflow::to_css,
65423                shorthands::columns::to_css,
65424                shorthands::font::to_css,
65425                shorthands::font_variant::to_css,
65426                shorthands::white_space::to_css,
65427                shorthands::list_style::to_css,
65428                shorthands::margin::to_css,
65429                shorthands::margin_block::to_css,
65430                shorthands::margin_inline::to_css,
65431                shorthands::outline::to_css,
65432                shorthands::padding::to_css,
65433                shorthands::padding_block::to_css,
65434                shorthands::padding_inline::to_css,
65435                shorthands::flex_flow::to_css,
65436                shorthands::flex::to_css,
65437                shorthands::gap::to_css,
65438                shorthands::grid_row::to_css,
65439                shorthands::grid_column::to_css,
65440                shorthands::grid_area::to_css,
65441                shorthands::grid_template::to_css,
65442                shorthands::grid::to_css,
65443                shorthands::place_content::to_css,
65444                shorthands::place_self::to_css,
65445                shorthands::place_items::to_css,
65446                shorthands::inset::to_css,
65447                shorthands::inset_block::to_css,
65448                shorthands::inset_inline::to_css,
65449                shorthands::text_decoration::to_css,
65450                shorthands::transition::to_css,
65451                shorthands::animation::to_css,
65452                all_to_css,
65453        ];
65454
65455        LONGHANDS_TO_CSS[self as usize](declarations, dest)
65456    }
65457
65458    /// Returns PropertyFlags for the given shorthand property.
65459    #[inline]
65460    pub fn flags(self) -> PropertyFlags {
65461        const FLAGS: [u16; 55] = [
65462                0,
65463                0,
65464                0,
65465                0,
65466                0,
65467                0,
65468                0,
65469                0,
65470                0,
65471                0,
65472                0,
65473                0,
65474                0,
65475                0,
65476                0,
65477                0,
65478                0,
65479                0,
65480                0,
65481                0,
65482                0,
65483                0,
65484                0,
65485                0,
65486                0,
65487                0,
65488                0,
65489                0,
65490                0,
65491                0,
65492                0,
65493                0,
65494                0,
65495                0,
65496                0,
65497                0,
65498                0,
65499                0,
65500                0,
65501                0,
65502                0,
65503                0,
65504                0,
65505                0,
65506                0,
65507                0,
65508                0,
65509                0,
65510                0,
65511                0,
65512                0,
65513                0,
65514                0,
65515                0,
65516                0,
65517        ];
65518        PropertyFlags::from_bits_retain(FLAGS[self as usize])
65519    }
65520
65521    /// Returns the order in which this property appears relative to other
65522    /// shorthands in idl-name-sorting order.
65523    #[inline]
65524    pub fn idl_name_sort_order(self) -> u32 {
65525        
65526        static IDL_NAME_SORT_ORDER: [u32; 55] = [
65527            2,
65528            3,
65529            12,
65530            23,
65531            25,
65532            24,
65533            22,
65534            11,
65535            20,
65536            8,
65537            7,
65538            17,
65539            16,
65540            4,
65541            21,
65542            13,
65543            10,
65544            9,
65545            6,
65546            19,
65547            18,
65548            15,
65549            5,
65550            14,
65551            45,
65552            26,
65553            29,
65554            30,
65555            54,
65556            40,
65557            41,
65558            42,
65559            43,
65560            44,
65561            46,
65562            47,
65563            48,
65564            28,
65565            27,
65566            31,
65567            35,
65568            34,
65569            33,
65570            36,
65571            32,
65572            49,
65573            51,
65574            50,
65575            37,
65576            38,
65577            39,
65578            52,
65579            53,
65580            1,
65581            0,
65582        ];
65583        IDL_NAME_SORT_ORDER[self as usize]
65584    }
65585
65586    pub(super) fn parse_into<'i, 't>(
65587        self,
65588        declarations: &mut SourcePropertyDeclaration,
65589        context: &ParserContext,
65590        input: &mut Parser<'i, 't>,
65591    ) -> Result<(), ParseError<'i>> {
65592        type ParseIntoFn = for<'i, 't> fn(
65593            declarations: &mut SourcePropertyDeclaration,
65594            context: &ParserContext,
65595            input: &mut Parser<'i, 't>,
65596        ) -> Result<(), ParseError<'i>>;
65597
65598        fn parse_all<'i, 't>(
65599            _: &mut SourcePropertyDeclaration,
65600            _: &ParserContext,
65601            input: &mut Parser<'i, 't>
65602        ) -> Result<(), ParseError<'i>> {
65603            // 'all' accepts no value other than CSS-wide keywords
65604            Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
65605        }
65606
65607        static PARSE_INTO: [ParseIntoFn; 55] = [
65608            shorthands::background::parse_into,
65609            shorthands::background_position::parse_into,
65610            shorthands::border_color::parse_into,
65611            shorthands::border_style::parse_into,
65612            shorthands::border_width::parse_into,
65613            shorthands::border_top::parse_into,
65614            shorthands::border_right::parse_into,
65615            shorthands::border_bottom::parse_into,
65616            shorthands::border_left::parse_into,
65617            shorthands::border_block_start::parse_into,
65618            shorthands::border_block_end::parse_into,
65619            shorthands::border_inline_start::parse_into,
65620            shorthands::border_inline_end::parse_into,
65621            shorthands::border::parse_into,
65622            shorthands::border_radius::parse_into,
65623            shorthands::border_image::parse_into,
65624            shorthands::border_block_width::parse_into,
65625            shorthands::border_block_style::parse_into,
65626            shorthands::border_block_color::parse_into,
65627            shorthands::border_inline_width::parse_into,
65628            shorthands::border_inline_style::parse_into,
65629            shorthands::border_inline_color::parse_into,
65630            shorthands::border_block::parse_into,
65631            shorthands::border_inline::parse_into,
65632            shorthands::overflow::parse_into,
65633            shorthands::columns::parse_into,
65634            shorthands::font::parse_into,
65635            shorthands::font_variant::parse_into,
65636            shorthands::white_space::parse_into,
65637            shorthands::list_style::parse_into,
65638            shorthands::margin::parse_into,
65639            shorthands::margin_block::parse_into,
65640            shorthands::margin_inline::parse_into,
65641            shorthands::outline::parse_into,
65642            shorthands::padding::parse_into,
65643            shorthands::padding_block::parse_into,
65644            shorthands::padding_inline::parse_into,
65645            shorthands::flex_flow::parse_into,
65646            shorthands::flex::parse_into,
65647            shorthands::gap::parse_into,
65648            shorthands::grid_row::parse_into,
65649            shorthands::grid_column::parse_into,
65650            shorthands::grid_area::parse_into,
65651            shorthands::grid_template::parse_into,
65652            shorthands::grid::parse_into,
65653            shorthands::place_content::parse_into,
65654            shorthands::place_self::parse_into,
65655            shorthands::place_items::parse_into,
65656            shorthands::inset::parse_into,
65657            shorthands::inset_block::parse_into,
65658            shorthands::inset_inline::parse_into,
65659            shorthands::text_decoration::parse_into,
65660            shorthands::transition::parse_into,
65661            shorthands::animation::parse_into,
65662            parse_all,
65663        ];
65664
65665        (PARSE_INTO[self as usize])(declarations, context, input)
65666    }
65667}
65668
65669/// The counted unknown property list which is used for css use counters.
65670///
65671/// FIXME: This should be just #[repr(u8)], but can't be because of ABI issues,
65672/// see https://bugs.llvm.org/show_bug.cgi?id=44228.
65673#[derive(Clone, Copy, Debug, Eq, FromPrimitive, Hash, PartialEq)]
65674#[repr(u32)]
65675pub enum CountedUnknownProperty {
65676    /// -webkit-tap-highlight-color
65677    WebkitTapHighlightColor,
65678    /// speak
65679    Speak,
65680    /// text-size-adjust
65681    TextSizeAdjust,
65682    /// -webkit-user-drag
65683    WebkitUserDrag,
65684    /// orphans
65685    Orphans,
65686    /// widows
65687    Widows,
65688    /// -webkit-user-modify
65689    WebkitUserModify,
65690    /// -webkit-margin-before
65691    WebkitMarginBefore,
65692    /// -webkit-margin-after
65693    WebkitMarginAfter,
65694    /// -webkit-margin-start
65695    WebkitMarginStart,
65696    /// -webkit-column-break-inside
65697    WebkitColumnBreakInside,
65698    /// -webkit-padding-start
65699    WebkitPaddingStart,
65700    /// -webkit-margin-end
65701    WebkitMarginEnd,
65702    /// -webkit-box-reflect
65703    WebkitBoxReflect,
65704    /// -webkit-print-color-adjust
65705    WebkitPrintColorAdjust,
65706    /// -webkit-mask-box-image
65707    WebkitMaskBoxImage,
65708    /// -webkit-line-break
65709    WebkitLineBreak,
65710    /// alignment-baseline
65711    AlignmentBaseline,
65712    /// -webkit-writing-mode
65713    WebkitWritingMode,
65714    /// baseline-shift
65715    BaselineShift,
65716    /// -webkit-hyphenate-character
65717    WebkitHyphenateCharacter,
65718    /// -webkit-highlight
65719    WebkitHighlight,
65720    /// background-repeat-x
65721    BackgroundRepeatX,
65722    /// -webkit-padding-end
65723    WebkitPaddingEnd,
65724    /// background-repeat-y
65725    BackgroundRepeatY,
65726    /// -webkit-text-emphasis-color
65727    WebkitTextEmphasisColor,
65728    /// -webkit-margin-top-collapse
65729    WebkitMarginTopCollapse,
65730    /// -webkit-rtl-ordering
65731    WebkitRtlOrdering,
65732    /// -webkit-padding-before
65733    WebkitPaddingBefore,
65734    /// -webkit-text-decorations-in-effect
65735    WebkitTextDecorationsInEffect,
65736    /// -webkit-border-vertical-spacing
65737    WebkitBorderVerticalSpacing,
65738    /// -webkit-locale
65739    WebkitLocale,
65740    /// -webkit-padding-after
65741    WebkitPaddingAfter,
65742    /// -webkit-border-horizontal-spacing
65743    WebkitBorderHorizontalSpacing,
65744    /// color-rendering
65745    ColorRendering,
65746    /// -webkit-column-break-before
65747    WebkitColumnBreakBefore,
65748    /// -webkit-transform-origin-x
65749    WebkitTransformOriginX,
65750    /// -webkit-transform-origin-y
65751    WebkitTransformOriginY,
65752    /// -webkit-text-emphasis-position
65753    WebkitTextEmphasisPosition,
65754    /// buffered-rendering
65755    BufferedRendering,
65756    /// -webkit-text-orientation
65757    WebkitTextOrientation,
65758    /// -webkit-text-combine
65759    WebkitTextCombine,
65760    /// -webkit-text-emphasis-style
65761    WebkitTextEmphasisStyle,
65762    /// -webkit-text-emphasis
65763    WebkitTextEmphasis,
65764    /// -webkit-mask-box-image-width
65765    WebkitMaskBoxImageWidth,
65766    /// -webkit-mask-box-image-source
65767    WebkitMaskBoxImageSource,
65768    /// -webkit-mask-box-image-outset
65769    WebkitMaskBoxImageOutset,
65770    /// -webkit-mask-box-image-slice
65771    WebkitMaskBoxImageSlice,
65772    /// -webkit-mask-box-image-repeat
65773    WebkitMaskBoxImageRepeat,
65774    /// -webkit-margin-after-collapse
65775    WebkitMarginAfterCollapse,
65776    /// -webkit-border-before-color
65777    WebkitBorderBeforeColor,
65778    /// -webkit-border-before-width
65779    WebkitBorderBeforeWidth,
65780    /// -webkit-perspective-origin-x
65781    WebkitPerspectiveOriginX,
65782    /// -webkit-perspective-origin-y
65783    WebkitPerspectiveOriginY,
65784    /// -webkit-margin-before-collapse
65785    WebkitMarginBeforeCollapse,
65786    /// -webkit-border-before-style
65787    WebkitBorderBeforeStyle,
65788    /// -webkit-margin-bottom-collapse
65789    WebkitMarginBottomCollapse,
65790    /// -webkit-ruby-position
65791    WebkitRubyPosition,
65792    /// -webkit-column-break-after
65793    WebkitColumnBreakAfter,
65794    /// -webkit-margin-collapse
65795    WebkitMarginCollapse,
65796    /// -webkit-border-before
65797    WebkitBorderBefore,
65798    /// -webkit-border-end
65799    WebkitBorderEnd,
65800    /// -webkit-border-after
65801    WebkitBorderAfter,
65802    /// -webkit-border-start
65803    WebkitBorderStart,
65804    /// -webkit-min-logical-width
65805    WebkitMinLogicalWidth,
65806    /// -webkit-logical-height
65807    WebkitLogicalHeight,
65808    /// -webkit-transform-origin-z
65809    WebkitTransformOriginZ,
65810    /// -webkit-font-size-delta
65811    WebkitFontSizeDelta,
65812    /// -webkit-logical-width
65813    WebkitLogicalWidth,
65814    /// -webkit-max-logical-width
65815    WebkitMaxLogicalWidth,
65816    /// -webkit-min-logical-height
65817    WebkitMinLogicalHeight,
65818    /// -webkit-max-logical-height
65819    WebkitMaxLogicalHeight,
65820    /// -webkit-border-end-color
65821    WebkitBorderEndColor,
65822    /// -webkit-border-end-width
65823    WebkitBorderEndWidth,
65824    /// -webkit-border-start-color
65825    WebkitBorderStartColor,
65826    /// -webkit-border-start-width
65827    WebkitBorderStartWidth,
65828    /// -webkit-border-after-color
65829    WebkitBorderAfterColor,
65830    /// -webkit-border-after-width
65831    WebkitBorderAfterWidth,
65832    /// -webkit-border-end-style
65833    WebkitBorderEndStyle,
65834    /// -webkit-border-after-style
65835    WebkitBorderAfterStyle,
65836    /// -webkit-border-start-style
65837    WebkitBorderStartStyle,
65838    /// -webkit-mask-repeat-x
65839    WebkitMaskRepeatX,
65840    /// -webkit-mask-repeat-y
65841    WebkitMaskRepeatY,
65842    /// user-zoom
65843    UserZoom,
65844    /// min-zoom
65845    MinZoom,
65846    /// -webkit-box-decoration-break
65847    WebkitBoxDecorationBreak,
65848    /// orientation
65849    Orientation,
65850    /// max-zoom
65851    MaxZoom,
65852    /// -webkit-app-region
65853    WebkitAppRegion,
65854    /// -webkit-column-rule
65855    WebkitColumnRule,
65856    /// -webkit-column-span
65857    WebkitColumnSpan,
65858    /// -webkit-column-gap
65859    WebkitColumnGap,
65860    /// -webkit-shape-outside
65861    WebkitShapeOutside,
65862    /// -webkit-column-rule-width
65863    WebkitColumnRuleWidth,
65864    /// -webkit-column-count
65865    WebkitColumnCount,
65866    /// -webkit-opacity
65867    WebkitOpacity,
65868    /// -webkit-column-width
65869    WebkitColumnWidth,
65870    /// -webkit-shape-image-threshold
65871    WebkitShapeImageThreshold,
65872    /// -webkit-column-rule-style
65873    WebkitColumnRuleStyle,
65874    /// -webkit-columns
65875    WebkitColumns,
65876    /// -webkit-column-rule-color
65877    WebkitColumnRuleColor,
65878    /// -webkit-shape-margin
65879    WebkitShapeMargin,
65880}
65881
65882impl CountedUnknownProperty {
65883    /// Parse the counted unknown property, for testing purposes only.
65884    pub fn parse_for_testing(property_name: &str) -> Option<Self> {
65885        ascii_case_insensitive_phf_map! {
65886            unknown_ids -> CountedUnknownProperty = {
65887                "-webkit-tap-highlight-color" => CountedUnknownProperty::WebkitTapHighlightColor,
65888                "speak" => CountedUnknownProperty::Speak,
65889                "text-size-adjust" => CountedUnknownProperty::TextSizeAdjust,
65890                "-webkit-user-drag" => CountedUnknownProperty::WebkitUserDrag,
65891                "orphans" => CountedUnknownProperty::Orphans,
65892                "widows" => CountedUnknownProperty::Widows,
65893                "-webkit-user-modify" => CountedUnknownProperty::WebkitUserModify,
65894                "-webkit-margin-before" => CountedUnknownProperty::WebkitMarginBefore,
65895                "-webkit-margin-after" => CountedUnknownProperty::WebkitMarginAfter,
65896                "-webkit-margin-start" => CountedUnknownProperty::WebkitMarginStart,
65897                "-webkit-column-break-inside" => CountedUnknownProperty::WebkitColumnBreakInside,
65898                "-webkit-padding-start" => CountedUnknownProperty::WebkitPaddingStart,
65899                "-webkit-margin-end" => CountedUnknownProperty::WebkitMarginEnd,
65900                "-webkit-box-reflect" => CountedUnknownProperty::WebkitBoxReflect,
65901                "-webkit-print-color-adjust" => CountedUnknownProperty::WebkitPrintColorAdjust,
65902                "-webkit-mask-box-image" => CountedUnknownProperty::WebkitMaskBoxImage,
65903                "-webkit-line-break" => CountedUnknownProperty::WebkitLineBreak,
65904                "alignment-baseline" => CountedUnknownProperty::AlignmentBaseline,
65905                "-webkit-writing-mode" => CountedUnknownProperty::WebkitWritingMode,
65906                "baseline-shift" => CountedUnknownProperty::BaselineShift,
65907                "-webkit-hyphenate-character" => CountedUnknownProperty::WebkitHyphenateCharacter,
65908                "-webkit-highlight" => CountedUnknownProperty::WebkitHighlight,
65909                "background-repeat-x" => CountedUnknownProperty::BackgroundRepeatX,
65910                "-webkit-padding-end" => CountedUnknownProperty::WebkitPaddingEnd,
65911                "background-repeat-y" => CountedUnknownProperty::BackgroundRepeatY,
65912                "-webkit-text-emphasis-color" => CountedUnknownProperty::WebkitTextEmphasisColor,
65913                "-webkit-margin-top-collapse" => CountedUnknownProperty::WebkitMarginTopCollapse,
65914                "-webkit-rtl-ordering" => CountedUnknownProperty::WebkitRtlOrdering,
65915                "-webkit-padding-before" => CountedUnknownProperty::WebkitPaddingBefore,
65916                "-webkit-text-decorations-in-effect" => CountedUnknownProperty::WebkitTextDecorationsInEffect,
65917                "-webkit-border-vertical-spacing" => CountedUnknownProperty::WebkitBorderVerticalSpacing,
65918                "-webkit-locale" => CountedUnknownProperty::WebkitLocale,
65919                "-webkit-padding-after" => CountedUnknownProperty::WebkitPaddingAfter,
65920                "-webkit-border-horizontal-spacing" => CountedUnknownProperty::WebkitBorderHorizontalSpacing,
65921                "color-rendering" => CountedUnknownProperty::ColorRendering,
65922                "-webkit-column-break-before" => CountedUnknownProperty::WebkitColumnBreakBefore,
65923                "-webkit-transform-origin-x" => CountedUnknownProperty::WebkitTransformOriginX,
65924                "-webkit-transform-origin-y" => CountedUnknownProperty::WebkitTransformOriginY,
65925                "-webkit-text-emphasis-position" => CountedUnknownProperty::WebkitTextEmphasisPosition,
65926                "buffered-rendering" => CountedUnknownProperty::BufferedRendering,
65927                "-webkit-text-orientation" => CountedUnknownProperty::WebkitTextOrientation,
65928                "-webkit-text-combine" => CountedUnknownProperty::WebkitTextCombine,
65929                "-webkit-text-emphasis-style" => CountedUnknownProperty::WebkitTextEmphasisStyle,
65930                "-webkit-text-emphasis" => CountedUnknownProperty::WebkitTextEmphasis,
65931                "-webkit-mask-box-image-width" => CountedUnknownProperty::WebkitMaskBoxImageWidth,
65932                "-webkit-mask-box-image-source" => CountedUnknownProperty::WebkitMaskBoxImageSource,
65933                "-webkit-mask-box-image-outset" => CountedUnknownProperty::WebkitMaskBoxImageOutset,
65934                "-webkit-mask-box-image-slice" => CountedUnknownProperty::WebkitMaskBoxImageSlice,
65935                "-webkit-mask-box-image-repeat" => CountedUnknownProperty::WebkitMaskBoxImageRepeat,
65936                "-webkit-margin-after-collapse" => CountedUnknownProperty::WebkitMarginAfterCollapse,
65937                "-webkit-border-before-color" => CountedUnknownProperty::WebkitBorderBeforeColor,
65938                "-webkit-border-before-width" => CountedUnknownProperty::WebkitBorderBeforeWidth,
65939                "-webkit-perspective-origin-x" => CountedUnknownProperty::WebkitPerspectiveOriginX,
65940                "-webkit-perspective-origin-y" => CountedUnknownProperty::WebkitPerspectiveOriginY,
65941                "-webkit-margin-before-collapse" => CountedUnknownProperty::WebkitMarginBeforeCollapse,
65942                "-webkit-border-before-style" => CountedUnknownProperty::WebkitBorderBeforeStyle,
65943                "-webkit-margin-bottom-collapse" => CountedUnknownProperty::WebkitMarginBottomCollapse,
65944                "-webkit-ruby-position" => CountedUnknownProperty::WebkitRubyPosition,
65945                "-webkit-column-break-after" => CountedUnknownProperty::WebkitColumnBreakAfter,
65946                "-webkit-margin-collapse" => CountedUnknownProperty::WebkitMarginCollapse,
65947                "-webkit-border-before" => CountedUnknownProperty::WebkitBorderBefore,
65948                "-webkit-border-end" => CountedUnknownProperty::WebkitBorderEnd,
65949                "-webkit-border-after" => CountedUnknownProperty::WebkitBorderAfter,
65950                "-webkit-border-start" => CountedUnknownProperty::WebkitBorderStart,
65951                "-webkit-min-logical-width" => CountedUnknownProperty::WebkitMinLogicalWidth,
65952                "-webkit-logical-height" => CountedUnknownProperty::WebkitLogicalHeight,
65953                "-webkit-transform-origin-z" => CountedUnknownProperty::WebkitTransformOriginZ,
65954                "-webkit-font-size-delta" => CountedUnknownProperty::WebkitFontSizeDelta,
65955                "-webkit-logical-width" => CountedUnknownProperty::WebkitLogicalWidth,
65956                "-webkit-max-logical-width" => CountedUnknownProperty::WebkitMaxLogicalWidth,
65957                "-webkit-min-logical-height" => CountedUnknownProperty::WebkitMinLogicalHeight,
65958                "-webkit-max-logical-height" => CountedUnknownProperty::WebkitMaxLogicalHeight,
65959                "-webkit-border-end-color" => CountedUnknownProperty::WebkitBorderEndColor,
65960                "-webkit-border-end-width" => CountedUnknownProperty::WebkitBorderEndWidth,
65961                "-webkit-border-start-color" => CountedUnknownProperty::WebkitBorderStartColor,
65962                "-webkit-border-start-width" => CountedUnknownProperty::WebkitBorderStartWidth,
65963                "-webkit-border-after-color" => CountedUnknownProperty::WebkitBorderAfterColor,
65964                "-webkit-border-after-width" => CountedUnknownProperty::WebkitBorderAfterWidth,
65965                "-webkit-border-end-style" => CountedUnknownProperty::WebkitBorderEndStyle,
65966                "-webkit-border-after-style" => CountedUnknownProperty::WebkitBorderAfterStyle,
65967                "-webkit-border-start-style" => CountedUnknownProperty::WebkitBorderStartStyle,
65968                "-webkit-mask-repeat-x" => CountedUnknownProperty::WebkitMaskRepeatX,
65969                "-webkit-mask-repeat-y" => CountedUnknownProperty::WebkitMaskRepeatY,
65970                "user-zoom" => CountedUnknownProperty::UserZoom,
65971                "min-zoom" => CountedUnknownProperty::MinZoom,
65972                "-webkit-box-decoration-break" => CountedUnknownProperty::WebkitBoxDecorationBreak,
65973                "orientation" => CountedUnknownProperty::Orientation,
65974                "max-zoom" => CountedUnknownProperty::MaxZoom,
65975                "-webkit-app-region" => CountedUnknownProperty::WebkitAppRegion,
65976                "-webkit-column-rule" => CountedUnknownProperty::WebkitColumnRule,
65977                "-webkit-column-span" => CountedUnknownProperty::WebkitColumnSpan,
65978                "-webkit-column-gap" => CountedUnknownProperty::WebkitColumnGap,
65979                "-webkit-shape-outside" => CountedUnknownProperty::WebkitShapeOutside,
65980                "-webkit-column-rule-width" => CountedUnknownProperty::WebkitColumnRuleWidth,
65981                "-webkit-column-count" => CountedUnknownProperty::WebkitColumnCount,
65982                "-webkit-opacity" => CountedUnknownProperty::WebkitOpacity,
65983                "-webkit-column-width" => CountedUnknownProperty::WebkitColumnWidth,
65984                "-webkit-shape-image-threshold" => CountedUnknownProperty::WebkitShapeImageThreshold,
65985                "-webkit-column-rule-style" => CountedUnknownProperty::WebkitColumnRuleStyle,
65986                "-webkit-columns" => CountedUnknownProperty::WebkitColumns,
65987                "-webkit-column-rule-color" => CountedUnknownProperty::WebkitColumnRuleColor,
65988                "-webkit-shape-margin" => CountedUnknownProperty::WebkitShapeMargin,
65989            }
65990        }
65991        unknown_ids::get(property_name).cloned()
65992    }
65993
65994    /// Returns the underlying index, used for use counter.
65995    #[inline]
65996    pub fn bit(self) -> usize {
65997        self as usize
65998    }
65999}
66000
66001impl PropertyId {
66002    /// Returns a given property from the given name, _regardless of whether it
66003    /// is enabled or not_, or Err(()) for unknown properties.
66004    pub(super) fn parse_unchecked(
66005        property_name: &str,
66006        use_counters: Option<&UseCounters>,
66007    ) -> Result<Self, ()> {
66008        // A special id for css use counters. ShorthandAlias is not used in the Servo build.
66009        // That's why we need to allow dead_code.
66010        pub enum StaticId {
66011            NonCustom(NonCustomPropertyId),
66012            CountedUnknown(CountedUnknownProperty),
66013        }
66014        ascii_case_insensitive_phf_map! {
66015            static_ids -> StaticId = {
66016                "align-content" => StaticId::NonCustom(NonCustomPropertyId(0)),
66017                "align-items" => StaticId::NonCustom(NonCustomPropertyId(1)),
66018                "align-self" => StaticId::NonCustom(NonCustomPropertyId(2)),
66019                "aspect-ratio" => StaticId::NonCustom(NonCustomPropertyId(3)),
66020                "backface-visibility" => StaticId::NonCustom(NonCustomPropertyId(4)),
66021                "baseline-source" => StaticId::NonCustom(NonCustomPropertyId(5)),
66022                "border-collapse" => StaticId::NonCustom(NonCustomPropertyId(6)),
66023                "border-image-repeat" => StaticId::NonCustom(NonCustomPropertyId(7)),
66024                "box-sizing" => StaticId::NonCustom(NonCustomPropertyId(8)),
66025                "caption-side" => StaticId::NonCustom(NonCustomPropertyId(9)),
66026                "clear" => StaticId::NonCustom(NonCustomPropertyId(10)),
66027                "column-count" => StaticId::NonCustom(NonCustomPropertyId(11)),
66028                "column-span" => StaticId::NonCustom(NonCustomPropertyId(12)),
66029                "contain" => StaticId::NonCustom(NonCustomPropertyId(13)),
66030                "container-type" => StaticId::NonCustom(NonCustomPropertyId(14)),
66031                "direction" => StaticId::NonCustom(NonCustomPropertyId(15)),
66032                "display" => StaticId::NonCustom(NonCustomPropertyId(16)),
66033                "empty-cells" => StaticId::NonCustom(NonCustomPropertyId(17)),
66034                "flex-direction" => StaticId::NonCustom(NonCustomPropertyId(18)),
66035                "flex-wrap" => StaticId::NonCustom(NonCustomPropertyId(19)),
66036                "float" => StaticId::NonCustom(NonCustomPropertyId(20)),
66037                "font-language-override" => StaticId::NonCustom(NonCustomPropertyId(21)),
66038                "font-stretch" => StaticId::NonCustom(NonCustomPropertyId(22)),
66039                "font-style" => StaticId::NonCustom(NonCustomPropertyId(23)),
66040                "font-variant-caps" => StaticId::NonCustom(NonCustomPropertyId(24)),
66041                "font-weight" => StaticId::NonCustom(NonCustomPropertyId(25)),
66042                "grid-auto-flow" => StaticId::NonCustom(NonCustomPropertyId(26)),
66043                "image-rendering" => StaticId::NonCustom(NonCustomPropertyId(27)),
66044                "isolation" => StaticId::NonCustom(NonCustomPropertyId(28)),
66045                "justify-content" => StaticId::NonCustom(NonCustomPropertyId(29)),
66046                "justify-items" => StaticId::NonCustom(NonCustomPropertyId(30)),
66047                "justify-self" => StaticId::NonCustom(NonCustomPropertyId(31)),
66048                "list-style-position" => StaticId::NonCustom(NonCustomPropertyId(32)),
66049                "list-style-type" => StaticId::NonCustom(NonCustomPropertyId(33)),
66050                "mix-blend-mode" => StaticId::NonCustom(NonCustomPropertyId(34)),
66051                "object-fit" => StaticId::NonCustom(NonCustomPropertyId(35)),
66052                "opacity" => StaticId::NonCustom(NonCustomPropertyId(36)),
66053                "order" => StaticId::NonCustom(NonCustomPropertyId(37)),
66054                "outline-style" => StaticId::NonCustom(NonCustomPropertyId(38)),
66055                "overflow-wrap" => StaticId::NonCustom(NonCustomPropertyId(39)),
66056                "pointer-events" => StaticId::NonCustom(NonCustomPropertyId(40)),
66057                "position" => StaticId::NonCustom(NonCustomPropertyId(41)),
66058                "-servo-overflow-clip-box" => StaticId::NonCustom(NonCustomPropertyId(42)),
66059                "-servo-top-layer" => StaticId::NonCustom(NonCustomPropertyId(43)),
66060                "table-layout" => StaticId::NonCustom(NonCustomPropertyId(44)),
66061                "text-align" => StaticId::NonCustom(NonCustomPropertyId(45)),
66062                "text-align-last" => StaticId::NonCustom(NonCustomPropertyId(46)),
66063                "text-decoration-line" => StaticId::NonCustom(NonCustomPropertyId(47)),
66064                "text-decoration-style" => StaticId::NonCustom(NonCustomPropertyId(48)),
66065                "text-justify" => StaticId::NonCustom(NonCustomPropertyId(49)),
66066                "text-rendering" => StaticId::NonCustom(NonCustomPropertyId(50)),
66067                "text-transform" => StaticId::NonCustom(NonCustomPropertyId(51)),
66068                "text-wrap-mode" => StaticId::NonCustom(NonCustomPropertyId(52)),
66069                "transform-style" => StaticId::NonCustom(NonCustomPropertyId(53)),
66070                "unicode-bidi" => StaticId::NonCustom(NonCustomPropertyId(54)),
66071                "visibility" => StaticId::NonCustom(NonCustomPropertyId(55)),
66072                "white-space-collapse" => StaticId::NonCustom(NonCustomPropertyId(56)),
66073                "word-break" => StaticId::NonCustom(NonCustomPropertyId(57)),
66074                "writing-mode" => StaticId::NonCustom(NonCustomPropertyId(58)),
66075                "z-index" => StaticId::NonCustom(NonCustomPropertyId(59)),
66076                "zoom" => StaticId::NonCustom(NonCustomPropertyId(60)),
66077                "flex-grow" => StaticId::NonCustom(NonCustomPropertyId(61)),
66078                "flex-shrink" => StaticId::NonCustom(NonCustomPropertyId(62)),
66079                "overflow-block" => StaticId::NonCustom(NonCustomPropertyId(63)),
66080                "overflow-inline" => StaticId::NonCustom(NonCustomPropertyId(64)),
66081                "overflow-x" => StaticId::NonCustom(NonCustomPropertyId(65)),
66082                "overflow-y" => StaticId::NonCustom(NonCustomPropertyId(66)),
66083                "border-block-end-style" => StaticId::NonCustom(NonCustomPropertyId(67)),
66084                "border-block-start-style" => StaticId::NonCustom(NonCustomPropertyId(68)),
66085                "border-bottom-style" => StaticId::NonCustom(NonCustomPropertyId(69)),
66086                "border-inline-end-style" => StaticId::NonCustom(NonCustomPropertyId(70)),
66087                "border-inline-start-style" => StaticId::NonCustom(NonCustomPropertyId(71)),
66088                "border-left-style" => StaticId::NonCustom(NonCustomPropertyId(72)),
66089                "border-right-style" => StaticId::NonCustom(NonCustomPropertyId(73)),
66090                "border-top-style" => StaticId::NonCustom(NonCustomPropertyId(74)),
66091                "animation-composition" => StaticId::NonCustom(NonCustomPropertyId(75)),
66092                "animation-delay" => StaticId::NonCustom(NonCustomPropertyId(76)),
66093                "animation-direction" => StaticId::NonCustom(NonCustomPropertyId(77)),
66094                "animation-duration" => StaticId::NonCustom(NonCustomPropertyId(78)),
66095                "animation-fill-mode" => StaticId::NonCustom(NonCustomPropertyId(79)),
66096                "animation-iteration-count" => StaticId::NonCustom(NonCustomPropertyId(80)),
66097                "animation-name" => StaticId::NonCustom(NonCustomPropertyId(81)),
66098                "animation-play-state" => StaticId::NonCustom(NonCustomPropertyId(82)),
66099                "animation-timeline" => StaticId::NonCustom(NonCustomPropertyId(83)),
66100                "animation-timing-function" => StaticId::NonCustom(NonCustomPropertyId(84)),
66101                "backdrop-filter" => StaticId::NonCustom(NonCustomPropertyId(85)),
66102                "background-attachment" => StaticId::NonCustom(NonCustomPropertyId(86)),
66103                "background-clip" => StaticId::NonCustom(NonCustomPropertyId(87)),
66104                "background-image" => StaticId::NonCustom(NonCustomPropertyId(88)),
66105                "background-origin" => StaticId::NonCustom(NonCustomPropertyId(89)),
66106                "background-position-x" => StaticId::NonCustom(NonCustomPropertyId(90)),
66107                "background-position-y" => StaticId::NonCustom(NonCustomPropertyId(91)),
66108                "background-repeat" => StaticId::NonCustom(NonCustomPropertyId(92)),
66109                "background-size" => StaticId::NonCustom(NonCustomPropertyId(93)),
66110                "border-image-outset" => StaticId::NonCustom(NonCustomPropertyId(94)),
66111                "border-image-slice" => StaticId::NonCustom(NonCustomPropertyId(95)),
66112                "border-image-width" => StaticId::NonCustom(NonCustomPropertyId(96)),
66113                "border-spacing" => StaticId::NonCustom(NonCustomPropertyId(97)),
66114                "box-shadow" => StaticId::NonCustom(NonCustomPropertyId(98)),
66115                "clip" => StaticId::NonCustom(NonCustomPropertyId(99)),
66116                "clip-path" => StaticId::NonCustom(NonCustomPropertyId(100)),
66117                "color" => StaticId::NonCustom(NonCustomPropertyId(101)),
66118                "color-scheme" => StaticId::NonCustom(NonCustomPropertyId(102)),
66119                "column-width" => StaticId::NonCustom(NonCustomPropertyId(103)),
66120                "container-name" => StaticId::NonCustom(NonCustomPropertyId(104)),
66121                "content" => StaticId::NonCustom(NonCustomPropertyId(105)),
66122                "counter-increment" => StaticId::NonCustom(NonCustomPropertyId(106)),
66123                "counter-reset" => StaticId::NonCustom(NonCustomPropertyId(107)),
66124                "cursor" => StaticId::NonCustom(NonCustomPropertyId(108)),
66125                "filter" => StaticId::NonCustom(NonCustomPropertyId(109)),
66126                "flex-basis" => StaticId::NonCustom(NonCustomPropertyId(110)),
66127                "font-family" => StaticId::NonCustom(NonCustomPropertyId(111)),
66128                "font-size" => StaticId::NonCustom(NonCustomPropertyId(112)),
66129                "font-variation-settings" => StaticId::NonCustom(NonCustomPropertyId(113)),
66130                "grid-template-areas" => StaticId::NonCustom(NonCustomPropertyId(114)),
66131                "letter-spacing" => StaticId::NonCustom(NonCustomPropertyId(115)),
66132                "line-height" => StaticId::NonCustom(NonCustomPropertyId(116)),
66133                "mask-image" => StaticId::NonCustom(NonCustomPropertyId(117)),
66134                "offset-path" => StaticId::NonCustom(NonCustomPropertyId(118)),
66135                "perspective" => StaticId::NonCustom(NonCustomPropertyId(119)),
66136                "quotes" => StaticId::NonCustom(NonCustomPropertyId(120)),
66137                "rotate" => StaticId::NonCustom(NonCustomPropertyId(121)),
66138                "scale" => StaticId::NonCustom(NonCustomPropertyId(122)),
66139                "text-indent" => StaticId::NonCustom(NonCustomPropertyId(123)),
66140                "text-overflow" => StaticId::NonCustom(NonCustomPropertyId(124)),
66141                "text-shadow" => StaticId::NonCustom(NonCustomPropertyId(125)),
66142                "transform" => StaticId::NonCustom(NonCustomPropertyId(126)),
66143                "transform-origin" => StaticId::NonCustom(NonCustomPropertyId(127)),
66144                "transition-behavior" => StaticId::NonCustom(NonCustomPropertyId(128)),
66145                "transition-delay" => StaticId::NonCustom(NonCustomPropertyId(129)),
66146                "transition-duration" => StaticId::NonCustom(NonCustomPropertyId(130)),
66147                "transition-property" => StaticId::NonCustom(NonCustomPropertyId(131)),
66148                "transition-timing-function" => StaticId::NonCustom(NonCustomPropertyId(132)),
66149                "translate" => StaticId::NonCustom(NonCustomPropertyId(133)),
66150                "vertical-align" => StaticId::NonCustom(NonCustomPropertyId(134)),
66151                "view-transition-class" => StaticId::NonCustom(NonCustomPropertyId(135)),
66152                "view-transition-name" => StaticId::NonCustom(NonCustomPropertyId(136)),
66153                "will-change" => StaticId::NonCustom(NonCustomPropertyId(137)),
66154                "word-spacing" => StaticId::NonCustom(NonCustomPropertyId(138)),
66155                "-x-lang" => StaticId::NonCustom(NonCustomPropertyId(139)),
66156                "object-position" => StaticId::NonCustom(NonCustomPropertyId(140)),
66157                "perspective-origin" => StaticId::NonCustom(NonCustomPropertyId(141)),
66158                "grid-template-columns" => StaticId::NonCustom(NonCustomPropertyId(142)),
66159                "grid-template-rows" => StaticId::NonCustom(NonCustomPropertyId(143)),
66160                "border-image-source" => StaticId::NonCustom(NonCustomPropertyId(144)),
66161                "list-style-image" => StaticId::NonCustom(NonCustomPropertyId(145)),
66162                "grid-auto-columns" => StaticId::NonCustom(NonCustomPropertyId(146)),
66163                "grid-auto-rows" => StaticId::NonCustom(NonCustomPropertyId(147)),
66164                "outline-offset" => StaticId::NonCustom(NonCustomPropertyId(148)),
66165                "overflow-clip-margin" => StaticId::NonCustom(NonCustomPropertyId(149)),
66166                "column-gap" => StaticId::NonCustom(NonCustomPropertyId(150)),
66167                "row-gap" => StaticId::NonCustom(NonCustomPropertyId(151)),
66168                "grid-column-end" => StaticId::NonCustom(NonCustomPropertyId(152)),
66169                "grid-column-start" => StaticId::NonCustom(NonCustomPropertyId(153)),
66170                "grid-row-end" => StaticId::NonCustom(NonCustomPropertyId(154)),
66171                "grid-row-start" => StaticId::NonCustom(NonCustomPropertyId(155)),
66172                "max-block-size" => StaticId::NonCustom(NonCustomPropertyId(156)),
66173                "max-height" => StaticId::NonCustom(NonCustomPropertyId(157)),
66174                "max-inline-size" => StaticId::NonCustom(NonCustomPropertyId(158)),
66175                "max-width" => StaticId::NonCustom(NonCustomPropertyId(159)),
66176                "border-bottom-left-radius" => StaticId::NonCustom(NonCustomPropertyId(160)),
66177                "border-bottom-right-radius" => StaticId::NonCustom(NonCustomPropertyId(161)),
66178                "border-end-end-radius" => StaticId::NonCustom(NonCustomPropertyId(162)),
66179                "border-end-start-radius" => StaticId::NonCustom(NonCustomPropertyId(163)),
66180                "border-start-end-radius" => StaticId::NonCustom(NonCustomPropertyId(164)),
66181                "border-start-start-radius" => StaticId::NonCustom(NonCustomPropertyId(165)),
66182                "border-top-left-radius" => StaticId::NonCustom(NonCustomPropertyId(166)),
66183                "border-top-right-radius" => StaticId::NonCustom(NonCustomPropertyId(167)),
66184                "bottom" => StaticId::NonCustom(NonCustomPropertyId(168)),
66185                "inset-block-end" => StaticId::NonCustom(NonCustomPropertyId(169)),
66186                "inset-block-start" => StaticId::NonCustom(NonCustomPropertyId(170)),
66187                "inset-inline-end" => StaticId::NonCustom(NonCustomPropertyId(171)),
66188                "inset-inline-start" => StaticId::NonCustom(NonCustomPropertyId(172)),
66189                "left" => StaticId::NonCustom(NonCustomPropertyId(173)),
66190                "right" => StaticId::NonCustom(NonCustomPropertyId(174)),
66191                "top" => StaticId::NonCustom(NonCustomPropertyId(175)),
66192                "margin-block-end" => StaticId::NonCustom(NonCustomPropertyId(176)),
66193                "margin-block-start" => StaticId::NonCustom(NonCustomPropertyId(177)),
66194                "margin-bottom" => StaticId::NonCustom(NonCustomPropertyId(178)),
66195                "margin-inline-end" => StaticId::NonCustom(NonCustomPropertyId(179)),
66196                "margin-inline-start" => StaticId::NonCustom(NonCustomPropertyId(180)),
66197                "margin-left" => StaticId::NonCustom(NonCustomPropertyId(181)),
66198                "margin-right" => StaticId::NonCustom(NonCustomPropertyId(182)),
66199                "margin-top" => StaticId::NonCustom(NonCustomPropertyId(183)),
66200                "padding-block-end" => StaticId::NonCustom(NonCustomPropertyId(184)),
66201                "padding-block-start" => StaticId::NonCustom(NonCustomPropertyId(185)),
66202                "padding-bottom" => StaticId::NonCustom(NonCustomPropertyId(186)),
66203                "padding-inline-end" => StaticId::NonCustom(NonCustomPropertyId(187)),
66204                "padding-inline-start" => StaticId::NonCustom(NonCustomPropertyId(188)),
66205                "padding-left" => StaticId::NonCustom(NonCustomPropertyId(189)),
66206                "padding-right" => StaticId::NonCustom(NonCustomPropertyId(190)),
66207                "padding-top" => StaticId::NonCustom(NonCustomPropertyId(191)),
66208                "block-size" => StaticId::NonCustom(NonCustomPropertyId(192)),
66209                "height" => StaticId::NonCustom(NonCustomPropertyId(193)),
66210                "inline-size" => StaticId::NonCustom(NonCustomPropertyId(194)),
66211                "min-block-size" => StaticId::NonCustom(NonCustomPropertyId(195)),
66212                "min-height" => StaticId::NonCustom(NonCustomPropertyId(196)),
66213                "min-inline-size" => StaticId::NonCustom(NonCustomPropertyId(197)),
66214                "min-width" => StaticId::NonCustom(NonCustomPropertyId(198)),
66215                "width" => StaticId::NonCustom(NonCustomPropertyId(199)),
66216                "border-block-end-width" => StaticId::NonCustom(NonCustomPropertyId(200)),
66217                "border-block-start-width" => StaticId::NonCustom(NonCustomPropertyId(201)),
66218                "border-bottom-width" => StaticId::NonCustom(NonCustomPropertyId(202)),
66219                "border-inline-end-width" => StaticId::NonCustom(NonCustomPropertyId(203)),
66220                "border-inline-start-width" => StaticId::NonCustom(NonCustomPropertyId(204)),
66221                "border-left-width" => StaticId::NonCustom(NonCustomPropertyId(205)),
66222                "border-right-width" => StaticId::NonCustom(NonCustomPropertyId(206)),
66223                "border-top-width" => StaticId::NonCustom(NonCustomPropertyId(207)),
66224                "outline-width" => StaticId::NonCustom(NonCustomPropertyId(208)),
66225                "background-color" => StaticId::NonCustom(NonCustomPropertyId(209)),
66226                "border-block-end-color" => StaticId::NonCustom(NonCustomPropertyId(210)),
66227                "border-block-start-color" => StaticId::NonCustom(NonCustomPropertyId(211)),
66228                "border-bottom-color" => StaticId::NonCustom(NonCustomPropertyId(212)),
66229                "border-inline-end-color" => StaticId::NonCustom(NonCustomPropertyId(213)),
66230                "border-inline-start-color" => StaticId::NonCustom(NonCustomPropertyId(214)),
66231                "border-left-color" => StaticId::NonCustom(NonCustomPropertyId(215)),
66232                "border-right-color" => StaticId::NonCustom(NonCustomPropertyId(216)),
66233                "border-top-color" => StaticId::NonCustom(NonCustomPropertyId(217)),
66234                "outline-color" => StaticId::NonCustom(NonCustomPropertyId(218)),
66235                "text-decoration-color" => StaticId::NonCustom(NonCustomPropertyId(219)),
66236                "background" => StaticId::NonCustom(NonCustomPropertyId(220)),
66237                "background-position" => StaticId::NonCustom(NonCustomPropertyId(221)),
66238                "border-color" => StaticId::NonCustom(NonCustomPropertyId(222)),
66239                "border-style" => StaticId::NonCustom(NonCustomPropertyId(223)),
66240                "border-width" => StaticId::NonCustom(NonCustomPropertyId(224)),
66241                "border-top" => StaticId::NonCustom(NonCustomPropertyId(225)),
66242                "border-right" => StaticId::NonCustom(NonCustomPropertyId(226)),
66243                "border-bottom" => StaticId::NonCustom(NonCustomPropertyId(227)),
66244                "border-left" => StaticId::NonCustom(NonCustomPropertyId(228)),
66245                "border-block-start" => StaticId::NonCustom(NonCustomPropertyId(229)),
66246                "border-block-end" => StaticId::NonCustom(NonCustomPropertyId(230)),
66247                "border-inline-start" => StaticId::NonCustom(NonCustomPropertyId(231)),
66248                "border-inline-end" => StaticId::NonCustom(NonCustomPropertyId(232)),
66249                "border" => StaticId::NonCustom(NonCustomPropertyId(233)),
66250                "border-radius" => StaticId::NonCustom(NonCustomPropertyId(234)),
66251                "border-image" => StaticId::NonCustom(NonCustomPropertyId(235)),
66252                "border-block-width" => StaticId::NonCustom(NonCustomPropertyId(236)),
66253                "border-block-style" => StaticId::NonCustom(NonCustomPropertyId(237)),
66254                "border-block-color" => StaticId::NonCustom(NonCustomPropertyId(238)),
66255                "border-inline-width" => StaticId::NonCustom(NonCustomPropertyId(239)),
66256                "border-inline-style" => StaticId::NonCustom(NonCustomPropertyId(240)),
66257                "border-inline-color" => StaticId::NonCustom(NonCustomPropertyId(241)),
66258                "border-block" => StaticId::NonCustom(NonCustomPropertyId(242)),
66259                "border-inline" => StaticId::NonCustom(NonCustomPropertyId(243)),
66260                "overflow" => StaticId::NonCustom(NonCustomPropertyId(244)),
66261                "columns" => StaticId::NonCustom(NonCustomPropertyId(245)),
66262                "font" => StaticId::NonCustom(NonCustomPropertyId(246)),
66263                "font-variant" => StaticId::NonCustom(NonCustomPropertyId(247)),
66264                "white-space" => StaticId::NonCustom(NonCustomPropertyId(248)),
66265                "list-style" => StaticId::NonCustom(NonCustomPropertyId(249)),
66266                "margin" => StaticId::NonCustom(NonCustomPropertyId(250)),
66267                "margin-block" => StaticId::NonCustom(NonCustomPropertyId(251)),
66268                "margin-inline" => StaticId::NonCustom(NonCustomPropertyId(252)),
66269                "outline" => StaticId::NonCustom(NonCustomPropertyId(253)),
66270                "padding" => StaticId::NonCustom(NonCustomPropertyId(254)),
66271                "padding-block" => StaticId::NonCustom(NonCustomPropertyId(255)),
66272                "padding-inline" => StaticId::NonCustom(NonCustomPropertyId(256)),
66273                "flex-flow" => StaticId::NonCustom(NonCustomPropertyId(257)),
66274                "flex" => StaticId::NonCustom(NonCustomPropertyId(258)),
66275                "gap" => StaticId::NonCustom(NonCustomPropertyId(259)),
66276                "grid-row" => StaticId::NonCustom(NonCustomPropertyId(260)),
66277                "grid-column" => StaticId::NonCustom(NonCustomPropertyId(261)),
66278                "grid-area" => StaticId::NonCustom(NonCustomPropertyId(262)),
66279                "grid-template" => StaticId::NonCustom(NonCustomPropertyId(263)),
66280                "grid" => StaticId::NonCustom(NonCustomPropertyId(264)),
66281                "place-content" => StaticId::NonCustom(NonCustomPropertyId(265)),
66282                "place-self" => StaticId::NonCustom(NonCustomPropertyId(266)),
66283                "place-items" => StaticId::NonCustom(NonCustomPropertyId(267)),
66284                "inset" => StaticId::NonCustom(NonCustomPropertyId(268)),
66285                "inset-block" => StaticId::NonCustom(NonCustomPropertyId(269)),
66286                "inset-inline" => StaticId::NonCustom(NonCustomPropertyId(270)),
66287                "text-decoration" => StaticId::NonCustom(NonCustomPropertyId(271)),
66288                "transition" => StaticId::NonCustom(NonCustomPropertyId(272)),
66289                "animation" => StaticId::NonCustom(NonCustomPropertyId(273)),
66290                "all" => StaticId::NonCustom(NonCustomPropertyId(274)),
66291                "word-wrap" => StaticId::NonCustom(NonCustomPropertyId(275)),
66292                "grid-column-gap" => StaticId::NonCustom(NonCustomPropertyId(276)),
66293                "grid-row-gap" => StaticId::NonCustom(NonCustomPropertyId(277)),
66294                "grid-gap" => StaticId::NonCustom(NonCustomPropertyId(278)),
66295                "-webkit-tap-highlight-color" => {
66296                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitTapHighlightColor)
66297                },
66298                "speak" => {
66299                    StaticId::CountedUnknown(CountedUnknownProperty::Speak)
66300                },
66301                "text-size-adjust" => {
66302                    StaticId::CountedUnknown(CountedUnknownProperty::TextSizeAdjust)
66303                },
66304                "-webkit-user-drag" => {
66305                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitUserDrag)
66306                },
66307                "orphans" => {
66308                    StaticId::CountedUnknown(CountedUnknownProperty::Orphans)
66309                },
66310                "widows" => {
66311                    StaticId::CountedUnknown(CountedUnknownProperty::Widows)
66312                },
66313                "-webkit-user-modify" => {
66314                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitUserModify)
66315                },
66316                "-webkit-margin-before" => {
66317                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMarginBefore)
66318                },
66319                "-webkit-margin-after" => {
66320                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMarginAfter)
66321                },
66322                "-webkit-margin-start" => {
66323                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMarginStart)
66324                },
66325                "-webkit-column-break-inside" => {
66326                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitColumnBreakInside)
66327                },
66328                "-webkit-padding-start" => {
66329                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitPaddingStart)
66330                },
66331                "-webkit-margin-end" => {
66332                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMarginEnd)
66333                },
66334                "-webkit-box-reflect" => {
66335                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitBoxReflect)
66336                },
66337                "-webkit-print-color-adjust" => {
66338                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitPrintColorAdjust)
66339                },
66340                "-webkit-mask-box-image" => {
66341                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMaskBoxImage)
66342                },
66343                "-webkit-line-break" => {
66344                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitLineBreak)
66345                },
66346                "alignment-baseline" => {
66347                    StaticId::CountedUnknown(CountedUnknownProperty::AlignmentBaseline)
66348                },
66349                "-webkit-writing-mode" => {
66350                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitWritingMode)
66351                },
66352                "baseline-shift" => {
66353                    StaticId::CountedUnknown(CountedUnknownProperty::BaselineShift)
66354                },
66355                "-webkit-hyphenate-character" => {
66356                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitHyphenateCharacter)
66357                },
66358                "-webkit-highlight" => {
66359                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitHighlight)
66360                },
66361                "background-repeat-x" => {
66362                    StaticId::CountedUnknown(CountedUnknownProperty::BackgroundRepeatX)
66363                },
66364                "-webkit-padding-end" => {
66365                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitPaddingEnd)
66366                },
66367                "background-repeat-y" => {
66368                    StaticId::CountedUnknown(CountedUnknownProperty::BackgroundRepeatY)
66369                },
66370                "-webkit-text-emphasis-color" => {
66371                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitTextEmphasisColor)
66372                },
66373                "-webkit-margin-top-collapse" => {
66374                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMarginTopCollapse)
66375                },
66376                "-webkit-rtl-ordering" => {
66377                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitRtlOrdering)
66378                },
66379                "-webkit-padding-before" => {
66380                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitPaddingBefore)
66381                },
66382                "-webkit-text-decorations-in-effect" => {
66383                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitTextDecorationsInEffect)
66384                },
66385                "-webkit-border-vertical-spacing" => {
66386                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitBorderVerticalSpacing)
66387                },
66388                "-webkit-locale" => {
66389                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitLocale)
66390                },
66391                "-webkit-padding-after" => {
66392                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitPaddingAfter)
66393                },
66394                "-webkit-border-horizontal-spacing" => {
66395                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitBorderHorizontalSpacing)
66396                },
66397                "color-rendering" => {
66398                    StaticId::CountedUnknown(CountedUnknownProperty::ColorRendering)
66399                },
66400                "-webkit-column-break-before" => {
66401                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitColumnBreakBefore)
66402                },
66403                "-webkit-transform-origin-x" => {
66404                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitTransformOriginX)
66405                },
66406                "-webkit-transform-origin-y" => {
66407                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitTransformOriginY)
66408                },
66409                "-webkit-text-emphasis-position" => {
66410                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitTextEmphasisPosition)
66411                },
66412                "buffered-rendering" => {
66413                    StaticId::CountedUnknown(CountedUnknownProperty::BufferedRendering)
66414                },
66415                "-webkit-text-orientation" => {
66416                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitTextOrientation)
66417                },
66418                "-webkit-text-combine" => {
66419                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitTextCombine)
66420                },
66421                "-webkit-text-emphasis-style" => {
66422                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitTextEmphasisStyle)
66423                },
66424                "-webkit-text-emphasis" => {
66425                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitTextEmphasis)
66426                },
66427                "-webkit-mask-box-image-width" => {
66428                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMaskBoxImageWidth)
66429                },
66430                "-webkit-mask-box-image-source" => {
66431                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMaskBoxImageSource)
66432                },
66433                "-webkit-mask-box-image-outset" => {
66434                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMaskBoxImageOutset)
66435                },
66436                "-webkit-mask-box-image-slice" => {
66437                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMaskBoxImageSlice)
66438                },
66439                "-webkit-mask-box-image-repeat" => {
66440                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMaskBoxImageRepeat)
66441                },
66442                "-webkit-margin-after-collapse" => {
66443                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMarginAfterCollapse)
66444                },
66445                "-webkit-border-before-color" => {
66446                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitBorderBeforeColor)
66447                },
66448                "-webkit-border-before-width" => {
66449                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitBorderBeforeWidth)
66450                },
66451                "-webkit-perspective-origin-x" => {
66452                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitPerspectiveOriginX)
66453                },
66454                "-webkit-perspective-origin-y" => {
66455                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitPerspectiveOriginY)
66456                },
66457                "-webkit-margin-before-collapse" => {
66458                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMarginBeforeCollapse)
66459                },
66460                "-webkit-border-before-style" => {
66461                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitBorderBeforeStyle)
66462                },
66463                "-webkit-margin-bottom-collapse" => {
66464                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMarginBottomCollapse)
66465                },
66466                "-webkit-ruby-position" => {
66467                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitRubyPosition)
66468                },
66469                "-webkit-column-break-after" => {
66470                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitColumnBreakAfter)
66471                },
66472                "-webkit-margin-collapse" => {
66473                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMarginCollapse)
66474                },
66475                "-webkit-border-before" => {
66476                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitBorderBefore)
66477                },
66478                "-webkit-border-end" => {
66479                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitBorderEnd)
66480                },
66481                "-webkit-border-after" => {
66482                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitBorderAfter)
66483                },
66484                "-webkit-border-start" => {
66485                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitBorderStart)
66486                },
66487                "-webkit-min-logical-width" => {
66488                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMinLogicalWidth)
66489                },
66490                "-webkit-logical-height" => {
66491                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitLogicalHeight)
66492                },
66493                "-webkit-transform-origin-z" => {
66494                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitTransformOriginZ)
66495                },
66496                "-webkit-font-size-delta" => {
66497                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitFontSizeDelta)
66498                },
66499                "-webkit-logical-width" => {
66500                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitLogicalWidth)
66501                },
66502                "-webkit-max-logical-width" => {
66503                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMaxLogicalWidth)
66504                },
66505                "-webkit-min-logical-height" => {
66506                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMinLogicalHeight)
66507                },
66508                "-webkit-max-logical-height" => {
66509                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMaxLogicalHeight)
66510                },
66511                "-webkit-border-end-color" => {
66512                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitBorderEndColor)
66513                },
66514                "-webkit-border-end-width" => {
66515                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitBorderEndWidth)
66516                },
66517                "-webkit-border-start-color" => {
66518                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitBorderStartColor)
66519                },
66520                "-webkit-border-start-width" => {
66521                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitBorderStartWidth)
66522                },
66523                "-webkit-border-after-color" => {
66524                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitBorderAfterColor)
66525                },
66526                "-webkit-border-after-width" => {
66527                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitBorderAfterWidth)
66528                },
66529                "-webkit-border-end-style" => {
66530                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitBorderEndStyle)
66531                },
66532                "-webkit-border-after-style" => {
66533                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitBorderAfterStyle)
66534                },
66535                "-webkit-border-start-style" => {
66536                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitBorderStartStyle)
66537                },
66538                "-webkit-mask-repeat-x" => {
66539                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMaskRepeatX)
66540                },
66541                "-webkit-mask-repeat-y" => {
66542                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitMaskRepeatY)
66543                },
66544                "user-zoom" => {
66545                    StaticId::CountedUnknown(CountedUnknownProperty::UserZoom)
66546                },
66547                "min-zoom" => {
66548                    StaticId::CountedUnknown(CountedUnknownProperty::MinZoom)
66549                },
66550                "-webkit-box-decoration-break" => {
66551                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitBoxDecorationBreak)
66552                },
66553                "orientation" => {
66554                    StaticId::CountedUnknown(CountedUnknownProperty::Orientation)
66555                },
66556                "max-zoom" => {
66557                    StaticId::CountedUnknown(CountedUnknownProperty::MaxZoom)
66558                },
66559                "-webkit-app-region" => {
66560                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitAppRegion)
66561                },
66562                "-webkit-column-rule" => {
66563                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitColumnRule)
66564                },
66565                "-webkit-column-span" => {
66566                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitColumnSpan)
66567                },
66568                "-webkit-column-gap" => {
66569                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitColumnGap)
66570                },
66571                "-webkit-shape-outside" => {
66572                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitShapeOutside)
66573                },
66574                "-webkit-column-rule-width" => {
66575                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitColumnRuleWidth)
66576                },
66577                "-webkit-column-count" => {
66578                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitColumnCount)
66579                },
66580                "-webkit-opacity" => {
66581                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitOpacity)
66582                },
66583                "-webkit-column-width" => {
66584                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitColumnWidth)
66585                },
66586                "-webkit-shape-image-threshold" => {
66587                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitShapeImageThreshold)
66588                },
66589                "-webkit-column-rule-style" => {
66590                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitColumnRuleStyle)
66591                },
66592                "-webkit-columns" => {
66593                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitColumns)
66594                },
66595                "-webkit-column-rule-color" => {
66596                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitColumnRuleColor)
66597                },
66598                "-webkit-shape-margin" => {
66599                    StaticId::CountedUnknown(CountedUnknownProperty::WebkitShapeMargin)
66600                },
66601            }
66602        }
66603
66604        if let Some(id) = static_ids::get(property_name) {
66605            return Ok(match *id {
66606                StaticId::NonCustom(id) => PropertyId::NonCustom(id),
66607                StaticId::CountedUnknown(unknown_prop) => {
66608                    if let Some(counters) = use_counters {
66609                        counters.counted_unknown_properties.record(unknown_prop);
66610                    }
66611                    // Always return Err(()) because these aren't valid custom property names.
66612                    return Err(());
66613                }
66614            });
66615        }
66616
66617        let name = crate::custom_properties::parse_name(property_name)?;
66618        Ok(PropertyId::Custom(crate::custom_properties::Name::from(name)))
66619    }
66620}
66621
66622impl PropertyDeclaration {
66623    /// Given a property declaration, return the property declaration id.
66624    #[inline]
66625    pub fn id(&self) -> PropertyDeclarationId {
66626        match *self {
66627            PropertyDeclaration::Custom(ref declaration) => {
66628                return PropertyDeclarationId::Custom(&declaration.name)
66629            }
66630            PropertyDeclaration::CSSWideKeyword(ref declaration) => {
66631                return PropertyDeclarationId::Longhand(declaration.id);
66632            }
66633            PropertyDeclaration::WithVariables(ref declaration) => {
66634                return PropertyDeclarationId::Longhand(declaration.id);
66635            }
66636            _ => {}
66637        }
66638        // This is just fine because PropertyDeclaration and LonghandId
66639        // have corresponding discriminants.
66640        let id = unsafe { *(self as *const _ as *const LonghandId) };
66641        debug_assert_eq!(id, match *self {
66642            PropertyDeclaration::AlignContent(..) => LonghandId::AlignContent,
66643            PropertyDeclaration::AlignItems(..) => LonghandId::AlignItems,
66644            PropertyDeclaration::AlignSelf(..) => LonghandId::AlignSelf,
66645            PropertyDeclaration::AspectRatio(..) => LonghandId::AspectRatio,
66646            PropertyDeclaration::BackfaceVisibility(..) => LonghandId::BackfaceVisibility,
66647            PropertyDeclaration::BaselineSource(..) => LonghandId::BaselineSource,
66648            PropertyDeclaration::BorderCollapse(..) => LonghandId::BorderCollapse,
66649            PropertyDeclaration::BorderImageRepeat(..) => LonghandId::BorderImageRepeat,
66650            PropertyDeclaration::BoxSizing(..) => LonghandId::BoxSizing,
66651            PropertyDeclaration::CaptionSide(..) => LonghandId::CaptionSide,
66652            PropertyDeclaration::Clear(..) => LonghandId::Clear,
66653            PropertyDeclaration::ColumnCount(..) => LonghandId::ColumnCount,
66654            PropertyDeclaration::ColumnSpan(..) => LonghandId::ColumnSpan,
66655            PropertyDeclaration::Contain(..) => LonghandId::Contain,
66656            PropertyDeclaration::ContainerType(..) => LonghandId::ContainerType,
66657            PropertyDeclaration::Direction(..) => LonghandId::Direction,
66658            PropertyDeclaration::Display(..) => LonghandId::Display,
66659            PropertyDeclaration::EmptyCells(..) => LonghandId::EmptyCells,
66660            PropertyDeclaration::FlexDirection(..) => LonghandId::FlexDirection,
66661            PropertyDeclaration::FlexWrap(..) => LonghandId::FlexWrap,
66662            PropertyDeclaration::Float(..) => LonghandId::Float,
66663            PropertyDeclaration::FontLanguageOverride(..) => LonghandId::FontLanguageOverride,
66664            PropertyDeclaration::FontStretch(..) => LonghandId::FontStretch,
66665            PropertyDeclaration::FontStyle(..) => LonghandId::FontStyle,
66666            PropertyDeclaration::FontVariantCaps(..) => LonghandId::FontVariantCaps,
66667            PropertyDeclaration::FontWeight(..) => LonghandId::FontWeight,
66668            PropertyDeclaration::GridAutoFlow(..) => LonghandId::GridAutoFlow,
66669            PropertyDeclaration::ImageRendering(..) => LonghandId::ImageRendering,
66670            PropertyDeclaration::Isolation(..) => LonghandId::Isolation,
66671            PropertyDeclaration::JustifyContent(..) => LonghandId::JustifyContent,
66672            PropertyDeclaration::JustifyItems(..) => LonghandId::JustifyItems,
66673            PropertyDeclaration::JustifySelf(..) => LonghandId::JustifySelf,
66674            PropertyDeclaration::ListStylePosition(..) => LonghandId::ListStylePosition,
66675            PropertyDeclaration::ListStyleType(..) => LonghandId::ListStyleType,
66676            PropertyDeclaration::MixBlendMode(..) => LonghandId::MixBlendMode,
66677            PropertyDeclaration::ObjectFit(..) => LonghandId::ObjectFit,
66678            PropertyDeclaration::Opacity(..) => LonghandId::Opacity,
66679            PropertyDeclaration::Order(..) => LonghandId::Order,
66680            PropertyDeclaration::OutlineStyle(..) => LonghandId::OutlineStyle,
66681            PropertyDeclaration::OverflowWrap(..) => LonghandId::OverflowWrap,
66682            PropertyDeclaration::PointerEvents(..) => LonghandId::PointerEvents,
66683            PropertyDeclaration::Position(..) => LonghandId::Position,
66684            PropertyDeclaration::ServoOverflowClipBox(..) => LonghandId::ServoOverflowClipBox,
66685            PropertyDeclaration::ServoTopLayer(..) => LonghandId::ServoTopLayer,
66686            PropertyDeclaration::TableLayout(..) => LonghandId::TableLayout,
66687            PropertyDeclaration::TextAlign(..) => LonghandId::TextAlign,
66688            PropertyDeclaration::TextAlignLast(..) => LonghandId::TextAlignLast,
66689            PropertyDeclaration::TextDecorationLine(..) => LonghandId::TextDecorationLine,
66690            PropertyDeclaration::TextDecorationStyle(..) => LonghandId::TextDecorationStyle,
66691            PropertyDeclaration::TextJustify(..) => LonghandId::TextJustify,
66692            PropertyDeclaration::TextRendering(..) => LonghandId::TextRendering,
66693            PropertyDeclaration::TextTransform(..) => LonghandId::TextTransform,
66694            PropertyDeclaration::TextWrapMode(..) => LonghandId::TextWrapMode,
66695            PropertyDeclaration::TransformStyle(..) => LonghandId::TransformStyle,
66696            PropertyDeclaration::UnicodeBidi(..) => LonghandId::UnicodeBidi,
66697            PropertyDeclaration::Visibility(..) => LonghandId::Visibility,
66698            PropertyDeclaration::WhiteSpaceCollapse(..) => LonghandId::WhiteSpaceCollapse,
66699            PropertyDeclaration::WordBreak(..) => LonghandId::WordBreak,
66700            PropertyDeclaration::WritingMode(..) => LonghandId::WritingMode,
66701            PropertyDeclaration::ZIndex(..) => LonghandId::ZIndex,
66702            PropertyDeclaration::Zoom(..) => LonghandId::Zoom,
66703            PropertyDeclaration::FlexGrow(..) => LonghandId::FlexGrow,
66704            PropertyDeclaration::FlexShrink(..) => LonghandId::FlexShrink,
66705            PropertyDeclaration::OverflowBlock(..) => LonghandId::OverflowBlock,
66706            PropertyDeclaration::OverflowInline(..) => LonghandId::OverflowInline,
66707            PropertyDeclaration::OverflowX(..) => LonghandId::OverflowX,
66708            PropertyDeclaration::OverflowY(..) => LonghandId::OverflowY,
66709            PropertyDeclaration::BorderBlockEndStyle(..) => LonghandId::BorderBlockEndStyle,
66710            PropertyDeclaration::BorderBlockStartStyle(..) => LonghandId::BorderBlockStartStyle,
66711            PropertyDeclaration::BorderBottomStyle(..) => LonghandId::BorderBottomStyle,
66712            PropertyDeclaration::BorderInlineEndStyle(..) => LonghandId::BorderInlineEndStyle,
66713            PropertyDeclaration::BorderInlineStartStyle(..) => LonghandId::BorderInlineStartStyle,
66714            PropertyDeclaration::BorderLeftStyle(..) => LonghandId::BorderLeftStyle,
66715            PropertyDeclaration::BorderRightStyle(..) => LonghandId::BorderRightStyle,
66716            PropertyDeclaration::BorderTopStyle(..) => LonghandId::BorderTopStyle,
66717            PropertyDeclaration::AnimationComposition(..) => LonghandId::AnimationComposition,
66718            PropertyDeclaration::AnimationDelay(..) => LonghandId::AnimationDelay,
66719            PropertyDeclaration::AnimationDirection(..) => LonghandId::AnimationDirection,
66720            PropertyDeclaration::AnimationDuration(..) => LonghandId::AnimationDuration,
66721            PropertyDeclaration::AnimationFillMode(..) => LonghandId::AnimationFillMode,
66722            PropertyDeclaration::AnimationIterationCount(..) => LonghandId::AnimationIterationCount,
66723            PropertyDeclaration::AnimationName(..) => LonghandId::AnimationName,
66724            PropertyDeclaration::AnimationPlayState(..) => LonghandId::AnimationPlayState,
66725            PropertyDeclaration::AnimationTimeline(..) => LonghandId::AnimationTimeline,
66726            PropertyDeclaration::AnimationTimingFunction(..) => LonghandId::AnimationTimingFunction,
66727            PropertyDeclaration::BackdropFilter(..) => LonghandId::BackdropFilter,
66728            PropertyDeclaration::BackgroundAttachment(..) => LonghandId::BackgroundAttachment,
66729            PropertyDeclaration::BackgroundClip(..) => LonghandId::BackgroundClip,
66730            PropertyDeclaration::BackgroundImage(..) => LonghandId::BackgroundImage,
66731            PropertyDeclaration::BackgroundOrigin(..) => LonghandId::BackgroundOrigin,
66732            PropertyDeclaration::BackgroundPositionX(..) => LonghandId::BackgroundPositionX,
66733            PropertyDeclaration::BackgroundPositionY(..) => LonghandId::BackgroundPositionY,
66734            PropertyDeclaration::BackgroundRepeat(..) => LonghandId::BackgroundRepeat,
66735            PropertyDeclaration::BackgroundSize(..) => LonghandId::BackgroundSize,
66736            PropertyDeclaration::BorderImageOutset(..) => LonghandId::BorderImageOutset,
66737            PropertyDeclaration::BorderImageSlice(..) => LonghandId::BorderImageSlice,
66738            PropertyDeclaration::BorderImageWidth(..) => LonghandId::BorderImageWidth,
66739            PropertyDeclaration::BorderSpacing(..) => LonghandId::BorderSpacing,
66740            PropertyDeclaration::BoxShadow(..) => LonghandId::BoxShadow,
66741            PropertyDeclaration::Clip(..) => LonghandId::Clip,
66742            PropertyDeclaration::ClipPath(..) => LonghandId::ClipPath,
66743            PropertyDeclaration::Color(..) => LonghandId::Color,
66744            PropertyDeclaration::ColorScheme(..) => LonghandId::ColorScheme,
66745            PropertyDeclaration::ColumnWidth(..) => LonghandId::ColumnWidth,
66746            PropertyDeclaration::ContainerName(..) => LonghandId::ContainerName,
66747            PropertyDeclaration::Content(..) => LonghandId::Content,
66748            PropertyDeclaration::CounterIncrement(..) => LonghandId::CounterIncrement,
66749            PropertyDeclaration::CounterReset(..) => LonghandId::CounterReset,
66750            PropertyDeclaration::Cursor(..) => LonghandId::Cursor,
66751            PropertyDeclaration::Filter(..) => LonghandId::Filter,
66752            PropertyDeclaration::FlexBasis(..) => LonghandId::FlexBasis,
66753            PropertyDeclaration::FontFamily(..) => LonghandId::FontFamily,
66754            PropertyDeclaration::FontSize(..) => LonghandId::FontSize,
66755            PropertyDeclaration::FontVariationSettings(..) => LonghandId::FontVariationSettings,
66756            PropertyDeclaration::GridTemplateAreas(..) => LonghandId::GridTemplateAreas,
66757            PropertyDeclaration::LetterSpacing(..) => LonghandId::LetterSpacing,
66758            PropertyDeclaration::LineHeight(..) => LonghandId::LineHeight,
66759            PropertyDeclaration::MaskImage(..) => LonghandId::MaskImage,
66760            PropertyDeclaration::OffsetPath(..) => LonghandId::OffsetPath,
66761            PropertyDeclaration::Perspective(..) => LonghandId::Perspective,
66762            PropertyDeclaration::Quotes(..) => LonghandId::Quotes,
66763            PropertyDeclaration::Rotate(..) => LonghandId::Rotate,
66764            PropertyDeclaration::Scale(..) => LonghandId::Scale,
66765            PropertyDeclaration::TextIndent(..) => LonghandId::TextIndent,
66766            PropertyDeclaration::TextOverflow(..) => LonghandId::TextOverflow,
66767            PropertyDeclaration::TextShadow(..) => LonghandId::TextShadow,
66768            PropertyDeclaration::Transform(..) => LonghandId::Transform,
66769            PropertyDeclaration::TransformOrigin(..) => LonghandId::TransformOrigin,
66770            PropertyDeclaration::TransitionBehavior(..) => LonghandId::TransitionBehavior,
66771            PropertyDeclaration::TransitionDelay(..) => LonghandId::TransitionDelay,
66772            PropertyDeclaration::TransitionDuration(..) => LonghandId::TransitionDuration,
66773            PropertyDeclaration::TransitionProperty(..) => LonghandId::TransitionProperty,
66774            PropertyDeclaration::TransitionTimingFunction(..) => LonghandId::TransitionTimingFunction,
66775            PropertyDeclaration::Translate(..) => LonghandId::Translate,
66776            PropertyDeclaration::VerticalAlign(..) => LonghandId::VerticalAlign,
66777            PropertyDeclaration::ViewTransitionClass(..) => LonghandId::ViewTransitionClass,
66778            PropertyDeclaration::ViewTransitionName(..) => LonghandId::ViewTransitionName,
66779            PropertyDeclaration::WillChange(..) => LonghandId::WillChange,
66780            PropertyDeclaration::WordSpacing(..) => LonghandId::WordSpacing,
66781            PropertyDeclaration::XLang(..) => LonghandId::XLang,
66782            PropertyDeclaration::ObjectPosition(..) => LonghandId::ObjectPosition,
66783            PropertyDeclaration::PerspectiveOrigin(..) => LonghandId::PerspectiveOrigin,
66784            PropertyDeclaration::GridTemplateColumns(..) => LonghandId::GridTemplateColumns,
66785            PropertyDeclaration::GridTemplateRows(..) => LonghandId::GridTemplateRows,
66786            PropertyDeclaration::BorderImageSource(..) => LonghandId::BorderImageSource,
66787            PropertyDeclaration::ListStyleImage(..) => LonghandId::ListStyleImage,
66788            PropertyDeclaration::GridAutoColumns(..) => LonghandId::GridAutoColumns,
66789            PropertyDeclaration::GridAutoRows(..) => LonghandId::GridAutoRows,
66790            PropertyDeclaration::OutlineOffset(..) => LonghandId::OutlineOffset,
66791            PropertyDeclaration::OverflowClipMargin(..) => LonghandId::OverflowClipMargin,
66792            PropertyDeclaration::ColumnGap(..) => LonghandId::ColumnGap,
66793            PropertyDeclaration::RowGap(..) => LonghandId::RowGap,
66794            PropertyDeclaration::GridColumnEnd(..) => LonghandId::GridColumnEnd,
66795            PropertyDeclaration::GridColumnStart(..) => LonghandId::GridColumnStart,
66796            PropertyDeclaration::GridRowEnd(..) => LonghandId::GridRowEnd,
66797            PropertyDeclaration::GridRowStart(..) => LonghandId::GridRowStart,
66798            PropertyDeclaration::MaxBlockSize(..) => LonghandId::MaxBlockSize,
66799            PropertyDeclaration::MaxHeight(..) => LonghandId::MaxHeight,
66800            PropertyDeclaration::MaxInlineSize(..) => LonghandId::MaxInlineSize,
66801            PropertyDeclaration::MaxWidth(..) => LonghandId::MaxWidth,
66802            PropertyDeclaration::BorderBottomLeftRadius(..) => LonghandId::BorderBottomLeftRadius,
66803            PropertyDeclaration::BorderBottomRightRadius(..) => LonghandId::BorderBottomRightRadius,
66804            PropertyDeclaration::BorderEndEndRadius(..) => LonghandId::BorderEndEndRadius,
66805            PropertyDeclaration::BorderEndStartRadius(..) => LonghandId::BorderEndStartRadius,
66806            PropertyDeclaration::BorderStartEndRadius(..) => LonghandId::BorderStartEndRadius,
66807            PropertyDeclaration::BorderStartStartRadius(..) => LonghandId::BorderStartStartRadius,
66808            PropertyDeclaration::BorderTopLeftRadius(..) => LonghandId::BorderTopLeftRadius,
66809            PropertyDeclaration::BorderTopRightRadius(..) => LonghandId::BorderTopRightRadius,
66810            PropertyDeclaration::Bottom(..) => LonghandId::Bottom,
66811            PropertyDeclaration::InsetBlockEnd(..) => LonghandId::InsetBlockEnd,
66812            PropertyDeclaration::InsetBlockStart(..) => LonghandId::InsetBlockStart,
66813            PropertyDeclaration::InsetInlineEnd(..) => LonghandId::InsetInlineEnd,
66814            PropertyDeclaration::InsetInlineStart(..) => LonghandId::InsetInlineStart,
66815            PropertyDeclaration::Left(..) => LonghandId::Left,
66816            PropertyDeclaration::Right(..) => LonghandId::Right,
66817            PropertyDeclaration::Top(..) => LonghandId::Top,
66818            PropertyDeclaration::MarginBlockEnd(..) => LonghandId::MarginBlockEnd,
66819            PropertyDeclaration::MarginBlockStart(..) => LonghandId::MarginBlockStart,
66820            PropertyDeclaration::MarginBottom(..) => LonghandId::MarginBottom,
66821            PropertyDeclaration::MarginInlineEnd(..) => LonghandId::MarginInlineEnd,
66822            PropertyDeclaration::MarginInlineStart(..) => LonghandId::MarginInlineStart,
66823            PropertyDeclaration::MarginLeft(..) => LonghandId::MarginLeft,
66824            PropertyDeclaration::MarginRight(..) => LonghandId::MarginRight,
66825            PropertyDeclaration::MarginTop(..) => LonghandId::MarginTop,
66826            PropertyDeclaration::PaddingBlockEnd(..) => LonghandId::PaddingBlockEnd,
66827            PropertyDeclaration::PaddingBlockStart(..) => LonghandId::PaddingBlockStart,
66828            PropertyDeclaration::PaddingBottom(..) => LonghandId::PaddingBottom,
66829            PropertyDeclaration::PaddingInlineEnd(..) => LonghandId::PaddingInlineEnd,
66830            PropertyDeclaration::PaddingInlineStart(..) => LonghandId::PaddingInlineStart,
66831            PropertyDeclaration::PaddingLeft(..) => LonghandId::PaddingLeft,
66832            PropertyDeclaration::PaddingRight(..) => LonghandId::PaddingRight,
66833            PropertyDeclaration::PaddingTop(..) => LonghandId::PaddingTop,
66834            PropertyDeclaration::BlockSize(..) => LonghandId::BlockSize,
66835            PropertyDeclaration::Height(..) => LonghandId::Height,
66836            PropertyDeclaration::InlineSize(..) => LonghandId::InlineSize,
66837            PropertyDeclaration::MinBlockSize(..) => LonghandId::MinBlockSize,
66838            PropertyDeclaration::MinHeight(..) => LonghandId::MinHeight,
66839            PropertyDeclaration::MinInlineSize(..) => LonghandId::MinInlineSize,
66840            PropertyDeclaration::MinWidth(..) => LonghandId::MinWidth,
66841            PropertyDeclaration::Width(..) => LonghandId::Width,
66842            PropertyDeclaration::BorderBlockEndWidth(..) => LonghandId::BorderBlockEndWidth,
66843            PropertyDeclaration::BorderBlockStartWidth(..) => LonghandId::BorderBlockStartWidth,
66844            PropertyDeclaration::BorderBottomWidth(..) => LonghandId::BorderBottomWidth,
66845            PropertyDeclaration::BorderInlineEndWidth(..) => LonghandId::BorderInlineEndWidth,
66846            PropertyDeclaration::BorderInlineStartWidth(..) => LonghandId::BorderInlineStartWidth,
66847            PropertyDeclaration::BorderLeftWidth(..) => LonghandId::BorderLeftWidth,
66848            PropertyDeclaration::BorderRightWidth(..) => LonghandId::BorderRightWidth,
66849            PropertyDeclaration::BorderTopWidth(..) => LonghandId::BorderTopWidth,
66850            PropertyDeclaration::OutlineWidth(..) => LonghandId::OutlineWidth,
66851            PropertyDeclaration::BackgroundColor(..) => LonghandId::BackgroundColor,
66852            PropertyDeclaration::BorderBlockEndColor(..) => LonghandId::BorderBlockEndColor,
66853            PropertyDeclaration::BorderBlockStartColor(..) => LonghandId::BorderBlockStartColor,
66854            PropertyDeclaration::BorderBottomColor(..) => LonghandId::BorderBottomColor,
66855            PropertyDeclaration::BorderInlineEndColor(..) => LonghandId::BorderInlineEndColor,
66856            PropertyDeclaration::BorderInlineStartColor(..) => LonghandId::BorderInlineStartColor,
66857            PropertyDeclaration::BorderLeftColor(..) => LonghandId::BorderLeftColor,
66858            PropertyDeclaration::BorderRightColor(..) => LonghandId::BorderRightColor,
66859            PropertyDeclaration::BorderTopColor(..) => LonghandId::BorderTopColor,
66860            PropertyDeclaration::OutlineColor(..) => LonghandId::OutlineColor,
66861            PropertyDeclaration::TextDecorationColor(..) => LonghandId::TextDecorationColor,
66862            _ => id,
66863        });
66864        PropertyDeclarationId::Longhand(id)
66865    }
66866
66867    /// Given a declaration, convert it into a declaration for a corresponding
66868    /// physical property.
66869    #[inline]
66870    pub fn to_physical(&self, wm: WritingMode) -> Self {
66871        match *self {
66872            PropertyDeclaration::WithVariables(VariableDeclaration {
66873                id,
66874                ref value,
66875            }) => {
66876                return PropertyDeclaration::WithVariables(VariableDeclaration {
66877                    id: id.to_physical(wm),
66878                    value: value.clone(),
66879                })
66880            }
66881            PropertyDeclaration::CSSWideKeyword(WideKeywordDeclaration {
66882                id,
66883                keyword,
66884            }) => {
66885                return PropertyDeclaration::CSSWideKeyword(WideKeywordDeclaration {
66886                    id: id.to_physical(wm),
66887                    keyword,
66888                })
66889            }
66890            PropertyDeclaration::Custom(..) => return self.clone(),
66891            PropertyDeclaration::AlignContent(..) => {},
66892            PropertyDeclaration::AlignItems(..) => {},
66893            PropertyDeclaration::AlignSelf(..) => {},
66894            PropertyDeclaration::AspectRatio(..) => {},
66895            PropertyDeclaration::BackfaceVisibility(..) => {},
66896            PropertyDeclaration::BaselineSource(..) => {},
66897            PropertyDeclaration::BorderCollapse(..) => {},
66898            PropertyDeclaration::BorderImageRepeat(..) => {},
66899            PropertyDeclaration::BoxSizing(..) => {},
66900            PropertyDeclaration::CaptionSide(..) => {},
66901            PropertyDeclaration::Clear(..) => {},
66902            PropertyDeclaration::ColumnCount(..) => {},
66903            PropertyDeclaration::ColumnSpan(..) => {},
66904            PropertyDeclaration::Contain(..) => {},
66905            PropertyDeclaration::ContainerType(..) => {},
66906            PropertyDeclaration::Direction(..) => {},
66907            PropertyDeclaration::Display(..) => {},
66908            PropertyDeclaration::EmptyCells(..) => {},
66909            PropertyDeclaration::FlexDirection(..) => {},
66910            PropertyDeclaration::FlexWrap(..) => {},
66911            PropertyDeclaration::Float(..) => {},
66912            PropertyDeclaration::FontLanguageOverride(..) => {},
66913            PropertyDeclaration::FontStretch(..) => {},
66914            PropertyDeclaration::FontStyle(..) => {},
66915            PropertyDeclaration::FontVariantCaps(..) => {},
66916            PropertyDeclaration::FontWeight(..) => {},
66917            PropertyDeclaration::GridAutoFlow(..) => {},
66918            PropertyDeclaration::ImageRendering(..) => {},
66919            PropertyDeclaration::Isolation(..) => {},
66920            PropertyDeclaration::JustifyContent(..) => {},
66921            PropertyDeclaration::JustifyItems(..) => {},
66922            PropertyDeclaration::JustifySelf(..) => {},
66923            PropertyDeclaration::ListStylePosition(..) => {},
66924            PropertyDeclaration::ListStyleType(..) => {},
66925            PropertyDeclaration::MixBlendMode(..) => {},
66926            PropertyDeclaration::ObjectFit(..) => {},
66927            PropertyDeclaration::Opacity(..) => {},
66928            PropertyDeclaration::Order(..) => {},
66929            PropertyDeclaration::OutlineStyle(..) => {},
66930            PropertyDeclaration::OverflowWrap(..) => {},
66931            PropertyDeclaration::PointerEvents(..) => {},
66932            PropertyDeclaration::Position(..) => {},
66933            PropertyDeclaration::ServoOverflowClipBox(..) => {},
66934            PropertyDeclaration::ServoTopLayer(..) => {},
66935            PropertyDeclaration::TableLayout(..) => {},
66936            PropertyDeclaration::TextAlign(..) => {},
66937            PropertyDeclaration::TextAlignLast(..) => {},
66938            PropertyDeclaration::TextDecorationLine(..) => {},
66939            PropertyDeclaration::TextDecorationStyle(..) => {},
66940            PropertyDeclaration::TextJustify(..) => {},
66941            PropertyDeclaration::TextRendering(..) => {},
66942            PropertyDeclaration::TextTransform(..) => {},
66943            PropertyDeclaration::TextWrapMode(..) => {},
66944            PropertyDeclaration::TransformStyle(..) => {},
66945            PropertyDeclaration::UnicodeBidi(..) => {},
66946            PropertyDeclaration::Visibility(..) => {},
66947            PropertyDeclaration::WhiteSpaceCollapse(..) => {},
66948            PropertyDeclaration::WordBreak(..) => {},
66949            PropertyDeclaration::WritingMode(..) => {},
66950            PropertyDeclaration::ZIndex(..) => {},
66951            PropertyDeclaration::Zoom(..) => {},
66952            PropertyDeclaration::FlexGrow(..) => {},
66953            PropertyDeclaration::FlexShrink(..) => {},
66954            PropertyDeclaration::OverflowBlock(..) => {},
66955            PropertyDeclaration::OverflowInline(..) => {},
66956            PropertyDeclaration::OverflowX(..) => {},
66957            PropertyDeclaration::OverflowY(..) => {},
66958            PropertyDeclaration::BorderBlockEndStyle(..) => {},
66959            PropertyDeclaration::BorderBlockStartStyle(..) => {},
66960            PropertyDeclaration::BorderBottomStyle(..) => {},
66961            PropertyDeclaration::BorderInlineEndStyle(..) => {},
66962            PropertyDeclaration::BorderInlineStartStyle(..) => {},
66963            PropertyDeclaration::BorderLeftStyle(..) => {},
66964            PropertyDeclaration::BorderRightStyle(..) => {},
66965            PropertyDeclaration::BorderTopStyle(..) => {},
66966            PropertyDeclaration::AnimationComposition(..) => {},
66967            PropertyDeclaration::AnimationDelay(..) => {},
66968            PropertyDeclaration::AnimationDirection(..) => {},
66969            PropertyDeclaration::AnimationDuration(..) => {},
66970            PropertyDeclaration::AnimationFillMode(..) => {},
66971            PropertyDeclaration::AnimationIterationCount(..) => {},
66972            PropertyDeclaration::AnimationName(..) => {},
66973            PropertyDeclaration::AnimationPlayState(..) => {},
66974            PropertyDeclaration::AnimationTimeline(..) => {},
66975            PropertyDeclaration::AnimationTimingFunction(..) => {},
66976            PropertyDeclaration::BackdropFilter(..) => {},
66977            PropertyDeclaration::BackgroundAttachment(..) => {},
66978            PropertyDeclaration::BackgroundClip(..) => {},
66979            PropertyDeclaration::BackgroundImage(..) => {},
66980            PropertyDeclaration::BackgroundOrigin(..) => {},
66981            PropertyDeclaration::BackgroundPositionX(..) => {},
66982            PropertyDeclaration::BackgroundPositionY(..) => {},
66983            PropertyDeclaration::BackgroundRepeat(..) => {},
66984            PropertyDeclaration::BackgroundSize(..) => {},
66985            PropertyDeclaration::BorderImageOutset(..) => {},
66986            PropertyDeclaration::BorderImageSlice(..) => {},
66987            PropertyDeclaration::BorderImageWidth(..) => {},
66988            PropertyDeclaration::BorderSpacing(..) => {},
66989            PropertyDeclaration::BoxShadow(..) => {},
66990            PropertyDeclaration::Clip(..) => {},
66991            PropertyDeclaration::ClipPath(..) => {},
66992            PropertyDeclaration::Color(..) => {},
66993            PropertyDeclaration::ColorScheme(..) => {},
66994            PropertyDeclaration::ColumnWidth(..) => {},
66995            PropertyDeclaration::ContainerName(..) => {},
66996            PropertyDeclaration::Content(..) => {},
66997            PropertyDeclaration::CounterIncrement(..) => {},
66998            PropertyDeclaration::CounterReset(..) => {},
66999            PropertyDeclaration::Cursor(..) => {},
67000            PropertyDeclaration::Filter(..) => {},
67001            PropertyDeclaration::FlexBasis(..) => {},
67002            PropertyDeclaration::FontFamily(..) => {},
67003            PropertyDeclaration::FontSize(..) => {},
67004            PropertyDeclaration::FontVariationSettings(..) => {},
67005            PropertyDeclaration::GridTemplateAreas(..) => {},
67006            PropertyDeclaration::LetterSpacing(..) => {},
67007            PropertyDeclaration::LineHeight(..) => {},
67008            PropertyDeclaration::MaskImage(..) => {},
67009            PropertyDeclaration::OffsetPath(..) => {},
67010            PropertyDeclaration::Perspective(..) => {},
67011            PropertyDeclaration::Quotes(..) => {},
67012            PropertyDeclaration::Rotate(..) => {},
67013            PropertyDeclaration::Scale(..) => {},
67014            PropertyDeclaration::TextIndent(..) => {},
67015            PropertyDeclaration::TextOverflow(..) => {},
67016            PropertyDeclaration::TextShadow(..) => {},
67017            PropertyDeclaration::Transform(..) => {},
67018            PropertyDeclaration::TransformOrigin(..) => {},
67019            PropertyDeclaration::TransitionBehavior(..) => {},
67020            PropertyDeclaration::TransitionDelay(..) => {},
67021            PropertyDeclaration::TransitionDuration(..) => {},
67022            PropertyDeclaration::TransitionProperty(..) => {},
67023            PropertyDeclaration::TransitionTimingFunction(..) => {},
67024            PropertyDeclaration::Translate(..) => {},
67025            PropertyDeclaration::VerticalAlign(..) => {},
67026            PropertyDeclaration::ViewTransitionClass(..) => {},
67027            PropertyDeclaration::ViewTransitionName(..) => {},
67028            PropertyDeclaration::WillChange(..) => {},
67029            PropertyDeclaration::WordSpacing(..) => {},
67030            PropertyDeclaration::XLang(..) => {},
67031            PropertyDeclaration::ObjectPosition(..) => {},
67032            PropertyDeclaration::PerspectiveOrigin(..) => {},
67033            PropertyDeclaration::GridTemplateColumns(..) => {},
67034            PropertyDeclaration::GridTemplateRows(..) => {},
67035            PropertyDeclaration::BorderImageSource(..) => {},
67036            PropertyDeclaration::ListStyleImage(..) => {},
67037            PropertyDeclaration::GridAutoColumns(..) => {},
67038            PropertyDeclaration::GridAutoRows(..) => {},
67039            PropertyDeclaration::OutlineOffset(..) => {},
67040            PropertyDeclaration::OverflowClipMargin(..) => {},
67041            PropertyDeclaration::ColumnGap(..) => {},
67042            PropertyDeclaration::RowGap(..) => {},
67043            PropertyDeclaration::GridColumnEnd(..) => {},
67044            PropertyDeclaration::GridColumnStart(..) => {},
67045            PropertyDeclaration::GridRowEnd(..) => {},
67046            PropertyDeclaration::GridRowStart(..) => {},
67047            PropertyDeclaration::MaxBlockSize(..) => {},
67048            PropertyDeclaration::MaxHeight(..) => {},
67049            PropertyDeclaration::MaxInlineSize(..) => {},
67050            PropertyDeclaration::MaxWidth(..) => {},
67051            PropertyDeclaration::BorderBottomLeftRadius(..) => {},
67052            PropertyDeclaration::BorderBottomRightRadius(..) => {},
67053            PropertyDeclaration::BorderEndEndRadius(..) => {},
67054            PropertyDeclaration::BorderEndStartRadius(..) => {},
67055            PropertyDeclaration::BorderStartEndRadius(..) => {},
67056            PropertyDeclaration::BorderStartStartRadius(..) => {},
67057            PropertyDeclaration::BorderTopLeftRadius(..) => {},
67058            PropertyDeclaration::BorderTopRightRadius(..) => {},
67059            PropertyDeclaration::Bottom(..) => {},
67060            PropertyDeclaration::InsetBlockEnd(..) => {},
67061            PropertyDeclaration::InsetBlockStart(..) => {},
67062            PropertyDeclaration::InsetInlineEnd(..) => {},
67063            PropertyDeclaration::InsetInlineStart(..) => {},
67064            PropertyDeclaration::Left(..) => {},
67065            PropertyDeclaration::Right(..) => {},
67066            PropertyDeclaration::Top(..) => {},
67067            PropertyDeclaration::MarginBlockEnd(..) => {},
67068            PropertyDeclaration::MarginBlockStart(..) => {},
67069            PropertyDeclaration::MarginBottom(..) => {},
67070            PropertyDeclaration::MarginInlineEnd(..) => {},
67071            PropertyDeclaration::MarginInlineStart(..) => {},
67072            PropertyDeclaration::MarginLeft(..) => {},
67073            PropertyDeclaration::MarginRight(..) => {},
67074            PropertyDeclaration::MarginTop(..) => {},
67075            PropertyDeclaration::PaddingBlockEnd(..) => {},
67076            PropertyDeclaration::PaddingBlockStart(..) => {},
67077            PropertyDeclaration::PaddingBottom(..) => {},
67078            PropertyDeclaration::PaddingInlineEnd(..) => {},
67079            PropertyDeclaration::PaddingInlineStart(..) => {},
67080            PropertyDeclaration::PaddingLeft(..) => {},
67081            PropertyDeclaration::PaddingRight(..) => {},
67082            PropertyDeclaration::PaddingTop(..) => {},
67083            PropertyDeclaration::BlockSize(..) => {},
67084            PropertyDeclaration::Height(..) => {},
67085            PropertyDeclaration::InlineSize(..) => {},
67086            PropertyDeclaration::MinBlockSize(..) => {},
67087            PropertyDeclaration::MinHeight(..) => {},
67088            PropertyDeclaration::MinInlineSize(..) => {},
67089            PropertyDeclaration::MinWidth(..) => {},
67090            PropertyDeclaration::Width(..) => {},
67091            PropertyDeclaration::BorderBlockEndWidth(..) => {},
67092            PropertyDeclaration::BorderBlockStartWidth(..) => {},
67093            PropertyDeclaration::BorderBottomWidth(..) => {},
67094            PropertyDeclaration::BorderInlineEndWidth(..) => {},
67095            PropertyDeclaration::BorderInlineStartWidth(..) => {},
67096            PropertyDeclaration::BorderLeftWidth(..) => {},
67097            PropertyDeclaration::BorderRightWidth(..) => {},
67098            PropertyDeclaration::BorderTopWidth(..) => {},
67099            PropertyDeclaration::OutlineWidth(..) => {},
67100            PropertyDeclaration::BackgroundColor(..) => {},
67101            PropertyDeclaration::BorderBlockEndColor(..) => {},
67102            PropertyDeclaration::BorderBlockStartColor(..) => {},
67103            PropertyDeclaration::BorderBottomColor(..) => {},
67104            PropertyDeclaration::BorderInlineEndColor(..) => {},
67105            PropertyDeclaration::BorderInlineStartColor(..) => {},
67106            PropertyDeclaration::BorderLeftColor(..) => {},
67107            PropertyDeclaration::BorderRightColor(..) => {},
67108            PropertyDeclaration::BorderTopColor(..) => {},
67109            PropertyDeclaration::OutlineColor(..) => {},
67110            PropertyDeclaration::TextDecorationColor(..) => {},
67111        }
67112
67113        let mut ret = self.clone();
67114
67115
67116        unsafe {
67117            let longhand_id = *(&mut ret as *mut _ as *mut LonghandId);
67118
67119            debug_assert_eq!(
67120                PropertyDeclarationId::Longhand(longhand_id),
67121                ret.id()
67122            );
67123
67124            // This is just fine because PropertyDeclaration and LonghandId
67125            // have corresponding discriminants.
67126            *(&mut ret as *mut _ as *mut LonghandId) = longhand_id.to_physical(wm);
67127
67128            debug_assert_eq!(
67129                PropertyDeclarationId::Longhand(longhand_id.to_physical(wm)),
67130                ret.id()
67131            );
67132        }
67133
67134        ret
67135    }
67136
67137    /// Returns whether or not the property is set by a system font
67138    pub fn get_system(&self) -> Option<SystemFont> {
67139        match *self {
67140            _ => None,
67141        }
67142    }
67143}
67144
67145#[cfg(feature = "gecko")]
67146pub use super::gecko::style_structs;
67147
67148/// The module where all the style structs are defined.
67149#[cfg(feature = "servo")]
67150pub mod style_structs {
67151    use fxhash::FxHasher;
67152    use super::longhands;
67153    use std::hash::{Hash, Hasher};
67154    use crate::values::specified::color::ColorSchemeFlags;
67155
67156        #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
67157        /// The Background style struct.
67158        pub struct Background {
67159                    /// The background-color computed value.
67160                    pub background_color: longhands::background_color::computed_value::T,
67161                    /// The background-image computed value.
67162                    pub background_image: longhands::background_image::computed_value::T,
67163                    /// The background-position-x computed value.
67164                    pub background_position_x: longhands::background_position_x::computed_value::T,
67165                    /// The background-position-y computed value.
67166                    pub background_position_y: longhands::background_position_y::computed_value::T,
67167                    /// The background-repeat computed value.
67168                    pub background_repeat: longhands::background_repeat::computed_value::T,
67169                    /// The background-attachment computed value.
67170                    pub background_attachment: longhands::background_attachment::computed_value::T,
67171                    /// The background-clip computed value.
67172                    pub background_clip: longhands::background_clip::computed_value::T,
67173                    /// The background-origin computed value.
67174                    pub background_origin: longhands::background_origin::computed_value::T,
67175                    /// The background-size computed value.
67176                    pub background_size: longhands::background_size::computed_value::T,
67177        }
67178
67179        impl Background {
67180                        /// Set background-color.
67181                        #[allow(non_snake_case)]
67182                        #[inline]
67183                        pub fn set_background_color(&mut self, v: longhands::background_color::computed_value::T) {
67184                            self.background_color = v;
67185                        }
67186                        /// Set background-color from other struct.
67187                        #[allow(non_snake_case)]
67188                        #[inline]
67189                        pub fn copy_background_color_from(&mut self, other: &Self) {
67190                            self.background_color = other.background_color.clone();
67191                        }
67192                    /// Reset background-color from the initial struct.
67193                    #[allow(non_snake_case)]
67194                    #[inline]
67195                    pub fn reset_background_color(&mut self, other: &Self) {
67196                        self.copy_background_color_from(other)
67197                    }
67198
67199                    /// Get the computed value for background-color.
67200                    #[allow(non_snake_case)]
67201                    #[inline]
67202                    pub fn clone_background_color(&self) -> longhands::background_color::computed_value::T {
67203                        self.background_color.clone()
67204                    }
67205                        /// Set background-image.
67206                        #[allow(non_snake_case)]
67207                        #[inline]
67208                        pub fn set_background_image(&mut self, v: longhands::background_image::computed_value::T) {
67209                            self.background_image = v;
67210                        }
67211                        /// Set background-image from other struct.
67212                        #[allow(non_snake_case)]
67213                        #[inline]
67214                        pub fn copy_background_image_from(&mut self, other: &Self) {
67215                            self.background_image = other.background_image.clone();
67216                        }
67217                    /// Reset background-image from the initial struct.
67218                    #[allow(non_snake_case)]
67219                    #[inline]
67220                    pub fn reset_background_image(&mut self, other: &Self) {
67221                        self.copy_background_image_from(other)
67222                    }
67223
67224                    /// Get the computed value for background-image.
67225                    #[allow(non_snake_case)]
67226                    #[inline]
67227                    pub fn clone_background_image(&self) -> longhands::background_image::computed_value::T {
67228                        self.background_image.clone()
67229                    }
67230                        /// Set background-position-x.
67231                        #[allow(non_snake_case)]
67232                        #[inline]
67233                        pub fn set_background_position_x(&mut self, v: longhands::background_position_x::computed_value::T) {
67234                            self.background_position_x = v;
67235                        }
67236                        /// Set background-position-x from other struct.
67237                        #[allow(non_snake_case)]
67238                        #[inline]
67239                        pub fn copy_background_position_x_from(&mut self, other: &Self) {
67240                            self.background_position_x = other.background_position_x.clone();
67241                        }
67242                    /// Reset background-position-x from the initial struct.
67243                    #[allow(non_snake_case)]
67244                    #[inline]
67245                    pub fn reset_background_position_x(&mut self, other: &Self) {
67246                        self.copy_background_position_x_from(other)
67247                    }
67248
67249                    /// Get the computed value for background-position-x.
67250                    #[allow(non_snake_case)]
67251                    #[inline]
67252                    pub fn clone_background_position_x(&self) -> longhands::background_position_x::computed_value::T {
67253                        self.background_position_x.clone()
67254                    }
67255                        /// Set background-position-y.
67256                        #[allow(non_snake_case)]
67257                        #[inline]
67258                        pub fn set_background_position_y(&mut self, v: longhands::background_position_y::computed_value::T) {
67259                            self.background_position_y = v;
67260                        }
67261                        /// Set background-position-y from other struct.
67262                        #[allow(non_snake_case)]
67263                        #[inline]
67264                        pub fn copy_background_position_y_from(&mut self, other: &Self) {
67265                            self.background_position_y = other.background_position_y.clone();
67266                        }
67267                    /// Reset background-position-y from the initial struct.
67268                    #[allow(non_snake_case)]
67269                    #[inline]
67270                    pub fn reset_background_position_y(&mut self, other: &Self) {
67271                        self.copy_background_position_y_from(other)
67272                    }
67273
67274                    /// Get the computed value for background-position-y.
67275                    #[allow(non_snake_case)]
67276                    #[inline]
67277                    pub fn clone_background_position_y(&self) -> longhands::background_position_y::computed_value::T {
67278                        self.background_position_y.clone()
67279                    }
67280                        /// Set background-repeat.
67281                        #[allow(non_snake_case)]
67282                        #[inline]
67283                        pub fn set_background_repeat(&mut self, v: longhands::background_repeat::computed_value::T) {
67284                            self.background_repeat = v;
67285                        }
67286                        /// Set background-repeat from other struct.
67287                        #[allow(non_snake_case)]
67288                        #[inline]
67289                        pub fn copy_background_repeat_from(&mut self, other: &Self) {
67290                            self.background_repeat = other.background_repeat.clone();
67291                        }
67292                    /// Reset background-repeat from the initial struct.
67293                    #[allow(non_snake_case)]
67294                    #[inline]
67295                    pub fn reset_background_repeat(&mut self, other: &Self) {
67296                        self.copy_background_repeat_from(other)
67297                    }
67298
67299                    /// Get the computed value for background-repeat.
67300                    #[allow(non_snake_case)]
67301                    #[inline]
67302                    pub fn clone_background_repeat(&self) -> longhands::background_repeat::computed_value::T {
67303                        self.background_repeat.clone()
67304                    }
67305                        /// Set background-attachment.
67306                        #[allow(non_snake_case)]
67307                        #[inline]
67308                        pub fn set_background_attachment(&mut self, v: longhands::background_attachment::computed_value::T) {
67309                            self.background_attachment = v;
67310                        }
67311                        /// Set background-attachment from other struct.
67312                        #[allow(non_snake_case)]
67313                        #[inline]
67314                        pub fn copy_background_attachment_from(&mut self, other: &Self) {
67315                            self.background_attachment = other.background_attachment.clone();
67316                        }
67317                    /// Reset background-attachment from the initial struct.
67318                    #[allow(non_snake_case)]
67319                    #[inline]
67320                    pub fn reset_background_attachment(&mut self, other: &Self) {
67321                        self.copy_background_attachment_from(other)
67322                    }
67323
67324                    /// Get the computed value for background-attachment.
67325                    #[allow(non_snake_case)]
67326                    #[inline]
67327                    pub fn clone_background_attachment(&self) -> longhands::background_attachment::computed_value::T {
67328                        self.background_attachment.clone()
67329                    }
67330                        /// Set background-clip.
67331                        #[allow(non_snake_case)]
67332                        #[inline]
67333                        pub fn set_background_clip(&mut self, v: longhands::background_clip::computed_value::T) {
67334                            self.background_clip = v;
67335                        }
67336                        /// Set background-clip from other struct.
67337                        #[allow(non_snake_case)]
67338                        #[inline]
67339                        pub fn copy_background_clip_from(&mut self, other: &Self) {
67340                            self.background_clip = other.background_clip.clone();
67341                        }
67342                    /// Reset background-clip from the initial struct.
67343                    #[allow(non_snake_case)]
67344                    #[inline]
67345                    pub fn reset_background_clip(&mut self, other: &Self) {
67346                        self.copy_background_clip_from(other)
67347                    }
67348
67349                    /// Get the computed value for background-clip.
67350                    #[allow(non_snake_case)]
67351                    #[inline]
67352                    pub fn clone_background_clip(&self) -> longhands::background_clip::computed_value::T {
67353                        self.background_clip.clone()
67354                    }
67355                        /// Set background-origin.
67356                        #[allow(non_snake_case)]
67357                        #[inline]
67358                        pub fn set_background_origin(&mut self, v: longhands::background_origin::computed_value::T) {
67359                            self.background_origin = v;
67360                        }
67361                        /// Set background-origin from other struct.
67362                        #[allow(non_snake_case)]
67363                        #[inline]
67364                        pub fn copy_background_origin_from(&mut self, other: &Self) {
67365                            self.background_origin = other.background_origin.clone();
67366                        }
67367                    /// Reset background-origin from the initial struct.
67368                    #[allow(non_snake_case)]
67369                    #[inline]
67370                    pub fn reset_background_origin(&mut self, other: &Self) {
67371                        self.copy_background_origin_from(other)
67372                    }
67373
67374                    /// Get the computed value for background-origin.
67375                    #[allow(non_snake_case)]
67376                    #[inline]
67377                    pub fn clone_background_origin(&self) -> longhands::background_origin::computed_value::T {
67378                        self.background_origin.clone()
67379                    }
67380                        /// Set background-size.
67381                        #[allow(non_snake_case)]
67382                        #[inline]
67383                        pub fn set_background_size(&mut self, v: longhands::background_size::computed_value::T) {
67384                            self.background_size = v;
67385                        }
67386                        /// Set background-size from other struct.
67387                        #[allow(non_snake_case)]
67388                        #[inline]
67389                        pub fn copy_background_size_from(&mut self, other: &Self) {
67390                            self.background_size = other.background_size.clone();
67391                        }
67392                    /// Reset background-size from the initial struct.
67393                    #[allow(non_snake_case)]
67394                    #[inline]
67395                    pub fn reset_background_size(&mut self, other: &Self) {
67396                        self.copy_background_size_from(other)
67397                    }
67398
67399                    /// Get the computed value for background-size.
67400                    #[allow(non_snake_case)]
67401                    #[inline]
67402                    pub fn clone_background_size(&self) -> longhands::background_size::computed_value::T {
67403                        self.background_size.clone()
67404                    }
67405        }
67406
67407        #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
67408        /// The Border style struct.
67409        pub struct Border {
67410                    /// The border-top-color computed value.
67411                    pub border_top_color: longhands::border_top_color::computed_value::T,
67412                    /// The border-top-style computed value.
67413                    pub border_top_style: longhands::border_top_style::computed_value::T,
67414                    /// The border-top-width computed value.
67415                    pub border_top_width: longhands::border_top_width::computed_value::T,
67416                    /// The border-right-color computed value.
67417                    pub border_right_color: longhands::border_right_color::computed_value::T,
67418                    /// The border-right-style computed value.
67419                    pub border_right_style: longhands::border_right_style::computed_value::T,
67420                    /// The border-right-width computed value.
67421                    pub border_right_width: longhands::border_right_width::computed_value::T,
67422                    /// The border-bottom-color computed value.
67423                    pub border_bottom_color: longhands::border_bottom_color::computed_value::T,
67424                    /// The border-bottom-style computed value.
67425                    pub border_bottom_style: longhands::border_bottom_style::computed_value::T,
67426                    /// The border-bottom-width computed value.
67427                    pub border_bottom_width: longhands::border_bottom_width::computed_value::T,
67428                    /// The border-left-color computed value.
67429                    pub border_left_color: longhands::border_left_color::computed_value::T,
67430                    /// The border-left-style computed value.
67431                    pub border_left_style: longhands::border_left_style::computed_value::T,
67432                    /// The border-left-width computed value.
67433                    pub border_left_width: longhands::border_left_width::computed_value::T,
67434                    /// The border-top-left-radius computed value.
67435                    pub border_top_left_radius: longhands::border_top_left_radius::computed_value::T,
67436                    /// The border-top-right-radius computed value.
67437                    pub border_top_right_radius: longhands::border_top_right_radius::computed_value::T,
67438                    /// The border-bottom-right-radius computed value.
67439                    pub border_bottom_right_radius: longhands::border_bottom_right_radius::computed_value::T,
67440                    /// The border-bottom-left-radius computed value.
67441                    pub border_bottom_left_radius: longhands::border_bottom_left_radius::computed_value::T,
67442                    /// The border-image-source computed value.
67443                    pub border_image_source: longhands::border_image_source::computed_value::T,
67444                    /// The border-image-outset computed value.
67445                    pub border_image_outset: longhands::border_image_outset::computed_value::T,
67446                    /// The border-image-repeat computed value.
67447                    pub border_image_repeat: longhands::border_image_repeat::computed_value::T,
67448                    /// The border-image-width computed value.
67449                    pub border_image_width: longhands::border_image_width::computed_value::T,
67450                    /// The border-image-slice computed value.
67451                    pub border_image_slice: longhands::border_image_slice::computed_value::T,
67452        }
67453
67454        impl Border {
67455                        /// Set border-top-color.
67456                        #[allow(non_snake_case)]
67457                        #[inline]
67458                        pub fn set_border_top_color(&mut self, v: longhands::border_top_color::computed_value::T) {
67459                            self.border_top_color = v;
67460                        }
67461                        /// Set border-top-color from other struct.
67462                        #[allow(non_snake_case)]
67463                        #[inline]
67464                        pub fn copy_border_top_color_from(&mut self, other: &Self) {
67465                            self.border_top_color = other.border_top_color.clone();
67466                        }
67467                    /// Reset border-top-color from the initial struct.
67468                    #[allow(non_snake_case)]
67469                    #[inline]
67470                    pub fn reset_border_top_color(&mut self, other: &Self) {
67471                        self.copy_border_top_color_from(other)
67472                    }
67473
67474                    /// Get the computed value for border-top-color.
67475                    #[allow(non_snake_case)]
67476                    #[inline]
67477                    pub fn clone_border_top_color(&self) -> longhands::border_top_color::computed_value::T {
67478                        self.border_top_color.clone()
67479                    }
67480                        /// Set border-top-style.
67481                        #[allow(non_snake_case)]
67482                        #[inline]
67483                        pub fn set_border_top_style(&mut self, v: longhands::border_top_style::computed_value::T) {
67484                            self.border_top_style = v;
67485                        }
67486                        /// Set border-top-style from other struct.
67487                        #[allow(non_snake_case)]
67488                        #[inline]
67489                        pub fn copy_border_top_style_from(&mut self, other: &Self) {
67490                            self.border_top_style = other.border_top_style.clone();
67491                        }
67492                    /// Reset border-top-style from the initial struct.
67493                    #[allow(non_snake_case)]
67494                    #[inline]
67495                    pub fn reset_border_top_style(&mut self, other: &Self) {
67496                        self.copy_border_top_style_from(other)
67497                    }
67498
67499                    /// Get the computed value for border-top-style.
67500                    #[allow(non_snake_case)]
67501                    #[inline]
67502                    pub fn clone_border_top_style(&self) -> longhands::border_top_style::computed_value::T {
67503                        self.border_top_style.clone()
67504                    }
67505                        /// Set border-top-width.
67506                        #[allow(non_snake_case)]
67507                        #[inline]
67508                        pub fn set_border_top_width(&mut self, v: longhands::border_top_width::computed_value::T) {
67509                            self.border_top_width = v;
67510                        }
67511                        /// Set border-top-width from other struct.
67512                        #[allow(non_snake_case)]
67513                        #[inline]
67514                        pub fn copy_border_top_width_from(&mut self, other: &Self) {
67515                            self.border_top_width = other.border_top_width.clone();
67516                        }
67517                    /// Reset border-top-width from the initial struct.
67518                    #[allow(non_snake_case)]
67519                    #[inline]
67520                    pub fn reset_border_top_width(&mut self, other: &Self) {
67521                        self.copy_border_top_width_from(other)
67522                    }
67523
67524                    /// Get the computed value for border-top-width.
67525                    #[allow(non_snake_case)]
67526                    #[inline]
67527                    pub fn clone_border_top_width(&self) -> longhands::border_top_width::computed_value::T {
67528                        self.border_top_width.clone()
67529                    }
67530                        /// Set border-right-color.
67531                        #[allow(non_snake_case)]
67532                        #[inline]
67533                        pub fn set_border_right_color(&mut self, v: longhands::border_right_color::computed_value::T) {
67534                            self.border_right_color = v;
67535                        }
67536                        /// Set border-right-color from other struct.
67537                        #[allow(non_snake_case)]
67538                        #[inline]
67539                        pub fn copy_border_right_color_from(&mut self, other: &Self) {
67540                            self.border_right_color = other.border_right_color.clone();
67541                        }
67542                    /// Reset border-right-color from the initial struct.
67543                    #[allow(non_snake_case)]
67544                    #[inline]
67545                    pub fn reset_border_right_color(&mut self, other: &Self) {
67546                        self.copy_border_right_color_from(other)
67547                    }
67548
67549                    /// Get the computed value for border-right-color.
67550                    #[allow(non_snake_case)]
67551                    #[inline]
67552                    pub fn clone_border_right_color(&self) -> longhands::border_right_color::computed_value::T {
67553                        self.border_right_color.clone()
67554                    }
67555                        /// Set border-right-style.
67556                        #[allow(non_snake_case)]
67557                        #[inline]
67558                        pub fn set_border_right_style(&mut self, v: longhands::border_right_style::computed_value::T) {
67559                            self.border_right_style = v;
67560                        }
67561                        /// Set border-right-style from other struct.
67562                        #[allow(non_snake_case)]
67563                        #[inline]
67564                        pub fn copy_border_right_style_from(&mut self, other: &Self) {
67565                            self.border_right_style = other.border_right_style.clone();
67566                        }
67567                    /// Reset border-right-style from the initial struct.
67568                    #[allow(non_snake_case)]
67569                    #[inline]
67570                    pub fn reset_border_right_style(&mut self, other: &Self) {
67571                        self.copy_border_right_style_from(other)
67572                    }
67573
67574                    /// Get the computed value for border-right-style.
67575                    #[allow(non_snake_case)]
67576                    #[inline]
67577                    pub fn clone_border_right_style(&self) -> longhands::border_right_style::computed_value::T {
67578                        self.border_right_style.clone()
67579                    }
67580                        /// Set border-right-width.
67581                        #[allow(non_snake_case)]
67582                        #[inline]
67583                        pub fn set_border_right_width(&mut self, v: longhands::border_right_width::computed_value::T) {
67584                            self.border_right_width = v;
67585                        }
67586                        /// Set border-right-width from other struct.
67587                        #[allow(non_snake_case)]
67588                        #[inline]
67589                        pub fn copy_border_right_width_from(&mut self, other: &Self) {
67590                            self.border_right_width = other.border_right_width.clone();
67591                        }
67592                    /// Reset border-right-width from the initial struct.
67593                    #[allow(non_snake_case)]
67594                    #[inline]
67595                    pub fn reset_border_right_width(&mut self, other: &Self) {
67596                        self.copy_border_right_width_from(other)
67597                    }
67598
67599                    /// Get the computed value for border-right-width.
67600                    #[allow(non_snake_case)]
67601                    #[inline]
67602                    pub fn clone_border_right_width(&self) -> longhands::border_right_width::computed_value::T {
67603                        self.border_right_width.clone()
67604                    }
67605                        /// Set border-bottom-color.
67606                        #[allow(non_snake_case)]
67607                        #[inline]
67608                        pub fn set_border_bottom_color(&mut self, v: longhands::border_bottom_color::computed_value::T) {
67609                            self.border_bottom_color = v;
67610                        }
67611                        /// Set border-bottom-color from other struct.
67612                        #[allow(non_snake_case)]
67613                        #[inline]
67614                        pub fn copy_border_bottom_color_from(&mut self, other: &Self) {
67615                            self.border_bottom_color = other.border_bottom_color.clone();
67616                        }
67617                    /// Reset border-bottom-color from the initial struct.
67618                    #[allow(non_snake_case)]
67619                    #[inline]
67620                    pub fn reset_border_bottom_color(&mut self, other: &Self) {
67621                        self.copy_border_bottom_color_from(other)
67622                    }
67623
67624                    /// Get the computed value for border-bottom-color.
67625                    #[allow(non_snake_case)]
67626                    #[inline]
67627                    pub fn clone_border_bottom_color(&self) -> longhands::border_bottom_color::computed_value::T {
67628                        self.border_bottom_color.clone()
67629                    }
67630                        /// Set border-bottom-style.
67631                        #[allow(non_snake_case)]
67632                        #[inline]
67633                        pub fn set_border_bottom_style(&mut self, v: longhands::border_bottom_style::computed_value::T) {
67634                            self.border_bottom_style = v;
67635                        }
67636                        /// Set border-bottom-style from other struct.
67637                        #[allow(non_snake_case)]
67638                        #[inline]
67639                        pub fn copy_border_bottom_style_from(&mut self, other: &Self) {
67640                            self.border_bottom_style = other.border_bottom_style.clone();
67641                        }
67642                    /// Reset border-bottom-style from the initial struct.
67643                    #[allow(non_snake_case)]
67644                    #[inline]
67645                    pub fn reset_border_bottom_style(&mut self, other: &Self) {
67646                        self.copy_border_bottom_style_from(other)
67647                    }
67648
67649                    /// Get the computed value for border-bottom-style.
67650                    #[allow(non_snake_case)]
67651                    #[inline]
67652                    pub fn clone_border_bottom_style(&self) -> longhands::border_bottom_style::computed_value::T {
67653                        self.border_bottom_style.clone()
67654                    }
67655                        /// Set border-bottom-width.
67656                        #[allow(non_snake_case)]
67657                        #[inline]
67658                        pub fn set_border_bottom_width(&mut self, v: longhands::border_bottom_width::computed_value::T) {
67659                            self.border_bottom_width = v;
67660                        }
67661                        /// Set border-bottom-width from other struct.
67662                        #[allow(non_snake_case)]
67663                        #[inline]
67664                        pub fn copy_border_bottom_width_from(&mut self, other: &Self) {
67665                            self.border_bottom_width = other.border_bottom_width.clone();
67666                        }
67667                    /// Reset border-bottom-width from the initial struct.
67668                    #[allow(non_snake_case)]
67669                    #[inline]
67670                    pub fn reset_border_bottom_width(&mut self, other: &Self) {
67671                        self.copy_border_bottom_width_from(other)
67672                    }
67673
67674                    /// Get the computed value for border-bottom-width.
67675                    #[allow(non_snake_case)]
67676                    #[inline]
67677                    pub fn clone_border_bottom_width(&self) -> longhands::border_bottom_width::computed_value::T {
67678                        self.border_bottom_width.clone()
67679                    }
67680                        /// Set border-left-color.
67681                        #[allow(non_snake_case)]
67682                        #[inline]
67683                        pub fn set_border_left_color(&mut self, v: longhands::border_left_color::computed_value::T) {
67684                            self.border_left_color = v;
67685                        }
67686                        /// Set border-left-color from other struct.
67687                        #[allow(non_snake_case)]
67688                        #[inline]
67689                        pub fn copy_border_left_color_from(&mut self, other: &Self) {
67690                            self.border_left_color = other.border_left_color.clone();
67691                        }
67692                    /// Reset border-left-color from the initial struct.
67693                    #[allow(non_snake_case)]
67694                    #[inline]
67695                    pub fn reset_border_left_color(&mut self, other: &Self) {
67696                        self.copy_border_left_color_from(other)
67697                    }
67698
67699                    /// Get the computed value for border-left-color.
67700                    #[allow(non_snake_case)]
67701                    #[inline]
67702                    pub fn clone_border_left_color(&self) -> longhands::border_left_color::computed_value::T {
67703                        self.border_left_color.clone()
67704                    }
67705                        /// Set border-left-style.
67706                        #[allow(non_snake_case)]
67707                        #[inline]
67708                        pub fn set_border_left_style(&mut self, v: longhands::border_left_style::computed_value::T) {
67709                            self.border_left_style = v;
67710                        }
67711                        /// Set border-left-style from other struct.
67712                        #[allow(non_snake_case)]
67713                        #[inline]
67714                        pub fn copy_border_left_style_from(&mut self, other: &Self) {
67715                            self.border_left_style = other.border_left_style.clone();
67716                        }
67717                    /// Reset border-left-style from the initial struct.
67718                    #[allow(non_snake_case)]
67719                    #[inline]
67720                    pub fn reset_border_left_style(&mut self, other: &Self) {
67721                        self.copy_border_left_style_from(other)
67722                    }
67723
67724                    /// Get the computed value for border-left-style.
67725                    #[allow(non_snake_case)]
67726                    #[inline]
67727                    pub fn clone_border_left_style(&self) -> longhands::border_left_style::computed_value::T {
67728                        self.border_left_style.clone()
67729                    }
67730                        /// Set border-left-width.
67731                        #[allow(non_snake_case)]
67732                        #[inline]
67733                        pub fn set_border_left_width(&mut self, v: longhands::border_left_width::computed_value::T) {
67734                            self.border_left_width = v;
67735                        }
67736                        /// Set border-left-width from other struct.
67737                        #[allow(non_snake_case)]
67738                        #[inline]
67739                        pub fn copy_border_left_width_from(&mut self, other: &Self) {
67740                            self.border_left_width = other.border_left_width.clone();
67741                        }
67742                    /// Reset border-left-width from the initial struct.
67743                    #[allow(non_snake_case)]
67744                    #[inline]
67745                    pub fn reset_border_left_width(&mut self, other: &Self) {
67746                        self.copy_border_left_width_from(other)
67747                    }
67748
67749                    /// Get the computed value for border-left-width.
67750                    #[allow(non_snake_case)]
67751                    #[inline]
67752                    pub fn clone_border_left_width(&self) -> longhands::border_left_width::computed_value::T {
67753                        self.border_left_width.clone()
67754                    }
67755                        /// Set border-top-left-radius.
67756                        #[allow(non_snake_case)]
67757                        #[inline]
67758                        pub fn set_border_top_left_radius(&mut self, v: longhands::border_top_left_radius::computed_value::T) {
67759                            self.border_top_left_radius = v;
67760                        }
67761                        /// Set border-top-left-radius from other struct.
67762                        #[allow(non_snake_case)]
67763                        #[inline]
67764                        pub fn copy_border_top_left_radius_from(&mut self, other: &Self) {
67765                            self.border_top_left_radius = other.border_top_left_radius.clone();
67766                        }
67767                    /// Reset border-top-left-radius from the initial struct.
67768                    #[allow(non_snake_case)]
67769                    #[inline]
67770                    pub fn reset_border_top_left_radius(&mut self, other: &Self) {
67771                        self.copy_border_top_left_radius_from(other)
67772                    }
67773
67774                    /// Get the computed value for border-top-left-radius.
67775                    #[allow(non_snake_case)]
67776                    #[inline]
67777                    pub fn clone_border_top_left_radius(&self) -> longhands::border_top_left_radius::computed_value::T {
67778                        self.border_top_left_radius.clone()
67779                    }
67780                        /// Set border-top-right-radius.
67781                        #[allow(non_snake_case)]
67782                        #[inline]
67783                        pub fn set_border_top_right_radius(&mut self, v: longhands::border_top_right_radius::computed_value::T) {
67784                            self.border_top_right_radius = v;
67785                        }
67786                        /// Set border-top-right-radius from other struct.
67787                        #[allow(non_snake_case)]
67788                        #[inline]
67789                        pub fn copy_border_top_right_radius_from(&mut self, other: &Self) {
67790                            self.border_top_right_radius = other.border_top_right_radius.clone();
67791                        }
67792                    /// Reset border-top-right-radius from the initial struct.
67793                    #[allow(non_snake_case)]
67794                    #[inline]
67795                    pub fn reset_border_top_right_radius(&mut self, other: &Self) {
67796                        self.copy_border_top_right_radius_from(other)
67797                    }
67798
67799                    /// Get the computed value for border-top-right-radius.
67800                    #[allow(non_snake_case)]
67801                    #[inline]
67802                    pub fn clone_border_top_right_radius(&self) -> longhands::border_top_right_radius::computed_value::T {
67803                        self.border_top_right_radius.clone()
67804                    }
67805                        /// Set border-bottom-right-radius.
67806                        #[allow(non_snake_case)]
67807                        #[inline]
67808                        pub fn set_border_bottom_right_radius(&mut self, v: longhands::border_bottom_right_radius::computed_value::T) {
67809                            self.border_bottom_right_radius = v;
67810                        }
67811                        /// Set border-bottom-right-radius from other struct.
67812                        #[allow(non_snake_case)]
67813                        #[inline]
67814                        pub fn copy_border_bottom_right_radius_from(&mut self, other: &Self) {
67815                            self.border_bottom_right_radius = other.border_bottom_right_radius.clone();
67816                        }
67817                    /// Reset border-bottom-right-radius from the initial struct.
67818                    #[allow(non_snake_case)]
67819                    #[inline]
67820                    pub fn reset_border_bottom_right_radius(&mut self, other: &Self) {
67821                        self.copy_border_bottom_right_radius_from(other)
67822                    }
67823
67824                    /// Get the computed value for border-bottom-right-radius.
67825                    #[allow(non_snake_case)]
67826                    #[inline]
67827                    pub fn clone_border_bottom_right_radius(&self) -> longhands::border_bottom_right_radius::computed_value::T {
67828                        self.border_bottom_right_radius.clone()
67829                    }
67830                        /// Set border-bottom-left-radius.
67831                        #[allow(non_snake_case)]
67832                        #[inline]
67833                        pub fn set_border_bottom_left_radius(&mut self, v: longhands::border_bottom_left_radius::computed_value::T) {
67834                            self.border_bottom_left_radius = v;
67835                        }
67836                        /// Set border-bottom-left-radius from other struct.
67837                        #[allow(non_snake_case)]
67838                        #[inline]
67839                        pub fn copy_border_bottom_left_radius_from(&mut self, other: &Self) {
67840                            self.border_bottom_left_radius = other.border_bottom_left_radius.clone();
67841                        }
67842                    /// Reset border-bottom-left-radius from the initial struct.
67843                    #[allow(non_snake_case)]
67844                    #[inline]
67845                    pub fn reset_border_bottom_left_radius(&mut self, other: &Self) {
67846                        self.copy_border_bottom_left_radius_from(other)
67847                    }
67848
67849                    /// Get the computed value for border-bottom-left-radius.
67850                    #[allow(non_snake_case)]
67851                    #[inline]
67852                    pub fn clone_border_bottom_left_radius(&self) -> longhands::border_bottom_left_radius::computed_value::T {
67853                        self.border_bottom_left_radius.clone()
67854                    }
67855                        /// Set border-image-source.
67856                        #[allow(non_snake_case)]
67857                        #[inline]
67858                        pub fn set_border_image_source(&mut self, v: longhands::border_image_source::computed_value::T) {
67859                            self.border_image_source = v;
67860                        }
67861                        /// Set border-image-source from other struct.
67862                        #[allow(non_snake_case)]
67863                        #[inline]
67864                        pub fn copy_border_image_source_from(&mut self, other: &Self) {
67865                            self.border_image_source = other.border_image_source.clone();
67866                        }
67867                    /// Reset border-image-source from the initial struct.
67868                    #[allow(non_snake_case)]
67869                    #[inline]
67870                    pub fn reset_border_image_source(&mut self, other: &Self) {
67871                        self.copy_border_image_source_from(other)
67872                    }
67873
67874                    /// Get the computed value for border-image-source.
67875                    #[allow(non_snake_case)]
67876                    #[inline]
67877                    pub fn clone_border_image_source(&self) -> longhands::border_image_source::computed_value::T {
67878                        self.border_image_source.clone()
67879                    }
67880                        /// Set border-image-outset.
67881                        #[allow(non_snake_case)]
67882                        #[inline]
67883                        pub fn set_border_image_outset(&mut self, v: longhands::border_image_outset::computed_value::T) {
67884                            self.border_image_outset = v;
67885                        }
67886                        /// Set border-image-outset from other struct.
67887                        #[allow(non_snake_case)]
67888                        #[inline]
67889                        pub fn copy_border_image_outset_from(&mut self, other: &Self) {
67890                            self.border_image_outset = other.border_image_outset.clone();
67891                        }
67892                    /// Reset border-image-outset from the initial struct.
67893                    #[allow(non_snake_case)]
67894                    #[inline]
67895                    pub fn reset_border_image_outset(&mut self, other: &Self) {
67896                        self.copy_border_image_outset_from(other)
67897                    }
67898
67899                    /// Get the computed value for border-image-outset.
67900                    #[allow(non_snake_case)]
67901                    #[inline]
67902                    pub fn clone_border_image_outset(&self) -> longhands::border_image_outset::computed_value::T {
67903                        self.border_image_outset.clone()
67904                    }
67905                        /// Set border-image-repeat.
67906                        #[allow(non_snake_case)]
67907                        #[inline]
67908                        pub fn set_border_image_repeat(&mut self, v: longhands::border_image_repeat::computed_value::T) {
67909                            self.border_image_repeat = v;
67910                        }
67911                        /// Set border-image-repeat from other struct.
67912                        #[allow(non_snake_case)]
67913                        #[inline]
67914                        pub fn copy_border_image_repeat_from(&mut self, other: &Self) {
67915                            self.border_image_repeat = other.border_image_repeat.clone();
67916                        }
67917                    /// Reset border-image-repeat from the initial struct.
67918                    #[allow(non_snake_case)]
67919                    #[inline]
67920                    pub fn reset_border_image_repeat(&mut self, other: &Self) {
67921                        self.copy_border_image_repeat_from(other)
67922                    }
67923
67924                    /// Get the computed value for border-image-repeat.
67925                    #[allow(non_snake_case)]
67926                    #[inline]
67927                    pub fn clone_border_image_repeat(&self) -> longhands::border_image_repeat::computed_value::T {
67928                        self.border_image_repeat.clone()
67929                    }
67930                        /// Set border-image-width.
67931                        #[allow(non_snake_case)]
67932                        #[inline]
67933                        pub fn set_border_image_width(&mut self, v: longhands::border_image_width::computed_value::T) {
67934                            self.border_image_width = v;
67935                        }
67936                        /// Set border-image-width from other struct.
67937                        #[allow(non_snake_case)]
67938                        #[inline]
67939                        pub fn copy_border_image_width_from(&mut self, other: &Self) {
67940                            self.border_image_width = other.border_image_width.clone();
67941                        }
67942                    /// Reset border-image-width from the initial struct.
67943                    #[allow(non_snake_case)]
67944                    #[inline]
67945                    pub fn reset_border_image_width(&mut self, other: &Self) {
67946                        self.copy_border_image_width_from(other)
67947                    }
67948
67949                    /// Get the computed value for border-image-width.
67950                    #[allow(non_snake_case)]
67951                    #[inline]
67952                    pub fn clone_border_image_width(&self) -> longhands::border_image_width::computed_value::T {
67953                        self.border_image_width.clone()
67954                    }
67955                        /// Set border-image-slice.
67956                        #[allow(non_snake_case)]
67957                        #[inline]
67958                        pub fn set_border_image_slice(&mut self, v: longhands::border_image_slice::computed_value::T) {
67959                            self.border_image_slice = v;
67960                        }
67961                        /// Set border-image-slice from other struct.
67962                        #[allow(non_snake_case)]
67963                        #[inline]
67964                        pub fn copy_border_image_slice_from(&mut self, other: &Self) {
67965                            self.border_image_slice = other.border_image_slice.clone();
67966                        }
67967                    /// Reset border-image-slice from the initial struct.
67968                    #[allow(non_snake_case)]
67969                    #[inline]
67970                    pub fn reset_border_image_slice(&mut self, other: &Self) {
67971                        self.copy_border_image_slice_from(other)
67972                    }
67973
67974                    /// Get the computed value for border-image-slice.
67975                    #[allow(non_snake_case)]
67976                    #[inline]
67977                    pub fn clone_border_image_slice(&self) -> longhands::border_image_slice::computed_value::T {
67978                        self.border_image_slice.clone()
67979                    }
67980                    /// Whether the border-top property has nonzero width.
67981                    #[allow(non_snake_case)]
67982                    pub fn border_top_has_nonzero_width(&self) -> bool {
67983                        use crate::Zero;
67984                        !self.border_top_width.is_zero()
67985                    }
67986                    /// Whether the border-right property has nonzero width.
67987                    #[allow(non_snake_case)]
67988                    pub fn border_right_has_nonzero_width(&self) -> bool {
67989                        use crate::Zero;
67990                        !self.border_right_width.is_zero()
67991                    }
67992                    /// Whether the border-bottom property has nonzero width.
67993                    #[allow(non_snake_case)]
67994                    pub fn border_bottom_has_nonzero_width(&self) -> bool {
67995                        use crate::Zero;
67996                        !self.border_bottom_width.is_zero()
67997                    }
67998                    /// Whether the border-left property has nonzero width.
67999                    #[allow(non_snake_case)]
68000                    pub fn border_left_has_nonzero_width(&self) -> bool {
68001                        use crate::Zero;
68002                        !self.border_left_width.is_zero()
68003                    }
68004        }
68005
68006        #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
68007        /// The Box style struct.
68008        pub struct Box {
68009                    /// The display computed value.
68010                    pub display: longhands::display::computed_value::T,
68011                    /// The -servo-top-layer computed value.
68012                    pub _servo_top_layer: longhands::_servo_top_layer::computed_value::T,
68013                    /// The position computed value.
68014                    pub position: longhands::position::computed_value::T,
68015                    /// The float computed value.
68016                    pub float: longhands::float::computed_value::T,
68017                    /// The clear computed value.
68018                    pub clear: longhands::clear::computed_value::T,
68019                    /// The vertical-align computed value.
68020                    pub vertical_align: longhands::vertical_align::computed_value::T,
68021                    /// The baseline-source computed value.
68022                    pub baseline_source: longhands::baseline_source::computed_value::T,
68023                    /// The -servo-overflow-clip-box computed value.
68024                    pub _servo_overflow_clip_box: longhands::_servo_overflow_clip_box::computed_value::T,
68025                    /// The overflow-y computed value.
68026                    pub overflow_y: longhands::overflow_y::computed_value::T,
68027                    /// The overflow-x computed value.
68028                    pub overflow_x: longhands::overflow_x::computed_value::T,
68029                    /// The transform computed value.
68030                    pub transform: longhands::transform::computed_value::T,
68031                    /// The rotate computed value.
68032                    pub rotate: longhands::rotate::computed_value::T,
68033                    /// The scale computed value.
68034                    pub scale: longhands::scale::computed_value::T,
68035                    /// The translate computed value.
68036                    pub translate: longhands::translate::computed_value::T,
68037                    /// The offset-path computed value.
68038                    pub offset_path: longhands::offset_path::computed_value::T,
68039                    /// The isolation computed value.
68040                    pub isolation: longhands::isolation::computed_value::T,
68041                    /// The perspective computed value.
68042                    pub perspective: longhands::perspective::computed_value::T,
68043                    /// The perspective-origin computed value.
68044                    pub perspective_origin: longhands::perspective_origin::computed_value::T,
68045                    /// The backface-visibility computed value.
68046                    pub backface_visibility: longhands::backface_visibility::computed_value::T,
68047                    /// The transform-style computed value.
68048                    pub transform_style: longhands::transform_style::computed_value::T,
68049                    /// The transform-origin computed value.
68050                    pub transform_origin: longhands::transform_origin::computed_value::T,
68051                    /// The contain computed value.
68052                    pub contain: longhands::contain::computed_value::T,
68053                    /// The container-type computed value.
68054                    pub container_type: longhands::container_type::computed_value::T,
68055                    /// The container-name computed value.
68056                    pub container_name: longhands::container_name::computed_value::T,
68057                    /// The will-change computed value.
68058                    pub will_change: longhands::will_change::computed_value::T,
68059                    /// The zoom computed value.
68060                    pub zoom: longhands::zoom::computed_value::T,
68061                /// The display value specified by the CSS stylesheets (without any style adjustments),
68062                /// which is needed for hypothetical layout boxes.
68063                pub original_display: longhands::display::computed_value::T,
68064        }
68065
68066        impl Box {
68067                        /// Set `display`.
68068                        ///
68069                        /// We need to keep track of the original display for hypothetical boxes,
68070                        /// so we need to special-case this.
68071                        #[allow(non_snake_case)]
68072                        #[inline]
68073                        pub fn set_display(&mut self, v: longhands::display::computed_value::T) {
68074                            self.display = v;
68075                            self.original_display = v;
68076                        }
68077                        /// Set `display` from other struct.
68078                        ///
68079                        /// Same as `set_display` above.
68080                        /// Thus, we need to special-case this.
68081                        #[allow(non_snake_case)]
68082                        #[inline]
68083                        pub fn copy_display_from(&mut self, other: &Self) {
68084                            self.display = other.display.clone();
68085                            self.original_display = other.display.clone();
68086                        }
68087                    /// Reset display from the initial struct.
68088                    #[allow(non_snake_case)]
68089                    #[inline]
68090                    pub fn reset_display(&mut self, other: &Self) {
68091                        self.copy_display_from(other)
68092                    }
68093
68094                    /// Get the computed value for display.
68095                    #[allow(non_snake_case)]
68096                    #[inline]
68097                    pub fn clone_display(&self) -> longhands::display::computed_value::T {
68098                        self.display.clone()
68099                    }
68100                        /// Set -servo-top-layer.
68101                        #[allow(non_snake_case)]
68102                        #[inline]
68103                        pub fn set__servo_top_layer(&mut self, v: longhands::_servo_top_layer::computed_value::T) {
68104                            self._servo_top_layer = v;
68105                        }
68106                        /// Set -servo-top-layer from other struct.
68107                        #[allow(non_snake_case)]
68108                        #[inline]
68109                        pub fn copy__servo_top_layer_from(&mut self, other: &Self) {
68110                            self._servo_top_layer = other._servo_top_layer.clone();
68111                        }
68112                    /// Reset -servo-top-layer from the initial struct.
68113                    #[allow(non_snake_case)]
68114                    #[inline]
68115                    pub fn reset__servo_top_layer(&mut self, other: &Self) {
68116                        self.copy__servo_top_layer_from(other)
68117                    }
68118
68119                    /// Get the computed value for -servo-top-layer.
68120                    #[allow(non_snake_case)]
68121                    #[inline]
68122                    pub fn clone__servo_top_layer(&self) -> longhands::_servo_top_layer::computed_value::T {
68123                        self._servo_top_layer.clone()
68124                    }
68125                        /// Set position.
68126                        #[allow(non_snake_case)]
68127                        #[inline]
68128                        pub fn set_position(&mut self, v: longhands::position::computed_value::T) {
68129                            self.position = v;
68130                        }
68131                        /// Set position from other struct.
68132                        #[allow(non_snake_case)]
68133                        #[inline]
68134                        pub fn copy_position_from(&mut self, other: &Self) {
68135                            self.position = other.position.clone();
68136                        }
68137                    /// Reset position from the initial struct.
68138                    #[allow(non_snake_case)]
68139                    #[inline]
68140                    pub fn reset_position(&mut self, other: &Self) {
68141                        self.copy_position_from(other)
68142                    }
68143
68144                    /// Get the computed value for position.
68145                    #[allow(non_snake_case)]
68146                    #[inline]
68147                    pub fn clone_position(&self) -> longhands::position::computed_value::T {
68148                        self.position.clone()
68149                    }
68150                        /// Set float.
68151                        #[allow(non_snake_case)]
68152                        #[inline]
68153                        pub fn set_float(&mut self, v: longhands::float::computed_value::T) {
68154                            self.float = v;
68155                        }
68156                        /// Set float from other struct.
68157                        #[allow(non_snake_case)]
68158                        #[inline]
68159                        pub fn copy_float_from(&mut self, other: &Self) {
68160                            self.float = other.float.clone();
68161                        }
68162                    /// Reset float from the initial struct.
68163                    #[allow(non_snake_case)]
68164                    #[inline]
68165                    pub fn reset_float(&mut self, other: &Self) {
68166                        self.copy_float_from(other)
68167                    }
68168
68169                    /// Get the computed value for float.
68170                    #[allow(non_snake_case)]
68171                    #[inline]
68172                    pub fn clone_float(&self) -> longhands::float::computed_value::T {
68173                        self.float.clone()
68174                    }
68175                        /// Set clear.
68176                        #[allow(non_snake_case)]
68177                        #[inline]
68178                        pub fn set_clear(&mut self, v: longhands::clear::computed_value::T) {
68179                            self.clear = v;
68180                        }
68181                        /// Set clear from other struct.
68182                        #[allow(non_snake_case)]
68183                        #[inline]
68184                        pub fn copy_clear_from(&mut self, other: &Self) {
68185                            self.clear = other.clear.clone();
68186                        }
68187                    /// Reset clear from the initial struct.
68188                    #[allow(non_snake_case)]
68189                    #[inline]
68190                    pub fn reset_clear(&mut self, other: &Self) {
68191                        self.copy_clear_from(other)
68192                    }
68193
68194                    /// Get the computed value for clear.
68195                    #[allow(non_snake_case)]
68196                    #[inline]
68197                    pub fn clone_clear(&self) -> longhands::clear::computed_value::T {
68198                        self.clear.clone()
68199                    }
68200                        /// Set vertical-align.
68201                        #[allow(non_snake_case)]
68202                        #[inline]
68203                        pub fn set_vertical_align(&mut self, v: longhands::vertical_align::computed_value::T) {
68204                            self.vertical_align = v;
68205                        }
68206                        /// Set vertical-align from other struct.
68207                        #[allow(non_snake_case)]
68208                        #[inline]
68209                        pub fn copy_vertical_align_from(&mut self, other: &Self) {
68210                            self.vertical_align = other.vertical_align.clone();
68211                        }
68212                    /// Reset vertical-align from the initial struct.
68213                    #[allow(non_snake_case)]
68214                    #[inline]
68215                    pub fn reset_vertical_align(&mut self, other: &Self) {
68216                        self.copy_vertical_align_from(other)
68217                    }
68218
68219                    /// Get the computed value for vertical-align.
68220                    #[allow(non_snake_case)]
68221                    #[inline]
68222                    pub fn clone_vertical_align(&self) -> longhands::vertical_align::computed_value::T {
68223                        self.vertical_align.clone()
68224                    }
68225                        /// Set baseline-source.
68226                        #[allow(non_snake_case)]
68227                        #[inline]
68228                        pub fn set_baseline_source(&mut self, v: longhands::baseline_source::computed_value::T) {
68229                            self.baseline_source = v;
68230                        }
68231                        /// Set baseline-source from other struct.
68232                        #[allow(non_snake_case)]
68233                        #[inline]
68234                        pub fn copy_baseline_source_from(&mut self, other: &Self) {
68235                            self.baseline_source = other.baseline_source.clone();
68236                        }
68237                    /// Reset baseline-source from the initial struct.
68238                    #[allow(non_snake_case)]
68239                    #[inline]
68240                    pub fn reset_baseline_source(&mut self, other: &Self) {
68241                        self.copy_baseline_source_from(other)
68242                    }
68243
68244                    /// Get the computed value for baseline-source.
68245                    #[allow(non_snake_case)]
68246                    #[inline]
68247                    pub fn clone_baseline_source(&self) -> longhands::baseline_source::computed_value::T {
68248                        self.baseline_source.clone()
68249                    }
68250                        /// Set -servo-overflow-clip-box.
68251                        #[allow(non_snake_case)]
68252                        #[inline]
68253                        pub fn set__servo_overflow_clip_box(&mut self, v: longhands::_servo_overflow_clip_box::computed_value::T) {
68254                            self._servo_overflow_clip_box = v;
68255                        }
68256                        /// Set -servo-overflow-clip-box from other struct.
68257                        #[allow(non_snake_case)]
68258                        #[inline]
68259                        pub fn copy__servo_overflow_clip_box_from(&mut self, other: &Self) {
68260                            self._servo_overflow_clip_box = other._servo_overflow_clip_box.clone();
68261                        }
68262                    /// Reset -servo-overflow-clip-box from the initial struct.
68263                    #[allow(non_snake_case)]
68264                    #[inline]
68265                    pub fn reset__servo_overflow_clip_box(&mut self, other: &Self) {
68266                        self.copy__servo_overflow_clip_box_from(other)
68267                    }
68268
68269                    /// Get the computed value for -servo-overflow-clip-box.
68270                    #[allow(non_snake_case)]
68271                    #[inline]
68272                    pub fn clone__servo_overflow_clip_box(&self) -> longhands::_servo_overflow_clip_box::computed_value::T {
68273                        self._servo_overflow_clip_box.clone()
68274                    }
68275                        /// Set overflow-y.
68276                        #[allow(non_snake_case)]
68277                        #[inline]
68278                        pub fn set_overflow_y(&mut self, v: longhands::overflow_y::computed_value::T) {
68279                            self.overflow_y = v;
68280                        }
68281                        /// Set overflow-y from other struct.
68282                        #[allow(non_snake_case)]
68283                        #[inline]
68284                        pub fn copy_overflow_y_from(&mut self, other: &Self) {
68285                            self.overflow_y = other.overflow_y.clone();
68286                        }
68287                    /// Reset overflow-y from the initial struct.
68288                    #[allow(non_snake_case)]
68289                    #[inline]
68290                    pub fn reset_overflow_y(&mut self, other: &Self) {
68291                        self.copy_overflow_y_from(other)
68292                    }
68293
68294                    /// Get the computed value for overflow-y.
68295                    #[allow(non_snake_case)]
68296                    #[inline]
68297                    pub fn clone_overflow_y(&self) -> longhands::overflow_y::computed_value::T {
68298                        self.overflow_y.clone()
68299                    }
68300                        /// Set overflow-x.
68301                        #[allow(non_snake_case)]
68302                        #[inline]
68303                        pub fn set_overflow_x(&mut self, v: longhands::overflow_x::computed_value::T) {
68304                            self.overflow_x = v;
68305                        }
68306                        /// Set overflow-x from other struct.
68307                        #[allow(non_snake_case)]
68308                        #[inline]
68309                        pub fn copy_overflow_x_from(&mut self, other: &Self) {
68310                            self.overflow_x = other.overflow_x.clone();
68311                        }
68312                    /// Reset overflow-x from the initial struct.
68313                    #[allow(non_snake_case)]
68314                    #[inline]
68315                    pub fn reset_overflow_x(&mut self, other: &Self) {
68316                        self.copy_overflow_x_from(other)
68317                    }
68318
68319                    /// Get the computed value for overflow-x.
68320                    #[allow(non_snake_case)]
68321                    #[inline]
68322                    pub fn clone_overflow_x(&self) -> longhands::overflow_x::computed_value::T {
68323                        self.overflow_x.clone()
68324                    }
68325                        /// Set transform.
68326                        #[allow(non_snake_case)]
68327                        #[inline]
68328                        pub fn set_transform(&mut self, v: longhands::transform::computed_value::T) {
68329                            self.transform = v;
68330                        }
68331                        /// Set transform from other struct.
68332                        #[allow(non_snake_case)]
68333                        #[inline]
68334                        pub fn copy_transform_from(&mut self, other: &Self) {
68335                            self.transform = other.transform.clone();
68336                        }
68337                    /// Reset transform from the initial struct.
68338                    #[allow(non_snake_case)]
68339                    #[inline]
68340                    pub fn reset_transform(&mut self, other: &Self) {
68341                        self.copy_transform_from(other)
68342                    }
68343
68344                    /// Get the computed value for transform.
68345                    #[allow(non_snake_case)]
68346                    #[inline]
68347                    pub fn clone_transform(&self) -> longhands::transform::computed_value::T {
68348                        self.transform.clone()
68349                    }
68350                        /// Set rotate.
68351                        #[allow(non_snake_case)]
68352                        #[inline]
68353                        pub fn set_rotate(&mut self, v: longhands::rotate::computed_value::T) {
68354                            self.rotate = v;
68355                        }
68356                        /// Set rotate from other struct.
68357                        #[allow(non_snake_case)]
68358                        #[inline]
68359                        pub fn copy_rotate_from(&mut self, other: &Self) {
68360                            self.rotate = other.rotate.clone();
68361                        }
68362                    /// Reset rotate from the initial struct.
68363                    #[allow(non_snake_case)]
68364                    #[inline]
68365                    pub fn reset_rotate(&mut self, other: &Self) {
68366                        self.copy_rotate_from(other)
68367                    }
68368
68369                    /// Get the computed value for rotate.
68370                    #[allow(non_snake_case)]
68371                    #[inline]
68372                    pub fn clone_rotate(&self) -> longhands::rotate::computed_value::T {
68373                        self.rotate.clone()
68374                    }
68375                        /// Set scale.
68376                        #[allow(non_snake_case)]
68377                        #[inline]
68378                        pub fn set_scale(&mut self, v: longhands::scale::computed_value::T) {
68379                            self.scale = v;
68380                        }
68381                        /// Set scale from other struct.
68382                        #[allow(non_snake_case)]
68383                        #[inline]
68384                        pub fn copy_scale_from(&mut self, other: &Self) {
68385                            self.scale = other.scale.clone();
68386                        }
68387                    /// Reset scale from the initial struct.
68388                    #[allow(non_snake_case)]
68389                    #[inline]
68390                    pub fn reset_scale(&mut self, other: &Self) {
68391                        self.copy_scale_from(other)
68392                    }
68393
68394                    /// Get the computed value for scale.
68395                    #[allow(non_snake_case)]
68396                    #[inline]
68397                    pub fn clone_scale(&self) -> longhands::scale::computed_value::T {
68398                        self.scale.clone()
68399                    }
68400                        /// Set translate.
68401                        #[allow(non_snake_case)]
68402                        #[inline]
68403                        pub fn set_translate(&mut self, v: longhands::translate::computed_value::T) {
68404                            self.translate = v;
68405                        }
68406                        /// Set translate from other struct.
68407                        #[allow(non_snake_case)]
68408                        #[inline]
68409                        pub fn copy_translate_from(&mut self, other: &Self) {
68410                            self.translate = other.translate.clone();
68411                        }
68412                    /// Reset translate from the initial struct.
68413                    #[allow(non_snake_case)]
68414                    #[inline]
68415                    pub fn reset_translate(&mut self, other: &Self) {
68416                        self.copy_translate_from(other)
68417                    }
68418
68419                    /// Get the computed value for translate.
68420                    #[allow(non_snake_case)]
68421                    #[inline]
68422                    pub fn clone_translate(&self) -> longhands::translate::computed_value::T {
68423                        self.translate.clone()
68424                    }
68425                        /// Set offset-path.
68426                        #[allow(non_snake_case)]
68427                        #[inline]
68428                        pub fn set_offset_path(&mut self, v: longhands::offset_path::computed_value::T) {
68429                            self.offset_path = v;
68430                        }
68431                        /// Set offset-path from other struct.
68432                        #[allow(non_snake_case)]
68433                        #[inline]
68434                        pub fn copy_offset_path_from(&mut self, other: &Self) {
68435                            self.offset_path = other.offset_path.clone();
68436                        }
68437                    /// Reset offset-path from the initial struct.
68438                    #[allow(non_snake_case)]
68439                    #[inline]
68440                    pub fn reset_offset_path(&mut self, other: &Self) {
68441                        self.copy_offset_path_from(other)
68442                    }
68443
68444                    /// Get the computed value for offset-path.
68445                    #[allow(non_snake_case)]
68446                    #[inline]
68447                    pub fn clone_offset_path(&self) -> longhands::offset_path::computed_value::T {
68448                        self.offset_path.clone()
68449                    }
68450                        /// Set isolation.
68451                        #[allow(non_snake_case)]
68452                        #[inline]
68453                        pub fn set_isolation(&mut self, v: longhands::isolation::computed_value::T) {
68454                            self.isolation = v;
68455                        }
68456                        /// Set isolation from other struct.
68457                        #[allow(non_snake_case)]
68458                        #[inline]
68459                        pub fn copy_isolation_from(&mut self, other: &Self) {
68460                            self.isolation = other.isolation.clone();
68461                        }
68462                    /// Reset isolation from the initial struct.
68463                    #[allow(non_snake_case)]
68464                    #[inline]
68465                    pub fn reset_isolation(&mut self, other: &Self) {
68466                        self.copy_isolation_from(other)
68467                    }
68468
68469                    /// Get the computed value for isolation.
68470                    #[allow(non_snake_case)]
68471                    #[inline]
68472                    pub fn clone_isolation(&self) -> longhands::isolation::computed_value::T {
68473                        self.isolation.clone()
68474                    }
68475                        /// Set perspective.
68476                        #[allow(non_snake_case)]
68477                        #[inline]
68478                        pub fn set_perspective(&mut self, v: longhands::perspective::computed_value::T) {
68479                            self.perspective = v;
68480                        }
68481                        /// Set perspective from other struct.
68482                        #[allow(non_snake_case)]
68483                        #[inline]
68484                        pub fn copy_perspective_from(&mut self, other: &Self) {
68485                            self.perspective = other.perspective.clone();
68486                        }
68487                    /// Reset perspective from the initial struct.
68488                    #[allow(non_snake_case)]
68489                    #[inline]
68490                    pub fn reset_perspective(&mut self, other: &Self) {
68491                        self.copy_perspective_from(other)
68492                    }
68493
68494                    /// Get the computed value for perspective.
68495                    #[allow(non_snake_case)]
68496                    #[inline]
68497                    pub fn clone_perspective(&self) -> longhands::perspective::computed_value::T {
68498                        self.perspective.clone()
68499                    }
68500                        /// Set perspective-origin.
68501                        #[allow(non_snake_case)]
68502                        #[inline]
68503                        pub fn set_perspective_origin(&mut self, v: longhands::perspective_origin::computed_value::T) {
68504                            self.perspective_origin = v;
68505                        }
68506                        /// Set perspective-origin from other struct.
68507                        #[allow(non_snake_case)]
68508                        #[inline]
68509                        pub fn copy_perspective_origin_from(&mut self, other: &Self) {
68510                            self.perspective_origin = other.perspective_origin.clone();
68511                        }
68512                    /// Reset perspective-origin from the initial struct.
68513                    #[allow(non_snake_case)]
68514                    #[inline]
68515                    pub fn reset_perspective_origin(&mut self, other: &Self) {
68516                        self.copy_perspective_origin_from(other)
68517                    }
68518
68519                    /// Get the computed value for perspective-origin.
68520                    #[allow(non_snake_case)]
68521                    #[inline]
68522                    pub fn clone_perspective_origin(&self) -> longhands::perspective_origin::computed_value::T {
68523                        self.perspective_origin.clone()
68524                    }
68525                        /// Set backface-visibility.
68526                        #[allow(non_snake_case)]
68527                        #[inline]
68528                        pub fn set_backface_visibility(&mut self, v: longhands::backface_visibility::computed_value::T) {
68529                            self.backface_visibility = v;
68530                        }
68531                        /// Set backface-visibility from other struct.
68532                        #[allow(non_snake_case)]
68533                        #[inline]
68534                        pub fn copy_backface_visibility_from(&mut self, other: &Self) {
68535                            self.backface_visibility = other.backface_visibility.clone();
68536                        }
68537                    /// Reset backface-visibility from the initial struct.
68538                    #[allow(non_snake_case)]
68539                    #[inline]
68540                    pub fn reset_backface_visibility(&mut self, other: &Self) {
68541                        self.copy_backface_visibility_from(other)
68542                    }
68543
68544                    /// Get the computed value for backface-visibility.
68545                    #[allow(non_snake_case)]
68546                    #[inline]
68547                    pub fn clone_backface_visibility(&self) -> longhands::backface_visibility::computed_value::T {
68548                        self.backface_visibility.clone()
68549                    }
68550                        /// Set transform-style.
68551                        #[allow(non_snake_case)]
68552                        #[inline]
68553                        pub fn set_transform_style(&mut self, v: longhands::transform_style::computed_value::T) {
68554                            self.transform_style = v;
68555                        }
68556                        /// Set transform-style from other struct.
68557                        #[allow(non_snake_case)]
68558                        #[inline]
68559                        pub fn copy_transform_style_from(&mut self, other: &Self) {
68560                            self.transform_style = other.transform_style.clone();
68561                        }
68562                    /// Reset transform-style from the initial struct.
68563                    #[allow(non_snake_case)]
68564                    #[inline]
68565                    pub fn reset_transform_style(&mut self, other: &Self) {
68566                        self.copy_transform_style_from(other)
68567                    }
68568
68569                    /// Get the computed value for transform-style.
68570                    #[allow(non_snake_case)]
68571                    #[inline]
68572                    pub fn clone_transform_style(&self) -> longhands::transform_style::computed_value::T {
68573                        self.transform_style.clone()
68574                    }
68575                        /// Set transform-origin.
68576                        #[allow(non_snake_case)]
68577                        #[inline]
68578                        pub fn set_transform_origin(&mut self, v: longhands::transform_origin::computed_value::T) {
68579                            self.transform_origin = v;
68580                        }
68581                        /// Set transform-origin from other struct.
68582                        #[allow(non_snake_case)]
68583                        #[inline]
68584                        pub fn copy_transform_origin_from(&mut self, other: &Self) {
68585                            self.transform_origin = other.transform_origin.clone();
68586                        }
68587                    /// Reset transform-origin from the initial struct.
68588                    #[allow(non_snake_case)]
68589                    #[inline]
68590                    pub fn reset_transform_origin(&mut self, other: &Self) {
68591                        self.copy_transform_origin_from(other)
68592                    }
68593
68594                    /// Get the computed value for transform-origin.
68595                    #[allow(non_snake_case)]
68596                    #[inline]
68597                    pub fn clone_transform_origin(&self) -> longhands::transform_origin::computed_value::T {
68598                        self.transform_origin.clone()
68599                    }
68600                        /// Set contain.
68601                        #[allow(non_snake_case)]
68602                        #[inline]
68603                        pub fn set_contain(&mut self, v: longhands::contain::computed_value::T) {
68604                            self.contain = v;
68605                        }
68606                        /// Set contain from other struct.
68607                        #[allow(non_snake_case)]
68608                        #[inline]
68609                        pub fn copy_contain_from(&mut self, other: &Self) {
68610                            self.contain = other.contain.clone();
68611                        }
68612                    /// Reset contain from the initial struct.
68613                    #[allow(non_snake_case)]
68614                    #[inline]
68615                    pub fn reset_contain(&mut self, other: &Self) {
68616                        self.copy_contain_from(other)
68617                    }
68618
68619                    /// Get the computed value for contain.
68620                    #[allow(non_snake_case)]
68621                    #[inline]
68622                    pub fn clone_contain(&self) -> longhands::contain::computed_value::T {
68623                        self.contain.clone()
68624                    }
68625                        /// Set container-type.
68626                        #[allow(non_snake_case)]
68627                        #[inline]
68628                        pub fn set_container_type(&mut self, v: longhands::container_type::computed_value::T) {
68629                            self.container_type = v;
68630                        }
68631                        /// Set container-type from other struct.
68632                        #[allow(non_snake_case)]
68633                        #[inline]
68634                        pub fn copy_container_type_from(&mut self, other: &Self) {
68635                            self.container_type = other.container_type.clone();
68636                        }
68637                    /// Reset container-type from the initial struct.
68638                    #[allow(non_snake_case)]
68639                    #[inline]
68640                    pub fn reset_container_type(&mut self, other: &Self) {
68641                        self.copy_container_type_from(other)
68642                    }
68643
68644                    /// Get the computed value for container-type.
68645                    #[allow(non_snake_case)]
68646                    #[inline]
68647                    pub fn clone_container_type(&self) -> longhands::container_type::computed_value::T {
68648                        self.container_type.clone()
68649                    }
68650                        /// Set container-name.
68651                        #[allow(non_snake_case)]
68652                        #[inline]
68653                        pub fn set_container_name(&mut self, v: longhands::container_name::computed_value::T) {
68654                            self.container_name = v;
68655                        }
68656                        /// Set container-name from other struct.
68657                        #[allow(non_snake_case)]
68658                        #[inline]
68659                        pub fn copy_container_name_from(&mut self, other: &Self) {
68660                            self.container_name = other.container_name.clone();
68661                        }
68662                    /// Reset container-name from the initial struct.
68663                    #[allow(non_snake_case)]
68664                    #[inline]
68665                    pub fn reset_container_name(&mut self, other: &Self) {
68666                        self.copy_container_name_from(other)
68667                    }
68668
68669                    /// Get the computed value for container-name.
68670                    #[allow(non_snake_case)]
68671                    #[inline]
68672                    pub fn clone_container_name(&self) -> longhands::container_name::computed_value::T {
68673                        self.container_name.clone()
68674                    }
68675                        /// Set will-change.
68676                        #[allow(non_snake_case)]
68677                        #[inline]
68678                        pub fn set_will_change(&mut self, v: longhands::will_change::computed_value::T) {
68679                            self.will_change = v;
68680                        }
68681                        /// Set will-change from other struct.
68682                        #[allow(non_snake_case)]
68683                        #[inline]
68684                        pub fn copy_will_change_from(&mut self, other: &Self) {
68685                            self.will_change = other.will_change.clone();
68686                        }
68687                    /// Reset will-change from the initial struct.
68688                    #[allow(non_snake_case)]
68689                    #[inline]
68690                    pub fn reset_will_change(&mut self, other: &Self) {
68691                        self.copy_will_change_from(other)
68692                    }
68693
68694                    /// Get the computed value for will-change.
68695                    #[allow(non_snake_case)]
68696                    #[inline]
68697                    pub fn clone_will_change(&self) -> longhands::will_change::computed_value::T {
68698                        self.will_change.clone()
68699                    }
68700                        /// Set zoom.
68701                        #[allow(non_snake_case)]
68702                        #[inline]
68703                        pub fn set_zoom(&mut self, v: longhands::zoom::computed_value::T) {
68704                            self.zoom = v;
68705                        }
68706                        /// Set zoom from other struct.
68707                        #[allow(non_snake_case)]
68708                        #[inline]
68709                        pub fn copy_zoom_from(&mut self, other: &Self) {
68710                            self.zoom = other.zoom.clone();
68711                        }
68712                    /// Reset zoom from the initial struct.
68713                    #[allow(non_snake_case)]
68714                    #[inline]
68715                    pub fn reset_zoom(&mut self, other: &Self) {
68716                        self.copy_zoom_from(other)
68717                    }
68718
68719                    /// Get the computed value for zoom.
68720                    #[allow(non_snake_case)]
68721                    #[inline]
68722                    pub fn clone_zoom(&self) -> longhands::zoom::computed_value::T {
68723                        self.zoom.clone()
68724                    }
68725                /// Sets the display property, but without touching original_display,
68726                /// except when the adjustment comes from root or item display fixups.
68727                pub fn set_adjusted_display(
68728                    &mut self,
68729                    dpy: longhands::display::computed_value::T,
68730                    is_item_or_root: bool
68731                ) {
68732                    self.display = dpy;
68733                    if is_item_or_root {
68734                        self.original_display = dpy;
68735                    }
68736                }
68737        }
68738
68739        #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
68740        /// The Column style struct.
68741        pub struct Column {
68742                    /// The column-width computed value.
68743                    pub column_width: longhands::column_width::computed_value::T,
68744                    /// The column-count computed value.
68745                    pub column_count: longhands::column_count::computed_value::T,
68746                    /// The column-span computed value.
68747                    pub column_span: longhands::column_span::computed_value::T,
68748        }
68749
68750        impl Column {
68751                        /// Set column-width.
68752                        #[allow(non_snake_case)]
68753                        #[inline]
68754                        pub fn set_column_width(&mut self, v: longhands::column_width::computed_value::T) {
68755                            self.column_width = v;
68756                        }
68757                        /// Set column-width from other struct.
68758                        #[allow(non_snake_case)]
68759                        #[inline]
68760                        pub fn copy_column_width_from(&mut self, other: &Self) {
68761                            self.column_width = other.column_width.clone();
68762                        }
68763                    /// Reset column-width from the initial struct.
68764                    #[allow(non_snake_case)]
68765                    #[inline]
68766                    pub fn reset_column_width(&mut self, other: &Self) {
68767                        self.copy_column_width_from(other)
68768                    }
68769
68770                    /// Get the computed value for column-width.
68771                    #[allow(non_snake_case)]
68772                    #[inline]
68773                    pub fn clone_column_width(&self) -> longhands::column_width::computed_value::T {
68774                        self.column_width.clone()
68775                    }
68776                        /// Set column-count.
68777                        #[allow(non_snake_case)]
68778                        #[inline]
68779                        pub fn set_column_count(&mut self, v: longhands::column_count::computed_value::T) {
68780                            self.column_count = v;
68781                        }
68782                        /// Set column-count from other struct.
68783                        #[allow(non_snake_case)]
68784                        #[inline]
68785                        pub fn copy_column_count_from(&mut self, other: &Self) {
68786                            self.column_count = other.column_count.clone();
68787                        }
68788                    /// Reset column-count from the initial struct.
68789                    #[allow(non_snake_case)]
68790                    #[inline]
68791                    pub fn reset_column_count(&mut self, other: &Self) {
68792                        self.copy_column_count_from(other)
68793                    }
68794
68795                    /// Get the computed value for column-count.
68796                    #[allow(non_snake_case)]
68797                    #[inline]
68798                    pub fn clone_column_count(&self) -> longhands::column_count::computed_value::T {
68799                        self.column_count.clone()
68800                    }
68801                        /// Set column-span.
68802                        #[allow(non_snake_case)]
68803                        #[inline]
68804                        pub fn set_column_span(&mut self, v: longhands::column_span::computed_value::T) {
68805                            self.column_span = v;
68806                        }
68807                        /// Set column-span from other struct.
68808                        #[allow(non_snake_case)]
68809                        #[inline]
68810                        pub fn copy_column_span_from(&mut self, other: &Self) {
68811                            self.column_span = other.column_span.clone();
68812                        }
68813                    /// Reset column-span from the initial struct.
68814                    #[allow(non_snake_case)]
68815                    #[inline]
68816                    pub fn reset_column_span(&mut self, other: &Self) {
68817                        self.copy_column_span_from(other)
68818                    }
68819
68820                    /// Get the computed value for column-span.
68821                    #[allow(non_snake_case)]
68822                    #[inline]
68823                    pub fn clone_column_span(&self) -> longhands::column_span::computed_value::T {
68824                        self.column_span.clone()
68825                    }
68826        }
68827
68828        #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
68829        /// The Counters style struct.
68830        pub struct Counters {
68831                    /// The content computed value.
68832                    pub content: longhands::content::computed_value::T,
68833                    /// The counter-increment computed value.
68834                    pub counter_increment: longhands::counter_increment::computed_value::T,
68835                    /// The counter-reset computed value.
68836                    pub counter_reset: longhands::counter_reset::computed_value::T,
68837        }
68838
68839        impl Counters {
68840                        /// Set content.
68841                        #[allow(non_snake_case)]
68842                        #[inline]
68843                        pub fn set_content(&mut self, v: longhands::content::computed_value::T) {
68844                            self.content = v;
68845                        }
68846                        /// Set content from other struct.
68847                        #[allow(non_snake_case)]
68848                        #[inline]
68849                        pub fn copy_content_from(&mut self, other: &Self) {
68850                            self.content = other.content.clone();
68851                        }
68852                    /// Reset content from the initial struct.
68853                    #[allow(non_snake_case)]
68854                    #[inline]
68855                    pub fn reset_content(&mut self, other: &Self) {
68856                        self.copy_content_from(other)
68857                    }
68858
68859                    /// Get the computed value for content.
68860                    #[allow(non_snake_case)]
68861                    #[inline]
68862                    pub fn clone_content(&self) -> longhands::content::computed_value::T {
68863                        self.content.clone()
68864                    }
68865                        /// Set counter-increment.
68866                        #[allow(non_snake_case)]
68867                        #[inline]
68868                        pub fn set_counter_increment(&mut self, v: longhands::counter_increment::computed_value::T) {
68869                            self.counter_increment = v;
68870                        }
68871                        /// Set counter-increment from other struct.
68872                        #[allow(non_snake_case)]
68873                        #[inline]
68874                        pub fn copy_counter_increment_from(&mut self, other: &Self) {
68875                            self.counter_increment = other.counter_increment.clone();
68876                        }
68877                    /// Reset counter-increment from the initial struct.
68878                    #[allow(non_snake_case)]
68879                    #[inline]
68880                    pub fn reset_counter_increment(&mut self, other: &Self) {
68881                        self.copy_counter_increment_from(other)
68882                    }
68883
68884                    /// Get the computed value for counter-increment.
68885                    #[allow(non_snake_case)]
68886                    #[inline]
68887                    pub fn clone_counter_increment(&self) -> longhands::counter_increment::computed_value::T {
68888                        self.counter_increment.clone()
68889                    }
68890                        /// Set counter-reset.
68891                        #[allow(non_snake_case)]
68892                        #[inline]
68893                        pub fn set_counter_reset(&mut self, v: longhands::counter_reset::computed_value::T) {
68894                            self.counter_reset = v;
68895                        }
68896                        /// Set counter-reset from other struct.
68897                        #[allow(non_snake_case)]
68898                        #[inline]
68899                        pub fn copy_counter_reset_from(&mut self, other: &Self) {
68900                            self.counter_reset = other.counter_reset.clone();
68901                        }
68902                    /// Reset counter-reset from the initial struct.
68903                    #[allow(non_snake_case)]
68904                    #[inline]
68905                    pub fn reset_counter_reset(&mut self, other: &Self) {
68906                        self.copy_counter_reset_from(other)
68907                    }
68908
68909                    /// Get the computed value for counter-reset.
68910                    #[allow(non_snake_case)]
68911                    #[inline]
68912                    pub fn clone_counter_reset(&self) -> longhands::counter_reset::computed_value::T {
68913                        self.counter_reset.clone()
68914                    }
68915        }
68916
68917        #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
68918        /// The Effects style struct.
68919        pub struct Effects {
68920                    /// The opacity computed value.
68921                    pub opacity: longhands::opacity::computed_value::T,
68922                    /// The box-shadow computed value.
68923                    pub box_shadow: longhands::box_shadow::computed_value::T,
68924                    /// The clip computed value.
68925                    pub clip: longhands::clip::computed_value::T,
68926                    /// The filter computed value.
68927                    pub filter: longhands::filter::computed_value::T,
68928                    /// The backdrop-filter computed value.
68929                    pub backdrop_filter: longhands::backdrop_filter::computed_value::T,
68930                    /// The mix-blend-mode computed value.
68931                    pub mix_blend_mode: longhands::mix_blend_mode::computed_value::T,
68932        }
68933
68934        impl Effects {
68935                        /// Set opacity.
68936                        #[allow(non_snake_case)]
68937                        #[inline]
68938                        pub fn set_opacity(&mut self, v: longhands::opacity::computed_value::T) {
68939                            self.opacity = v;
68940                        }
68941                        /// Set opacity from other struct.
68942                        #[allow(non_snake_case)]
68943                        #[inline]
68944                        pub fn copy_opacity_from(&mut self, other: &Self) {
68945                            self.opacity = other.opacity.clone();
68946                        }
68947                    /// Reset opacity from the initial struct.
68948                    #[allow(non_snake_case)]
68949                    #[inline]
68950                    pub fn reset_opacity(&mut self, other: &Self) {
68951                        self.copy_opacity_from(other)
68952                    }
68953
68954                    /// Get the computed value for opacity.
68955                    #[allow(non_snake_case)]
68956                    #[inline]
68957                    pub fn clone_opacity(&self) -> longhands::opacity::computed_value::T {
68958                        self.opacity.clone()
68959                    }
68960                        /// Set box-shadow.
68961                        #[allow(non_snake_case)]
68962                        #[inline]
68963                        pub fn set_box_shadow(&mut self, v: longhands::box_shadow::computed_value::T) {
68964                            self.box_shadow = v;
68965                        }
68966                        /// Set box-shadow from other struct.
68967                        #[allow(non_snake_case)]
68968                        #[inline]
68969                        pub fn copy_box_shadow_from(&mut self, other: &Self) {
68970                            self.box_shadow = other.box_shadow.clone();
68971                        }
68972                    /// Reset box-shadow from the initial struct.
68973                    #[allow(non_snake_case)]
68974                    #[inline]
68975                    pub fn reset_box_shadow(&mut self, other: &Self) {
68976                        self.copy_box_shadow_from(other)
68977                    }
68978
68979                    /// Get the computed value for box-shadow.
68980                    #[allow(non_snake_case)]
68981                    #[inline]
68982                    pub fn clone_box_shadow(&self) -> longhands::box_shadow::computed_value::T {
68983                        self.box_shadow.clone()
68984                    }
68985                        /// Set clip.
68986                        #[allow(non_snake_case)]
68987                        #[inline]
68988                        pub fn set_clip(&mut self, v: longhands::clip::computed_value::T) {
68989                            self.clip = v;
68990                        }
68991                        /// Set clip from other struct.
68992                        #[allow(non_snake_case)]
68993                        #[inline]
68994                        pub fn copy_clip_from(&mut self, other: &Self) {
68995                            self.clip = other.clip.clone();
68996                        }
68997                    /// Reset clip from the initial struct.
68998                    #[allow(non_snake_case)]
68999                    #[inline]
69000                    pub fn reset_clip(&mut self, other: &Self) {
69001                        self.copy_clip_from(other)
69002                    }
69003
69004                    /// Get the computed value for clip.
69005                    #[allow(non_snake_case)]
69006                    #[inline]
69007                    pub fn clone_clip(&self) -> longhands::clip::computed_value::T {
69008                        self.clip.clone()
69009                    }
69010                        /// Set filter.
69011                        #[allow(non_snake_case)]
69012                        #[inline]
69013                        pub fn set_filter(&mut self, v: longhands::filter::computed_value::T) {
69014                            self.filter = v;
69015                        }
69016                        /// Set filter from other struct.
69017                        #[allow(non_snake_case)]
69018                        #[inline]
69019                        pub fn copy_filter_from(&mut self, other: &Self) {
69020                            self.filter = other.filter.clone();
69021                        }
69022                    /// Reset filter from the initial struct.
69023                    #[allow(non_snake_case)]
69024                    #[inline]
69025                    pub fn reset_filter(&mut self, other: &Self) {
69026                        self.copy_filter_from(other)
69027                    }
69028
69029                    /// Get the computed value for filter.
69030                    #[allow(non_snake_case)]
69031                    #[inline]
69032                    pub fn clone_filter(&self) -> longhands::filter::computed_value::T {
69033                        self.filter.clone()
69034                    }
69035                        /// Set backdrop-filter.
69036                        #[allow(non_snake_case)]
69037                        #[inline]
69038                        pub fn set_backdrop_filter(&mut self, v: longhands::backdrop_filter::computed_value::T) {
69039                            self.backdrop_filter = v;
69040                        }
69041                        /// Set backdrop-filter from other struct.
69042                        #[allow(non_snake_case)]
69043                        #[inline]
69044                        pub fn copy_backdrop_filter_from(&mut self, other: &Self) {
69045                            self.backdrop_filter = other.backdrop_filter.clone();
69046                        }
69047                    /// Reset backdrop-filter from the initial struct.
69048                    #[allow(non_snake_case)]
69049                    #[inline]
69050                    pub fn reset_backdrop_filter(&mut self, other: &Self) {
69051                        self.copy_backdrop_filter_from(other)
69052                    }
69053
69054                    /// Get the computed value for backdrop-filter.
69055                    #[allow(non_snake_case)]
69056                    #[inline]
69057                    pub fn clone_backdrop_filter(&self) -> longhands::backdrop_filter::computed_value::T {
69058                        self.backdrop_filter.clone()
69059                    }
69060                        /// Set mix-blend-mode.
69061                        #[allow(non_snake_case)]
69062                        #[inline]
69063                        pub fn set_mix_blend_mode(&mut self, v: longhands::mix_blend_mode::computed_value::T) {
69064                            self.mix_blend_mode = v;
69065                        }
69066                        /// Set mix-blend-mode from other struct.
69067                        #[allow(non_snake_case)]
69068                        #[inline]
69069                        pub fn copy_mix_blend_mode_from(&mut self, other: &Self) {
69070                            self.mix_blend_mode = other.mix_blend_mode.clone();
69071                        }
69072                    /// Reset mix-blend-mode from the initial struct.
69073                    #[allow(non_snake_case)]
69074                    #[inline]
69075                    pub fn reset_mix_blend_mode(&mut self, other: &Self) {
69076                        self.copy_mix_blend_mode_from(other)
69077                    }
69078
69079                    /// Get the computed value for mix-blend-mode.
69080                    #[allow(non_snake_case)]
69081                    #[inline]
69082                    pub fn clone_mix_blend_mode(&self) -> longhands::mix_blend_mode::computed_value::T {
69083                        self.mix_blend_mode.clone()
69084                    }
69085        }
69086
69087        #[derive(Clone, Debug, MallocSizeOf)]
69088        #[cfg_attr(feature = "servo", derive(Serialize, Deserialize))]
69089        /// The Font style struct.
69090        pub struct Font {
69091                    /// The font-family computed value.
69092                    pub font_family: longhands::font_family::computed_value::T,
69093                    /// The font-style computed value.
69094                    pub font_style: longhands::font_style::computed_value::T,
69095                    /// The font-variant-caps computed value.
69096                    pub font_variant_caps: longhands::font_variant_caps::computed_value::T,
69097                    /// The font-weight computed value.
69098                    pub font_weight: longhands::font_weight::computed_value::T,
69099                    /// The font-size computed value.
69100                    pub font_size: longhands::font_size::computed_value::T,
69101                    /// The font-stretch computed value.
69102                    pub font_stretch: longhands::font_stretch::computed_value::T,
69103                    /// The font-variation-settings computed value.
69104                    pub font_variation_settings: longhands::font_variation_settings::computed_value::T,
69105                    /// The font-language-override computed value.
69106                    pub font_language_override: longhands::font_language_override::computed_value::T,
69107                    /// The -x-lang computed value.
69108                    pub _x_lang: longhands::_x_lang::computed_value::T,
69109                    /// The line-height computed value.
69110                    pub line_height: longhands::line_height::computed_value::T,
69111                /// The font hash, used for font caching.
69112                pub hash: u64,
69113        }
69114        impl PartialEq for Font {
69115            fn eq(&self, other: &Font) -> bool {
69116                self.hash == other.hash
69117                    && self.font_family == other.font_family
69118                    && self.font_style == other.font_style
69119                    && self.font_variant_caps == other.font_variant_caps
69120                    && self.font_weight == other.font_weight
69121                    && self.font_size == other.font_size
69122                    && self.font_stretch == other.font_stretch
69123                    && self.font_variation_settings == other.font_variation_settings
69124                    && self.font_language_override == other.font_language_override
69125                    && self._x_lang == other._x_lang
69126                    && self.line_height == other.line_height
69127            }
69128        }
69129
69130        impl Font {
69131                        /// Set font-family.
69132                        #[allow(non_snake_case)]
69133                        #[inline]
69134                        pub fn set_font_family(&mut self, v: longhands::font_family::computed_value::T) {
69135                            self.font_family = v;
69136                        }
69137                        /// Set font-family from other struct.
69138                        #[allow(non_snake_case)]
69139                        #[inline]
69140                        pub fn copy_font_family_from(&mut self, other: &Self) {
69141                            self.font_family = other.font_family.clone();
69142                        }
69143                    /// Reset font-family from the initial struct.
69144                    #[allow(non_snake_case)]
69145                    #[inline]
69146                    pub fn reset_font_family(&mut self, other: &Self) {
69147                        self.copy_font_family_from(other)
69148                    }
69149
69150                    /// Get the computed value for font-family.
69151                    #[allow(non_snake_case)]
69152                    #[inline]
69153                    pub fn clone_font_family(&self) -> longhands::font_family::computed_value::T {
69154                        self.font_family.clone()
69155                    }
69156                        /// Set font-style.
69157                        #[allow(non_snake_case)]
69158                        #[inline]
69159                        pub fn set_font_style(&mut self, v: longhands::font_style::computed_value::T) {
69160                            self.font_style = v;
69161                        }
69162                        /// Set font-style from other struct.
69163                        #[allow(non_snake_case)]
69164                        #[inline]
69165                        pub fn copy_font_style_from(&mut self, other: &Self) {
69166                            self.font_style = other.font_style.clone();
69167                        }
69168                    /// Reset font-style from the initial struct.
69169                    #[allow(non_snake_case)]
69170                    #[inline]
69171                    pub fn reset_font_style(&mut self, other: &Self) {
69172                        self.copy_font_style_from(other)
69173                    }
69174
69175                    /// Get the computed value for font-style.
69176                    #[allow(non_snake_case)]
69177                    #[inline]
69178                    pub fn clone_font_style(&self) -> longhands::font_style::computed_value::T {
69179                        self.font_style.clone()
69180                    }
69181                        /// Set font-variant-caps.
69182                        #[allow(non_snake_case)]
69183                        #[inline]
69184                        pub fn set_font_variant_caps(&mut self, v: longhands::font_variant_caps::computed_value::T) {
69185                            self.font_variant_caps = v;
69186                        }
69187                        /// Set font-variant-caps from other struct.
69188                        #[allow(non_snake_case)]
69189                        #[inline]
69190                        pub fn copy_font_variant_caps_from(&mut self, other: &Self) {
69191                            self.font_variant_caps = other.font_variant_caps.clone();
69192                        }
69193                    /// Reset font-variant-caps from the initial struct.
69194                    #[allow(non_snake_case)]
69195                    #[inline]
69196                    pub fn reset_font_variant_caps(&mut self, other: &Self) {
69197                        self.copy_font_variant_caps_from(other)
69198                    }
69199
69200                    /// Get the computed value for font-variant-caps.
69201                    #[allow(non_snake_case)]
69202                    #[inline]
69203                    pub fn clone_font_variant_caps(&self) -> longhands::font_variant_caps::computed_value::T {
69204                        self.font_variant_caps.clone()
69205                    }
69206                        /// Set font-weight.
69207                        #[allow(non_snake_case)]
69208                        #[inline]
69209                        pub fn set_font_weight(&mut self, v: longhands::font_weight::computed_value::T) {
69210                            self.font_weight = v;
69211                        }
69212                        /// Set font-weight from other struct.
69213                        #[allow(non_snake_case)]
69214                        #[inline]
69215                        pub fn copy_font_weight_from(&mut self, other: &Self) {
69216                            self.font_weight = other.font_weight.clone();
69217                        }
69218                    /// Reset font-weight from the initial struct.
69219                    #[allow(non_snake_case)]
69220                    #[inline]
69221                    pub fn reset_font_weight(&mut self, other: &Self) {
69222                        self.copy_font_weight_from(other)
69223                    }
69224
69225                    /// Get the computed value for font-weight.
69226                    #[allow(non_snake_case)]
69227                    #[inline]
69228                    pub fn clone_font_weight(&self) -> longhands::font_weight::computed_value::T {
69229                        self.font_weight.clone()
69230                    }
69231                        /// Set font-size.
69232                        #[allow(non_snake_case)]
69233                        #[inline]
69234                        pub fn set_font_size(&mut self, v: longhands::font_size::computed_value::T) {
69235                            self.font_size = v;
69236                        }
69237                        /// Set font-size from other struct.
69238                        #[allow(non_snake_case)]
69239                        #[inline]
69240                        pub fn copy_font_size_from(&mut self, other: &Self) {
69241                            self.font_size = other.font_size.clone();
69242                        }
69243                    /// Reset font-size from the initial struct.
69244                    #[allow(non_snake_case)]
69245                    #[inline]
69246                    pub fn reset_font_size(&mut self, other: &Self) {
69247                        self.copy_font_size_from(other)
69248                    }
69249
69250                    /// Get the computed value for font-size.
69251                    #[allow(non_snake_case)]
69252                    #[inline]
69253                    pub fn clone_font_size(&self) -> longhands::font_size::computed_value::T {
69254                        self.font_size.clone()
69255                    }
69256                        /// Set font-stretch.
69257                        #[allow(non_snake_case)]
69258                        #[inline]
69259                        pub fn set_font_stretch(&mut self, v: longhands::font_stretch::computed_value::T) {
69260                            self.font_stretch = v;
69261                        }
69262                        /// Set font-stretch from other struct.
69263                        #[allow(non_snake_case)]
69264                        #[inline]
69265                        pub fn copy_font_stretch_from(&mut self, other: &Self) {
69266                            self.font_stretch = other.font_stretch.clone();
69267                        }
69268                    /// Reset font-stretch from the initial struct.
69269                    #[allow(non_snake_case)]
69270                    #[inline]
69271                    pub fn reset_font_stretch(&mut self, other: &Self) {
69272                        self.copy_font_stretch_from(other)
69273                    }
69274
69275                    /// Get the computed value for font-stretch.
69276                    #[allow(non_snake_case)]
69277                    #[inline]
69278                    pub fn clone_font_stretch(&self) -> longhands::font_stretch::computed_value::T {
69279                        self.font_stretch.clone()
69280                    }
69281                        /// Set font-variation-settings.
69282                        #[allow(non_snake_case)]
69283                        #[inline]
69284                        pub fn set_font_variation_settings(&mut self, v: longhands::font_variation_settings::computed_value::T) {
69285                            self.font_variation_settings = v;
69286                        }
69287                        /// Set font-variation-settings from other struct.
69288                        #[allow(non_snake_case)]
69289                        #[inline]
69290                        pub fn copy_font_variation_settings_from(&mut self, other: &Self) {
69291                            self.font_variation_settings = other.font_variation_settings.clone();
69292                        }
69293                    /// Reset font-variation-settings from the initial struct.
69294                    #[allow(non_snake_case)]
69295                    #[inline]
69296                    pub fn reset_font_variation_settings(&mut self, other: &Self) {
69297                        self.copy_font_variation_settings_from(other)
69298                    }
69299
69300                    /// Get the computed value for font-variation-settings.
69301                    #[allow(non_snake_case)]
69302                    #[inline]
69303                    pub fn clone_font_variation_settings(&self) -> longhands::font_variation_settings::computed_value::T {
69304                        self.font_variation_settings.clone()
69305                    }
69306                        /// Set font-language-override.
69307                        #[allow(non_snake_case)]
69308                        #[inline]
69309                        pub fn set_font_language_override(&mut self, v: longhands::font_language_override::computed_value::T) {
69310                            self.font_language_override = v;
69311                        }
69312                        /// Set font-language-override from other struct.
69313                        #[allow(non_snake_case)]
69314                        #[inline]
69315                        pub fn copy_font_language_override_from(&mut self, other: &Self) {
69316                            self.font_language_override = other.font_language_override.clone();
69317                        }
69318                    /// Reset font-language-override from the initial struct.
69319                    #[allow(non_snake_case)]
69320                    #[inline]
69321                    pub fn reset_font_language_override(&mut self, other: &Self) {
69322                        self.copy_font_language_override_from(other)
69323                    }
69324
69325                    /// Get the computed value for font-language-override.
69326                    #[allow(non_snake_case)]
69327                    #[inline]
69328                    pub fn clone_font_language_override(&self) -> longhands::font_language_override::computed_value::T {
69329                        self.font_language_override.clone()
69330                    }
69331                        /// Set -x-lang.
69332                        #[allow(non_snake_case)]
69333                        #[inline]
69334                        pub fn set__x_lang(&mut self, v: longhands::_x_lang::computed_value::T) {
69335                            self._x_lang = v;
69336                        }
69337                        /// Set -x-lang from other struct.
69338                        #[allow(non_snake_case)]
69339                        #[inline]
69340                        pub fn copy__x_lang_from(&mut self, other: &Self) {
69341                            self._x_lang = other._x_lang.clone();
69342                        }
69343                    /// Reset -x-lang from the initial struct.
69344                    #[allow(non_snake_case)]
69345                    #[inline]
69346                    pub fn reset__x_lang(&mut self, other: &Self) {
69347                        self.copy__x_lang_from(other)
69348                    }
69349
69350                    /// Get the computed value for -x-lang.
69351                    #[allow(non_snake_case)]
69352                    #[inline]
69353                    pub fn clone__x_lang(&self) -> longhands::_x_lang::computed_value::T {
69354                        self._x_lang.clone()
69355                    }
69356                        /// Set line-height.
69357                        #[allow(non_snake_case)]
69358                        #[inline]
69359                        pub fn set_line_height(&mut self, v: longhands::line_height::computed_value::T) {
69360                            self.line_height = v;
69361                        }
69362                        /// Set line-height from other struct.
69363                        #[allow(non_snake_case)]
69364                        #[inline]
69365                        pub fn copy_line_height_from(&mut self, other: &Self) {
69366                            self.line_height = other.line_height.clone();
69367                        }
69368                    /// Reset line-height from the initial struct.
69369                    #[allow(non_snake_case)]
69370                    #[inline]
69371                    pub fn reset_line_height(&mut self, other: &Self) {
69372                        self.copy_line_height_from(other)
69373                    }
69374
69375                    /// Get the computed value for line-height.
69376                    #[allow(non_snake_case)]
69377                    #[inline]
69378                    pub fn clone_line_height(&self) -> longhands::line_height::computed_value::T {
69379                        self.line_height.clone()
69380                    }
69381                /// Computes a font hash in order to be able to cache fonts
69382                /// effectively in GFX and layout.
69383                pub fn compute_font_hash(&mut self) {
69384                    let mut hasher: FxHasher = Default::default();
69385                    self.font_weight.hash(&mut hasher);
69386                    self.font_stretch.hash(&mut hasher);
69387                    self.font_style.hash(&mut hasher);
69388                    self.font_family.hash(&mut hasher);
69389                    self.hash = hasher.finish()
69390                }
69391                /// Create a new Font with the initial values of all members.
69392                pub fn initial_values() -> Self {
69393                    Self {
69394                                font_family: longhands::font_family::get_initial_value(),
69395                                font_style: longhands::font_style::get_initial_value(),
69396                                font_variant_caps: longhands::font_variant_caps::get_initial_value(),
69397                                font_weight: longhands::font_weight::get_initial_value(),
69398                                font_size: longhands::font_size::get_initial_value(),
69399                                font_stretch: longhands::font_stretch::get_initial_value(),
69400                                font_variation_settings: longhands::font_variation_settings::get_initial_value(),
69401                                font_language_override: longhands::font_language_override::get_initial_value(),
69402                                _x_lang: longhands::_x_lang::get_initial_value(),
69403                                line_height: longhands::line_height::get_initial_value(),
69404                        hash: 0,
69405                    }
69406                 }
69407        }
69408
69409        #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
69410        /// The InheritedBox style struct.
69411        pub struct InheritedBox {
69412                    /// The visibility computed value.
69413                    pub visibility: longhands::visibility::computed_value::T,
69414                    /// The writing-mode computed value.
69415                    pub writing_mode: longhands::writing_mode::computed_value::T,
69416                    /// The direction computed value.
69417                    pub direction: longhands::direction::computed_value::T,
69418                    /// The image-rendering computed value.
69419                    pub image_rendering: longhands::image_rendering::computed_value::T,
69420        }
69421
69422        impl InheritedBox {
69423                        /// Set visibility.
69424                        #[allow(non_snake_case)]
69425                        #[inline]
69426                        pub fn set_visibility(&mut self, v: longhands::visibility::computed_value::T) {
69427                            self.visibility = v;
69428                        }
69429                        /// Set visibility from other struct.
69430                        #[allow(non_snake_case)]
69431                        #[inline]
69432                        pub fn copy_visibility_from(&mut self, other: &Self) {
69433                            self.visibility = other.visibility.clone();
69434                        }
69435                    /// Reset visibility from the initial struct.
69436                    #[allow(non_snake_case)]
69437                    #[inline]
69438                    pub fn reset_visibility(&mut self, other: &Self) {
69439                        self.copy_visibility_from(other)
69440                    }
69441
69442                    /// Get the computed value for visibility.
69443                    #[allow(non_snake_case)]
69444                    #[inline]
69445                    pub fn clone_visibility(&self) -> longhands::visibility::computed_value::T {
69446                        self.visibility.clone()
69447                    }
69448                        /// Set writing-mode.
69449                        #[allow(non_snake_case)]
69450                        #[inline]
69451                        pub fn set_writing_mode(&mut self, v: longhands::writing_mode::computed_value::T) {
69452                            self.writing_mode = v;
69453                        }
69454                        /// Set writing-mode from other struct.
69455                        #[allow(non_snake_case)]
69456                        #[inline]
69457                        pub fn copy_writing_mode_from(&mut self, other: &Self) {
69458                            self.writing_mode = other.writing_mode.clone();
69459                        }
69460                    /// Reset writing-mode from the initial struct.
69461                    #[allow(non_snake_case)]
69462                    #[inline]
69463                    pub fn reset_writing_mode(&mut self, other: &Self) {
69464                        self.copy_writing_mode_from(other)
69465                    }
69466
69467                    /// Get the computed value for writing-mode.
69468                    #[allow(non_snake_case)]
69469                    #[inline]
69470                    pub fn clone_writing_mode(&self) -> longhands::writing_mode::computed_value::T {
69471                        self.writing_mode.clone()
69472                    }
69473                        /// Set direction.
69474                        #[allow(non_snake_case)]
69475                        #[inline]
69476                        pub fn set_direction(&mut self, v: longhands::direction::computed_value::T) {
69477                            self.direction = v;
69478                        }
69479                        /// Set direction from other struct.
69480                        #[allow(non_snake_case)]
69481                        #[inline]
69482                        pub fn copy_direction_from(&mut self, other: &Self) {
69483                            self.direction = other.direction.clone();
69484                        }
69485                    /// Reset direction from the initial struct.
69486                    #[allow(non_snake_case)]
69487                    #[inline]
69488                    pub fn reset_direction(&mut self, other: &Self) {
69489                        self.copy_direction_from(other)
69490                    }
69491
69492                    /// Get the computed value for direction.
69493                    #[allow(non_snake_case)]
69494                    #[inline]
69495                    pub fn clone_direction(&self) -> longhands::direction::computed_value::T {
69496                        self.direction.clone()
69497                    }
69498                        /// Set image-rendering.
69499                        #[allow(non_snake_case)]
69500                        #[inline]
69501                        pub fn set_image_rendering(&mut self, v: longhands::image_rendering::computed_value::T) {
69502                            self.image_rendering = v;
69503                        }
69504                        /// Set image-rendering from other struct.
69505                        #[allow(non_snake_case)]
69506                        #[inline]
69507                        pub fn copy_image_rendering_from(&mut self, other: &Self) {
69508                            self.image_rendering = other.image_rendering.clone();
69509                        }
69510                    /// Reset image-rendering from the initial struct.
69511                    #[allow(non_snake_case)]
69512                    #[inline]
69513                    pub fn reset_image_rendering(&mut self, other: &Self) {
69514                        self.copy_image_rendering_from(other)
69515                    }
69516
69517                    /// Get the computed value for image-rendering.
69518                    #[allow(non_snake_case)]
69519                    #[inline]
69520                    pub fn clone_image_rendering(&self) -> longhands::image_rendering::computed_value::T {
69521                        self.image_rendering.clone()
69522                    }
69523        }
69524
69525        #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
69526        /// The InheritedTable style struct.
69527        pub struct InheritedTable {
69528                    /// The border-collapse computed value.
69529                    pub border_collapse: longhands::border_collapse::computed_value::T,
69530                    /// The empty-cells computed value.
69531                    pub empty_cells: longhands::empty_cells::computed_value::T,
69532                    /// The caption-side computed value.
69533                    pub caption_side: longhands::caption_side::computed_value::T,
69534                    /// The border-spacing computed value.
69535                    pub border_spacing: longhands::border_spacing::computed_value::T,
69536        }
69537
69538        impl InheritedTable {
69539                        /// Set border-collapse.
69540                        #[allow(non_snake_case)]
69541                        #[inline]
69542                        pub fn set_border_collapse(&mut self, v: longhands::border_collapse::computed_value::T) {
69543                            self.border_collapse = v;
69544                        }
69545                        /// Set border-collapse from other struct.
69546                        #[allow(non_snake_case)]
69547                        #[inline]
69548                        pub fn copy_border_collapse_from(&mut self, other: &Self) {
69549                            self.border_collapse = other.border_collapse.clone();
69550                        }
69551                    /// Reset border-collapse from the initial struct.
69552                    #[allow(non_snake_case)]
69553                    #[inline]
69554                    pub fn reset_border_collapse(&mut self, other: &Self) {
69555                        self.copy_border_collapse_from(other)
69556                    }
69557
69558                    /// Get the computed value for border-collapse.
69559                    #[allow(non_snake_case)]
69560                    #[inline]
69561                    pub fn clone_border_collapse(&self) -> longhands::border_collapse::computed_value::T {
69562                        self.border_collapse.clone()
69563                    }
69564                        /// Set empty-cells.
69565                        #[allow(non_snake_case)]
69566                        #[inline]
69567                        pub fn set_empty_cells(&mut self, v: longhands::empty_cells::computed_value::T) {
69568                            self.empty_cells = v;
69569                        }
69570                        /// Set empty-cells from other struct.
69571                        #[allow(non_snake_case)]
69572                        #[inline]
69573                        pub fn copy_empty_cells_from(&mut self, other: &Self) {
69574                            self.empty_cells = other.empty_cells.clone();
69575                        }
69576                    /// Reset empty-cells from the initial struct.
69577                    #[allow(non_snake_case)]
69578                    #[inline]
69579                    pub fn reset_empty_cells(&mut self, other: &Self) {
69580                        self.copy_empty_cells_from(other)
69581                    }
69582
69583                    /// Get the computed value for empty-cells.
69584                    #[allow(non_snake_case)]
69585                    #[inline]
69586                    pub fn clone_empty_cells(&self) -> longhands::empty_cells::computed_value::T {
69587                        self.empty_cells.clone()
69588                    }
69589                        /// Set caption-side.
69590                        #[allow(non_snake_case)]
69591                        #[inline]
69592                        pub fn set_caption_side(&mut self, v: longhands::caption_side::computed_value::T) {
69593                            self.caption_side = v;
69594                        }
69595                        /// Set caption-side from other struct.
69596                        #[allow(non_snake_case)]
69597                        #[inline]
69598                        pub fn copy_caption_side_from(&mut self, other: &Self) {
69599                            self.caption_side = other.caption_side.clone();
69600                        }
69601                    /// Reset caption-side from the initial struct.
69602                    #[allow(non_snake_case)]
69603                    #[inline]
69604                    pub fn reset_caption_side(&mut self, other: &Self) {
69605                        self.copy_caption_side_from(other)
69606                    }
69607
69608                    /// Get the computed value for caption-side.
69609                    #[allow(non_snake_case)]
69610                    #[inline]
69611                    pub fn clone_caption_side(&self) -> longhands::caption_side::computed_value::T {
69612                        self.caption_side.clone()
69613                    }
69614                        /// Set border-spacing.
69615                        #[allow(non_snake_case)]
69616                        #[inline]
69617                        pub fn set_border_spacing(&mut self, v: longhands::border_spacing::computed_value::T) {
69618                            self.border_spacing = v;
69619                        }
69620                        /// Set border-spacing from other struct.
69621                        #[allow(non_snake_case)]
69622                        #[inline]
69623                        pub fn copy_border_spacing_from(&mut self, other: &Self) {
69624                            self.border_spacing = other.border_spacing.clone();
69625                        }
69626                    /// Reset border-spacing from the initial struct.
69627                    #[allow(non_snake_case)]
69628                    #[inline]
69629                    pub fn reset_border_spacing(&mut self, other: &Self) {
69630                        self.copy_border_spacing_from(other)
69631                    }
69632
69633                    /// Get the computed value for border-spacing.
69634                    #[allow(non_snake_case)]
69635                    #[inline]
69636                    pub fn clone_border_spacing(&self) -> longhands::border_spacing::computed_value::T {
69637                        self.border_spacing.clone()
69638                    }
69639        }
69640
69641        #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
69642        /// The InheritedText style struct.
69643        pub struct InheritedText {
69644                    /// The color computed value.
69645                    pub color: longhands::color::computed_value::T,
69646                    /// The text-transform computed value.
69647                    pub text_transform: longhands::text_transform::computed_value::T,
69648                    /// The text-indent computed value.
69649                    pub text_indent: longhands::text_indent::computed_value::T,
69650                    /// The overflow-wrap computed value.
69651                    pub overflow_wrap: longhands::overflow_wrap::computed_value::T,
69652                    /// The word-break computed value.
69653                    pub word_break: longhands::word_break::computed_value::T,
69654                    /// The text-justify computed value.
69655                    pub text_justify: longhands::text_justify::computed_value::T,
69656                    /// The text-align-last computed value.
69657                    pub text_align_last: longhands::text_align_last::computed_value::T,
69658                    /// The text-align computed value.
69659                    pub text_align: longhands::text_align::computed_value::T,
69660                    /// The letter-spacing computed value.
69661                    pub letter_spacing: longhands::letter_spacing::computed_value::T,
69662                    /// The word-spacing computed value.
69663                    pub word_spacing: longhands::word_spacing::computed_value::T,
69664                    /// The white-space-collapse computed value.
69665                    pub white_space_collapse: longhands::white_space_collapse::computed_value::T,
69666                    /// The text-shadow computed value.
69667                    pub text_shadow: longhands::text_shadow::computed_value::T,
69668                    /// The text-rendering computed value.
69669                    pub text_rendering: longhands::text_rendering::computed_value::T,
69670                    /// The text-wrap-mode computed value.
69671                    pub text_wrap_mode: longhands::text_wrap_mode::computed_value::T,
69672        }
69673
69674        impl InheritedText {
69675                        /// Set color.
69676                        #[allow(non_snake_case)]
69677                        #[inline]
69678                        pub fn set_color(&mut self, v: longhands::color::computed_value::T) {
69679                            self.color = v;
69680                        }
69681                        /// Set color from other struct.
69682                        #[allow(non_snake_case)]
69683                        #[inline]
69684                        pub fn copy_color_from(&mut self, other: &Self) {
69685                            self.color = other.color.clone();
69686                        }
69687                    /// Reset color from the initial struct.
69688                    #[allow(non_snake_case)]
69689                    #[inline]
69690                    pub fn reset_color(&mut self, other: &Self) {
69691                        self.copy_color_from(other)
69692                    }
69693
69694                    /// Get the computed value for color.
69695                    #[allow(non_snake_case)]
69696                    #[inline]
69697                    pub fn clone_color(&self) -> longhands::color::computed_value::T {
69698                        self.color.clone()
69699                    }
69700                        /// Set text-transform.
69701                        #[allow(non_snake_case)]
69702                        #[inline]
69703                        pub fn set_text_transform(&mut self, v: longhands::text_transform::computed_value::T) {
69704                            self.text_transform = v;
69705                        }
69706                        /// Set text-transform from other struct.
69707                        #[allow(non_snake_case)]
69708                        #[inline]
69709                        pub fn copy_text_transform_from(&mut self, other: &Self) {
69710                            self.text_transform = other.text_transform.clone();
69711                        }
69712                    /// Reset text-transform from the initial struct.
69713                    #[allow(non_snake_case)]
69714                    #[inline]
69715                    pub fn reset_text_transform(&mut self, other: &Self) {
69716                        self.copy_text_transform_from(other)
69717                    }
69718
69719                    /// Get the computed value for text-transform.
69720                    #[allow(non_snake_case)]
69721                    #[inline]
69722                    pub fn clone_text_transform(&self) -> longhands::text_transform::computed_value::T {
69723                        self.text_transform.clone()
69724                    }
69725                        /// Set text-indent.
69726                        #[allow(non_snake_case)]
69727                        #[inline]
69728                        pub fn set_text_indent(&mut self, v: longhands::text_indent::computed_value::T) {
69729                            self.text_indent = v;
69730                        }
69731                        /// Set text-indent from other struct.
69732                        #[allow(non_snake_case)]
69733                        #[inline]
69734                        pub fn copy_text_indent_from(&mut self, other: &Self) {
69735                            self.text_indent = other.text_indent.clone();
69736                        }
69737                    /// Reset text-indent from the initial struct.
69738                    #[allow(non_snake_case)]
69739                    #[inline]
69740                    pub fn reset_text_indent(&mut self, other: &Self) {
69741                        self.copy_text_indent_from(other)
69742                    }
69743
69744                    /// Get the computed value for text-indent.
69745                    #[allow(non_snake_case)]
69746                    #[inline]
69747                    pub fn clone_text_indent(&self) -> longhands::text_indent::computed_value::T {
69748                        self.text_indent.clone()
69749                    }
69750                        /// Set overflow-wrap.
69751                        #[allow(non_snake_case)]
69752                        #[inline]
69753                        pub fn set_overflow_wrap(&mut self, v: longhands::overflow_wrap::computed_value::T) {
69754                            self.overflow_wrap = v;
69755                        }
69756                        /// Set overflow-wrap from other struct.
69757                        #[allow(non_snake_case)]
69758                        #[inline]
69759                        pub fn copy_overflow_wrap_from(&mut self, other: &Self) {
69760                            self.overflow_wrap = other.overflow_wrap.clone();
69761                        }
69762                    /// Reset overflow-wrap from the initial struct.
69763                    #[allow(non_snake_case)]
69764                    #[inline]
69765                    pub fn reset_overflow_wrap(&mut self, other: &Self) {
69766                        self.copy_overflow_wrap_from(other)
69767                    }
69768
69769                    /// Get the computed value for overflow-wrap.
69770                    #[allow(non_snake_case)]
69771                    #[inline]
69772                    pub fn clone_overflow_wrap(&self) -> longhands::overflow_wrap::computed_value::T {
69773                        self.overflow_wrap.clone()
69774                    }
69775                        /// Set word-break.
69776                        #[allow(non_snake_case)]
69777                        #[inline]
69778                        pub fn set_word_break(&mut self, v: longhands::word_break::computed_value::T) {
69779                            self.word_break = v;
69780                        }
69781                        /// Set word-break from other struct.
69782                        #[allow(non_snake_case)]
69783                        #[inline]
69784                        pub fn copy_word_break_from(&mut self, other: &Self) {
69785                            self.word_break = other.word_break.clone();
69786                        }
69787                    /// Reset word-break from the initial struct.
69788                    #[allow(non_snake_case)]
69789                    #[inline]
69790                    pub fn reset_word_break(&mut self, other: &Self) {
69791                        self.copy_word_break_from(other)
69792                    }
69793
69794                    /// Get the computed value for word-break.
69795                    #[allow(non_snake_case)]
69796                    #[inline]
69797                    pub fn clone_word_break(&self) -> longhands::word_break::computed_value::T {
69798                        self.word_break.clone()
69799                    }
69800                        /// Set text-justify.
69801                        #[allow(non_snake_case)]
69802                        #[inline]
69803                        pub fn set_text_justify(&mut self, v: longhands::text_justify::computed_value::T) {
69804                            self.text_justify = v;
69805                        }
69806                        /// Set text-justify from other struct.
69807                        #[allow(non_snake_case)]
69808                        #[inline]
69809                        pub fn copy_text_justify_from(&mut self, other: &Self) {
69810                            self.text_justify = other.text_justify.clone();
69811                        }
69812                    /// Reset text-justify from the initial struct.
69813                    #[allow(non_snake_case)]
69814                    #[inline]
69815                    pub fn reset_text_justify(&mut self, other: &Self) {
69816                        self.copy_text_justify_from(other)
69817                    }
69818
69819                    /// Get the computed value for text-justify.
69820                    #[allow(non_snake_case)]
69821                    #[inline]
69822                    pub fn clone_text_justify(&self) -> longhands::text_justify::computed_value::T {
69823                        self.text_justify.clone()
69824                    }
69825                        /// Set text-align-last.
69826                        #[allow(non_snake_case)]
69827                        #[inline]
69828                        pub fn set_text_align_last(&mut self, v: longhands::text_align_last::computed_value::T) {
69829                            self.text_align_last = v;
69830                        }
69831                        /// Set text-align-last from other struct.
69832                        #[allow(non_snake_case)]
69833                        #[inline]
69834                        pub fn copy_text_align_last_from(&mut self, other: &Self) {
69835                            self.text_align_last = other.text_align_last.clone();
69836                        }
69837                    /// Reset text-align-last from the initial struct.
69838                    #[allow(non_snake_case)]
69839                    #[inline]
69840                    pub fn reset_text_align_last(&mut self, other: &Self) {
69841                        self.copy_text_align_last_from(other)
69842                    }
69843
69844                    /// Get the computed value for text-align-last.
69845                    #[allow(non_snake_case)]
69846                    #[inline]
69847                    pub fn clone_text_align_last(&self) -> longhands::text_align_last::computed_value::T {
69848                        self.text_align_last.clone()
69849                    }
69850                        /// Set text-align.
69851                        #[allow(non_snake_case)]
69852                        #[inline]
69853                        pub fn set_text_align(&mut self, v: longhands::text_align::computed_value::T) {
69854                            self.text_align = v;
69855                        }
69856                        /// Set text-align from other struct.
69857                        #[allow(non_snake_case)]
69858                        #[inline]
69859                        pub fn copy_text_align_from(&mut self, other: &Self) {
69860                            self.text_align = other.text_align.clone();
69861                        }
69862                    /// Reset text-align from the initial struct.
69863                    #[allow(non_snake_case)]
69864                    #[inline]
69865                    pub fn reset_text_align(&mut self, other: &Self) {
69866                        self.copy_text_align_from(other)
69867                    }
69868
69869                    /// Get the computed value for text-align.
69870                    #[allow(non_snake_case)]
69871                    #[inline]
69872                    pub fn clone_text_align(&self) -> longhands::text_align::computed_value::T {
69873                        self.text_align.clone()
69874                    }
69875                        /// Set letter-spacing.
69876                        #[allow(non_snake_case)]
69877                        #[inline]
69878                        pub fn set_letter_spacing(&mut self, v: longhands::letter_spacing::computed_value::T) {
69879                            self.letter_spacing = v;
69880                        }
69881                        /// Set letter-spacing from other struct.
69882                        #[allow(non_snake_case)]
69883                        #[inline]
69884                        pub fn copy_letter_spacing_from(&mut self, other: &Self) {
69885                            self.letter_spacing = other.letter_spacing.clone();
69886                        }
69887                    /// Reset letter-spacing from the initial struct.
69888                    #[allow(non_snake_case)]
69889                    #[inline]
69890                    pub fn reset_letter_spacing(&mut self, other: &Self) {
69891                        self.copy_letter_spacing_from(other)
69892                    }
69893
69894                    /// Get the computed value for letter-spacing.
69895                    #[allow(non_snake_case)]
69896                    #[inline]
69897                    pub fn clone_letter_spacing(&self) -> longhands::letter_spacing::computed_value::T {
69898                        self.letter_spacing.clone()
69899                    }
69900                        /// Set word-spacing.
69901                        #[allow(non_snake_case)]
69902                        #[inline]
69903                        pub fn set_word_spacing(&mut self, v: longhands::word_spacing::computed_value::T) {
69904                            self.word_spacing = v;
69905                        }
69906                        /// Set word-spacing from other struct.
69907                        #[allow(non_snake_case)]
69908                        #[inline]
69909                        pub fn copy_word_spacing_from(&mut self, other: &Self) {
69910                            self.word_spacing = other.word_spacing.clone();
69911                        }
69912                    /// Reset word-spacing from the initial struct.
69913                    #[allow(non_snake_case)]
69914                    #[inline]
69915                    pub fn reset_word_spacing(&mut self, other: &Self) {
69916                        self.copy_word_spacing_from(other)
69917                    }
69918
69919                    /// Get the computed value for word-spacing.
69920                    #[allow(non_snake_case)]
69921                    #[inline]
69922                    pub fn clone_word_spacing(&self) -> longhands::word_spacing::computed_value::T {
69923                        self.word_spacing.clone()
69924                    }
69925                        /// Set white-space-collapse.
69926                        #[allow(non_snake_case)]
69927                        #[inline]
69928                        pub fn set_white_space_collapse(&mut self, v: longhands::white_space_collapse::computed_value::T) {
69929                            self.white_space_collapse = v;
69930                        }
69931                        /// Set white-space-collapse from other struct.
69932                        #[allow(non_snake_case)]
69933                        #[inline]
69934                        pub fn copy_white_space_collapse_from(&mut self, other: &Self) {
69935                            self.white_space_collapse = other.white_space_collapse.clone();
69936                        }
69937                    /// Reset white-space-collapse from the initial struct.
69938                    #[allow(non_snake_case)]
69939                    #[inline]
69940                    pub fn reset_white_space_collapse(&mut self, other: &Self) {
69941                        self.copy_white_space_collapse_from(other)
69942                    }
69943
69944                    /// Get the computed value for white-space-collapse.
69945                    #[allow(non_snake_case)]
69946                    #[inline]
69947                    pub fn clone_white_space_collapse(&self) -> longhands::white_space_collapse::computed_value::T {
69948                        self.white_space_collapse.clone()
69949                    }
69950                        /// Set text-shadow.
69951                        #[allow(non_snake_case)]
69952                        #[inline]
69953                        pub fn set_text_shadow(&mut self, v: longhands::text_shadow::computed_value::T) {
69954                            self.text_shadow = v;
69955                        }
69956                        /// Set text-shadow from other struct.
69957                        #[allow(non_snake_case)]
69958                        #[inline]
69959                        pub fn copy_text_shadow_from(&mut self, other: &Self) {
69960                            self.text_shadow = other.text_shadow.clone();
69961                        }
69962                    /// Reset text-shadow from the initial struct.
69963                    #[allow(non_snake_case)]
69964                    #[inline]
69965                    pub fn reset_text_shadow(&mut self, other: &Self) {
69966                        self.copy_text_shadow_from(other)
69967                    }
69968
69969                    /// Get the computed value for text-shadow.
69970                    #[allow(non_snake_case)]
69971                    #[inline]
69972                    pub fn clone_text_shadow(&self) -> longhands::text_shadow::computed_value::T {
69973                        self.text_shadow.clone()
69974                    }
69975                        /// Set text-rendering.
69976                        #[allow(non_snake_case)]
69977                        #[inline]
69978                        pub fn set_text_rendering(&mut self, v: longhands::text_rendering::computed_value::T) {
69979                            self.text_rendering = v;
69980                        }
69981                        /// Set text-rendering from other struct.
69982                        #[allow(non_snake_case)]
69983                        #[inline]
69984                        pub fn copy_text_rendering_from(&mut self, other: &Self) {
69985                            self.text_rendering = other.text_rendering.clone();
69986                        }
69987                    /// Reset text-rendering from the initial struct.
69988                    #[allow(non_snake_case)]
69989                    #[inline]
69990                    pub fn reset_text_rendering(&mut self, other: &Self) {
69991                        self.copy_text_rendering_from(other)
69992                    }
69993
69994                    /// Get the computed value for text-rendering.
69995                    #[allow(non_snake_case)]
69996                    #[inline]
69997                    pub fn clone_text_rendering(&self) -> longhands::text_rendering::computed_value::T {
69998                        self.text_rendering.clone()
69999                    }
70000                        /// Set text-wrap-mode.
70001                        #[allow(non_snake_case)]
70002                        #[inline]
70003                        pub fn set_text_wrap_mode(&mut self, v: longhands::text_wrap_mode::computed_value::T) {
70004                            self.text_wrap_mode = v;
70005                        }
70006                        /// Set text-wrap-mode from other struct.
70007                        #[allow(non_snake_case)]
70008                        #[inline]
70009                        pub fn copy_text_wrap_mode_from(&mut self, other: &Self) {
70010                            self.text_wrap_mode = other.text_wrap_mode.clone();
70011                        }
70012                    /// Reset text-wrap-mode from the initial struct.
70013                    #[allow(non_snake_case)]
70014                    #[inline]
70015                    pub fn reset_text_wrap_mode(&mut self, other: &Self) {
70016                        self.copy_text_wrap_mode_from(other)
70017                    }
70018
70019                    /// Get the computed value for text-wrap-mode.
70020                    #[allow(non_snake_case)]
70021                    #[inline]
70022                    pub fn clone_text_wrap_mode(&self) -> longhands::text_wrap_mode::computed_value::T {
70023                        self.text_wrap_mode.clone()
70024                    }
70025        }
70026
70027        #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
70028        /// The InheritedUI style struct.
70029        pub struct InheritedUI {
70030                    /// The cursor computed value.
70031                    pub cursor: longhands::cursor::computed_value::T,
70032                    /// The pointer-events computed value.
70033                    pub pointer_events: longhands::pointer_events::computed_value::T,
70034                    /// The color-scheme computed value.
70035                    pub color_scheme: longhands::color_scheme::computed_value::T,
70036        }
70037
70038        impl InheritedUI {
70039                        /// Set cursor.
70040                        #[allow(non_snake_case)]
70041                        #[inline]
70042                        pub fn set_cursor(&mut self, v: longhands::cursor::computed_value::T) {
70043                            self.cursor = v;
70044                        }
70045                        /// Set cursor from other struct.
70046                        #[allow(non_snake_case)]
70047                        #[inline]
70048                        pub fn copy_cursor_from(&mut self, other: &Self) {
70049                            self.cursor = other.cursor.clone();
70050                        }
70051                    /// Reset cursor from the initial struct.
70052                    #[allow(non_snake_case)]
70053                    #[inline]
70054                    pub fn reset_cursor(&mut self, other: &Self) {
70055                        self.copy_cursor_from(other)
70056                    }
70057
70058                    /// Get the computed value for cursor.
70059                    #[allow(non_snake_case)]
70060                    #[inline]
70061                    pub fn clone_cursor(&self) -> longhands::cursor::computed_value::T {
70062                        self.cursor.clone()
70063                    }
70064                        /// Set pointer-events.
70065                        #[allow(non_snake_case)]
70066                        #[inline]
70067                        pub fn set_pointer_events(&mut self, v: longhands::pointer_events::computed_value::T) {
70068                            self.pointer_events = v;
70069                        }
70070                        /// Set pointer-events from other struct.
70071                        #[allow(non_snake_case)]
70072                        #[inline]
70073                        pub fn copy_pointer_events_from(&mut self, other: &Self) {
70074                            self.pointer_events = other.pointer_events.clone();
70075                        }
70076                    /// Reset pointer-events from the initial struct.
70077                    #[allow(non_snake_case)]
70078                    #[inline]
70079                    pub fn reset_pointer_events(&mut self, other: &Self) {
70080                        self.copy_pointer_events_from(other)
70081                    }
70082
70083                    /// Get the computed value for pointer-events.
70084                    #[allow(non_snake_case)]
70085                    #[inline]
70086                    pub fn clone_pointer_events(&self) -> longhands::pointer_events::computed_value::T {
70087                        self.pointer_events.clone()
70088                    }
70089                        /// Set color-scheme.
70090                        #[allow(non_snake_case)]
70091                        #[inline]
70092                        pub fn set_color_scheme(&mut self, v: longhands::color_scheme::computed_value::T) {
70093                            self.color_scheme = v;
70094                        }
70095                        /// Set color-scheme from other struct.
70096                        #[allow(non_snake_case)]
70097                        #[inline]
70098                        pub fn copy_color_scheme_from(&mut self, other: &Self) {
70099                            self.color_scheme = other.color_scheme.clone();
70100                        }
70101                    /// Reset color-scheme from the initial struct.
70102                    #[allow(non_snake_case)]
70103                    #[inline]
70104                    pub fn reset_color_scheme(&mut self, other: &Self) {
70105                        self.copy_color_scheme_from(other)
70106                    }
70107
70108                    /// Get the computed value for color-scheme.
70109                    #[allow(non_snake_case)]
70110                    #[inline]
70111                    pub fn clone_color_scheme(&self) -> longhands::color_scheme::computed_value::T {
70112                        self.color_scheme.clone()
70113                    }
70114                /// Returns the ColorSchemeFlags corresponding to the value of `color-scheme`.
70115                #[inline]
70116                pub fn color_scheme_bits(&self) -> ColorSchemeFlags {
70117                    self.color_scheme.bits
70118                }
70119        }
70120
70121        #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
70122        /// The List style struct.
70123        pub struct List {
70124                    /// The list-style-position computed value.
70125                    pub list_style_position: longhands::list_style_position::computed_value::T,
70126                    /// The list-style-type computed value.
70127                    pub list_style_type: longhands::list_style_type::computed_value::T,
70128                    /// The list-style-image computed value.
70129                    pub list_style_image: longhands::list_style_image::computed_value::T,
70130                    /// The quotes computed value.
70131                    pub quotes: longhands::quotes::computed_value::T,
70132        }
70133
70134        impl List {
70135                        /// Set list-style-position.
70136                        #[allow(non_snake_case)]
70137                        #[inline]
70138                        pub fn set_list_style_position(&mut self, v: longhands::list_style_position::computed_value::T) {
70139                            self.list_style_position = v;
70140                        }
70141                        /// Set list-style-position from other struct.
70142                        #[allow(non_snake_case)]
70143                        #[inline]
70144                        pub fn copy_list_style_position_from(&mut self, other: &Self) {
70145                            self.list_style_position = other.list_style_position.clone();
70146                        }
70147                    /// Reset list-style-position from the initial struct.
70148                    #[allow(non_snake_case)]
70149                    #[inline]
70150                    pub fn reset_list_style_position(&mut self, other: &Self) {
70151                        self.copy_list_style_position_from(other)
70152                    }
70153
70154                    /// Get the computed value for list-style-position.
70155                    #[allow(non_snake_case)]
70156                    #[inline]
70157                    pub fn clone_list_style_position(&self) -> longhands::list_style_position::computed_value::T {
70158                        self.list_style_position.clone()
70159                    }
70160                        /// Set list-style-type.
70161                        #[allow(non_snake_case)]
70162                        #[inline]
70163                        pub fn set_list_style_type(&mut self, v: longhands::list_style_type::computed_value::T) {
70164                            self.list_style_type = v;
70165                        }
70166                        /// Set list-style-type from other struct.
70167                        #[allow(non_snake_case)]
70168                        #[inline]
70169                        pub fn copy_list_style_type_from(&mut self, other: &Self) {
70170                            self.list_style_type = other.list_style_type.clone();
70171                        }
70172                    /// Reset list-style-type from the initial struct.
70173                    #[allow(non_snake_case)]
70174                    #[inline]
70175                    pub fn reset_list_style_type(&mut self, other: &Self) {
70176                        self.copy_list_style_type_from(other)
70177                    }
70178
70179                    /// Get the computed value for list-style-type.
70180                    #[allow(non_snake_case)]
70181                    #[inline]
70182                    pub fn clone_list_style_type(&self) -> longhands::list_style_type::computed_value::T {
70183                        self.list_style_type.clone()
70184                    }
70185                        /// Set list-style-image.
70186                        #[allow(non_snake_case)]
70187                        #[inline]
70188                        pub fn set_list_style_image(&mut self, v: longhands::list_style_image::computed_value::T) {
70189                            self.list_style_image = v;
70190                        }
70191                        /// Set list-style-image from other struct.
70192                        #[allow(non_snake_case)]
70193                        #[inline]
70194                        pub fn copy_list_style_image_from(&mut self, other: &Self) {
70195                            self.list_style_image = other.list_style_image.clone();
70196                        }
70197                    /// Reset list-style-image from the initial struct.
70198                    #[allow(non_snake_case)]
70199                    #[inline]
70200                    pub fn reset_list_style_image(&mut self, other: &Self) {
70201                        self.copy_list_style_image_from(other)
70202                    }
70203
70204                    /// Get the computed value for list-style-image.
70205                    #[allow(non_snake_case)]
70206                    #[inline]
70207                    pub fn clone_list_style_image(&self) -> longhands::list_style_image::computed_value::T {
70208                        self.list_style_image.clone()
70209                    }
70210                        /// Set quotes.
70211                        #[allow(non_snake_case)]
70212                        #[inline]
70213                        pub fn set_quotes(&mut self, v: longhands::quotes::computed_value::T) {
70214                            self.quotes = v;
70215                        }
70216                        /// Set quotes from other struct.
70217                        #[allow(non_snake_case)]
70218                        #[inline]
70219                        pub fn copy_quotes_from(&mut self, other: &Self) {
70220                            self.quotes = other.quotes.clone();
70221                        }
70222                    /// Reset quotes from the initial struct.
70223                    #[allow(non_snake_case)]
70224                    #[inline]
70225                    pub fn reset_quotes(&mut self, other: &Self) {
70226                        self.copy_quotes_from(other)
70227                    }
70228
70229                    /// Get the computed value for quotes.
70230                    #[allow(non_snake_case)]
70231                    #[inline]
70232                    pub fn clone_quotes(&self) -> longhands::quotes::computed_value::T {
70233                        self.quotes.clone()
70234                    }
70235        }
70236
70237        #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
70238        /// The Margin style struct.
70239        pub struct Margin {
70240                    /// The margin-top computed value.
70241                    pub margin_top: longhands::margin_top::computed_value::T,
70242                    /// The margin-right computed value.
70243                    pub margin_right: longhands::margin_right::computed_value::T,
70244                    /// The margin-bottom computed value.
70245                    pub margin_bottom: longhands::margin_bottom::computed_value::T,
70246                    /// The margin-left computed value.
70247                    pub margin_left: longhands::margin_left::computed_value::T,
70248                    /// The overflow-clip-margin computed value.
70249                    pub overflow_clip_margin: longhands::overflow_clip_margin::computed_value::T,
70250        }
70251
70252        impl Margin {
70253                        /// Set margin-top.
70254                        #[allow(non_snake_case)]
70255                        #[inline]
70256                        pub fn set_margin_top(&mut self, v: longhands::margin_top::computed_value::T) {
70257                            self.margin_top = v;
70258                        }
70259                        /// Set margin-top from other struct.
70260                        #[allow(non_snake_case)]
70261                        #[inline]
70262                        pub fn copy_margin_top_from(&mut self, other: &Self) {
70263                            self.margin_top = other.margin_top.clone();
70264                        }
70265                    /// Reset margin-top from the initial struct.
70266                    #[allow(non_snake_case)]
70267                    #[inline]
70268                    pub fn reset_margin_top(&mut self, other: &Self) {
70269                        self.copy_margin_top_from(other)
70270                    }
70271
70272                    /// Get the computed value for margin-top.
70273                    #[allow(non_snake_case)]
70274                    #[inline]
70275                    pub fn clone_margin_top(&self) -> longhands::margin_top::computed_value::T {
70276                        self.margin_top.clone()
70277                    }
70278                        /// Set margin-right.
70279                        #[allow(non_snake_case)]
70280                        #[inline]
70281                        pub fn set_margin_right(&mut self, v: longhands::margin_right::computed_value::T) {
70282                            self.margin_right = v;
70283                        }
70284                        /// Set margin-right from other struct.
70285                        #[allow(non_snake_case)]
70286                        #[inline]
70287                        pub fn copy_margin_right_from(&mut self, other: &Self) {
70288                            self.margin_right = other.margin_right.clone();
70289                        }
70290                    /// Reset margin-right from the initial struct.
70291                    #[allow(non_snake_case)]
70292                    #[inline]
70293                    pub fn reset_margin_right(&mut self, other: &Self) {
70294                        self.copy_margin_right_from(other)
70295                    }
70296
70297                    /// Get the computed value for margin-right.
70298                    #[allow(non_snake_case)]
70299                    #[inline]
70300                    pub fn clone_margin_right(&self) -> longhands::margin_right::computed_value::T {
70301                        self.margin_right.clone()
70302                    }
70303                        /// Set margin-bottom.
70304                        #[allow(non_snake_case)]
70305                        #[inline]
70306                        pub fn set_margin_bottom(&mut self, v: longhands::margin_bottom::computed_value::T) {
70307                            self.margin_bottom = v;
70308                        }
70309                        /// Set margin-bottom from other struct.
70310                        #[allow(non_snake_case)]
70311                        #[inline]
70312                        pub fn copy_margin_bottom_from(&mut self, other: &Self) {
70313                            self.margin_bottom = other.margin_bottom.clone();
70314                        }
70315                    /// Reset margin-bottom from the initial struct.
70316                    #[allow(non_snake_case)]
70317                    #[inline]
70318                    pub fn reset_margin_bottom(&mut self, other: &Self) {
70319                        self.copy_margin_bottom_from(other)
70320                    }
70321
70322                    /// Get the computed value for margin-bottom.
70323                    #[allow(non_snake_case)]
70324                    #[inline]
70325                    pub fn clone_margin_bottom(&self) -> longhands::margin_bottom::computed_value::T {
70326                        self.margin_bottom.clone()
70327                    }
70328                        /// Set margin-left.
70329                        #[allow(non_snake_case)]
70330                        #[inline]
70331                        pub fn set_margin_left(&mut self, v: longhands::margin_left::computed_value::T) {
70332                            self.margin_left = v;
70333                        }
70334                        /// Set margin-left from other struct.
70335                        #[allow(non_snake_case)]
70336                        #[inline]
70337                        pub fn copy_margin_left_from(&mut self, other: &Self) {
70338                            self.margin_left = other.margin_left.clone();
70339                        }
70340                    /// Reset margin-left from the initial struct.
70341                    #[allow(non_snake_case)]
70342                    #[inline]
70343                    pub fn reset_margin_left(&mut self, other: &Self) {
70344                        self.copy_margin_left_from(other)
70345                    }
70346
70347                    /// Get the computed value for margin-left.
70348                    #[allow(non_snake_case)]
70349                    #[inline]
70350                    pub fn clone_margin_left(&self) -> longhands::margin_left::computed_value::T {
70351                        self.margin_left.clone()
70352                    }
70353                        /// Set overflow-clip-margin.
70354                        #[allow(non_snake_case)]
70355                        #[inline]
70356                        pub fn set_overflow_clip_margin(&mut self, v: longhands::overflow_clip_margin::computed_value::T) {
70357                            self.overflow_clip_margin = v;
70358                        }
70359                        /// Set overflow-clip-margin from other struct.
70360                        #[allow(non_snake_case)]
70361                        #[inline]
70362                        pub fn copy_overflow_clip_margin_from(&mut self, other: &Self) {
70363                            self.overflow_clip_margin = other.overflow_clip_margin.clone();
70364                        }
70365                    /// Reset overflow-clip-margin from the initial struct.
70366                    #[allow(non_snake_case)]
70367                    #[inline]
70368                    pub fn reset_overflow_clip_margin(&mut self, other: &Self) {
70369                        self.copy_overflow_clip_margin_from(other)
70370                    }
70371
70372                    /// Get the computed value for overflow-clip-margin.
70373                    #[allow(non_snake_case)]
70374                    #[inline]
70375                    pub fn clone_overflow_clip_margin(&self) -> longhands::overflow_clip_margin::computed_value::T {
70376                        self.overflow_clip_margin.clone()
70377                    }
70378        }
70379
70380        #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
70381        /// The Outline style struct.
70382        pub struct Outline {
70383                    /// The outline-color computed value.
70384                    pub outline_color: longhands::outline_color::computed_value::T,
70385                    /// The outline-style computed value.
70386                    pub outline_style: longhands::outline_style::computed_value::T,
70387                    /// The outline-width computed value.
70388                    pub outline_width: longhands::outline_width::computed_value::T,
70389                    /// The outline-offset computed value.
70390                    pub outline_offset: longhands::outline_offset::computed_value::T,
70391        }
70392
70393        impl Outline {
70394                        /// Set outline-color.
70395                        #[allow(non_snake_case)]
70396                        #[inline]
70397                        pub fn set_outline_color(&mut self, v: longhands::outline_color::computed_value::T) {
70398                            self.outline_color = v;
70399                        }
70400                        /// Set outline-color from other struct.
70401                        #[allow(non_snake_case)]
70402                        #[inline]
70403                        pub fn copy_outline_color_from(&mut self, other: &Self) {
70404                            self.outline_color = other.outline_color.clone();
70405                        }
70406                    /// Reset outline-color from the initial struct.
70407                    #[allow(non_snake_case)]
70408                    #[inline]
70409                    pub fn reset_outline_color(&mut self, other: &Self) {
70410                        self.copy_outline_color_from(other)
70411                    }
70412
70413                    /// Get the computed value for outline-color.
70414                    #[allow(non_snake_case)]
70415                    #[inline]
70416                    pub fn clone_outline_color(&self) -> longhands::outline_color::computed_value::T {
70417                        self.outline_color.clone()
70418                    }
70419                        /// Set outline-style.
70420                        #[allow(non_snake_case)]
70421                        #[inline]
70422                        pub fn set_outline_style(&mut self, v: longhands::outline_style::computed_value::T) {
70423                            self.outline_style = v;
70424                        }
70425                        /// Set outline-style from other struct.
70426                        #[allow(non_snake_case)]
70427                        #[inline]
70428                        pub fn copy_outline_style_from(&mut self, other: &Self) {
70429                            self.outline_style = other.outline_style.clone();
70430                        }
70431                    /// Reset outline-style from the initial struct.
70432                    #[allow(non_snake_case)]
70433                    #[inline]
70434                    pub fn reset_outline_style(&mut self, other: &Self) {
70435                        self.copy_outline_style_from(other)
70436                    }
70437
70438                    /// Get the computed value for outline-style.
70439                    #[allow(non_snake_case)]
70440                    #[inline]
70441                    pub fn clone_outline_style(&self) -> longhands::outline_style::computed_value::T {
70442                        self.outline_style.clone()
70443                    }
70444                        /// Set outline-width.
70445                        #[allow(non_snake_case)]
70446                        #[inline]
70447                        pub fn set_outline_width(&mut self, v: longhands::outline_width::computed_value::T) {
70448                            self.outline_width = v;
70449                        }
70450                        /// Set outline-width from other struct.
70451                        #[allow(non_snake_case)]
70452                        #[inline]
70453                        pub fn copy_outline_width_from(&mut self, other: &Self) {
70454                            self.outline_width = other.outline_width.clone();
70455                        }
70456                    /// Reset outline-width from the initial struct.
70457                    #[allow(non_snake_case)]
70458                    #[inline]
70459                    pub fn reset_outline_width(&mut self, other: &Self) {
70460                        self.copy_outline_width_from(other)
70461                    }
70462
70463                    /// Get the computed value for outline-width.
70464                    #[allow(non_snake_case)]
70465                    #[inline]
70466                    pub fn clone_outline_width(&self) -> longhands::outline_width::computed_value::T {
70467                        self.outline_width.clone()
70468                    }
70469                        /// Set outline-offset.
70470                        #[allow(non_snake_case)]
70471                        #[inline]
70472                        pub fn set_outline_offset(&mut self, v: longhands::outline_offset::computed_value::T) {
70473                            self.outline_offset = v;
70474                        }
70475                        /// Set outline-offset from other struct.
70476                        #[allow(non_snake_case)]
70477                        #[inline]
70478                        pub fn copy_outline_offset_from(&mut self, other: &Self) {
70479                            self.outline_offset = other.outline_offset.clone();
70480                        }
70481                    /// Reset outline-offset from the initial struct.
70482                    #[allow(non_snake_case)]
70483                    #[inline]
70484                    pub fn reset_outline_offset(&mut self, other: &Self) {
70485                        self.copy_outline_offset_from(other)
70486                    }
70487
70488                    /// Get the computed value for outline-offset.
70489                    #[allow(non_snake_case)]
70490                    #[inline]
70491                    pub fn clone_outline_offset(&self) -> longhands::outline_offset::computed_value::T {
70492                        self.outline_offset.clone()
70493                    }
70494                /// Whether the outline-width property is non-zero.
70495                #[inline]
70496                pub fn outline_has_nonzero_width(&self) -> bool {
70497                    use crate::Zero;
70498                    !self.outline_width.is_zero()
70499                }
70500        }
70501
70502        #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
70503        /// The Padding style struct.
70504        pub struct Padding {
70505                    /// The padding-top computed value.
70506                    pub padding_top: longhands::padding_top::computed_value::T,
70507                    /// The padding-right computed value.
70508                    pub padding_right: longhands::padding_right::computed_value::T,
70509                    /// The padding-bottom computed value.
70510                    pub padding_bottom: longhands::padding_bottom::computed_value::T,
70511                    /// The padding-left computed value.
70512                    pub padding_left: longhands::padding_left::computed_value::T,
70513        }
70514
70515        impl Padding {
70516                        /// Set padding-top.
70517                        #[allow(non_snake_case)]
70518                        #[inline]
70519                        pub fn set_padding_top(&mut self, v: longhands::padding_top::computed_value::T) {
70520                            self.padding_top = v;
70521                        }
70522                        /// Set padding-top from other struct.
70523                        #[allow(non_snake_case)]
70524                        #[inline]
70525                        pub fn copy_padding_top_from(&mut self, other: &Self) {
70526                            self.padding_top = other.padding_top.clone();
70527                        }
70528                    /// Reset padding-top from the initial struct.
70529                    #[allow(non_snake_case)]
70530                    #[inline]
70531                    pub fn reset_padding_top(&mut self, other: &Self) {
70532                        self.copy_padding_top_from(other)
70533                    }
70534
70535                    /// Get the computed value for padding-top.
70536                    #[allow(non_snake_case)]
70537                    #[inline]
70538                    pub fn clone_padding_top(&self) -> longhands::padding_top::computed_value::T {
70539                        self.padding_top.clone()
70540                    }
70541                        /// Set padding-right.
70542                        #[allow(non_snake_case)]
70543                        #[inline]
70544                        pub fn set_padding_right(&mut self, v: longhands::padding_right::computed_value::T) {
70545                            self.padding_right = v;
70546                        }
70547                        /// Set padding-right from other struct.
70548                        #[allow(non_snake_case)]
70549                        #[inline]
70550                        pub fn copy_padding_right_from(&mut self, other: &Self) {
70551                            self.padding_right = other.padding_right.clone();
70552                        }
70553                    /// Reset padding-right from the initial struct.
70554                    #[allow(non_snake_case)]
70555                    #[inline]
70556                    pub fn reset_padding_right(&mut self, other: &Self) {
70557                        self.copy_padding_right_from(other)
70558                    }
70559
70560                    /// Get the computed value for padding-right.
70561                    #[allow(non_snake_case)]
70562                    #[inline]
70563                    pub fn clone_padding_right(&self) -> longhands::padding_right::computed_value::T {
70564                        self.padding_right.clone()
70565                    }
70566                        /// Set padding-bottom.
70567                        #[allow(non_snake_case)]
70568                        #[inline]
70569                        pub fn set_padding_bottom(&mut self, v: longhands::padding_bottom::computed_value::T) {
70570                            self.padding_bottom = v;
70571                        }
70572                        /// Set padding-bottom from other struct.
70573                        #[allow(non_snake_case)]
70574                        #[inline]
70575                        pub fn copy_padding_bottom_from(&mut self, other: &Self) {
70576                            self.padding_bottom = other.padding_bottom.clone();
70577                        }
70578                    /// Reset padding-bottom from the initial struct.
70579                    #[allow(non_snake_case)]
70580                    #[inline]
70581                    pub fn reset_padding_bottom(&mut self, other: &Self) {
70582                        self.copy_padding_bottom_from(other)
70583                    }
70584
70585                    /// Get the computed value for padding-bottom.
70586                    #[allow(non_snake_case)]
70587                    #[inline]
70588                    pub fn clone_padding_bottom(&self) -> longhands::padding_bottom::computed_value::T {
70589                        self.padding_bottom.clone()
70590                    }
70591                        /// Set padding-left.
70592                        #[allow(non_snake_case)]
70593                        #[inline]
70594                        pub fn set_padding_left(&mut self, v: longhands::padding_left::computed_value::T) {
70595                            self.padding_left = v;
70596                        }
70597                        /// Set padding-left from other struct.
70598                        #[allow(non_snake_case)]
70599                        #[inline]
70600                        pub fn copy_padding_left_from(&mut self, other: &Self) {
70601                            self.padding_left = other.padding_left.clone();
70602                        }
70603                    /// Reset padding-left from the initial struct.
70604                    #[allow(non_snake_case)]
70605                    #[inline]
70606                    pub fn reset_padding_left(&mut self, other: &Self) {
70607                        self.copy_padding_left_from(other)
70608                    }
70609
70610                    /// Get the computed value for padding-left.
70611                    #[allow(non_snake_case)]
70612                    #[inline]
70613                    pub fn clone_padding_left(&self) -> longhands::padding_left::computed_value::T {
70614                        self.padding_left.clone()
70615                    }
70616        }
70617
70618        #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
70619        /// The Position style struct.
70620        pub struct Position {
70621                    /// The top computed value.
70622                    pub top: longhands::top::computed_value::T,
70623                    /// The right computed value.
70624                    pub right: longhands::right::computed_value::T,
70625                    /// The bottom computed value.
70626                    pub bottom: longhands::bottom::computed_value::T,
70627                    /// The left computed value.
70628                    pub left: longhands::left::computed_value::T,
70629                    /// The z-index computed value.
70630                    pub z_index: longhands::z_index::computed_value::T,
70631                    /// The flex-direction computed value.
70632                    pub flex_direction: longhands::flex_direction::computed_value::T,
70633                    /// The flex-wrap computed value.
70634                    pub flex_wrap: longhands::flex_wrap::computed_value::T,
70635                    /// The justify-content computed value.
70636                    pub justify_content: longhands::justify_content::computed_value::T,
70637                    /// The align-content computed value.
70638                    pub align_content: longhands::align_content::computed_value::T,
70639                    /// The align-items computed value.
70640                    pub align_items: longhands::align_items::computed_value::T,
70641                    /// The justify-items computed value.
70642                    pub justify_items: longhands::justify_items::computed_value::T,
70643                    /// The flex-grow computed value.
70644                    pub flex_grow: longhands::flex_grow::computed_value::T,
70645                    /// The flex-shrink computed value.
70646                    pub flex_shrink: longhands::flex_shrink::computed_value::T,
70647                    /// The align-self computed value.
70648                    pub align_self: longhands::align_self::computed_value::T,
70649                    /// The justify-self computed value.
70650                    pub justify_self: longhands::justify_self::computed_value::T,
70651                    /// The order computed value.
70652                    pub order: longhands::order::computed_value::T,
70653                    /// The flex-basis computed value.
70654                    pub flex_basis: longhands::flex_basis::computed_value::T,
70655                    /// The height computed value.
70656                    pub height: longhands::height::computed_value::T,
70657                    /// The min-height computed value.
70658                    pub min_height: longhands::min_height::computed_value::T,
70659                    /// The max-height computed value.
70660                    pub max_height: longhands::max_height::computed_value::T,
70661                    /// The width computed value.
70662                    pub width: longhands::width::computed_value::T,
70663                    /// The min-width computed value.
70664                    pub min_width: longhands::min_width::computed_value::T,
70665                    /// The max-width computed value.
70666                    pub max_width: longhands::max_width::computed_value::T,
70667                    /// The box-sizing computed value.
70668                    pub box_sizing: longhands::box_sizing::computed_value::T,
70669                    /// The object-fit computed value.
70670                    pub object_fit: longhands::object_fit::computed_value::T,
70671                    /// The object-position computed value.
70672                    pub object_position: longhands::object_position::computed_value::T,
70673                    /// The grid-row-start computed value.
70674                    pub grid_row_start: longhands::grid_row_start::computed_value::T,
70675                    /// The grid-row-end computed value.
70676                    pub grid_row_end: longhands::grid_row_end::computed_value::T,
70677                    /// The grid-auto-rows computed value.
70678                    pub grid_auto_rows: longhands::grid_auto_rows::computed_value::T,
70679                    /// The grid-template-rows computed value.
70680                    pub grid_template_rows: longhands::grid_template_rows::computed_value::T,
70681                    /// The grid-column-start computed value.
70682                    pub grid_column_start: longhands::grid_column_start::computed_value::T,
70683                    /// The grid-column-end computed value.
70684                    pub grid_column_end: longhands::grid_column_end::computed_value::T,
70685                    /// The grid-auto-columns computed value.
70686                    pub grid_auto_columns: longhands::grid_auto_columns::computed_value::T,
70687                    /// The grid-template-columns computed value.
70688                    pub grid_template_columns: longhands::grid_template_columns::computed_value::T,
70689                    /// The grid-auto-flow computed value.
70690                    pub grid_auto_flow: longhands::grid_auto_flow::computed_value::T,
70691                    /// The grid-template-areas computed value.
70692                    pub grid_template_areas: longhands::grid_template_areas::computed_value::T,
70693                    /// The column-gap computed value.
70694                    pub column_gap: longhands::column_gap::computed_value::T,
70695                    /// The row-gap computed value.
70696                    pub row_gap: longhands::row_gap::computed_value::T,
70697                    /// The aspect-ratio computed value.
70698                    pub aspect_ratio: longhands::aspect_ratio::computed_value::T,
70699        }
70700
70701        impl Position {
70702                        /// Set top.
70703                        #[allow(non_snake_case)]
70704                        #[inline]
70705                        pub fn set_top(&mut self, v: longhands::top::computed_value::T) {
70706                            self.top = v;
70707                        }
70708                        /// Set top from other struct.
70709                        #[allow(non_snake_case)]
70710                        #[inline]
70711                        pub fn copy_top_from(&mut self, other: &Self) {
70712                            self.top = other.top.clone();
70713                        }
70714                    /// Reset top from the initial struct.
70715                    #[allow(non_snake_case)]
70716                    #[inline]
70717                    pub fn reset_top(&mut self, other: &Self) {
70718                        self.copy_top_from(other)
70719                    }
70720
70721                    /// Get the computed value for top.
70722                    #[allow(non_snake_case)]
70723                    #[inline]
70724                    pub fn clone_top(&self) -> longhands::top::computed_value::T {
70725                        self.top.clone()
70726                    }
70727                        /// Set right.
70728                        #[allow(non_snake_case)]
70729                        #[inline]
70730                        pub fn set_right(&mut self, v: longhands::right::computed_value::T) {
70731                            self.right = v;
70732                        }
70733                        /// Set right from other struct.
70734                        #[allow(non_snake_case)]
70735                        #[inline]
70736                        pub fn copy_right_from(&mut self, other: &Self) {
70737                            self.right = other.right.clone();
70738                        }
70739                    /// Reset right from the initial struct.
70740                    #[allow(non_snake_case)]
70741                    #[inline]
70742                    pub fn reset_right(&mut self, other: &Self) {
70743                        self.copy_right_from(other)
70744                    }
70745
70746                    /// Get the computed value for right.
70747                    #[allow(non_snake_case)]
70748                    #[inline]
70749                    pub fn clone_right(&self) -> longhands::right::computed_value::T {
70750                        self.right.clone()
70751                    }
70752                        /// Set bottom.
70753                        #[allow(non_snake_case)]
70754                        #[inline]
70755                        pub fn set_bottom(&mut self, v: longhands::bottom::computed_value::T) {
70756                            self.bottom = v;
70757                        }
70758                        /// Set bottom from other struct.
70759                        #[allow(non_snake_case)]
70760                        #[inline]
70761                        pub fn copy_bottom_from(&mut self, other: &Self) {
70762                            self.bottom = other.bottom.clone();
70763                        }
70764                    /// Reset bottom from the initial struct.
70765                    #[allow(non_snake_case)]
70766                    #[inline]
70767                    pub fn reset_bottom(&mut self, other: &Self) {
70768                        self.copy_bottom_from(other)
70769                    }
70770
70771                    /// Get the computed value for bottom.
70772                    #[allow(non_snake_case)]
70773                    #[inline]
70774                    pub fn clone_bottom(&self) -> longhands::bottom::computed_value::T {
70775                        self.bottom.clone()
70776                    }
70777                        /// Set left.
70778                        #[allow(non_snake_case)]
70779                        #[inline]
70780                        pub fn set_left(&mut self, v: longhands::left::computed_value::T) {
70781                            self.left = v;
70782                        }
70783                        /// Set left from other struct.
70784                        #[allow(non_snake_case)]
70785                        #[inline]
70786                        pub fn copy_left_from(&mut self, other: &Self) {
70787                            self.left = other.left.clone();
70788                        }
70789                    /// Reset left from the initial struct.
70790                    #[allow(non_snake_case)]
70791                    #[inline]
70792                    pub fn reset_left(&mut self, other: &Self) {
70793                        self.copy_left_from(other)
70794                    }
70795
70796                    /// Get the computed value for left.
70797                    #[allow(non_snake_case)]
70798                    #[inline]
70799                    pub fn clone_left(&self) -> longhands::left::computed_value::T {
70800                        self.left.clone()
70801                    }
70802                        /// Set z-index.
70803                        #[allow(non_snake_case)]
70804                        #[inline]
70805                        pub fn set_z_index(&mut self, v: longhands::z_index::computed_value::T) {
70806                            self.z_index = v;
70807                        }
70808                        /// Set z-index from other struct.
70809                        #[allow(non_snake_case)]
70810                        #[inline]
70811                        pub fn copy_z_index_from(&mut self, other: &Self) {
70812                            self.z_index = other.z_index.clone();
70813                        }
70814                    /// Reset z-index from the initial struct.
70815                    #[allow(non_snake_case)]
70816                    #[inline]
70817                    pub fn reset_z_index(&mut self, other: &Self) {
70818                        self.copy_z_index_from(other)
70819                    }
70820
70821                    /// Get the computed value for z-index.
70822                    #[allow(non_snake_case)]
70823                    #[inline]
70824                    pub fn clone_z_index(&self) -> longhands::z_index::computed_value::T {
70825                        self.z_index.clone()
70826                    }
70827                        /// Set flex-direction.
70828                        #[allow(non_snake_case)]
70829                        #[inline]
70830                        pub fn set_flex_direction(&mut self, v: longhands::flex_direction::computed_value::T) {
70831                            self.flex_direction = v;
70832                        }
70833                        /// Set flex-direction from other struct.
70834                        #[allow(non_snake_case)]
70835                        #[inline]
70836                        pub fn copy_flex_direction_from(&mut self, other: &Self) {
70837                            self.flex_direction = other.flex_direction.clone();
70838                        }
70839                    /// Reset flex-direction from the initial struct.
70840                    #[allow(non_snake_case)]
70841                    #[inline]
70842                    pub fn reset_flex_direction(&mut self, other: &Self) {
70843                        self.copy_flex_direction_from(other)
70844                    }
70845
70846                    /// Get the computed value for flex-direction.
70847                    #[allow(non_snake_case)]
70848                    #[inline]
70849                    pub fn clone_flex_direction(&self) -> longhands::flex_direction::computed_value::T {
70850                        self.flex_direction.clone()
70851                    }
70852                        /// Set flex-wrap.
70853                        #[allow(non_snake_case)]
70854                        #[inline]
70855                        pub fn set_flex_wrap(&mut self, v: longhands::flex_wrap::computed_value::T) {
70856                            self.flex_wrap = v;
70857                        }
70858                        /// Set flex-wrap from other struct.
70859                        #[allow(non_snake_case)]
70860                        #[inline]
70861                        pub fn copy_flex_wrap_from(&mut self, other: &Self) {
70862                            self.flex_wrap = other.flex_wrap.clone();
70863                        }
70864                    /// Reset flex-wrap from the initial struct.
70865                    #[allow(non_snake_case)]
70866                    #[inline]
70867                    pub fn reset_flex_wrap(&mut self, other: &Self) {
70868                        self.copy_flex_wrap_from(other)
70869                    }
70870
70871                    /// Get the computed value for flex-wrap.
70872                    #[allow(non_snake_case)]
70873                    #[inline]
70874                    pub fn clone_flex_wrap(&self) -> longhands::flex_wrap::computed_value::T {
70875                        self.flex_wrap.clone()
70876                    }
70877                        /// Set justify-content.
70878                        #[allow(non_snake_case)]
70879                        #[inline]
70880                        pub fn set_justify_content(&mut self, v: longhands::justify_content::computed_value::T) {
70881                            self.justify_content = v;
70882                        }
70883                        /// Set justify-content from other struct.
70884                        #[allow(non_snake_case)]
70885                        #[inline]
70886                        pub fn copy_justify_content_from(&mut self, other: &Self) {
70887                            self.justify_content = other.justify_content.clone();
70888                        }
70889                    /// Reset justify-content from the initial struct.
70890                    #[allow(non_snake_case)]
70891                    #[inline]
70892                    pub fn reset_justify_content(&mut self, other: &Self) {
70893                        self.copy_justify_content_from(other)
70894                    }
70895
70896                    /// Get the computed value for justify-content.
70897                    #[allow(non_snake_case)]
70898                    #[inline]
70899                    pub fn clone_justify_content(&self) -> longhands::justify_content::computed_value::T {
70900                        self.justify_content.clone()
70901                    }
70902                        /// Set align-content.
70903                        #[allow(non_snake_case)]
70904                        #[inline]
70905                        pub fn set_align_content(&mut self, v: longhands::align_content::computed_value::T) {
70906                            self.align_content = v;
70907                        }
70908                        /// Set align-content from other struct.
70909                        #[allow(non_snake_case)]
70910                        #[inline]
70911                        pub fn copy_align_content_from(&mut self, other: &Self) {
70912                            self.align_content = other.align_content.clone();
70913                        }
70914                    /// Reset align-content from the initial struct.
70915                    #[allow(non_snake_case)]
70916                    #[inline]
70917                    pub fn reset_align_content(&mut self, other: &Self) {
70918                        self.copy_align_content_from(other)
70919                    }
70920
70921                    /// Get the computed value for align-content.
70922                    #[allow(non_snake_case)]
70923                    #[inline]
70924                    pub fn clone_align_content(&self) -> longhands::align_content::computed_value::T {
70925                        self.align_content.clone()
70926                    }
70927                        /// Set align-items.
70928                        #[allow(non_snake_case)]
70929                        #[inline]
70930                        pub fn set_align_items(&mut self, v: longhands::align_items::computed_value::T) {
70931                            self.align_items = v;
70932                        }
70933                        /// Set align-items from other struct.
70934                        #[allow(non_snake_case)]
70935                        #[inline]
70936                        pub fn copy_align_items_from(&mut self, other: &Self) {
70937                            self.align_items = other.align_items.clone();
70938                        }
70939                    /// Reset align-items from the initial struct.
70940                    #[allow(non_snake_case)]
70941                    #[inline]
70942                    pub fn reset_align_items(&mut self, other: &Self) {
70943                        self.copy_align_items_from(other)
70944                    }
70945
70946                    /// Get the computed value for align-items.
70947                    #[allow(non_snake_case)]
70948                    #[inline]
70949                    pub fn clone_align_items(&self) -> longhands::align_items::computed_value::T {
70950                        self.align_items.clone()
70951                    }
70952                        /// Set justify-items.
70953                        #[allow(non_snake_case)]
70954                        #[inline]
70955                        pub fn set_justify_items(&mut self, v: longhands::justify_items::computed_value::T) {
70956                            self.justify_items = v;
70957                        }
70958                        /// Set justify-items from other struct.
70959                        #[allow(non_snake_case)]
70960                        #[inline]
70961                        pub fn copy_justify_items_from(&mut self, other: &Self) {
70962                            self.justify_items = other.justify_items.clone();
70963                        }
70964                    /// Reset justify-items from the initial struct.
70965                    #[allow(non_snake_case)]
70966                    #[inline]
70967                    pub fn reset_justify_items(&mut self, other: &Self) {
70968                        self.copy_justify_items_from(other)
70969                    }
70970
70971                    /// Get the computed value for justify-items.
70972                    #[allow(non_snake_case)]
70973                    #[inline]
70974                    pub fn clone_justify_items(&self) -> longhands::justify_items::computed_value::T {
70975                        self.justify_items.clone()
70976                    }
70977                        /// Set flex-grow.
70978                        #[allow(non_snake_case)]
70979                        #[inline]
70980                        pub fn set_flex_grow(&mut self, v: longhands::flex_grow::computed_value::T) {
70981                            self.flex_grow = v;
70982                        }
70983                        /// Set flex-grow from other struct.
70984                        #[allow(non_snake_case)]
70985                        #[inline]
70986                        pub fn copy_flex_grow_from(&mut self, other: &Self) {
70987                            self.flex_grow = other.flex_grow.clone();
70988                        }
70989                    /// Reset flex-grow from the initial struct.
70990                    #[allow(non_snake_case)]
70991                    #[inline]
70992                    pub fn reset_flex_grow(&mut self, other: &Self) {
70993                        self.copy_flex_grow_from(other)
70994                    }
70995
70996                    /// Get the computed value for flex-grow.
70997                    #[allow(non_snake_case)]
70998                    #[inline]
70999                    pub fn clone_flex_grow(&self) -> longhands::flex_grow::computed_value::T {
71000                        self.flex_grow.clone()
71001                    }
71002                        /// Set flex-shrink.
71003                        #[allow(non_snake_case)]
71004                        #[inline]
71005                        pub fn set_flex_shrink(&mut self, v: longhands::flex_shrink::computed_value::T) {
71006                            self.flex_shrink = v;
71007                        }
71008                        /// Set flex-shrink from other struct.
71009                        #[allow(non_snake_case)]
71010                        #[inline]
71011                        pub fn copy_flex_shrink_from(&mut self, other: &Self) {
71012                            self.flex_shrink = other.flex_shrink.clone();
71013                        }
71014                    /// Reset flex-shrink from the initial struct.
71015                    #[allow(non_snake_case)]
71016                    #[inline]
71017                    pub fn reset_flex_shrink(&mut self, other: &Self) {
71018                        self.copy_flex_shrink_from(other)
71019                    }
71020
71021                    /// Get the computed value for flex-shrink.
71022                    #[allow(non_snake_case)]
71023                    #[inline]
71024                    pub fn clone_flex_shrink(&self) -> longhands::flex_shrink::computed_value::T {
71025                        self.flex_shrink.clone()
71026                    }
71027                        /// Set align-self.
71028                        #[allow(non_snake_case)]
71029                        #[inline]
71030                        pub fn set_align_self(&mut self, v: longhands::align_self::computed_value::T) {
71031                            self.align_self = v;
71032                        }
71033                        /// Set align-self from other struct.
71034                        #[allow(non_snake_case)]
71035                        #[inline]
71036                        pub fn copy_align_self_from(&mut self, other: &Self) {
71037                            self.align_self = other.align_self.clone();
71038                        }
71039                    /// Reset align-self from the initial struct.
71040                    #[allow(non_snake_case)]
71041                    #[inline]
71042                    pub fn reset_align_self(&mut self, other: &Self) {
71043                        self.copy_align_self_from(other)
71044                    }
71045
71046                    /// Get the computed value for align-self.
71047                    #[allow(non_snake_case)]
71048                    #[inline]
71049                    pub fn clone_align_self(&self) -> longhands::align_self::computed_value::T {
71050                        self.align_self.clone()
71051                    }
71052                        /// Set justify-self.
71053                        #[allow(non_snake_case)]
71054                        #[inline]
71055                        pub fn set_justify_self(&mut self, v: longhands::justify_self::computed_value::T) {
71056                            self.justify_self = v;
71057                        }
71058                        /// Set justify-self from other struct.
71059                        #[allow(non_snake_case)]
71060                        #[inline]
71061                        pub fn copy_justify_self_from(&mut self, other: &Self) {
71062                            self.justify_self = other.justify_self.clone();
71063                        }
71064                    /// Reset justify-self from the initial struct.
71065                    #[allow(non_snake_case)]
71066                    #[inline]
71067                    pub fn reset_justify_self(&mut self, other: &Self) {
71068                        self.copy_justify_self_from(other)
71069                    }
71070
71071                    /// Get the computed value for justify-self.
71072                    #[allow(non_snake_case)]
71073                    #[inline]
71074                    pub fn clone_justify_self(&self) -> longhands::justify_self::computed_value::T {
71075                        self.justify_self.clone()
71076                    }
71077                        /// Set order.
71078                        #[allow(non_snake_case)]
71079                        #[inline]
71080                        pub fn set_order(&mut self, v: longhands::order::computed_value::T) {
71081                            self.order = v;
71082                        }
71083                        /// Set order from other struct.
71084                        #[allow(non_snake_case)]
71085                        #[inline]
71086                        pub fn copy_order_from(&mut self, other: &Self) {
71087                            self.order = other.order.clone();
71088                        }
71089                    /// Reset order from the initial struct.
71090                    #[allow(non_snake_case)]
71091                    #[inline]
71092                    pub fn reset_order(&mut self, other: &Self) {
71093                        self.copy_order_from(other)
71094                    }
71095
71096                    /// Get the computed value for order.
71097                    #[allow(non_snake_case)]
71098                    #[inline]
71099                    pub fn clone_order(&self) -> longhands::order::computed_value::T {
71100                        self.order.clone()
71101                    }
71102                        /// Set flex-basis.
71103                        #[allow(non_snake_case)]
71104                        #[inline]
71105                        pub fn set_flex_basis(&mut self, v: longhands::flex_basis::computed_value::T) {
71106                            self.flex_basis = v;
71107                        }
71108                        /// Set flex-basis from other struct.
71109                        #[allow(non_snake_case)]
71110                        #[inline]
71111                        pub fn copy_flex_basis_from(&mut self, other: &Self) {
71112                            self.flex_basis = other.flex_basis.clone();
71113                        }
71114                    /// Reset flex-basis from the initial struct.
71115                    #[allow(non_snake_case)]
71116                    #[inline]
71117                    pub fn reset_flex_basis(&mut self, other: &Self) {
71118                        self.copy_flex_basis_from(other)
71119                    }
71120
71121                    /// Get the computed value for flex-basis.
71122                    #[allow(non_snake_case)]
71123                    #[inline]
71124                    pub fn clone_flex_basis(&self) -> longhands::flex_basis::computed_value::T {
71125                        self.flex_basis.clone()
71126                    }
71127                        /// Set height.
71128                        #[allow(non_snake_case)]
71129                        #[inline]
71130                        pub fn set_height(&mut self, v: longhands::height::computed_value::T) {
71131                            self.height = v;
71132                        }
71133                        /// Set height from other struct.
71134                        #[allow(non_snake_case)]
71135                        #[inline]
71136                        pub fn copy_height_from(&mut self, other: &Self) {
71137                            self.height = other.height.clone();
71138                        }
71139                    /// Reset height from the initial struct.
71140                    #[allow(non_snake_case)]
71141                    #[inline]
71142                    pub fn reset_height(&mut self, other: &Self) {
71143                        self.copy_height_from(other)
71144                    }
71145
71146                    /// Get the computed value for height.
71147                    #[allow(non_snake_case)]
71148                    #[inline]
71149                    pub fn clone_height(&self) -> longhands::height::computed_value::T {
71150                        self.height.clone()
71151                    }
71152                        /// Set min-height.
71153                        #[allow(non_snake_case)]
71154                        #[inline]
71155                        pub fn set_min_height(&mut self, v: longhands::min_height::computed_value::T) {
71156                            self.min_height = v;
71157                        }
71158                        /// Set min-height from other struct.
71159                        #[allow(non_snake_case)]
71160                        #[inline]
71161                        pub fn copy_min_height_from(&mut self, other: &Self) {
71162                            self.min_height = other.min_height.clone();
71163                        }
71164                    /// Reset min-height from the initial struct.
71165                    #[allow(non_snake_case)]
71166                    #[inline]
71167                    pub fn reset_min_height(&mut self, other: &Self) {
71168                        self.copy_min_height_from(other)
71169                    }
71170
71171                    /// Get the computed value for min-height.
71172                    #[allow(non_snake_case)]
71173                    #[inline]
71174                    pub fn clone_min_height(&self) -> longhands::min_height::computed_value::T {
71175                        self.min_height.clone()
71176                    }
71177                        /// Set max-height.
71178                        #[allow(non_snake_case)]
71179                        #[inline]
71180                        pub fn set_max_height(&mut self, v: longhands::max_height::computed_value::T) {
71181                            self.max_height = v;
71182                        }
71183                        /// Set max-height from other struct.
71184                        #[allow(non_snake_case)]
71185                        #[inline]
71186                        pub fn copy_max_height_from(&mut self, other: &Self) {
71187                            self.max_height = other.max_height.clone();
71188                        }
71189                    /// Reset max-height from the initial struct.
71190                    #[allow(non_snake_case)]
71191                    #[inline]
71192                    pub fn reset_max_height(&mut self, other: &Self) {
71193                        self.copy_max_height_from(other)
71194                    }
71195
71196                    /// Get the computed value for max-height.
71197                    #[allow(non_snake_case)]
71198                    #[inline]
71199                    pub fn clone_max_height(&self) -> longhands::max_height::computed_value::T {
71200                        self.max_height.clone()
71201                    }
71202                        /// Set width.
71203                        #[allow(non_snake_case)]
71204                        #[inline]
71205                        pub fn set_width(&mut self, v: longhands::width::computed_value::T) {
71206                            self.width = v;
71207                        }
71208                        /// Set width from other struct.
71209                        #[allow(non_snake_case)]
71210                        #[inline]
71211                        pub fn copy_width_from(&mut self, other: &Self) {
71212                            self.width = other.width.clone();
71213                        }
71214                    /// Reset width from the initial struct.
71215                    #[allow(non_snake_case)]
71216                    #[inline]
71217                    pub fn reset_width(&mut self, other: &Self) {
71218                        self.copy_width_from(other)
71219                    }
71220
71221                    /// Get the computed value for width.
71222                    #[allow(non_snake_case)]
71223                    #[inline]
71224                    pub fn clone_width(&self) -> longhands::width::computed_value::T {
71225                        self.width.clone()
71226                    }
71227                        /// Set min-width.
71228                        #[allow(non_snake_case)]
71229                        #[inline]
71230                        pub fn set_min_width(&mut self, v: longhands::min_width::computed_value::T) {
71231                            self.min_width = v;
71232                        }
71233                        /// Set min-width from other struct.
71234                        #[allow(non_snake_case)]
71235                        #[inline]
71236                        pub fn copy_min_width_from(&mut self, other: &Self) {
71237                            self.min_width = other.min_width.clone();
71238                        }
71239                    /// Reset min-width from the initial struct.
71240                    #[allow(non_snake_case)]
71241                    #[inline]
71242                    pub fn reset_min_width(&mut self, other: &Self) {
71243                        self.copy_min_width_from(other)
71244                    }
71245
71246                    /// Get the computed value for min-width.
71247                    #[allow(non_snake_case)]
71248                    #[inline]
71249                    pub fn clone_min_width(&self) -> longhands::min_width::computed_value::T {
71250                        self.min_width.clone()
71251                    }
71252                        /// Set max-width.
71253                        #[allow(non_snake_case)]
71254                        #[inline]
71255                        pub fn set_max_width(&mut self, v: longhands::max_width::computed_value::T) {
71256                            self.max_width = v;
71257                        }
71258                        /// Set max-width from other struct.
71259                        #[allow(non_snake_case)]
71260                        #[inline]
71261                        pub fn copy_max_width_from(&mut self, other: &Self) {
71262                            self.max_width = other.max_width.clone();
71263                        }
71264                    /// Reset max-width from the initial struct.
71265                    #[allow(non_snake_case)]
71266                    #[inline]
71267                    pub fn reset_max_width(&mut self, other: &Self) {
71268                        self.copy_max_width_from(other)
71269                    }
71270
71271                    /// Get the computed value for max-width.
71272                    #[allow(non_snake_case)]
71273                    #[inline]
71274                    pub fn clone_max_width(&self) -> longhands::max_width::computed_value::T {
71275                        self.max_width.clone()
71276                    }
71277                        /// Set box-sizing.
71278                        #[allow(non_snake_case)]
71279                        #[inline]
71280                        pub fn set_box_sizing(&mut self, v: longhands::box_sizing::computed_value::T) {
71281                            self.box_sizing = v;
71282                        }
71283                        /// Set box-sizing from other struct.
71284                        #[allow(non_snake_case)]
71285                        #[inline]
71286                        pub fn copy_box_sizing_from(&mut self, other: &Self) {
71287                            self.box_sizing = other.box_sizing.clone();
71288                        }
71289                    /// Reset box-sizing from the initial struct.
71290                    #[allow(non_snake_case)]
71291                    #[inline]
71292                    pub fn reset_box_sizing(&mut self, other: &Self) {
71293                        self.copy_box_sizing_from(other)
71294                    }
71295
71296                    /// Get the computed value for box-sizing.
71297                    #[allow(non_snake_case)]
71298                    #[inline]
71299                    pub fn clone_box_sizing(&self) -> longhands::box_sizing::computed_value::T {
71300                        self.box_sizing.clone()
71301                    }
71302                        /// Set object-fit.
71303                        #[allow(non_snake_case)]
71304                        #[inline]
71305                        pub fn set_object_fit(&mut self, v: longhands::object_fit::computed_value::T) {
71306                            self.object_fit = v;
71307                        }
71308                        /// Set object-fit from other struct.
71309                        #[allow(non_snake_case)]
71310                        #[inline]
71311                        pub fn copy_object_fit_from(&mut self, other: &Self) {
71312                            self.object_fit = other.object_fit.clone();
71313                        }
71314                    /// Reset object-fit from the initial struct.
71315                    #[allow(non_snake_case)]
71316                    #[inline]
71317                    pub fn reset_object_fit(&mut self, other: &Self) {
71318                        self.copy_object_fit_from(other)
71319                    }
71320
71321                    /// Get the computed value for object-fit.
71322                    #[allow(non_snake_case)]
71323                    #[inline]
71324                    pub fn clone_object_fit(&self) -> longhands::object_fit::computed_value::T {
71325                        self.object_fit.clone()
71326                    }
71327                        /// Set object-position.
71328                        #[allow(non_snake_case)]
71329                        #[inline]
71330                        pub fn set_object_position(&mut self, v: longhands::object_position::computed_value::T) {
71331                            self.object_position = v;
71332                        }
71333                        /// Set object-position from other struct.
71334                        #[allow(non_snake_case)]
71335                        #[inline]
71336                        pub fn copy_object_position_from(&mut self, other: &Self) {
71337                            self.object_position = other.object_position.clone();
71338                        }
71339                    /// Reset object-position from the initial struct.
71340                    #[allow(non_snake_case)]
71341                    #[inline]
71342                    pub fn reset_object_position(&mut self, other: &Self) {
71343                        self.copy_object_position_from(other)
71344                    }
71345
71346                    /// Get the computed value for object-position.
71347                    #[allow(non_snake_case)]
71348                    #[inline]
71349                    pub fn clone_object_position(&self) -> longhands::object_position::computed_value::T {
71350                        self.object_position.clone()
71351                    }
71352                        /// Set grid-row-start.
71353                        #[allow(non_snake_case)]
71354                        #[inline]
71355                        pub fn set_grid_row_start(&mut self, v: longhands::grid_row_start::computed_value::T) {
71356                            self.grid_row_start = v;
71357                        }
71358                        /// Set grid-row-start from other struct.
71359                        #[allow(non_snake_case)]
71360                        #[inline]
71361                        pub fn copy_grid_row_start_from(&mut self, other: &Self) {
71362                            self.grid_row_start = other.grid_row_start.clone();
71363                        }
71364                    /// Reset grid-row-start from the initial struct.
71365                    #[allow(non_snake_case)]
71366                    #[inline]
71367                    pub fn reset_grid_row_start(&mut self, other: &Self) {
71368                        self.copy_grid_row_start_from(other)
71369                    }
71370
71371                    /// Get the computed value for grid-row-start.
71372                    #[allow(non_snake_case)]
71373                    #[inline]
71374                    pub fn clone_grid_row_start(&self) -> longhands::grid_row_start::computed_value::T {
71375                        self.grid_row_start.clone()
71376                    }
71377                        /// Set grid-row-end.
71378                        #[allow(non_snake_case)]
71379                        #[inline]
71380                        pub fn set_grid_row_end(&mut self, v: longhands::grid_row_end::computed_value::T) {
71381                            self.grid_row_end = v;
71382                        }
71383                        /// Set grid-row-end from other struct.
71384                        #[allow(non_snake_case)]
71385                        #[inline]
71386                        pub fn copy_grid_row_end_from(&mut self, other: &Self) {
71387                            self.grid_row_end = other.grid_row_end.clone();
71388                        }
71389                    /// Reset grid-row-end from the initial struct.
71390                    #[allow(non_snake_case)]
71391                    #[inline]
71392                    pub fn reset_grid_row_end(&mut self, other: &Self) {
71393                        self.copy_grid_row_end_from(other)
71394                    }
71395
71396                    /// Get the computed value for grid-row-end.
71397                    #[allow(non_snake_case)]
71398                    #[inline]
71399                    pub fn clone_grid_row_end(&self) -> longhands::grid_row_end::computed_value::T {
71400                        self.grid_row_end.clone()
71401                    }
71402                        /// Set grid-auto-rows.
71403                        #[allow(non_snake_case)]
71404                        #[inline]
71405                        pub fn set_grid_auto_rows(&mut self, v: longhands::grid_auto_rows::computed_value::T) {
71406                            self.grid_auto_rows = v;
71407                        }
71408                        /// Set grid-auto-rows from other struct.
71409                        #[allow(non_snake_case)]
71410                        #[inline]
71411                        pub fn copy_grid_auto_rows_from(&mut self, other: &Self) {
71412                            self.grid_auto_rows = other.grid_auto_rows.clone();
71413                        }
71414                    /// Reset grid-auto-rows from the initial struct.
71415                    #[allow(non_snake_case)]
71416                    #[inline]
71417                    pub fn reset_grid_auto_rows(&mut self, other: &Self) {
71418                        self.copy_grid_auto_rows_from(other)
71419                    }
71420
71421                    /// Get the computed value for grid-auto-rows.
71422                    #[allow(non_snake_case)]
71423                    #[inline]
71424                    pub fn clone_grid_auto_rows(&self) -> longhands::grid_auto_rows::computed_value::T {
71425                        self.grid_auto_rows.clone()
71426                    }
71427                        /// Set grid-template-rows.
71428                        #[allow(non_snake_case)]
71429                        #[inline]
71430                        pub fn set_grid_template_rows(&mut self, v: longhands::grid_template_rows::computed_value::T) {
71431                            self.grid_template_rows = v;
71432                        }
71433                        /// Set grid-template-rows from other struct.
71434                        #[allow(non_snake_case)]
71435                        #[inline]
71436                        pub fn copy_grid_template_rows_from(&mut self, other: &Self) {
71437                            self.grid_template_rows = other.grid_template_rows.clone();
71438                        }
71439                    /// Reset grid-template-rows from the initial struct.
71440                    #[allow(non_snake_case)]
71441                    #[inline]
71442                    pub fn reset_grid_template_rows(&mut self, other: &Self) {
71443                        self.copy_grid_template_rows_from(other)
71444                    }
71445
71446                    /// Get the computed value for grid-template-rows.
71447                    #[allow(non_snake_case)]
71448                    #[inline]
71449                    pub fn clone_grid_template_rows(&self) -> longhands::grid_template_rows::computed_value::T {
71450                        self.grid_template_rows.clone()
71451                    }
71452                        /// Set grid-column-start.
71453                        #[allow(non_snake_case)]
71454                        #[inline]
71455                        pub fn set_grid_column_start(&mut self, v: longhands::grid_column_start::computed_value::T) {
71456                            self.grid_column_start = v;
71457                        }
71458                        /// Set grid-column-start from other struct.
71459                        #[allow(non_snake_case)]
71460                        #[inline]
71461                        pub fn copy_grid_column_start_from(&mut self, other: &Self) {
71462                            self.grid_column_start = other.grid_column_start.clone();
71463                        }
71464                    /// Reset grid-column-start from the initial struct.
71465                    #[allow(non_snake_case)]
71466                    #[inline]
71467                    pub fn reset_grid_column_start(&mut self, other: &Self) {
71468                        self.copy_grid_column_start_from(other)
71469                    }
71470
71471                    /// Get the computed value for grid-column-start.
71472                    #[allow(non_snake_case)]
71473                    #[inline]
71474                    pub fn clone_grid_column_start(&self) -> longhands::grid_column_start::computed_value::T {
71475                        self.grid_column_start.clone()
71476                    }
71477                        /// Set grid-column-end.
71478                        #[allow(non_snake_case)]
71479                        #[inline]
71480                        pub fn set_grid_column_end(&mut self, v: longhands::grid_column_end::computed_value::T) {
71481                            self.grid_column_end = v;
71482                        }
71483                        /// Set grid-column-end from other struct.
71484                        #[allow(non_snake_case)]
71485                        #[inline]
71486                        pub fn copy_grid_column_end_from(&mut self, other: &Self) {
71487                            self.grid_column_end = other.grid_column_end.clone();
71488                        }
71489                    /// Reset grid-column-end from the initial struct.
71490                    #[allow(non_snake_case)]
71491                    #[inline]
71492                    pub fn reset_grid_column_end(&mut self, other: &Self) {
71493                        self.copy_grid_column_end_from(other)
71494                    }
71495
71496                    /// Get the computed value for grid-column-end.
71497                    #[allow(non_snake_case)]
71498                    #[inline]
71499                    pub fn clone_grid_column_end(&self) -> longhands::grid_column_end::computed_value::T {
71500                        self.grid_column_end.clone()
71501                    }
71502                        /// Set grid-auto-columns.
71503                        #[allow(non_snake_case)]
71504                        #[inline]
71505                        pub fn set_grid_auto_columns(&mut self, v: longhands::grid_auto_columns::computed_value::T) {
71506                            self.grid_auto_columns = v;
71507                        }
71508                        /// Set grid-auto-columns from other struct.
71509                        #[allow(non_snake_case)]
71510                        #[inline]
71511                        pub fn copy_grid_auto_columns_from(&mut self, other: &Self) {
71512                            self.grid_auto_columns = other.grid_auto_columns.clone();
71513                        }
71514                    /// Reset grid-auto-columns from the initial struct.
71515                    #[allow(non_snake_case)]
71516                    #[inline]
71517                    pub fn reset_grid_auto_columns(&mut self, other: &Self) {
71518                        self.copy_grid_auto_columns_from(other)
71519                    }
71520
71521                    /// Get the computed value for grid-auto-columns.
71522                    #[allow(non_snake_case)]
71523                    #[inline]
71524                    pub fn clone_grid_auto_columns(&self) -> longhands::grid_auto_columns::computed_value::T {
71525                        self.grid_auto_columns.clone()
71526                    }
71527                        /// Set grid-template-columns.
71528                        #[allow(non_snake_case)]
71529                        #[inline]
71530                        pub fn set_grid_template_columns(&mut self, v: longhands::grid_template_columns::computed_value::T) {
71531                            self.grid_template_columns = v;
71532                        }
71533                        /// Set grid-template-columns from other struct.
71534                        #[allow(non_snake_case)]
71535                        #[inline]
71536                        pub fn copy_grid_template_columns_from(&mut self, other: &Self) {
71537                            self.grid_template_columns = other.grid_template_columns.clone();
71538                        }
71539                    /// Reset grid-template-columns from the initial struct.
71540                    #[allow(non_snake_case)]
71541                    #[inline]
71542                    pub fn reset_grid_template_columns(&mut self, other: &Self) {
71543                        self.copy_grid_template_columns_from(other)
71544                    }
71545
71546                    /// Get the computed value for grid-template-columns.
71547                    #[allow(non_snake_case)]
71548                    #[inline]
71549                    pub fn clone_grid_template_columns(&self) -> longhands::grid_template_columns::computed_value::T {
71550                        self.grid_template_columns.clone()
71551                    }
71552                        /// Set grid-auto-flow.
71553                        #[allow(non_snake_case)]
71554                        #[inline]
71555                        pub fn set_grid_auto_flow(&mut self, v: longhands::grid_auto_flow::computed_value::T) {
71556                            self.grid_auto_flow = v;
71557                        }
71558                        /// Set grid-auto-flow from other struct.
71559                        #[allow(non_snake_case)]
71560                        #[inline]
71561                        pub fn copy_grid_auto_flow_from(&mut self, other: &Self) {
71562                            self.grid_auto_flow = other.grid_auto_flow.clone();
71563                        }
71564                    /// Reset grid-auto-flow from the initial struct.
71565                    #[allow(non_snake_case)]
71566                    #[inline]
71567                    pub fn reset_grid_auto_flow(&mut self, other: &Self) {
71568                        self.copy_grid_auto_flow_from(other)
71569                    }
71570
71571                    /// Get the computed value for grid-auto-flow.
71572                    #[allow(non_snake_case)]
71573                    #[inline]
71574                    pub fn clone_grid_auto_flow(&self) -> longhands::grid_auto_flow::computed_value::T {
71575                        self.grid_auto_flow.clone()
71576                    }
71577                        /// Set grid-template-areas.
71578                        #[allow(non_snake_case)]
71579                        #[inline]
71580                        pub fn set_grid_template_areas(&mut self, v: longhands::grid_template_areas::computed_value::T) {
71581                            self.grid_template_areas = v;
71582                        }
71583                        /// Set grid-template-areas from other struct.
71584                        #[allow(non_snake_case)]
71585                        #[inline]
71586                        pub fn copy_grid_template_areas_from(&mut self, other: &Self) {
71587                            self.grid_template_areas = other.grid_template_areas.clone();
71588                        }
71589                    /// Reset grid-template-areas from the initial struct.
71590                    #[allow(non_snake_case)]
71591                    #[inline]
71592                    pub fn reset_grid_template_areas(&mut self, other: &Self) {
71593                        self.copy_grid_template_areas_from(other)
71594                    }
71595
71596                    /// Get the computed value for grid-template-areas.
71597                    #[allow(non_snake_case)]
71598                    #[inline]
71599                    pub fn clone_grid_template_areas(&self) -> longhands::grid_template_areas::computed_value::T {
71600                        self.grid_template_areas.clone()
71601                    }
71602                        /// Set column-gap.
71603                        #[allow(non_snake_case)]
71604                        #[inline]
71605                        pub fn set_column_gap(&mut self, v: longhands::column_gap::computed_value::T) {
71606                            self.column_gap = v;
71607                        }
71608                        /// Set column-gap from other struct.
71609                        #[allow(non_snake_case)]
71610                        #[inline]
71611                        pub fn copy_column_gap_from(&mut self, other: &Self) {
71612                            self.column_gap = other.column_gap.clone();
71613                        }
71614                    /// Reset column-gap from the initial struct.
71615                    #[allow(non_snake_case)]
71616                    #[inline]
71617                    pub fn reset_column_gap(&mut self, other: &Self) {
71618                        self.copy_column_gap_from(other)
71619                    }
71620
71621                    /// Get the computed value for column-gap.
71622                    #[allow(non_snake_case)]
71623                    #[inline]
71624                    pub fn clone_column_gap(&self) -> longhands::column_gap::computed_value::T {
71625                        self.column_gap.clone()
71626                    }
71627                        /// Set row-gap.
71628                        #[allow(non_snake_case)]
71629                        #[inline]
71630                        pub fn set_row_gap(&mut self, v: longhands::row_gap::computed_value::T) {
71631                            self.row_gap = v;
71632                        }
71633                        /// Set row-gap from other struct.
71634                        #[allow(non_snake_case)]
71635                        #[inline]
71636                        pub fn copy_row_gap_from(&mut self, other: &Self) {
71637                            self.row_gap = other.row_gap.clone();
71638                        }
71639                    /// Reset row-gap from the initial struct.
71640                    #[allow(non_snake_case)]
71641                    #[inline]
71642                    pub fn reset_row_gap(&mut self, other: &Self) {
71643                        self.copy_row_gap_from(other)
71644                    }
71645
71646                    /// Get the computed value for row-gap.
71647                    #[allow(non_snake_case)]
71648                    #[inline]
71649                    pub fn clone_row_gap(&self) -> longhands::row_gap::computed_value::T {
71650                        self.row_gap.clone()
71651                    }
71652                        /// Set aspect-ratio.
71653                        #[allow(non_snake_case)]
71654                        #[inline]
71655                        pub fn set_aspect_ratio(&mut self, v: longhands::aspect_ratio::computed_value::T) {
71656                            self.aspect_ratio = v;
71657                        }
71658                        /// Set aspect-ratio from other struct.
71659                        #[allow(non_snake_case)]
71660                        #[inline]
71661                        pub fn copy_aspect_ratio_from(&mut self, other: &Self) {
71662                            self.aspect_ratio = other.aspect_ratio.clone();
71663                        }
71664                    /// Reset aspect-ratio from the initial struct.
71665                    #[allow(non_snake_case)]
71666                    #[inline]
71667                    pub fn reset_aspect_ratio(&mut self, other: &Self) {
71668                        self.copy_aspect_ratio_from(other)
71669                    }
71670
71671                    /// Get the computed value for aspect-ratio.
71672                    #[allow(non_snake_case)]
71673                    #[inline]
71674                    pub fn clone_aspect_ratio(&self) -> longhands::aspect_ratio::computed_value::T {
71675                        self.aspect_ratio.clone()
71676                    }
71677        }
71678
71679        #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
71680        /// The SVG style struct.
71681        pub struct SVG {
71682                    /// The clip-path computed value.
71683                    pub clip_path: longhands::clip_path::computed_value::T,
71684                    /// The mask-image computed value.
71685                    pub mask_image: longhands::mask_image::computed_value::T,
71686        }
71687
71688        impl SVG {
71689                        /// Set clip-path.
71690                        #[allow(non_snake_case)]
71691                        #[inline]
71692                        pub fn set_clip_path(&mut self, v: longhands::clip_path::computed_value::T) {
71693                            self.clip_path = v;
71694                        }
71695                        /// Set clip-path from other struct.
71696                        #[allow(non_snake_case)]
71697                        #[inline]
71698                        pub fn copy_clip_path_from(&mut self, other: &Self) {
71699                            self.clip_path = other.clip_path.clone();
71700                        }
71701                    /// Reset clip-path from the initial struct.
71702                    #[allow(non_snake_case)]
71703                    #[inline]
71704                    pub fn reset_clip_path(&mut self, other: &Self) {
71705                        self.copy_clip_path_from(other)
71706                    }
71707
71708                    /// Get the computed value for clip-path.
71709                    #[allow(non_snake_case)]
71710                    #[inline]
71711                    pub fn clone_clip_path(&self) -> longhands::clip_path::computed_value::T {
71712                        self.clip_path.clone()
71713                    }
71714                        /// Set mask-image.
71715                        #[allow(non_snake_case)]
71716                        #[inline]
71717                        pub fn set_mask_image(&mut self, v: longhands::mask_image::computed_value::T) {
71718                            self.mask_image = v;
71719                        }
71720                        /// Set mask-image from other struct.
71721                        #[allow(non_snake_case)]
71722                        #[inline]
71723                        pub fn copy_mask_image_from(&mut self, other: &Self) {
71724                            self.mask_image = other.mask_image.clone();
71725                        }
71726                    /// Reset mask-image from the initial struct.
71727                    #[allow(non_snake_case)]
71728                    #[inline]
71729                    pub fn reset_mask_image(&mut self, other: &Self) {
71730                        self.copy_mask_image_from(other)
71731                    }
71732
71733                    /// Get the computed value for mask-image.
71734                    #[allow(non_snake_case)]
71735                    #[inline]
71736                    pub fn clone_mask_image(&self) -> longhands::mask_image::computed_value::T {
71737                        self.mask_image.clone()
71738                    }
71739        }
71740
71741        #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
71742        /// The Table style struct.
71743        pub struct Table {
71744                    /// The table-layout computed value.
71745                    pub table_layout: longhands::table_layout::computed_value::T,
71746        }
71747
71748        impl Table {
71749                        /// Set table-layout.
71750                        #[allow(non_snake_case)]
71751                        #[inline]
71752                        pub fn set_table_layout(&mut self, v: longhands::table_layout::computed_value::T) {
71753                            self.table_layout = v;
71754                        }
71755                        /// Set table-layout from other struct.
71756                        #[allow(non_snake_case)]
71757                        #[inline]
71758                        pub fn copy_table_layout_from(&mut self, other: &Self) {
71759                            self.table_layout = other.table_layout.clone();
71760                        }
71761                    /// Reset table-layout from the initial struct.
71762                    #[allow(non_snake_case)]
71763                    #[inline]
71764                    pub fn reset_table_layout(&mut self, other: &Self) {
71765                        self.copy_table_layout_from(other)
71766                    }
71767
71768                    /// Get the computed value for table-layout.
71769                    #[allow(non_snake_case)]
71770                    #[inline]
71771                    pub fn clone_table_layout(&self) -> longhands::table_layout::computed_value::T {
71772                        self.table_layout.clone()
71773                    }
71774        }
71775
71776        #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
71777        /// The Text style struct.
71778        pub struct Text {
71779                    /// The text-overflow computed value.
71780                    pub text_overflow: longhands::text_overflow::computed_value::T,
71781                    /// The unicode-bidi computed value.
71782                    pub unicode_bidi: longhands::unicode_bidi::computed_value::T,
71783                    /// The text-decoration-line computed value.
71784                    pub text_decoration_line: longhands::text_decoration_line::computed_value::T,
71785                    /// The text-decoration-style computed value.
71786                    pub text_decoration_style: longhands::text_decoration_style::computed_value::T,
71787                    /// The text-decoration-color computed value.
71788                    pub text_decoration_color: longhands::text_decoration_color::computed_value::T,
71789        }
71790
71791        impl Text {
71792                        /// Set text-overflow.
71793                        #[allow(non_snake_case)]
71794                        #[inline]
71795                        pub fn set_text_overflow(&mut self, v: longhands::text_overflow::computed_value::T) {
71796                            self.text_overflow = v;
71797                        }
71798                        /// Set text-overflow from other struct.
71799                        #[allow(non_snake_case)]
71800                        #[inline]
71801                        pub fn copy_text_overflow_from(&mut self, other: &Self) {
71802                            self.text_overflow = other.text_overflow.clone();
71803                        }
71804                    /// Reset text-overflow from the initial struct.
71805                    #[allow(non_snake_case)]
71806                    #[inline]
71807                    pub fn reset_text_overflow(&mut self, other: &Self) {
71808                        self.copy_text_overflow_from(other)
71809                    }
71810
71811                    /// Get the computed value for text-overflow.
71812                    #[allow(non_snake_case)]
71813                    #[inline]
71814                    pub fn clone_text_overflow(&self) -> longhands::text_overflow::computed_value::T {
71815                        self.text_overflow.clone()
71816                    }
71817                        /// Set unicode-bidi.
71818                        #[allow(non_snake_case)]
71819                        #[inline]
71820                        pub fn set_unicode_bidi(&mut self, v: longhands::unicode_bidi::computed_value::T) {
71821                            self.unicode_bidi = v;
71822                        }
71823                        /// Set unicode-bidi from other struct.
71824                        #[allow(non_snake_case)]
71825                        #[inline]
71826                        pub fn copy_unicode_bidi_from(&mut self, other: &Self) {
71827                            self.unicode_bidi = other.unicode_bidi.clone();
71828                        }
71829                    /// Reset unicode-bidi from the initial struct.
71830                    #[allow(non_snake_case)]
71831                    #[inline]
71832                    pub fn reset_unicode_bidi(&mut self, other: &Self) {
71833                        self.copy_unicode_bidi_from(other)
71834                    }
71835
71836                    /// Get the computed value for unicode-bidi.
71837                    #[allow(non_snake_case)]
71838                    #[inline]
71839                    pub fn clone_unicode_bidi(&self) -> longhands::unicode_bidi::computed_value::T {
71840                        self.unicode_bidi.clone()
71841                    }
71842                        /// Set text-decoration-line.
71843                        #[allow(non_snake_case)]
71844                        #[inline]
71845                        pub fn set_text_decoration_line(&mut self, v: longhands::text_decoration_line::computed_value::T) {
71846                            self.text_decoration_line = v;
71847                        }
71848                        /// Set text-decoration-line from other struct.
71849                        #[allow(non_snake_case)]
71850                        #[inline]
71851                        pub fn copy_text_decoration_line_from(&mut self, other: &Self) {
71852                            self.text_decoration_line = other.text_decoration_line.clone();
71853                        }
71854                    /// Reset text-decoration-line from the initial struct.
71855                    #[allow(non_snake_case)]
71856                    #[inline]
71857                    pub fn reset_text_decoration_line(&mut self, other: &Self) {
71858                        self.copy_text_decoration_line_from(other)
71859                    }
71860
71861                    /// Get the computed value for text-decoration-line.
71862                    #[allow(non_snake_case)]
71863                    #[inline]
71864                    pub fn clone_text_decoration_line(&self) -> longhands::text_decoration_line::computed_value::T {
71865                        self.text_decoration_line.clone()
71866                    }
71867                        /// Set text-decoration-style.
71868                        #[allow(non_snake_case)]
71869                        #[inline]
71870                        pub fn set_text_decoration_style(&mut self, v: longhands::text_decoration_style::computed_value::T) {
71871                            self.text_decoration_style = v;
71872                        }
71873                        /// Set text-decoration-style from other struct.
71874                        #[allow(non_snake_case)]
71875                        #[inline]
71876                        pub fn copy_text_decoration_style_from(&mut self, other: &Self) {
71877                            self.text_decoration_style = other.text_decoration_style.clone();
71878                        }
71879                    /// Reset text-decoration-style from the initial struct.
71880                    #[allow(non_snake_case)]
71881                    #[inline]
71882                    pub fn reset_text_decoration_style(&mut self, other: &Self) {
71883                        self.copy_text_decoration_style_from(other)
71884                    }
71885
71886                    /// Get the computed value for text-decoration-style.
71887                    #[allow(non_snake_case)]
71888                    #[inline]
71889                    pub fn clone_text_decoration_style(&self) -> longhands::text_decoration_style::computed_value::T {
71890                        self.text_decoration_style.clone()
71891                    }
71892                        /// Set text-decoration-color.
71893                        #[allow(non_snake_case)]
71894                        #[inline]
71895                        pub fn set_text_decoration_color(&mut self, v: longhands::text_decoration_color::computed_value::T) {
71896                            self.text_decoration_color = v;
71897                        }
71898                        /// Set text-decoration-color from other struct.
71899                        #[allow(non_snake_case)]
71900                        #[inline]
71901                        pub fn copy_text_decoration_color_from(&mut self, other: &Self) {
71902                            self.text_decoration_color = other.text_decoration_color.clone();
71903                        }
71904                    /// Reset text-decoration-color from the initial struct.
71905                    #[allow(non_snake_case)]
71906                    #[inline]
71907                    pub fn reset_text_decoration_color(&mut self, other: &Self) {
71908                        self.copy_text_decoration_color_from(other)
71909                    }
71910
71911                    /// Get the computed value for text-decoration-color.
71912                    #[allow(non_snake_case)]
71913                    #[inline]
71914                    pub fn clone_text_decoration_color(&self) -> longhands::text_decoration_color::computed_value::T {
71915                        self.text_decoration_color.clone()
71916                    }
71917        }
71918
71919        #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
71920        /// The UI style struct.
71921        pub struct UI {
71922                    /// The transition-duration computed value.
71923                    pub transition_duration: longhands::transition_duration::computed_value::T,
71924                    /// The transition-timing-function computed value.
71925                    pub transition_timing_function: longhands::transition_timing_function::computed_value::T,
71926                    /// The transition-property computed value.
71927                    pub transition_property: longhands::transition_property::computed_value::T,
71928                    /// The transition-delay computed value.
71929                    pub transition_delay: longhands::transition_delay::computed_value::T,
71930                    /// The transition-behavior computed value.
71931                    pub transition_behavior: longhands::transition_behavior::computed_value::T,
71932                    /// The animation-name computed value.
71933                    pub animation_name: longhands::animation_name::computed_value::T,
71934                    /// The animation-duration computed value.
71935                    pub animation_duration: longhands::animation_duration::computed_value::T,
71936                    /// The animation-timing-function computed value.
71937                    pub animation_timing_function: longhands::animation_timing_function::computed_value::T,
71938                    /// The animation-iteration-count computed value.
71939                    pub animation_iteration_count: longhands::animation_iteration_count::computed_value::T,
71940                    /// The animation-direction computed value.
71941                    pub animation_direction: longhands::animation_direction::computed_value::T,
71942                    /// The animation-play-state computed value.
71943                    pub animation_play_state: longhands::animation_play_state::computed_value::T,
71944                    /// The animation-fill-mode computed value.
71945                    pub animation_fill_mode: longhands::animation_fill_mode::computed_value::T,
71946                    /// The animation-composition computed value.
71947                    pub animation_composition: longhands::animation_composition::computed_value::T,
71948                    /// The animation-delay computed value.
71949                    pub animation_delay: longhands::animation_delay::computed_value::T,
71950                    /// The animation-timeline computed value.
71951                    pub animation_timeline: longhands::animation_timeline::computed_value::T,
71952                    /// The view-transition-name computed value.
71953                    pub view_transition_name: longhands::view_transition_name::computed_value::T,
71954                    /// The view-transition-class computed value.
71955                    pub view_transition_class: longhands::view_transition_class::computed_value::T,
71956        }
71957
71958        impl UI {
71959                        /// Set transition-duration.
71960                        #[allow(non_snake_case)]
71961                        #[inline]
71962                        pub fn set_transition_duration(&mut self, v: longhands::transition_duration::computed_value::T) {
71963                            self.transition_duration = v;
71964                        }
71965                        /// Set transition-duration from other struct.
71966                        #[allow(non_snake_case)]
71967                        #[inline]
71968                        pub fn copy_transition_duration_from(&mut self, other: &Self) {
71969                            self.transition_duration = other.transition_duration.clone();
71970                        }
71971                    /// Reset transition-duration from the initial struct.
71972                    #[allow(non_snake_case)]
71973                    #[inline]
71974                    pub fn reset_transition_duration(&mut self, other: &Self) {
71975                        self.copy_transition_duration_from(other)
71976                    }
71977
71978                    /// Get the computed value for transition-duration.
71979                    #[allow(non_snake_case)]
71980                    #[inline]
71981                    pub fn clone_transition_duration(&self) -> longhands::transition_duration::computed_value::T {
71982                        self.transition_duration.clone()
71983                    }
71984                    /// If this longhand is indexed, get the number of elements.
71985                    #[allow(non_snake_case)]
71986                    pub fn transition_duration_count(&self) -> usize {
71987                        self.transition_duration.0.len()
71988                    }
71989
71990                    /// If this longhand is indexed, get the element at given
71991                    /// index.
71992                    #[allow(non_snake_case)]
71993                    pub fn transition_duration_at(&self, index: usize)
71994                        -> longhands::transition_duration::computed_value::SingleComputedValue {
71995                        self.transition_duration.0[index].clone()
71996                    }
71997                        /// Set transition-timing-function.
71998                        #[allow(non_snake_case)]
71999                        #[inline]
72000                        pub fn set_transition_timing_function(&mut self, v: longhands::transition_timing_function::computed_value::T) {
72001                            self.transition_timing_function = v;
72002                        }
72003                        /// Set transition-timing-function from other struct.
72004                        #[allow(non_snake_case)]
72005                        #[inline]
72006                        pub fn copy_transition_timing_function_from(&mut self, other: &Self) {
72007                            self.transition_timing_function = other.transition_timing_function.clone();
72008                        }
72009                    /// Reset transition-timing-function from the initial struct.
72010                    #[allow(non_snake_case)]
72011                    #[inline]
72012                    pub fn reset_transition_timing_function(&mut self, other: &Self) {
72013                        self.copy_transition_timing_function_from(other)
72014                    }
72015
72016                    /// Get the computed value for transition-timing-function.
72017                    #[allow(non_snake_case)]
72018                    #[inline]
72019                    pub fn clone_transition_timing_function(&self) -> longhands::transition_timing_function::computed_value::T {
72020                        self.transition_timing_function.clone()
72021                    }
72022                    /// If this longhand is indexed, get the number of elements.
72023                    #[allow(non_snake_case)]
72024                    pub fn transition_timing_function_count(&self) -> usize {
72025                        self.transition_timing_function.0.len()
72026                    }
72027
72028                    /// If this longhand is indexed, get the element at given
72029                    /// index.
72030                    #[allow(non_snake_case)]
72031                    pub fn transition_timing_function_at(&self, index: usize)
72032                        -> longhands::transition_timing_function::computed_value::SingleComputedValue {
72033                        self.transition_timing_function.0[index].clone()
72034                    }
72035                        /// Set transition-property.
72036                        #[allow(non_snake_case)]
72037                        #[inline]
72038                        pub fn set_transition_property(&mut self, v: longhands::transition_property::computed_value::T) {
72039                            self.transition_property = v;
72040                        }
72041                        /// Set transition-property from other struct.
72042                        #[allow(non_snake_case)]
72043                        #[inline]
72044                        pub fn copy_transition_property_from(&mut self, other: &Self) {
72045                            self.transition_property = other.transition_property.clone();
72046                        }
72047                    /// Reset transition-property from the initial struct.
72048                    #[allow(non_snake_case)]
72049                    #[inline]
72050                    pub fn reset_transition_property(&mut self, other: &Self) {
72051                        self.copy_transition_property_from(other)
72052                    }
72053
72054                    /// Get the computed value for transition-property.
72055                    #[allow(non_snake_case)]
72056                    #[inline]
72057                    pub fn clone_transition_property(&self) -> longhands::transition_property::computed_value::T {
72058                        self.transition_property.clone()
72059                    }
72060                    /// If this longhand is indexed, get the number of elements.
72061                    #[allow(non_snake_case)]
72062                    pub fn transition_property_count(&self) -> usize {
72063                        self.transition_property.0.len()
72064                    }
72065
72066                    /// If this longhand is indexed, get the element at given
72067                    /// index.
72068                    #[allow(non_snake_case)]
72069                    pub fn transition_property_at(&self, index: usize)
72070                        -> longhands::transition_property::computed_value::SingleComputedValue {
72071                        self.transition_property.0[index].clone()
72072                    }
72073                        /// Set transition-delay.
72074                        #[allow(non_snake_case)]
72075                        #[inline]
72076                        pub fn set_transition_delay(&mut self, v: longhands::transition_delay::computed_value::T) {
72077                            self.transition_delay = v;
72078                        }
72079                        /// Set transition-delay from other struct.
72080                        #[allow(non_snake_case)]
72081                        #[inline]
72082                        pub fn copy_transition_delay_from(&mut self, other: &Self) {
72083                            self.transition_delay = other.transition_delay.clone();
72084                        }
72085                    /// Reset transition-delay from the initial struct.
72086                    #[allow(non_snake_case)]
72087                    #[inline]
72088                    pub fn reset_transition_delay(&mut self, other: &Self) {
72089                        self.copy_transition_delay_from(other)
72090                    }
72091
72092                    /// Get the computed value for transition-delay.
72093                    #[allow(non_snake_case)]
72094                    #[inline]
72095                    pub fn clone_transition_delay(&self) -> longhands::transition_delay::computed_value::T {
72096                        self.transition_delay.clone()
72097                    }
72098                    /// If this longhand is indexed, get the number of elements.
72099                    #[allow(non_snake_case)]
72100                    pub fn transition_delay_count(&self) -> usize {
72101                        self.transition_delay.0.len()
72102                    }
72103
72104                    /// If this longhand is indexed, get the element at given
72105                    /// index.
72106                    #[allow(non_snake_case)]
72107                    pub fn transition_delay_at(&self, index: usize)
72108                        -> longhands::transition_delay::computed_value::SingleComputedValue {
72109                        self.transition_delay.0[index].clone()
72110                    }
72111                        /// Set transition-behavior.
72112                        #[allow(non_snake_case)]
72113                        #[inline]
72114                        pub fn set_transition_behavior(&mut self, v: longhands::transition_behavior::computed_value::T) {
72115                            self.transition_behavior = v;
72116                        }
72117                        /// Set transition-behavior from other struct.
72118                        #[allow(non_snake_case)]
72119                        #[inline]
72120                        pub fn copy_transition_behavior_from(&mut self, other: &Self) {
72121                            self.transition_behavior = other.transition_behavior.clone();
72122                        }
72123                    /// Reset transition-behavior from the initial struct.
72124                    #[allow(non_snake_case)]
72125                    #[inline]
72126                    pub fn reset_transition_behavior(&mut self, other: &Self) {
72127                        self.copy_transition_behavior_from(other)
72128                    }
72129
72130                    /// Get the computed value for transition-behavior.
72131                    #[allow(non_snake_case)]
72132                    #[inline]
72133                    pub fn clone_transition_behavior(&self) -> longhands::transition_behavior::computed_value::T {
72134                        self.transition_behavior.clone()
72135                    }
72136                    /// If this longhand is indexed, get the number of elements.
72137                    #[allow(non_snake_case)]
72138                    pub fn transition_behavior_count(&self) -> usize {
72139                        self.transition_behavior.0.len()
72140                    }
72141
72142                    /// If this longhand is indexed, get the element at given
72143                    /// index.
72144                    #[allow(non_snake_case)]
72145                    pub fn transition_behavior_at(&self, index: usize)
72146                        -> longhands::transition_behavior::computed_value::SingleComputedValue {
72147                        self.transition_behavior.0[index].clone()
72148                    }
72149                        /// Set animation-name.
72150                        #[allow(non_snake_case)]
72151                        #[inline]
72152                        pub fn set_animation_name(&mut self, v: longhands::animation_name::computed_value::T) {
72153                            self.animation_name = v;
72154                        }
72155                        /// Set animation-name from other struct.
72156                        #[allow(non_snake_case)]
72157                        #[inline]
72158                        pub fn copy_animation_name_from(&mut self, other: &Self) {
72159                            self.animation_name = other.animation_name.clone();
72160                        }
72161                    /// Reset animation-name from the initial struct.
72162                    #[allow(non_snake_case)]
72163                    #[inline]
72164                    pub fn reset_animation_name(&mut self, other: &Self) {
72165                        self.copy_animation_name_from(other)
72166                    }
72167
72168                    /// Get the computed value for animation-name.
72169                    #[allow(non_snake_case)]
72170                    #[inline]
72171                    pub fn clone_animation_name(&self) -> longhands::animation_name::computed_value::T {
72172                        self.animation_name.clone()
72173                    }
72174                    /// If this longhand is indexed, get the number of elements.
72175                    #[allow(non_snake_case)]
72176                    pub fn animation_name_count(&self) -> usize {
72177                        self.animation_name.0.len()
72178                    }
72179
72180                    /// If this longhand is indexed, get the element at given
72181                    /// index.
72182                    #[allow(non_snake_case)]
72183                    pub fn animation_name_at(&self, index: usize)
72184                        -> longhands::animation_name::computed_value::SingleComputedValue {
72185                        self.animation_name.0[index].clone()
72186                    }
72187                        /// Set animation-duration.
72188                        #[allow(non_snake_case)]
72189                        #[inline]
72190                        pub fn set_animation_duration(&mut self, v: longhands::animation_duration::computed_value::T) {
72191                            self.animation_duration = v;
72192                        }
72193                        /// Set animation-duration from other struct.
72194                        #[allow(non_snake_case)]
72195                        #[inline]
72196                        pub fn copy_animation_duration_from(&mut self, other: &Self) {
72197                            self.animation_duration = other.animation_duration.clone();
72198                        }
72199                    /// Reset animation-duration from the initial struct.
72200                    #[allow(non_snake_case)]
72201                    #[inline]
72202                    pub fn reset_animation_duration(&mut self, other: &Self) {
72203                        self.copy_animation_duration_from(other)
72204                    }
72205
72206                    /// Get the computed value for animation-duration.
72207                    #[allow(non_snake_case)]
72208                    #[inline]
72209                    pub fn clone_animation_duration(&self) -> longhands::animation_duration::computed_value::T {
72210                        self.animation_duration.clone()
72211                    }
72212                    /// If this longhand is indexed, get the number of elements.
72213                    #[allow(non_snake_case)]
72214                    pub fn animation_duration_count(&self) -> usize {
72215                        self.animation_duration.0.len()
72216                    }
72217
72218                    /// If this longhand is indexed, get the element at given
72219                    /// index.
72220                    #[allow(non_snake_case)]
72221                    pub fn animation_duration_at(&self, index: usize)
72222                        -> longhands::animation_duration::computed_value::SingleComputedValue {
72223                        self.animation_duration.0[index].clone()
72224                    }
72225                        /// Set animation-timing-function.
72226                        #[allow(non_snake_case)]
72227                        #[inline]
72228                        pub fn set_animation_timing_function(&mut self, v: longhands::animation_timing_function::computed_value::T) {
72229                            self.animation_timing_function = v;
72230                        }
72231                        /// Set animation-timing-function from other struct.
72232                        #[allow(non_snake_case)]
72233                        #[inline]
72234                        pub fn copy_animation_timing_function_from(&mut self, other: &Self) {
72235                            self.animation_timing_function = other.animation_timing_function.clone();
72236                        }
72237                    /// Reset animation-timing-function from the initial struct.
72238                    #[allow(non_snake_case)]
72239                    #[inline]
72240                    pub fn reset_animation_timing_function(&mut self, other: &Self) {
72241                        self.copy_animation_timing_function_from(other)
72242                    }
72243
72244                    /// Get the computed value for animation-timing-function.
72245                    #[allow(non_snake_case)]
72246                    #[inline]
72247                    pub fn clone_animation_timing_function(&self) -> longhands::animation_timing_function::computed_value::T {
72248                        self.animation_timing_function.clone()
72249                    }
72250                    /// If this longhand is indexed, get the number of elements.
72251                    #[allow(non_snake_case)]
72252                    pub fn animation_timing_function_count(&self) -> usize {
72253                        self.animation_timing_function.0.len()
72254                    }
72255
72256                    /// If this longhand is indexed, get the element at given
72257                    /// index.
72258                    #[allow(non_snake_case)]
72259                    pub fn animation_timing_function_at(&self, index: usize)
72260                        -> longhands::animation_timing_function::computed_value::SingleComputedValue {
72261                        self.animation_timing_function.0[index].clone()
72262                    }
72263                        /// Set animation-iteration-count.
72264                        #[allow(non_snake_case)]
72265                        #[inline]
72266                        pub fn set_animation_iteration_count(&mut self, v: longhands::animation_iteration_count::computed_value::T) {
72267                            self.animation_iteration_count = v;
72268                        }
72269                        /// Set animation-iteration-count from other struct.
72270                        #[allow(non_snake_case)]
72271                        #[inline]
72272                        pub fn copy_animation_iteration_count_from(&mut self, other: &Self) {
72273                            self.animation_iteration_count = other.animation_iteration_count.clone();
72274                        }
72275                    /// Reset animation-iteration-count from the initial struct.
72276                    #[allow(non_snake_case)]
72277                    #[inline]
72278                    pub fn reset_animation_iteration_count(&mut self, other: &Self) {
72279                        self.copy_animation_iteration_count_from(other)
72280                    }
72281
72282                    /// Get the computed value for animation-iteration-count.
72283                    #[allow(non_snake_case)]
72284                    #[inline]
72285                    pub fn clone_animation_iteration_count(&self) -> longhands::animation_iteration_count::computed_value::T {
72286                        self.animation_iteration_count.clone()
72287                    }
72288                    /// If this longhand is indexed, get the number of elements.
72289                    #[allow(non_snake_case)]
72290                    pub fn animation_iteration_count_count(&self) -> usize {
72291                        self.animation_iteration_count.0.len()
72292                    }
72293
72294                    /// If this longhand is indexed, get the element at given
72295                    /// index.
72296                    #[allow(non_snake_case)]
72297                    pub fn animation_iteration_count_at(&self, index: usize)
72298                        -> longhands::animation_iteration_count::computed_value::SingleComputedValue {
72299                        self.animation_iteration_count.0[index].clone()
72300                    }
72301                        /// Set animation-direction.
72302                        #[allow(non_snake_case)]
72303                        #[inline]
72304                        pub fn set_animation_direction(&mut self, v: longhands::animation_direction::computed_value::T) {
72305                            self.animation_direction = v;
72306                        }
72307                        /// Set animation-direction from other struct.
72308                        #[allow(non_snake_case)]
72309                        #[inline]
72310                        pub fn copy_animation_direction_from(&mut self, other: &Self) {
72311                            self.animation_direction = other.animation_direction.clone();
72312                        }
72313                    /// Reset animation-direction from the initial struct.
72314                    #[allow(non_snake_case)]
72315                    #[inline]
72316                    pub fn reset_animation_direction(&mut self, other: &Self) {
72317                        self.copy_animation_direction_from(other)
72318                    }
72319
72320                    /// Get the computed value for animation-direction.
72321                    #[allow(non_snake_case)]
72322                    #[inline]
72323                    pub fn clone_animation_direction(&self) -> longhands::animation_direction::computed_value::T {
72324                        self.animation_direction.clone()
72325                    }
72326                    /// If this longhand is indexed, get the number of elements.
72327                    #[allow(non_snake_case)]
72328                    pub fn animation_direction_count(&self) -> usize {
72329                        self.animation_direction.0.len()
72330                    }
72331
72332                    /// If this longhand is indexed, get the element at given
72333                    /// index.
72334                    #[allow(non_snake_case)]
72335                    pub fn animation_direction_at(&self, index: usize)
72336                        -> longhands::animation_direction::computed_value::SingleComputedValue {
72337                        self.animation_direction.0[index].clone()
72338                    }
72339                        /// Set animation-play-state.
72340                        #[allow(non_snake_case)]
72341                        #[inline]
72342                        pub fn set_animation_play_state(&mut self, v: longhands::animation_play_state::computed_value::T) {
72343                            self.animation_play_state = v;
72344                        }
72345                        /// Set animation-play-state from other struct.
72346                        #[allow(non_snake_case)]
72347                        #[inline]
72348                        pub fn copy_animation_play_state_from(&mut self, other: &Self) {
72349                            self.animation_play_state = other.animation_play_state.clone();
72350                        }
72351                    /// Reset animation-play-state from the initial struct.
72352                    #[allow(non_snake_case)]
72353                    #[inline]
72354                    pub fn reset_animation_play_state(&mut self, other: &Self) {
72355                        self.copy_animation_play_state_from(other)
72356                    }
72357
72358                    /// Get the computed value for animation-play-state.
72359                    #[allow(non_snake_case)]
72360                    #[inline]
72361                    pub fn clone_animation_play_state(&self) -> longhands::animation_play_state::computed_value::T {
72362                        self.animation_play_state.clone()
72363                    }
72364                    /// If this longhand is indexed, get the number of elements.
72365                    #[allow(non_snake_case)]
72366                    pub fn animation_play_state_count(&self) -> usize {
72367                        self.animation_play_state.0.len()
72368                    }
72369
72370                    /// If this longhand is indexed, get the element at given
72371                    /// index.
72372                    #[allow(non_snake_case)]
72373                    pub fn animation_play_state_at(&self, index: usize)
72374                        -> longhands::animation_play_state::computed_value::SingleComputedValue {
72375                        self.animation_play_state.0[index].clone()
72376                    }
72377                        /// Set animation-fill-mode.
72378                        #[allow(non_snake_case)]
72379                        #[inline]
72380                        pub fn set_animation_fill_mode(&mut self, v: longhands::animation_fill_mode::computed_value::T) {
72381                            self.animation_fill_mode = v;
72382                        }
72383                        /// Set animation-fill-mode from other struct.
72384                        #[allow(non_snake_case)]
72385                        #[inline]
72386                        pub fn copy_animation_fill_mode_from(&mut self, other: &Self) {
72387                            self.animation_fill_mode = other.animation_fill_mode.clone();
72388                        }
72389                    /// Reset animation-fill-mode from the initial struct.
72390                    #[allow(non_snake_case)]
72391                    #[inline]
72392                    pub fn reset_animation_fill_mode(&mut self, other: &Self) {
72393                        self.copy_animation_fill_mode_from(other)
72394                    }
72395
72396                    /// Get the computed value for animation-fill-mode.
72397                    #[allow(non_snake_case)]
72398                    #[inline]
72399                    pub fn clone_animation_fill_mode(&self) -> longhands::animation_fill_mode::computed_value::T {
72400                        self.animation_fill_mode.clone()
72401                    }
72402                    /// If this longhand is indexed, get the number of elements.
72403                    #[allow(non_snake_case)]
72404                    pub fn animation_fill_mode_count(&self) -> usize {
72405                        self.animation_fill_mode.0.len()
72406                    }
72407
72408                    /// If this longhand is indexed, get the element at given
72409                    /// index.
72410                    #[allow(non_snake_case)]
72411                    pub fn animation_fill_mode_at(&self, index: usize)
72412                        -> longhands::animation_fill_mode::computed_value::SingleComputedValue {
72413                        self.animation_fill_mode.0[index].clone()
72414                    }
72415                        /// Set animation-composition.
72416                        #[allow(non_snake_case)]
72417                        #[inline]
72418                        pub fn set_animation_composition(&mut self, v: longhands::animation_composition::computed_value::T) {
72419                            self.animation_composition = v;
72420                        }
72421                        /// Set animation-composition from other struct.
72422                        #[allow(non_snake_case)]
72423                        #[inline]
72424                        pub fn copy_animation_composition_from(&mut self, other: &Self) {
72425                            self.animation_composition = other.animation_composition.clone();
72426                        }
72427                    /// Reset animation-composition from the initial struct.
72428                    #[allow(non_snake_case)]
72429                    #[inline]
72430                    pub fn reset_animation_composition(&mut self, other: &Self) {
72431                        self.copy_animation_composition_from(other)
72432                    }
72433
72434                    /// Get the computed value for animation-composition.
72435                    #[allow(non_snake_case)]
72436                    #[inline]
72437                    pub fn clone_animation_composition(&self) -> longhands::animation_composition::computed_value::T {
72438                        self.animation_composition.clone()
72439                    }
72440                    /// If this longhand is indexed, get the number of elements.
72441                    #[allow(non_snake_case)]
72442                    pub fn animation_composition_count(&self) -> usize {
72443                        self.animation_composition.0.len()
72444                    }
72445
72446                    /// If this longhand is indexed, get the element at given
72447                    /// index.
72448                    #[allow(non_snake_case)]
72449                    pub fn animation_composition_at(&self, index: usize)
72450                        -> longhands::animation_composition::computed_value::SingleComputedValue {
72451                        self.animation_composition.0[index].clone()
72452                    }
72453                        /// Set animation-delay.
72454                        #[allow(non_snake_case)]
72455                        #[inline]
72456                        pub fn set_animation_delay(&mut self, v: longhands::animation_delay::computed_value::T) {
72457                            self.animation_delay = v;
72458                        }
72459                        /// Set animation-delay from other struct.
72460                        #[allow(non_snake_case)]
72461                        #[inline]
72462                        pub fn copy_animation_delay_from(&mut self, other: &Self) {
72463                            self.animation_delay = other.animation_delay.clone();
72464                        }
72465                    /// Reset animation-delay from the initial struct.
72466                    #[allow(non_snake_case)]
72467                    #[inline]
72468                    pub fn reset_animation_delay(&mut self, other: &Self) {
72469                        self.copy_animation_delay_from(other)
72470                    }
72471
72472                    /// Get the computed value for animation-delay.
72473                    #[allow(non_snake_case)]
72474                    #[inline]
72475                    pub fn clone_animation_delay(&self) -> longhands::animation_delay::computed_value::T {
72476                        self.animation_delay.clone()
72477                    }
72478                    /// If this longhand is indexed, get the number of elements.
72479                    #[allow(non_snake_case)]
72480                    pub fn animation_delay_count(&self) -> usize {
72481                        self.animation_delay.0.len()
72482                    }
72483
72484                    /// If this longhand is indexed, get the element at given
72485                    /// index.
72486                    #[allow(non_snake_case)]
72487                    pub fn animation_delay_at(&self, index: usize)
72488                        -> longhands::animation_delay::computed_value::SingleComputedValue {
72489                        self.animation_delay.0[index].clone()
72490                    }
72491                        /// Set animation-timeline.
72492                        #[allow(non_snake_case)]
72493                        #[inline]
72494                        pub fn set_animation_timeline(&mut self, v: longhands::animation_timeline::computed_value::T) {
72495                            self.animation_timeline = v;
72496                        }
72497                        /// Set animation-timeline from other struct.
72498                        #[allow(non_snake_case)]
72499                        #[inline]
72500                        pub fn copy_animation_timeline_from(&mut self, other: &Self) {
72501                            self.animation_timeline = other.animation_timeline.clone();
72502                        }
72503                    /// Reset animation-timeline from the initial struct.
72504                    #[allow(non_snake_case)]
72505                    #[inline]
72506                    pub fn reset_animation_timeline(&mut self, other: &Self) {
72507                        self.copy_animation_timeline_from(other)
72508                    }
72509
72510                    /// Get the computed value for animation-timeline.
72511                    #[allow(non_snake_case)]
72512                    #[inline]
72513                    pub fn clone_animation_timeline(&self) -> longhands::animation_timeline::computed_value::T {
72514                        self.animation_timeline.clone()
72515                    }
72516                    /// If this longhand is indexed, get the number of elements.
72517                    #[allow(non_snake_case)]
72518                    pub fn animation_timeline_count(&self) -> usize {
72519                        self.animation_timeline.0.len()
72520                    }
72521
72522                    /// If this longhand is indexed, get the element at given
72523                    /// index.
72524                    #[allow(non_snake_case)]
72525                    pub fn animation_timeline_at(&self, index: usize)
72526                        -> longhands::animation_timeline::computed_value::SingleComputedValue {
72527                        self.animation_timeline.0[index].clone()
72528                    }
72529                        /// Set view-transition-name.
72530                        #[allow(non_snake_case)]
72531                        #[inline]
72532                        pub fn set_view_transition_name(&mut self, v: longhands::view_transition_name::computed_value::T) {
72533                            self.view_transition_name = v;
72534                        }
72535                        /// Set view-transition-name from other struct.
72536                        #[allow(non_snake_case)]
72537                        #[inline]
72538                        pub fn copy_view_transition_name_from(&mut self, other: &Self) {
72539                            self.view_transition_name = other.view_transition_name.clone();
72540                        }
72541                    /// Reset view-transition-name from the initial struct.
72542                    #[allow(non_snake_case)]
72543                    #[inline]
72544                    pub fn reset_view_transition_name(&mut self, other: &Self) {
72545                        self.copy_view_transition_name_from(other)
72546                    }
72547
72548                    /// Get the computed value for view-transition-name.
72549                    #[allow(non_snake_case)]
72550                    #[inline]
72551                    pub fn clone_view_transition_name(&self) -> longhands::view_transition_name::computed_value::T {
72552                        self.view_transition_name.clone()
72553                    }
72554                        /// Set view-transition-class.
72555                        #[allow(non_snake_case)]
72556                        #[inline]
72557                        pub fn set_view_transition_class(&mut self, v: longhands::view_transition_class::computed_value::T) {
72558                            self.view_transition_class = v;
72559                        }
72560                        /// Set view-transition-class from other struct.
72561                        #[allow(non_snake_case)]
72562                        #[inline]
72563                        pub fn copy_view_transition_class_from(&mut self, other: &Self) {
72564                            self.view_transition_class = other.view_transition_class.clone();
72565                        }
72566                    /// Reset view-transition-class from the initial struct.
72567                    #[allow(non_snake_case)]
72568                    #[inline]
72569                    pub fn reset_view_transition_class(&mut self, other: &Self) {
72570                        self.copy_view_transition_class_from(other)
72571                    }
72572
72573                    /// Get the computed value for view-transition-class.
72574                    #[allow(non_snake_case)]
72575                    #[inline]
72576                    pub fn clone_view_transition_class(&self) -> longhands::view_transition_class::computed_value::T {
72577                        self.view_transition_class.clone()
72578                    }
72579        }
72580
72581}
72582
72583    impl style_structs::Background {
72584
72585    }
72586
72587    impl style_structs::Border {
72588
72589    }
72590
72591    impl style_structs::Box {
72592
72593    }
72594
72595    impl style_structs::Column {
72596
72597            /// Whether this is a multicol style.
72598            #[cfg(feature = "servo")]
72599            pub fn is_multicol(&self) -> bool {
72600                !self.column_width.is_auto() || !self.column_count.is_auto()
72601            }
72602    }
72603
72604    impl style_structs::Counters {
72605
72606    }
72607
72608    impl style_structs::Effects {
72609
72610    }
72611
72612    impl style_structs::Font {
72613
72614    }
72615
72616    impl style_structs::InheritedBox {
72617
72618    }
72619
72620    impl style_structs::InheritedTable {
72621
72622    }
72623
72624    impl style_structs::InheritedText {
72625
72626    }
72627
72628    impl style_structs::InheritedUI {
72629
72630    }
72631
72632    impl style_structs::List {
72633
72634    }
72635
72636    impl style_structs::Margin {
72637
72638    }
72639
72640    impl style_structs::Outline {
72641
72642    }
72643
72644    impl style_structs::Padding {
72645
72646    }
72647
72648    impl style_structs::Position {
72649
72650    }
72651
72652    impl style_structs::SVG {
72653
72654    }
72655
72656    impl style_structs::Table {
72657
72658    }
72659
72660    impl style_structs::Text {
72661
72662    }
72663
72664    impl style_structs::UI {
72665                /// Iterate over the values of transition-duration.
72666                #[allow(non_snake_case)]
72667                #[inline]
72668                pub fn transition_duration_iter(&self) -> TransitionDurationIter {
72669                    TransitionDurationIter {
72670                        style_struct: self,
72671                        current: 0,
72672                        max: self.transition_duration_count(),
72673                    }
72674                }
72675
72676                /// Get a value mod `index` for the property transition-duration.
72677                #[allow(non_snake_case)]
72678                #[inline]
72679                pub fn transition_duration_mod(&self, index: usize)
72680                    -> longhands::transition_duration::computed_value::SingleComputedValue {
72681                    self.transition_duration_at(index % self.transition_duration_count())
72682                }
72683
72684                /// Clone the computed value for the property.
72685                #[allow(non_snake_case)]
72686                #[inline]
72687                #[cfg(feature = "gecko")]
72688                pub fn clone_transition_duration(
72689                    &self,
72690                ) -> longhands::transition_duration::computed_value::T {
72691                    longhands::transition_duration::computed_value::List(
72692                        self.transition_duration_iter().collect()
72693                    )
72694                }
72695                /// Iterate over the values of transition-timing-function.
72696                #[allow(non_snake_case)]
72697                #[inline]
72698                pub fn transition_timing_function_iter(&self) -> TransitionTimingFunctionIter {
72699                    TransitionTimingFunctionIter {
72700                        style_struct: self,
72701                        current: 0,
72702                        max: self.transition_timing_function_count(),
72703                    }
72704                }
72705
72706                /// Get a value mod `index` for the property transition-timing-function.
72707                #[allow(non_snake_case)]
72708                #[inline]
72709                pub fn transition_timing_function_mod(&self, index: usize)
72710                    -> longhands::transition_timing_function::computed_value::SingleComputedValue {
72711                    self.transition_timing_function_at(index % self.transition_timing_function_count())
72712                }
72713
72714                /// Clone the computed value for the property.
72715                #[allow(non_snake_case)]
72716                #[inline]
72717                #[cfg(feature = "gecko")]
72718                pub fn clone_transition_timing_function(
72719                    &self,
72720                ) -> longhands::transition_timing_function::computed_value::T {
72721                    longhands::transition_timing_function::computed_value::List(
72722                        self.transition_timing_function_iter().collect()
72723                    )
72724                }
72725                /// Iterate over the values of transition-property.
72726                #[allow(non_snake_case)]
72727                #[inline]
72728                pub fn transition_property_iter(&self) -> TransitionPropertyIter {
72729                    TransitionPropertyIter {
72730                        style_struct: self,
72731                        current: 0,
72732                        max: self.transition_property_count(),
72733                    }
72734                }
72735
72736                /// Get a value mod `index` for the property transition-property.
72737                #[allow(non_snake_case)]
72738                #[inline]
72739                pub fn transition_property_mod(&self, index: usize)
72740                    -> longhands::transition_property::computed_value::SingleComputedValue {
72741                    self.transition_property_at(index % self.transition_property_count())
72742                }
72743
72744                /// Clone the computed value for the property.
72745                #[allow(non_snake_case)]
72746                #[inline]
72747                #[cfg(feature = "gecko")]
72748                pub fn clone_transition_property(
72749                    &self,
72750                ) -> longhands::transition_property::computed_value::T {
72751                    longhands::transition_property::computed_value::List(
72752                        self.transition_property_iter().collect()
72753                    )
72754                }
72755                /// Iterate over the values of transition-delay.
72756                #[allow(non_snake_case)]
72757                #[inline]
72758                pub fn transition_delay_iter(&self) -> TransitionDelayIter {
72759                    TransitionDelayIter {
72760                        style_struct: self,
72761                        current: 0,
72762                        max: self.transition_delay_count(),
72763                    }
72764                }
72765
72766                /// Get a value mod `index` for the property transition-delay.
72767                #[allow(non_snake_case)]
72768                #[inline]
72769                pub fn transition_delay_mod(&self, index: usize)
72770                    -> longhands::transition_delay::computed_value::SingleComputedValue {
72771                    self.transition_delay_at(index % self.transition_delay_count())
72772                }
72773
72774                /// Clone the computed value for the property.
72775                #[allow(non_snake_case)]
72776                #[inline]
72777                #[cfg(feature = "gecko")]
72778                pub fn clone_transition_delay(
72779                    &self,
72780                ) -> longhands::transition_delay::computed_value::T {
72781                    longhands::transition_delay::computed_value::List(
72782                        self.transition_delay_iter().collect()
72783                    )
72784                }
72785                /// Iterate over the values of transition-behavior.
72786                #[allow(non_snake_case)]
72787                #[inline]
72788                pub fn transition_behavior_iter(&self) -> TransitionBehaviorIter {
72789                    TransitionBehaviorIter {
72790                        style_struct: self,
72791                        current: 0,
72792                        max: self.transition_behavior_count(),
72793                    }
72794                }
72795
72796                /// Get a value mod `index` for the property transition-behavior.
72797                #[allow(non_snake_case)]
72798                #[inline]
72799                pub fn transition_behavior_mod(&self, index: usize)
72800                    -> longhands::transition_behavior::computed_value::SingleComputedValue {
72801                    self.transition_behavior_at(index % self.transition_behavior_count())
72802                }
72803
72804                /// Clone the computed value for the property.
72805                #[allow(non_snake_case)]
72806                #[inline]
72807                #[cfg(feature = "gecko")]
72808                pub fn clone_transition_behavior(
72809                    &self,
72810                ) -> longhands::transition_behavior::computed_value::T {
72811                    longhands::transition_behavior::computed_value::List(
72812                        self.transition_behavior_iter().collect()
72813                    )
72814                }
72815                /// Iterate over the values of animation-name.
72816                #[allow(non_snake_case)]
72817                #[inline]
72818                pub fn animation_name_iter(&self) -> AnimationNameIter {
72819                    AnimationNameIter {
72820                        style_struct: self,
72821                        current: 0,
72822                        max: self.animation_name_count(),
72823                    }
72824                }
72825
72826                /// Get a value mod `index` for the property animation-name.
72827                #[allow(non_snake_case)]
72828                #[inline]
72829                pub fn animation_name_mod(&self, index: usize)
72830                    -> longhands::animation_name::computed_value::SingleComputedValue {
72831                    self.animation_name_at(index % self.animation_name_count())
72832                }
72833
72834                /// Clone the computed value for the property.
72835                #[allow(non_snake_case)]
72836                #[inline]
72837                #[cfg(feature = "gecko")]
72838                pub fn clone_animation_name(
72839                    &self,
72840                ) -> longhands::animation_name::computed_value::T {
72841                    longhands::animation_name::computed_value::List(
72842                        self.animation_name_iter().collect()
72843                    )
72844                }
72845                /// Iterate over the values of animation-duration.
72846                #[allow(non_snake_case)]
72847                #[inline]
72848                pub fn animation_duration_iter(&self) -> AnimationDurationIter {
72849                    AnimationDurationIter {
72850                        style_struct: self,
72851                        current: 0,
72852                        max: self.animation_duration_count(),
72853                    }
72854                }
72855
72856                /// Get a value mod `index` for the property animation-duration.
72857                #[allow(non_snake_case)]
72858                #[inline]
72859                pub fn animation_duration_mod(&self, index: usize)
72860                    -> longhands::animation_duration::computed_value::SingleComputedValue {
72861                    self.animation_duration_at(index % self.animation_duration_count())
72862                }
72863
72864                /// Clone the computed value for the property.
72865                #[allow(non_snake_case)]
72866                #[inline]
72867                #[cfg(feature = "gecko")]
72868                pub fn clone_animation_duration(
72869                    &self,
72870                ) -> longhands::animation_duration::computed_value::T {
72871                    longhands::animation_duration::computed_value::List(
72872                        self.animation_duration_iter().collect()
72873                    )
72874                }
72875                /// Iterate over the values of animation-timing-function.
72876                #[allow(non_snake_case)]
72877                #[inline]
72878                pub fn animation_timing_function_iter(&self) -> AnimationTimingFunctionIter {
72879                    AnimationTimingFunctionIter {
72880                        style_struct: self,
72881                        current: 0,
72882                        max: self.animation_timing_function_count(),
72883                    }
72884                }
72885
72886                /// Get a value mod `index` for the property animation-timing-function.
72887                #[allow(non_snake_case)]
72888                #[inline]
72889                pub fn animation_timing_function_mod(&self, index: usize)
72890                    -> longhands::animation_timing_function::computed_value::SingleComputedValue {
72891                    self.animation_timing_function_at(index % self.animation_timing_function_count())
72892                }
72893
72894                /// Clone the computed value for the property.
72895                #[allow(non_snake_case)]
72896                #[inline]
72897                #[cfg(feature = "gecko")]
72898                pub fn clone_animation_timing_function(
72899                    &self,
72900                ) -> longhands::animation_timing_function::computed_value::T {
72901                    longhands::animation_timing_function::computed_value::List(
72902                        self.animation_timing_function_iter().collect()
72903                    )
72904                }
72905                /// Iterate over the values of animation-iteration-count.
72906                #[allow(non_snake_case)]
72907                #[inline]
72908                pub fn animation_iteration_count_iter(&self) -> AnimationIterationCountIter {
72909                    AnimationIterationCountIter {
72910                        style_struct: self,
72911                        current: 0,
72912                        max: self.animation_iteration_count_count(),
72913                    }
72914                }
72915
72916                /// Get a value mod `index` for the property animation-iteration-count.
72917                #[allow(non_snake_case)]
72918                #[inline]
72919                pub fn animation_iteration_count_mod(&self, index: usize)
72920                    -> longhands::animation_iteration_count::computed_value::SingleComputedValue {
72921                    self.animation_iteration_count_at(index % self.animation_iteration_count_count())
72922                }
72923
72924                /// Clone the computed value for the property.
72925                #[allow(non_snake_case)]
72926                #[inline]
72927                #[cfg(feature = "gecko")]
72928                pub fn clone_animation_iteration_count(
72929                    &self,
72930                ) -> longhands::animation_iteration_count::computed_value::T {
72931                    longhands::animation_iteration_count::computed_value::List(
72932                        self.animation_iteration_count_iter().collect()
72933                    )
72934                }
72935                /// Iterate over the values of animation-direction.
72936                #[allow(non_snake_case)]
72937                #[inline]
72938                pub fn animation_direction_iter(&self) -> AnimationDirectionIter {
72939                    AnimationDirectionIter {
72940                        style_struct: self,
72941                        current: 0,
72942                        max: self.animation_direction_count(),
72943                    }
72944                }
72945
72946                /// Get a value mod `index` for the property animation-direction.
72947                #[allow(non_snake_case)]
72948                #[inline]
72949                pub fn animation_direction_mod(&self, index: usize)
72950                    -> longhands::animation_direction::computed_value::SingleComputedValue {
72951                    self.animation_direction_at(index % self.animation_direction_count())
72952                }
72953
72954                /// Clone the computed value for the property.
72955                #[allow(non_snake_case)]
72956                #[inline]
72957                #[cfg(feature = "gecko")]
72958                pub fn clone_animation_direction(
72959                    &self,
72960                ) -> longhands::animation_direction::computed_value::T {
72961                    longhands::animation_direction::computed_value::List(
72962                        self.animation_direction_iter().collect()
72963                    )
72964                }
72965                /// Iterate over the values of animation-play-state.
72966                #[allow(non_snake_case)]
72967                #[inline]
72968                pub fn animation_play_state_iter(&self) -> AnimationPlayStateIter {
72969                    AnimationPlayStateIter {
72970                        style_struct: self,
72971                        current: 0,
72972                        max: self.animation_play_state_count(),
72973                    }
72974                }
72975
72976                /// Get a value mod `index` for the property animation-play-state.
72977                #[allow(non_snake_case)]
72978                #[inline]
72979                pub fn animation_play_state_mod(&self, index: usize)
72980                    -> longhands::animation_play_state::computed_value::SingleComputedValue {
72981                    self.animation_play_state_at(index % self.animation_play_state_count())
72982                }
72983
72984                /// Clone the computed value for the property.
72985                #[allow(non_snake_case)]
72986                #[inline]
72987                #[cfg(feature = "gecko")]
72988                pub fn clone_animation_play_state(
72989                    &self,
72990                ) -> longhands::animation_play_state::computed_value::T {
72991                    longhands::animation_play_state::computed_value::List(
72992                        self.animation_play_state_iter().collect()
72993                    )
72994                }
72995                /// Iterate over the values of animation-fill-mode.
72996                #[allow(non_snake_case)]
72997                #[inline]
72998                pub fn animation_fill_mode_iter(&self) -> AnimationFillModeIter {
72999                    AnimationFillModeIter {
73000                        style_struct: self,
73001                        current: 0,
73002                        max: self.animation_fill_mode_count(),
73003                    }
73004                }
73005
73006                /// Get a value mod `index` for the property animation-fill-mode.
73007                #[allow(non_snake_case)]
73008                #[inline]
73009                pub fn animation_fill_mode_mod(&self, index: usize)
73010                    -> longhands::animation_fill_mode::computed_value::SingleComputedValue {
73011                    self.animation_fill_mode_at(index % self.animation_fill_mode_count())
73012                }
73013
73014                /// Clone the computed value for the property.
73015                #[allow(non_snake_case)]
73016                #[inline]
73017                #[cfg(feature = "gecko")]
73018                pub fn clone_animation_fill_mode(
73019                    &self,
73020                ) -> longhands::animation_fill_mode::computed_value::T {
73021                    longhands::animation_fill_mode::computed_value::List(
73022                        self.animation_fill_mode_iter().collect()
73023                    )
73024                }
73025                /// Iterate over the values of animation-composition.
73026                #[allow(non_snake_case)]
73027                #[inline]
73028                pub fn animation_composition_iter(&self) -> AnimationCompositionIter {
73029                    AnimationCompositionIter {
73030                        style_struct: self,
73031                        current: 0,
73032                        max: self.animation_composition_count(),
73033                    }
73034                }
73035
73036                /// Get a value mod `index` for the property animation-composition.
73037                #[allow(non_snake_case)]
73038                #[inline]
73039                pub fn animation_composition_mod(&self, index: usize)
73040                    -> longhands::animation_composition::computed_value::SingleComputedValue {
73041                    self.animation_composition_at(index % self.animation_composition_count())
73042                }
73043
73044                /// Clone the computed value for the property.
73045                #[allow(non_snake_case)]
73046                #[inline]
73047                #[cfg(feature = "gecko")]
73048                pub fn clone_animation_composition(
73049                    &self,
73050                ) -> longhands::animation_composition::computed_value::T {
73051                    longhands::animation_composition::computed_value::List(
73052                        self.animation_composition_iter().collect()
73053                    )
73054                }
73055                /// Iterate over the values of animation-delay.
73056                #[allow(non_snake_case)]
73057                #[inline]
73058                pub fn animation_delay_iter(&self) -> AnimationDelayIter {
73059                    AnimationDelayIter {
73060                        style_struct: self,
73061                        current: 0,
73062                        max: self.animation_delay_count(),
73063                    }
73064                }
73065
73066                /// Get a value mod `index` for the property animation-delay.
73067                #[allow(non_snake_case)]
73068                #[inline]
73069                pub fn animation_delay_mod(&self, index: usize)
73070                    -> longhands::animation_delay::computed_value::SingleComputedValue {
73071                    self.animation_delay_at(index % self.animation_delay_count())
73072                }
73073
73074                /// Clone the computed value for the property.
73075                #[allow(non_snake_case)]
73076                #[inline]
73077                #[cfg(feature = "gecko")]
73078                pub fn clone_animation_delay(
73079                    &self,
73080                ) -> longhands::animation_delay::computed_value::T {
73081                    longhands::animation_delay::computed_value::List(
73082                        self.animation_delay_iter().collect()
73083                    )
73084                }
73085                /// Iterate over the values of animation-timeline.
73086                #[allow(non_snake_case)]
73087                #[inline]
73088                pub fn animation_timeline_iter(&self) -> AnimationTimelineIter {
73089                    AnimationTimelineIter {
73090                        style_struct: self,
73091                        current: 0,
73092                        max: self.animation_timeline_count(),
73093                    }
73094                }
73095
73096                /// Get a value mod `index` for the property animation-timeline.
73097                #[allow(non_snake_case)]
73098                #[inline]
73099                pub fn animation_timeline_mod(&self, index: usize)
73100                    -> longhands::animation_timeline::computed_value::SingleComputedValue {
73101                    self.animation_timeline_at(index % self.animation_timeline_count())
73102                }
73103
73104                /// Clone the computed value for the property.
73105                #[allow(non_snake_case)]
73106                #[inline]
73107                #[cfg(feature = "gecko")]
73108                pub fn clone_animation_timeline(
73109                    &self,
73110                ) -> longhands::animation_timeline::computed_value::T {
73111                    longhands::animation_timeline::computed_value::List(
73112                        self.animation_timeline_iter().collect()
73113                    )
73114                }
73115
73116            /// Returns whether there is any animation specified with
73117            /// animation-name other than `none`.
73118            pub fn specifies_animations(&self) -> bool {
73119                self.animation_name_iter().any(|name| !name.is_none())
73120            }
73121
73122            /// Returns whether there are any transitions specified.
73123            #[cfg(feature = "servo")]
73124            pub fn specifies_transitions(&self) -> bool {
73125                (0..self.transition_property_count()).any(|index| {
73126                    let combined_duration =
73127                        self.transition_duration_mod(index).seconds().max(0.) +
73128                        self.transition_delay_mod(index).seconds();
73129                    combined_duration > 0.
73130                })
73131            }
73132
73133            /// Returns whether animation-timeline is initial value. We need this information to
73134            /// resolve animation-duration.
73135            #[cfg(feature = "servo")]
73136            pub fn has_initial_animation_timeline(&self) -> bool {
73137                self.animation_timeline_count() == 1 && self.animation_timeline_at(0).is_auto()
73138            }
73139
73140            /// Returns whether there is any named progress timeline specified with
73141            /// scroll-timeline-name other than `none`.
73142            #[cfg(feature = "gecko")]
73143            pub fn specifies_scroll_timelines(&self) -> bool {
73144                self.scroll_timeline_name_iter().any(|name| !name.is_none())
73145            }
73146
73147            /// Returns whether there is any named progress timeline specified with
73148            /// view-timeline-name other than `none`.
73149            #[cfg(feature = "gecko")]
73150            pub fn specifies_view_timelines(&self) -> bool {
73151                self.view_timeline_name_iter().any(|name| !name.is_none())
73152            }
73153
73154            /// Returns true if animation properties are equal between styles, but without
73155            /// considering keyframe data and animation-timeline.
73156            #[cfg(feature = "servo")]
73157            pub fn animations_equals(&self, other: &Self) -> bool {
73158                self.animation_name_iter().eq(other.animation_name_iter()) &&
73159                self.animation_delay_iter().eq(other.animation_delay_iter()) &&
73160                self.animation_direction_iter().eq(other.animation_direction_iter()) &&
73161                self.animation_duration_iter().eq(other.animation_duration_iter()) &&
73162                self.animation_fill_mode_iter().eq(other.animation_fill_mode_iter()) &&
73163                self.animation_iteration_count_iter().eq(other.animation_iteration_count_iter()) &&
73164                self.animation_play_state_iter().eq(other.animation_play_state_iter()) &&
73165                self.animation_timing_function_iter().eq(other.animation_timing_function_iter())
73166            }
73167
73168    }
73169
73170            /// An iterator over the values of the transition-duration properties.
73171            pub struct TransitionDurationIter<'a> {
73172                style_struct: &'a style_structs::UI,
73173                current: usize,
73174                max: usize,
73175            }
73176
73177            impl<'a> Iterator for TransitionDurationIter<'a> {
73178                type Item = longhands::transition_duration::computed_value::SingleComputedValue;
73179
73180                fn next(&mut self) -> Option<Self::Item> {
73181                    self.current += 1;
73182                    if self.current <= self.max {
73183                        Some(self.style_struct.transition_duration_at(self.current - 1))
73184                    } else {
73185                        None
73186                    }
73187                }
73188            }
73189            /// An iterator over the values of the transition-timing-function properties.
73190            pub struct TransitionTimingFunctionIter<'a> {
73191                style_struct: &'a style_structs::UI,
73192                current: usize,
73193                max: usize,
73194            }
73195
73196            impl<'a> Iterator for TransitionTimingFunctionIter<'a> {
73197                type Item = longhands::transition_timing_function::computed_value::SingleComputedValue;
73198
73199                fn next(&mut self) -> Option<Self::Item> {
73200                    self.current += 1;
73201                    if self.current <= self.max {
73202                        Some(self.style_struct.transition_timing_function_at(self.current - 1))
73203                    } else {
73204                        None
73205                    }
73206                }
73207            }
73208            /// An iterator over the values of the transition-property properties.
73209            pub struct TransitionPropertyIter<'a> {
73210                style_struct: &'a style_structs::UI,
73211                current: usize,
73212                max: usize,
73213            }
73214
73215            impl<'a> Iterator for TransitionPropertyIter<'a> {
73216                type Item = longhands::transition_property::computed_value::SingleComputedValue;
73217
73218                fn next(&mut self) -> Option<Self::Item> {
73219                    self.current += 1;
73220                    if self.current <= self.max {
73221                        Some(self.style_struct.transition_property_at(self.current - 1))
73222                    } else {
73223                        None
73224                    }
73225                }
73226            }
73227            /// An iterator over the values of the transition-delay properties.
73228            pub struct TransitionDelayIter<'a> {
73229                style_struct: &'a style_structs::UI,
73230                current: usize,
73231                max: usize,
73232            }
73233
73234            impl<'a> Iterator for TransitionDelayIter<'a> {
73235                type Item = longhands::transition_delay::computed_value::SingleComputedValue;
73236
73237                fn next(&mut self) -> Option<Self::Item> {
73238                    self.current += 1;
73239                    if self.current <= self.max {
73240                        Some(self.style_struct.transition_delay_at(self.current - 1))
73241                    } else {
73242                        None
73243                    }
73244                }
73245            }
73246            /// An iterator over the values of the transition-behavior properties.
73247            pub struct TransitionBehaviorIter<'a> {
73248                style_struct: &'a style_structs::UI,
73249                current: usize,
73250                max: usize,
73251            }
73252
73253            impl<'a> Iterator for TransitionBehaviorIter<'a> {
73254                type Item = longhands::transition_behavior::computed_value::SingleComputedValue;
73255
73256                fn next(&mut self) -> Option<Self::Item> {
73257                    self.current += 1;
73258                    if self.current <= self.max {
73259                        Some(self.style_struct.transition_behavior_at(self.current - 1))
73260                    } else {
73261                        None
73262                    }
73263                }
73264            }
73265            /// An iterator over the values of the animation-name properties.
73266            pub struct AnimationNameIter<'a> {
73267                style_struct: &'a style_structs::UI,
73268                current: usize,
73269                max: usize,
73270            }
73271
73272            impl<'a> Iterator for AnimationNameIter<'a> {
73273                type Item = longhands::animation_name::computed_value::SingleComputedValue;
73274
73275                fn next(&mut self) -> Option<Self::Item> {
73276                    self.current += 1;
73277                    if self.current <= self.max {
73278                        Some(self.style_struct.animation_name_at(self.current - 1))
73279                    } else {
73280                        None
73281                    }
73282                }
73283            }
73284            /// An iterator over the values of the animation-duration properties.
73285            pub struct AnimationDurationIter<'a> {
73286                style_struct: &'a style_structs::UI,
73287                current: usize,
73288                max: usize,
73289            }
73290
73291            impl<'a> Iterator for AnimationDurationIter<'a> {
73292                type Item = longhands::animation_duration::computed_value::SingleComputedValue;
73293
73294                fn next(&mut self) -> Option<Self::Item> {
73295                    self.current += 1;
73296                    if self.current <= self.max {
73297                        Some(self.style_struct.animation_duration_at(self.current - 1))
73298                    } else {
73299                        None
73300                    }
73301                }
73302            }
73303            /// An iterator over the values of the animation-timing-function properties.
73304            pub struct AnimationTimingFunctionIter<'a> {
73305                style_struct: &'a style_structs::UI,
73306                current: usize,
73307                max: usize,
73308            }
73309
73310            impl<'a> Iterator for AnimationTimingFunctionIter<'a> {
73311                type Item = longhands::animation_timing_function::computed_value::SingleComputedValue;
73312
73313                fn next(&mut self) -> Option<Self::Item> {
73314                    self.current += 1;
73315                    if self.current <= self.max {
73316                        Some(self.style_struct.animation_timing_function_at(self.current - 1))
73317                    } else {
73318                        None
73319                    }
73320                }
73321            }
73322            /// An iterator over the values of the animation-iteration-count properties.
73323            pub struct AnimationIterationCountIter<'a> {
73324                style_struct: &'a style_structs::UI,
73325                current: usize,
73326                max: usize,
73327            }
73328
73329            impl<'a> Iterator for AnimationIterationCountIter<'a> {
73330                type Item = longhands::animation_iteration_count::computed_value::SingleComputedValue;
73331
73332                fn next(&mut self) -> Option<Self::Item> {
73333                    self.current += 1;
73334                    if self.current <= self.max {
73335                        Some(self.style_struct.animation_iteration_count_at(self.current - 1))
73336                    } else {
73337                        None
73338                    }
73339                }
73340            }
73341            /// An iterator over the values of the animation-direction properties.
73342            pub struct AnimationDirectionIter<'a> {
73343                style_struct: &'a style_structs::UI,
73344                current: usize,
73345                max: usize,
73346            }
73347
73348            impl<'a> Iterator for AnimationDirectionIter<'a> {
73349                type Item = longhands::animation_direction::computed_value::SingleComputedValue;
73350
73351                fn next(&mut self) -> Option<Self::Item> {
73352                    self.current += 1;
73353                    if self.current <= self.max {
73354                        Some(self.style_struct.animation_direction_at(self.current - 1))
73355                    } else {
73356                        None
73357                    }
73358                }
73359            }
73360            /// An iterator over the values of the animation-play-state properties.
73361            pub struct AnimationPlayStateIter<'a> {
73362                style_struct: &'a style_structs::UI,
73363                current: usize,
73364                max: usize,
73365            }
73366
73367            impl<'a> Iterator for AnimationPlayStateIter<'a> {
73368                type Item = longhands::animation_play_state::computed_value::SingleComputedValue;
73369
73370                fn next(&mut self) -> Option<Self::Item> {
73371                    self.current += 1;
73372                    if self.current <= self.max {
73373                        Some(self.style_struct.animation_play_state_at(self.current - 1))
73374                    } else {
73375                        None
73376                    }
73377                }
73378            }
73379            /// An iterator over the values of the animation-fill-mode properties.
73380            pub struct AnimationFillModeIter<'a> {
73381                style_struct: &'a style_structs::UI,
73382                current: usize,
73383                max: usize,
73384            }
73385
73386            impl<'a> Iterator for AnimationFillModeIter<'a> {
73387                type Item = longhands::animation_fill_mode::computed_value::SingleComputedValue;
73388
73389                fn next(&mut self) -> Option<Self::Item> {
73390                    self.current += 1;
73391                    if self.current <= self.max {
73392                        Some(self.style_struct.animation_fill_mode_at(self.current - 1))
73393                    } else {
73394                        None
73395                    }
73396                }
73397            }
73398            /// An iterator over the values of the animation-composition properties.
73399            pub struct AnimationCompositionIter<'a> {
73400                style_struct: &'a style_structs::UI,
73401                current: usize,
73402                max: usize,
73403            }
73404
73405            impl<'a> Iterator for AnimationCompositionIter<'a> {
73406                type Item = longhands::animation_composition::computed_value::SingleComputedValue;
73407
73408                fn next(&mut self) -> Option<Self::Item> {
73409                    self.current += 1;
73410                    if self.current <= self.max {
73411                        Some(self.style_struct.animation_composition_at(self.current - 1))
73412                    } else {
73413                        None
73414                    }
73415                }
73416            }
73417            /// An iterator over the values of the animation-delay properties.
73418            pub struct AnimationDelayIter<'a> {
73419                style_struct: &'a style_structs::UI,
73420                current: usize,
73421                max: usize,
73422            }
73423
73424            impl<'a> Iterator for AnimationDelayIter<'a> {
73425                type Item = longhands::animation_delay::computed_value::SingleComputedValue;
73426
73427                fn next(&mut self) -> Option<Self::Item> {
73428                    self.current += 1;
73429                    if self.current <= self.max {
73430                        Some(self.style_struct.animation_delay_at(self.current - 1))
73431                    } else {
73432                        None
73433                    }
73434                }
73435            }
73436            /// An iterator over the values of the animation-timeline properties.
73437            pub struct AnimationTimelineIter<'a> {
73438                style_struct: &'a style_structs::UI,
73439                current: usize,
73440                max: usize,
73441            }
73442
73443            impl<'a> Iterator for AnimationTimelineIter<'a> {
73444                type Item = longhands::animation_timeline::computed_value::SingleComputedValue;
73445
73446                fn next(&mut self) -> Option<Self::Item> {
73447                    self.current += 1;
73448                    if self.current <= self.max {
73449                        Some(self.style_struct.animation_timeline_at(self.current - 1))
73450                    } else {
73451                        None
73452                    }
73453                }
73454            }
73455
73456
73457#[cfg(feature = "gecko")]
73458pub use super::gecko::{ComputedValues, ComputedValuesInner};
73459
73460#[cfg(feature = "servo")]
73461#[cfg_attr(feature = "servo", derive(Clone, Debug))]
73462/// Actual data of ComputedValues, to match up with Gecko
73463pub struct ComputedValuesInner {
73464        background: Arc<style_structs::Background>,
73465        border: Arc<style_structs::Border>,
73466        box_: Arc<style_structs::Box>,
73467        column: Arc<style_structs::Column>,
73468        counters: Arc<style_structs::Counters>,
73469        effects: Arc<style_structs::Effects>,
73470        font: Arc<style_structs::Font>,
73471        inherited_box: Arc<style_structs::InheritedBox>,
73472        inherited_table: Arc<style_structs::InheritedTable>,
73473        inherited_text: Arc<style_structs::InheritedText>,
73474        inherited_ui: Arc<style_structs::InheritedUI>,
73475        list: Arc<style_structs::List>,
73476        margin: Arc<style_structs::Margin>,
73477        outline: Arc<style_structs::Outline>,
73478        padding: Arc<style_structs::Padding>,
73479        position: Arc<style_structs::Position>,
73480        svg: Arc<style_structs::SVG>,
73481        table: Arc<style_structs::Table>,
73482        text: Arc<style_structs::Text>,
73483        ui: Arc<style_structs::UI>,
73484    custom_properties: crate::custom_properties::ComputedCustomProperties,
73485
73486    /// The effective zoom value.
73487    pub effective_zoom: computed::Zoom,
73488
73489    /// A set of flags we use to store misc information regarding this style.
73490    pub flags: ComputedValueFlags,
73491
73492    /// The writing mode of this computed values struct.
73493    pub writing_mode: WritingMode,
73494
73495    /// The rule node representing the ordered list of rules matched for this
73496    /// node.  Can be None for default values and text nodes.  This is
73497    /// essentially an optimization to avoid referencing the root rule node.
73498    pub rules: Option<StrongRuleNode>,
73499
73500    /// The element's computed values if visited, only computed if there's a
73501    /// relevant link for this element. A element's "relevant link" is the
73502    /// element being matched if it is a link or the nearest ancestor link.
73503    visited_style: Option<Arc<ComputedValues>>,
73504}
73505
73506/// The struct that Servo uses to represent computed values.
73507///
73508/// This struct contains an immutable atomically-reference-counted pointer to
73509/// every kind of style struct.
73510///
73511/// When needed, the structs may be copied in order to get mutated.
73512#[cfg(feature = "servo")]
73513#[cfg_attr(feature = "servo", derive(Clone, Debug))]
73514pub struct ComputedValues {
73515    /// The actual computed values
73516    ///
73517    /// In Gecko the outer ComputedValues is actually a ComputedStyle, whereas
73518    /// ComputedValuesInner is the core set of computed values.
73519    ///
73520    /// We maintain this distinction in servo to reduce the amount of special
73521    /// casing.
73522    inner: ComputedValuesInner,
73523
73524    /// The pseudo-element that we're using.
73525    pseudo: Option<PseudoElement>,
73526}
73527
73528impl ComputedValues {
73529    /// Returns the pseudo-element that this style represents.
73530    #[cfg(feature = "servo")]
73531    pub fn pseudo(&self) -> Option<&PseudoElement> {
73532        self.pseudo.as_ref()
73533    }
73534
73535    /// Returns true if this is the style for a pseudo-element.
73536    #[cfg(feature = "servo")]
73537    pub fn is_pseudo_style(&self) -> bool {
73538        self.pseudo().is_some()
73539    }
73540
73541    /// Returns whether this style's display value is equal to contents.
73542    pub fn is_display_contents(&self) -> bool {
73543        self.clone_display().is_contents()
73544    }
73545
73546    /// Gets a reference to the rule node. Panic if no rule node exists.
73547    pub fn rules(&self) -> &StrongRuleNode {
73548        self.rules.as_ref().unwrap()
73549    }
73550
73551    /// Returns the visited rules, if applicable.
73552    pub fn visited_rules(&self) -> Option<&StrongRuleNode> {
73553        self.visited_style().and_then(|s| s.rules.as_ref())
73554    }
73555
73556    /// Gets a reference to the custom properties map (if one exists).
73557    pub fn custom_properties(&self) -> &crate::custom_properties::ComputedCustomProperties {
73558        &self.custom_properties
73559    }
73560
73561    /// Returns whether we have the same custom properties as another style.
73562    pub fn custom_properties_equal(&self, other: &Self) -> bool {
73563      self.custom_properties() == other.custom_properties()
73564    }
73565
73566    /// Gets the computed value of a given property.
73567    #[inline(always)]
73568    #[allow(non_snake_case)]
73569    pub fn clone_align_content(
73570        &self,
73571    ) -> longhands::align_content::computed_value::T {
73572        self.get_position().clone_align_content()
73573    }
73574    /// Gets the computed value of a given property.
73575    #[inline(always)]
73576    #[allow(non_snake_case)]
73577    pub fn clone_align_items(
73578        &self,
73579    ) -> longhands::align_items::computed_value::T {
73580        self.get_position().clone_align_items()
73581    }
73582    /// Gets the computed value of a given property.
73583    #[inline(always)]
73584    #[allow(non_snake_case)]
73585    pub fn clone_align_self(
73586        &self,
73587    ) -> longhands::align_self::computed_value::T {
73588        self.get_position().clone_align_self()
73589    }
73590    /// Gets the computed value of a given property.
73591    #[inline(always)]
73592    #[allow(non_snake_case)]
73593    pub fn clone_aspect_ratio(
73594        &self,
73595    ) -> longhands::aspect_ratio::computed_value::T {
73596        self.get_position().clone_aspect_ratio()
73597    }
73598    /// Gets the computed value of a given property.
73599    #[inline(always)]
73600    #[allow(non_snake_case)]
73601    pub fn clone_backface_visibility(
73602        &self,
73603    ) -> longhands::backface_visibility::computed_value::T {
73604        self.get_box().clone_backface_visibility()
73605    }
73606    /// Gets the computed value of a given property.
73607    #[inline(always)]
73608    #[allow(non_snake_case)]
73609    pub fn clone_baseline_source(
73610        &self,
73611    ) -> longhands::baseline_source::computed_value::T {
73612        self.get_box().clone_baseline_source()
73613    }
73614    /// Gets the computed value of a given property.
73615    #[inline(always)]
73616    #[allow(non_snake_case)]
73617    pub fn clone_border_collapse(
73618        &self,
73619    ) -> longhands::border_collapse::computed_value::T {
73620        self.get_inherited_table().clone_border_collapse()
73621    }
73622    /// Gets the computed value of a given property.
73623    #[inline(always)]
73624    #[allow(non_snake_case)]
73625    pub fn clone_border_image_repeat(
73626        &self,
73627    ) -> longhands::border_image_repeat::computed_value::T {
73628        self.get_border().clone_border_image_repeat()
73629    }
73630    /// Gets the computed value of a given property.
73631    #[inline(always)]
73632    #[allow(non_snake_case)]
73633    pub fn clone_box_sizing(
73634        &self,
73635    ) -> longhands::box_sizing::computed_value::T {
73636        self.get_position().clone_box_sizing()
73637    }
73638    /// Gets the computed value of a given property.
73639    #[inline(always)]
73640    #[allow(non_snake_case)]
73641    pub fn clone_caption_side(
73642        &self,
73643    ) -> longhands::caption_side::computed_value::T {
73644        self.get_inherited_table().clone_caption_side()
73645    }
73646    /// Gets the computed value of a given property.
73647    #[inline(always)]
73648    #[allow(non_snake_case)]
73649    pub fn clone_clear(
73650        &self,
73651    ) -> longhands::clear::computed_value::T {
73652        self.get_box().clone_clear()
73653    }
73654    /// Gets the computed value of a given property.
73655    #[inline(always)]
73656    #[allow(non_snake_case)]
73657    pub fn clone_column_count(
73658        &self,
73659    ) -> longhands::column_count::computed_value::T {
73660        self.get_column().clone_column_count()
73661    }
73662    /// Gets the computed value of a given property.
73663    #[inline(always)]
73664    #[allow(non_snake_case)]
73665    pub fn clone_column_span(
73666        &self,
73667    ) -> longhands::column_span::computed_value::T {
73668        self.get_column().clone_column_span()
73669    }
73670    /// Gets the computed value of a given property.
73671    #[inline(always)]
73672    #[allow(non_snake_case)]
73673    pub fn clone_contain(
73674        &self,
73675    ) -> longhands::contain::computed_value::T {
73676        self.get_box().clone_contain()
73677    }
73678    /// Gets the computed value of a given property.
73679    #[inline(always)]
73680    #[allow(non_snake_case)]
73681    pub fn clone_container_type(
73682        &self,
73683    ) -> longhands::container_type::computed_value::T {
73684        self.get_box().clone_container_type()
73685    }
73686    /// Gets the computed value of a given property.
73687    #[inline(always)]
73688    #[allow(non_snake_case)]
73689    pub fn clone_direction(
73690        &self,
73691    ) -> longhands::direction::computed_value::T {
73692        self.get_inherited_box().clone_direction()
73693    }
73694    /// Gets the computed value of a given property.
73695    #[inline(always)]
73696    #[allow(non_snake_case)]
73697    pub fn clone_display(
73698        &self,
73699    ) -> longhands::display::computed_value::T {
73700        self.get_box().clone_display()
73701    }
73702    /// Gets the computed value of a given property.
73703    #[inline(always)]
73704    #[allow(non_snake_case)]
73705    pub fn clone_empty_cells(
73706        &self,
73707    ) -> longhands::empty_cells::computed_value::T {
73708        self.get_inherited_table().clone_empty_cells()
73709    }
73710    /// Gets the computed value of a given property.
73711    #[inline(always)]
73712    #[allow(non_snake_case)]
73713    pub fn clone_flex_direction(
73714        &self,
73715    ) -> longhands::flex_direction::computed_value::T {
73716        self.get_position().clone_flex_direction()
73717    }
73718    /// Gets the computed value of a given property.
73719    #[inline(always)]
73720    #[allow(non_snake_case)]
73721    pub fn clone_flex_wrap(
73722        &self,
73723    ) -> longhands::flex_wrap::computed_value::T {
73724        self.get_position().clone_flex_wrap()
73725    }
73726    /// Gets the computed value of a given property.
73727    #[inline(always)]
73728    #[allow(non_snake_case)]
73729    pub fn clone_float(
73730        &self,
73731    ) -> longhands::float::computed_value::T {
73732        self.get_box().clone_float()
73733    }
73734    /// Gets the computed value of a given property.
73735    #[inline(always)]
73736    #[allow(non_snake_case)]
73737    pub fn clone_font_language_override(
73738        &self,
73739    ) -> longhands::font_language_override::computed_value::T {
73740        self.get_font().clone_font_language_override()
73741    }
73742    /// Gets the computed value of a given property.
73743    #[inline(always)]
73744    #[allow(non_snake_case)]
73745    pub fn clone_font_stretch(
73746        &self,
73747    ) -> longhands::font_stretch::computed_value::T {
73748        self.get_font().clone_font_stretch()
73749    }
73750    /// Gets the computed value of a given property.
73751    #[inline(always)]
73752    #[allow(non_snake_case)]
73753    pub fn clone_font_style(
73754        &self,
73755    ) -> longhands::font_style::computed_value::T {
73756        self.get_font().clone_font_style()
73757    }
73758    /// Gets the computed value of a given property.
73759    #[inline(always)]
73760    #[allow(non_snake_case)]
73761    pub fn clone_font_variant_caps(
73762        &self,
73763    ) -> longhands::font_variant_caps::computed_value::T {
73764        self.get_font().clone_font_variant_caps()
73765    }
73766    /// Gets the computed value of a given property.
73767    #[inline(always)]
73768    #[allow(non_snake_case)]
73769    pub fn clone_font_weight(
73770        &self,
73771    ) -> longhands::font_weight::computed_value::T {
73772        self.get_font().clone_font_weight()
73773    }
73774    /// Gets the computed value of a given property.
73775    #[inline(always)]
73776    #[allow(non_snake_case)]
73777    pub fn clone_grid_auto_flow(
73778        &self,
73779    ) -> longhands::grid_auto_flow::computed_value::T {
73780        self.get_position().clone_grid_auto_flow()
73781    }
73782    /// Gets the computed value of a given property.
73783    #[inline(always)]
73784    #[allow(non_snake_case)]
73785    pub fn clone_image_rendering(
73786        &self,
73787    ) -> longhands::image_rendering::computed_value::T {
73788        self.get_inherited_box().clone_image_rendering()
73789    }
73790    /// Gets the computed value of a given property.
73791    #[inline(always)]
73792    #[allow(non_snake_case)]
73793    pub fn clone_isolation(
73794        &self,
73795    ) -> longhands::isolation::computed_value::T {
73796        self.get_box().clone_isolation()
73797    }
73798    /// Gets the computed value of a given property.
73799    #[inline(always)]
73800    #[allow(non_snake_case)]
73801    pub fn clone_justify_content(
73802        &self,
73803    ) -> longhands::justify_content::computed_value::T {
73804        self.get_position().clone_justify_content()
73805    }
73806    /// Gets the computed value of a given property.
73807    #[inline(always)]
73808    #[allow(non_snake_case)]
73809    pub fn clone_justify_items(
73810        &self,
73811    ) -> longhands::justify_items::computed_value::T {
73812        self.get_position().clone_justify_items()
73813    }
73814    /// Gets the computed value of a given property.
73815    #[inline(always)]
73816    #[allow(non_snake_case)]
73817    pub fn clone_justify_self(
73818        &self,
73819    ) -> longhands::justify_self::computed_value::T {
73820        self.get_position().clone_justify_self()
73821    }
73822    /// Gets the computed value of a given property.
73823    #[inline(always)]
73824    #[allow(non_snake_case)]
73825    pub fn clone_list_style_position(
73826        &self,
73827    ) -> longhands::list_style_position::computed_value::T {
73828        self.get_list().clone_list_style_position()
73829    }
73830    /// Gets the computed value of a given property.
73831    #[inline(always)]
73832    #[allow(non_snake_case)]
73833    pub fn clone_list_style_type(
73834        &self,
73835    ) -> longhands::list_style_type::computed_value::T {
73836        self.get_list().clone_list_style_type()
73837    }
73838    /// Gets the computed value of a given property.
73839    #[inline(always)]
73840    #[allow(non_snake_case)]
73841    pub fn clone_mix_blend_mode(
73842        &self,
73843    ) -> longhands::mix_blend_mode::computed_value::T {
73844        self.get_effects().clone_mix_blend_mode()
73845    }
73846    /// Gets the computed value of a given property.
73847    #[inline(always)]
73848    #[allow(non_snake_case)]
73849    pub fn clone_object_fit(
73850        &self,
73851    ) -> longhands::object_fit::computed_value::T {
73852        self.get_position().clone_object_fit()
73853    }
73854    /// Gets the computed value of a given property.
73855    #[inline(always)]
73856    #[allow(non_snake_case)]
73857    pub fn clone_opacity(
73858        &self,
73859    ) -> longhands::opacity::computed_value::T {
73860        self.get_effects().clone_opacity()
73861    }
73862    /// Gets the computed value of a given property.
73863    #[inline(always)]
73864    #[allow(non_snake_case)]
73865    pub fn clone_order(
73866        &self,
73867    ) -> longhands::order::computed_value::T {
73868        self.get_position().clone_order()
73869    }
73870    /// Gets the computed value of a given property.
73871    #[inline(always)]
73872    #[allow(non_snake_case)]
73873    pub fn clone_outline_style(
73874        &self,
73875    ) -> longhands::outline_style::computed_value::T {
73876        self.get_outline().clone_outline_style()
73877    }
73878    /// Gets the computed value of a given property.
73879    #[inline(always)]
73880    #[allow(non_snake_case)]
73881    pub fn clone_overflow_wrap(
73882        &self,
73883    ) -> longhands::overflow_wrap::computed_value::T {
73884        self.get_inherited_text().clone_overflow_wrap()
73885    }
73886    /// Gets the computed value of a given property.
73887    #[inline(always)]
73888    #[allow(non_snake_case)]
73889    pub fn clone_pointer_events(
73890        &self,
73891    ) -> longhands::pointer_events::computed_value::T {
73892        self.get_inherited_ui().clone_pointer_events()
73893    }
73894    /// Gets the computed value of a given property.
73895    #[inline(always)]
73896    #[allow(non_snake_case)]
73897    pub fn clone_position(
73898        &self,
73899    ) -> longhands::position::computed_value::T {
73900        self.get_box().clone_position()
73901    }
73902    /// Gets the computed value of a given property.
73903    #[inline(always)]
73904    #[allow(non_snake_case)]
73905    pub fn clone__servo_overflow_clip_box(
73906        &self,
73907    ) -> longhands::_servo_overflow_clip_box::computed_value::T {
73908        self.get_box().clone__servo_overflow_clip_box()
73909    }
73910    /// Gets the computed value of a given property.
73911    #[inline(always)]
73912    #[allow(non_snake_case)]
73913    pub fn clone__servo_top_layer(
73914        &self,
73915    ) -> longhands::_servo_top_layer::computed_value::T {
73916        self.get_box().clone__servo_top_layer()
73917    }
73918    /// Gets the computed value of a given property.
73919    #[inline(always)]
73920    #[allow(non_snake_case)]
73921    pub fn clone_table_layout(
73922        &self,
73923    ) -> longhands::table_layout::computed_value::T {
73924        self.get_table().clone_table_layout()
73925    }
73926    /// Gets the computed value of a given property.
73927    #[inline(always)]
73928    #[allow(non_snake_case)]
73929    pub fn clone_text_align(
73930        &self,
73931    ) -> longhands::text_align::computed_value::T {
73932        self.get_inherited_text().clone_text_align()
73933    }
73934    /// Gets the computed value of a given property.
73935    #[inline(always)]
73936    #[allow(non_snake_case)]
73937    pub fn clone_text_align_last(
73938        &self,
73939    ) -> longhands::text_align_last::computed_value::T {
73940        self.get_inherited_text().clone_text_align_last()
73941    }
73942    /// Gets the computed value of a given property.
73943    #[inline(always)]
73944    #[allow(non_snake_case)]
73945    pub fn clone_text_decoration_line(
73946        &self,
73947    ) -> longhands::text_decoration_line::computed_value::T {
73948        self.get_text().clone_text_decoration_line()
73949    }
73950    /// Gets the computed value of a given property.
73951    #[inline(always)]
73952    #[allow(non_snake_case)]
73953    pub fn clone_text_decoration_style(
73954        &self,
73955    ) -> longhands::text_decoration_style::computed_value::T {
73956        self.get_text().clone_text_decoration_style()
73957    }
73958    /// Gets the computed value of a given property.
73959    #[inline(always)]
73960    #[allow(non_snake_case)]
73961    pub fn clone_text_justify(
73962        &self,
73963    ) -> longhands::text_justify::computed_value::T {
73964        self.get_inherited_text().clone_text_justify()
73965    }
73966    /// Gets the computed value of a given property.
73967    #[inline(always)]
73968    #[allow(non_snake_case)]
73969    pub fn clone_text_rendering(
73970        &self,
73971    ) -> longhands::text_rendering::computed_value::T {
73972        self.get_inherited_text().clone_text_rendering()
73973    }
73974    /// Gets the computed value of a given property.
73975    #[inline(always)]
73976    #[allow(non_snake_case)]
73977    pub fn clone_text_transform(
73978        &self,
73979    ) -> longhands::text_transform::computed_value::T {
73980        self.get_inherited_text().clone_text_transform()
73981    }
73982    /// Gets the computed value of a given property.
73983    #[inline(always)]
73984    #[allow(non_snake_case)]
73985    pub fn clone_text_wrap_mode(
73986        &self,
73987    ) -> longhands::text_wrap_mode::computed_value::T {
73988        self.get_inherited_text().clone_text_wrap_mode()
73989    }
73990    /// Gets the computed value of a given property.
73991    #[inline(always)]
73992    #[allow(non_snake_case)]
73993    pub fn clone_transform_style(
73994        &self,
73995    ) -> longhands::transform_style::computed_value::T {
73996        self.get_box().clone_transform_style()
73997    }
73998    /// Gets the computed value of a given property.
73999    #[inline(always)]
74000    #[allow(non_snake_case)]
74001    pub fn clone_unicode_bidi(
74002        &self,
74003    ) -> longhands::unicode_bidi::computed_value::T {
74004        self.get_text().clone_unicode_bidi()
74005    }
74006    /// Gets the computed value of a given property.
74007    #[inline(always)]
74008    #[allow(non_snake_case)]
74009    pub fn clone_visibility(
74010        &self,
74011    ) -> longhands::visibility::computed_value::T {
74012        self.get_inherited_box().clone_visibility()
74013    }
74014    /// Gets the computed value of a given property.
74015    #[inline(always)]
74016    #[allow(non_snake_case)]
74017    pub fn clone_white_space_collapse(
74018        &self,
74019    ) -> longhands::white_space_collapse::computed_value::T {
74020        self.get_inherited_text().clone_white_space_collapse()
74021    }
74022    /// Gets the computed value of a given property.
74023    #[inline(always)]
74024    #[allow(non_snake_case)]
74025    pub fn clone_word_break(
74026        &self,
74027    ) -> longhands::word_break::computed_value::T {
74028        self.get_inherited_text().clone_word_break()
74029    }
74030    /// Gets the computed value of a given property.
74031    #[inline(always)]
74032    #[allow(non_snake_case)]
74033    pub fn clone_writing_mode(
74034        &self,
74035    ) -> longhands::writing_mode::computed_value::T {
74036        self.get_inherited_box().clone_writing_mode()
74037    }
74038    /// Gets the computed value of a given property.
74039    #[inline(always)]
74040    #[allow(non_snake_case)]
74041    pub fn clone_z_index(
74042        &self,
74043    ) -> longhands::z_index::computed_value::T {
74044        self.get_position().clone_z_index()
74045    }
74046    /// Gets the computed value of a given property.
74047    #[inline(always)]
74048    #[allow(non_snake_case)]
74049    pub fn clone_zoom(
74050        &self,
74051    ) -> longhands::zoom::computed_value::T {
74052        self.get_box().clone_zoom()
74053    }
74054    /// Gets the computed value of a given property.
74055    #[inline(always)]
74056    #[allow(non_snake_case)]
74057    pub fn clone_flex_grow(
74058        &self,
74059    ) -> longhands::flex_grow::computed_value::T {
74060        self.get_position().clone_flex_grow()
74061    }
74062    /// Gets the computed value of a given property.
74063    #[inline(always)]
74064    #[allow(non_snake_case)]
74065    pub fn clone_flex_shrink(
74066        &self,
74067    ) -> longhands::flex_shrink::computed_value::T {
74068        self.get_position().clone_flex_shrink()
74069    }
74070    /// Gets the computed value of a given property.
74071    #[inline(always)]
74072    #[allow(non_snake_case)]
74073    pub fn clone_overflow_x(
74074        &self,
74075    ) -> longhands::overflow_x::computed_value::T {
74076        self.get_box().clone_overflow_x()
74077    }
74078    /// Gets the computed value of a given property.
74079    #[inline(always)]
74080    #[allow(non_snake_case)]
74081    pub fn clone_overflow_y(
74082        &self,
74083    ) -> longhands::overflow_y::computed_value::T {
74084        self.get_box().clone_overflow_y()
74085    }
74086    /// Gets the computed value of a given property.
74087    #[inline(always)]
74088    #[allow(non_snake_case)]
74089    pub fn clone_border_bottom_style(
74090        &self,
74091    ) -> longhands::border_bottom_style::computed_value::T {
74092        self.get_border().clone_border_bottom_style()
74093    }
74094    /// Gets the computed value of a given property.
74095    #[inline(always)]
74096    #[allow(non_snake_case)]
74097    pub fn clone_border_left_style(
74098        &self,
74099    ) -> longhands::border_left_style::computed_value::T {
74100        self.get_border().clone_border_left_style()
74101    }
74102    /// Gets the computed value of a given property.
74103    #[inline(always)]
74104    #[allow(non_snake_case)]
74105    pub fn clone_border_right_style(
74106        &self,
74107    ) -> longhands::border_right_style::computed_value::T {
74108        self.get_border().clone_border_right_style()
74109    }
74110    /// Gets the computed value of a given property.
74111    #[inline(always)]
74112    #[allow(non_snake_case)]
74113    pub fn clone_border_top_style(
74114        &self,
74115    ) -> longhands::border_top_style::computed_value::T {
74116        self.get_border().clone_border_top_style()
74117    }
74118    /// Gets the computed value of a given property.
74119    #[inline(always)]
74120    #[allow(non_snake_case)]
74121    pub fn clone_animation_composition(
74122        &self,
74123    ) -> longhands::animation_composition::computed_value::T {
74124        self.get_ui().clone_animation_composition()
74125    }
74126    /// Gets the computed value of a given property.
74127    #[inline(always)]
74128    #[allow(non_snake_case)]
74129    pub fn clone_animation_delay(
74130        &self,
74131    ) -> longhands::animation_delay::computed_value::T {
74132        self.get_ui().clone_animation_delay()
74133    }
74134    /// Gets the computed value of a given property.
74135    #[inline(always)]
74136    #[allow(non_snake_case)]
74137    pub fn clone_animation_direction(
74138        &self,
74139    ) -> longhands::animation_direction::computed_value::T {
74140        self.get_ui().clone_animation_direction()
74141    }
74142    /// Gets the computed value of a given property.
74143    #[inline(always)]
74144    #[allow(non_snake_case)]
74145    pub fn clone_animation_duration(
74146        &self,
74147    ) -> longhands::animation_duration::computed_value::T {
74148        self.get_ui().clone_animation_duration()
74149    }
74150    /// Gets the computed value of a given property.
74151    #[inline(always)]
74152    #[allow(non_snake_case)]
74153    pub fn clone_animation_fill_mode(
74154        &self,
74155    ) -> longhands::animation_fill_mode::computed_value::T {
74156        self.get_ui().clone_animation_fill_mode()
74157    }
74158    /// Gets the computed value of a given property.
74159    #[inline(always)]
74160    #[allow(non_snake_case)]
74161    pub fn clone_animation_iteration_count(
74162        &self,
74163    ) -> longhands::animation_iteration_count::computed_value::T {
74164        self.get_ui().clone_animation_iteration_count()
74165    }
74166    /// Gets the computed value of a given property.
74167    #[inline(always)]
74168    #[allow(non_snake_case)]
74169    pub fn clone_animation_name(
74170        &self,
74171    ) -> longhands::animation_name::computed_value::T {
74172        self.get_ui().clone_animation_name()
74173    }
74174    /// Gets the computed value of a given property.
74175    #[inline(always)]
74176    #[allow(non_snake_case)]
74177    pub fn clone_animation_play_state(
74178        &self,
74179    ) -> longhands::animation_play_state::computed_value::T {
74180        self.get_ui().clone_animation_play_state()
74181    }
74182    /// Gets the computed value of a given property.
74183    #[inline(always)]
74184    #[allow(non_snake_case)]
74185    pub fn clone_animation_timeline(
74186        &self,
74187    ) -> longhands::animation_timeline::computed_value::T {
74188        self.get_ui().clone_animation_timeline()
74189    }
74190    /// Gets the computed value of a given property.
74191    #[inline(always)]
74192    #[allow(non_snake_case)]
74193    pub fn clone_animation_timing_function(
74194        &self,
74195    ) -> longhands::animation_timing_function::computed_value::T {
74196        self.get_ui().clone_animation_timing_function()
74197    }
74198    /// Gets the computed value of a given property.
74199    #[inline(always)]
74200    #[allow(non_snake_case)]
74201    pub fn clone_backdrop_filter(
74202        &self,
74203    ) -> longhands::backdrop_filter::computed_value::T {
74204        self.get_effects().clone_backdrop_filter()
74205    }
74206    /// Gets the computed value of a given property.
74207    #[inline(always)]
74208    #[allow(non_snake_case)]
74209    pub fn clone_background_attachment(
74210        &self,
74211    ) -> longhands::background_attachment::computed_value::T {
74212        self.get_background().clone_background_attachment()
74213    }
74214    /// Gets the computed value of a given property.
74215    #[inline(always)]
74216    #[allow(non_snake_case)]
74217    pub fn clone_background_clip(
74218        &self,
74219    ) -> longhands::background_clip::computed_value::T {
74220        self.get_background().clone_background_clip()
74221    }
74222    /// Gets the computed value of a given property.
74223    #[inline(always)]
74224    #[allow(non_snake_case)]
74225    pub fn clone_background_image(
74226        &self,
74227    ) -> longhands::background_image::computed_value::T {
74228        self.get_background().clone_background_image()
74229    }
74230    /// Gets the computed value of a given property.
74231    #[inline(always)]
74232    #[allow(non_snake_case)]
74233    pub fn clone_background_origin(
74234        &self,
74235    ) -> longhands::background_origin::computed_value::T {
74236        self.get_background().clone_background_origin()
74237    }
74238    /// Gets the computed value of a given property.
74239    #[inline(always)]
74240    #[allow(non_snake_case)]
74241    pub fn clone_background_position_x(
74242        &self,
74243    ) -> longhands::background_position_x::computed_value::T {
74244        self.get_background().clone_background_position_x()
74245    }
74246    /// Gets the computed value of a given property.
74247    #[inline(always)]
74248    #[allow(non_snake_case)]
74249    pub fn clone_background_position_y(
74250        &self,
74251    ) -> longhands::background_position_y::computed_value::T {
74252        self.get_background().clone_background_position_y()
74253    }
74254    /// Gets the computed value of a given property.
74255    #[inline(always)]
74256    #[allow(non_snake_case)]
74257    pub fn clone_background_repeat(
74258        &self,
74259    ) -> longhands::background_repeat::computed_value::T {
74260        self.get_background().clone_background_repeat()
74261    }
74262    /// Gets the computed value of a given property.
74263    #[inline(always)]
74264    #[allow(non_snake_case)]
74265    pub fn clone_background_size(
74266        &self,
74267    ) -> longhands::background_size::computed_value::T {
74268        self.get_background().clone_background_size()
74269    }
74270    /// Gets the computed value of a given property.
74271    #[inline(always)]
74272    #[allow(non_snake_case)]
74273    pub fn clone_border_image_outset(
74274        &self,
74275    ) -> longhands::border_image_outset::computed_value::T {
74276        self.get_border().clone_border_image_outset()
74277    }
74278    /// Gets the computed value of a given property.
74279    #[inline(always)]
74280    #[allow(non_snake_case)]
74281    pub fn clone_border_image_slice(
74282        &self,
74283    ) -> longhands::border_image_slice::computed_value::T {
74284        self.get_border().clone_border_image_slice()
74285    }
74286    /// Gets the computed value of a given property.
74287    #[inline(always)]
74288    #[allow(non_snake_case)]
74289    pub fn clone_border_image_width(
74290        &self,
74291    ) -> longhands::border_image_width::computed_value::T {
74292        self.get_border().clone_border_image_width()
74293    }
74294    /// Gets the computed value of a given property.
74295    #[inline(always)]
74296    #[allow(non_snake_case)]
74297    pub fn clone_border_spacing(
74298        &self,
74299    ) -> longhands::border_spacing::computed_value::T {
74300        self.get_inherited_table().clone_border_spacing()
74301    }
74302    /// Gets the computed value of a given property.
74303    #[inline(always)]
74304    #[allow(non_snake_case)]
74305    pub fn clone_box_shadow(
74306        &self,
74307    ) -> longhands::box_shadow::computed_value::T {
74308        self.get_effects().clone_box_shadow()
74309    }
74310    /// Gets the computed value of a given property.
74311    #[inline(always)]
74312    #[allow(non_snake_case)]
74313    pub fn clone_clip(
74314        &self,
74315    ) -> longhands::clip::computed_value::T {
74316        self.get_effects().clone_clip()
74317    }
74318    /// Gets the computed value of a given property.
74319    #[inline(always)]
74320    #[allow(non_snake_case)]
74321    pub fn clone_clip_path(
74322        &self,
74323    ) -> longhands::clip_path::computed_value::T {
74324        self.get_svg().clone_clip_path()
74325    }
74326    /// Gets the computed value of a given property.
74327    #[inline(always)]
74328    #[allow(non_snake_case)]
74329    pub fn clone_color(
74330        &self,
74331    ) -> longhands::color::computed_value::T {
74332        self.get_inherited_text().clone_color()
74333    }
74334    /// Gets the computed value of a given property.
74335    #[inline(always)]
74336    #[allow(non_snake_case)]
74337    pub fn clone_color_scheme(
74338        &self,
74339    ) -> longhands::color_scheme::computed_value::T {
74340        self.get_inherited_ui().clone_color_scheme()
74341    }
74342    /// Gets the computed value of a given property.
74343    #[inline(always)]
74344    #[allow(non_snake_case)]
74345    pub fn clone_column_width(
74346        &self,
74347    ) -> longhands::column_width::computed_value::T {
74348        self.get_column().clone_column_width()
74349    }
74350    /// Gets the computed value of a given property.
74351    #[inline(always)]
74352    #[allow(non_snake_case)]
74353    pub fn clone_container_name(
74354        &self,
74355    ) -> longhands::container_name::computed_value::T {
74356        self.get_box().clone_container_name()
74357    }
74358    /// Gets the computed value of a given property.
74359    #[inline(always)]
74360    #[allow(non_snake_case)]
74361    pub fn clone_content(
74362        &self,
74363    ) -> longhands::content::computed_value::T {
74364        self.get_counters().clone_content()
74365    }
74366    /// Gets the computed value of a given property.
74367    #[inline(always)]
74368    #[allow(non_snake_case)]
74369    pub fn clone_counter_increment(
74370        &self,
74371    ) -> longhands::counter_increment::computed_value::T {
74372        self.get_counters().clone_counter_increment()
74373    }
74374    /// Gets the computed value of a given property.
74375    #[inline(always)]
74376    #[allow(non_snake_case)]
74377    pub fn clone_counter_reset(
74378        &self,
74379    ) -> longhands::counter_reset::computed_value::T {
74380        self.get_counters().clone_counter_reset()
74381    }
74382    /// Gets the computed value of a given property.
74383    #[inline(always)]
74384    #[allow(non_snake_case)]
74385    pub fn clone_cursor(
74386        &self,
74387    ) -> longhands::cursor::computed_value::T {
74388        self.get_inherited_ui().clone_cursor()
74389    }
74390    /// Gets the computed value of a given property.
74391    #[inline(always)]
74392    #[allow(non_snake_case)]
74393    pub fn clone_filter(
74394        &self,
74395    ) -> longhands::filter::computed_value::T {
74396        self.get_effects().clone_filter()
74397    }
74398    /// Gets the computed value of a given property.
74399    #[inline(always)]
74400    #[allow(non_snake_case)]
74401    pub fn clone_flex_basis(
74402        &self,
74403    ) -> longhands::flex_basis::computed_value::T {
74404        self.get_position().clone_flex_basis()
74405    }
74406    /// Gets the computed value of a given property.
74407    #[inline(always)]
74408    #[allow(non_snake_case)]
74409    pub fn clone_font_family(
74410        &self,
74411    ) -> longhands::font_family::computed_value::T {
74412        self.get_font().clone_font_family()
74413    }
74414    /// Gets the computed value of a given property.
74415    #[inline(always)]
74416    #[allow(non_snake_case)]
74417    pub fn clone_font_size(
74418        &self,
74419    ) -> longhands::font_size::computed_value::T {
74420        self.get_font().clone_font_size()
74421    }
74422    /// Gets the computed value of a given property.
74423    #[inline(always)]
74424    #[allow(non_snake_case)]
74425    pub fn clone_font_variation_settings(
74426        &self,
74427    ) -> longhands::font_variation_settings::computed_value::T {
74428        self.get_font().clone_font_variation_settings()
74429    }
74430    /// Gets the computed value of a given property.
74431    #[inline(always)]
74432    #[allow(non_snake_case)]
74433    pub fn clone_grid_template_areas(
74434        &self,
74435    ) -> longhands::grid_template_areas::computed_value::T {
74436        self.get_position().clone_grid_template_areas()
74437    }
74438    /// Gets the computed value of a given property.
74439    #[inline(always)]
74440    #[allow(non_snake_case)]
74441    pub fn clone_letter_spacing(
74442        &self,
74443    ) -> longhands::letter_spacing::computed_value::T {
74444        self.get_inherited_text().clone_letter_spacing()
74445    }
74446    /// Gets the computed value of a given property.
74447    #[inline(always)]
74448    #[allow(non_snake_case)]
74449    pub fn clone_line_height(
74450        &self,
74451    ) -> longhands::line_height::computed_value::T {
74452        self.get_font().clone_line_height()
74453    }
74454    /// Gets the computed value of a given property.
74455    #[inline(always)]
74456    #[allow(non_snake_case)]
74457    pub fn clone_mask_image(
74458        &self,
74459    ) -> longhands::mask_image::computed_value::T {
74460        self.get_svg().clone_mask_image()
74461    }
74462    /// Gets the computed value of a given property.
74463    #[inline(always)]
74464    #[allow(non_snake_case)]
74465    pub fn clone_offset_path(
74466        &self,
74467    ) -> longhands::offset_path::computed_value::T {
74468        self.get_box().clone_offset_path()
74469    }
74470    /// Gets the computed value of a given property.
74471    #[inline(always)]
74472    #[allow(non_snake_case)]
74473    pub fn clone_perspective(
74474        &self,
74475    ) -> longhands::perspective::computed_value::T {
74476        self.get_box().clone_perspective()
74477    }
74478    /// Gets the computed value of a given property.
74479    #[inline(always)]
74480    #[allow(non_snake_case)]
74481    pub fn clone_quotes(
74482        &self,
74483    ) -> longhands::quotes::computed_value::T {
74484        self.get_list().clone_quotes()
74485    }
74486    /// Gets the computed value of a given property.
74487    #[inline(always)]
74488    #[allow(non_snake_case)]
74489    pub fn clone_rotate(
74490        &self,
74491    ) -> longhands::rotate::computed_value::T {
74492        self.get_box().clone_rotate()
74493    }
74494    /// Gets the computed value of a given property.
74495    #[inline(always)]
74496    #[allow(non_snake_case)]
74497    pub fn clone_scale(
74498        &self,
74499    ) -> longhands::scale::computed_value::T {
74500        self.get_box().clone_scale()
74501    }
74502    /// Gets the computed value of a given property.
74503    #[inline(always)]
74504    #[allow(non_snake_case)]
74505    pub fn clone_text_indent(
74506        &self,
74507    ) -> longhands::text_indent::computed_value::T {
74508        self.get_inherited_text().clone_text_indent()
74509    }
74510    /// Gets the computed value of a given property.
74511    #[inline(always)]
74512    #[allow(non_snake_case)]
74513    pub fn clone_text_overflow(
74514        &self,
74515    ) -> longhands::text_overflow::computed_value::T {
74516        self.get_text().clone_text_overflow()
74517    }
74518    /// Gets the computed value of a given property.
74519    #[inline(always)]
74520    #[allow(non_snake_case)]
74521    pub fn clone_text_shadow(
74522        &self,
74523    ) -> longhands::text_shadow::computed_value::T {
74524        self.get_inherited_text().clone_text_shadow()
74525    }
74526    /// Gets the computed value of a given property.
74527    #[inline(always)]
74528    #[allow(non_snake_case)]
74529    pub fn clone_transform(
74530        &self,
74531    ) -> longhands::transform::computed_value::T {
74532        self.get_box().clone_transform()
74533    }
74534    /// Gets the computed value of a given property.
74535    #[inline(always)]
74536    #[allow(non_snake_case)]
74537    pub fn clone_transform_origin(
74538        &self,
74539    ) -> longhands::transform_origin::computed_value::T {
74540        self.get_box().clone_transform_origin()
74541    }
74542    /// Gets the computed value of a given property.
74543    #[inline(always)]
74544    #[allow(non_snake_case)]
74545    pub fn clone_transition_behavior(
74546        &self,
74547    ) -> longhands::transition_behavior::computed_value::T {
74548        self.get_ui().clone_transition_behavior()
74549    }
74550    /// Gets the computed value of a given property.
74551    #[inline(always)]
74552    #[allow(non_snake_case)]
74553    pub fn clone_transition_delay(
74554        &self,
74555    ) -> longhands::transition_delay::computed_value::T {
74556        self.get_ui().clone_transition_delay()
74557    }
74558    /// Gets the computed value of a given property.
74559    #[inline(always)]
74560    #[allow(non_snake_case)]
74561    pub fn clone_transition_duration(
74562        &self,
74563    ) -> longhands::transition_duration::computed_value::T {
74564        self.get_ui().clone_transition_duration()
74565    }
74566    /// Gets the computed value of a given property.
74567    #[inline(always)]
74568    #[allow(non_snake_case)]
74569    pub fn clone_transition_property(
74570        &self,
74571    ) -> longhands::transition_property::computed_value::T {
74572        self.get_ui().clone_transition_property()
74573    }
74574    /// Gets the computed value of a given property.
74575    #[inline(always)]
74576    #[allow(non_snake_case)]
74577    pub fn clone_transition_timing_function(
74578        &self,
74579    ) -> longhands::transition_timing_function::computed_value::T {
74580        self.get_ui().clone_transition_timing_function()
74581    }
74582    /// Gets the computed value of a given property.
74583    #[inline(always)]
74584    #[allow(non_snake_case)]
74585    pub fn clone_translate(
74586        &self,
74587    ) -> longhands::translate::computed_value::T {
74588        self.get_box().clone_translate()
74589    }
74590    /// Gets the computed value of a given property.
74591    #[inline(always)]
74592    #[allow(non_snake_case)]
74593    pub fn clone_vertical_align(
74594        &self,
74595    ) -> longhands::vertical_align::computed_value::T {
74596        self.get_box().clone_vertical_align()
74597    }
74598    /// Gets the computed value of a given property.
74599    #[inline(always)]
74600    #[allow(non_snake_case)]
74601    pub fn clone_view_transition_class(
74602        &self,
74603    ) -> longhands::view_transition_class::computed_value::T {
74604        self.get_ui().clone_view_transition_class()
74605    }
74606    /// Gets the computed value of a given property.
74607    #[inline(always)]
74608    #[allow(non_snake_case)]
74609    pub fn clone_view_transition_name(
74610        &self,
74611    ) -> longhands::view_transition_name::computed_value::T {
74612        self.get_ui().clone_view_transition_name()
74613    }
74614    /// Gets the computed value of a given property.
74615    #[inline(always)]
74616    #[allow(non_snake_case)]
74617    pub fn clone_will_change(
74618        &self,
74619    ) -> longhands::will_change::computed_value::T {
74620        self.get_box().clone_will_change()
74621    }
74622    /// Gets the computed value of a given property.
74623    #[inline(always)]
74624    #[allow(non_snake_case)]
74625    pub fn clone_word_spacing(
74626        &self,
74627    ) -> longhands::word_spacing::computed_value::T {
74628        self.get_inherited_text().clone_word_spacing()
74629    }
74630    /// Gets the computed value of a given property.
74631    #[inline(always)]
74632    #[allow(non_snake_case)]
74633    pub fn clone__x_lang(
74634        &self,
74635    ) -> longhands::_x_lang::computed_value::T {
74636        self.get_font().clone__x_lang()
74637    }
74638    /// Gets the computed value of a given property.
74639    #[inline(always)]
74640    #[allow(non_snake_case)]
74641    pub fn clone_object_position(
74642        &self,
74643    ) -> longhands::object_position::computed_value::T {
74644        self.get_position().clone_object_position()
74645    }
74646    /// Gets the computed value of a given property.
74647    #[inline(always)]
74648    #[allow(non_snake_case)]
74649    pub fn clone_perspective_origin(
74650        &self,
74651    ) -> longhands::perspective_origin::computed_value::T {
74652        self.get_box().clone_perspective_origin()
74653    }
74654    /// Gets the computed value of a given property.
74655    #[inline(always)]
74656    #[allow(non_snake_case)]
74657    pub fn clone_grid_template_columns(
74658        &self,
74659    ) -> longhands::grid_template_columns::computed_value::T {
74660        self.get_position().clone_grid_template_columns()
74661    }
74662    /// Gets the computed value of a given property.
74663    #[inline(always)]
74664    #[allow(non_snake_case)]
74665    pub fn clone_grid_template_rows(
74666        &self,
74667    ) -> longhands::grid_template_rows::computed_value::T {
74668        self.get_position().clone_grid_template_rows()
74669    }
74670    /// Gets the computed value of a given property.
74671    #[inline(always)]
74672    #[allow(non_snake_case)]
74673    pub fn clone_border_image_source(
74674        &self,
74675    ) -> longhands::border_image_source::computed_value::T {
74676        self.get_border().clone_border_image_source()
74677    }
74678    /// Gets the computed value of a given property.
74679    #[inline(always)]
74680    #[allow(non_snake_case)]
74681    pub fn clone_list_style_image(
74682        &self,
74683    ) -> longhands::list_style_image::computed_value::T {
74684        self.get_list().clone_list_style_image()
74685    }
74686    /// Gets the computed value of a given property.
74687    #[inline(always)]
74688    #[allow(non_snake_case)]
74689    pub fn clone_grid_auto_columns(
74690        &self,
74691    ) -> longhands::grid_auto_columns::computed_value::T {
74692        self.get_position().clone_grid_auto_columns()
74693    }
74694    /// Gets the computed value of a given property.
74695    #[inline(always)]
74696    #[allow(non_snake_case)]
74697    pub fn clone_grid_auto_rows(
74698        &self,
74699    ) -> longhands::grid_auto_rows::computed_value::T {
74700        self.get_position().clone_grid_auto_rows()
74701    }
74702    /// Gets the computed value of a given property.
74703    #[inline(always)]
74704    #[allow(non_snake_case)]
74705    pub fn clone_outline_offset(
74706        &self,
74707    ) -> longhands::outline_offset::computed_value::T {
74708        self.get_outline().clone_outline_offset()
74709    }
74710    /// Gets the computed value of a given property.
74711    #[inline(always)]
74712    #[allow(non_snake_case)]
74713    pub fn clone_overflow_clip_margin(
74714        &self,
74715    ) -> longhands::overflow_clip_margin::computed_value::T {
74716        self.get_margin().clone_overflow_clip_margin()
74717    }
74718    /// Gets the computed value of a given property.
74719    #[inline(always)]
74720    #[allow(non_snake_case)]
74721    pub fn clone_column_gap(
74722        &self,
74723    ) -> longhands::column_gap::computed_value::T {
74724        self.get_position().clone_column_gap()
74725    }
74726    /// Gets the computed value of a given property.
74727    #[inline(always)]
74728    #[allow(non_snake_case)]
74729    pub fn clone_row_gap(
74730        &self,
74731    ) -> longhands::row_gap::computed_value::T {
74732        self.get_position().clone_row_gap()
74733    }
74734    /// Gets the computed value of a given property.
74735    #[inline(always)]
74736    #[allow(non_snake_case)]
74737    pub fn clone_grid_column_end(
74738        &self,
74739    ) -> longhands::grid_column_end::computed_value::T {
74740        self.get_position().clone_grid_column_end()
74741    }
74742    /// Gets the computed value of a given property.
74743    #[inline(always)]
74744    #[allow(non_snake_case)]
74745    pub fn clone_grid_column_start(
74746        &self,
74747    ) -> longhands::grid_column_start::computed_value::T {
74748        self.get_position().clone_grid_column_start()
74749    }
74750    /// Gets the computed value of a given property.
74751    #[inline(always)]
74752    #[allow(non_snake_case)]
74753    pub fn clone_grid_row_end(
74754        &self,
74755    ) -> longhands::grid_row_end::computed_value::T {
74756        self.get_position().clone_grid_row_end()
74757    }
74758    /// Gets the computed value of a given property.
74759    #[inline(always)]
74760    #[allow(non_snake_case)]
74761    pub fn clone_grid_row_start(
74762        &self,
74763    ) -> longhands::grid_row_start::computed_value::T {
74764        self.get_position().clone_grid_row_start()
74765    }
74766    /// Gets the computed value of a given property.
74767    #[inline(always)]
74768    #[allow(non_snake_case)]
74769    pub fn clone_max_height(
74770        &self,
74771    ) -> longhands::max_height::computed_value::T {
74772        self.get_position().clone_max_height()
74773    }
74774    /// Gets the computed value of a given property.
74775    #[inline(always)]
74776    #[allow(non_snake_case)]
74777    pub fn clone_max_width(
74778        &self,
74779    ) -> longhands::max_width::computed_value::T {
74780        self.get_position().clone_max_width()
74781    }
74782    /// Gets the computed value of a given property.
74783    #[inline(always)]
74784    #[allow(non_snake_case)]
74785    pub fn clone_border_bottom_left_radius(
74786        &self,
74787    ) -> longhands::border_bottom_left_radius::computed_value::T {
74788        self.get_border().clone_border_bottom_left_radius()
74789    }
74790    /// Gets the computed value of a given property.
74791    #[inline(always)]
74792    #[allow(non_snake_case)]
74793    pub fn clone_border_bottom_right_radius(
74794        &self,
74795    ) -> longhands::border_bottom_right_radius::computed_value::T {
74796        self.get_border().clone_border_bottom_right_radius()
74797    }
74798    /// Gets the computed value of a given property.
74799    #[inline(always)]
74800    #[allow(non_snake_case)]
74801    pub fn clone_border_top_left_radius(
74802        &self,
74803    ) -> longhands::border_top_left_radius::computed_value::T {
74804        self.get_border().clone_border_top_left_radius()
74805    }
74806    /// Gets the computed value of a given property.
74807    #[inline(always)]
74808    #[allow(non_snake_case)]
74809    pub fn clone_border_top_right_radius(
74810        &self,
74811    ) -> longhands::border_top_right_radius::computed_value::T {
74812        self.get_border().clone_border_top_right_radius()
74813    }
74814    /// Gets the computed value of a given property.
74815    #[inline(always)]
74816    #[allow(non_snake_case)]
74817    pub fn clone_bottom(
74818        &self,
74819    ) -> longhands::bottom::computed_value::T {
74820        self.get_position().clone_bottom()
74821    }
74822    /// Gets the computed value of a given property.
74823    #[inline(always)]
74824    #[allow(non_snake_case)]
74825    pub fn clone_left(
74826        &self,
74827    ) -> longhands::left::computed_value::T {
74828        self.get_position().clone_left()
74829    }
74830    /// Gets the computed value of a given property.
74831    #[inline(always)]
74832    #[allow(non_snake_case)]
74833    pub fn clone_right(
74834        &self,
74835    ) -> longhands::right::computed_value::T {
74836        self.get_position().clone_right()
74837    }
74838    /// Gets the computed value of a given property.
74839    #[inline(always)]
74840    #[allow(non_snake_case)]
74841    pub fn clone_top(
74842        &self,
74843    ) -> longhands::top::computed_value::T {
74844        self.get_position().clone_top()
74845    }
74846    /// Gets the computed value of a given property.
74847    #[inline(always)]
74848    #[allow(non_snake_case)]
74849    pub fn clone_margin_bottom(
74850        &self,
74851    ) -> longhands::margin_bottom::computed_value::T {
74852        self.get_margin().clone_margin_bottom()
74853    }
74854    /// Gets the computed value of a given property.
74855    #[inline(always)]
74856    #[allow(non_snake_case)]
74857    pub fn clone_margin_left(
74858        &self,
74859    ) -> longhands::margin_left::computed_value::T {
74860        self.get_margin().clone_margin_left()
74861    }
74862    /// Gets the computed value of a given property.
74863    #[inline(always)]
74864    #[allow(non_snake_case)]
74865    pub fn clone_margin_right(
74866        &self,
74867    ) -> longhands::margin_right::computed_value::T {
74868        self.get_margin().clone_margin_right()
74869    }
74870    /// Gets the computed value of a given property.
74871    #[inline(always)]
74872    #[allow(non_snake_case)]
74873    pub fn clone_margin_top(
74874        &self,
74875    ) -> longhands::margin_top::computed_value::T {
74876        self.get_margin().clone_margin_top()
74877    }
74878    /// Gets the computed value of a given property.
74879    #[inline(always)]
74880    #[allow(non_snake_case)]
74881    pub fn clone_padding_bottom(
74882        &self,
74883    ) -> longhands::padding_bottom::computed_value::T {
74884        self.get_padding().clone_padding_bottom()
74885    }
74886    /// Gets the computed value of a given property.
74887    #[inline(always)]
74888    #[allow(non_snake_case)]
74889    pub fn clone_padding_left(
74890        &self,
74891    ) -> longhands::padding_left::computed_value::T {
74892        self.get_padding().clone_padding_left()
74893    }
74894    /// Gets the computed value of a given property.
74895    #[inline(always)]
74896    #[allow(non_snake_case)]
74897    pub fn clone_padding_right(
74898        &self,
74899    ) -> longhands::padding_right::computed_value::T {
74900        self.get_padding().clone_padding_right()
74901    }
74902    /// Gets the computed value of a given property.
74903    #[inline(always)]
74904    #[allow(non_snake_case)]
74905    pub fn clone_padding_top(
74906        &self,
74907    ) -> longhands::padding_top::computed_value::T {
74908        self.get_padding().clone_padding_top()
74909    }
74910    /// Gets the computed value of a given property.
74911    #[inline(always)]
74912    #[allow(non_snake_case)]
74913    pub fn clone_height(
74914        &self,
74915    ) -> longhands::height::computed_value::T {
74916        self.get_position().clone_height()
74917    }
74918    /// Gets the computed value of a given property.
74919    #[inline(always)]
74920    #[allow(non_snake_case)]
74921    pub fn clone_min_height(
74922        &self,
74923    ) -> longhands::min_height::computed_value::T {
74924        self.get_position().clone_min_height()
74925    }
74926    /// Gets the computed value of a given property.
74927    #[inline(always)]
74928    #[allow(non_snake_case)]
74929    pub fn clone_min_width(
74930        &self,
74931    ) -> longhands::min_width::computed_value::T {
74932        self.get_position().clone_min_width()
74933    }
74934    /// Gets the computed value of a given property.
74935    #[inline(always)]
74936    #[allow(non_snake_case)]
74937    pub fn clone_width(
74938        &self,
74939    ) -> longhands::width::computed_value::T {
74940        self.get_position().clone_width()
74941    }
74942    /// Gets the computed value of a given property.
74943    #[inline(always)]
74944    #[allow(non_snake_case)]
74945    pub fn clone_border_bottom_width(
74946        &self,
74947    ) -> longhands::border_bottom_width::computed_value::T {
74948        self.get_border().clone_border_bottom_width()
74949    }
74950    /// Gets the computed value of a given property.
74951    #[inline(always)]
74952    #[allow(non_snake_case)]
74953    pub fn clone_border_left_width(
74954        &self,
74955    ) -> longhands::border_left_width::computed_value::T {
74956        self.get_border().clone_border_left_width()
74957    }
74958    /// Gets the computed value of a given property.
74959    #[inline(always)]
74960    #[allow(non_snake_case)]
74961    pub fn clone_border_right_width(
74962        &self,
74963    ) -> longhands::border_right_width::computed_value::T {
74964        self.get_border().clone_border_right_width()
74965    }
74966    /// Gets the computed value of a given property.
74967    #[inline(always)]
74968    #[allow(non_snake_case)]
74969    pub fn clone_border_top_width(
74970        &self,
74971    ) -> longhands::border_top_width::computed_value::T {
74972        self.get_border().clone_border_top_width()
74973    }
74974    /// Gets the computed value of a given property.
74975    #[inline(always)]
74976    #[allow(non_snake_case)]
74977    pub fn clone_outline_width(
74978        &self,
74979    ) -> longhands::outline_width::computed_value::T {
74980        self.get_outline().clone_outline_width()
74981    }
74982    /// Gets the computed value of a given property.
74983    #[inline(always)]
74984    #[allow(non_snake_case)]
74985    pub fn clone_background_color(
74986        &self,
74987    ) -> longhands::background_color::computed_value::T {
74988        self.get_background().clone_background_color()
74989    }
74990    /// Gets the computed value of a given property.
74991    #[inline(always)]
74992    #[allow(non_snake_case)]
74993    pub fn clone_border_bottom_color(
74994        &self,
74995    ) -> longhands::border_bottom_color::computed_value::T {
74996        self.get_border().clone_border_bottom_color()
74997    }
74998    /// Gets the computed value of a given property.
74999    #[inline(always)]
75000    #[allow(non_snake_case)]
75001    pub fn clone_border_left_color(
75002        &self,
75003    ) -> longhands::border_left_color::computed_value::T {
75004        self.get_border().clone_border_left_color()
75005    }
75006    /// Gets the computed value of a given property.
75007    #[inline(always)]
75008    #[allow(non_snake_case)]
75009    pub fn clone_border_right_color(
75010        &self,
75011    ) -> longhands::border_right_color::computed_value::T {
75012        self.get_border().clone_border_right_color()
75013    }
75014    /// Gets the computed value of a given property.
75015    #[inline(always)]
75016    #[allow(non_snake_case)]
75017    pub fn clone_border_top_color(
75018        &self,
75019    ) -> longhands::border_top_color::computed_value::T {
75020        self.get_border().clone_border_top_color()
75021    }
75022    /// Gets the computed value of a given property.
75023    #[inline(always)]
75024    #[allow(non_snake_case)]
75025    pub fn clone_outline_color(
75026        &self,
75027    ) -> longhands::outline_color::computed_value::T {
75028        self.get_outline().clone_outline_color()
75029    }
75030    /// Gets the computed value of a given property.
75031    #[inline(always)]
75032    #[allow(non_snake_case)]
75033    pub fn clone_text_decoration_color(
75034        &self,
75035    ) -> longhands::text_decoration_color::computed_value::T {
75036        self.get_text().clone_text_decoration_color()
75037    }
75038
75039    /// Writes the (resolved or computed) value of the given longhand as a string in `dest`.
75040    ///
75041    /// TODO(emilio): We should move all the special resolution from
75042    /// nsComputedDOMStyle to ToResolvedValue instead.
75043    pub fn computed_or_resolved_value(
75044        &self,
75045        property_id: LonghandId,
75046        context: Option<&resolved::Context>,
75047        dest: &mut CssStringWriter,
75048    ) -> fmt::Result {
75049        use crate::values::resolved::ToResolvedValue;
75050        let mut dest = CssWriter::new(dest);
75051        let property_id = property_id.to_physical(self.writing_mode);
75052        match property_id {
75053            
75054            LonghandId::AlignContent => {
75055                let value = match property_id {
75056                    LonghandId::AlignContent => self.clone_align_content(),
75057                    _ => unsafe { debug_unreachable!() },
75058                };
75059                if let Some(c) = context {
75060                    value.to_resolved_value(c).to_css(&mut dest)
75061                } else {
75062                    value.to_css(&mut dest)
75063                }
75064            }
75065            
75066            LonghandId::AlignItems => {
75067                let value = match property_id {
75068                    LonghandId::AlignItems => self.clone_align_items(),
75069                    _ => unsafe { debug_unreachable!() },
75070                };
75071                if let Some(c) = context {
75072                    value.to_resolved_value(c).to_css(&mut dest)
75073                } else {
75074                    value.to_css(&mut dest)
75075                }
75076            }
75077            
75078            LonghandId::AlignSelf => {
75079                let value = match property_id {
75080                    LonghandId::AlignSelf => self.clone_align_self(),
75081                    _ => unsafe { debug_unreachable!() },
75082                };
75083                if let Some(c) = context {
75084                    value.to_resolved_value(c).to_css(&mut dest)
75085                } else {
75086                    value.to_css(&mut dest)
75087                }
75088            }
75089            
75090            LonghandId::AspectRatio => {
75091                let value = match property_id {
75092                    LonghandId::AspectRatio => self.clone_aspect_ratio(),
75093                    _ => unsafe { debug_unreachable!() },
75094                };
75095                if let Some(c) = context {
75096                    value.to_resolved_value(c).to_css(&mut dest)
75097                } else {
75098                    value.to_css(&mut dest)
75099                }
75100            }
75101            
75102            LonghandId::BackfaceVisibility => {
75103                let value = match property_id {
75104                    LonghandId::BackfaceVisibility => self.clone_backface_visibility(),
75105                    _ => unsafe { debug_unreachable!() },
75106                };
75107                if let Some(c) = context {
75108                    value.to_resolved_value(c).to_css(&mut dest)
75109                } else {
75110                    value.to_css(&mut dest)
75111                }
75112            }
75113            
75114            LonghandId::BaselineSource => {
75115                let value = match property_id {
75116                    LonghandId::BaselineSource => self.clone_baseline_source(),
75117                    _ => unsafe { debug_unreachable!() },
75118                };
75119                if let Some(c) = context {
75120                    value.to_resolved_value(c).to_css(&mut dest)
75121                } else {
75122                    value.to_css(&mut dest)
75123                }
75124            }
75125            
75126            LonghandId::BorderCollapse => {
75127                let value = match property_id {
75128                    LonghandId::BorderCollapse => self.clone_border_collapse(),
75129                    _ => unsafe { debug_unreachable!() },
75130                };
75131                if let Some(c) = context {
75132                    value.to_resolved_value(c).to_css(&mut dest)
75133                } else {
75134                    value.to_css(&mut dest)
75135                }
75136            }
75137            
75138            LonghandId::BorderImageRepeat => {
75139                let value = match property_id {
75140                    LonghandId::BorderImageRepeat => self.clone_border_image_repeat(),
75141                    _ => unsafe { debug_unreachable!() },
75142                };
75143                if let Some(c) = context {
75144                    value.to_resolved_value(c).to_css(&mut dest)
75145                } else {
75146                    value.to_css(&mut dest)
75147                }
75148            }
75149            
75150            LonghandId::BoxSizing => {
75151                let value = match property_id {
75152                    LonghandId::BoxSizing => self.clone_box_sizing(),
75153                    _ => unsafe { debug_unreachable!() },
75154                };
75155                if let Some(c) = context {
75156                    value.to_resolved_value(c).to_css(&mut dest)
75157                } else {
75158                    value.to_css(&mut dest)
75159                }
75160            }
75161            
75162            LonghandId::CaptionSide => {
75163                let value = match property_id {
75164                    LonghandId::CaptionSide => self.clone_caption_side(),
75165                    _ => unsafe { debug_unreachable!() },
75166                };
75167                if let Some(c) = context {
75168                    value.to_resolved_value(c).to_css(&mut dest)
75169                } else {
75170                    value.to_css(&mut dest)
75171                }
75172            }
75173            
75174            LonghandId::Clear => {
75175                let value = match property_id {
75176                    LonghandId::Clear => self.clone_clear(),
75177                    _ => unsafe { debug_unreachable!() },
75178                };
75179                if let Some(c) = context {
75180                    value.to_resolved_value(c).to_css(&mut dest)
75181                } else {
75182                    value.to_css(&mut dest)
75183                }
75184            }
75185            
75186            LonghandId::ColumnCount => {
75187                let value = match property_id {
75188                    LonghandId::ColumnCount => self.clone_column_count(),
75189                    _ => unsafe { debug_unreachable!() },
75190                };
75191                if let Some(c) = context {
75192                    value.to_resolved_value(c).to_css(&mut dest)
75193                } else {
75194                    value.to_css(&mut dest)
75195                }
75196            }
75197            
75198            LonghandId::ColumnSpan => {
75199                let value = match property_id {
75200                    LonghandId::ColumnSpan => self.clone_column_span(),
75201                    _ => unsafe { debug_unreachable!() },
75202                };
75203                if let Some(c) = context {
75204                    value.to_resolved_value(c).to_css(&mut dest)
75205                } else {
75206                    value.to_css(&mut dest)
75207                }
75208            }
75209            
75210            LonghandId::Contain => {
75211                let value = match property_id {
75212                    LonghandId::Contain => self.clone_contain(),
75213                    _ => unsafe { debug_unreachable!() },
75214                };
75215                if let Some(c) = context {
75216                    value.to_resolved_value(c).to_css(&mut dest)
75217                } else {
75218                    value.to_css(&mut dest)
75219                }
75220            }
75221            
75222            LonghandId::ContainerType => {
75223                let value = match property_id {
75224                    LonghandId::ContainerType => self.clone_container_type(),
75225                    _ => unsafe { debug_unreachable!() },
75226                };
75227                if let Some(c) = context {
75228                    value.to_resolved_value(c).to_css(&mut dest)
75229                } else {
75230                    value.to_css(&mut dest)
75231                }
75232            }
75233            
75234            LonghandId::Direction => {
75235                let value = match property_id {
75236                    LonghandId::Direction => self.clone_direction(),
75237                    _ => unsafe { debug_unreachable!() },
75238                };
75239                if let Some(c) = context {
75240                    value.to_resolved_value(c).to_css(&mut dest)
75241                } else {
75242                    value.to_css(&mut dest)
75243                }
75244            }
75245            
75246            LonghandId::Display => {
75247                let value = match property_id {
75248                    LonghandId::Display => self.clone_display(),
75249                    _ => unsafe { debug_unreachable!() },
75250                };
75251                if let Some(c) = context {
75252                    value.to_resolved_value(c).to_css(&mut dest)
75253                } else {
75254                    value.to_css(&mut dest)
75255                }
75256            }
75257            
75258            LonghandId::EmptyCells => {
75259                let value = match property_id {
75260                    LonghandId::EmptyCells => self.clone_empty_cells(),
75261                    _ => unsafe { debug_unreachable!() },
75262                };
75263                if let Some(c) = context {
75264                    value.to_resolved_value(c).to_css(&mut dest)
75265                } else {
75266                    value.to_css(&mut dest)
75267                }
75268            }
75269            
75270            LonghandId::FlexDirection => {
75271                let value = match property_id {
75272                    LonghandId::FlexDirection => self.clone_flex_direction(),
75273                    _ => unsafe { debug_unreachable!() },
75274                };
75275                if let Some(c) = context {
75276                    value.to_resolved_value(c).to_css(&mut dest)
75277                } else {
75278                    value.to_css(&mut dest)
75279                }
75280            }
75281            
75282            LonghandId::FlexWrap => {
75283                let value = match property_id {
75284                    LonghandId::FlexWrap => self.clone_flex_wrap(),
75285                    _ => unsafe { debug_unreachable!() },
75286                };
75287                if let Some(c) = context {
75288                    value.to_resolved_value(c).to_css(&mut dest)
75289                } else {
75290                    value.to_css(&mut dest)
75291                }
75292            }
75293            
75294            LonghandId::Float => {
75295                let value = match property_id {
75296                    LonghandId::Float => self.clone_float(),
75297                    _ => unsafe { debug_unreachable!() },
75298                };
75299                if let Some(c) = context {
75300                    value.to_resolved_value(c).to_css(&mut dest)
75301                } else {
75302                    value.to_css(&mut dest)
75303                }
75304            }
75305            
75306            LonghandId::FontLanguageOverride => {
75307                let value = match property_id {
75308                    LonghandId::FontLanguageOverride => self.clone_font_language_override(),
75309                    _ => unsafe { debug_unreachable!() },
75310                };
75311                if let Some(c) = context {
75312                    value.to_resolved_value(c).to_css(&mut dest)
75313                } else {
75314                    value.to_css(&mut dest)
75315                }
75316            }
75317            
75318            LonghandId::FontStretch => {
75319                let value = match property_id {
75320                    LonghandId::FontStretch => self.clone_font_stretch(),
75321                    _ => unsafe { debug_unreachable!() },
75322                };
75323                if let Some(c) = context {
75324                    value.to_resolved_value(c).to_css(&mut dest)
75325                } else {
75326                    value.to_css(&mut dest)
75327                }
75328            }
75329            
75330            LonghandId::FontStyle => {
75331                let value = match property_id {
75332                    LonghandId::FontStyle => self.clone_font_style(),
75333                    _ => unsafe { debug_unreachable!() },
75334                };
75335                if let Some(c) = context {
75336                    value.to_resolved_value(c).to_css(&mut dest)
75337                } else {
75338                    value.to_css(&mut dest)
75339                }
75340            }
75341            
75342            LonghandId::FontVariantCaps => {
75343                let value = match property_id {
75344                    LonghandId::FontVariantCaps => self.clone_font_variant_caps(),
75345                    _ => unsafe { debug_unreachable!() },
75346                };
75347                if let Some(c) = context {
75348                    value.to_resolved_value(c).to_css(&mut dest)
75349                } else {
75350                    value.to_css(&mut dest)
75351                }
75352            }
75353            
75354            LonghandId::FontWeight => {
75355                let value = match property_id {
75356                    LonghandId::FontWeight => self.clone_font_weight(),
75357                    _ => unsafe { debug_unreachable!() },
75358                };
75359                if let Some(c) = context {
75360                    value.to_resolved_value(c).to_css(&mut dest)
75361                } else {
75362                    value.to_css(&mut dest)
75363                }
75364            }
75365            
75366            LonghandId::GridAutoFlow => {
75367                let value = match property_id {
75368                    LonghandId::GridAutoFlow => self.clone_grid_auto_flow(),
75369                    _ => unsafe { debug_unreachable!() },
75370                };
75371                if let Some(c) = context {
75372                    value.to_resolved_value(c).to_css(&mut dest)
75373                } else {
75374                    value.to_css(&mut dest)
75375                }
75376            }
75377            
75378            LonghandId::ImageRendering => {
75379                let value = match property_id {
75380                    LonghandId::ImageRendering => self.clone_image_rendering(),
75381                    _ => unsafe { debug_unreachable!() },
75382                };
75383                if let Some(c) = context {
75384                    value.to_resolved_value(c).to_css(&mut dest)
75385                } else {
75386                    value.to_css(&mut dest)
75387                }
75388            }
75389            
75390            LonghandId::Isolation => {
75391                let value = match property_id {
75392                    LonghandId::Isolation => self.clone_isolation(),
75393                    _ => unsafe { debug_unreachable!() },
75394                };
75395                if let Some(c) = context {
75396                    value.to_resolved_value(c).to_css(&mut dest)
75397                } else {
75398                    value.to_css(&mut dest)
75399                }
75400            }
75401            
75402            LonghandId::JustifyContent => {
75403                let value = match property_id {
75404                    LonghandId::JustifyContent => self.clone_justify_content(),
75405                    _ => unsafe { debug_unreachable!() },
75406                };
75407                if let Some(c) = context {
75408                    value.to_resolved_value(c).to_css(&mut dest)
75409                } else {
75410                    value.to_css(&mut dest)
75411                }
75412            }
75413            
75414            LonghandId::JustifyItems => {
75415                let value = match property_id {
75416                    LonghandId::JustifyItems => self.clone_justify_items(),
75417                    _ => unsafe { debug_unreachable!() },
75418                };
75419                if let Some(c) = context {
75420                    value.to_resolved_value(c).to_css(&mut dest)
75421                } else {
75422                    value.to_css(&mut dest)
75423                }
75424            }
75425            
75426            LonghandId::JustifySelf => {
75427                let value = match property_id {
75428                    LonghandId::JustifySelf => self.clone_justify_self(),
75429                    _ => unsafe { debug_unreachable!() },
75430                };
75431                if let Some(c) = context {
75432                    value.to_resolved_value(c).to_css(&mut dest)
75433                } else {
75434                    value.to_css(&mut dest)
75435                }
75436            }
75437            
75438            LonghandId::ListStylePosition => {
75439                let value = match property_id {
75440                    LonghandId::ListStylePosition => self.clone_list_style_position(),
75441                    _ => unsafe { debug_unreachable!() },
75442                };
75443                if let Some(c) = context {
75444                    value.to_resolved_value(c).to_css(&mut dest)
75445                } else {
75446                    value.to_css(&mut dest)
75447                }
75448            }
75449            
75450            LonghandId::ListStyleType => {
75451                let value = match property_id {
75452                    LonghandId::ListStyleType => self.clone_list_style_type(),
75453                    _ => unsafe { debug_unreachable!() },
75454                };
75455                if let Some(c) = context {
75456                    value.to_resolved_value(c).to_css(&mut dest)
75457                } else {
75458                    value.to_css(&mut dest)
75459                }
75460            }
75461            
75462            LonghandId::MixBlendMode => {
75463                let value = match property_id {
75464                    LonghandId::MixBlendMode => self.clone_mix_blend_mode(),
75465                    _ => unsafe { debug_unreachable!() },
75466                };
75467                if let Some(c) = context {
75468                    value.to_resolved_value(c).to_css(&mut dest)
75469                } else {
75470                    value.to_css(&mut dest)
75471                }
75472            }
75473            
75474            LonghandId::ObjectFit => {
75475                let value = match property_id {
75476                    LonghandId::ObjectFit => self.clone_object_fit(),
75477                    _ => unsafe { debug_unreachable!() },
75478                };
75479                if let Some(c) = context {
75480                    value.to_resolved_value(c).to_css(&mut dest)
75481                } else {
75482                    value.to_css(&mut dest)
75483                }
75484            }
75485            
75486            LonghandId::Opacity => {
75487                let value = match property_id {
75488                    LonghandId::Opacity => self.clone_opacity(),
75489                    _ => unsafe { debug_unreachable!() },
75490                };
75491                if let Some(c) = context {
75492                    value.to_resolved_value(c).to_css(&mut dest)
75493                } else {
75494                    value.to_css(&mut dest)
75495                }
75496            }
75497            
75498            LonghandId::Order => {
75499                let value = match property_id {
75500                    LonghandId::Order => self.clone_order(),
75501                    _ => unsafe { debug_unreachable!() },
75502                };
75503                if let Some(c) = context {
75504                    value.to_resolved_value(c).to_css(&mut dest)
75505                } else {
75506                    value.to_css(&mut dest)
75507                }
75508            }
75509            
75510            LonghandId::OutlineStyle => {
75511                let value = match property_id {
75512                    LonghandId::OutlineStyle => self.clone_outline_style(),
75513                    _ => unsafe { debug_unreachable!() },
75514                };
75515                if let Some(c) = context {
75516                    value.to_resolved_value(c).to_css(&mut dest)
75517                } else {
75518                    value.to_css(&mut dest)
75519                }
75520            }
75521            
75522            LonghandId::OverflowWrap => {
75523                let value = match property_id {
75524                    LonghandId::OverflowWrap => self.clone_overflow_wrap(),
75525                    _ => unsafe { debug_unreachable!() },
75526                };
75527                if let Some(c) = context {
75528                    value.to_resolved_value(c).to_css(&mut dest)
75529                } else {
75530                    value.to_css(&mut dest)
75531                }
75532            }
75533            
75534            LonghandId::PointerEvents => {
75535                let value = match property_id {
75536                    LonghandId::PointerEvents => self.clone_pointer_events(),
75537                    _ => unsafe { debug_unreachable!() },
75538                };
75539                if let Some(c) = context {
75540                    value.to_resolved_value(c).to_css(&mut dest)
75541                } else {
75542                    value.to_css(&mut dest)
75543                }
75544            }
75545            
75546            LonghandId::Position => {
75547                let value = match property_id {
75548                    LonghandId::Position => self.clone_position(),
75549                    _ => unsafe { debug_unreachable!() },
75550                };
75551                if let Some(c) = context {
75552                    value.to_resolved_value(c).to_css(&mut dest)
75553                } else {
75554                    value.to_css(&mut dest)
75555                }
75556            }
75557            
75558            LonghandId::ServoOverflowClipBox => {
75559                let value = match property_id {
75560                    LonghandId::ServoOverflowClipBox => self.clone__servo_overflow_clip_box(),
75561                    _ => unsafe { debug_unreachable!() },
75562                };
75563                if let Some(c) = context {
75564                    value.to_resolved_value(c).to_css(&mut dest)
75565                } else {
75566                    value.to_css(&mut dest)
75567                }
75568            }
75569            
75570            LonghandId::ServoTopLayer => {
75571                let value = match property_id {
75572                    LonghandId::ServoTopLayer => self.clone__servo_top_layer(),
75573                    _ => unsafe { debug_unreachable!() },
75574                };
75575                if let Some(c) = context {
75576                    value.to_resolved_value(c).to_css(&mut dest)
75577                } else {
75578                    value.to_css(&mut dest)
75579                }
75580            }
75581            
75582            LonghandId::TableLayout => {
75583                let value = match property_id {
75584                    LonghandId::TableLayout => self.clone_table_layout(),
75585                    _ => unsafe { debug_unreachable!() },
75586                };
75587                if let Some(c) = context {
75588                    value.to_resolved_value(c).to_css(&mut dest)
75589                } else {
75590                    value.to_css(&mut dest)
75591                }
75592            }
75593            
75594            LonghandId::TextAlign => {
75595                let value = match property_id {
75596                    LonghandId::TextAlign => self.clone_text_align(),
75597                    _ => unsafe { debug_unreachable!() },
75598                };
75599                if let Some(c) = context {
75600                    value.to_resolved_value(c).to_css(&mut dest)
75601                } else {
75602                    value.to_css(&mut dest)
75603                }
75604            }
75605            
75606            LonghandId::TextAlignLast => {
75607                let value = match property_id {
75608                    LonghandId::TextAlignLast => self.clone_text_align_last(),
75609                    _ => unsafe { debug_unreachable!() },
75610                };
75611                if let Some(c) = context {
75612                    value.to_resolved_value(c).to_css(&mut dest)
75613                } else {
75614                    value.to_css(&mut dest)
75615                }
75616            }
75617            
75618            LonghandId::TextDecorationLine => {
75619                let value = match property_id {
75620                    LonghandId::TextDecorationLine => self.clone_text_decoration_line(),
75621                    _ => unsafe { debug_unreachable!() },
75622                };
75623                if let Some(c) = context {
75624                    value.to_resolved_value(c).to_css(&mut dest)
75625                } else {
75626                    value.to_css(&mut dest)
75627                }
75628            }
75629            
75630            LonghandId::TextDecorationStyle => {
75631                let value = match property_id {
75632                    LonghandId::TextDecorationStyle => self.clone_text_decoration_style(),
75633                    _ => unsafe { debug_unreachable!() },
75634                };
75635                if let Some(c) = context {
75636                    value.to_resolved_value(c).to_css(&mut dest)
75637                } else {
75638                    value.to_css(&mut dest)
75639                }
75640            }
75641            
75642            LonghandId::TextJustify => {
75643                let value = match property_id {
75644                    LonghandId::TextJustify => self.clone_text_justify(),
75645                    _ => unsafe { debug_unreachable!() },
75646                };
75647                if let Some(c) = context {
75648                    value.to_resolved_value(c).to_css(&mut dest)
75649                } else {
75650                    value.to_css(&mut dest)
75651                }
75652            }
75653            
75654            LonghandId::TextRendering => {
75655                let value = match property_id {
75656                    LonghandId::TextRendering => self.clone_text_rendering(),
75657                    _ => unsafe { debug_unreachable!() },
75658                };
75659                if let Some(c) = context {
75660                    value.to_resolved_value(c).to_css(&mut dest)
75661                } else {
75662                    value.to_css(&mut dest)
75663                }
75664            }
75665            
75666            LonghandId::TextTransform => {
75667                let value = match property_id {
75668                    LonghandId::TextTransform => self.clone_text_transform(),
75669                    _ => unsafe { debug_unreachable!() },
75670                };
75671                if let Some(c) = context {
75672                    value.to_resolved_value(c).to_css(&mut dest)
75673                } else {
75674                    value.to_css(&mut dest)
75675                }
75676            }
75677            
75678            LonghandId::TextWrapMode => {
75679                let value = match property_id {
75680                    LonghandId::TextWrapMode => self.clone_text_wrap_mode(),
75681                    _ => unsafe { debug_unreachable!() },
75682                };
75683                if let Some(c) = context {
75684                    value.to_resolved_value(c).to_css(&mut dest)
75685                } else {
75686                    value.to_css(&mut dest)
75687                }
75688            }
75689            
75690            LonghandId::TransformStyle => {
75691                let value = match property_id {
75692                    LonghandId::TransformStyle => self.clone_transform_style(),
75693                    _ => unsafe { debug_unreachable!() },
75694                };
75695                if let Some(c) = context {
75696                    value.to_resolved_value(c).to_css(&mut dest)
75697                } else {
75698                    value.to_css(&mut dest)
75699                }
75700            }
75701            
75702            LonghandId::UnicodeBidi => {
75703                let value = match property_id {
75704                    LonghandId::UnicodeBidi => self.clone_unicode_bidi(),
75705                    _ => unsafe { debug_unreachable!() },
75706                };
75707                if let Some(c) = context {
75708                    value.to_resolved_value(c).to_css(&mut dest)
75709                } else {
75710                    value.to_css(&mut dest)
75711                }
75712            }
75713            
75714            LonghandId::Visibility => {
75715                let value = match property_id {
75716                    LonghandId::Visibility => self.clone_visibility(),
75717                    _ => unsafe { debug_unreachable!() },
75718                };
75719                if let Some(c) = context {
75720                    value.to_resolved_value(c).to_css(&mut dest)
75721                } else {
75722                    value.to_css(&mut dest)
75723                }
75724            }
75725            
75726            LonghandId::WhiteSpaceCollapse => {
75727                let value = match property_id {
75728                    LonghandId::WhiteSpaceCollapse => self.clone_white_space_collapse(),
75729                    _ => unsafe { debug_unreachable!() },
75730                };
75731                if let Some(c) = context {
75732                    value.to_resolved_value(c).to_css(&mut dest)
75733                } else {
75734                    value.to_css(&mut dest)
75735                }
75736            }
75737            
75738            LonghandId::WordBreak => {
75739                let value = match property_id {
75740                    LonghandId::WordBreak => self.clone_word_break(),
75741                    _ => unsafe { debug_unreachable!() },
75742                };
75743                if let Some(c) = context {
75744                    value.to_resolved_value(c).to_css(&mut dest)
75745                } else {
75746                    value.to_css(&mut dest)
75747                }
75748            }
75749            
75750            LonghandId::WritingMode => {
75751                let value = match property_id {
75752                    LonghandId::WritingMode => self.clone_writing_mode(),
75753                    _ => unsafe { debug_unreachable!() },
75754                };
75755                if let Some(c) = context {
75756                    value.to_resolved_value(c).to_css(&mut dest)
75757                } else {
75758                    value.to_css(&mut dest)
75759                }
75760            }
75761            
75762            LonghandId::ZIndex => {
75763                let value = match property_id {
75764                    LonghandId::ZIndex => self.clone_z_index(),
75765                    _ => unsafe { debug_unreachable!() },
75766                };
75767                if let Some(c) = context {
75768                    value.to_resolved_value(c).to_css(&mut dest)
75769                } else {
75770                    value.to_css(&mut dest)
75771                }
75772            }
75773            
75774            LonghandId::Zoom => {
75775                let value = match property_id {
75776                    LonghandId::Zoom => self.clone_zoom(),
75777                    _ => unsafe { debug_unreachable!() },
75778                };
75779                if let Some(c) = context {
75780                    value.to_resolved_value(c).to_css(&mut dest)
75781                } else {
75782                    value.to_css(&mut dest)
75783                }
75784            }
75785            
75786            LonghandId::FlexGrow |
75787LonghandId::FlexShrink => {
75788                let value = match property_id {
75789                    LonghandId::FlexGrow => self.clone_flex_grow(),
75790                    LonghandId::FlexShrink => self.clone_flex_shrink(),
75791                    _ => unsafe { debug_unreachable!() },
75792                };
75793                if let Some(c) = context {
75794                    value.to_resolved_value(c).to_css(&mut dest)
75795                } else {
75796                    value.to_css(&mut dest)
75797                }
75798            }
75799            
75800            LonghandId::OverflowBlock |
75801LonghandId::OverflowInline |
75802LonghandId::OverflowX |
75803LonghandId::OverflowY => {
75804                let value = match property_id {
75805                    LonghandId::OverflowX => self.clone_overflow_x(),
75806                    LonghandId::OverflowY => self.clone_overflow_y(),
75807                    _ => unsafe { debug_unreachable!() },
75808                };
75809                if let Some(c) = context {
75810                    value.to_resolved_value(c).to_css(&mut dest)
75811                } else {
75812                    value.to_css(&mut dest)
75813                }
75814            }
75815            
75816            LonghandId::BorderBlockEndStyle |
75817LonghandId::BorderBlockStartStyle |
75818LonghandId::BorderBottomStyle |
75819LonghandId::BorderInlineEndStyle |
75820LonghandId::BorderInlineStartStyle |
75821LonghandId::BorderLeftStyle |
75822LonghandId::BorderRightStyle |
75823LonghandId::BorderTopStyle => {
75824                let value = match property_id {
75825                    LonghandId::BorderBottomStyle => self.clone_border_bottom_style(),
75826                    LonghandId::BorderLeftStyle => self.clone_border_left_style(),
75827                    LonghandId::BorderRightStyle => self.clone_border_right_style(),
75828                    LonghandId::BorderTopStyle => self.clone_border_top_style(),
75829                    _ => unsafe { debug_unreachable!() },
75830                };
75831                if let Some(c) = context {
75832                    value.to_resolved_value(c).to_css(&mut dest)
75833                } else {
75834                    value.to_css(&mut dest)
75835                }
75836            }
75837            
75838            LonghandId::AnimationComposition => {
75839                let value = match property_id {
75840                    LonghandId::AnimationComposition => self.clone_animation_composition(),
75841                    _ => unsafe { debug_unreachable!() },
75842                };
75843                if let Some(c) = context {
75844                    value.to_resolved_value(c).to_css(&mut dest)
75845                } else {
75846                    value.to_css(&mut dest)
75847                }
75848            }
75849            
75850            LonghandId::AnimationDelay => {
75851                let value = match property_id {
75852                    LonghandId::AnimationDelay => self.clone_animation_delay(),
75853                    _ => unsafe { debug_unreachable!() },
75854                };
75855                if let Some(c) = context {
75856                    value.to_resolved_value(c).to_css(&mut dest)
75857                } else {
75858                    value.to_css(&mut dest)
75859                }
75860            }
75861            
75862            LonghandId::AnimationDirection => {
75863                let value = match property_id {
75864                    LonghandId::AnimationDirection => self.clone_animation_direction(),
75865                    _ => unsafe { debug_unreachable!() },
75866                };
75867                if let Some(c) = context {
75868                    value.to_resolved_value(c).to_css(&mut dest)
75869                } else {
75870                    value.to_css(&mut dest)
75871                }
75872            }
75873            
75874            LonghandId::AnimationDuration => {
75875                let value = match property_id {
75876                    LonghandId::AnimationDuration => self.clone_animation_duration(),
75877                    _ => unsafe { debug_unreachable!() },
75878                };
75879                if let Some(c) = context {
75880                    value.to_resolved_value(c).to_css(&mut dest)
75881                } else {
75882                    value.to_css(&mut dest)
75883                }
75884            }
75885            
75886            LonghandId::AnimationFillMode => {
75887                let value = match property_id {
75888                    LonghandId::AnimationFillMode => self.clone_animation_fill_mode(),
75889                    _ => unsafe { debug_unreachable!() },
75890                };
75891                if let Some(c) = context {
75892                    value.to_resolved_value(c).to_css(&mut dest)
75893                } else {
75894                    value.to_css(&mut dest)
75895                }
75896            }
75897            
75898            LonghandId::AnimationIterationCount => {
75899                let value = match property_id {
75900                    LonghandId::AnimationIterationCount => self.clone_animation_iteration_count(),
75901                    _ => unsafe { debug_unreachable!() },
75902                };
75903                if let Some(c) = context {
75904                    value.to_resolved_value(c).to_css(&mut dest)
75905                } else {
75906                    value.to_css(&mut dest)
75907                }
75908            }
75909            
75910            LonghandId::AnimationName => {
75911                let value = match property_id {
75912                    LonghandId::AnimationName => self.clone_animation_name(),
75913                    _ => unsafe { debug_unreachable!() },
75914                };
75915                if let Some(c) = context {
75916                    value.to_resolved_value(c).to_css(&mut dest)
75917                } else {
75918                    value.to_css(&mut dest)
75919                }
75920            }
75921            
75922            LonghandId::AnimationPlayState => {
75923                let value = match property_id {
75924                    LonghandId::AnimationPlayState => self.clone_animation_play_state(),
75925                    _ => unsafe { debug_unreachable!() },
75926                };
75927                if let Some(c) = context {
75928                    value.to_resolved_value(c).to_css(&mut dest)
75929                } else {
75930                    value.to_css(&mut dest)
75931                }
75932            }
75933            
75934            LonghandId::AnimationTimeline => {
75935                let value = match property_id {
75936                    LonghandId::AnimationTimeline => self.clone_animation_timeline(),
75937                    _ => unsafe { debug_unreachable!() },
75938                };
75939                if let Some(c) = context {
75940                    value.to_resolved_value(c).to_css(&mut dest)
75941                } else {
75942                    value.to_css(&mut dest)
75943                }
75944            }
75945            
75946            LonghandId::AnimationTimingFunction => {
75947                let value = match property_id {
75948                    LonghandId::AnimationTimingFunction => self.clone_animation_timing_function(),
75949                    _ => unsafe { debug_unreachable!() },
75950                };
75951                if let Some(c) = context {
75952                    value.to_resolved_value(c).to_css(&mut dest)
75953                } else {
75954                    value.to_css(&mut dest)
75955                }
75956            }
75957            
75958            LonghandId::BackdropFilter => {
75959                let value = match property_id {
75960                    LonghandId::BackdropFilter => self.clone_backdrop_filter(),
75961                    _ => unsafe { debug_unreachable!() },
75962                };
75963                if let Some(c) = context {
75964                    value.to_resolved_value(c).to_css(&mut dest)
75965                } else {
75966                    value.to_css(&mut dest)
75967                }
75968            }
75969            
75970            LonghandId::BackgroundAttachment => {
75971                let value = match property_id {
75972                    LonghandId::BackgroundAttachment => self.clone_background_attachment(),
75973                    _ => unsafe { debug_unreachable!() },
75974                };
75975                if let Some(c) = context {
75976                    value.to_resolved_value(c).to_css(&mut dest)
75977                } else {
75978                    value.to_css(&mut dest)
75979                }
75980            }
75981            
75982            LonghandId::BackgroundClip => {
75983                let value = match property_id {
75984                    LonghandId::BackgroundClip => self.clone_background_clip(),
75985                    _ => unsafe { debug_unreachable!() },
75986                };
75987                if let Some(c) = context {
75988                    value.to_resolved_value(c).to_css(&mut dest)
75989                } else {
75990                    value.to_css(&mut dest)
75991                }
75992            }
75993            
75994            LonghandId::BackgroundImage => {
75995                let value = match property_id {
75996                    LonghandId::BackgroundImage => self.clone_background_image(),
75997                    _ => unsafe { debug_unreachable!() },
75998                };
75999                if let Some(c) = context {
76000                    value.to_resolved_value(c).to_css(&mut dest)
76001                } else {
76002                    value.to_css(&mut dest)
76003                }
76004            }
76005            
76006            LonghandId::BackgroundOrigin => {
76007                let value = match property_id {
76008                    LonghandId::BackgroundOrigin => self.clone_background_origin(),
76009                    _ => unsafe { debug_unreachable!() },
76010                };
76011                if let Some(c) = context {
76012                    value.to_resolved_value(c).to_css(&mut dest)
76013                } else {
76014                    value.to_css(&mut dest)
76015                }
76016            }
76017            
76018            LonghandId::BackgroundPositionX => {
76019                let value = match property_id {
76020                    LonghandId::BackgroundPositionX => self.clone_background_position_x(),
76021                    _ => unsafe { debug_unreachable!() },
76022                };
76023                if let Some(c) = context {
76024                    value.to_resolved_value(c).to_css(&mut dest)
76025                } else {
76026                    value.to_css(&mut dest)
76027                }
76028            }
76029            
76030            LonghandId::BackgroundPositionY => {
76031                let value = match property_id {
76032                    LonghandId::BackgroundPositionY => self.clone_background_position_y(),
76033                    _ => unsafe { debug_unreachable!() },
76034                };
76035                if let Some(c) = context {
76036                    value.to_resolved_value(c).to_css(&mut dest)
76037                } else {
76038                    value.to_css(&mut dest)
76039                }
76040            }
76041            
76042            LonghandId::BackgroundRepeat => {
76043                let value = match property_id {
76044                    LonghandId::BackgroundRepeat => self.clone_background_repeat(),
76045                    _ => unsafe { debug_unreachable!() },
76046                };
76047                if let Some(c) = context {
76048                    value.to_resolved_value(c).to_css(&mut dest)
76049                } else {
76050                    value.to_css(&mut dest)
76051                }
76052            }
76053            
76054            LonghandId::BackgroundSize => {
76055                let value = match property_id {
76056                    LonghandId::BackgroundSize => self.clone_background_size(),
76057                    _ => unsafe { debug_unreachable!() },
76058                };
76059                if let Some(c) = context {
76060                    value.to_resolved_value(c).to_css(&mut dest)
76061                } else {
76062                    value.to_css(&mut dest)
76063                }
76064            }
76065            
76066            LonghandId::BorderImageOutset => {
76067                let value = match property_id {
76068                    LonghandId::BorderImageOutset => self.clone_border_image_outset(),
76069                    _ => unsafe { debug_unreachable!() },
76070                };
76071                if let Some(c) = context {
76072                    value.to_resolved_value(c).to_css(&mut dest)
76073                } else {
76074                    value.to_css(&mut dest)
76075                }
76076            }
76077            
76078            LonghandId::BorderImageSlice => {
76079                let value = match property_id {
76080                    LonghandId::BorderImageSlice => self.clone_border_image_slice(),
76081                    _ => unsafe { debug_unreachable!() },
76082                };
76083                if let Some(c) = context {
76084                    value.to_resolved_value(c).to_css(&mut dest)
76085                } else {
76086                    value.to_css(&mut dest)
76087                }
76088            }
76089            
76090            LonghandId::BorderImageWidth => {
76091                let value = match property_id {
76092                    LonghandId::BorderImageWidth => self.clone_border_image_width(),
76093                    _ => unsafe { debug_unreachable!() },
76094                };
76095                if let Some(c) = context {
76096                    value.to_resolved_value(c).to_css(&mut dest)
76097                } else {
76098                    value.to_css(&mut dest)
76099                }
76100            }
76101            
76102            LonghandId::BorderSpacing => {
76103                let value = match property_id {
76104                    LonghandId::BorderSpacing => self.clone_border_spacing(),
76105                    _ => unsafe { debug_unreachable!() },
76106                };
76107                if let Some(c) = context {
76108                    value.to_resolved_value(c).to_css(&mut dest)
76109                } else {
76110                    value.to_css(&mut dest)
76111                }
76112            }
76113            
76114            LonghandId::BoxShadow => {
76115                let value = match property_id {
76116                    LonghandId::BoxShadow => self.clone_box_shadow(),
76117                    _ => unsafe { debug_unreachable!() },
76118                };
76119                if let Some(c) = context {
76120                    value.to_resolved_value(c).to_css(&mut dest)
76121                } else {
76122                    value.to_css(&mut dest)
76123                }
76124            }
76125            
76126            LonghandId::Clip => {
76127                let value = match property_id {
76128                    LonghandId::Clip => self.clone_clip(),
76129                    _ => unsafe { debug_unreachable!() },
76130                };
76131                if let Some(c) = context {
76132                    value.to_resolved_value(c).to_css(&mut dest)
76133                } else {
76134                    value.to_css(&mut dest)
76135                }
76136            }
76137            
76138            LonghandId::ClipPath => {
76139                let value = match property_id {
76140                    LonghandId::ClipPath => self.clone_clip_path(),
76141                    _ => unsafe { debug_unreachable!() },
76142                };
76143                if let Some(c) = context {
76144                    value.to_resolved_value(c).to_css(&mut dest)
76145                } else {
76146                    value.to_css(&mut dest)
76147                }
76148            }
76149            
76150            LonghandId::Color => {
76151                let value = match property_id {
76152                    LonghandId::Color => self.clone_color(),
76153                    _ => unsafe { debug_unreachable!() },
76154                };
76155                if let Some(c) = context {
76156                    value.to_resolved_value(c).to_css(&mut dest)
76157                } else {
76158                    value.to_css(&mut dest)
76159                }
76160            }
76161            
76162            LonghandId::ColorScheme => {
76163                let value = match property_id {
76164                    LonghandId::ColorScheme => self.clone_color_scheme(),
76165                    _ => unsafe { debug_unreachable!() },
76166                };
76167                if let Some(c) = context {
76168                    value.to_resolved_value(c).to_css(&mut dest)
76169                } else {
76170                    value.to_css(&mut dest)
76171                }
76172            }
76173            
76174            LonghandId::ColumnWidth => {
76175                let value = match property_id {
76176                    LonghandId::ColumnWidth => self.clone_column_width(),
76177                    _ => unsafe { debug_unreachable!() },
76178                };
76179                if let Some(c) = context {
76180                    value.to_resolved_value(c).to_css(&mut dest)
76181                } else {
76182                    value.to_css(&mut dest)
76183                }
76184            }
76185            
76186            LonghandId::ContainerName => {
76187                let value = match property_id {
76188                    LonghandId::ContainerName => self.clone_container_name(),
76189                    _ => unsafe { debug_unreachable!() },
76190                };
76191                if let Some(c) = context {
76192                    value.to_resolved_value(c).to_css(&mut dest)
76193                } else {
76194                    value.to_css(&mut dest)
76195                }
76196            }
76197            
76198            LonghandId::Content => {
76199                let value = match property_id {
76200                    LonghandId::Content => self.clone_content(),
76201                    _ => unsafe { debug_unreachable!() },
76202                };
76203                if let Some(c) = context {
76204                    value.to_resolved_value(c).to_css(&mut dest)
76205                } else {
76206                    value.to_css(&mut dest)
76207                }
76208            }
76209            
76210            LonghandId::CounterIncrement => {
76211                let value = match property_id {
76212                    LonghandId::CounterIncrement => self.clone_counter_increment(),
76213                    _ => unsafe { debug_unreachable!() },
76214                };
76215                if let Some(c) = context {
76216                    value.to_resolved_value(c).to_css(&mut dest)
76217                } else {
76218                    value.to_css(&mut dest)
76219                }
76220            }
76221            
76222            LonghandId::CounterReset => {
76223                let value = match property_id {
76224                    LonghandId::CounterReset => self.clone_counter_reset(),
76225                    _ => unsafe { debug_unreachable!() },
76226                };
76227                if let Some(c) = context {
76228                    value.to_resolved_value(c).to_css(&mut dest)
76229                } else {
76230                    value.to_css(&mut dest)
76231                }
76232            }
76233            
76234            LonghandId::Cursor => {
76235                let value = match property_id {
76236                    LonghandId::Cursor => self.clone_cursor(),
76237                    _ => unsafe { debug_unreachable!() },
76238                };
76239                if let Some(c) = context {
76240                    value.to_resolved_value(c).to_css(&mut dest)
76241                } else {
76242                    value.to_css(&mut dest)
76243                }
76244            }
76245            
76246            LonghandId::Filter => {
76247                let value = match property_id {
76248                    LonghandId::Filter => self.clone_filter(),
76249                    _ => unsafe { debug_unreachable!() },
76250                };
76251                if let Some(c) = context {
76252                    value.to_resolved_value(c).to_css(&mut dest)
76253                } else {
76254                    value.to_css(&mut dest)
76255                }
76256            }
76257            
76258            LonghandId::FlexBasis => {
76259                let value = match property_id {
76260                    LonghandId::FlexBasis => self.clone_flex_basis(),
76261                    _ => unsafe { debug_unreachable!() },
76262                };
76263                if let Some(c) = context {
76264                    value.to_resolved_value(c).to_css(&mut dest)
76265                } else {
76266                    value.to_css(&mut dest)
76267                }
76268            }
76269            
76270            LonghandId::FontFamily => {
76271                let value = match property_id {
76272                    LonghandId::FontFamily => self.clone_font_family(),
76273                    _ => unsafe { debug_unreachable!() },
76274                };
76275                if let Some(c) = context {
76276                    value.to_resolved_value(c).to_css(&mut dest)
76277                } else {
76278                    value.to_css(&mut dest)
76279                }
76280            }
76281            
76282            LonghandId::FontSize => {
76283                let value = match property_id {
76284                    LonghandId::FontSize => self.clone_font_size(),
76285                    _ => unsafe { debug_unreachable!() },
76286                };
76287                if let Some(c) = context {
76288                    value.to_resolved_value(c).to_css(&mut dest)
76289                } else {
76290                    value.to_css(&mut dest)
76291                }
76292            }
76293            
76294            LonghandId::FontVariationSettings => {
76295                let value = match property_id {
76296                    LonghandId::FontVariationSettings => self.clone_font_variation_settings(),
76297                    _ => unsafe { debug_unreachable!() },
76298                };
76299                if let Some(c) = context {
76300                    value.to_resolved_value(c).to_css(&mut dest)
76301                } else {
76302                    value.to_css(&mut dest)
76303                }
76304            }
76305            
76306            LonghandId::GridTemplateAreas => {
76307                let value = match property_id {
76308                    LonghandId::GridTemplateAreas => self.clone_grid_template_areas(),
76309                    _ => unsafe { debug_unreachable!() },
76310                };
76311                if let Some(c) = context {
76312                    value.to_resolved_value(c).to_css(&mut dest)
76313                } else {
76314                    value.to_css(&mut dest)
76315                }
76316            }
76317            
76318            LonghandId::LetterSpacing => {
76319                let value = match property_id {
76320                    LonghandId::LetterSpacing => self.clone_letter_spacing(),
76321                    _ => unsafe { debug_unreachable!() },
76322                };
76323                if let Some(c) = context {
76324                    value.to_resolved_value(c).to_css(&mut dest)
76325                } else {
76326                    value.to_css(&mut dest)
76327                }
76328            }
76329            
76330            LonghandId::LineHeight => {
76331                let value = match property_id {
76332                    LonghandId::LineHeight => self.clone_line_height(),
76333                    _ => unsafe { debug_unreachable!() },
76334                };
76335                if let Some(c) = context {
76336                    value.to_resolved_value(c).to_css(&mut dest)
76337                } else {
76338                    value.to_css(&mut dest)
76339                }
76340            }
76341            
76342            LonghandId::MaskImage => {
76343                let value = match property_id {
76344                    LonghandId::MaskImage => self.clone_mask_image(),
76345                    _ => unsafe { debug_unreachable!() },
76346                };
76347                if let Some(c) = context {
76348                    value.to_resolved_value(c).to_css(&mut dest)
76349                } else {
76350                    value.to_css(&mut dest)
76351                }
76352            }
76353            
76354            LonghandId::OffsetPath => {
76355                let value = match property_id {
76356                    LonghandId::OffsetPath => self.clone_offset_path(),
76357                    _ => unsafe { debug_unreachable!() },
76358                };
76359                if let Some(c) = context {
76360                    value.to_resolved_value(c).to_css(&mut dest)
76361                } else {
76362                    value.to_css(&mut dest)
76363                }
76364            }
76365            
76366            LonghandId::Perspective => {
76367                let value = match property_id {
76368                    LonghandId::Perspective => self.clone_perspective(),
76369                    _ => unsafe { debug_unreachable!() },
76370                };
76371                if let Some(c) = context {
76372                    value.to_resolved_value(c).to_css(&mut dest)
76373                } else {
76374                    value.to_css(&mut dest)
76375                }
76376            }
76377            
76378            LonghandId::Quotes => {
76379                let value = match property_id {
76380                    LonghandId::Quotes => self.clone_quotes(),
76381                    _ => unsafe { debug_unreachable!() },
76382                };
76383                if let Some(c) = context {
76384                    value.to_resolved_value(c).to_css(&mut dest)
76385                } else {
76386                    value.to_css(&mut dest)
76387                }
76388            }
76389            
76390            LonghandId::Rotate => {
76391                let value = match property_id {
76392                    LonghandId::Rotate => self.clone_rotate(),
76393                    _ => unsafe { debug_unreachable!() },
76394                };
76395                if let Some(c) = context {
76396                    value.to_resolved_value(c).to_css(&mut dest)
76397                } else {
76398                    value.to_css(&mut dest)
76399                }
76400            }
76401            
76402            LonghandId::Scale => {
76403                let value = match property_id {
76404                    LonghandId::Scale => self.clone_scale(),
76405                    _ => unsafe { debug_unreachable!() },
76406                };
76407                if let Some(c) = context {
76408                    value.to_resolved_value(c).to_css(&mut dest)
76409                } else {
76410                    value.to_css(&mut dest)
76411                }
76412            }
76413            
76414            LonghandId::TextIndent => {
76415                let value = match property_id {
76416                    LonghandId::TextIndent => self.clone_text_indent(),
76417                    _ => unsafe { debug_unreachable!() },
76418                };
76419                if let Some(c) = context {
76420                    value.to_resolved_value(c).to_css(&mut dest)
76421                } else {
76422                    value.to_css(&mut dest)
76423                }
76424            }
76425            
76426            LonghandId::TextOverflow => {
76427                let value = match property_id {
76428                    LonghandId::TextOverflow => self.clone_text_overflow(),
76429                    _ => unsafe { debug_unreachable!() },
76430                };
76431                if let Some(c) = context {
76432                    value.to_resolved_value(c).to_css(&mut dest)
76433                } else {
76434                    value.to_css(&mut dest)
76435                }
76436            }
76437            
76438            LonghandId::TextShadow => {
76439                let value = match property_id {
76440                    LonghandId::TextShadow => self.clone_text_shadow(),
76441                    _ => unsafe { debug_unreachable!() },
76442                };
76443                if let Some(c) = context {
76444                    value.to_resolved_value(c).to_css(&mut dest)
76445                } else {
76446                    value.to_css(&mut dest)
76447                }
76448            }
76449            
76450            LonghandId::Transform => {
76451                let value = match property_id {
76452                    LonghandId::Transform => self.clone_transform(),
76453                    _ => unsafe { debug_unreachable!() },
76454                };
76455                if let Some(c) = context {
76456                    value.to_resolved_value(c).to_css(&mut dest)
76457                } else {
76458                    value.to_css(&mut dest)
76459                }
76460            }
76461            
76462            LonghandId::TransformOrigin => {
76463                let value = match property_id {
76464                    LonghandId::TransformOrigin => self.clone_transform_origin(),
76465                    _ => unsafe { debug_unreachable!() },
76466                };
76467                if let Some(c) = context {
76468                    value.to_resolved_value(c).to_css(&mut dest)
76469                } else {
76470                    value.to_css(&mut dest)
76471                }
76472            }
76473            
76474            LonghandId::TransitionBehavior => {
76475                let value = match property_id {
76476                    LonghandId::TransitionBehavior => self.clone_transition_behavior(),
76477                    _ => unsafe { debug_unreachable!() },
76478                };
76479                if let Some(c) = context {
76480                    value.to_resolved_value(c).to_css(&mut dest)
76481                } else {
76482                    value.to_css(&mut dest)
76483                }
76484            }
76485            
76486            LonghandId::TransitionDelay => {
76487                let value = match property_id {
76488                    LonghandId::TransitionDelay => self.clone_transition_delay(),
76489                    _ => unsafe { debug_unreachable!() },
76490                };
76491                if let Some(c) = context {
76492                    value.to_resolved_value(c).to_css(&mut dest)
76493                } else {
76494                    value.to_css(&mut dest)
76495                }
76496            }
76497            
76498            LonghandId::TransitionDuration => {
76499                let value = match property_id {
76500                    LonghandId::TransitionDuration => self.clone_transition_duration(),
76501                    _ => unsafe { debug_unreachable!() },
76502                };
76503                if let Some(c) = context {
76504                    value.to_resolved_value(c).to_css(&mut dest)
76505                } else {
76506                    value.to_css(&mut dest)
76507                }
76508            }
76509            
76510            LonghandId::TransitionProperty => {
76511                let value = match property_id {
76512                    LonghandId::TransitionProperty => self.clone_transition_property(),
76513                    _ => unsafe { debug_unreachable!() },
76514                };
76515                if let Some(c) = context {
76516                    value.to_resolved_value(c).to_css(&mut dest)
76517                } else {
76518                    value.to_css(&mut dest)
76519                }
76520            }
76521            
76522            LonghandId::TransitionTimingFunction => {
76523                let value = match property_id {
76524                    LonghandId::TransitionTimingFunction => self.clone_transition_timing_function(),
76525                    _ => unsafe { debug_unreachable!() },
76526                };
76527                if let Some(c) = context {
76528                    value.to_resolved_value(c).to_css(&mut dest)
76529                } else {
76530                    value.to_css(&mut dest)
76531                }
76532            }
76533            
76534            LonghandId::Translate => {
76535                let value = match property_id {
76536                    LonghandId::Translate => self.clone_translate(),
76537                    _ => unsafe { debug_unreachable!() },
76538                };
76539                if let Some(c) = context {
76540                    value.to_resolved_value(c).to_css(&mut dest)
76541                } else {
76542                    value.to_css(&mut dest)
76543                }
76544            }
76545            
76546            LonghandId::VerticalAlign => {
76547                let value = match property_id {
76548                    LonghandId::VerticalAlign => self.clone_vertical_align(),
76549                    _ => unsafe { debug_unreachable!() },
76550                };
76551                if let Some(c) = context {
76552                    value.to_resolved_value(c).to_css(&mut dest)
76553                } else {
76554                    value.to_css(&mut dest)
76555                }
76556            }
76557            
76558            LonghandId::ViewTransitionClass => {
76559                let value = match property_id {
76560                    LonghandId::ViewTransitionClass => self.clone_view_transition_class(),
76561                    _ => unsafe { debug_unreachable!() },
76562                };
76563                if let Some(c) = context {
76564                    value.to_resolved_value(c).to_css(&mut dest)
76565                } else {
76566                    value.to_css(&mut dest)
76567                }
76568            }
76569            
76570            LonghandId::ViewTransitionName => {
76571                let value = match property_id {
76572                    LonghandId::ViewTransitionName => self.clone_view_transition_name(),
76573                    _ => unsafe { debug_unreachable!() },
76574                };
76575                if let Some(c) = context {
76576                    value.to_resolved_value(c).to_css(&mut dest)
76577                } else {
76578                    value.to_css(&mut dest)
76579                }
76580            }
76581            
76582            LonghandId::WillChange => {
76583                let value = match property_id {
76584                    LonghandId::WillChange => self.clone_will_change(),
76585                    _ => unsafe { debug_unreachable!() },
76586                };
76587                if let Some(c) = context {
76588                    value.to_resolved_value(c).to_css(&mut dest)
76589                } else {
76590                    value.to_css(&mut dest)
76591                }
76592            }
76593            
76594            LonghandId::WordSpacing => {
76595                let value = match property_id {
76596                    LonghandId::WordSpacing => self.clone_word_spacing(),
76597                    _ => unsafe { debug_unreachable!() },
76598                };
76599                if let Some(c) = context {
76600                    value.to_resolved_value(c).to_css(&mut dest)
76601                } else {
76602                    value.to_css(&mut dest)
76603                }
76604            }
76605            
76606            LonghandId::XLang => {
76607                let value = match property_id {
76608                    LonghandId::XLang => self.clone__x_lang(),
76609                    _ => unsafe { debug_unreachable!() },
76610                };
76611                if let Some(c) = context {
76612                    value.to_resolved_value(c).to_css(&mut dest)
76613                } else {
76614                    value.to_css(&mut dest)
76615                }
76616            }
76617            
76618            LonghandId::ObjectPosition |
76619LonghandId::PerspectiveOrigin => {
76620                let value = match property_id {
76621                    LonghandId::ObjectPosition => self.clone_object_position(),
76622                    LonghandId::PerspectiveOrigin => self.clone_perspective_origin(),
76623                    _ => unsafe { debug_unreachable!() },
76624                };
76625                if let Some(c) = context {
76626                    value.to_resolved_value(c).to_css(&mut dest)
76627                } else {
76628                    value.to_css(&mut dest)
76629                }
76630            }
76631            
76632            LonghandId::GridTemplateColumns |
76633LonghandId::GridTemplateRows => {
76634                let value = match property_id {
76635                    LonghandId::GridTemplateColumns => self.clone_grid_template_columns(),
76636                    LonghandId::GridTemplateRows => self.clone_grid_template_rows(),
76637                    _ => unsafe { debug_unreachable!() },
76638                };
76639                if let Some(c) = context {
76640                    value.to_resolved_value(c).to_css(&mut dest)
76641                } else {
76642                    value.to_css(&mut dest)
76643                }
76644            }
76645            
76646            LonghandId::BorderImageSource |
76647LonghandId::ListStyleImage => {
76648                let value = match property_id {
76649                    LonghandId::BorderImageSource => self.clone_border_image_source(),
76650                    LonghandId::ListStyleImage => self.clone_list_style_image(),
76651                    _ => unsafe { debug_unreachable!() },
76652                };
76653                if let Some(c) = context {
76654                    value.to_resolved_value(c).to_css(&mut dest)
76655                } else {
76656                    value.to_css(&mut dest)
76657                }
76658            }
76659            
76660            LonghandId::GridAutoColumns |
76661LonghandId::GridAutoRows => {
76662                let value = match property_id {
76663                    LonghandId::GridAutoColumns => self.clone_grid_auto_columns(),
76664                    LonghandId::GridAutoRows => self.clone_grid_auto_rows(),
76665                    _ => unsafe { debug_unreachable!() },
76666                };
76667                if let Some(c) = context {
76668                    value.to_resolved_value(c).to_css(&mut dest)
76669                } else {
76670                    value.to_css(&mut dest)
76671                }
76672            }
76673            
76674            LonghandId::OutlineOffset |
76675LonghandId::OverflowClipMargin => {
76676                let value = match property_id {
76677                    LonghandId::OutlineOffset => self.clone_outline_offset(),
76678                    LonghandId::OverflowClipMargin => self.clone_overflow_clip_margin(),
76679                    _ => unsafe { debug_unreachable!() },
76680                };
76681                if let Some(c) = context {
76682                    value.to_resolved_value(c).to_css(&mut dest)
76683                } else {
76684                    value.to_css(&mut dest)
76685                }
76686            }
76687            
76688            LonghandId::ColumnGap |
76689LonghandId::RowGap => {
76690                let value = match property_id {
76691                    LonghandId::ColumnGap => self.clone_column_gap(),
76692                    LonghandId::RowGap => self.clone_row_gap(),
76693                    _ => unsafe { debug_unreachable!() },
76694                };
76695                if let Some(c) = context {
76696                    value.to_resolved_value(c).to_css(&mut dest)
76697                } else {
76698                    value.to_css(&mut dest)
76699                }
76700            }
76701            
76702            LonghandId::GridColumnEnd |
76703LonghandId::GridColumnStart |
76704LonghandId::GridRowEnd |
76705LonghandId::GridRowStart => {
76706                let value = match property_id {
76707                    LonghandId::GridColumnEnd => self.clone_grid_column_end(),
76708                    LonghandId::GridColumnStart => self.clone_grid_column_start(),
76709                    LonghandId::GridRowEnd => self.clone_grid_row_end(),
76710                    LonghandId::GridRowStart => self.clone_grid_row_start(),
76711                    _ => unsafe { debug_unreachable!() },
76712                };
76713                if let Some(c) = context {
76714                    value.to_resolved_value(c).to_css(&mut dest)
76715                } else {
76716                    value.to_css(&mut dest)
76717                }
76718            }
76719            
76720            LonghandId::MaxBlockSize |
76721LonghandId::MaxHeight |
76722LonghandId::MaxInlineSize |
76723LonghandId::MaxWidth => {
76724                let value = match property_id {
76725                    LonghandId::MaxHeight => self.clone_max_height(),
76726                    LonghandId::MaxWidth => self.clone_max_width(),
76727                    _ => unsafe { debug_unreachable!() },
76728                };
76729                if let Some(c) = context {
76730                    value.to_resolved_value(c).to_css(&mut dest)
76731                } else {
76732                    value.to_css(&mut dest)
76733                }
76734            }
76735            
76736            LonghandId::BorderBottomLeftRadius |
76737LonghandId::BorderBottomRightRadius |
76738LonghandId::BorderEndEndRadius |
76739LonghandId::BorderEndStartRadius |
76740LonghandId::BorderStartEndRadius |
76741LonghandId::BorderStartStartRadius |
76742LonghandId::BorderTopLeftRadius |
76743LonghandId::BorderTopRightRadius => {
76744                let value = match property_id {
76745                    LonghandId::BorderBottomLeftRadius => self.clone_border_bottom_left_radius(),
76746                    LonghandId::BorderBottomRightRadius => self.clone_border_bottom_right_radius(),
76747                    LonghandId::BorderTopLeftRadius => self.clone_border_top_left_radius(),
76748                    LonghandId::BorderTopRightRadius => self.clone_border_top_right_radius(),
76749                    _ => unsafe { debug_unreachable!() },
76750                };
76751                if let Some(c) = context {
76752                    value.to_resolved_value(c).to_css(&mut dest)
76753                } else {
76754                    value.to_css(&mut dest)
76755                }
76756            }
76757            
76758            LonghandId::Bottom |
76759LonghandId::InsetBlockEnd |
76760LonghandId::InsetBlockStart |
76761LonghandId::InsetInlineEnd |
76762LonghandId::InsetInlineStart |
76763LonghandId::Left |
76764LonghandId::Right |
76765LonghandId::Top => {
76766                let value = match property_id {
76767                    LonghandId::Bottom => self.clone_bottom(),
76768                    LonghandId::Left => self.clone_left(),
76769                    LonghandId::Right => self.clone_right(),
76770                    LonghandId::Top => self.clone_top(),
76771                    _ => unsafe { debug_unreachable!() },
76772                };
76773                if let Some(c) = context {
76774                    value.to_resolved_value(c).to_css(&mut dest)
76775                } else {
76776                    value.to_css(&mut dest)
76777                }
76778            }
76779            
76780            LonghandId::MarginBlockEnd |
76781LonghandId::MarginBlockStart |
76782LonghandId::MarginBottom |
76783LonghandId::MarginInlineEnd |
76784LonghandId::MarginInlineStart |
76785LonghandId::MarginLeft |
76786LonghandId::MarginRight |
76787LonghandId::MarginTop => {
76788                let value = match property_id {
76789                    LonghandId::MarginBottom => self.clone_margin_bottom(),
76790                    LonghandId::MarginLeft => self.clone_margin_left(),
76791                    LonghandId::MarginRight => self.clone_margin_right(),
76792                    LonghandId::MarginTop => self.clone_margin_top(),
76793                    _ => unsafe { debug_unreachable!() },
76794                };
76795                if let Some(c) = context {
76796                    value.to_resolved_value(c).to_css(&mut dest)
76797                } else {
76798                    value.to_css(&mut dest)
76799                }
76800            }
76801            
76802            LonghandId::PaddingBlockEnd |
76803LonghandId::PaddingBlockStart |
76804LonghandId::PaddingBottom |
76805LonghandId::PaddingInlineEnd |
76806LonghandId::PaddingInlineStart |
76807LonghandId::PaddingLeft |
76808LonghandId::PaddingRight |
76809LonghandId::PaddingTop => {
76810                let value = match property_id {
76811                    LonghandId::PaddingBottom => self.clone_padding_bottom(),
76812                    LonghandId::PaddingLeft => self.clone_padding_left(),
76813                    LonghandId::PaddingRight => self.clone_padding_right(),
76814                    LonghandId::PaddingTop => self.clone_padding_top(),
76815                    _ => unsafe { debug_unreachable!() },
76816                };
76817                if let Some(c) = context {
76818                    value.to_resolved_value(c).to_css(&mut dest)
76819                } else {
76820                    value.to_css(&mut dest)
76821                }
76822            }
76823            
76824            LonghandId::BlockSize |
76825LonghandId::Height |
76826LonghandId::InlineSize |
76827LonghandId::MinBlockSize |
76828LonghandId::MinHeight |
76829LonghandId::MinInlineSize |
76830LonghandId::MinWidth |
76831LonghandId::Width => {
76832                let value = match property_id {
76833                    LonghandId::Height => self.clone_height(),
76834                    LonghandId::MinHeight => self.clone_min_height(),
76835                    LonghandId::MinWidth => self.clone_min_width(),
76836                    LonghandId::Width => self.clone_width(),
76837                    _ => unsafe { debug_unreachable!() },
76838                };
76839                if let Some(c) = context {
76840                    value.to_resolved_value(c).to_css(&mut dest)
76841                } else {
76842                    value.to_css(&mut dest)
76843                }
76844            }
76845            
76846            LonghandId::BorderBlockEndWidth |
76847LonghandId::BorderBlockStartWidth |
76848LonghandId::BorderBottomWidth |
76849LonghandId::BorderInlineEndWidth |
76850LonghandId::BorderInlineStartWidth |
76851LonghandId::BorderLeftWidth |
76852LonghandId::BorderRightWidth |
76853LonghandId::BorderTopWidth |
76854LonghandId::OutlineWidth => {
76855                let value = match property_id {
76856                    LonghandId::BorderBottomWidth => self.clone_border_bottom_width(),
76857                    LonghandId::BorderLeftWidth => self.clone_border_left_width(),
76858                    LonghandId::BorderRightWidth => self.clone_border_right_width(),
76859                    LonghandId::BorderTopWidth => self.clone_border_top_width(),
76860                    LonghandId::OutlineWidth => self.clone_outline_width(),
76861                    _ => unsafe { debug_unreachable!() },
76862                };
76863                if let Some(c) = context {
76864                    value.to_resolved_value(c).to_css(&mut dest)
76865                } else {
76866                    value.to_css(&mut dest)
76867                }
76868            }
76869            
76870            LonghandId::BackgroundColor |
76871LonghandId::BorderBlockEndColor |
76872LonghandId::BorderBlockStartColor |
76873LonghandId::BorderBottomColor |
76874LonghandId::BorderInlineEndColor |
76875LonghandId::BorderInlineStartColor |
76876LonghandId::BorderLeftColor |
76877LonghandId::BorderRightColor |
76878LonghandId::BorderTopColor |
76879LonghandId::OutlineColor |
76880LonghandId::TextDecorationColor => {
76881                let value = match property_id {
76882                    LonghandId::BackgroundColor => self.clone_background_color(),
76883                    LonghandId::BorderBottomColor => self.clone_border_bottom_color(),
76884                    LonghandId::BorderLeftColor => self.clone_border_left_color(),
76885                    LonghandId::BorderRightColor => self.clone_border_right_color(),
76886                    LonghandId::BorderTopColor => self.clone_border_top_color(),
76887                    LonghandId::OutlineColor => self.clone_outline_color(),
76888                    LonghandId::TextDecorationColor => self.clone_text_decoration_color(),
76889                    _ => unsafe { debug_unreachable!() },
76890                };
76891                if let Some(c) = context {
76892                    value.to_resolved_value(c).to_css(&mut dest)
76893                } else {
76894                    value.to_css(&mut dest)
76895                }
76896            }
76897        }
76898    }
76899
76900    /// Returns the given longhand's resolved value as a property declaration.
76901    pub fn computed_or_resolved_declaration(
76902        &self,
76903        property_id: LonghandId,
76904        context: Option<&resolved::Context>,
76905    ) -> PropertyDeclaration {
76906        use crate::values::resolved::ToResolvedValue;
76907        use crate::values::computed::ToComputedValue;
76908        let physical_property_id = property_id.to_physical(self.writing_mode);
76909        match physical_property_id {
76910            
76911            LonghandId::AlignContent => {
76912                let mut computed_value = match physical_property_id {
76913                    LonghandId::AlignContent => self.clone_align_content(),
76914                    _ => unsafe { debug_unreachable!() },
76915                };
76916                if let Some(c) = context {
76917                    let resolved = computed_value.to_resolved_value(c);
76918                    computed_value = ToResolvedValue::from_resolved_value(resolved);
76919                }
76920                let specified = ToComputedValue::from_computed_value(&computed_value);
76921                PropertyDeclaration::AlignContent(specified)
76922            }
76923            
76924            LonghandId::AlignItems => {
76925                let mut computed_value = match physical_property_id {
76926                    LonghandId::AlignItems => self.clone_align_items(),
76927                    _ => unsafe { debug_unreachable!() },
76928                };
76929                if let Some(c) = context {
76930                    let resolved = computed_value.to_resolved_value(c);
76931                    computed_value = ToResolvedValue::from_resolved_value(resolved);
76932                }
76933                let specified = ToComputedValue::from_computed_value(&computed_value);
76934                PropertyDeclaration::AlignItems(specified)
76935            }
76936            
76937            LonghandId::AlignSelf => {
76938                let mut computed_value = match physical_property_id {
76939                    LonghandId::AlignSelf => self.clone_align_self(),
76940                    _ => unsafe { debug_unreachable!() },
76941                };
76942                if let Some(c) = context {
76943                    let resolved = computed_value.to_resolved_value(c);
76944                    computed_value = ToResolvedValue::from_resolved_value(resolved);
76945                }
76946                let specified = ToComputedValue::from_computed_value(&computed_value);
76947                PropertyDeclaration::AlignSelf(specified)
76948            }
76949            
76950            LonghandId::AspectRatio => {
76951                let mut computed_value = match physical_property_id {
76952                    LonghandId::AspectRatio => self.clone_aspect_ratio(),
76953                    _ => unsafe { debug_unreachable!() },
76954                };
76955                if let Some(c) = context {
76956                    let resolved = computed_value.to_resolved_value(c);
76957                    computed_value = ToResolvedValue::from_resolved_value(resolved);
76958                }
76959                let specified = ToComputedValue::from_computed_value(&computed_value);
76960                PropertyDeclaration::AspectRatio(specified)
76961            }
76962            
76963            LonghandId::BackfaceVisibility => {
76964                let mut computed_value = match physical_property_id {
76965                    LonghandId::BackfaceVisibility => self.clone_backface_visibility(),
76966                    _ => unsafe { debug_unreachable!() },
76967                };
76968                if let Some(c) = context {
76969                    let resolved = computed_value.to_resolved_value(c);
76970                    computed_value = ToResolvedValue::from_resolved_value(resolved);
76971                }
76972                let specified = ToComputedValue::from_computed_value(&computed_value);
76973                PropertyDeclaration::BackfaceVisibility(specified)
76974            }
76975            
76976            LonghandId::BaselineSource => {
76977                let mut computed_value = match physical_property_id {
76978                    LonghandId::BaselineSource => self.clone_baseline_source(),
76979                    _ => unsafe { debug_unreachable!() },
76980                };
76981                if let Some(c) = context {
76982                    let resolved = computed_value.to_resolved_value(c);
76983                    computed_value = ToResolvedValue::from_resolved_value(resolved);
76984                }
76985                let specified = ToComputedValue::from_computed_value(&computed_value);
76986                PropertyDeclaration::BaselineSource(specified)
76987            }
76988            
76989            LonghandId::BorderCollapse => {
76990                let mut computed_value = match physical_property_id {
76991                    LonghandId::BorderCollapse => self.clone_border_collapse(),
76992                    _ => unsafe { debug_unreachable!() },
76993                };
76994                if let Some(c) = context {
76995                    let resolved = computed_value.to_resolved_value(c);
76996                    computed_value = ToResolvedValue::from_resolved_value(resolved);
76997                }
76998                let specified = ToComputedValue::from_computed_value(&computed_value);
76999                PropertyDeclaration::BorderCollapse(specified)
77000            }
77001            
77002            LonghandId::BorderImageRepeat => {
77003                let mut computed_value = match physical_property_id {
77004                    LonghandId::BorderImageRepeat => self.clone_border_image_repeat(),
77005                    _ => unsafe { debug_unreachable!() },
77006                };
77007                if let Some(c) = context {
77008                    let resolved = computed_value.to_resolved_value(c);
77009                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77010                }
77011                let specified = ToComputedValue::from_computed_value(&computed_value);
77012                PropertyDeclaration::BorderImageRepeat(specified)
77013            }
77014            
77015            LonghandId::BoxSizing => {
77016                let mut computed_value = match physical_property_id {
77017                    LonghandId::BoxSizing => self.clone_box_sizing(),
77018                    _ => unsafe { debug_unreachable!() },
77019                };
77020                if let Some(c) = context {
77021                    let resolved = computed_value.to_resolved_value(c);
77022                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77023                }
77024                let specified = ToComputedValue::from_computed_value(&computed_value);
77025                PropertyDeclaration::BoxSizing(specified)
77026            }
77027            
77028            LonghandId::CaptionSide => {
77029                let mut computed_value = match physical_property_id {
77030                    LonghandId::CaptionSide => self.clone_caption_side(),
77031                    _ => unsafe { debug_unreachable!() },
77032                };
77033                if let Some(c) = context {
77034                    let resolved = computed_value.to_resolved_value(c);
77035                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77036                }
77037                let specified = ToComputedValue::from_computed_value(&computed_value);
77038                PropertyDeclaration::CaptionSide(specified)
77039            }
77040            
77041            LonghandId::Clear => {
77042                let mut computed_value = match physical_property_id {
77043                    LonghandId::Clear => self.clone_clear(),
77044                    _ => unsafe { debug_unreachable!() },
77045                };
77046                if let Some(c) = context {
77047                    let resolved = computed_value.to_resolved_value(c);
77048                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77049                }
77050                let specified = ToComputedValue::from_computed_value(&computed_value);
77051                PropertyDeclaration::Clear(specified)
77052            }
77053            
77054            LonghandId::ColumnCount => {
77055                let mut computed_value = match physical_property_id {
77056                    LonghandId::ColumnCount => self.clone_column_count(),
77057                    _ => unsafe { debug_unreachable!() },
77058                };
77059                if let Some(c) = context {
77060                    let resolved = computed_value.to_resolved_value(c);
77061                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77062                }
77063                let specified = ToComputedValue::from_computed_value(&computed_value);
77064                PropertyDeclaration::ColumnCount(specified)
77065            }
77066            
77067            LonghandId::ColumnSpan => {
77068                let mut computed_value = match physical_property_id {
77069                    LonghandId::ColumnSpan => self.clone_column_span(),
77070                    _ => unsafe { debug_unreachable!() },
77071                };
77072                if let Some(c) = context {
77073                    let resolved = computed_value.to_resolved_value(c);
77074                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77075                }
77076                let specified = ToComputedValue::from_computed_value(&computed_value);
77077                PropertyDeclaration::ColumnSpan(specified)
77078            }
77079            
77080            LonghandId::Contain => {
77081                let mut computed_value = match physical_property_id {
77082                    LonghandId::Contain => self.clone_contain(),
77083                    _ => unsafe { debug_unreachable!() },
77084                };
77085                if let Some(c) = context {
77086                    let resolved = computed_value.to_resolved_value(c);
77087                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77088                }
77089                let specified = ToComputedValue::from_computed_value(&computed_value);
77090                PropertyDeclaration::Contain(specified)
77091            }
77092            
77093            LonghandId::ContainerType => {
77094                let mut computed_value = match physical_property_id {
77095                    LonghandId::ContainerType => self.clone_container_type(),
77096                    _ => unsafe { debug_unreachable!() },
77097                };
77098                if let Some(c) = context {
77099                    let resolved = computed_value.to_resolved_value(c);
77100                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77101                }
77102                let specified = ToComputedValue::from_computed_value(&computed_value);
77103                PropertyDeclaration::ContainerType(specified)
77104            }
77105            
77106            LonghandId::Direction => {
77107                let mut computed_value = match physical_property_id {
77108                    LonghandId::Direction => self.clone_direction(),
77109                    _ => unsafe { debug_unreachable!() },
77110                };
77111                if let Some(c) = context {
77112                    let resolved = computed_value.to_resolved_value(c);
77113                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77114                }
77115                let specified = ToComputedValue::from_computed_value(&computed_value);
77116                PropertyDeclaration::Direction(specified)
77117            }
77118            
77119            LonghandId::Display => {
77120                let mut computed_value = match physical_property_id {
77121                    LonghandId::Display => self.clone_display(),
77122                    _ => unsafe { debug_unreachable!() },
77123                };
77124                if let Some(c) = context {
77125                    let resolved = computed_value.to_resolved_value(c);
77126                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77127                }
77128                let specified = ToComputedValue::from_computed_value(&computed_value);
77129                PropertyDeclaration::Display(specified)
77130            }
77131            
77132            LonghandId::EmptyCells => {
77133                let mut computed_value = match physical_property_id {
77134                    LonghandId::EmptyCells => self.clone_empty_cells(),
77135                    _ => unsafe { debug_unreachable!() },
77136                };
77137                if let Some(c) = context {
77138                    let resolved = computed_value.to_resolved_value(c);
77139                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77140                }
77141                let specified = ToComputedValue::from_computed_value(&computed_value);
77142                PropertyDeclaration::EmptyCells(specified)
77143            }
77144            
77145            LonghandId::FlexDirection => {
77146                let mut computed_value = match physical_property_id {
77147                    LonghandId::FlexDirection => self.clone_flex_direction(),
77148                    _ => unsafe { debug_unreachable!() },
77149                };
77150                if let Some(c) = context {
77151                    let resolved = computed_value.to_resolved_value(c);
77152                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77153                }
77154                let specified = ToComputedValue::from_computed_value(&computed_value);
77155                PropertyDeclaration::FlexDirection(specified)
77156            }
77157            
77158            LonghandId::FlexWrap => {
77159                let mut computed_value = match physical_property_id {
77160                    LonghandId::FlexWrap => self.clone_flex_wrap(),
77161                    _ => unsafe { debug_unreachable!() },
77162                };
77163                if let Some(c) = context {
77164                    let resolved = computed_value.to_resolved_value(c);
77165                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77166                }
77167                let specified = ToComputedValue::from_computed_value(&computed_value);
77168                PropertyDeclaration::FlexWrap(specified)
77169            }
77170            
77171            LonghandId::Float => {
77172                let mut computed_value = match physical_property_id {
77173                    LonghandId::Float => self.clone_float(),
77174                    _ => unsafe { debug_unreachable!() },
77175                };
77176                if let Some(c) = context {
77177                    let resolved = computed_value.to_resolved_value(c);
77178                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77179                }
77180                let specified = ToComputedValue::from_computed_value(&computed_value);
77181                PropertyDeclaration::Float(specified)
77182            }
77183            
77184            LonghandId::FontLanguageOverride => {
77185                let mut computed_value = match physical_property_id {
77186                    LonghandId::FontLanguageOverride => self.clone_font_language_override(),
77187                    _ => unsafe { debug_unreachable!() },
77188                };
77189                if let Some(c) = context {
77190                    let resolved = computed_value.to_resolved_value(c);
77191                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77192                }
77193                let specified = ToComputedValue::from_computed_value(&computed_value);
77194                PropertyDeclaration::FontLanguageOverride(specified)
77195            }
77196            
77197            LonghandId::FontStretch => {
77198                let mut computed_value = match physical_property_id {
77199                    LonghandId::FontStretch => self.clone_font_stretch(),
77200                    _ => unsafe { debug_unreachable!() },
77201                };
77202                if let Some(c) = context {
77203                    let resolved = computed_value.to_resolved_value(c);
77204                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77205                }
77206                let specified = ToComputedValue::from_computed_value(&computed_value);
77207                PropertyDeclaration::FontStretch(specified)
77208            }
77209            
77210            LonghandId::FontStyle => {
77211                let mut computed_value = match physical_property_id {
77212                    LonghandId::FontStyle => self.clone_font_style(),
77213                    _ => unsafe { debug_unreachable!() },
77214                };
77215                if let Some(c) = context {
77216                    let resolved = computed_value.to_resolved_value(c);
77217                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77218                }
77219                let specified = ToComputedValue::from_computed_value(&computed_value);
77220                PropertyDeclaration::FontStyle(specified)
77221            }
77222            
77223            LonghandId::FontVariantCaps => {
77224                let mut computed_value = match physical_property_id {
77225                    LonghandId::FontVariantCaps => self.clone_font_variant_caps(),
77226                    _ => unsafe { debug_unreachable!() },
77227                };
77228                if let Some(c) = context {
77229                    let resolved = computed_value.to_resolved_value(c);
77230                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77231                }
77232                let specified = ToComputedValue::from_computed_value(&computed_value);
77233                PropertyDeclaration::FontVariantCaps(specified)
77234            }
77235            
77236            LonghandId::FontWeight => {
77237                let mut computed_value = match physical_property_id {
77238                    LonghandId::FontWeight => self.clone_font_weight(),
77239                    _ => unsafe { debug_unreachable!() },
77240                };
77241                if let Some(c) = context {
77242                    let resolved = computed_value.to_resolved_value(c);
77243                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77244                }
77245                let specified = ToComputedValue::from_computed_value(&computed_value);
77246                PropertyDeclaration::FontWeight(specified)
77247            }
77248            
77249            LonghandId::GridAutoFlow => {
77250                let mut computed_value = match physical_property_id {
77251                    LonghandId::GridAutoFlow => self.clone_grid_auto_flow(),
77252                    _ => unsafe { debug_unreachable!() },
77253                };
77254                if let Some(c) = context {
77255                    let resolved = computed_value.to_resolved_value(c);
77256                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77257                }
77258                let specified = ToComputedValue::from_computed_value(&computed_value);
77259                PropertyDeclaration::GridAutoFlow(specified)
77260            }
77261            
77262            LonghandId::ImageRendering => {
77263                let mut computed_value = match physical_property_id {
77264                    LonghandId::ImageRendering => self.clone_image_rendering(),
77265                    _ => unsafe { debug_unreachable!() },
77266                };
77267                if let Some(c) = context {
77268                    let resolved = computed_value.to_resolved_value(c);
77269                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77270                }
77271                let specified = ToComputedValue::from_computed_value(&computed_value);
77272                PropertyDeclaration::ImageRendering(specified)
77273            }
77274            
77275            LonghandId::Isolation => {
77276                let mut computed_value = match physical_property_id {
77277                    LonghandId::Isolation => self.clone_isolation(),
77278                    _ => unsafe { debug_unreachable!() },
77279                };
77280                if let Some(c) = context {
77281                    let resolved = computed_value.to_resolved_value(c);
77282                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77283                }
77284                let specified = ToComputedValue::from_computed_value(&computed_value);
77285                PropertyDeclaration::Isolation(specified)
77286            }
77287            
77288            LonghandId::JustifyContent => {
77289                let mut computed_value = match physical_property_id {
77290                    LonghandId::JustifyContent => self.clone_justify_content(),
77291                    _ => unsafe { debug_unreachable!() },
77292                };
77293                if let Some(c) = context {
77294                    let resolved = computed_value.to_resolved_value(c);
77295                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77296                }
77297                let specified = ToComputedValue::from_computed_value(&computed_value);
77298                PropertyDeclaration::JustifyContent(specified)
77299            }
77300            
77301            LonghandId::JustifyItems => {
77302                let mut computed_value = match physical_property_id {
77303                    LonghandId::JustifyItems => self.clone_justify_items(),
77304                    _ => unsafe { debug_unreachable!() },
77305                };
77306                if let Some(c) = context {
77307                    let resolved = computed_value.to_resolved_value(c);
77308                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77309                }
77310                let specified = ToComputedValue::from_computed_value(&computed_value);
77311                PropertyDeclaration::JustifyItems(specified)
77312            }
77313            
77314            LonghandId::JustifySelf => {
77315                let mut computed_value = match physical_property_id {
77316                    LonghandId::JustifySelf => self.clone_justify_self(),
77317                    _ => unsafe { debug_unreachable!() },
77318                };
77319                if let Some(c) = context {
77320                    let resolved = computed_value.to_resolved_value(c);
77321                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77322                }
77323                let specified = ToComputedValue::from_computed_value(&computed_value);
77324                PropertyDeclaration::JustifySelf(specified)
77325            }
77326            
77327            LonghandId::ListStylePosition => {
77328                let mut computed_value = match physical_property_id {
77329                    LonghandId::ListStylePosition => self.clone_list_style_position(),
77330                    _ => unsafe { debug_unreachable!() },
77331                };
77332                if let Some(c) = context {
77333                    let resolved = computed_value.to_resolved_value(c);
77334                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77335                }
77336                let specified = ToComputedValue::from_computed_value(&computed_value);
77337                PropertyDeclaration::ListStylePosition(specified)
77338            }
77339            
77340            LonghandId::ListStyleType => {
77341                let mut computed_value = match physical_property_id {
77342                    LonghandId::ListStyleType => self.clone_list_style_type(),
77343                    _ => unsafe { debug_unreachable!() },
77344                };
77345                if let Some(c) = context {
77346                    let resolved = computed_value.to_resolved_value(c);
77347                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77348                }
77349                let specified = ToComputedValue::from_computed_value(&computed_value);
77350                PropertyDeclaration::ListStyleType(specified)
77351            }
77352            
77353            LonghandId::MixBlendMode => {
77354                let mut computed_value = match physical_property_id {
77355                    LonghandId::MixBlendMode => self.clone_mix_blend_mode(),
77356                    _ => unsafe { debug_unreachable!() },
77357                };
77358                if let Some(c) = context {
77359                    let resolved = computed_value.to_resolved_value(c);
77360                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77361                }
77362                let specified = ToComputedValue::from_computed_value(&computed_value);
77363                PropertyDeclaration::MixBlendMode(specified)
77364            }
77365            
77366            LonghandId::ObjectFit => {
77367                let mut computed_value = match physical_property_id {
77368                    LonghandId::ObjectFit => self.clone_object_fit(),
77369                    _ => unsafe { debug_unreachable!() },
77370                };
77371                if let Some(c) = context {
77372                    let resolved = computed_value.to_resolved_value(c);
77373                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77374                }
77375                let specified = ToComputedValue::from_computed_value(&computed_value);
77376                PropertyDeclaration::ObjectFit(specified)
77377            }
77378            
77379            LonghandId::Opacity => {
77380                let mut computed_value = match physical_property_id {
77381                    LonghandId::Opacity => self.clone_opacity(),
77382                    _ => unsafe { debug_unreachable!() },
77383                };
77384                if let Some(c) = context {
77385                    let resolved = computed_value.to_resolved_value(c);
77386                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77387                }
77388                let specified = ToComputedValue::from_computed_value(&computed_value);
77389                PropertyDeclaration::Opacity(specified)
77390            }
77391            
77392            LonghandId::Order => {
77393                let mut computed_value = match physical_property_id {
77394                    LonghandId::Order => self.clone_order(),
77395                    _ => unsafe { debug_unreachable!() },
77396                };
77397                if let Some(c) = context {
77398                    let resolved = computed_value.to_resolved_value(c);
77399                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77400                }
77401                let specified = ToComputedValue::from_computed_value(&computed_value);
77402                PropertyDeclaration::Order(specified)
77403            }
77404            
77405            LonghandId::OutlineStyle => {
77406                let mut computed_value = match physical_property_id {
77407                    LonghandId::OutlineStyle => self.clone_outline_style(),
77408                    _ => unsafe { debug_unreachable!() },
77409                };
77410                if let Some(c) = context {
77411                    let resolved = computed_value.to_resolved_value(c);
77412                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77413                }
77414                let specified = ToComputedValue::from_computed_value(&computed_value);
77415                PropertyDeclaration::OutlineStyle(specified)
77416            }
77417            
77418            LonghandId::OverflowWrap => {
77419                let mut computed_value = match physical_property_id {
77420                    LonghandId::OverflowWrap => self.clone_overflow_wrap(),
77421                    _ => unsafe { debug_unreachable!() },
77422                };
77423                if let Some(c) = context {
77424                    let resolved = computed_value.to_resolved_value(c);
77425                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77426                }
77427                let specified = ToComputedValue::from_computed_value(&computed_value);
77428                PropertyDeclaration::OverflowWrap(specified)
77429            }
77430            
77431            LonghandId::PointerEvents => {
77432                let mut computed_value = match physical_property_id {
77433                    LonghandId::PointerEvents => self.clone_pointer_events(),
77434                    _ => unsafe { debug_unreachable!() },
77435                };
77436                if let Some(c) = context {
77437                    let resolved = computed_value.to_resolved_value(c);
77438                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77439                }
77440                let specified = ToComputedValue::from_computed_value(&computed_value);
77441                PropertyDeclaration::PointerEvents(specified)
77442            }
77443            
77444            LonghandId::Position => {
77445                let mut computed_value = match physical_property_id {
77446                    LonghandId::Position => self.clone_position(),
77447                    _ => unsafe { debug_unreachable!() },
77448                };
77449                if let Some(c) = context {
77450                    let resolved = computed_value.to_resolved_value(c);
77451                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77452                }
77453                let specified = ToComputedValue::from_computed_value(&computed_value);
77454                PropertyDeclaration::Position(specified)
77455            }
77456            
77457            LonghandId::ServoOverflowClipBox => {
77458                let mut computed_value = match physical_property_id {
77459                    LonghandId::ServoOverflowClipBox => self.clone__servo_overflow_clip_box(),
77460                    _ => unsafe { debug_unreachable!() },
77461                };
77462                if let Some(c) = context {
77463                    let resolved = computed_value.to_resolved_value(c);
77464                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77465                }
77466                let specified = ToComputedValue::from_computed_value(&computed_value);
77467                PropertyDeclaration::ServoOverflowClipBox(specified)
77468            }
77469            
77470            LonghandId::ServoTopLayer => {
77471                let mut computed_value = match physical_property_id {
77472                    LonghandId::ServoTopLayer => self.clone__servo_top_layer(),
77473                    _ => unsafe { debug_unreachable!() },
77474                };
77475                if let Some(c) = context {
77476                    let resolved = computed_value.to_resolved_value(c);
77477                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77478                }
77479                let specified = ToComputedValue::from_computed_value(&computed_value);
77480                PropertyDeclaration::ServoTopLayer(specified)
77481            }
77482            
77483            LonghandId::TableLayout => {
77484                let mut computed_value = match physical_property_id {
77485                    LonghandId::TableLayout => self.clone_table_layout(),
77486                    _ => unsafe { debug_unreachable!() },
77487                };
77488                if let Some(c) = context {
77489                    let resolved = computed_value.to_resolved_value(c);
77490                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77491                }
77492                let specified = ToComputedValue::from_computed_value(&computed_value);
77493                PropertyDeclaration::TableLayout(specified)
77494            }
77495            
77496            LonghandId::TextAlign => {
77497                let mut computed_value = match physical_property_id {
77498                    LonghandId::TextAlign => self.clone_text_align(),
77499                    _ => unsafe { debug_unreachable!() },
77500                };
77501                if let Some(c) = context {
77502                    let resolved = computed_value.to_resolved_value(c);
77503                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77504                }
77505                let specified = ToComputedValue::from_computed_value(&computed_value);
77506                PropertyDeclaration::TextAlign(specified)
77507            }
77508            
77509            LonghandId::TextAlignLast => {
77510                let mut computed_value = match physical_property_id {
77511                    LonghandId::TextAlignLast => self.clone_text_align_last(),
77512                    _ => unsafe { debug_unreachable!() },
77513                };
77514                if let Some(c) = context {
77515                    let resolved = computed_value.to_resolved_value(c);
77516                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77517                }
77518                let specified = ToComputedValue::from_computed_value(&computed_value);
77519                PropertyDeclaration::TextAlignLast(specified)
77520            }
77521            
77522            LonghandId::TextDecorationLine => {
77523                let mut computed_value = match physical_property_id {
77524                    LonghandId::TextDecorationLine => self.clone_text_decoration_line(),
77525                    _ => unsafe { debug_unreachable!() },
77526                };
77527                if let Some(c) = context {
77528                    let resolved = computed_value.to_resolved_value(c);
77529                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77530                }
77531                let specified = ToComputedValue::from_computed_value(&computed_value);
77532                PropertyDeclaration::TextDecorationLine(specified)
77533            }
77534            
77535            LonghandId::TextDecorationStyle => {
77536                let mut computed_value = match physical_property_id {
77537                    LonghandId::TextDecorationStyle => self.clone_text_decoration_style(),
77538                    _ => unsafe { debug_unreachable!() },
77539                };
77540                if let Some(c) = context {
77541                    let resolved = computed_value.to_resolved_value(c);
77542                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77543                }
77544                let specified = ToComputedValue::from_computed_value(&computed_value);
77545                PropertyDeclaration::TextDecorationStyle(specified)
77546            }
77547            
77548            LonghandId::TextJustify => {
77549                let mut computed_value = match physical_property_id {
77550                    LonghandId::TextJustify => self.clone_text_justify(),
77551                    _ => unsafe { debug_unreachable!() },
77552                };
77553                if let Some(c) = context {
77554                    let resolved = computed_value.to_resolved_value(c);
77555                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77556                }
77557                let specified = ToComputedValue::from_computed_value(&computed_value);
77558                PropertyDeclaration::TextJustify(specified)
77559            }
77560            
77561            LonghandId::TextRendering => {
77562                let mut computed_value = match physical_property_id {
77563                    LonghandId::TextRendering => self.clone_text_rendering(),
77564                    _ => unsafe { debug_unreachable!() },
77565                };
77566                if let Some(c) = context {
77567                    let resolved = computed_value.to_resolved_value(c);
77568                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77569                }
77570                let specified = ToComputedValue::from_computed_value(&computed_value);
77571                PropertyDeclaration::TextRendering(specified)
77572            }
77573            
77574            LonghandId::TextTransform => {
77575                let mut computed_value = match physical_property_id {
77576                    LonghandId::TextTransform => self.clone_text_transform(),
77577                    _ => unsafe { debug_unreachable!() },
77578                };
77579                if let Some(c) = context {
77580                    let resolved = computed_value.to_resolved_value(c);
77581                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77582                }
77583                let specified = ToComputedValue::from_computed_value(&computed_value);
77584                PropertyDeclaration::TextTransform(specified)
77585            }
77586            
77587            LonghandId::TextWrapMode => {
77588                let mut computed_value = match physical_property_id {
77589                    LonghandId::TextWrapMode => self.clone_text_wrap_mode(),
77590                    _ => unsafe { debug_unreachable!() },
77591                };
77592                if let Some(c) = context {
77593                    let resolved = computed_value.to_resolved_value(c);
77594                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77595                }
77596                let specified = ToComputedValue::from_computed_value(&computed_value);
77597                PropertyDeclaration::TextWrapMode(specified)
77598            }
77599            
77600            LonghandId::TransformStyle => {
77601                let mut computed_value = match physical_property_id {
77602                    LonghandId::TransformStyle => self.clone_transform_style(),
77603                    _ => unsafe { debug_unreachable!() },
77604                };
77605                if let Some(c) = context {
77606                    let resolved = computed_value.to_resolved_value(c);
77607                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77608                }
77609                let specified = ToComputedValue::from_computed_value(&computed_value);
77610                PropertyDeclaration::TransformStyle(specified)
77611            }
77612            
77613            LonghandId::UnicodeBidi => {
77614                let mut computed_value = match physical_property_id {
77615                    LonghandId::UnicodeBidi => self.clone_unicode_bidi(),
77616                    _ => unsafe { debug_unreachable!() },
77617                };
77618                if let Some(c) = context {
77619                    let resolved = computed_value.to_resolved_value(c);
77620                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77621                }
77622                let specified = ToComputedValue::from_computed_value(&computed_value);
77623                PropertyDeclaration::UnicodeBidi(specified)
77624            }
77625            
77626            LonghandId::Visibility => {
77627                let mut computed_value = match physical_property_id {
77628                    LonghandId::Visibility => self.clone_visibility(),
77629                    _ => unsafe { debug_unreachable!() },
77630                };
77631                if let Some(c) = context {
77632                    let resolved = computed_value.to_resolved_value(c);
77633                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77634                }
77635                let specified = ToComputedValue::from_computed_value(&computed_value);
77636                PropertyDeclaration::Visibility(specified)
77637            }
77638            
77639            LonghandId::WhiteSpaceCollapse => {
77640                let mut computed_value = match physical_property_id {
77641                    LonghandId::WhiteSpaceCollapse => self.clone_white_space_collapse(),
77642                    _ => unsafe { debug_unreachable!() },
77643                };
77644                if let Some(c) = context {
77645                    let resolved = computed_value.to_resolved_value(c);
77646                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77647                }
77648                let specified = ToComputedValue::from_computed_value(&computed_value);
77649                PropertyDeclaration::WhiteSpaceCollapse(specified)
77650            }
77651            
77652            LonghandId::WordBreak => {
77653                let mut computed_value = match physical_property_id {
77654                    LonghandId::WordBreak => self.clone_word_break(),
77655                    _ => unsafe { debug_unreachable!() },
77656                };
77657                if let Some(c) = context {
77658                    let resolved = computed_value.to_resolved_value(c);
77659                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77660                }
77661                let specified = ToComputedValue::from_computed_value(&computed_value);
77662                PropertyDeclaration::WordBreak(specified)
77663            }
77664            
77665            LonghandId::WritingMode => {
77666                let mut computed_value = match physical_property_id {
77667                    LonghandId::WritingMode => self.clone_writing_mode(),
77668                    _ => unsafe { debug_unreachable!() },
77669                };
77670                if let Some(c) = context {
77671                    let resolved = computed_value.to_resolved_value(c);
77672                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77673                }
77674                let specified = ToComputedValue::from_computed_value(&computed_value);
77675                PropertyDeclaration::WritingMode(specified)
77676            }
77677            
77678            LonghandId::ZIndex => {
77679                let mut computed_value = match physical_property_id {
77680                    LonghandId::ZIndex => self.clone_z_index(),
77681                    _ => unsafe { debug_unreachable!() },
77682                };
77683                if let Some(c) = context {
77684                    let resolved = computed_value.to_resolved_value(c);
77685                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77686                }
77687                let specified = ToComputedValue::from_computed_value(&computed_value);
77688                PropertyDeclaration::ZIndex(specified)
77689            }
77690            
77691            LonghandId::Zoom => {
77692                let mut computed_value = match physical_property_id {
77693                    LonghandId::Zoom => self.clone_zoom(),
77694                    _ => unsafe { debug_unreachable!() },
77695                };
77696                if let Some(c) = context {
77697                    let resolved = computed_value.to_resolved_value(c);
77698                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77699                }
77700                let specified = ToComputedValue::from_computed_value(&computed_value);
77701                PropertyDeclaration::Zoom(specified)
77702            }
77703            
77704            LonghandId::FlexGrow |
77705LonghandId::FlexShrink => {
77706                let mut computed_value = match physical_property_id {
77707                    LonghandId::FlexGrow => self.clone_flex_grow(),
77708                    LonghandId::FlexShrink => self.clone_flex_shrink(),
77709                    _ => unsafe { debug_unreachable!() },
77710                };
77711                if let Some(c) = context {
77712                    let resolved = computed_value.to_resolved_value(c);
77713                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77714                }
77715                let specified = ToComputedValue::from_computed_value(&computed_value);
77716                unsafe {
77717                    let mut out = mem::MaybeUninit::uninit();
77718                    ptr::write(
77719                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::NonNegativeNumber>,
77720                        PropertyDeclarationVariantRepr {
77721                            tag: property_id as u16,
77722                            value: specified,
77723                        },
77724                    );
77725                    out.assume_init()
77726                }
77727            }
77728            
77729            LonghandId::OverflowBlock |
77730LonghandId::OverflowInline |
77731LonghandId::OverflowX |
77732LonghandId::OverflowY => {
77733                let mut computed_value = match physical_property_id {
77734                    LonghandId::OverflowX => self.clone_overflow_x(),
77735                    LonghandId::OverflowY => self.clone_overflow_y(),
77736                    _ => unsafe { debug_unreachable!() },
77737                };
77738                if let Some(c) = context {
77739                    let resolved = computed_value.to_resolved_value(c);
77740                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77741                }
77742                let specified = ToComputedValue::from_computed_value(&computed_value);
77743                unsafe {
77744                    let mut out = mem::MaybeUninit::uninit();
77745                    ptr::write(
77746                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::Overflow>,
77747                        PropertyDeclarationVariantRepr {
77748                            tag: property_id as u16,
77749                            value: specified,
77750                        },
77751                    );
77752                    out.assume_init()
77753                }
77754            }
77755            
77756            LonghandId::BorderBlockEndStyle |
77757LonghandId::BorderBlockStartStyle |
77758LonghandId::BorderBottomStyle |
77759LonghandId::BorderInlineEndStyle |
77760LonghandId::BorderInlineStartStyle |
77761LonghandId::BorderLeftStyle |
77762LonghandId::BorderRightStyle |
77763LonghandId::BorderTopStyle => {
77764                let mut computed_value = match physical_property_id {
77765                    LonghandId::BorderBottomStyle => self.clone_border_bottom_style(),
77766                    LonghandId::BorderLeftStyle => self.clone_border_left_style(),
77767                    LonghandId::BorderRightStyle => self.clone_border_right_style(),
77768                    LonghandId::BorderTopStyle => self.clone_border_top_style(),
77769                    _ => unsafe { debug_unreachable!() },
77770                };
77771                if let Some(c) = context {
77772                    let resolved = computed_value.to_resolved_value(c);
77773                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77774                }
77775                let specified = ToComputedValue::from_computed_value(&computed_value);
77776                unsafe {
77777                    let mut out = mem::MaybeUninit::uninit();
77778                    ptr::write(
77779                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::BorderStyle>,
77780                        PropertyDeclarationVariantRepr {
77781                            tag: property_id as u16,
77782                            value: specified,
77783                        },
77784                    );
77785                    out.assume_init()
77786                }
77787            }
77788            
77789            LonghandId::AnimationComposition => {
77790                let mut computed_value = match physical_property_id {
77791                    LonghandId::AnimationComposition => self.clone_animation_composition(),
77792                    _ => unsafe { debug_unreachable!() },
77793                };
77794                if let Some(c) = context {
77795                    let resolved = computed_value.to_resolved_value(c);
77796                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77797                }
77798                let specified = ToComputedValue::from_computed_value(&computed_value);
77799                PropertyDeclaration::AnimationComposition(specified)
77800            }
77801            
77802            LonghandId::AnimationDelay => {
77803                let mut computed_value = match physical_property_id {
77804                    LonghandId::AnimationDelay => self.clone_animation_delay(),
77805                    _ => unsafe { debug_unreachable!() },
77806                };
77807                if let Some(c) = context {
77808                    let resolved = computed_value.to_resolved_value(c);
77809                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77810                }
77811                let specified = ToComputedValue::from_computed_value(&computed_value);
77812                PropertyDeclaration::AnimationDelay(specified)
77813            }
77814            
77815            LonghandId::AnimationDirection => {
77816                let mut computed_value = match physical_property_id {
77817                    LonghandId::AnimationDirection => self.clone_animation_direction(),
77818                    _ => unsafe { debug_unreachable!() },
77819                };
77820                if let Some(c) = context {
77821                    let resolved = computed_value.to_resolved_value(c);
77822                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77823                }
77824                let specified = ToComputedValue::from_computed_value(&computed_value);
77825                PropertyDeclaration::AnimationDirection(specified)
77826            }
77827            
77828            LonghandId::AnimationDuration => {
77829                let mut computed_value = match physical_property_id {
77830                    LonghandId::AnimationDuration => self.clone_animation_duration(),
77831                    _ => unsafe { debug_unreachable!() },
77832                };
77833                if let Some(c) = context {
77834                    let resolved = computed_value.to_resolved_value(c);
77835                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77836                }
77837                let specified = ToComputedValue::from_computed_value(&computed_value);
77838                PropertyDeclaration::AnimationDuration(specified)
77839            }
77840            
77841            LonghandId::AnimationFillMode => {
77842                let mut computed_value = match physical_property_id {
77843                    LonghandId::AnimationFillMode => self.clone_animation_fill_mode(),
77844                    _ => unsafe { debug_unreachable!() },
77845                };
77846                if let Some(c) = context {
77847                    let resolved = computed_value.to_resolved_value(c);
77848                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77849                }
77850                let specified = ToComputedValue::from_computed_value(&computed_value);
77851                PropertyDeclaration::AnimationFillMode(specified)
77852            }
77853            
77854            LonghandId::AnimationIterationCount => {
77855                let mut computed_value = match physical_property_id {
77856                    LonghandId::AnimationIterationCount => self.clone_animation_iteration_count(),
77857                    _ => unsafe { debug_unreachable!() },
77858                };
77859                if let Some(c) = context {
77860                    let resolved = computed_value.to_resolved_value(c);
77861                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77862                }
77863                let specified = ToComputedValue::from_computed_value(&computed_value);
77864                PropertyDeclaration::AnimationIterationCount(specified)
77865            }
77866            
77867            LonghandId::AnimationName => {
77868                let mut computed_value = match physical_property_id {
77869                    LonghandId::AnimationName => self.clone_animation_name(),
77870                    _ => unsafe { debug_unreachable!() },
77871                };
77872                if let Some(c) = context {
77873                    let resolved = computed_value.to_resolved_value(c);
77874                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77875                }
77876                let specified = ToComputedValue::from_computed_value(&computed_value);
77877                PropertyDeclaration::AnimationName(specified)
77878            }
77879            
77880            LonghandId::AnimationPlayState => {
77881                let mut computed_value = match physical_property_id {
77882                    LonghandId::AnimationPlayState => self.clone_animation_play_state(),
77883                    _ => unsafe { debug_unreachable!() },
77884                };
77885                if let Some(c) = context {
77886                    let resolved = computed_value.to_resolved_value(c);
77887                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77888                }
77889                let specified = ToComputedValue::from_computed_value(&computed_value);
77890                PropertyDeclaration::AnimationPlayState(specified)
77891            }
77892            
77893            LonghandId::AnimationTimeline => {
77894                let mut computed_value = match physical_property_id {
77895                    LonghandId::AnimationTimeline => self.clone_animation_timeline(),
77896                    _ => unsafe { debug_unreachable!() },
77897                };
77898                if let Some(c) = context {
77899                    let resolved = computed_value.to_resolved_value(c);
77900                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77901                }
77902                let specified = ToComputedValue::from_computed_value(&computed_value);
77903                PropertyDeclaration::AnimationTimeline(specified)
77904            }
77905            
77906            LonghandId::AnimationTimingFunction => {
77907                let mut computed_value = match physical_property_id {
77908                    LonghandId::AnimationTimingFunction => self.clone_animation_timing_function(),
77909                    _ => unsafe { debug_unreachable!() },
77910                };
77911                if let Some(c) = context {
77912                    let resolved = computed_value.to_resolved_value(c);
77913                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77914                }
77915                let specified = ToComputedValue::from_computed_value(&computed_value);
77916                PropertyDeclaration::AnimationTimingFunction(specified)
77917            }
77918            
77919            LonghandId::BackdropFilter => {
77920                let mut computed_value = match physical_property_id {
77921                    LonghandId::BackdropFilter => self.clone_backdrop_filter(),
77922                    _ => unsafe { debug_unreachable!() },
77923                };
77924                if let Some(c) = context {
77925                    let resolved = computed_value.to_resolved_value(c);
77926                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77927                }
77928                let specified = ToComputedValue::from_computed_value(&computed_value);
77929                PropertyDeclaration::BackdropFilter(specified)
77930            }
77931            
77932            LonghandId::BackgroundAttachment => {
77933                let mut computed_value = match physical_property_id {
77934                    LonghandId::BackgroundAttachment => self.clone_background_attachment(),
77935                    _ => unsafe { debug_unreachable!() },
77936                };
77937                if let Some(c) = context {
77938                    let resolved = computed_value.to_resolved_value(c);
77939                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77940                }
77941                let specified = ToComputedValue::from_computed_value(&computed_value);
77942                PropertyDeclaration::BackgroundAttachment(specified)
77943            }
77944            
77945            LonghandId::BackgroundClip => {
77946                let mut computed_value = match physical_property_id {
77947                    LonghandId::BackgroundClip => self.clone_background_clip(),
77948                    _ => unsafe { debug_unreachable!() },
77949                };
77950                if let Some(c) = context {
77951                    let resolved = computed_value.to_resolved_value(c);
77952                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77953                }
77954                let specified = ToComputedValue::from_computed_value(&computed_value);
77955                PropertyDeclaration::BackgroundClip(specified)
77956            }
77957            
77958            LonghandId::BackgroundImage => {
77959                let mut computed_value = match physical_property_id {
77960                    LonghandId::BackgroundImage => self.clone_background_image(),
77961                    _ => unsafe { debug_unreachable!() },
77962                };
77963                if let Some(c) = context {
77964                    let resolved = computed_value.to_resolved_value(c);
77965                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77966                }
77967                let specified = ToComputedValue::from_computed_value(&computed_value);
77968                PropertyDeclaration::BackgroundImage(specified)
77969            }
77970            
77971            LonghandId::BackgroundOrigin => {
77972                let mut computed_value = match physical_property_id {
77973                    LonghandId::BackgroundOrigin => self.clone_background_origin(),
77974                    _ => unsafe { debug_unreachable!() },
77975                };
77976                if let Some(c) = context {
77977                    let resolved = computed_value.to_resolved_value(c);
77978                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77979                }
77980                let specified = ToComputedValue::from_computed_value(&computed_value);
77981                PropertyDeclaration::BackgroundOrigin(specified)
77982            }
77983            
77984            LonghandId::BackgroundPositionX => {
77985                let mut computed_value = match physical_property_id {
77986                    LonghandId::BackgroundPositionX => self.clone_background_position_x(),
77987                    _ => unsafe { debug_unreachable!() },
77988                };
77989                if let Some(c) = context {
77990                    let resolved = computed_value.to_resolved_value(c);
77991                    computed_value = ToResolvedValue::from_resolved_value(resolved);
77992                }
77993                let specified = ToComputedValue::from_computed_value(&computed_value);
77994                PropertyDeclaration::BackgroundPositionX(specified)
77995            }
77996            
77997            LonghandId::BackgroundPositionY => {
77998                let mut computed_value = match physical_property_id {
77999                    LonghandId::BackgroundPositionY => self.clone_background_position_y(),
78000                    _ => unsafe { debug_unreachable!() },
78001                };
78002                if let Some(c) = context {
78003                    let resolved = computed_value.to_resolved_value(c);
78004                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78005                }
78006                let specified = ToComputedValue::from_computed_value(&computed_value);
78007                PropertyDeclaration::BackgroundPositionY(specified)
78008            }
78009            
78010            LonghandId::BackgroundRepeat => {
78011                let mut computed_value = match physical_property_id {
78012                    LonghandId::BackgroundRepeat => self.clone_background_repeat(),
78013                    _ => unsafe { debug_unreachable!() },
78014                };
78015                if let Some(c) = context {
78016                    let resolved = computed_value.to_resolved_value(c);
78017                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78018                }
78019                let specified = ToComputedValue::from_computed_value(&computed_value);
78020                PropertyDeclaration::BackgroundRepeat(specified)
78021            }
78022            
78023            LonghandId::BackgroundSize => {
78024                let mut computed_value = match physical_property_id {
78025                    LonghandId::BackgroundSize => self.clone_background_size(),
78026                    _ => unsafe { debug_unreachable!() },
78027                };
78028                if let Some(c) = context {
78029                    let resolved = computed_value.to_resolved_value(c);
78030                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78031                }
78032                let specified = ToComputedValue::from_computed_value(&computed_value);
78033                PropertyDeclaration::BackgroundSize(specified)
78034            }
78035            
78036            LonghandId::BorderImageOutset => {
78037                let mut computed_value = match physical_property_id {
78038                    LonghandId::BorderImageOutset => self.clone_border_image_outset(),
78039                    _ => unsafe { debug_unreachable!() },
78040                };
78041                if let Some(c) = context {
78042                    let resolved = computed_value.to_resolved_value(c);
78043                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78044                }
78045                let specified = ToComputedValue::from_computed_value(&computed_value);
78046                let specified = Box::new(specified);
78047                PropertyDeclaration::BorderImageOutset(specified)
78048            }
78049            
78050            LonghandId::BorderImageSlice => {
78051                let mut computed_value = match physical_property_id {
78052                    LonghandId::BorderImageSlice => self.clone_border_image_slice(),
78053                    _ => unsafe { debug_unreachable!() },
78054                };
78055                if let Some(c) = context {
78056                    let resolved = computed_value.to_resolved_value(c);
78057                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78058                }
78059                let specified = ToComputedValue::from_computed_value(&computed_value);
78060                let specified = Box::new(specified);
78061                PropertyDeclaration::BorderImageSlice(specified)
78062            }
78063            
78064            LonghandId::BorderImageWidth => {
78065                let mut computed_value = match physical_property_id {
78066                    LonghandId::BorderImageWidth => self.clone_border_image_width(),
78067                    _ => unsafe { debug_unreachable!() },
78068                };
78069                if let Some(c) = context {
78070                    let resolved = computed_value.to_resolved_value(c);
78071                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78072                }
78073                let specified = ToComputedValue::from_computed_value(&computed_value);
78074                let specified = Box::new(specified);
78075                PropertyDeclaration::BorderImageWidth(specified)
78076            }
78077            
78078            LonghandId::BorderSpacing => {
78079                let mut computed_value = match physical_property_id {
78080                    LonghandId::BorderSpacing => self.clone_border_spacing(),
78081                    _ => unsafe { debug_unreachable!() },
78082                };
78083                if let Some(c) = context {
78084                    let resolved = computed_value.to_resolved_value(c);
78085                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78086                }
78087                let specified = ToComputedValue::from_computed_value(&computed_value);
78088                let specified = Box::new(specified);
78089                PropertyDeclaration::BorderSpacing(specified)
78090            }
78091            
78092            LonghandId::BoxShadow => {
78093                let mut computed_value = match physical_property_id {
78094                    LonghandId::BoxShadow => self.clone_box_shadow(),
78095                    _ => unsafe { debug_unreachable!() },
78096                };
78097                if let Some(c) = context {
78098                    let resolved = computed_value.to_resolved_value(c);
78099                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78100                }
78101                let specified = ToComputedValue::from_computed_value(&computed_value);
78102                PropertyDeclaration::BoxShadow(specified)
78103            }
78104            
78105            LonghandId::Clip => {
78106                let mut computed_value = match physical_property_id {
78107                    LonghandId::Clip => self.clone_clip(),
78108                    _ => unsafe { debug_unreachable!() },
78109                };
78110                if let Some(c) = context {
78111                    let resolved = computed_value.to_resolved_value(c);
78112                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78113                }
78114                let specified = ToComputedValue::from_computed_value(&computed_value);
78115                let specified = Box::new(specified);
78116                PropertyDeclaration::Clip(specified)
78117            }
78118            
78119            LonghandId::ClipPath => {
78120                let mut computed_value = match physical_property_id {
78121                    LonghandId::ClipPath => self.clone_clip_path(),
78122                    _ => unsafe { debug_unreachable!() },
78123                };
78124                if let Some(c) = context {
78125                    let resolved = computed_value.to_resolved_value(c);
78126                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78127                }
78128                let specified = ToComputedValue::from_computed_value(&computed_value);
78129                PropertyDeclaration::ClipPath(specified)
78130            }
78131            
78132            LonghandId::Color => {
78133                let mut computed_value = match physical_property_id {
78134                    LonghandId::Color => self.clone_color(),
78135                    _ => unsafe { debug_unreachable!() },
78136                };
78137                if let Some(c) = context {
78138                    let resolved = computed_value.to_resolved_value(c);
78139                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78140                }
78141                let specified = ToComputedValue::from_computed_value(&computed_value);
78142                PropertyDeclaration::Color(specified)
78143            }
78144            
78145            LonghandId::ColorScheme => {
78146                let mut computed_value = match physical_property_id {
78147                    LonghandId::ColorScheme => self.clone_color_scheme(),
78148                    _ => unsafe { debug_unreachable!() },
78149                };
78150                if let Some(c) = context {
78151                    let resolved = computed_value.to_resolved_value(c);
78152                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78153                }
78154                let specified = ToComputedValue::from_computed_value(&computed_value);
78155                PropertyDeclaration::ColorScheme(specified)
78156            }
78157            
78158            LonghandId::ColumnWidth => {
78159                let mut computed_value = match physical_property_id {
78160                    LonghandId::ColumnWidth => self.clone_column_width(),
78161                    _ => unsafe { debug_unreachable!() },
78162                };
78163                if let Some(c) = context {
78164                    let resolved = computed_value.to_resolved_value(c);
78165                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78166                }
78167                let specified = ToComputedValue::from_computed_value(&computed_value);
78168                PropertyDeclaration::ColumnWidth(specified)
78169            }
78170            
78171            LonghandId::ContainerName => {
78172                let mut computed_value = match physical_property_id {
78173                    LonghandId::ContainerName => self.clone_container_name(),
78174                    _ => unsafe { debug_unreachable!() },
78175                };
78176                if let Some(c) = context {
78177                    let resolved = computed_value.to_resolved_value(c);
78178                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78179                }
78180                let specified = ToComputedValue::from_computed_value(&computed_value);
78181                PropertyDeclaration::ContainerName(specified)
78182            }
78183            
78184            LonghandId::Content => {
78185                let mut computed_value = match physical_property_id {
78186                    LonghandId::Content => self.clone_content(),
78187                    _ => unsafe { debug_unreachable!() },
78188                };
78189                if let Some(c) = context {
78190                    let resolved = computed_value.to_resolved_value(c);
78191                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78192                }
78193                let specified = ToComputedValue::from_computed_value(&computed_value);
78194                PropertyDeclaration::Content(specified)
78195            }
78196            
78197            LonghandId::CounterIncrement => {
78198                let mut computed_value = match physical_property_id {
78199                    LonghandId::CounterIncrement => self.clone_counter_increment(),
78200                    _ => unsafe { debug_unreachable!() },
78201                };
78202                if let Some(c) = context {
78203                    let resolved = computed_value.to_resolved_value(c);
78204                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78205                }
78206                let specified = ToComputedValue::from_computed_value(&computed_value);
78207                PropertyDeclaration::CounterIncrement(specified)
78208            }
78209            
78210            LonghandId::CounterReset => {
78211                let mut computed_value = match physical_property_id {
78212                    LonghandId::CounterReset => self.clone_counter_reset(),
78213                    _ => unsafe { debug_unreachable!() },
78214                };
78215                if let Some(c) = context {
78216                    let resolved = computed_value.to_resolved_value(c);
78217                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78218                }
78219                let specified = ToComputedValue::from_computed_value(&computed_value);
78220                PropertyDeclaration::CounterReset(specified)
78221            }
78222            
78223            LonghandId::Cursor => {
78224                let mut computed_value = match physical_property_id {
78225                    LonghandId::Cursor => self.clone_cursor(),
78226                    _ => unsafe { debug_unreachable!() },
78227                };
78228                if let Some(c) = context {
78229                    let resolved = computed_value.to_resolved_value(c);
78230                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78231                }
78232                let specified = ToComputedValue::from_computed_value(&computed_value);
78233                PropertyDeclaration::Cursor(specified)
78234            }
78235            
78236            LonghandId::Filter => {
78237                let mut computed_value = match physical_property_id {
78238                    LonghandId::Filter => self.clone_filter(),
78239                    _ => unsafe { debug_unreachable!() },
78240                };
78241                if let Some(c) = context {
78242                    let resolved = computed_value.to_resolved_value(c);
78243                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78244                }
78245                let specified = ToComputedValue::from_computed_value(&computed_value);
78246                PropertyDeclaration::Filter(specified)
78247            }
78248            
78249            LonghandId::FlexBasis => {
78250                let mut computed_value = match physical_property_id {
78251                    LonghandId::FlexBasis => self.clone_flex_basis(),
78252                    _ => unsafe { debug_unreachable!() },
78253                };
78254                if let Some(c) = context {
78255                    let resolved = computed_value.to_resolved_value(c);
78256                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78257                }
78258                let specified = ToComputedValue::from_computed_value(&computed_value);
78259                let specified = Box::new(specified);
78260                PropertyDeclaration::FlexBasis(specified)
78261            }
78262            
78263            LonghandId::FontFamily => {
78264                let mut computed_value = match physical_property_id {
78265                    LonghandId::FontFamily => self.clone_font_family(),
78266                    _ => unsafe { debug_unreachable!() },
78267                };
78268                if let Some(c) = context {
78269                    let resolved = computed_value.to_resolved_value(c);
78270                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78271                }
78272                let specified = ToComputedValue::from_computed_value(&computed_value);
78273                PropertyDeclaration::FontFamily(specified)
78274            }
78275            
78276            LonghandId::FontSize => {
78277                let mut computed_value = match physical_property_id {
78278                    LonghandId::FontSize => self.clone_font_size(),
78279                    _ => unsafe { debug_unreachable!() },
78280                };
78281                if let Some(c) = context {
78282                    let resolved = computed_value.to_resolved_value(c);
78283                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78284                }
78285                let specified = ToComputedValue::from_computed_value(&computed_value);
78286                PropertyDeclaration::FontSize(specified)
78287            }
78288            
78289            LonghandId::FontVariationSettings => {
78290                let mut computed_value = match physical_property_id {
78291                    LonghandId::FontVariationSettings => self.clone_font_variation_settings(),
78292                    _ => unsafe { debug_unreachable!() },
78293                };
78294                if let Some(c) = context {
78295                    let resolved = computed_value.to_resolved_value(c);
78296                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78297                }
78298                let specified = ToComputedValue::from_computed_value(&computed_value);
78299                PropertyDeclaration::FontVariationSettings(specified)
78300            }
78301            
78302            LonghandId::GridTemplateAreas => {
78303                let mut computed_value = match physical_property_id {
78304                    LonghandId::GridTemplateAreas => self.clone_grid_template_areas(),
78305                    _ => unsafe { debug_unreachable!() },
78306                };
78307                if let Some(c) = context {
78308                    let resolved = computed_value.to_resolved_value(c);
78309                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78310                }
78311                let specified = ToComputedValue::from_computed_value(&computed_value);
78312                PropertyDeclaration::GridTemplateAreas(specified)
78313            }
78314            
78315            LonghandId::LetterSpacing => {
78316                let mut computed_value = match physical_property_id {
78317                    LonghandId::LetterSpacing => self.clone_letter_spacing(),
78318                    _ => unsafe { debug_unreachable!() },
78319                };
78320                if let Some(c) = context {
78321                    let resolved = computed_value.to_resolved_value(c);
78322                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78323                }
78324                let specified = ToComputedValue::from_computed_value(&computed_value);
78325                PropertyDeclaration::LetterSpacing(specified)
78326            }
78327            
78328            LonghandId::LineHeight => {
78329                let mut computed_value = match physical_property_id {
78330                    LonghandId::LineHeight => self.clone_line_height(),
78331                    _ => unsafe { debug_unreachable!() },
78332                };
78333                if let Some(c) = context {
78334                    let resolved = computed_value.to_resolved_value(c);
78335                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78336                }
78337                let specified = ToComputedValue::from_computed_value(&computed_value);
78338                PropertyDeclaration::LineHeight(specified)
78339            }
78340            
78341            LonghandId::MaskImage => {
78342                let mut computed_value = match physical_property_id {
78343                    LonghandId::MaskImage => self.clone_mask_image(),
78344                    _ => unsafe { debug_unreachable!() },
78345                };
78346                if let Some(c) = context {
78347                    let resolved = computed_value.to_resolved_value(c);
78348                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78349                }
78350                let specified = ToComputedValue::from_computed_value(&computed_value);
78351                PropertyDeclaration::MaskImage(specified)
78352            }
78353            
78354            LonghandId::OffsetPath => {
78355                let mut computed_value = match physical_property_id {
78356                    LonghandId::OffsetPath => self.clone_offset_path(),
78357                    _ => unsafe { debug_unreachable!() },
78358                };
78359                if let Some(c) = context {
78360                    let resolved = computed_value.to_resolved_value(c);
78361                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78362                }
78363                let specified = ToComputedValue::from_computed_value(&computed_value);
78364                PropertyDeclaration::OffsetPath(specified)
78365            }
78366            
78367            LonghandId::Perspective => {
78368                let mut computed_value = match physical_property_id {
78369                    LonghandId::Perspective => self.clone_perspective(),
78370                    _ => unsafe { debug_unreachable!() },
78371                };
78372                if let Some(c) = context {
78373                    let resolved = computed_value.to_resolved_value(c);
78374                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78375                }
78376                let specified = ToComputedValue::from_computed_value(&computed_value);
78377                PropertyDeclaration::Perspective(specified)
78378            }
78379            
78380            LonghandId::Quotes => {
78381                let mut computed_value = match physical_property_id {
78382                    LonghandId::Quotes => self.clone_quotes(),
78383                    _ => unsafe { debug_unreachable!() },
78384                };
78385                if let Some(c) = context {
78386                    let resolved = computed_value.to_resolved_value(c);
78387                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78388                }
78389                let specified = ToComputedValue::from_computed_value(&computed_value);
78390                PropertyDeclaration::Quotes(specified)
78391            }
78392            
78393            LonghandId::Rotate => {
78394                let mut computed_value = match physical_property_id {
78395                    LonghandId::Rotate => self.clone_rotate(),
78396                    _ => unsafe { debug_unreachable!() },
78397                };
78398                if let Some(c) = context {
78399                    let resolved = computed_value.to_resolved_value(c);
78400                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78401                }
78402                let specified = ToComputedValue::from_computed_value(&computed_value);
78403                let specified = Box::new(specified);
78404                PropertyDeclaration::Rotate(specified)
78405            }
78406            
78407            LonghandId::Scale => {
78408                let mut computed_value = match physical_property_id {
78409                    LonghandId::Scale => self.clone_scale(),
78410                    _ => unsafe { debug_unreachable!() },
78411                };
78412                if let Some(c) = context {
78413                    let resolved = computed_value.to_resolved_value(c);
78414                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78415                }
78416                let specified = ToComputedValue::from_computed_value(&computed_value);
78417                let specified = Box::new(specified);
78418                PropertyDeclaration::Scale(specified)
78419            }
78420            
78421            LonghandId::TextIndent => {
78422                let mut computed_value = match physical_property_id {
78423                    LonghandId::TextIndent => self.clone_text_indent(),
78424                    _ => unsafe { debug_unreachable!() },
78425                };
78426                if let Some(c) = context {
78427                    let resolved = computed_value.to_resolved_value(c);
78428                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78429                }
78430                let specified = ToComputedValue::from_computed_value(&computed_value);
78431                PropertyDeclaration::TextIndent(specified)
78432            }
78433            
78434            LonghandId::TextOverflow => {
78435                let mut computed_value = match physical_property_id {
78436                    LonghandId::TextOverflow => self.clone_text_overflow(),
78437                    _ => unsafe { debug_unreachable!() },
78438                };
78439                if let Some(c) = context {
78440                    let resolved = computed_value.to_resolved_value(c);
78441                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78442                }
78443                let specified = ToComputedValue::from_computed_value(&computed_value);
78444                let specified = Box::new(specified);
78445                PropertyDeclaration::TextOverflow(specified)
78446            }
78447            
78448            LonghandId::TextShadow => {
78449                let mut computed_value = match physical_property_id {
78450                    LonghandId::TextShadow => self.clone_text_shadow(),
78451                    _ => unsafe { debug_unreachable!() },
78452                };
78453                if let Some(c) = context {
78454                    let resolved = computed_value.to_resolved_value(c);
78455                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78456                }
78457                let specified = ToComputedValue::from_computed_value(&computed_value);
78458                PropertyDeclaration::TextShadow(specified)
78459            }
78460            
78461            LonghandId::Transform => {
78462                let mut computed_value = match physical_property_id {
78463                    LonghandId::Transform => self.clone_transform(),
78464                    _ => unsafe { debug_unreachable!() },
78465                };
78466                if let Some(c) = context {
78467                    let resolved = computed_value.to_resolved_value(c);
78468                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78469                }
78470                let specified = ToComputedValue::from_computed_value(&computed_value);
78471                PropertyDeclaration::Transform(specified)
78472            }
78473            
78474            LonghandId::TransformOrigin => {
78475                let mut computed_value = match physical_property_id {
78476                    LonghandId::TransformOrigin => self.clone_transform_origin(),
78477                    _ => unsafe { debug_unreachable!() },
78478                };
78479                if let Some(c) = context {
78480                    let resolved = computed_value.to_resolved_value(c);
78481                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78482                }
78483                let specified = ToComputedValue::from_computed_value(&computed_value);
78484                let specified = Box::new(specified);
78485                PropertyDeclaration::TransformOrigin(specified)
78486            }
78487            
78488            LonghandId::TransitionBehavior => {
78489                let mut computed_value = match physical_property_id {
78490                    LonghandId::TransitionBehavior => self.clone_transition_behavior(),
78491                    _ => unsafe { debug_unreachable!() },
78492                };
78493                if let Some(c) = context {
78494                    let resolved = computed_value.to_resolved_value(c);
78495                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78496                }
78497                let specified = ToComputedValue::from_computed_value(&computed_value);
78498                PropertyDeclaration::TransitionBehavior(specified)
78499            }
78500            
78501            LonghandId::TransitionDelay => {
78502                let mut computed_value = match physical_property_id {
78503                    LonghandId::TransitionDelay => self.clone_transition_delay(),
78504                    _ => unsafe { debug_unreachable!() },
78505                };
78506                if let Some(c) = context {
78507                    let resolved = computed_value.to_resolved_value(c);
78508                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78509                }
78510                let specified = ToComputedValue::from_computed_value(&computed_value);
78511                PropertyDeclaration::TransitionDelay(specified)
78512            }
78513            
78514            LonghandId::TransitionDuration => {
78515                let mut computed_value = match physical_property_id {
78516                    LonghandId::TransitionDuration => self.clone_transition_duration(),
78517                    _ => unsafe { debug_unreachable!() },
78518                };
78519                if let Some(c) = context {
78520                    let resolved = computed_value.to_resolved_value(c);
78521                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78522                }
78523                let specified = ToComputedValue::from_computed_value(&computed_value);
78524                PropertyDeclaration::TransitionDuration(specified)
78525            }
78526            
78527            LonghandId::TransitionProperty => {
78528                let mut computed_value = match physical_property_id {
78529                    LonghandId::TransitionProperty => self.clone_transition_property(),
78530                    _ => unsafe { debug_unreachable!() },
78531                };
78532                if let Some(c) = context {
78533                    let resolved = computed_value.to_resolved_value(c);
78534                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78535                }
78536                let specified = ToComputedValue::from_computed_value(&computed_value);
78537                PropertyDeclaration::TransitionProperty(specified)
78538            }
78539            
78540            LonghandId::TransitionTimingFunction => {
78541                let mut computed_value = match physical_property_id {
78542                    LonghandId::TransitionTimingFunction => self.clone_transition_timing_function(),
78543                    _ => unsafe { debug_unreachable!() },
78544                };
78545                if let Some(c) = context {
78546                    let resolved = computed_value.to_resolved_value(c);
78547                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78548                }
78549                let specified = ToComputedValue::from_computed_value(&computed_value);
78550                PropertyDeclaration::TransitionTimingFunction(specified)
78551            }
78552            
78553            LonghandId::Translate => {
78554                let mut computed_value = match physical_property_id {
78555                    LonghandId::Translate => self.clone_translate(),
78556                    _ => unsafe { debug_unreachable!() },
78557                };
78558                if let Some(c) = context {
78559                    let resolved = computed_value.to_resolved_value(c);
78560                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78561                }
78562                let specified = ToComputedValue::from_computed_value(&computed_value);
78563                let specified = Box::new(specified);
78564                PropertyDeclaration::Translate(specified)
78565            }
78566            
78567            LonghandId::VerticalAlign => {
78568                let mut computed_value = match physical_property_id {
78569                    LonghandId::VerticalAlign => self.clone_vertical_align(),
78570                    _ => unsafe { debug_unreachable!() },
78571                };
78572                if let Some(c) = context {
78573                    let resolved = computed_value.to_resolved_value(c);
78574                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78575                }
78576                let specified = ToComputedValue::from_computed_value(&computed_value);
78577                PropertyDeclaration::VerticalAlign(specified)
78578            }
78579            
78580            LonghandId::ViewTransitionClass => {
78581                let mut computed_value = match physical_property_id {
78582                    LonghandId::ViewTransitionClass => self.clone_view_transition_class(),
78583                    _ => unsafe { debug_unreachable!() },
78584                };
78585                if let Some(c) = context {
78586                    let resolved = computed_value.to_resolved_value(c);
78587                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78588                }
78589                let specified = ToComputedValue::from_computed_value(&computed_value);
78590                PropertyDeclaration::ViewTransitionClass(specified)
78591            }
78592            
78593            LonghandId::ViewTransitionName => {
78594                let mut computed_value = match physical_property_id {
78595                    LonghandId::ViewTransitionName => self.clone_view_transition_name(),
78596                    _ => unsafe { debug_unreachable!() },
78597                };
78598                if let Some(c) = context {
78599                    let resolved = computed_value.to_resolved_value(c);
78600                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78601                }
78602                let specified = ToComputedValue::from_computed_value(&computed_value);
78603                PropertyDeclaration::ViewTransitionName(specified)
78604            }
78605            
78606            LonghandId::WillChange => {
78607                let mut computed_value = match physical_property_id {
78608                    LonghandId::WillChange => self.clone_will_change(),
78609                    _ => unsafe { debug_unreachable!() },
78610                };
78611                if let Some(c) = context {
78612                    let resolved = computed_value.to_resolved_value(c);
78613                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78614                }
78615                let specified = ToComputedValue::from_computed_value(&computed_value);
78616                PropertyDeclaration::WillChange(specified)
78617            }
78618            
78619            LonghandId::WordSpacing => {
78620                let mut computed_value = match physical_property_id {
78621                    LonghandId::WordSpacing => self.clone_word_spacing(),
78622                    _ => unsafe { debug_unreachable!() },
78623                };
78624                if let Some(c) = context {
78625                    let resolved = computed_value.to_resolved_value(c);
78626                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78627                }
78628                let specified = ToComputedValue::from_computed_value(&computed_value);
78629                PropertyDeclaration::WordSpacing(specified)
78630            }
78631            
78632            LonghandId::XLang => {
78633                let mut computed_value = match physical_property_id {
78634                    LonghandId::XLang => self.clone__x_lang(),
78635                    _ => unsafe { debug_unreachable!() },
78636                };
78637                if let Some(c) = context {
78638                    let resolved = computed_value.to_resolved_value(c);
78639                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78640                }
78641                let specified = ToComputedValue::from_computed_value(&computed_value);
78642                PropertyDeclaration::XLang(specified)
78643            }
78644            
78645            LonghandId::ObjectPosition |
78646LonghandId::PerspectiveOrigin => {
78647                let mut computed_value = match physical_property_id {
78648                    LonghandId::ObjectPosition => self.clone_object_position(),
78649                    LonghandId::PerspectiveOrigin => self.clone_perspective_origin(),
78650                    _ => unsafe { debug_unreachable!() },
78651                };
78652                if let Some(c) = context {
78653                    let resolved = computed_value.to_resolved_value(c);
78654                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78655                }
78656                let specified = ToComputedValue::from_computed_value(&computed_value);
78657                let specified = Box::new(specified);
78658                unsafe {
78659                    let mut out = mem::MaybeUninit::uninit();
78660                    ptr::write(
78661                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<Box<crate::values::specified::Position>>,
78662                        PropertyDeclarationVariantRepr {
78663                            tag: property_id as u16,
78664                            value: specified,
78665                        },
78666                    );
78667                    out.assume_init()
78668                }
78669            }
78670            
78671            LonghandId::GridTemplateColumns |
78672LonghandId::GridTemplateRows => {
78673                let mut computed_value = match physical_property_id {
78674                    LonghandId::GridTemplateColumns => self.clone_grid_template_columns(),
78675                    LonghandId::GridTemplateRows => self.clone_grid_template_rows(),
78676                    _ => unsafe { debug_unreachable!() },
78677                };
78678                if let Some(c) = context {
78679                    let resolved = computed_value.to_resolved_value(c);
78680                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78681                }
78682                let specified = ToComputedValue::from_computed_value(&computed_value);
78683                unsafe {
78684                    let mut out = mem::MaybeUninit::uninit();
78685                    ptr::write(
78686                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::GridTemplateComponent>,
78687                        PropertyDeclarationVariantRepr {
78688                            tag: property_id as u16,
78689                            value: specified,
78690                        },
78691                    );
78692                    out.assume_init()
78693                }
78694            }
78695            
78696            LonghandId::BorderImageSource |
78697LonghandId::ListStyleImage => {
78698                let mut computed_value = match physical_property_id {
78699                    LonghandId::BorderImageSource => self.clone_border_image_source(),
78700                    LonghandId::ListStyleImage => self.clone_list_style_image(),
78701                    _ => unsafe { debug_unreachable!() },
78702                };
78703                if let Some(c) = context {
78704                    let resolved = computed_value.to_resolved_value(c);
78705                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78706                }
78707                let specified = ToComputedValue::from_computed_value(&computed_value);
78708                unsafe {
78709                    let mut out = mem::MaybeUninit::uninit();
78710                    ptr::write(
78711                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::Image>,
78712                        PropertyDeclarationVariantRepr {
78713                            tag: property_id as u16,
78714                            value: specified,
78715                        },
78716                    );
78717                    out.assume_init()
78718                }
78719            }
78720            
78721            LonghandId::GridAutoColumns |
78722LonghandId::GridAutoRows => {
78723                let mut computed_value = match physical_property_id {
78724                    LonghandId::GridAutoColumns => self.clone_grid_auto_columns(),
78725                    LonghandId::GridAutoRows => self.clone_grid_auto_rows(),
78726                    _ => unsafe { debug_unreachable!() },
78727                };
78728                if let Some(c) = context {
78729                    let resolved = computed_value.to_resolved_value(c);
78730                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78731                }
78732                let specified = ToComputedValue::from_computed_value(&computed_value);
78733                unsafe {
78734                    let mut out = mem::MaybeUninit::uninit();
78735                    ptr::write(
78736                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::ImplicitGridTracks>,
78737                        PropertyDeclarationVariantRepr {
78738                            tag: property_id as u16,
78739                            value: specified,
78740                        },
78741                    );
78742                    out.assume_init()
78743                }
78744            }
78745            
78746            LonghandId::OutlineOffset |
78747LonghandId::OverflowClipMargin => {
78748                let mut computed_value = match physical_property_id {
78749                    LonghandId::OutlineOffset => self.clone_outline_offset(),
78750                    LonghandId::OverflowClipMargin => self.clone_overflow_clip_margin(),
78751                    _ => unsafe { debug_unreachable!() },
78752                };
78753                if let Some(c) = context {
78754                    let resolved = computed_value.to_resolved_value(c);
78755                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78756                }
78757                let specified = ToComputedValue::from_computed_value(&computed_value);
78758                unsafe {
78759                    let mut out = mem::MaybeUninit::uninit();
78760                    ptr::write(
78761                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::Length>,
78762                        PropertyDeclarationVariantRepr {
78763                            tag: property_id as u16,
78764                            value: specified,
78765                        },
78766                    );
78767                    out.assume_init()
78768                }
78769            }
78770            
78771            LonghandId::ColumnGap |
78772LonghandId::RowGap => {
78773                let mut computed_value = match physical_property_id {
78774                    LonghandId::ColumnGap => self.clone_column_gap(),
78775                    LonghandId::RowGap => self.clone_row_gap(),
78776                    _ => unsafe { debug_unreachable!() },
78777                };
78778                if let Some(c) = context {
78779                    let resolved = computed_value.to_resolved_value(c);
78780                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78781                }
78782                let specified = ToComputedValue::from_computed_value(&computed_value);
78783                unsafe {
78784                    let mut out = mem::MaybeUninit::uninit();
78785                    ptr::write(
78786                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::length::NonNegativeLengthPercentageOrNormal>,
78787                        PropertyDeclarationVariantRepr {
78788                            tag: property_id as u16,
78789                            value: specified,
78790                        },
78791                    );
78792                    out.assume_init()
78793                }
78794            }
78795            
78796            LonghandId::GridColumnEnd |
78797LonghandId::GridColumnStart |
78798LonghandId::GridRowEnd |
78799LonghandId::GridRowStart => {
78800                let mut computed_value = match physical_property_id {
78801                    LonghandId::GridColumnEnd => self.clone_grid_column_end(),
78802                    LonghandId::GridColumnStart => self.clone_grid_column_start(),
78803                    LonghandId::GridRowEnd => self.clone_grid_row_end(),
78804                    LonghandId::GridRowStart => self.clone_grid_row_start(),
78805                    _ => unsafe { debug_unreachable!() },
78806                };
78807                if let Some(c) = context {
78808                    let resolved = computed_value.to_resolved_value(c);
78809                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78810                }
78811                let specified = ToComputedValue::from_computed_value(&computed_value);
78812                unsafe {
78813                    let mut out = mem::MaybeUninit::uninit();
78814                    ptr::write(
78815                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::GridLine>,
78816                        PropertyDeclarationVariantRepr {
78817                            tag: property_id as u16,
78818                            value: specified,
78819                        },
78820                    );
78821                    out.assume_init()
78822                }
78823            }
78824            
78825            LonghandId::MaxBlockSize |
78826LonghandId::MaxHeight |
78827LonghandId::MaxInlineSize |
78828LonghandId::MaxWidth => {
78829                let mut computed_value = match physical_property_id {
78830                    LonghandId::MaxHeight => self.clone_max_height(),
78831                    LonghandId::MaxWidth => self.clone_max_width(),
78832                    _ => unsafe { debug_unreachable!() },
78833                };
78834                if let Some(c) = context {
78835                    let resolved = computed_value.to_resolved_value(c);
78836                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78837                }
78838                let specified = ToComputedValue::from_computed_value(&computed_value);
78839                unsafe {
78840                    let mut out = mem::MaybeUninit::uninit();
78841                    ptr::write(
78842                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::MaxSize>,
78843                        PropertyDeclarationVariantRepr {
78844                            tag: property_id as u16,
78845                            value: specified,
78846                        },
78847                    );
78848                    out.assume_init()
78849                }
78850            }
78851            
78852            LonghandId::BorderBottomLeftRadius |
78853LonghandId::BorderBottomRightRadius |
78854LonghandId::BorderEndEndRadius |
78855LonghandId::BorderEndStartRadius |
78856LonghandId::BorderStartEndRadius |
78857LonghandId::BorderStartStartRadius |
78858LonghandId::BorderTopLeftRadius |
78859LonghandId::BorderTopRightRadius => {
78860                let mut computed_value = match physical_property_id {
78861                    LonghandId::BorderBottomLeftRadius => self.clone_border_bottom_left_radius(),
78862                    LonghandId::BorderBottomRightRadius => self.clone_border_bottom_right_radius(),
78863                    LonghandId::BorderTopLeftRadius => self.clone_border_top_left_radius(),
78864                    LonghandId::BorderTopRightRadius => self.clone_border_top_right_radius(),
78865                    _ => unsafe { debug_unreachable!() },
78866                };
78867                if let Some(c) = context {
78868                    let resolved = computed_value.to_resolved_value(c);
78869                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78870                }
78871                let specified = ToComputedValue::from_computed_value(&computed_value);
78872                let specified = Box::new(specified);
78873                unsafe {
78874                    let mut out = mem::MaybeUninit::uninit();
78875                    ptr::write(
78876                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<Box<crate::values::specified::BorderCornerRadius>>,
78877                        PropertyDeclarationVariantRepr {
78878                            tag: property_id as u16,
78879                            value: specified,
78880                        },
78881                    );
78882                    out.assume_init()
78883                }
78884            }
78885            
78886            LonghandId::Bottom |
78887LonghandId::InsetBlockEnd |
78888LonghandId::InsetBlockStart |
78889LonghandId::InsetInlineEnd |
78890LonghandId::InsetInlineStart |
78891LonghandId::Left |
78892LonghandId::Right |
78893LonghandId::Top => {
78894                let mut computed_value = match physical_property_id {
78895                    LonghandId::Bottom => self.clone_bottom(),
78896                    LonghandId::Left => self.clone_left(),
78897                    LonghandId::Right => self.clone_right(),
78898                    LonghandId::Top => self.clone_top(),
78899                    _ => unsafe { debug_unreachable!() },
78900                };
78901                if let Some(c) = context {
78902                    let resolved = computed_value.to_resolved_value(c);
78903                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78904                }
78905                let specified = ToComputedValue::from_computed_value(&computed_value);
78906                unsafe {
78907                    let mut out = mem::MaybeUninit::uninit();
78908                    ptr::write(
78909                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::Inset>,
78910                        PropertyDeclarationVariantRepr {
78911                            tag: property_id as u16,
78912                            value: specified,
78913                        },
78914                    );
78915                    out.assume_init()
78916                }
78917            }
78918            
78919            LonghandId::MarginBlockEnd |
78920LonghandId::MarginBlockStart |
78921LonghandId::MarginBottom |
78922LonghandId::MarginInlineEnd |
78923LonghandId::MarginInlineStart |
78924LonghandId::MarginLeft |
78925LonghandId::MarginRight |
78926LonghandId::MarginTop => {
78927                let mut computed_value = match physical_property_id {
78928                    LonghandId::MarginBottom => self.clone_margin_bottom(),
78929                    LonghandId::MarginLeft => self.clone_margin_left(),
78930                    LonghandId::MarginRight => self.clone_margin_right(),
78931                    LonghandId::MarginTop => self.clone_margin_top(),
78932                    _ => unsafe { debug_unreachable!() },
78933                };
78934                if let Some(c) = context {
78935                    let resolved = computed_value.to_resolved_value(c);
78936                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78937                }
78938                let specified = ToComputedValue::from_computed_value(&computed_value);
78939                unsafe {
78940                    let mut out = mem::MaybeUninit::uninit();
78941                    ptr::write(
78942                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::Margin>,
78943                        PropertyDeclarationVariantRepr {
78944                            tag: property_id as u16,
78945                            value: specified,
78946                        },
78947                    );
78948                    out.assume_init()
78949                }
78950            }
78951            
78952            LonghandId::PaddingBlockEnd |
78953LonghandId::PaddingBlockStart |
78954LonghandId::PaddingBottom |
78955LonghandId::PaddingInlineEnd |
78956LonghandId::PaddingInlineStart |
78957LonghandId::PaddingLeft |
78958LonghandId::PaddingRight |
78959LonghandId::PaddingTop => {
78960                let mut computed_value = match physical_property_id {
78961                    LonghandId::PaddingBottom => self.clone_padding_bottom(),
78962                    LonghandId::PaddingLeft => self.clone_padding_left(),
78963                    LonghandId::PaddingRight => self.clone_padding_right(),
78964                    LonghandId::PaddingTop => self.clone_padding_top(),
78965                    _ => unsafe { debug_unreachable!() },
78966                };
78967                if let Some(c) = context {
78968                    let resolved = computed_value.to_resolved_value(c);
78969                    computed_value = ToResolvedValue::from_resolved_value(resolved);
78970                }
78971                let specified = ToComputedValue::from_computed_value(&computed_value);
78972                unsafe {
78973                    let mut out = mem::MaybeUninit::uninit();
78974                    ptr::write(
78975                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::NonNegativeLengthPercentage>,
78976                        PropertyDeclarationVariantRepr {
78977                            tag: property_id as u16,
78978                            value: specified,
78979                        },
78980                    );
78981                    out.assume_init()
78982                }
78983            }
78984            
78985            LonghandId::BlockSize |
78986LonghandId::Height |
78987LonghandId::InlineSize |
78988LonghandId::MinBlockSize |
78989LonghandId::MinHeight |
78990LonghandId::MinInlineSize |
78991LonghandId::MinWidth |
78992LonghandId::Width => {
78993                let mut computed_value = match physical_property_id {
78994                    LonghandId::Height => self.clone_height(),
78995                    LonghandId::MinHeight => self.clone_min_height(),
78996                    LonghandId::MinWidth => self.clone_min_width(),
78997                    LonghandId::Width => self.clone_width(),
78998                    _ => unsafe { debug_unreachable!() },
78999                };
79000                if let Some(c) = context {
79001                    let resolved = computed_value.to_resolved_value(c);
79002                    computed_value = ToResolvedValue::from_resolved_value(resolved);
79003                }
79004                let specified = ToComputedValue::from_computed_value(&computed_value);
79005                unsafe {
79006                    let mut out = mem::MaybeUninit::uninit();
79007                    ptr::write(
79008                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::Size>,
79009                        PropertyDeclarationVariantRepr {
79010                            tag: property_id as u16,
79011                            value: specified,
79012                        },
79013                    );
79014                    out.assume_init()
79015                }
79016            }
79017            
79018            LonghandId::BorderBlockEndWidth |
79019LonghandId::BorderBlockStartWidth |
79020LonghandId::BorderBottomWidth |
79021LonghandId::BorderInlineEndWidth |
79022LonghandId::BorderInlineStartWidth |
79023LonghandId::BorderLeftWidth |
79024LonghandId::BorderRightWidth |
79025LonghandId::BorderTopWidth |
79026LonghandId::OutlineWidth => {
79027                let mut computed_value = match physical_property_id {
79028                    LonghandId::BorderBottomWidth => self.clone_border_bottom_width(),
79029                    LonghandId::BorderLeftWidth => self.clone_border_left_width(),
79030                    LonghandId::BorderRightWidth => self.clone_border_right_width(),
79031                    LonghandId::BorderTopWidth => self.clone_border_top_width(),
79032                    LonghandId::OutlineWidth => self.clone_outline_width(),
79033                    _ => unsafe { debug_unreachable!() },
79034                };
79035                if let Some(c) = context {
79036                    let resolved = computed_value.to_resolved_value(c);
79037                    computed_value = ToResolvedValue::from_resolved_value(resolved);
79038                }
79039                let specified = ToComputedValue::from_computed_value(&computed_value);
79040                unsafe {
79041                    let mut out = mem::MaybeUninit::uninit();
79042                    ptr::write(
79043                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::BorderSideWidth>,
79044                        PropertyDeclarationVariantRepr {
79045                            tag: property_id as u16,
79046                            value: specified,
79047                        },
79048                    );
79049                    out.assume_init()
79050                }
79051            }
79052            
79053            LonghandId::BackgroundColor |
79054LonghandId::BorderBlockEndColor |
79055LonghandId::BorderBlockStartColor |
79056LonghandId::BorderBottomColor |
79057LonghandId::BorderInlineEndColor |
79058LonghandId::BorderInlineStartColor |
79059LonghandId::BorderLeftColor |
79060LonghandId::BorderRightColor |
79061LonghandId::BorderTopColor |
79062LonghandId::OutlineColor |
79063LonghandId::TextDecorationColor => {
79064                let mut computed_value = match physical_property_id {
79065                    LonghandId::BackgroundColor => self.clone_background_color(),
79066                    LonghandId::BorderBottomColor => self.clone_border_bottom_color(),
79067                    LonghandId::BorderLeftColor => self.clone_border_left_color(),
79068                    LonghandId::BorderRightColor => self.clone_border_right_color(),
79069                    LonghandId::BorderTopColor => self.clone_border_top_color(),
79070                    LonghandId::OutlineColor => self.clone_outline_color(),
79071                    LonghandId::TextDecorationColor => self.clone_text_decoration_color(),
79072                    _ => unsafe { debug_unreachable!() },
79073                };
79074                if let Some(c) = context {
79075                    let resolved = computed_value.to_resolved_value(c);
79076                    computed_value = ToResolvedValue::from_resolved_value(resolved);
79077                }
79078                let specified = ToComputedValue::from_computed_value(&computed_value);
79079                unsafe {
79080                    let mut out = mem::MaybeUninit::uninit();
79081                    ptr::write(
79082                        out.as_mut_ptr() as *mut PropertyDeclarationVariantRepr<crate::values::specified::Color>,
79083                        PropertyDeclarationVariantRepr {
79084                            tag: property_id as u16,
79085                            value: specified,
79086                        },
79087                    );
79088                    out.assume_init()
79089                }
79090            }
79091        }
79092    }
79093
79094    /// Resolves the currentColor keyword.
79095    ///
79096    /// Any color value from computed values (except for the 'color' property
79097    /// itself) should go through this method.
79098    ///
79099    /// Usage example:
79100    /// let top_color =
79101    ///   style.resolve_color(&style.get_border().clone_border_top_color());
79102    #[inline]
79103    pub fn resolve_color(&self, color: &computed::Color) -> crate::color::AbsoluteColor {
79104        let current_color = self.get_inherited_text().clone_color();
79105        color.resolve_to_absolute(&current_color)
79106    }
79107
79108    /// Returns which longhand properties have different values in the two
79109    /// ComputedValues.
79110    #[cfg(feature = "gecko_debug")]
79111    pub fn differing_properties(&self, other: &ComputedValues) -> LonghandIdSet {
79112        let mut set = LonghandIdSet::new();
79113        if self.clone_align_content() != other.clone_align_content() {
79114            set.insert(LonghandId::AlignContent);
79115        }
79116        if self.clone_align_items() != other.clone_align_items() {
79117            set.insert(LonghandId::AlignItems);
79118        }
79119        if self.clone_align_self() != other.clone_align_self() {
79120            set.insert(LonghandId::AlignSelf);
79121        }
79122        if self.clone_aspect_ratio() != other.clone_aspect_ratio() {
79123            set.insert(LonghandId::AspectRatio);
79124        }
79125        if self.clone_backface_visibility() != other.clone_backface_visibility() {
79126            set.insert(LonghandId::BackfaceVisibility);
79127        }
79128        if self.clone_baseline_source() != other.clone_baseline_source() {
79129            set.insert(LonghandId::BaselineSource);
79130        }
79131        if self.clone_border_collapse() != other.clone_border_collapse() {
79132            set.insert(LonghandId::BorderCollapse);
79133        }
79134        if self.clone_border_image_repeat() != other.clone_border_image_repeat() {
79135            set.insert(LonghandId::BorderImageRepeat);
79136        }
79137        if self.clone_box_sizing() != other.clone_box_sizing() {
79138            set.insert(LonghandId::BoxSizing);
79139        }
79140        if self.clone_caption_side() != other.clone_caption_side() {
79141            set.insert(LonghandId::CaptionSide);
79142        }
79143        if self.clone_clear() != other.clone_clear() {
79144            set.insert(LonghandId::Clear);
79145        }
79146        if self.clone_column_count() != other.clone_column_count() {
79147            set.insert(LonghandId::ColumnCount);
79148        }
79149        if self.clone_column_span() != other.clone_column_span() {
79150            set.insert(LonghandId::ColumnSpan);
79151        }
79152        if self.clone_contain() != other.clone_contain() {
79153            set.insert(LonghandId::Contain);
79154        }
79155        if self.clone_container_type() != other.clone_container_type() {
79156            set.insert(LonghandId::ContainerType);
79157        }
79158        if self.clone_direction() != other.clone_direction() {
79159            set.insert(LonghandId::Direction);
79160        }
79161        if self.clone_display() != other.clone_display() {
79162            set.insert(LonghandId::Display);
79163        }
79164        if self.clone_empty_cells() != other.clone_empty_cells() {
79165            set.insert(LonghandId::EmptyCells);
79166        }
79167        if self.clone_flex_direction() != other.clone_flex_direction() {
79168            set.insert(LonghandId::FlexDirection);
79169        }
79170        if self.clone_flex_wrap() != other.clone_flex_wrap() {
79171            set.insert(LonghandId::FlexWrap);
79172        }
79173        if self.clone_float() != other.clone_float() {
79174            set.insert(LonghandId::Float);
79175        }
79176        if self.clone_font_language_override() != other.clone_font_language_override() {
79177            set.insert(LonghandId::FontLanguageOverride);
79178        }
79179        if self.clone_font_stretch() != other.clone_font_stretch() {
79180            set.insert(LonghandId::FontStretch);
79181        }
79182        if self.clone_font_style() != other.clone_font_style() {
79183            set.insert(LonghandId::FontStyle);
79184        }
79185        if self.clone_font_variant_caps() != other.clone_font_variant_caps() {
79186            set.insert(LonghandId::FontVariantCaps);
79187        }
79188        if self.clone_font_weight() != other.clone_font_weight() {
79189            set.insert(LonghandId::FontWeight);
79190        }
79191        if self.clone_grid_auto_flow() != other.clone_grid_auto_flow() {
79192            set.insert(LonghandId::GridAutoFlow);
79193        }
79194        if self.clone_image_rendering() != other.clone_image_rendering() {
79195            set.insert(LonghandId::ImageRendering);
79196        }
79197        if self.clone_isolation() != other.clone_isolation() {
79198            set.insert(LonghandId::Isolation);
79199        }
79200        if self.clone_justify_content() != other.clone_justify_content() {
79201            set.insert(LonghandId::JustifyContent);
79202        }
79203        if self.clone_justify_items() != other.clone_justify_items() {
79204            set.insert(LonghandId::JustifyItems);
79205        }
79206        if self.clone_justify_self() != other.clone_justify_self() {
79207            set.insert(LonghandId::JustifySelf);
79208        }
79209        if self.clone_list_style_position() != other.clone_list_style_position() {
79210            set.insert(LonghandId::ListStylePosition);
79211        }
79212        if self.clone_list_style_type() != other.clone_list_style_type() {
79213            set.insert(LonghandId::ListStyleType);
79214        }
79215        if self.clone_mix_blend_mode() != other.clone_mix_blend_mode() {
79216            set.insert(LonghandId::MixBlendMode);
79217        }
79218        if self.clone_object_fit() != other.clone_object_fit() {
79219            set.insert(LonghandId::ObjectFit);
79220        }
79221        if self.clone_opacity() != other.clone_opacity() {
79222            set.insert(LonghandId::Opacity);
79223        }
79224        if self.clone_order() != other.clone_order() {
79225            set.insert(LonghandId::Order);
79226        }
79227        if self.clone_outline_style() != other.clone_outline_style() {
79228            set.insert(LonghandId::OutlineStyle);
79229        }
79230        if self.clone_overflow_wrap() != other.clone_overflow_wrap() {
79231            set.insert(LonghandId::OverflowWrap);
79232        }
79233        if self.clone_pointer_events() != other.clone_pointer_events() {
79234            set.insert(LonghandId::PointerEvents);
79235        }
79236        if self.clone_position() != other.clone_position() {
79237            set.insert(LonghandId::Position);
79238        }
79239        if self.clone__servo_overflow_clip_box() != other.clone__servo_overflow_clip_box() {
79240            set.insert(LonghandId::ServoOverflowClipBox);
79241        }
79242        if self.clone__servo_top_layer() != other.clone__servo_top_layer() {
79243            set.insert(LonghandId::ServoTopLayer);
79244        }
79245        if self.clone_table_layout() != other.clone_table_layout() {
79246            set.insert(LonghandId::TableLayout);
79247        }
79248        if self.clone_text_align() != other.clone_text_align() {
79249            set.insert(LonghandId::TextAlign);
79250        }
79251        if self.clone_text_align_last() != other.clone_text_align_last() {
79252            set.insert(LonghandId::TextAlignLast);
79253        }
79254        if self.clone_text_decoration_line() != other.clone_text_decoration_line() {
79255            set.insert(LonghandId::TextDecorationLine);
79256        }
79257        if self.clone_text_decoration_style() != other.clone_text_decoration_style() {
79258            set.insert(LonghandId::TextDecorationStyle);
79259        }
79260        if self.clone_text_justify() != other.clone_text_justify() {
79261            set.insert(LonghandId::TextJustify);
79262        }
79263        if self.clone_text_rendering() != other.clone_text_rendering() {
79264            set.insert(LonghandId::TextRendering);
79265        }
79266        if self.clone_text_transform() != other.clone_text_transform() {
79267            set.insert(LonghandId::TextTransform);
79268        }
79269        if self.clone_text_wrap_mode() != other.clone_text_wrap_mode() {
79270            set.insert(LonghandId::TextWrapMode);
79271        }
79272        if self.clone_transform_style() != other.clone_transform_style() {
79273            set.insert(LonghandId::TransformStyle);
79274        }
79275        if self.clone_unicode_bidi() != other.clone_unicode_bidi() {
79276            set.insert(LonghandId::UnicodeBidi);
79277        }
79278        if self.clone_visibility() != other.clone_visibility() {
79279            set.insert(LonghandId::Visibility);
79280        }
79281        if self.clone_white_space_collapse() != other.clone_white_space_collapse() {
79282            set.insert(LonghandId::WhiteSpaceCollapse);
79283        }
79284        if self.clone_word_break() != other.clone_word_break() {
79285            set.insert(LonghandId::WordBreak);
79286        }
79287        if self.clone_writing_mode() != other.clone_writing_mode() {
79288            set.insert(LonghandId::WritingMode);
79289        }
79290        if self.clone_z_index() != other.clone_z_index() {
79291            set.insert(LonghandId::ZIndex);
79292        }
79293        if self.clone_zoom() != other.clone_zoom() {
79294            set.insert(LonghandId::Zoom);
79295        }
79296        if self.clone_flex_grow() != other.clone_flex_grow() {
79297            set.insert(LonghandId::FlexGrow);
79298        }
79299        if self.clone_flex_shrink() != other.clone_flex_shrink() {
79300            set.insert(LonghandId::FlexShrink);
79301        }
79302        if self.clone_overflow_x() != other.clone_overflow_x() {
79303            set.insert(LonghandId::OverflowX);
79304        }
79305        if self.clone_overflow_y() != other.clone_overflow_y() {
79306            set.insert(LonghandId::OverflowY);
79307        }
79308        if self.clone_border_bottom_style() != other.clone_border_bottom_style() {
79309            set.insert(LonghandId::BorderBottomStyle);
79310        }
79311        if self.clone_border_left_style() != other.clone_border_left_style() {
79312            set.insert(LonghandId::BorderLeftStyle);
79313        }
79314        if self.clone_border_right_style() != other.clone_border_right_style() {
79315            set.insert(LonghandId::BorderRightStyle);
79316        }
79317        if self.clone_border_top_style() != other.clone_border_top_style() {
79318            set.insert(LonghandId::BorderTopStyle);
79319        }
79320        if self.clone_animation_composition() != other.clone_animation_composition() {
79321            set.insert(LonghandId::AnimationComposition);
79322        }
79323        if self.clone_animation_delay() != other.clone_animation_delay() {
79324            set.insert(LonghandId::AnimationDelay);
79325        }
79326        if self.clone_animation_direction() != other.clone_animation_direction() {
79327            set.insert(LonghandId::AnimationDirection);
79328        }
79329        if self.clone_animation_duration() != other.clone_animation_duration() {
79330            set.insert(LonghandId::AnimationDuration);
79331        }
79332        if self.clone_animation_fill_mode() != other.clone_animation_fill_mode() {
79333            set.insert(LonghandId::AnimationFillMode);
79334        }
79335        if self.clone_animation_iteration_count() != other.clone_animation_iteration_count() {
79336            set.insert(LonghandId::AnimationIterationCount);
79337        }
79338        if self.clone_animation_name() != other.clone_animation_name() {
79339            set.insert(LonghandId::AnimationName);
79340        }
79341        if self.clone_animation_play_state() != other.clone_animation_play_state() {
79342            set.insert(LonghandId::AnimationPlayState);
79343        }
79344        if self.clone_animation_timeline() != other.clone_animation_timeline() {
79345            set.insert(LonghandId::AnimationTimeline);
79346        }
79347        if self.clone_animation_timing_function() != other.clone_animation_timing_function() {
79348            set.insert(LonghandId::AnimationTimingFunction);
79349        }
79350        if self.clone_backdrop_filter() != other.clone_backdrop_filter() {
79351            set.insert(LonghandId::BackdropFilter);
79352        }
79353        if self.clone_background_attachment() != other.clone_background_attachment() {
79354            set.insert(LonghandId::BackgroundAttachment);
79355        }
79356        if self.clone_background_clip() != other.clone_background_clip() {
79357            set.insert(LonghandId::BackgroundClip);
79358        }
79359        if self.clone_background_image() != other.clone_background_image() {
79360            set.insert(LonghandId::BackgroundImage);
79361        }
79362        if self.clone_background_origin() != other.clone_background_origin() {
79363            set.insert(LonghandId::BackgroundOrigin);
79364        }
79365        if self.clone_background_position_x() != other.clone_background_position_x() {
79366            set.insert(LonghandId::BackgroundPositionX);
79367        }
79368        if self.clone_background_position_y() != other.clone_background_position_y() {
79369            set.insert(LonghandId::BackgroundPositionY);
79370        }
79371        if self.clone_background_repeat() != other.clone_background_repeat() {
79372            set.insert(LonghandId::BackgroundRepeat);
79373        }
79374        if self.clone_background_size() != other.clone_background_size() {
79375            set.insert(LonghandId::BackgroundSize);
79376        }
79377        if self.clone_border_image_outset() != other.clone_border_image_outset() {
79378            set.insert(LonghandId::BorderImageOutset);
79379        }
79380        if self.clone_border_image_slice() != other.clone_border_image_slice() {
79381            set.insert(LonghandId::BorderImageSlice);
79382        }
79383        if self.clone_border_image_width() != other.clone_border_image_width() {
79384            set.insert(LonghandId::BorderImageWidth);
79385        }
79386        if self.clone_border_spacing() != other.clone_border_spacing() {
79387            set.insert(LonghandId::BorderSpacing);
79388        }
79389        if self.clone_box_shadow() != other.clone_box_shadow() {
79390            set.insert(LonghandId::BoxShadow);
79391        }
79392        if self.clone_clip() != other.clone_clip() {
79393            set.insert(LonghandId::Clip);
79394        }
79395        if self.clone_clip_path() != other.clone_clip_path() {
79396            set.insert(LonghandId::ClipPath);
79397        }
79398        if self.clone_color() != other.clone_color() {
79399            set.insert(LonghandId::Color);
79400        }
79401        if self.clone_color_scheme() != other.clone_color_scheme() {
79402            set.insert(LonghandId::ColorScheme);
79403        }
79404        if self.clone_column_width() != other.clone_column_width() {
79405            set.insert(LonghandId::ColumnWidth);
79406        }
79407        if self.clone_container_name() != other.clone_container_name() {
79408            set.insert(LonghandId::ContainerName);
79409        }
79410        if self.clone_content() != other.clone_content() {
79411            set.insert(LonghandId::Content);
79412        }
79413        if self.clone_counter_increment() != other.clone_counter_increment() {
79414            set.insert(LonghandId::CounterIncrement);
79415        }
79416        if self.clone_counter_reset() != other.clone_counter_reset() {
79417            set.insert(LonghandId::CounterReset);
79418        }
79419        if self.clone_cursor() != other.clone_cursor() {
79420            set.insert(LonghandId::Cursor);
79421        }
79422        if self.clone_filter() != other.clone_filter() {
79423            set.insert(LonghandId::Filter);
79424        }
79425        if self.clone_flex_basis() != other.clone_flex_basis() {
79426            set.insert(LonghandId::FlexBasis);
79427        }
79428        if self.clone_font_family() != other.clone_font_family() {
79429            set.insert(LonghandId::FontFamily);
79430        }
79431        if self.clone_font_size() != other.clone_font_size() {
79432            set.insert(LonghandId::FontSize);
79433        }
79434        if self.clone_font_variation_settings() != other.clone_font_variation_settings() {
79435            set.insert(LonghandId::FontVariationSettings);
79436        }
79437        if self.clone_grid_template_areas() != other.clone_grid_template_areas() {
79438            set.insert(LonghandId::GridTemplateAreas);
79439        }
79440        if self.clone_letter_spacing() != other.clone_letter_spacing() {
79441            set.insert(LonghandId::LetterSpacing);
79442        }
79443        if self.clone_line_height() != other.clone_line_height() {
79444            set.insert(LonghandId::LineHeight);
79445        }
79446        if self.clone_mask_image() != other.clone_mask_image() {
79447            set.insert(LonghandId::MaskImage);
79448        }
79449        if self.clone_offset_path() != other.clone_offset_path() {
79450            set.insert(LonghandId::OffsetPath);
79451        }
79452        if self.clone_perspective() != other.clone_perspective() {
79453            set.insert(LonghandId::Perspective);
79454        }
79455        if self.clone_quotes() != other.clone_quotes() {
79456            set.insert(LonghandId::Quotes);
79457        }
79458        if self.clone_rotate() != other.clone_rotate() {
79459            set.insert(LonghandId::Rotate);
79460        }
79461        if self.clone_scale() != other.clone_scale() {
79462            set.insert(LonghandId::Scale);
79463        }
79464        if self.clone_text_indent() != other.clone_text_indent() {
79465            set.insert(LonghandId::TextIndent);
79466        }
79467        if self.clone_text_overflow() != other.clone_text_overflow() {
79468            set.insert(LonghandId::TextOverflow);
79469        }
79470        if self.clone_text_shadow() != other.clone_text_shadow() {
79471            set.insert(LonghandId::TextShadow);
79472        }
79473        if self.clone_transform() != other.clone_transform() {
79474            set.insert(LonghandId::Transform);
79475        }
79476        if self.clone_transform_origin() != other.clone_transform_origin() {
79477            set.insert(LonghandId::TransformOrigin);
79478        }
79479        if self.clone_transition_behavior() != other.clone_transition_behavior() {
79480            set.insert(LonghandId::TransitionBehavior);
79481        }
79482        if self.clone_transition_delay() != other.clone_transition_delay() {
79483            set.insert(LonghandId::TransitionDelay);
79484        }
79485        if self.clone_transition_duration() != other.clone_transition_duration() {
79486            set.insert(LonghandId::TransitionDuration);
79487        }
79488        if self.clone_transition_property() != other.clone_transition_property() {
79489            set.insert(LonghandId::TransitionProperty);
79490        }
79491        if self.clone_transition_timing_function() != other.clone_transition_timing_function() {
79492            set.insert(LonghandId::TransitionTimingFunction);
79493        }
79494        if self.clone_translate() != other.clone_translate() {
79495            set.insert(LonghandId::Translate);
79496        }
79497        if self.clone_vertical_align() != other.clone_vertical_align() {
79498            set.insert(LonghandId::VerticalAlign);
79499        }
79500        if self.clone_view_transition_class() != other.clone_view_transition_class() {
79501            set.insert(LonghandId::ViewTransitionClass);
79502        }
79503        if self.clone_view_transition_name() != other.clone_view_transition_name() {
79504            set.insert(LonghandId::ViewTransitionName);
79505        }
79506        if self.clone_will_change() != other.clone_will_change() {
79507            set.insert(LonghandId::WillChange);
79508        }
79509        if self.clone_word_spacing() != other.clone_word_spacing() {
79510            set.insert(LonghandId::WordSpacing);
79511        }
79512        if self.clone__x_lang() != other.clone__x_lang() {
79513            set.insert(LonghandId::XLang);
79514        }
79515        if self.clone_object_position() != other.clone_object_position() {
79516            set.insert(LonghandId::ObjectPosition);
79517        }
79518        if self.clone_perspective_origin() != other.clone_perspective_origin() {
79519            set.insert(LonghandId::PerspectiveOrigin);
79520        }
79521        if self.clone_grid_template_columns() != other.clone_grid_template_columns() {
79522            set.insert(LonghandId::GridTemplateColumns);
79523        }
79524        if self.clone_grid_template_rows() != other.clone_grid_template_rows() {
79525            set.insert(LonghandId::GridTemplateRows);
79526        }
79527        if self.clone_border_image_source() != other.clone_border_image_source() {
79528            set.insert(LonghandId::BorderImageSource);
79529        }
79530        if self.clone_list_style_image() != other.clone_list_style_image() {
79531            set.insert(LonghandId::ListStyleImage);
79532        }
79533        if self.clone_grid_auto_columns() != other.clone_grid_auto_columns() {
79534            set.insert(LonghandId::GridAutoColumns);
79535        }
79536        if self.clone_grid_auto_rows() != other.clone_grid_auto_rows() {
79537            set.insert(LonghandId::GridAutoRows);
79538        }
79539        if self.clone_outline_offset() != other.clone_outline_offset() {
79540            set.insert(LonghandId::OutlineOffset);
79541        }
79542        if self.clone_overflow_clip_margin() != other.clone_overflow_clip_margin() {
79543            set.insert(LonghandId::OverflowClipMargin);
79544        }
79545        if self.clone_column_gap() != other.clone_column_gap() {
79546            set.insert(LonghandId::ColumnGap);
79547        }
79548        if self.clone_row_gap() != other.clone_row_gap() {
79549            set.insert(LonghandId::RowGap);
79550        }
79551        if self.clone_grid_column_end() != other.clone_grid_column_end() {
79552            set.insert(LonghandId::GridColumnEnd);
79553        }
79554        if self.clone_grid_column_start() != other.clone_grid_column_start() {
79555            set.insert(LonghandId::GridColumnStart);
79556        }
79557        if self.clone_grid_row_end() != other.clone_grid_row_end() {
79558            set.insert(LonghandId::GridRowEnd);
79559        }
79560        if self.clone_grid_row_start() != other.clone_grid_row_start() {
79561            set.insert(LonghandId::GridRowStart);
79562        }
79563        if self.clone_max_height() != other.clone_max_height() {
79564            set.insert(LonghandId::MaxHeight);
79565        }
79566        if self.clone_max_width() != other.clone_max_width() {
79567            set.insert(LonghandId::MaxWidth);
79568        }
79569        if self.clone_border_bottom_left_radius() != other.clone_border_bottom_left_radius() {
79570            set.insert(LonghandId::BorderBottomLeftRadius);
79571        }
79572        if self.clone_border_bottom_right_radius() != other.clone_border_bottom_right_radius() {
79573            set.insert(LonghandId::BorderBottomRightRadius);
79574        }
79575        if self.clone_border_top_left_radius() != other.clone_border_top_left_radius() {
79576            set.insert(LonghandId::BorderTopLeftRadius);
79577        }
79578        if self.clone_border_top_right_radius() != other.clone_border_top_right_radius() {
79579            set.insert(LonghandId::BorderTopRightRadius);
79580        }
79581        if self.clone_bottom() != other.clone_bottom() {
79582            set.insert(LonghandId::Bottom);
79583        }
79584        if self.clone_left() != other.clone_left() {
79585            set.insert(LonghandId::Left);
79586        }
79587        if self.clone_right() != other.clone_right() {
79588            set.insert(LonghandId::Right);
79589        }
79590        if self.clone_top() != other.clone_top() {
79591            set.insert(LonghandId::Top);
79592        }
79593        if self.clone_margin_bottom() != other.clone_margin_bottom() {
79594            set.insert(LonghandId::MarginBottom);
79595        }
79596        if self.clone_margin_left() != other.clone_margin_left() {
79597            set.insert(LonghandId::MarginLeft);
79598        }
79599        if self.clone_margin_right() != other.clone_margin_right() {
79600            set.insert(LonghandId::MarginRight);
79601        }
79602        if self.clone_margin_top() != other.clone_margin_top() {
79603            set.insert(LonghandId::MarginTop);
79604        }
79605        if self.clone_padding_bottom() != other.clone_padding_bottom() {
79606            set.insert(LonghandId::PaddingBottom);
79607        }
79608        if self.clone_padding_left() != other.clone_padding_left() {
79609            set.insert(LonghandId::PaddingLeft);
79610        }
79611        if self.clone_padding_right() != other.clone_padding_right() {
79612            set.insert(LonghandId::PaddingRight);
79613        }
79614        if self.clone_padding_top() != other.clone_padding_top() {
79615            set.insert(LonghandId::PaddingTop);
79616        }
79617        if self.clone_height() != other.clone_height() {
79618            set.insert(LonghandId::Height);
79619        }
79620        if self.clone_min_height() != other.clone_min_height() {
79621            set.insert(LonghandId::MinHeight);
79622        }
79623        if self.clone_min_width() != other.clone_min_width() {
79624            set.insert(LonghandId::MinWidth);
79625        }
79626        if self.clone_width() != other.clone_width() {
79627            set.insert(LonghandId::Width);
79628        }
79629        if self.clone_border_bottom_width() != other.clone_border_bottom_width() {
79630            set.insert(LonghandId::BorderBottomWidth);
79631        }
79632        if self.clone_border_left_width() != other.clone_border_left_width() {
79633            set.insert(LonghandId::BorderLeftWidth);
79634        }
79635        if self.clone_border_right_width() != other.clone_border_right_width() {
79636            set.insert(LonghandId::BorderRightWidth);
79637        }
79638        if self.clone_border_top_width() != other.clone_border_top_width() {
79639            set.insert(LonghandId::BorderTopWidth);
79640        }
79641        if self.clone_outline_width() != other.clone_outline_width() {
79642            set.insert(LonghandId::OutlineWidth);
79643        }
79644        if self.clone_background_color() != other.clone_background_color() {
79645            set.insert(LonghandId::BackgroundColor);
79646        }
79647        if self.clone_border_bottom_color() != other.clone_border_bottom_color() {
79648            set.insert(LonghandId::BorderBottomColor);
79649        }
79650        if self.clone_border_left_color() != other.clone_border_left_color() {
79651            set.insert(LonghandId::BorderLeftColor);
79652        }
79653        if self.clone_border_right_color() != other.clone_border_right_color() {
79654            set.insert(LonghandId::BorderRightColor);
79655        }
79656        if self.clone_border_top_color() != other.clone_border_top_color() {
79657            set.insert(LonghandId::BorderTopColor);
79658        }
79659        if self.clone_outline_color() != other.clone_outline_color() {
79660            set.insert(LonghandId::OutlineColor);
79661        }
79662        if self.clone_text_decoration_color() != other.clone_text_decoration_color() {
79663            set.insert(LonghandId::TextDecorationColor);
79664        }
79665        set
79666    }
79667
79668    /// Create a `TransitionPropertyIterator` for this styles transition properties.
79669    pub fn transition_properties<'a>(
79670        &'a self
79671    ) -> animated_properties::TransitionPropertyIterator<'a> {
79672        animated_properties::TransitionPropertyIterator::from_style(self)
79673    }
79674}
79675
79676#[cfg(feature = "servo")]
79677impl ComputedValues {
79678    /// Create a new refcounted `ComputedValues`
79679    pub fn new(
79680        pseudo: Option<&PseudoElement>,
79681        custom_properties: crate::custom_properties::ComputedCustomProperties,
79682        writing_mode: WritingMode,
79683        effective_zoom: computed::Zoom,
79684        flags: ComputedValueFlags,
79685        rules: Option<StrongRuleNode>,
79686        visited_style: Option<Arc<ComputedValues>>,
79687        background: Arc<style_structs::Background>,
79688        border: Arc<style_structs::Border>,
79689        box_: Arc<style_structs::Box>,
79690        column: Arc<style_structs::Column>,
79691        counters: Arc<style_structs::Counters>,
79692        effects: Arc<style_structs::Effects>,
79693        font: Arc<style_structs::Font>,
79694        inherited_box: Arc<style_structs::InheritedBox>,
79695        inherited_table: Arc<style_structs::InheritedTable>,
79696        inherited_text: Arc<style_structs::InheritedText>,
79697        inherited_ui: Arc<style_structs::InheritedUI>,
79698        list: Arc<style_structs::List>,
79699        margin: Arc<style_structs::Margin>,
79700        outline: Arc<style_structs::Outline>,
79701        padding: Arc<style_structs::Padding>,
79702        position: Arc<style_structs::Position>,
79703        svg: Arc<style_structs::SVG>,
79704        table: Arc<style_structs::Table>,
79705        text: Arc<style_structs::Text>,
79706        ui: Arc<style_structs::UI>,
79707    ) -> Arc<Self> {
79708        Arc::new(Self {
79709            inner: ComputedValuesInner {
79710                custom_properties,
79711                writing_mode,
79712                rules,
79713                visited_style,
79714                effective_zoom,
79715                flags,
79716                background,
79717                border,
79718                box_,
79719                column,
79720                counters,
79721                effects,
79722                font,
79723                inherited_box,
79724                inherited_table,
79725                inherited_text,
79726                inherited_ui,
79727                list,
79728                margin,
79729                outline,
79730                padding,
79731                position,
79732                svg,
79733                table,
79734                text,
79735                ui,
79736            },
79737            pseudo: pseudo.cloned(),
79738        })
79739    }
79740
79741    /// Get the initial computed values.
79742    pub fn initial_values_with_font_override(default_font: super::style_structs::Font) -> Arc<Self> {
79743        use crate::computed_value_flags::ComputedValueFlags;
79744        use servo_arc::Arc;
79745        use super::{ComputedValues, ComputedValuesInner, longhands, style_structs};
79746
79747        Arc::new(ComputedValues {
79748            inner: ComputedValuesInner {
79749
79750                    background: Arc::new(style_structs::Background {
79751                                background_color: longhands::background_color::get_initial_value(),
79752                                background_image: longhands::background_image::get_initial_value(),
79753                                background_position_x: longhands::background_position_x::get_initial_value(),
79754                                background_position_y: longhands::background_position_y::get_initial_value(),
79755                                background_repeat: longhands::background_repeat::get_initial_value(),
79756                                background_attachment: longhands::background_attachment::get_initial_value(),
79757                                background_clip: longhands::background_clip::get_initial_value(),
79758                                background_origin: longhands::background_origin::get_initial_value(),
79759                                background_size: longhands::background_size::get_initial_value(),
79760                    }),
79761
79762                    border: Arc::new(style_structs::Border {
79763                                border_top_color: longhands::border_top_color::get_initial_value(),
79764                                border_top_style: longhands::border_top_style::get_initial_value(),
79765                                border_top_width: longhands::border_top_width::get_initial_value(),
79766                                border_right_color: longhands::border_right_color::get_initial_value(),
79767                                border_right_style: longhands::border_right_style::get_initial_value(),
79768                                border_right_width: longhands::border_right_width::get_initial_value(),
79769                                border_bottom_color: longhands::border_bottom_color::get_initial_value(),
79770                                border_bottom_style: longhands::border_bottom_style::get_initial_value(),
79771                                border_bottom_width: longhands::border_bottom_width::get_initial_value(),
79772                                border_left_color: longhands::border_left_color::get_initial_value(),
79773                                border_left_style: longhands::border_left_style::get_initial_value(),
79774                                border_left_width: longhands::border_left_width::get_initial_value(),
79775                                border_top_left_radius: longhands::border_top_left_radius::get_initial_value(),
79776                                border_top_right_radius: longhands::border_top_right_radius::get_initial_value(),
79777                                border_bottom_right_radius: longhands::border_bottom_right_radius::get_initial_value(),
79778                                border_bottom_left_radius: longhands::border_bottom_left_radius::get_initial_value(),
79779                                border_image_source: longhands::border_image_source::get_initial_value(),
79780                                border_image_outset: longhands::border_image_outset::get_initial_value(),
79781                                border_image_repeat: longhands::border_image_repeat::get_initial_value(),
79782                                border_image_width: longhands::border_image_width::get_initial_value(),
79783                                border_image_slice: longhands::border_image_slice::get_initial_value(),
79784                    }),
79785
79786                    box_: Arc::new(style_structs::Box {
79787                                display: longhands::display::get_initial_value(),
79788                                _servo_top_layer: longhands::_servo_top_layer::get_initial_value(),
79789                                position: longhands::position::get_initial_value(),
79790                                float: longhands::float::get_initial_value(),
79791                                clear: longhands::clear::get_initial_value(),
79792                                vertical_align: longhands::vertical_align::get_initial_value(),
79793                                baseline_source: longhands::baseline_source::get_initial_value(),
79794                                _servo_overflow_clip_box: longhands::_servo_overflow_clip_box::get_initial_value(),
79795                                overflow_y: longhands::overflow_y::get_initial_value(),
79796                                overflow_x: longhands::overflow_x::get_initial_value(),
79797                                transform: longhands::transform::get_initial_value(),
79798                                rotate: longhands::rotate::get_initial_value(),
79799                                scale: longhands::scale::get_initial_value(),
79800                                translate: longhands::translate::get_initial_value(),
79801                                offset_path: longhands::offset_path::get_initial_value(),
79802                                isolation: longhands::isolation::get_initial_value(),
79803                                perspective: longhands::perspective::get_initial_value(),
79804                                perspective_origin: longhands::perspective_origin::get_initial_value(),
79805                                backface_visibility: longhands::backface_visibility::get_initial_value(),
79806                                transform_style: longhands::transform_style::get_initial_value(),
79807                                transform_origin: longhands::transform_origin::get_initial_value(),
79808                                contain: longhands::contain::get_initial_value(),
79809                                container_type: longhands::container_type::get_initial_value(),
79810                                container_name: longhands::container_name::get_initial_value(),
79811                                will_change: longhands::will_change::get_initial_value(),
79812                                zoom: longhands::zoom::get_initial_value(),
79813                            original_display: longhands::display::get_initial_value(),
79814                    }),
79815
79816                    column: Arc::new(style_structs::Column {
79817                                column_width: longhands::column_width::get_initial_value(),
79818                                column_count: longhands::column_count::get_initial_value(),
79819                                column_span: longhands::column_span::get_initial_value(),
79820                    }),
79821
79822                    counters: Arc::new(style_structs::Counters {
79823                                content: longhands::content::get_initial_value(),
79824                                counter_increment: longhands::counter_increment::get_initial_value(),
79825                                counter_reset: longhands::counter_reset::get_initial_value(),
79826                    }),
79827
79828                    effects: Arc::new(style_structs::Effects {
79829                                opacity: longhands::opacity::get_initial_value(),
79830                                box_shadow: longhands::box_shadow::get_initial_value(),
79831                                clip: longhands::clip::get_initial_value(),
79832                                filter: longhands::filter::get_initial_value(),
79833                                backdrop_filter: longhands::backdrop_filter::get_initial_value(),
79834                                mix_blend_mode: longhands::mix_blend_mode::get_initial_value(),
79835                    }),
79836                        font: Arc::new(default_font),
79837                    
79838                    inherited_box: Arc::new(style_structs::InheritedBox {
79839                                visibility: longhands::visibility::get_initial_value(),
79840                                writing_mode: longhands::writing_mode::get_initial_value(),
79841                                direction: longhands::direction::get_initial_value(),
79842                                image_rendering: longhands::image_rendering::get_initial_value(),
79843                    }),
79844
79845                    inherited_table: Arc::new(style_structs::InheritedTable {
79846                                border_collapse: longhands::border_collapse::get_initial_value(),
79847                                empty_cells: longhands::empty_cells::get_initial_value(),
79848                                caption_side: longhands::caption_side::get_initial_value(),
79849                                border_spacing: longhands::border_spacing::get_initial_value(),
79850                    }),
79851
79852                    inherited_text: Arc::new(style_structs::InheritedText {
79853                                color: longhands::color::get_initial_value(),
79854                                text_transform: longhands::text_transform::get_initial_value(),
79855                                text_indent: longhands::text_indent::get_initial_value(),
79856                                overflow_wrap: longhands::overflow_wrap::get_initial_value(),
79857                                word_break: longhands::word_break::get_initial_value(),
79858                                text_justify: longhands::text_justify::get_initial_value(),
79859                                text_align_last: longhands::text_align_last::get_initial_value(),
79860                                text_align: longhands::text_align::get_initial_value(),
79861                                letter_spacing: longhands::letter_spacing::get_initial_value(),
79862                                word_spacing: longhands::word_spacing::get_initial_value(),
79863                                white_space_collapse: longhands::white_space_collapse::get_initial_value(),
79864                                text_shadow: longhands::text_shadow::get_initial_value(),
79865                                text_rendering: longhands::text_rendering::get_initial_value(),
79866                                text_wrap_mode: longhands::text_wrap_mode::get_initial_value(),
79867                    }),
79868
79869                    inherited_ui: Arc::new(style_structs::InheritedUI {
79870                                cursor: longhands::cursor::get_initial_value(),
79871                                pointer_events: longhands::pointer_events::get_initial_value(),
79872                                color_scheme: longhands::color_scheme::get_initial_value(),
79873                    }),
79874
79875                    list: Arc::new(style_structs::List {
79876                                list_style_position: longhands::list_style_position::get_initial_value(),
79877                                list_style_type: longhands::list_style_type::get_initial_value(),
79878                                list_style_image: longhands::list_style_image::get_initial_value(),
79879                                quotes: longhands::quotes::get_initial_value(),
79880                    }),
79881
79882                    margin: Arc::new(style_structs::Margin {
79883                                margin_top: longhands::margin_top::get_initial_value(),
79884                                margin_right: longhands::margin_right::get_initial_value(),
79885                                margin_bottom: longhands::margin_bottom::get_initial_value(),
79886                                margin_left: longhands::margin_left::get_initial_value(),
79887                                overflow_clip_margin: longhands::overflow_clip_margin::get_initial_value(),
79888                    }),
79889
79890                    outline: Arc::new(style_structs::Outline {
79891                                outline_color: longhands::outline_color::get_initial_value(),
79892                                outline_style: longhands::outline_style::get_initial_value(),
79893                                outline_width: longhands::outline_width::get_initial_value(),
79894                                outline_offset: longhands::outline_offset::get_initial_value(),
79895                    }),
79896
79897                    padding: Arc::new(style_structs::Padding {
79898                                padding_top: longhands::padding_top::get_initial_value(),
79899                                padding_right: longhands::padding_right::get_initial_value(),
79900                                padding_bottom: longhands::padding_bottom::get_initial_value(),
79901                                padding_left: longhands::padding_left::get_initial_value(),
79902                    }),
79903
79904                    position: Arc::new(style_structs::Position {
79905                                top: longhands::top::get_initial_value(),
79906                                right: longhands::right::get_initial_value(),
79907                                bottom: longhands::bottom::get_initial_value(),
79908                                left: longhands::left::get_initial_value(),
79909                                z_index: longhands::z_index::get_initial_value(),
79910                                flex_direction: longhands::flex_direction::get_initial_value(),
79911                                flex_wrap: longhands::flex_wrap::get_initial_value(),
79912                                justify_content: longhands::justify_content::get_initial_value(),
79913                                align_content: longhands::align_content::get_initial_value(),
79914                                align_items: longhands::align_items::get_initial_value(),
79915                                justify_items: longhands::justify_items::get_initial_value(),
79916                                flex_grow: longhands::flex_grow::get_initial_value(),
79917                                flex_shrink: longhands::flex_shrink::get_initial_value(),
79918                                align_self: longhands::align_self::get_initial_value(),
79919                                justify_self: longhands::justify_self::get_initial_value(),
79920                                order: longhands::order::get_initial_value(),
79921                                flex_basis: longhands::flex_basis::get_initial_value(),
79922                                height: longhands::height::get_initial_value(),
79923                                min_height: longhands::min_height::get_initial_value(),
79924                                max_height: longhands::max_height::get_initial_value(),
79925                                width: longhands::width::get_initial_value(),
79926                                min_width: longhands::min_width::get_initial_value(),
79927                                max_width: longhands::max_width::get_initial_value(),
79928                                box_sizing: longhands::box_sizing::get_initial_value(),
79929                                object_fit: longhands::object_fit::get_initial_value(),
79930                                object_position: longhands::object_position::get_initial_value(),
79931                                grid_row_start: longhands::grid_row_start::get_initial_value(),
79932                                grid_row_end: longhands::grid_row_end::get_initial_value(),
79933                                grid_auto_rows: longhands::grid_auto_rows::get_initial_value(),
79934                                grid_template_rows: longhands::grid_template_rows::get_initial_value(),
79935                                grid_column_start: longhands::grid_column_start::get_initial_value(),
79936                                grid_column_end: longhands::grid_column_end::get_initial_value(),
79937                                grid_auto_columns: longhands::grid_auto_columns::get_initial_value(),
79938                                grid_template_columns: longhands::grid_template_columns::get_initial_value(),
79939                                grid_auto_flow: longhands::grid_auto_flow::get_initial_value(),
79940                                grid_template_areas: longhands::grid_template_areas::get_initial_value(),
79941                                column_gap: longhands::column_gap::get_initial_value(),
79942                                row_gap: longhands::row_gap::get_initial_value(),
79943                                aspect_ratio: longhands::aspect_ratio::get_initial_value(),
79944                    }),
79945
79946                    svg: Arc::new(style_structs::SVG {
79947                                clip_path: longhands::clip_path::get_initial_value(),
79948                                mask_image: longhands::mask_image::get_initial_value(),
79949                    }),
79950
79951                    table: Arc::new(style_structs::Table {
79952                                table_layout: longhands::table_layout::get_initial_value(),
79953                    }),
79954
79955                    text: Arc::new(style_structs::Text {
79956                                text_overflow: longhands::text_overflow::get_initial_value(),
79957                                unicode_bidi: longhands::unicode_bidi::get_initial_value(),
79958                                text_decoration_line: longhands::text_decoration_line::get_initial_value(),
79959                                text_decoration_style: longhands::text_decoration_style::get_initial_value(),
79960                                text_decoration_color: longhands::text_decoration_color::get_initial_value(),
79961                    }),
79962
79963                    ui: Arc::new(style_structs::UI {
79964                                transition_duration: longhands::transition_duration::get_initial_value(),
79965                                transition_timing_function: longhands::transition_timing_function::get_initial_value(),
79966                                transition_property: longhands::transition_property::get_initial_value(),
79967                                transition_delay: longhands::transition_delay::get_initial_value(),
79968                                transition_behavior: longhands::transition_behavior::get_initial_value(),
79969                                animation_name: longhands::animation_name::get_initial_value(),
79970                                animation_duration: longhands::animation_duration::get_initial_value(),
79971                                animation_timing_function: longhands::animation_timing_function::get_initial_value(),
79972                                animation_iteration_count: longhands::animation_iteration_count::get_initial_value(),
79973                                animation_direction: longhands::animation_direction::get_initial_value(),
79974                                animation_play_state: longhands::animation_play_state::get_initial_value(),
79975                                animation_fill_mode: longhands::animation_fill_mode::get_initial_value(),
79976                                animation_composition: longhands::animation_composition::get_initial_value(),
79977                                animation_delay: longhands::animation_delay::get_initial_value(),
79978                                animation_timeline: longhands::animation_timeline::get_initial_value(),
79979                                view_transition_name: longhands::view_transition_name::get_initial_value(),
79980                                view_transition_class: longhands::view_transition_class::get_initial_value(),
79981                    }),
79982                custom_properties: crate::custom_properties::ComputedCustomProperties::default(),
79983                writing_mode: WritingMode::empty(),
79984                rules: None,
79985                visited_style: None,
79986                effective_zoom: crate::values::computed::Zoom::ONE,
79987                flags: ComputedValueFlags::empty(),
79988            },
79989            pseudo: None,
79990        })
79991    }
79992
79993    /// Converts the computed values to an Arc<> from a reference.
79994    pub fn to_arc(&self) -> Arc<Self> {
79995        // SAFETY: We're guaranteed to be allocated as an Arc<> since the
79996        // functions above are the only ones that create ComputedValues
79997        // instances in Servo (and that must be the case since ComputedValues'
79998        // member is private).
79999        unsafe { Arc::from_raw_addrefed(self) }
80000    }
80001
80002    /// Serializes the computed value of this property as a string.
80003    pub fn computed_value_to_string(&self, property: PropertyDeclarationId) -> String {
80004        match property {
80005            PropertyDeclarationId::Longhand(id) => {
80006                let context = resolved::Context {
80007                    style: self,
80008                };
80009                let mut s = String::new();
80010                self.computed_or_resolved_value(
80011                    id,
80012                    Some(&context),
80013                    &mut s
80014                ).unwrap();
80015                s
80016            }
80017            PropertyDeclarationId::Custom(name) => {
80018                // FIXME(bug 1869476): This should use a stylist to determine
80019                // whether the name corresponds to an inherited custom property
80020                // and then choose the inherited/non_inherited map accordingly.
80021                let p = &self.custom_properties;
80022                let value = p
80023                    .inherited
80024                    .get(name)
80025                    .or_else(|| p.non_inherited.get(name));
80026                value.map_or(String::new(), |value| value.to_css_string())
80027            }
80028        }
80029    }
80030}
80031
80032#[cfg(feature = "servo")]
80033impl ops::Deref for ComputedValues {
80034    type Target = ComputedValuesInner;
80035    fn deref(&self) -> &ComputedValuesInner {
80036        &self.inner
80037    }
80038}
80039
80040#[cfg(feature = "servo")]
80041impl ops::DerefMut for ComputedValues {
80042    fn deref_mut(&mut self) -> &mut ComputedValuesInner {
80043        &mut self.inner
80044    }
80045}
80046
80047#[cfg(feature = "servo")]
80048impl ComputedValuesInner {
80049    /// Returns the visited style, if any.
80050    pub fn visited_style(&self) -> Option<&ComputedValues> {
80051        self.visited_style.as_deref()
80052    }
80053
80054        /// Clone the Background struct.
80055        #[inline]
80056        pub fn clone_background(&self) -> Arc<style_structs::Background> {
80057            self.background.clone()
80058        }
80059
80060        /// Get a immutable reference to the Background struct.
80061        #[inline]
80062        pub fn get_background(&self) -> &style_structs::Background {
80063            &self.background
80064        }
80065
80066        /// Get a mutable reference to the Background struct.
80067        #[inline]
80068        pub fn mutate_background(&mut self) -> &mut style_structs::Background {
80069            Arc::make_mut(&mut self.background)
80070        }
80071        /// Clone the Border struct.
80072        #[inline]
80073        pub fn clone_border(&self) -> Arc<style_structs::Border> {
80074            self.border.clone()
80075        }
80076
80077        /// Get a immutable reference to the Border struct.
80078        #[inline]
80079        pub fn get_border(&self) -> &style_structs::Border {
80080            &self.border
80081        }
80082
80083        /// Get a mutable reference to the Border struct.
80084        #[inline]
80085        pub fn mutate_border(&mut self) -> &mut style_structs::Border {
80086            Arc::make_mut(&mut self.border)
80087        }
80088        /// Clone the Box struct.
80089        #[inline]
80090        pub fn clone_box(&self) -> Arc<style_structs::Box> {
80091            self.box_.clone()
80092        }
80093
80094        /// Get a immutable reference to the Box struct.
80095        #[inline]
80096        pub fn get_box(&self) -> &style_structs::Box {
80097            &self.box_
80098        }
80099
80100        /// Get a mutable reference to the Box struct.
80101        #[inline]
80102        pub fn mutate_box(&mut self) -> &mut style_structs::Box {
80103            Arc::make_mut(&mut self.box_)
80104        }
80105        /// Clone the Column struct.
80106        #[inline]
80107        pub fn clone_column(&self) -> Arc<style_structs::Column> {
80108            self.column.clone()
80109        }
80110
80111        /// Get a immutable reference to the Column struct.
80112        #[inline]
80113        pub fn get_column(&self) -> &style_structs::Column {
80114            &self.column
80115        }
80116
80117        /// Get a mutable reference to the Column struct.
80118        #[inline]
80119        pub fn mutate_column(&mut self) -> &mut style_structs::Column {
80120            Arc::make_mut(&mut self.column)
80121        }
80122        /// Clone the Counters struct.
80123        #[inline]
80124        pub fn clone_counters(&self) -> Arc<style_structs::Counters> {
80125            self.counters.clone()
80126        }
80127
80128        /// Get a immutable reference to the Counters struct.
80129        #[inline]
80130        pub fn get_counters(&self) -> &style_structs::Counters {
80131            &self.counters
80132        }
80133
80134        /// Get a mutable reference to the Counters struct.
80135        #[inline]
80136        pub fn mutate_counters(&mut self) -> &mut style_structs::Counters {
80137            Arc::make_mut(&mut self.counters)
80138        }
80139        /// Clone the Effects struct.
80140        #[inline]
80141        pub fn clone_effects(&self) -> Arc<style_structs::Effects> {
80142            self.effects.clone()
80143        }
80144
80145        /// Get a immutable reference to the Effects struct.
80146        #[inline]
80147        pub fn get_effects(&self) -> &style_structs::Effects {
80148            &self.effects
80149        }
80150
80151        /// Get a mutable reference to the Effects struct.
80152        #[inline]
80153        pub fn mutate_effects(&mut self) -> &mut style_structs::Effects {
80154            Arc::make_mut(&mut self.effects)
80155        }
80156        /// Clone the Font struct.
80157        #[inline]
80158        pub fn clone_font(&self) -> Arc<style_structs::Font> {
80159            self.font.clone()
80160        }
80161
80162        /// Get a immutable reference to the Font struct.
80163        #[inline]
80164        pub fn get_font(&self) -> &style_structs::Font {
80165            &self.font
80166        }
80167
80168        /// Get a mutable reference to the Font struct.
80169        #[inline]
80170        pub fn mutate_font(&mut self) -> &mut style_structs::Font {
80171            Arc::make_mut(&mut self.font)
80172        }
80173        /// Clone the InheritedBox struct.
80174        #[inline]
80175        pub fn clone_inherited_box(&self) -> Arc<style_structs::InheritedBox> {
80176            self.inherited_box.clone()
80177        }
80178
80179        /// Get a immutable reference to the InheritedBox struct.
80180        #[inline]
80181        pub fn get_inherited_box(&self) -> &style_structs::InheritedBox {
80182            &self.inherited_box
80183        }
80184
80185        /// Get a mutable reference to the InheritedBox struct.
80186        #[inline]
80187        pub fn mutate_inherited_box(&mut self) -> &mut style_structs::InheritedBox {
80188            Arc::make_mut(&mut self.inherited_box)
80189        }
80190        /// Clone the InheritedTable struct.
80191        #[inline]
80192        pub fn clone_inherited_table(&self) -> Arc<style_structs::InheritedTable> {
80193            self.inherited_table.clone()
80194        }
80195
80196        /// Get a immutable reference to the InheritedTable struct.
80197        #[inline]
80198        pub fn get_inherited_table(&self) -> &style_structs::InheritedTable {
80199            &self.inherited_table
80200        }
80201
80202        /// Get a mutable reference to the InheritedTable struct.
80203        #[inline]
80204        pub fn mutate_inherited_table(&mut self) -> &mut style_structs::InheritedTable {
80205            Arc::make_mut(&mut self.inherited_table)
80206        }
80207        /// Clone the InheritedText struct.
80208        #[inline]
80209        pub fn clone_inherited_text(&self) -> Arc<style_structs::InheritedText> {
80210            self.inherited_text.clone()
80211        }
80212
80213        /// Get a immutable reference to the InheritedText struct.
80214        #[inline]
80215        pub fn get_inherited_text(&self) -> &style_structs::InheritedText {
80216            &self.inherited_text
80217        }
80218
80219        /// Get a mutable reference to the InheritedText struct.
80220        #[inline]
80221        pub fn mutate_inherited_text(&mut self) -> &mut style_structs::InheritedText {
80222            Arc::make_mut(&mut self.inherited_text)
80223        }
80224        /// Clone the InheritedUI struct.
80225        #[inline]
80226        pub fn clone_inherited_ui(&self) -> Arc<style_structs::InheritedUI> {
80227            self.inherited_ui.clone()
80228        }
80229
80230        /// Get a immutable reference to the InheritedUI struct.
80231        #[inline]
80232        pub fn get_inherited_ui(&self) -> &style_structs::InheritedUI {
80233            &self.inherited_ui
80234        }
80235
80236        /// Get a mutable reference to the InheritedUI struct.
80237        #[inline]
80238        pub fn mutate_inherited_ui(&mut self) -> &mut style_structs::InheritedUI {
80239            Arc::make_mut(&mut self.inherited_ui)
80240        }
80241        /// Clone the List struct.
80242        #[inline]
80243        pub fn clone_list(&self) -> Arc<style_structs::List> {
80244            self.list.clone()
80245        }
80246
80247        /// Get a immutable reference to the List struct.
80248        #[inline]
80249        pub fn get_list(&self) -> &style_structs::List {
80250            &self.list
80251        }
80252
80253        /// Get a mutable reference to the List struct.
80254        #[inline]
80255        pub fn mutate_list(&mut self) -> &mut style_structs::List {
80256            Arc::make_mut(&mut self.list)
80257        }
80258        /// Clone the Margin struct.
80259        #[inline]
80260        pub fn clone_margin(&self) -> Arc<style_structs::Margin> {
80261            self.margin.clone()
80262        }
80263
80264        /// Get a immutable reference to the Margin struct.
80265        #[inline]
80266        pub fn get_margin(&self) -> &style_structs::Margin {
80267            &self.margin
80268        }
80269
80270        /// Get a mutable reference to the Margin struct.
80271        #[inline]
80272        pub fn mutate_margin(&mut self) -> &mut style_structs::Margin {
80273            Arc::make_mut(&mut self.margin)
80274        }
80275        /// Clone the Outline struct.
80276        #[inline]
80277        pub fn clone_outline(&self) -> Arc<style_structs::Outline> {
80278            self.outline.clone()
80279        }
80280
80281        /// Get a immutable reference to the Outline struct.
80282        #[inline]
80283        pub fn get_outline(&self) -> &style_structs::Outline {
80284            &self.outline
80285        }
80286
80287        /// Get a mutable reference to the Outline struct.
80288        #[inline]
80289        pub fn mutate_outline(&mut self) -> &mut style_structs::Outline {
80290            Arc::make_mut(&mut self.outline)
80291        }
80292        /// Clone the Padding struct.
80293        #[inline]
80294        pub fn clone_padding(&self) -> Arc<style_structs::Padding> {
80295            self.padding.clone()
80296        }
80297
80298        /// Get a immutable reference to the Padding struct.
80299        #[inline]
80300        pub fn get_padding(&self) -> &style_structs::Padding {
80301            &self.padding
80302        }
80303
80304        /// Get a mutable reference to the Padding struct.
80305        #[inline]
80306        pub fn mutate_padding(&mut self) -> &mut style_structs::Padding {
80307            Arc::make_mut(&mut self.padding)
80308        }
80309        /// Clone the Position struct.
80310        #[inline]
80311        pub fn clone_position(&self) -> Arc<style_structs::Position> {
80312            self.position.clone()
80313        }
80314
80315        /// Get a immutable reference to the Position struct.
80316        #[inline]
80317        pub fn get_position(&self) -> &style_structs::Position {
80318            &self.position
80319        }
80320
80321        /// Get a mutable reference to the Position struct.
80322        #[inline]
80323        pub fn mutate_position(&mut self) -> &mut style_structs::Position {
80324            Arc::make_mut(&mut self.position)
80325        }
80326        /// Clone the SVG struct.
80327        #[inline]
80328        pub fn clone_svg(&self) -> Arc<style_structs::SVG> {
80329            self.svg.clone()
80330        }
80331
80332        /// Get a immutable reference to the SVG struct.
80333        #[inline]
80334        pub fn get_svg(&self) -> &style_structs::SVG {
80335            &self.svg
80336        }
80337
80338        /// Get a mutable reference to the SVG struct.
80339        #[inline]
80340        pub fn mutate_svg(&mut self) -> &mut style_structs::SVG {
80341            Arc::make_mut(&mut self.svg)
80342        }
80343        /// Clone the Table struct.
80344        #[inline]
80345        pub fn clone_table(&self) -> Arc<style_structs::Table> {
80346            self.table.clone()
80347        }
80348
80349        /// Get a immutable reference to the Table struct.
80350        #[inline]
80351        pub fn get_table(&self) -> &style_structs::Table {
80352            &self.table
80353        }
80354
80355        /// Get a mutable reference to the Table struct.
80356        #[inline]
80357        pub fn mutate_table(&mut self) -> &mut style_structs::Table {
80358            Arc::make_mut(&mut self.table)
80359        }
80360        /// Clone the Text struct.
80361        #[inline]
80362        pub fn clone_text(&self) -> Arc<style_structs::Text> {
80363            self.text.clone()
80364        }
80365
80366        /// Get a immutable reference to the Text struct.
80367        #[inline]
80368        pub fn get_text(&self) -> &style_structs::Text {
80369            &self.text
80370        }
80371
80372        /// Get a mutable reference to the Text struct.
80373        #[inline]
80374        pub fn mutate_text(&mut self) -> &mut style_structs::Text {
80375            Arc::make_mut(&mut self.text)
80376        }
80377        /// Clone the UI struct.
80378        #[inline]
80379        pub fn clone_ui(&self) -> Arc<style_structs::UI> {
80380            self.ui.clone()
80381        }
80382
80383        /// Get a immutable reference to the UI struct.
80384        #[inline]
80385        pub fn get_ui(&self) -> &style_structs::UI {
80386            &self.ui
80387        }
80388
80389        /// Get a mutable reference to the UI struct.
80390        #[inline]
80391        pub fn mutate_ui(&mut self) -> &mut style_structs::UI {
80392            Arc::make_mut(&mut self.ui)
80393        }
80394
80395    /// Gets a reference to the rule node. Panic if no rule node exists.
80396    pub fn rules(&self) -> &StrongRuleNode {
80397        self.rules.as_ref().unwrap()
80398    }
80399
80400    #[inline]
80401    /// Returns whether the "content" property for the given style is completely
80402    /// ineffective, and would yield an empty `::before` or `::after`
80403    /// pseudo-element.
80404    pub fn ineffective_content_property(&self) -> bool {
80405        use crate::values::generics::counters::Content;
80406        match self.get_counters().content {
80407            Content::Normal | Content::None => true,
80408            Content::Items(ref items) => items.items.is_empty()
80409        }
80410    }
80411
80412    /// Whether the current style or any of its ancestors is multicolumn.
80413    #[inline]
80414    pub fn can_be_fragmented(&self) -> bool {
80415        self.flags.contains(ComputedValueFlags::CAN_BE_FRAGMENTED)
80416    }
80417
80418    /// Whether the current style is multicolumn.
80419    #[inline]
80420    pub fn is_multicol(&self) -> bool {
80421        self.get_column().is_multicol()
80422    }
80423
80424    /// Get the logical computed inline size.
80425    #[inline]
80426    pub fn content_inline_size(&self) -> &computed::Size {
80427        let position_style = self.get_position();
80428        if self.writing_mode.is_vertical() {
80429            &position_style.height
80430        } else {
80431            &position_style.width
80432        }
80433    }
80434
80435    /// Get the logical computed block size.
80436    #[inline]
80437    pub fn content_block_size(&self) -> &computed::Size {
80438        let position_style = self.get_position();
80439        if self.writing_mode.is_vertical() { &position_style.width } else { &position_style.height }
80440    }
80441
80442    /// Get the logical computed min inline size.
80443    #[inline]
80444    pub fn min_inline_size(&self) -> &computed::Size {
80445        let position_style = self.get_position();
80446        if self.writing_mode.is_vertical() { &position_style.min_height } else { &position_style.min_width }
80447    }
80448
80449    /// Get the logical computed min block size.
80450    #[inline]
80451    pub fn min_block_size(&self) -> &computed::Size {
80452        let position_style = self.get_position();
80453        if self.writing_mode.is_vertical() { &position_style.min_width } else { &position_style.min_height }
80454    }
80455
80456    /// Get the logical computed max inline size.
80457    #[inline]
80458    pub fn max_inline_size(&self) -> &computed::MaxSize {
80459        let position_style = self.get_position();
80460        if self.writing_mode.is_vertical() { &position_style.max_height } else { &position_style.max_width }
80461    }
80462
80463    /// Get the logical computed max block size.
80464    #[inline]
80465    pub fn max_block_size(&self) -> &computed::MaxSize {
80466        let position_style = self.get_position();
80467        if self.writing_mode.is_vertical() { &position_style.max_width } else { &position_style.max_height }
80468    }
80469
80470    /// Get the logical computed padding for this writing mode.
80471    #[inline]
80472    pub fn logical_padding(&self) -> LogicalMargin<&computed::LengthPercentage> {
80473        let padding_style = self.get_padding();
80474        LogicalMargin::from_physical(self.writing_mode, SideOffsets2D::new(
80475            &padding_style.padding_top.0,
80476            &padding_style.padding_right.0,
80477            &padding_style.padding_bottom.0,
80478            &padding_style.padding_left.0,
80479        ))
80480    }
80481
80482    /// Get the logical border width
80483    #[inline]
80484    pub fn border_width_for_writing_mode(&self, writing_mode: WritingMode) -> LogicalMargin<Au> {
80485        let border_style = self.get_border();
80486        LogicalMargin::from_physical(writing_mode, SideOffsets2D::new(
80487            Au::from(border_style.border_top_width),
80488            Au::from(border_style.border_right_width),
80489            Au::from(border_style.border_bottom_width),
80490            Au::from(border_style.border_left_width),
80491        ))
80492    }
80493
80494    /// Gets the logical computed border widths for this style.
80495    #[inline]
80496    pub fn logical_border_width(&self) -> LogicalMargin<Au> {
80497        self.border_width_for_writing_mode(self.writing_mode)
80498    }
80499
80500    /// Gets the logical computed margin from this style.
80501    #[inline]
80502    pub fn logical_margin(&self) -> LogicalMargin<&computed::Margin> {
80503        let margin_style = self.get_margin();
80504        LogicalMargin::from_physical(self.writing_mode, SideOffsets2D::new(
80505            &margin_style.margin_top,
80506            &margin_style.margin_right,
80507            &margin_style.margin_bottom,
80508            &margin_style.margin_left,
80509        ))
80510    }
80511
80512    /// Gets the logical position from this style.
80513    #[inline]
80514    pub fn logical_position(&self) -> LogicalMargin<&computed::Inset> {
80515        // FIXME(SimonSapin): should be the writing mode of the containing block, maybe?
80516        let position_style = self.get_position();
80517        LogicalMargin::from_physical(self.writing_mode, SideOffsets2D::new(
80518            &position_style.top,
80519            &position_style.right,
80520            &position_style.bottom,
80521            &position_style.left,
80522        ))
80523    }
80524
80525    /// Return true if the effects force the transform style to be Flat
80526    pub fn overrides_transform_style(&self) -> bool {
80527        use crate::computed_values::mix_blend_mode::T as MixBlendMode;
80528
80529        let effects = self.get_effects();
80530        // TODO(gw): Add clip-path, isolation, mask-image, mask-border-source when supported.
80531        effects.opacity < 1.0 ||
80532           !effects.filter.0.is_empty() ||
80533           !effects.clip.is_auto() ||
80534           effects.mix_blend_mode != MixBlendMode::Normal
80535    }
80536
80537    /// <https://drafts.csswg.org/css-transforms/#grouping-property-values>
80538    pub fn get_used_transform_style(&self) -> computed_values::transform_style::T {
80539        use crate::computed_values::transform_style::T as TransformStyle;
80540
80541        let box_ = self.get_box();
80542
80543        if self.overrides_transform_style() {
80544            TransformStyle::Flat
80545        } else {
80546            // Return the computed value if not overridden by the above exceptions
80547            box_.transform_style
80548        }
80549    }
80550}
80551
80552/// A reference to a style struct of the parent, or our own style struct.
80553pub enum StyleStructRef<'a, T: 'static> {
80554    /// A borrowed struct from the parent, for example, for inheriting style.
80555    Borrowed(&'a T),
80556    /// An owned struct, that we've already mutated.
80557    Owned(UniqueArc<T>),
80558    /// Temporarily vacated, will panic if accessed
80559    Vacated,
80560}
80561
80562impl<'a, T: 'a> StyleStructRef<'a, T>
80563where
80564    T: Clone,
80565{
80566    /// Ensure a mutable reference of this value exists, either cloning the
80567    /// borrowed value, or returning the owned one.
80568    pub fn mutate(&mut self) -> &mut T {
80569        if let StyleStructRef::Borrowed(v) = *self {
80570            *self = StyleStructRef::Owned(UniqueArc::new(v.clone()));
80571        }
80572
80573        match *self {
80574            StyleStructRef::Owned(ref mut v) => v,
80575            StyleStructRef::Borrowed(..) => unreachable!(),
80576            StyleStructRef::Vacated => panic!("Accessed vacated style struct")
80577        }
80578    }
80579
80580    /// Whether this is pointer-equal to the struct we're going to copy the
80581    /// value from.
80582    ///
80583    /// This is used to avoid allocations when people write stuff like `font:
80584    /// inherit` or such `all: initial`.
80585    #[inline]
80586    pub fn ptr_eq(&self, struct_to_copy_from: &T) -> bool {
80587        match *self {
80588            StyleStructRef::Owned(..) => false,
80589            StyleStructRef::Borrowed(s) => {
80590                s as *const T == struct_to_copy_from as *const T
80591            }
80592            StyleStructRef::Vacated => panic!("Accessed vacated style struct")
80593        }
80594    }
80595
80596    /// Extract a unique Arc from this struct, vacating it.
80597    ///
80598    /// The vacated state is a transient one, please put the Arc back
80599    /// when done via `put()`. This function is to be used to separate
80600    /// the struct being mutated from the computed context
80601    pub fn take(&mut self) -> UniqueArc<T> {
80602        use std::mem::replace;
80603        let inner = replace(self, StyleStructRef::Vacated);
80604
80605        match inner {
80606            StyleStructRef::Owned(arc) => arc,
80607            StyleStructRef::Borrowed(s) => UniqueArc::new(s.clone()),
80608            StyleStructRef::Vacated => panic!("Accessed vacated style struct"),
80609        }
80610    }
80611
80612    /// Replace vacated ref with an arc
80613    pub fn put(&mut self, arc: UniqueArc<T>) {
80614        debug_assert!(matches!(*self, StyleStructRef::Vacated));
80615        *self = StyleStructRef::Owned(arc);
80616    }
80617
80618    /// Get a mutable reference to the owned struct, or `None` if the struct
80619    /// hasn't been mutated.
80620    pub fn get_if_mutated(&mut self) -> Option<&mut T> {
80621        match *self {
80622            StyleStructRef::Owned(ref mut v) => Some(v),
80623            StyleStructRef::Borrowed(..) => None,
80624            StyleStructRef::Vacated => panic!("Accessed vacated style struct")
80625        }
80626    }
80627
80628    /// Returns an `Arc` to the internal struct, constructing one if
80629    /// appropriate.
80630    pub fn build(self) -> Arc<T> {
80631        match self {
80632            StyleStructRef::Owned(v) => v.shareable(),
80633            // SAFETY: We know all style structs are arc-allocated.
80634            StyleStructRef::Borrowed(v) => unsafe { Arc::from_raw_addrefed(v) },
80635            StyleStructRef::Vacated => panic!("Accessed vacated style struct")
80636        }
80637    }
80638}
80639
80640impl<'a, T: 'a> ops::Deref for StyleStructRef<'a, T> {
80641    type Target = T;
80642
80643    fn deref(&self) -> &T {
80644        match *self {
80645            StyleStructRef::Owned(ref v) => &**v,
80646            StyleStructRef::Borrowed(v) => v,
80647            StyleStructRef::Vacated => panic!("Accessed vacated style struct")
80648        }
80649    }
80650}
80651
80652/// A type used to compute a struct with minimal overhead.
80653///
80654/// This allows holding references to the parent/default computed values without
80655/// actually cloning them, until we either build the style, or mutate the
80656/// inherited value.
80657pub struct StyleBuilder<'a> {
80658    /// The device we're using to compute style.
80659    ///
80660    /// This provides access to viewport unit ratios, etc.
80661    pub device: &'a Device,
80662
80663    /// The stylist we're using to compute style except for media queries.
80664    /// device is used in media queries instead.
80665    pub stylist: Option<&'a Stylist>,
80666
80667    /// The style we're inheriting from.
80668    ///
80669    /// This is effectively
80670    /// `parent_style.unwrap_or(device.default_computed_values())`.
80671    inherited_style: &'a ComputedValues,
80672
80673    /// The style we're getting reset structs from.
80674    reset_style: &'a ComputedValues,
80675
80676    /// The rule node representing the ordered list of rules matched for this
80677    /// node.
80678    pub rules: Option<StrongRuleNode>,
80679
80680    /// The computed custom properties.
80681    pub custom_properties: crate::custom_properties::ComputedCustomProperties,
80682
80683    /// Non-custom properties that are considered invalid at compute time
80684    /// due to cyclic dependencies with custom properties.
80685    /// e.g. `--foo: 1em; font-size: var(--foo)` where `--foo` is registered.
80686    pub invalid_non_custom_properties: LonghandIdSet,
80687
80688    /// The pseudo-element this style will represent.
80689    pub pseudo: Option<&'a PseudoElement>,
80690
80691    /// Whether we have mutated any reset structs since the the last time
80692    /// `clear_modified_reset` was called.  This is used to tell whether the
80693    /// `StyleAdjuster` did any work.
80694    modified_reset: bool,
80695
80696    /// Whether this is the style for the root element.
80697    pub is_root_element: bool,
80698
80699    /// The writing mode flags.
80700    ///
80701    /// TODO(emilio): Make private.
80702    pub writing_mode: WritingMode,
80703
80704    /// The color-scheme bits. Needed because they may otherwise be different between visited and
80705    /// unvisited colors.
80706    pub color_scheme: ColorSchemeFlags,
80707
80708    /// The effective zoom.
80709    pub effective_zoom: computed::Zoom,
80710
80711    /// The effective zoom for inheritance (the "specified" zoom on this element).
80712    pub effective_zoom_for_inheritance: computed::Zoom,
80713
80714    /// Flags for the computed value.
80715    pub flags: Cell<ComputedValueFlags>,
80716
80717    /// The element's style if visited, only computed if there's a relevant link
80718    /// for this element.  A element's "relevant link" is the element being
80719    /// matched if it is a link or the nearest ancestor link.
80720    pub visited_style: Option<Arc<ComputedValues>>,
80721        background: StyleStructRef<'a, style_structs::Background>,
80722        border: StyleStructRef<'a, style_structs::Border>,
80723        box_: StyleStructRef<'a, style_structs::Box>,
80724        column: StyleStructRef<'a, style_structs::Column>,
80725        counters: StyleStructRef<'a, style_structs::Counters>,
80726        effects: StyleStructRef<'a, style_structs::Effects>,
80727        font: StyleStructRef<'a, style_structs::Font>,
80728        inherited_box: StyleStructRef<'a, style_structs::InheritedBox>,
80729        inherited_table: StyleStructRef<'a, style_structs::InheritedTable>,
80730        inherited_text: StyleStructRef<'a, style_structs::InheritedText>,
80731        inherited_ui: StyleStructRef<'a, style_structs::InheritedUI>,
80732        list: StyleStructRef<'a, style_structs::List>,
80733        margin: StyleStructRef<'a, style_structs::Margin>,
80734        outline: StyleStructRef<'a, style_structs::Outline>,
80735        padding: StyleStructRef<'a, style_structs::Padding>,
80736        position: StyleStructRef<'a, style_structs::Position>,
80737        svg: StyleStructRef<'a, style_structs::SVG>,
80738        table: StyleStructRef<'a, style_structs::Table>,
80739        text: StyleStructRef<'a, style_structs::Text>,
80740        ui: StyleStructRef<'a, style_structs::UI>,
80741}
80742
80743impl<'a> StyleBuilder<'a> {
80744    /// Trivially construct a `StyleBuilder`.
80745    pub fn new(
80746        device: &'a Device,
80747        stylist: Option<&'a Stylist>,
80748        parent_style: Option<&'a ComputedValues>,
80749        pseudo: Option<&'a PseudoElement>,
80750        rules: Option<StrongRuleNode>,
80751        is_root_element: bool,
80752    ) -> Self {
80753        let reset_style = device.default_computed_values();
80754        let inherited_style = parent_style.unwrap_or(reset_style);
80755
80756        let flags = inherited_style.flags.inherited();
80757        Self {
80758            device,
80759            stylist,
80760            inherited_style,
80761            reset_style,
80762            pseudo,
80763            rules,
80764            modified_reset: false,
80765            is_root_element,
80766            custom_properties: crate::custom_properties::ComputedCustomProperties::default(),
80767            invalid_non_custom_properties: LonghandIdSet::default(),
80768            writing_mode: inherited_style.writing_mode,
80769            effective_zoom: inherited_style.effective_zoom,
80770            effective_zoom_for_inheritance: computed::Zoom::ONE,
80771            color_scheme: inherited_style.get_inherited_ui().color_scheme_bits(),
80772            flags: Cell::new(flags),
80773            visited_style: None,
80774            background: StyleStructRef::Borrowed(reset_style.get_background()),
80775            border: StyleStructRef::Borrowed(reset_style.get_border()),
80776            box_: StyleStructRef::Borrowed(reset_style.get_box()),
80777            column: StyleStructRef::Borrowed(reset_style.get_column()),
80778            counters: StyleStructRef::Borrowed(reset_style.get_counters()),
80779            effects: StyleStructRef::Borrowed(reset_style.get_effects()),
80780            font: StyleStructRef::Borrowed(inherited_style.get_font()),
80781            inherited_box: StyleStructRef::Borrowed(inherited_style.get_inherited_box()),
80782            inherited_table: StyleStructRef::Borrowed(inherited_style.get_inherited_table()),
80783            inherited_text: StyleStructRef::Borrowed(inherited_style.get_inherited_text()),
80784            inherited_ui: StyleStructRef::Borrowed(inherited_style.get_inherited_ui()),
80785            list: StyleStructRef::Borrowed(inherited_style.get_list()),
80786            margin: StyleStructRef::Borrowed(reset_style.get_margin()),
80787            outline: StyleStructRef::Borrowed(reset_style.get_outline()),
80788            padding: StyleStructRef::Borrowed(reset_style.get_padding()),
80789            position: StyleStructRef::Borrowed(reset_style.get_position()),
80790            svg: StyleStructRef::Borrowed(reset_style.get_svg()),
80791            table: StyleStructRef::Borrowed(reset_style.get_table()),
80792            text: StyleStructRef::Borrowed(reset_style.get_text()),
80793            ui: StyleStructRef::Borrowed(reset_style.get_ui()),
80794        }
80795    }
80796
80797    /// NOTE(emilio): This is done so we can compute relative units with respect
80798    /// to the parent style, but all the early properties / writing-mode / etc
80799    /// are already set to the right ones on the kid.
80800    ///
80801    /// Do _not_ actually call this to construct a style, this should mostly be
80802    /// used for animations.
80803    pub fn for_animation(
80804        device: &'a Device,
80805        stylist: Option<&'a Stylist>,
80806        style_to_derive_from: &'a ComputedValues,
80807        parent_style: Option<&'a ComputedValues>,
80808    ) -> Self {
80809        let reset_style = device.default_computed_values();
80810        let inherited_style = parent_style.unwrap_or(reset_style);
80811        Self {
80812            device,
80813            stylist,
80814            inherited_style,
80815            reset_style,
80816            pseudo: None,
80817            modified_reset: false,
80818            is_root_element: false,
80819            rules: None,
80820            custom_properties: style_to_derive_from.custom_properties().clone(),
80821            invalid_non_custom_properties: LonghandIdSet::default(),
80822            writing_mode: style_to_derive_from.writing_mode,
80823            effective_zoom: style_to_derive_from.effective_zoom,
80824            effective_zoom_for_inheritance: Self::zoom_for_inheritance(style_to_derive_from.get_box().clone_zoom(), inherited_style),
80825            color_scheme: style_to_derive_from.get_inherited_ui().color_scheme_bits(),
80826            flags: Cell::new(style_to_derive_from.flags),
80827            visited_style: None,
80828            background: StyleStructRef::Borrowed(
80829                style_to_derive_from.get_background()
80830            ),
80831            border: StyleStructRef::Borrowed(
80832                style_to_derive_from.get_border()
80833            ),
80834            box_: StyleStructRef::Borrowed(
80835                style_to_derive_from.get_box()
80836            ),
80837            column: StyleStructRef::Borrowed(
80838                style_to_derive_from.get_column()
80839            ),
80840            counters: StyleStructRef::Borrowed(
80841                style_to_derive_from.get_counters()
80842            ),
80843            effects: StyleStructRef::Borrowed(
80844                style_to_derive_from.get_effects()
80845            ),
80846            font: StyleStructRef::Borrowed(
80847                style_to_derive_from.get_font()
80848            ),
80849            inherited_box: StyleStructRef::Borrowed(
80850                style_to_derive_from.get_inherited_box()
80851            ),
80852            inherited_table: StyleStructRef::Borrowed(
80853                style_to_derive_from.get_inherited_table()
80854            ),
80855            inherited_text: StyleStructRef::Borrowed(
80856                style_to_derive_from.get_inherited_text()
80857            ),
80858            inherited_ui: StyleStructRef::Borrowed(
80859                style_to_derive_from.get_inherited_ui()
80860            ),
80861            list: StyleStructRef::Borrowed(
80862                style_to_derive_from.get_list()
80863            ),
80864            margin: StyleStructRef::Borrowed(
80865                style_to_derive_from.get_margin()
80866            ),
80867            outline: StyleStructRef::Borrowed(
80868                style_to_derive_from.get_outline()
80869            ),
80870            padding: StyleStructRef::Borrowed(
80871                style_to_derive_from.get_padding()
80872            ),
80873            position: StyleStructRef::Borrowed(
80874                style_to_derive_from.get_position()
80875            ),
80876            svg: StyleStructRef::Borrowed(
80877                style_to_derive_from.get_svg()
80878            ),
80879            table: StyleStructRef::Borrowed(
80880                style_to_derive_from.get_table()
80881            ),
80882            text: StyleStructRef::Borrowed(
80883                style_to_derive_from.get_text()
80884            ),
80885            ui: StyleStructRef::Borrowed(
80886                style_to_derive_from.get_ui()
80887            ),
80888        }
80889    }
80890
80891    /// Copy the reset properties from `style`.
80892    pub fn copy_reset_from(&mut self, style: &'a ComputedValues) {
80893        self.background =
80894            StyleStructRef::Borrowed(style.get_background());
80895        self.border =
80896            StyleStructRef::Borrowed(style.get_border());
80897        self.box_ =
80898            StyleStructRef::Borrowed(style.get_box());
80899        self.column =
80900            StyleStructRef::Borrowed(style.get_column());
80901        self.counters =
80902            StyleStructRef::Borrowed(style.get_counters());
80903        self.effects =
80904            StyleStructRef::Borrowed(style.get_effects());
80905        self.margin =
80906            StyleStructRef::Borrowed(style.get_margin());
80907        self.outline =
80908            StyleStructRef::Borrowed(style.get_outline());
80909        self.padding =
80910            StyleStructRef::Borrowed(style.get_padding());
80911        self.position =
80912            StyleStructRef::Borrowed(style.get_position());
80913        self.svg =
80914            StyleStructRef::Borrowed(style.get_svg());
80915        self.table =
80916            StyleStructRef::Borrowed(style.get_table());
80917        self.text =
80918            StyleStructRef::Borrowed(style.get_text());
80919        self.ui =
80920            StyleStructRef::Borrowed(style.get_ui());
80921    }
80922
80923    /// Inherit `align_content` from our parent style.
80924    #[allow(non_snake_case)]
80925    pub fn inherit_align_content(&mut self) {
80926        let inherited_struct =
80927            self.inherited_style.get_position();
80928
80929        self.modified_reset = true;
80930        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
80931
80932
80933
80934        if self.position.ptr_eq(inherited_struct) {
80935            return;
80936        }
80937
80938        self.position.mutate()
80939            .copy_align_content_from(inherited_struct);
80940    }
80941
80942    /// Set the `align_content` to the computed value `value`.
80943    #[allow(non_snake_case)]
80944    pub fn set_align_content(
80945        &mut self,
80946        value: longhands::align_content::computed_value::T
80947    ) {
80948        self.modified_reset = true;
80949
80950        self.position.mutate()
80951            .set_align_content(
80952                value,
80953            );
80954    }
80955    /// Inherit `align_items` from our parent style.
80956    #[allow(non_snake_case)]
80957    pub fn inherit_align_items(&mut self) {
80958        let inherited_struct =
80959            self.inherited_style.get_position();
80960
80961        self.modified_reset = true;
80962        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
80963
80964
80965
80966        if self.position.ptr_eq(inherited_struct) {
80967            return;
80968        }
80969
80970        self.position.mutate()
80971            .copy_align_items_from(inherited_struct);
80972    }
80973
80974    /// Set the `align_items` to the computed value `value`.
80975    #[allow(non_snake_case)]
80976    pub fn set_align_items(
80977        &mut self,
80978        value: longhands::align_items::computed_value::T
80979    ) {
80980        self.modified_reset = true;
80981
80982        self.position.mutate()
80983            .set_align_items(
80984                value,
80985            );
80986    }
80987    /// Inherit `align_self` from our parent style.
80988    #[allow(non_snake_case)]
80989    pub fn inherit_align_self(&mut self) {
80990        let inherited_struct =
80991            self.inherited_style.get_position();
80992
80993        self.modified_reset = true;
80994        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
80995
80996
80997
80998        if self.position.ptr_eq(inherited_struct) {
80999            return;
81000        }
81001
81002        self.position.mutate()
81003            .copy_align_self_from(inherited_struct);
81004    }
81005
81006    /// Set the `align_self` to the computed value `value`.
81007    #[allow(non_snake_case)]
81008    pub fn set_align_self(
81009        &mut self,
81010        value: longhands::align_self::computed_value::T
81011    ) {
81012        self.modified_reset = true;
81013
81014        self.position.mutate()
81015            .set_align_self(
81016                value,
81017            );
81018    }
81019    /// Inherit `aspect_ratio` from our parent style.
81020    #[allow(non_snake_case)]
81021    pub fn inherit_aspect_ratio(&mut self) {
81022        let inherited_struct =
81023            self.inherited_style.get_position();
81024
81025        self.modified_reset = true;
81026        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81027
81028
81029
81030        if self.position.ptr_eq(inherited_struct) {
81031            return;
81032        }
81033
81034        self.position.mutate()
81035            .copy_aspect_ratio_from(inherited_struct);
81036    }
81037
81038    /// Set the `aspect_ratio` to the computed value `value`.
81039    #[allow(non_snake_case)]
81040    pub fn set_aspect_ratio(
81041        &mut self,
81042        value: longhands::aspect_ratio::computed_value::T
81043    ) {
81044        self.modified_reset = true;
81045
81046        self.position.mutate()
81047            .set_aspect_ratio(
81048                value,
81049            );
81050    }
81051    /// Inherit `backface_visibility` from our parent style.
81052    #[allow(non_snake_case)]
81053    pub fn inherit_backface_visibility(&mut self) {
81054        let inherited_struct =
81055            self.inherited_style.get_box();
81056
81057        self.modified_reset = true;
81058        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81059
81060
81061
81062        if self.box_.ptr_eq(inherited_struct) {
81063            return;
81064        }
81065
81066        self.box_.mutate()
81067            .copy_backface_visibility_from(inherited_struct);
81068    }
81069
81070    /// Set the `backface_visibility` to the computed value `value`.
81071    #[allow(non_snake_case)]
81072    pub fn set_backface_visibility(
81073        &mut self,
81074        value: longhands::backface_visibility::computed_value::T
81075    ) {
81076        self.modified_reset = true;
81077
81078        self.box_.mutate()
81079            .set_backface_visibility(
81080                value,
81081            );
81082    }
81083    /// Inherit `baseline_source` from our parent style.
81084    #[allow(non_snake_case)]
81085    pub fn inherit_baseline_source(&mut self) {
81086        let inherited_struct =
81087            self.inherited_style.get_box();
81088
81089        self.modified_reset = true;
81090        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81091
81092
81093
81094        if self.box_.ptr_eq(inherited_struct) {
81095            return;
81096        }
81097
81098        self.box_.mutate()
81099            .copy_baseline_source_from(inherited_struct);
81100    }
81101
81102    /// Set the `baseline_source` to the computed value `value`.
81103    #[allow(non_snake_case)]
81104    pub fn set_baseline_source(
81105        &mut self,
81106        value: longhands::baseline_source::computed_value::T
81107    ) {
81108        self.modified_reset = true;
81109
81110        self.box_.mutate()
81111            .set_baseline_source(
81112                value,
81113            );
81114    }
81115    /// Reset `border_collapse` to the initial value.
81116    #[allow(non_snake_case)]
81117    pub fn reset_border_collapse(&mut self) {
81118        let reset_struct =
81119            self.reset_style.get_inherited_table();
81120
81121        if self.inherited_table.ptr_eq(reset_struct) {
81122            return;
81123        }
81124
81125        self.inherited_table.mutate()
81126            .reset_border_collapse(reset_struct);
81127    }
81128
81129    /// Set the `border_collapse` to the computed value `value`.
81130    #[allow(non_snake_case)]
81131    pub fn set_border_collapse(
81132        &mut self,
81133        value: longhands::border_collapse::computed_value::T
81134    ) {
81135
81136        self.inherited_table.mutate()
81137            .set_border_collapse(
81138                value,
81139            );
81140    }
81141    /// Inherit `border_image_repeat` from our parent style.
81142    #[allow(non_snake_case)]
81143    pub fn inherit_border_image_repeat(&mut self) {
81144        let inherited_struct =
81145            self.inherited_style.get_border();
81146
81147        self.modified_reset = true;
81148        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81149
81150
81151
81152        if self.border.ptr_eq(inherited_struct) {
81153            return;
81154        }
81155
81156        self.border.mutate()
81157            .copy_border_image_repeat_from(inherited_struct);
81158    }
81159
81160    /// Set the `border_image_repeat` to the computed value `value`.
81161    #[allow(non_snake_case)]
81162    pub fn set_border_image_repeat(
81163        &mut self,
81164        value: longhands::border_image_repeat::computed_value::T
81165    ) {
81166        self.modified_reset = true;
81167
81168        self.border.mutate()
81169            .set_border_image_repeat(
81170                value,
81171            );
81172    }
81173    /// Inherit `box_sizing` from our parent style.
81174    #[allow(non_snake_case)]
81175    pub fn inherit_box_sizing(&mut self) {
81176        let inherited_struct =
81177            self.inherited_style.get_position();
81178
81179        self.modified_reset = true;
81180        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81181
81182
81183
81184        if self.position.ptr_eq(inherited_struct) {
81185            return;
81186        }
81187
81188        self.position.mutate()
81189            .copy_box_sizing_from(inherited_struct);
81190    }
81191
81192    /// Set the `box_sizing` to the computed value `value`.
81193    #[allow(non_snake_case)]
81194    pub fn set_box_sizing(
81195        &mut self,
81196        value: longhands::box_sizing::computed_value::T
81197    ) {
81198        self.modified_reset = true;
81199
81200        self.position.mutate()
81201            .set_box_sizing(
81202                value,
81203            );
81204    }
81205    /// Reset `caption_side` to the initial value.
81206    #[allow(non_snake_case)]
81207    pub fn reset_caption_side(&mut self) {
81208        let reset_struct =
81209            self.reset_style.get_inherited_table();
81210
81211        if self.inherited_table.ptr_eq(reset_struct) {
81212            return;
81213        }
81214
81215        self.inherited_table.mutate()
81216            .reset_caption_side(reset_struct);
81217    }
81218
81219    /// Set the `caption_side` to the computed value `value`.
81220    #[allow(non_snake_case)]
81221    pub fn set_caption_side(
81222        &mut self,
81223        value: longhands::caption_side::computed_value::T
81224    ) {
81225
81226        self.inherited_table.mutate()
81227            .set_caption_side(
81228                value,
81229            );
81230    }
81231    /// Inherit `clear` from our parent style.
81232    #[allow(non_snake_case)]
81233    pub fn inherit_clear(&mut self) {
81234        let inherited_struct =
81235            self.inherited_style.get_box();
81236
81237        self.modified_reset = true;
81238        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81239
81240
81241
81242        if self.box_.ptr_eq(inherited_struct) {
81243            return;
81244        }
81245
81246        self.box_.mutate()
81247            .copy_clear_from(inherited_struct);
81248    }
81249
81250    /// Set the `clear` to the computed value `value`.
81251    #[allow(non_snake_case)]
81252    pub fn set_clear(
81253        &mut self,
81254        value: longhands::clear::computed_value::T
81255    ) {
81256        self.modified_reset = true;
81257
81258        self.box_.mutate()
81259            .set_clear(
81260                value,
81261            );
81262    }
81263    /// Inherit `column_count` from our parent style.
81264    #[allow(non_snake_case)]
81265    pub fn inherit_column_count(&mut self) {
81266        let inherited_struct =
81267            self.inherited_style.get_column();
81268
81269        self.modified_reset = true;
81270        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81271
81272
81273
81274        if self.column.ptr_eq(inherited_struct) {
81275            return;
81276        }
81277
81278        self.column.mutate()
81279            .copy_column_count_from(inherited_struct);
81280    }
81281
81282    /// Set the `column_count` to the computed value `value`.
81283    #[allow(non_snake_case)]
81284    pub fn set_column_count(
81285        &mut self,
81286        value: longhands::column_count::computed_value::T
81287    ) {
81288        self.modified_reset = true;
81289
81290        self.column.mutate()
81291            .set_column_count(
81292                value,
81293            );
81294    }
81295    /// Inherit `column_span` from our parent style.
81296    #[allow(non_snake_case)]
81297    pub fn inherit_column_span(&mut self) {
81298        let inherited_struct =
81299            self.inherited_style.get_column();
81300
81301        self.modified_reset = true;
81302        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81303
81304
81305
81306        if self.column.ptr_eq(inherited_struct) {
81307            return;
81308        }
81309
81310        self.column.mutate()
81311            .copy_column_span_from(inherited_struct);
81312    }
81313
81314    /// Set the `column_span` to the computed value `value`.
81315    #[allow(non_snake_case)]
81316    pub fn set_column_span(
81317        &mut self,
81318        value: longhands::column_span::computed_value::T
81319    ) {
81320        self.modified_reset = true;
81321
81322        self.column.mutate()
81323            .set_column_span(
81324                value,
81325            );
81326    }
81327    /// Inherit `contain` from our parent style.
81328    #[allow(non_snake_case)]
81329    pub fn inherit_contain(&mut self) {
81330        let inherited_struct =
81331            self.inherited_style.get_box();
81332
81333        self.modified_reset = true;
81334        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81335
81336
81337
81338        if self.box_.ptr_eq(inherited_struct) {
81339            return;
81340        }
81341
81342        self.box_.mutate()
81343            .copy_contain_from(inherited_struct);
81344    }
81345
81346    /// Set the `contain` to the computed value `value`.
81347    #[allow(non_snake_case)]
81348    pub fn set_contain(
81349        &mut self,
81350        value: longhands::contain::computed_value::T
81351    ) {
81352        self.modified_reset = true;
81353
81354        self.box_.mutate()
81355            .set_contain(
81356                value,
81357            );
81358    }
81359    /// Inherit `container_type` from our parent style.
81360    #[allow(non_snake_case)]
81361    pub fn inherit_container_type(&mut self) {
81362        let inherited_struct =
81363            self.inherited_style.get_box();
81364
81365        self.modified_reset = true;
81366        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81367
81368
81369
81370        if self.box_.ptr_eq(inherited_struct) {
81371            return;
81372        }
81373
81374        self.box_.mutate()
81375            .copy_container_type_from(inherited_struct);
81376    }
81377
81378    /// Set the `container_type` to the computed value `value`.
81379    #[allow(non_snake_case)]
81380    pub fn set_container_type(
81381        &mut self,
81382        value: longhands::container_type::computed_value::T
81383    ) {
81384        self.modified_reset = true;
81385
81386        self.box_.mutate()
81387            .set_container_type(
81388                value,
81389            );
81390    }
81391    /// Reset `direction` to the initial value.
81392    #[allow(non_snake_case)]
81393    pub fn reset_direction(&mut self) {
81394        let reset_struct =
81395            self.reset_style.get_inherited_box();
81396
81397        if self.inherited_box.ptr_eq(reset_struct) {
81398            return;
81399        }
81400
81401        self.inherited_box.mutate()
81402            .reset_direction(reset_struct);
81403    }
81404
81405    /// Set the `direction` to the computed value `value`.
81406    #[allow(non_snake_case)]
81407    pub fn set_direction(
81408        &mut self,
81409        value: longhands::direction::computed_value::T
81410    ) {
81411
81412        self.inherited_box.mutate()
81413            .set_direction(
81414                value,
81415            );
81416    }
81417    /// Inherit `display` from our parent style.
81418    #[allow(non_snake_case)]
81419    pub fn inherit_display(&mut self) {
81420        let inherited_struct =
81421            self.inherited_style.get_box();
81422
81423        self.modified_reset = true;
81424        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81425
81426
81427        self.add_flags(ComputedValueFlags::DISPLAY_DEPENDS_ON_INHERITED_STYLE);
81428
81429        if self.box_.ptr_eq(inherited_struct) {
81430            return;
81431        }
81432
81433        self.box_.mutate()
81434            .copy_display_from(inherited_struct);
81435    }
81436
81437    /// Set the `display` to the computed value `value`.
81438    #[allow(non_snake_case)]
81439    pub fn set_display(
81440        &mut self,
81441        value: longhands::display::computed_value::T
81442    ) {
81443        self.modified_reset = true;
81444
81445        self.box_.mutate()
81446            .set_display(
81447                value,
81448            );
81449    }
81450    /// Reset `empty_cells` to the initial value.
81451    #[allow(non_snake_case)]
81452    pub fn reset_empty_cells(&mut self) {
81453        let reset_struct =
81454            self.reset_style.get_inherited_table();
81455
81456        if self.inherited_table.ptr_eq(reset_struct) {
81457            return;
81458        }
81459
81460        self.inherited_table.mutate()
81461            .reset_empty_cells(reset_struct);
81462    }
81463
81464    /// Set the `empty_cells` to the computed value `value`.
81465    #[allow(non_snake_case)]
81466    pub fn set_empty_cells(
81467        &mut self,
81468        value: longhands::empty_cells::computed_value::T
81469    ) {
81470
81471        self.inherited_table.mutate()
81472            .set_empty_cells(
81473                value,
81474            );
81475    }
81476    /// Inherit `flex_direction` from our parent style.
81477    #[allow(non_snake_case)]
81478    pub fn inherit_flex_direction(&mut self) {
81479        let inherited_struct =
81480            self.inherited_style.get_position();
81481
81482        self.modified_reset = true;
81483        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81484
81485
81486
81487        if self.position.ptr_eq(inherited_struct) {
81488            return;
81489        }
81490
81491        self.position.mutate()
81492            .copy_flex_direction_from(inherited_struct);
81493    }
81494
81495    /// Set the `flex_direction` to the computed value `value`.
81496    #[allow(non_snake_case)]
81497    pub fn set_flex_direction(
81498        &mut self,
81499        value: longhands::flex_direction::computed_value::T
81500    ) {
81501        self.modified_reset = true;
81502
81503        self.position.mutate()
81504            .set_flex_direction(
81505                value,
81506            );
81507    }
81508    /// Inherit `flex_wrap` from our parent style.
81509    #[allow(non_snake_case)]
81510    pub fn inherit_flex_wrap(&mut self) {
81511        let inherited_struct =
81512            self.inherited_style.get_position();
81513
81514        self.modified_reset = true;
81515        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81516
81517
81518
81519        if self.position.ptr_eq(inherited_struct) {
81520            return;
81521        }
81522
81523        self.position.mutate()
81524            .copy_flex_wrap_from(inherited_struct);
81525    }
81526
81527    /// Set the `flex_wrap` to the computed value `value`.
81528    #[allow(non_snake_case)]
81529    pub fn set_flex_wrap(
81530        &mut self,
81531        value: longhands::flex_wrap::computed_value::T
81532    ) {
81533        self.modified_reset = true;
81534
81535        self.position.mutate()
81536            .set_flex_wrap(
81537                value,
81538            );
81539    }
81540    /// Inherit `float` from our parent style.
81541    #[allow(non_snake_case)]
81542    pub fn inherit_float(&mut self) {
81543        let inherited_struct =
81544            self.inherited_style.get_box();
81545
81546        self.modified_reset = true;
81547        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81548
81549
81550
81551        if self.box_.ptr_eq(inherited_struct) {
81552            return;
81553        }
81554
81555        self.box_.mutate()
81556            .copy_float_from(inherited_struct);
81557    }
81558
81559    /// Set the `float` to the computed value `value`.
81560    #[allow(non_snake_case)]
81561    pub fn set_float(
81562        &mut self,
81563        value: longhands::float::computed_value::T
81564    ) {
81565        self.modified_reset = true;
81566
81567        self.box_.mutate()
81568            .set_float(
81569                value,
81570            );
81571    }
81572    /// Reset `font_language_override` to the initial value.
81573    #[allow(non_snake_case)]
81574    pub fn reset_font_language_override(&mut self) {
81575        let reset_struct =
81576            self.reset_style.get_font();
81577
81578        if self.font.ptr_eq(reset_struct) {
81579            return;
81580        }
81581
81582        self.font.mutate()
81583            .reset_font_language_override(reset_struct);
81584    }
81585
81586    /// Set the `font_language_override` to the computed value `value`.
81587    #[allow(non_snake_case)]
81588    pub fn set_font_language_override(
81589        &mut self,
81590        value: longhands::font_language_override::computed_value::T
81591    ) {
81592
81593        self.font.mutate()
81594            .set_font_language_override(
81595                value,
81596            );
81597    }
81598    /// Reset `font_stretch` to the initial value.
81599    #[allow(non_snake_case)]
81600    pub fn reset_font_stretch(&mut self) {
81601        let reset_struct =
81602            self.reset_style.get_font();
81603
81604        if self.font.ptr_eq(reset_struct) {
81605            return;
81606        }
81607
81608        self.font.mutate()
81609            .reset_font_stretch(reset_struct);
81610    }
81611
81612    /// Set the `font_stretch` to the computed value `value`.
81613    #[allow(non_snake_case)]
81614    pub fn set_font_stretch(
81615        &mut self,
81616        value: longhands::font_stretch::computed_value::T
81617    ) {
81618
81619        self.font.mutate()
81620            .set_font_stretch(
81621                value,
81622            );
81623    }
81624    /// Reset `font_style` to the initial value.
81625    #[allow(non_snake_case)]
81626    pub fn reset_font_style(&mut self) {
81627        let reset_struct =
81628            self.reset_style.get_font();
81629
81630        if self.font.ptr_eq(reset_struct) {
81631            return;
81632        }
81633
81634        self.font.mutate()
81635            .reset_font_style(reset_struct);
81636    }
81637
81638    /// Set the `font_style` to the computed value `value`.
81639    #[allow(non_snake_case)]
81640    pub fn set_font_style(
81641        &mut self,
81642        value: longhands::font_style::computed_value::T
81643    ) {
81644
81645        self.font.mutate()
81646            .set_font_style(
81647                value,
81648            );
81649    }
81650    /// Reset `font_variant_caps` to the initial value.
81651    #[allow(non_snake_case)]
81652    pub fn reset_font_variant_caps(&mut self) {
81653        let reset_struct =
81654            self.reset_style.get_font();
81655
81656        if self.font.ptr_eq(reset_struct) {
81657            return;
81658        }
81659
81660        self.font.mutate()
81661            .reset_font_variant_caps(reset_struct);
81662    }
81663
81664    /// Set the `font_variant_caps` to the computed value `value`.
81665    #[allow(non_snake_case)]
81666    pub fn set_font_variant_caps(
81667        &mut self,
81668        value: longhands::font_variant_caps::computed_value::T
81669    ) {
81670
81671        self.font.mutate()
81672            .set_font_variant_caps(
81673                value,
81674            );
81675    }
81676    /// Reset `font_weight` to the initial value.
81677    #[allow(non_snake_case)]
81678    pub fn reset_font_weight(&mut self) {
81679        let reset_struct =
81680            self.reset_style.get_font();
81681
81682        if self.font.ptr_eq(reset_struct) {
81683            return;
81684        }
81685
81686        self.font.mutate()
81687            .reset_font_weight(reset_struct);
81688    }
81689
81690    /// Set the `font_weight` to the computed value `value`.
81691    #[allow(non_snake_case)]
81692    pub fn set_font_weight(
81693        &mut self,
81694        value: longhands::font_weight::computed_value::T
81695    ) {
81696
81697        self.font.mutate()
81698            .set_font_weight(
81699                value,
81700            );
81701    }
81702    /// Inherit `grid_auto_flow` from our parent style.
81703    #[allow(non_snake_case)]
81704    pub fn inherit_grid_auto_flow(&mut self) {
81705        let inherited_struct =
81706            self.inherited_style.get_position();
81707
81708        self.modified_reset = true;
81709        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81710
81711
81712
81713        if self.position.ptr_eq(inherited_struct) {
81714            return;
81715        }
81716
81717        self.position.mutate()
81718            .copy_grid_auto_flow_from(inherited_struct);
81719    }
81720
81721    /// Set the `grid_auto_flow` to the computed value `value`.
81722    #[allow(non_snake_case)]
81723    pub fn set_grid_auto_flow(
81724        &mut self,
81725        value: longhands::grid_auto_flow::computed_value::T
81726    ) {
81727        self.modified_reset = true;
81728
81729        self.position.mutate()
81730            .set_grid_auto_flow(
81731                value,
81732            );
81733    }
81734    /// Reset `image_rendering` to the initial value.
81735    #[allow(non_snake_case)]
81736    pub fn reset_image_rendering(&mut self) {
81737        let reset_struct =
81738            self.reset_style.get_inherited_box();
81739
81740        if self.inherited_box.ptr_eq(reset_struct) {
81741            return;
81742        }
81743
81744        self.inherited_box.mutate()
81745            .reset_image_rendering(reset_struct);
81746    }
81747
81748    /// Set the `image_rendering` to the computed value `value`.
81749    #[allow(non_snake_case)]
81750    pub fn set_image_rendering(
81751        &mut self,
81752        value: longhands::image_rendering::computed_value::T
81753    ) {
81754
81755        self.inherited_box.mutate()
81756            .set_image_rendering(
81757                value,
81758            );
81759    }
81760    /// Inherit `isolation` from our parent style.
81761    #[allow(non_snake_case)]
81762    pub fn inherit_isolation(&mut self) {
81763        let inherited_struct =
81764            self.inherited_style.get_box();
81765
81766        self.modified_reset = true;
81767        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81768
81769
81770
81771        if self.box_.ptr_eq(inherited_struct) {
81772            return;
81773        }
81774
81775        self.box_.mutate()
81776            .copy_isolation_from(inherited_struct);
81777    }
81778
81779    /// Set the `isolation` to the computed value `value`.
81780    #[allow(non_snake_case)]
81781    pub fn set_isolation(
81782        &mut self,
81783        value: longhands::isolation::computed_value::T
81784    ) {
81785        self.modified_reset = true;
81786
81787        self.box_.mutate()
81788            .set_isolation(
81789                value,
81790            );
81791    }
81792    /// Inherit `justify_content` from our parent style.
81793    #[allow(non_snake_case)]
81794    pub fn inherit_justify_content(&mut self) {
81795        let inherited_struct =
81796            self.inherited_style.get_position();
81797
81798        self.modified_reset = true;
81799        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81800
81801
81802
81803        if self.position.ptr_eq(inherited_struct) {
81804            return;
81805        }
81806
81807        self.position.mutate()
81808            .copy_justify_content_from(inherited_struct);
81809    }
81810
81811    /// Set the `justify_content` to the computed value `value`.
81812    #[allow(non_snake_case)]
81813    pub fn set_justify_content(
81814        &mut self,
81815        value: longhands::justify_content::computed_value::T
81816    ) {
81817        self.modified_reset = true;
81818
81819        self.position.mutate()
81820            .set_justify_content(
81821                value,
81822            );
81823    }
81824    /// Inherit `justify_items` from our parent style.
81825    #[allow(non_snake_case)]
81826    pub fn inherit_justify_items(&mut self) {
81827        let inherited_struct =
81828            self.inherited_style.get_position();
81829
81830        self.modified_reset = true;
81831        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81832
81833
81834
81835        if self.position.ptr_eq(inherited_struct) {
81836            return;
81837        }
81838
81839        self.position.mutate()
81840            .copy_justify_items_from(inherited_struct);
81841    }
81842
81843    /// Set the `justify_items` to the computed value `value`.
81844    #[allow(non_snake_case)]
81845    pub fn set_justify_items(
81846        &mut self,
81847        value: longhands::justify_items::computed_value::T
81848    ) {
81849        self.modified_reset = true;
81850
81851        self.position.mutate()
81852            .set_justify_items(
81853                value,
81854            );
81855    }
81856    /// Inherit `justify_self` from our parent style.
81857    #[allow(non_snake_case)]
81858    pub fn inherit_justify_self(&mut self) {
81859        let inherited_struct =
81860            self.inherited_style.get_position();
81861
81862        self.modified_reset = true;
81863        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81864
81865
81866
81867        if self.position.ptr_eq(inherited_struct) {
81868            return;
81869        }
81870
81871        self.position.mutate()
81872            .copy_justify_self_from(inherited_struct);
81873    }
81874
81875    /// Set the `justify_self` to the computed value `value`.
81876    #[allow(non_snake_case)]
81877    pub fn set_justify_self(
81878        &mut self,
81879        value: longhands::justify_self::computed_value::T
81880    ) {
81881        self.modified_reset = true;
81882
81883        self.position.mutate()
81884            .set_justify_self(
81885                value,
81886            );
81887    }
81888    /// Reset `list_style_position` to the initial value.
81889    #[allow(non_snake_case)]
81890    pub fn reset_list_style_position(&mut self) {
81891        let reset_struct =
81892            self.reset_style.get_list();
81893
81894        if self.list.ptr_eq(reset_struct) {
81895            return;
81896        }
81897
81898        self.list.mutate()
81899            .reset_list_style_position(reset_struct);
81900    }
81901
81902    /// Set the `list_style_position` to the computed value `value`.
81903    #[allow(non_snake_case)]
81904    pub fn set_list_style_position(
81905        &mut self,
81906        value: longhands::list_style_position::computed_value::T
81907    ) {
81908
81909        self.list.mutate()
81910            .set_list_style_position(
81911                value,
81912            );
81913    }
81914    /// Reset `list_style_type` to the initial value.
81915    #[allow(non_snake_case)]
81916    pub fn reset_list_style_type(&mut self) {
81917        let reset_struct =
81918            self.reset_style.get_list();
81919
81920        if self.list.ptr_eq(reset_struct) {
81921            return;
81922        }
81923
81924        self.list.mutate()
81925            .reset_list_style_type(reset_struct);
81926    }
81927
81928    /// Set the `list_style_type` to the computed value `value`.
81929    #[allow(non_snake_case)]
81930    pub fn set_list_style_type(
81931        &mut self,
81932        value: longhands::list_style_type::computed_value::T
81933    ) {
81934
81935        self.list.mutate()
81936            .set_list_style_type(
81937                value,
81938            );
81939    }
81940    /// Inherit `mix_blend_mode` from our parent style.
81941    #[allow(non_snake_case)]
81942    pub fn inherit_mix_blend_mode(&mut self) {
81943        let inherited_struct =
81944            self.inherited_style.get_effects();
81945
81946        self.modified_reset = true;
81947        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81948
81949
81950
81951        if self.effects.ptr_eq(inherited_struct) {
81952            return;
81953        }
81954
81955        self.effects.mutate()
81956            .copy_mix_blend_mode_from(inherited_struct);
81957    }
81958
81959    /// Set the `mix_blend_mode` to the computed value `value`.
81960    #[allow(non_snake_case)]
81961    pub fn set_mix_blend_mode(
81962        &mut self,
81963        value: longhands::mix_blend_mode::computed_value::T
81964    ) {
81965        self.modified_reset = true;
81966
81967        self.effects.mutate()
81968            .set_mix_blend_mode(
81969                value,
81970            );
81971    }
81972    /// Inherit `object_fit` from our parent style.
81973    #[allow(non_snake_case)]
81974    pub fn inherit_object_fit(&mut self) {
81975        let inherited_struct =
81976            self.inherited_style.get_position();
81977
81978        self.modified_reset = true;
81979        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
81980
81981
81982
81983        if self.position.ptr_eq(inherited_struct) {
81984            return;
81985        }
81986
81987        self.position.mutate()
81988            .copy_object_fit_from(inherited_struct);
81989    }
81990
81991    /// Set the `object_fit` to the computed value `value`.
81992    #[allow(non_snake_case)]
81993    pub fn set_object_fit(
81994        &mut self,
81995        value: longhands::object_fit::computed_value::T
81996    ) {
81997        self.modified_reset = true;
81998
81999        self.position.mutate()
82000            .set_object_fit(
82001                value,
82002            );
82003    }
82004    /// Inherit `opacity` from our parent style.
82005    #[allow(non_snake_case)]
82006    pub fn inherit_opacity(&mut self) {
82007        let inherited_struct =
82008            self.inherited_style.get_effects();
82009
82010        self.modified_reset = true;
82011        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82012
82013
82014
82015        if self.effects.ptr_eq(inherited_struct) {
82016            return;
82017        }
82018
82019        self.effects.mutate()
82020            .copy_opacity_from(inherited_struct);
82021    }
82022
82023    /// Set the `opacity` to the computed value `value`.
82024    #[allow(non_snake_case)]
82025    pub fn set_opacity(
82026        &mut self,
82027        value: longhands::opacity::computed_value::T
82028    ) {
82029        self.modified_reset = true;
82030
82031        self.effects.mutate()
82032            .set_opacity(
82033                value,
82034            );
82035    }
82036    /// Inherit `order` from our parent style.
82037    #[allow(non_snake_case)]
82038    pub fn inherit_order(&mut self) {
82039        let inherited_struct =
82040            self.inherited_style.get_position();
82041
82042        self.modified_reset = true;
82043        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82044
82045
82046
82047        if self.position.ptr_eq(inherited_struct) {
82048            return;
82049        }
82050
82051        self.position.mutate()
82052            .copy_order_from(inherited_struct);
82053    }
82054
82055    /// Set the `order` to the computed value `value`.
82056    #[allow(non_snake_case)]
82057    pub fn set_order(
82058        &mut self,
82059        value: longhands::order::computed_value::T
82060    ) {
82061        self.modified_reset = true;
82062
82063        self.position.mutate()
82064            .set_order(
82065                value,
82066            );
82067    }
82068    /// Inherit `outline_style` from our parent style.
82069    #[allow(non_snake_case)]
82070    pub fn inherit_outline_style(&mut self) {
82071        let inherited_struct =
82072            self.inherited_style.get_outline();
82073
82074        self.modified_reset = true;
82075        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82076
82077
82078
82079        if self.outline.ptr_eq(inherited_struct) {
82080            return;
82081        }
82082
82083        self.outline.mutate()
82084            .copy_outline_style_from(inherited_struct);
82085    }
82086
82087    /// Set the `outline_style` to the computed value `value`.
82088    #[allow(non_snake_case)]
82089    pub fn set_outline_style(
82090        &mut self,
82091        value: longhands::outline_style::computed_value::T
82092    ) {
82093        self.modified_reset = true;
82094
82095        self.outline.mutate()
82096            .set_outline_style(
82097                value,
82098            );
82099    }
82100    /// Reset `overflow_wrap` to the initial value.
82101    #[allow(non_snake_case)]
82102    pub fn reset_overflow_wrap(&mut self) {
82103        let reset_struct =
82104            self.reset_style.get_inherited_text();
82105
82106        if self.inherited_text.ptr_eq(reset_struct) {
82107            return;
82108        }
82109
82110        self.inherited_text.mutate()
82111            .reset_overflow_wrap(reset_struct);
82112    }
82113
82114    /// Set the `overflow_wrap` to the computed value `value`.
82115    #[allow(non_snake_case)]
82116    pub fn set_overflow_wrap(
82117        &mut self,
82118        value: longhands::overflow_wrap::computed_value::T
82119    ) {
82120
82121        self.inherited_text.mutate()
82122            .set_overflow_wrap(
82123                value,
82124            );
82125    }
82126    /// Reset `pointer_events` to the initial value.
82127    #[allow(non_snake_case)]
82128    pub fn reset_pointer_events(&mut self) {
82129        let reset_struct =
82130            self.reset_style.get_inherited_ui();
82131
82132        if self.inherited_ui.ptr_eq(reset_struct) {
82133            return;
82134        }
82135
82136        self.inherited_ui.mutate()
82137            .reset_pointer_events(reset_struct);
82138    }
82139
82140    /// Set the `pointer_events` to the computed value `value`.
82141    #[allow(non_snake_case)]
82142    pub fn set_pointer_events(
82143        &mut self,
82144        value: longhands::pointer_events::computed_value::T
82145    ) {
82146
82147        self.inherited_ui.mutate()
82148            .set_pointer_events(
82149                value,
82150            );
82151    }
82152    /// Inherit `position` from our parent style.
82153    #[allow(non_snake_case)]
82154    pub fn inherit_position(&mut self) {
82155        let inherited_struct =
82156            self.inherited_style.get_box();
82157
82158        self.modified_reset = true;
82159        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82160
82161
82162
82163        if self.box_.ptr_eq(inherited_struct) {
82164            return;
82165        }
82166
82167        self.box_.mutate()
82168            .copy_position_from(inherited_struct);
82169    }
82170
82171    /// Set the `position` to the computed value `value`.
82172    #[allow(non_snake_case)]
82173    pub fn set_position(
82174        &mut self,
82175        value: longhands::position::computed_value::T
82176    ) {
82177        self.modified_reset = true;
82178
82179        self.box_.mutate()
82180            .set_position(
82181                value,
82182            );
82183    }
82184    /// Inherit `_servo_overflow_clip_box` from our parent style.
82185    #[allow(non_snake_case)]
82186    pub fn inherit__servo_overflow_clip_box(&mut self) {
82187        let inherited_struct =
82188            self.inherited_style.get_box();
82189
82190        self.modified_reset = true;
82191        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82192
82193
82194
82195        if self.box_.ptr_eq(inherited_struct) {
82196            return;
82197        }
82198
82199        self.box_.mutate()
82200            .copy__servo_overflow_clip_box_from(inherited_struct);
82201    }
82202
82203    /// Set the `_servo_overflow_clip_box` to the computed value `value`.
82204    #[allow(non_snake_case)]
82205    pub fn set__servo_overflow_clip_box(
82206        &mut self,
82207        value: longhands::_servo_overflow_clip_box::computed_value::T
82208    ) {
82209        self.modified_reset = true;
82210
82211        self.box_.mutate()
82212            .set__servo_overflow_clip_box(
82213                value,
82214            );
82215    }
82216    /// Inherit `_servo_top_layer` from our parent style.
82217    #[allow(non_snake_case)]
82218    pub fn inherit__servo_top_layer(&mut self) {
82219        let inherited_struct =
82220            self.inherited_style.get_box();
82221
82222        self.modified_reset = true;
82223        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82224
82225
82226
82227        if self.box_.ptr_eq(inherited_struct) {
82228            return;
82229        }
82230
82231        self.box_.mutate()
82232            .copy__servo_top_layer_from(inherited_struct);
82233    }
82234
82235    /// Set the `_servo_top_layer` to the computed value `value`.
82236    #[allow(non_snake_case)]
82237    pub fn set__servo_top_layer(
82238        &mut self,
82239        value: longhands::_servo_top_layer::computed_value::T
82240    ) {
82241        self.modified_reset = true;
82242
82243        self.box_.mutate()
82244            .set__servo_top_layer(
82245                value,
82246            );
82247    }
82248    /// Inherit `table_layout` from our parent style.
82249    #[allow(non_snake_case)]
82250    pub fn inherit_table_layout(&mut self) {
82251        let inherited_struct =
82252            self.inherited_style.get_table();
82253
82254        self.modified_reset = true;
82255        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82256
82257
82258
82259        if self.table.ptr_eq(inherited_struct) {
82260            return;
82261        }
82262
82263        self.table.mutate()
82264            .copy_table_layout_from(inherited_struct);
82265    }
82266
82267    /// Set the `table_layout` to the computed value `value`.
82268    #[allow(non_snake_case)]
82269    pub fn set_table_layout(
82270        &mut self,
82271        value: longhands::table_layout::computed_value::T
82272    ) {
82273        self.modified_reset = true;
82274
82275        self.table.mutate()
82276            .set_table_layout(
82277                value,
82278            );
82279    }
82280    /// Reset `text_align` to the initial value.
82281    #[allow(non_snake_case)]
82282    pub fn reset_text_align(&mut self) {
82283        let reset_struct =
82284            self.reset_style.get_inherited_text();
82285
82286        if self.inherited_text.ptr_eq(reset_struct) {
82287            return;
82288        }
82289
82290        self.inherited_text.mutate()
82291            .reset_text_align(reset_struct);
82292    }
82293
82294    /// Set the `text_align` to the computed value `value`.
82295    #[allow(non_snake_case)]
82296    pub fn set_text_align(
82297        &mut self,
82298        value: longhands::text_align::computed_value::T
82299    ) {
82300
82301        self.inherited_text.mutate()
82302            .set_text_align(
82303                value,
82304            );
82305    }
82306    /// Reset `text_align_last` to the initial value.
82307    #[allow(non_snake_case)]
82308    pub fn reset_text_align_last(&mut self) {
82309        let reset_struct =
82310            self.reset_style.get_inherited_text();
82311
82312        if self.inherited_text.ptr_eq(reset_struct) {
82313            return;
82314        }
82315
82316        self.inherited_text.mutate()
82317            .reset_text_align_last(reset_struct);
82318    }
82319
82320    /// Set the `text_align_last` to the computed value `value`.
82321    #[allow(non_snake_case)]
82322    pub fn set_text_align_last(
82323        &mut self,
82324        value: longhands::text_align_last::computed_value::T
82325    ) {
82326
82327        self.inherited_text.mutate()
82328            .set_text_align_last(
82329                value,
82330            );
82331    }
82332    /// Inherit `text_decoration_line` from our parent style.
82333    #[allow(non_snake_case)]
82334    pub fn inherit_text_decoration_line(&mut self) {
82335        let inherited_struct =
82336            self.inherited_style.get_text();
82337
82338        self.modified_reset = true;
82339        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82340
82341
82342
82343        if self.text.ptr_eq(inherited_struct) {
82344            return;
82345        }
82346
82347        self.text.mutate()
82348            .copy_text_decoration_line_from(inherited_struct);
82349    }
82350
82351    /// Set the `text_decoration_line` to the computed value `value`.
82352    #[allow(non_snake_case)]
82353    pub fn set_text_decoration_line(
82354        &mut self,
82355        value: longhands::text_decoration_line::computed_value::T
82356    ) {
82357        self.modified_reset = true;
82358
82359        self.text.mutate()
82360            .set_text_decoration_line(
82361                value,
82362            );
82363    }
82364    /// Inherit `text_decoration_style` from our parent style.
82365    #[allow(non_snake_case)]
82366    pub fn inherit_text_decoration_style(&mut self) {
82367        let inherited_struct =
82368            self.inherited_style.get_text();
82369
82370        self.modified_reset = true;
82371        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82372
82373
82374
82375        if self.text.ptr_eq(inherited_struct) {
82376            return;
82377        }
82378
82379        self.text.mutate()
82380            .copy_text_decoration_style_from(inherited_struct);
82381    }
82382
82383    /// Set the `text_decoration_style` to the computed value `value`.
82384    #[allow(non_snake_case)]
82385    pub fn set_text_decoration_style(
82386        &mut self,
82387        value: longhands::text_decoration_style::computed_value::T
82388    ) {
82389        self.modified_reset = true;
82390
82391        self.text.mutate()
82392            .set_text_decoration_style(
82393                value,
82394            );
82395    }
82396    /// Reset `text_justify` to the initial value.
82397    #[allow(non_snake_case)]
82398    pub fn reset_text_justify(&mut self) {
82399        let reset_struct =
82400            self.reset_style.get_inherited_text();
82401
82402        if self.inherited_text.ptr_eq(reset_struct) {
82403            return;
82404        }
82405
82406        self.inherited_text.mutate()
82407            .reset_text_justify(reset_struct);
82408    }
82409
82410    /// Set the `text_justify` to the computed value `value`.
82411    #[allow(non_snake_case)]
82412    pub fn set_text_justify(
82413        &mut self,
82414        value: longhands::text_justify::computed_value::T
82415    ) {
82416
82417        self.inherited_text.mutate()
82418            .set_text_justify(
82419                value,
82420            );
82421    }
82422    /// Reset `text_rendering` to the initial value.
82423    #[allow(non_snake_case)]
82424    pub fn reset_text_rendering(&mut self) {
82425        let reset_struct =
82426            self.reset_style.get_inherited_text();
82427
82428        if self.inherited_text.ptr_eq(reset_struct) {
82429            return;
82430        }
82431
82432        self.inherited_text.mutate()
82433            .reset_text_rendering(reset_struct);
82434    }
82435
82436    /// Set the `text_rendering` to the computed value `value`.
82437    #[allow(non_snake_case)]
82438    pub fn set_text_rendering(
82439        &mut self,
82440        value: longhands::text_rendering::computed_value::T
82441    ) {
82442
82443        self.inherited_text.mutate()
82444            .set_text_rendering(
82445                value,
82446            );
82447    }
82448    /// Reset `text_transform` to the initial value.
82449    #[allow(non_snake_case)]
82450    pub fn reset_text_transform(&mut self) {
82451        let reset_struct =
82452            self.reset_style.get_inherited_text();
82453
82454        if self.inherited_text.ptr_eq(reset_struct) {
82455            return;
82456        }
82457
82458        self.inherited_text.mutate()
82459            .reset_text_transform(reset_struct);
82460    }
82461
82462    /// Set the `text_transform` to the computed value `value`.
82463    #[allow(non_snake_case)]
82464    pub fn set_text_transform(
82465        &mut self,
82466        value: longhands::text_transform::computed_value::T
82467    ) {
82468
82469        self.inherited_text.mutate()
82470            .set_text_transform(
82471                value,
82472            );
82473    }
82474    /// Reset `text_wrap_mode` to the initial value.
82475    #[allow(non_snake_case)]
82476    pub fn reset_text_wrap_mode(&mut self) {
82477        let reset_struct =
82478            self.reset_style.get_inherited_text();
82479
82480        if self.inherited_text.ptr_eq(reset_struct) {
82481            return;
82482        }
82483
82484        self.inherited_text.mutate()
82485            .reset_text_wrap_mode(reset_struct);
82486    }
82487
82488    /// Set the `text_wrap_mode` to the computed value `value`.
82489    #[allow(non_snake_case)]
82490    pub fn set_text_wrap_mode(
82491        &mut self,
82492        value: longhands::text_wrap_mode::computed_value::T
82493    ) {
82494
82495        self.inherited_text.mutate()
82496            .set_text_wrap_mode(
82497                value,
82498            );
82499    }
82500    /// Inherit `transform_style` from our parent style.
82501    #[allow(non_snake_case)]
82502    pub fn inherit_transform_style(&mut self) {
82503        let inherited_struct =
82504            self.inherited_style.get_box();
82505
82506        self.modified_reset = true;
82507        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82508
82509
82510
82511        if self.box_.ptr_eq(inherited_struct) {
82512            return;
82513        }
82514
82515        self.box_.mutate()
82516            .copy_transform_style_from(inherited_struct);
82517    }
82518
82519    /// Set the `transform_style` to the computed value `value`.
82520    #[allow(non_snake_case)]
82521    pub fn set_transform_style(
82522        &mut self,
82523        value: longhands::transform_style::computed_value::T
82524    ) {
82525        self.modified_reset = true;
82526
82527        self.box_.mutate()
82528            .set_transform_style(
82529                value,
82530            );
82531    }
82532    /// Inherit `unicode_bidi` from our parent style.
82533    #[allow(non_snake_case)]
82534    pub fn inherit_unicode_bidi(&mut self) {
82535        let inherited_struct =
82536            self.inherited_style.get_text();
82537
82538        self.modified_reset = true;
82539        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82540
82541
82542
82543        if self.text.ptr_eq(inherited_struct) {
82544            return;
82545        }
82546
82547        self.text.mutate()
82548            .copy_unicode_bidi_from(inherited_struct);
82549    }
82550
82551    /// Set the `unicode_bidi` to the computed value `value`.
82552    #[allow(non_snake_case)]
82553    pub fn set_unicode_bidi(
82554        &mut self,
82555        value: longhands::unicode_bidi::computed_value::T
82556    ) {
82557        self.modified_reset = true;
82558
82559        self.text.mutate()
82560            .set_unicode_bidi(
82561                value,
82562            );
82563    }
82564    /// Reset `visibility` to the initial value.
82565    #[allow(non_snake_case)]
82566    pub fn reset_visibility(&mut self) {
82567        let reset_struct =
82568            self.reset_style.get_inherited_box();
82569
82570        if self.inherited_box.ptr_eq(reset_struct) {
82571            return;
82572        }
82573
82574        self.inherited_box.mutate()
82575            .reset_visibility(reset_struct);
82576    }
82577
82578    /// Set the `visibility` to the computed value `value`.
82579    #[allow(non_snake_case)]
82580    pub fn set_visibility(
82581        &mut self,
82582        value: longhands::visibility::computed_value::T
82583    ) {
82584
82585        self.inherited_box.mutate()
82586            .set_visibility(
82587                value,
82588            );
82589    }
82590    /// Reset `white_space_collapse` to the initial value.
82591    #[allow(non_snake_case)]
82592    pub fn reset_white_space_collapse(&mut self) {
82593        let reset_struct =
82594            self.reset_style.get_inherited_text();
82595
82596        if self.inherited_text.ptr_eq(reset_struct) {
82597            return;
82598        }
82599
82600        self.inherited_text.mutate()
82601            .reset_white_space_collapse(reset_struct);
82602    }
82603
82604    /// Set the `white_space_collapse` to the computed value `value`.
82605    #[allow(non_snake_case)]
82606    pub fn set_white_space_collapse(
82607        &mut self,
82608        value: longhands::white_space_collapse::computed_value::T
82609    ) {
82610
82611        self.inherited_text.mutate()
82612            .set_white_space_collapse(
82613                value,
82614            );
82615    }
82616    /// Reset `word_break` to the initial value.
82617    #[allow(non_snake_case)]
82618    pub fn reset_word_break(&mut self) {
82619        let reset_struct =
82620            self.reset_style.get_inherited_text();
82621
82622        if self.inherited_text.ptr_eq(reset_struct) {
82623            return;
82624        }
82625
82626        self.inherited_text.mutate()
82627            .reset_word_break(reset_struct);
82628    }
82629
82630    /// Set the `word_break` to the computed value `value`.
82631    #[allow(non_snake_case)]
82632    pub fn set_word_break(
82633        &mut self,
82634        value: longhands::word_break::computed_value::T
82635    ) {
82636
82637        self.inherited_text.mutate()
82638            .set_word_break(
82639                value,
82640            );
82641    }
82642    /// Reset `writing_mode` to the initial value.
82643    #[allow(non_snake_case)]
82644    pub fn reset_writing_mode(&mut self) {
82645        let reset_struct =
82646            self.reset_style.get_inherited_box();
82647
82648        if self.inherited_box.ptr_eq(reset_struct) {
82649            return;
82650        }
82651
82652        self.inherited_box.mutate()
82653            .reset_writing_mode(reset_struct);
82654    }
82655
82656    /// Set the `writing_mode` to the computed value `value`.
82657    #[allow(non_snake_case)]
82658    pub fn set_writing_mode(
82659        &mut self,
82660        value: longhands::writing_mode::computed_value::T
82661    ) {
82662
82663        self.inherited_box.mutate()
82664            .set_writing_mode(
82665                value,
82666            );
82667    }
82668    /// Inherit `z_index` from our parent style.
82669    #[allow(non_snake_case)]
82670    pub fn inherit_z_index(&mut self) {
82671        let inherited_struct =
82672            self.inherited_style.get_position();
82673
82674        self.modified_reset = true;
82675        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82676
82677
82678
82679        if self.position.ptr_eq(inherited_struct) {
82680            return;
82681        }
82682
82683        self.position.mutate()
82684            .copy_z_index_from(inherited_struct);
82685    }
82686
82687    /// Set the `z_index` to the computed value `value`.
82688    #[allow(non_snake_case)]
82689    pub fn set_z_index(
82690        &mut self,
82691        value: longhands::z_index::computed_value::T
82692    ) {
82693        self.modified_reset = true;
82694
82695        self.position.mutate()
82696            .set_z_index(
82697                value,
82698            );
82699    }
82700    /// Inherit `zoom` from our parent style.
82701    #[allow(non_snake_case)]
82702    pub fn inherit_zoom(&mut self) {
82703        let inherited_struct =
82704            self.inherited_style.get_box();
82705
82706        self.modified_reset = true;
82707        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82708
82709
82710
82711        if self.box_.ptr_eq(inherited_struct) {
82712            return;
82713        }
82714
82715        self.box_.mutate()
82716            .copy_zoom_from(inherited_struct);
82717    }
82718
82719    /// Set the `zoom` to the computed value `value`.
82720    #[allow(non_snake_case)]
82721    pub fn set_zoom(
82722        &mut self,
82723        value: longhands::zoom::computed_value::T
82724    ) {
82725        self.modified_reset = true;
82726
82727        self.box_.mutate()
82728            .set_zoom(
82729                value,
82730            );
82731    }
82732    /// Inherit `flex_grow` from our parent style.
82733    #[allow(non_snake_case)]
82734    pub fn inherit_flex_grow(&mut self) {
82735        let inherited_struct =
82736            self.inherited_style.get_position();
82737
82738        self.modified_reset = true;
82739        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82740
82741
82742
82743        if self.position.ptr_eq(inherited_struct) {
82744            return;
82745        }
82746
82747        self.position.mutate()
82748            .copy_flex_grow_from(inherited_struct);
82749    }
82750
82751    /// Set the `flex_grow` to the computed value `value`.
82752    #[allow(non_snake_case)]
82753    pub fn set_flex_grow(
82754        &mut self,
82755        value: longhands::flex_grow::computed_value::T
82756    ) {
82757        self.modified_reset = true;
82758
82759        self.position.mutate()
82760            .set_flex_grow(
82761                value,
82762            );
82763    }
82764    /// Inherit `flex_shrink` from our parent style.
82765    #[allow(non_snake_case)]
82766    pub fn inherit_flex_shrink(&mut self) {
82767        let inherited_struct =
82768            self.inherited_style.get_position();
82769
82770        self.modified_reset = true;
82771        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82772
82773
82774
82775        if self.position.ptr_eq(inherited_struct) {
82776            return;
82777        }
82778
82779        self.position.mutate()
82780            .copy_flex_shrink_from(inherited_struct);
82781    }
82782
82783    /// Set the `flex_shrink` to the computed value `value`.
82784    #[allow(non_snake_case)]
82785    pub fn set_flex_shrink(
82786        &mut self,
82787        value: longhands::flex_shrink::computed_value::T
82788    ) {
82789        self.modified_reset = true;
82790
82791        self.position.mutate()
82792            .set_flex_shrink(
82793                value,
82794            );
82795    }
82796    /// Inherit `overflow_x` from our parent style.
82797    #[allow(non_snake_case)]
82798    pub fn inherit_overflow_x(&mut self) {
82799        let inherited_struct =
82800            self.inherited_style.get_box();
82801
82802        self.modified_reset = true;
82803        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82804
82805
82806
82807        if self.box_.ptr_eq(inherited_struct) {
82808            return;
82809        }
82810
82811        self.box_.mutate()
82812            .copy_overflow_x_from(inherited_struct);
82813    }
82814
82815    /// Set the `overflow_x` to the computed value `value`.
82816    #[allow(non_snake_case)]
82817    pub fn set_overflow_x(
82818        &mut self,
82819        value: longhands::overflow_x::computed_value::T
82820    ) {
82821        self.modified_reset = true;
82822
82823        self.box_.mutate()
82824            .set_overflow_x(
82825                value,
82826            );
82827    }
82828    /// Inherit `overflow_y` from our parent style.
82829    #[allow(non_snake_case)]
82830    pub fn inherit_overflow_y(&mut self) {
82831        let inherited_struct =
82832            self.inherited_style.get_box();
82833
82834        self.modified_reset = true;
82835        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82836
82837
82838
82839        if self.box_.ptr_eq(inherited_struct) {
82840            return;
82841        }
82842
82843        self.box_.mutate()
82844            .copy_overflow_y_from(inherited_struct);
82845    }
82846
82847    /// Set the `overflow_y` to the computed value `value`.
82848    #[allow(non_snake_case)]
82849    pub fn set_overflow_y(
82850        &mut self,
82851        value: longhands::overflow_y::computed_value::T
82852    ) {
82853        self.modified_reset = true;
82854
82855        self.box_.mutate()
82856            .set_overflow_y(
82857                value,
82858            );
82859    }
82860    /// Inherit `border_bottom_style` from our parent style.
82861    #[allow(non_snake_case)]
82862    pub fn inherit_border_bottom_style(&mut self) {
82863        let inherited_struct =
82864            self.inherited_style.get_border();
82865
82866        self.modified_reset = true;
82867        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82868
82869
82870
82871        if self.border.ptr_eq(inherited_struct) {
82872            return;
82873        }
82874
82875        self.border.mutate()
82876            .copy_border_bottom_style_from(inherited_struct);
82877    }
82878
82879    /// Set the `border_bottom_style` to the computed value `value`.
82880    #[allow(non_snake_case)]
82881    pub fn set_border_bottom_style(
82882        &mut self,
82883        value: longhands::border_bottom_style::computed_value::T
82884    ) {
82885        self.modified_reset = true;
82886
82887        self.border.mutate()
82888            .set_border_bottom_style(
82889                value,
82890            );
82891    }
82892    /// Inherit `border_left_style` from our parent style.
82893    #[allow(non_snake_case)]
82894    pub fn inherit_border_left_style(&mut self) {
82895        let inherited_struct =
82896            self.inherited_style.get_border();
82897
82898        self.modified_reset = true;
82899        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82900
82901
82902
82903        if self.border.ptr_eq(inherited_struct) {
82904            return;
82905        }
82906
82907        self.border.mutate()
82908            .copy_border_left_style_from(inherited_struct);
82909    }
82910
82911    /// Set the `border_left_style` to the computed value `value`.
82912    #[allow(non_snake_case)]
82913    pub fn set_border_left_style(
82914        &mut self,
82915        value: longhands::border_left_style::computed_value::T
82916    ) {
82917        self.modified_reset = true;
82918
82919        self.border.mutate()
82920            .set_border_left_style(
82921                value,
82922            );
82923    }
82924    /// Inherit `border_right_style` from our parent style.
82925    #[allow(non_snake_case)]
82926    pub fn inherit_border_right_style(&mut self) {
82927        let inherited_struct =
82928            self.inherited_style.get_border();
82929
82930        self.modified_reset = true;
82931        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82932
82933
82934
82935        if self.border.ptr_eq(inherited_struct) {
82936            return;
82937        }
82938
82939        self.border.mutate()
82940            .copy_border_right_style_from(inherited_struct);
82941    }
82942
82943    /// Set the `border_right_style` to the computed value `value`.
82944    #[allow(non_snake_case)]
82945    pub fn set_border_right_style(
82946        &mut self,
82947        value: longhands::border_right_style::computed_value::T
82948    ) {
82949        self.modified_reset = true;
82950
82951        self.border.mutate()
82952            .set_border_right_style(
82953                value,
82954            );
82955    }
82956    /// Inherit `border_top_style` from our parent style.
82957    #[allow(non_snake_case)]
82958    pub fn inherit_border_top_style(&mut self) {
82959        let inherited_struct =
82960            self.inherited_style.get_border();
82961
82962        self.modified_reset = true;
82963        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82964
82965
82966
82967        if self.border.ptr_eq(inherited_struct) {
82968            return;
82969        }
82970
82971        self.border.mutate()
82972            .copy_border_top_style_from(inherited_struct);
82973    }
82974
82975    /// Set the `border_top_style` to the computed value `value`.
82976    #[allow(non_snake_case)]
82977    pub fn set_border_top_style(
82978        &mut self,
82979        value: longhands::border_top_style::computed_value::T
82980    ) {
82981        self.modified_reset = true;
82982
82983        self.border.mutate()
82984            .set_border_top_style(
82985                value,
82986            );
82987    }
82988    /// Inherit `animation_composition` from our parent style.
82989    #[allow(non_snake_case)]
82990    pub fn inherit_animation_composition(&mut self) {
82991        let inherited_struct =
82992            self.inherited_style.get_ui();
82993
82994        self.modified_reset = true;
82995        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
82996
82997
82998
82999        if self.ui.ptr_eq(inherited_struct) {
83000            return;
83001        }
83002
83003        self.ui.mutate()
83004            .copy_animation_composition_from(inherited_struct);
83005    }
83006
83007    /// Set the `animation_composition` to the computed value `value`.
83008    #[allow(non_snake_case)]
83009    pub fn set_animation_composition(
83010        &mut self,
83011        value: longhands::animation_composition::computed_value::T
83012    ) {
83013        self.modified_reset = true;
83014
83015        self.ui.mutate()
83016            .set_animation_composition(
83017                value,
83018            );
83019    }
83020    /// Inherit `animation_delay` from our parent style.
83021    #[allow(non_snake_case)]
83022    pub fn inherit_animation_delay(&mut self) {
83023        let inherited_struct =
83024            self.inherited_style.get_ui();
83025
83026        self.modified_reset = true;
83027        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83028
83029
83030
83031        if self.ui.ptr_eq(inherited_struct) {
83032            return;
83033        }
83034
83035        self.ui.mutate()
83036            .copy_animation_delay_from(inherited_struct);
83037    }
83038
83039    /// Set the `animation_delay` to the computed value `value`.
83040    #[allow(non_snake_case)]
83041    pub fn set_animation_delay(
83042        &mut self,
83043        value: longhands::animation_delay::computed_value::T
83044    ) {
83045        self.modified_reset = true;
83046
83047        self.ui.mutate()
83048            .set_animation_delay(
83049                value,
83050            );
83051    }
83052    /// Inherit `animation_direction` from our parent style.
83053    #[allow(non_snake_case)]
83054    pub fn inherit_animation_direction(&mut self) {
83055        let inherited_struct =
83056            self.inherited_style.get_ui();
83057
83058        self.modified_reset = true;
83059        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83060
83061
83062
83063        if self.ui.ptr_eq(inherited_struct) {
83064            return;
83065        }
83066
83067        self.ui.mutate()
83068            .copy_animation_direction_from(inherited_struct);
83069    }
83070
83071    /// Set the `animation_direction` to the computed value `value`.
83072    #[allow(non_snake_case)]
83073    pub fn set_animation_direction(
83074        &mut self,
83075        value: longhands::animation_direction::computed_value::T
83076    ) {
83077        self.modified_reset = true;
83078
83079        self.ui.mutate()
83080            .set_animation_direction(
83081                value,
83082            );
83083    }
83084    /// Inherit `animation_duration` from our parent style.
83085    #[allow(non_snake_case)]
83086    pub fn inherit_animation_duration(&mut self) {
83087        let inherited_struct =
83088            self.inherited_style.get_ui();
83089
83090        self.modified_reset = true;
83091        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83092
83093
83094
83095        if self.ui.ptr_eq(inherited_struct) {
83096            return;
83097        }
83098
83099        self.ui.mutate()
83100            .copy_animation_duration_from(inherited_struct);
83101    }
83102
83103    /// Set the `animation_duration` to the computed value `value`.
83104    #[allow(non_snake_case)]
83105    pub fn set_animation_duration(
83106        &mut self,
83107        value: longhands::animation_duration::computed_value::T
83108    ) {
83109        self.modified_reset = true;
83110
83111        self.ui.mutate()
83112            .set_animation_duration(
83113                value,
83114            );
83115    }
83116    /// Inherit `animation_fill_mode` from our parent style.
83117    #[allow(non_snake_case)]
83118    pub fn inherit_animation_fill_mode(&mut self) {
83119        let inherited_struct =
83120            self.inherited_style.get_ui();
83121
83122        self.modified_reset = true;
83123        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83124
83125
83126
83127        if self.ui.ptr_eq(inherited_struct) {
83128            return;
83129        }
83130
83131        self.ui.mutate()
83132            .copy_animation_fill_mode_from(inherited_struct);
83133    }
83134
83135    /// Set the `animation_fill_mode` to the computed value `value`.
83136    #[allow(non_snake_case)]
83137    pub fn set_animation_fill_mode(
83138        &mut self,
83139        value: longhands::animation_fill_mode::computed_value::T
83140    ) {
83141        self.modified_reset = true;
83142
83143        self.ui.mutate()
83144            .set_animation_fill_mode(
83145                value,
83146            );
83147    }
83148    /// Inherit `animation_iteration_count` from our parent style.
83149    #[allow(non_snake_case)]
83150    pub fn inherit_animation_iteration_count(&mut self) {
83151        let inherited_struct =
83152            self.inherited_style.get_ui();
83153
83154        self.modified_reset = true;
83155        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83156
83157
83158
83159        if self.ui.ptr_eq(inherited_struct) {
83160            return;
83161        }
83162
83163        self.ui.mutate()
83164            .copy_animation_iteration_count_from(inherited_struct);
83165    }
83166
83167    /// Set the `animation_iteration_count` to the computed value `value`.
83168    #[allow(non_snake_case)]
83169    pub fn set_animation_iteration_count(
83170        &mut self,
83171        value: longhands::animation_iteration_count::computed_value::T
83172    ) {
83173        self.modified_reset = true;
83174
83175        self.ui.mutate()
83176            .set_animation_iteration_count(
83177                value,
83178            );
83179    }
83180    /// Inherit `animation_name` from our parent style.
83181    #[allow(non_snake_case)]
83182    pub fn inherit_animation_name(&mut self) {
83183        let inherited_struct =
83184            self.inherited_style.get_ui();
83185
83186        self.modified_reset = true;
83187        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83188
83189
83190
83191        if self.ui.ptr_eq(inherited_struct) {
83192            return;
83193        }
83194
83195        self.ui.mutate()
83196            .copy_animation_name_from(inherited_struct);
83197    }
83198
83199    /// Set the `animation_name` to the computed value `value`.
83200    #[allow(non_snake_case)]
83201    pub fn set_animation_name(
83202        &mut self,
83203        value: longhands::animation_name::computed_value::T
83204    ) {
83205        self.modified_reset = true;
83206
83207        self.ui.mutate()
83208            .set_animation_name(
83209                value,
83210            );
83211    }
83212    /// Inherit `animation_play_state` from our parent style.
83213    #[allow(non_snake_case)]
83214    pub fn inherit_animation_play_state(&mut self) {
83215        let inherited_struct =
83216            self.inherited_style.get_ui();
83217
83218        self.modified_reset = true;
83219        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83220
83221
83222
83223        if self.ui.ptr_eq(inherited_struct) {
83224            return;
83225        }
83226
83227        self.ui.mutate()
83228            .copy_animation_play_state_from(inherited_struct);
83229    }
83230
83231    /// Set the `animation_play_state` to the computed value `value`.
83232    #[allow(non_snake_case)]
83233    pub fn set_animation_play_state(
83234        &mut self,
83235        value: longhands::animation_play_state::computed_value::T
83236    ) {
83237        self.modified_reset = true;
83238
83239        self.ui.mutate()
83240            .set_animation_play_state(
83241                value,
83242            );
83243    }
83244    /// Inherit `animation_timeline` from our parent style.
83245    #[allow(non_snake_case)]
83246    pub fn inherit_animation_timeline(&mut self) {
83247        let inherited_struct =
83248            self.inherited_style.get_ui();
83249
83250        self.modified_reset = true;
83251        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83252
83253
83254
83255        if self.ui.ptr_eq(inherited_struct) {
83256            return;
83257        }
83258
83259        self.ui.mutate()
83260            .copy_animation_timeline_from(inherited_struct);
83261    }
83262
83263    /// Set the `animation_timeline` to the computed value `value`.
83264    #[allow(non_snake_case)]
83265    pub fn set_animation_timeline(
83266        &mut self,
83267        value: longhands::animation_timeline::computed_value::T
83268    ) {
83269        self.modified_reset = true;
83270
83271        self.ui.mutate()
83272            .set_animation_timeline(
83273                value,
83274            );
83275    }
83276    /// Inherit `animation_timing_function` from our parent style.
83277    #[allow(non_snake_case)]
83278    pub fn inherit_animation_timing_function(&mut self) {
83279        let inherited_struct =
83280            self.inherited_style.get_ui();
83281
83282        self.modified_reset = true;
83283        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83284
83285
83286
83287        if self.ui.ptr_eq(inherited_struct) {
83288            return;
83289        }
83290
83291        self.ui.mutate()
83292            .copy_animation_timing_function_from(inherited_struct);
83293    }
83294
83295    /// Set the `animation_timing_function` to the computed value `value`.
83296    #[allow(non_snake_case)]
83297    pub fn set_animation_timing_function(
83298        &mut self,
83299        value: longhands::animation_timing_function::computed_value::T
83300    ) {
83301        self.modified_reset = true;
83302
83303        self.ui.mutate()
83304            .set_animation_timing_function(
83305                value,
83306            );
83307    }
83308    /// Inherit `backdrop_filter` from our parent style.
83309    #[allow(non_snake_case)]
83310    pub fn inherit_backdrop_filter(&mut self) {
83311        let inherited_struct =
83312            self.inherited_style.get_effects();
83313
83314        self.modified_reset = true;
83315        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83316
83317
83318
83319        if self.effects.ptr_eq(inherited_struct) {
83320            return;
83321        }
83322
83323        self.effects.mutate()
83324            .copy_backdrop_filter_from(inherited_struct);
83325    }
83326
83327    /// Set the `backdrop_filter` to the computed value `value`.
83328    #[allow(non_snake_case)]
83329    pub fn set_backdrop_filter(
83330        &mut self,
83331        value: longhands::backdrop_filter::computed_value::T
83332    ) {
83333        self.modified_reset = true;
83334
83335        self.effects.mutate()
83336            .set_backdrop_filter(
83337                value,
83338            );
83339    }
83340    /// Inherit `background_attachment` from our parent style.
83341    #[allow(non_snake_case)]
83342    pub fn inherit_background_attachment(&mut self) {
83343        let inherited_struct =
83344            self.inherited_style.get_background();
83345
83346        self.modified_reset = true;
83347        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83348
83349
83350
83351        if self.background.ptr_eq(inherited_struct) {
83352            return;
83353        }
83354
83355        self.background.mutate()
83356            .copy_background_attachment_from(inherited_struct);
83357    }
83358
83359    /// Set the `background_attachment` to the computed value `value`.
83360    #[allow(non_snake_case)]
83361    pub fn set_background_attachment(
83362        &mut self,
83363        value: longhands::background_attachment::computed_value::T
83364    ) {
83365        self.modified_reset = true;
83366
83367        self.background.mutate()
83368            .set_background_attachment(
83369                value,
83370            );
83371    }
83372    /// Inherit `background_clip` from our parent style.
83373    #[allow(non_snake_case)]
83374    pub fn inherit_background_clip(&mut self) {
83375        let inherited_struct =
83376            self.inherited_style.get_background();
83377
83378        self.modified_reset = true;
83379        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83380
83381
83382
83383        if self.background.ptr_eq(inherited_struct) {
83384            return;
83385        }
83386
83387        self.background.mutate()
83388            .copy_background_clip_from(inherited_struct);
83389    }
83390
83391    /// Set the `background_clip` to the computed value `value`.
83392    #[allow(non_snake_case)]
83393    pub fn set_background_clip(
83394        &mut self,
83395        value: longhands::background_clip::computed_value::T
83396    ) {
83397        self.modified_reset = true;
83398
83399        self.background.mutate()
83400            .set_background_clip(
83401                value,
83402            );
83403    }
83404    /// Inherit `background_image` from our parent style.
83405    #[allow(non_snake_case)]
83406    pub fn inherit_background_image(&mut self) {
83407        let inherited_struct =
83408            self.inherited_style.get_background();
83409
83410        self.modified_reset = true;
83411        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83412
83413
83414
83415        if self.background.ptr_eq(inherited_struct) {
83416            return;
83417        }
83418
83419        self.background.mutate()
83420            .copy_background_image_from(inherited_struct);
83421    }
83422
83423    /// Set the `background_image` to the computed value `value`.
83424    #[allow(non_snake_case)]
83425    pub fn set_background_image(
83426        &mut self,
83427        value: longhands::background_image::computed_value::T
83428    ) {
83429        self.modified_reset = true;
83430
83431        self.background.mutate()
83432            .set_background_image(
83433                value,
83434            );
83435    }
83436    /// Inherit `background_origin` from our parent style.
83437    #[allow(non_snake_case)]
83438    pub fn inherit_background_origin(&mut self) {
83439        let inherited_struct =
83440            self.inherited_style.get_background();
83441
83442        self.modified_reset = true;
83443        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83444
83445
83446
83447        if self.background.ptr_eq(inherited_struct) {
83448            return;
83449        }
83450
83451        self.background.mutate()
83452            .copy_background_origin_from(inherited_struct);
83453    }
83454
83455    /// Set the `background_origin` to the computed value `value`.
83456    #[allow(non_snake_case)]
83457    pub fn set_background_origin(
83458        &mut self,
83459        value: longhands::background_origin::computed_value::T
83460    ) {
83461        self.modified_reset = true;
83462
83463        self.background.mutate()
83464            .set_background_origin(
83465                value,
83466            );
83467    }
83468    /// Inherit `background_position_x` from our parent style.
83469    #[allow(non_snake_case)]
83470    pub fn inherit_background_position_x(&mut self) {
83471        let inherited_struct =
83472            self.inherited_style.get_background();
83473
83474        self.modified_reset = true;
83475        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83476
83477
83478
83479        if self.background.ptr_eq(inherited_struct) {
83480            return;
83481        }
83482
83483        self.background.mutate()
83484            .copy_background_position_x_from(inherited_struct);
83485    }
83486
83487    /// Set the `background_position_x` to the computed value `value`.
83488    #[allow(non_snake_case)]
83489    pub fn set_background_position_x(
83490        &mut self,
83491        value: longhands::background_position_x::computed_value::T
83492    ) {
83493        self.modified_reset = true;
83494
83495        self.background.mutate()
83496            .set_background_position_x(
83497                value,
83498            );
83499    }
83500    /// Inherit `background_position_y` from our parent style.
83501    #[allow(non_snake_case)]
83502    pub fn inherit_background_position_y(&mut self) {
83503        let inherited_struct =
83504            self.inherited_style.get_background();
83505
83506        self.modified_reset = true;
83507        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83508
83509
83510
83511        if self.background.ptr_eq(inherited_struct) {
83512            return;
83513        }
83514
83515        self.background.mutate()
83516            .copy_background_position_y_from(inherited_struct);
83517    }
83518
83519    /// Set the `background_position_y` to the computed value `value`.
83520    #[allow(non_snake_case)]
83521    pub fn set_background_position_y(
83522        &mut self,
83523        value: longhands::background_position_y::computed_value::T
83524    ) {
83525        self.modified_reset = true;
83526
83527        self.background.mutate()
83528            .set_background_position_y(
83529                value,
83530            );
83531    }
83532    /// Inherit `background_repeat` from our parent style.
83533    #[allow(non_snake_case)]
83534    pub fn inherit_background_repeat(&mut self) {
83535        let inherited_struct =
83536            self.inherited_style.get_background();
83537
83538        self.modified_reset = true;
83539        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83540
83541
83542
83543        if self.background.ptr_eq(inherited_struct) {
83544            return;
83545        }
83546
83547        self.background.mutate()
83548            .copy_background_repeat_from(inherited_struct);
83549    }
83550
83551    /// Set the `background_repeat` to the computed value `value`.
83552    #[allow(non_snake_case)]
83553    pub fn set_background_repeat(
83554        &mut self,
83555        value: longhands::background_repeat::computed_value::T
83556    ) {
83557        self.modified_reset = true;
83558
83559        self.background.mutate()
83560            .set_background_repeat(
83561                value,
83562            );
83563    }
83564    /// Inherit `background_size` from our parent style.
83565    #[allow(non_snake_case)]
83566    pub fn inherit_background_size(&mut self) {
83567        let inherited_struct =
83568            self.inherited_style.get_background();
83569
83570        self.modified_reset = true;
83571        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83572
83573
83574
83575        if self.background.ptr_eq(inherited_struct) {
83576            return;
83577        }
83578
83579        self.background.mutate()
83580            .copy_background_size_from(inherited_struct);
83581    }
83582
83583    /// Set the `background_size` to the computed value `value`.
83584    #[allow(non_snake_case)]
83585    pub fn set_background_size(
83586        &mut self,
83587        value: longhands::background_size::computed_value::T
83588    ) {
83589        self.modified_reset = true;
83590
83591        self.background.mutate()
83592            .set_background_size(
83593                value,
83594            );
83595    }
83596    /// Inherit `border_image_outset` from our parent style.
83597    #[allow(non_snake_case)]
83598    pub fn inherit_border_image_outset(&mut self) {
83599        let inherited_struct =
83600            self.inherited_style.get_border();
83601
83602        self.modified_reset = true;
83603        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83604
83605
83606
83607        if self.border.ptr_eq(inherited_struct) {
83608            return;
83609        }
83610
83611        self.border.mutate()
83612            .copy_border_image_outset_from(inherited_struct);
83613    }
83614
83615    /// Set the `border_image_outset` to the computed value `value`.
83616    #[allow(non_snake_case)]
83617    pub fn set_border_image_outset(
83618        &mut self,
83619        value: longhands::border_image_outset::computed_value::T
83620    ) {
83621        self.modified_reset = true;
83622
83623        self.border.mutate()
83624            .set_border_image_outset(
83625                value,
83626            );
83627    }
83628    /// Inherit `border_image_slice` from our parent style.
83629    #[allow(non_snake_case)]
83630    pub fn inherit_border_image_slice(&mut self) {
83631        let inherited_struct =
83632            self.inherited_style.get_border();
83633
83634        self.modified_reset = true;
83635        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83636
83637
83638
83639        if self.border.ptr_eq(inherited_struct) {
83640            return;
83641        }
83642
83643        self.border.mutate()
83644            .copy_border_image_slice_from(inherited_struct);
83645    }
83646
83647    /// Set the `border_image_slice` to the computed value `value`.
83648    #[allow(non_snake_case)]
83649    pub fn set_border_image_slice(
83650        &mut self,
83651        value: longhands::border_image_slice::computed_value::T
83652    ) {
83653        self.modified_reset = true;
83654
83655        self.border.mutate()
83656            .set_border_image_slice(
83657                value,
83658            );
83659    }
83660    /// Inherit `border_image_width` from our parent style.
83661    #[allow(non_snake_case)]
83662    pub fn inherit_border_image_width(&mut self) {
83663        let inherited_struct =
83664            self.inherited_style.get_border();
83665
83666        self.modified_reset = true;
83667        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83668
83669
83670
83671        if self.border.ptr_eq(inherited_struct) {
83672            return;
83673        }
83674
83675        self.border.mutate()
83676            .copy_border_image_width_from(inherited_struct);
83677    }
83678
83679    /// Set the `border_image_width` to the computed value `value`.
83680    #[allow(non_snake_case)]
83681    pub fn set_border_image_width(
83682        &mut self,
83683        value: longhands::border_image_width::computed_value::T
83684    ) {
83685        self.modified_reset = true;
83686
83687        self.border.mutate()
83688            .set_border_image_width(
83689                value,
83690            );
83691    }
83692    /// Reset `border_spacing` to the initial value.
83693    #[allow(non_snake_case)]
83694    pub fn reset_border_spacing(&mut self) {
83695        let reset_struct =
83696            self.reset_style.get_inherited_table();
83697
83698        if self.inherited_table.ptr_eq(reset_struct) {
83699            return;
83700        }
83701
83702        self.inherited_table.mutate()
83703            .reset_border_spacing(reset_struct);
83704    }
83705
83706    /// Set the `border_spacing` to the computed value `value`.
83707    #[allow(non_snake_case)]
83708    pub fn set_border_spacing(
83709        &mut self,
83710        value: longhands::border_spacing::computed_value::T
83711    ) {
83712
83713        self.inherited_table.mutate()
83714            .set_border_spacing(
83715                value,
83716            );
83717    }
83718    /// Inherit `box_shadow` from our parent style.
83719    #[allow(non_snake_case)]
83720    pub fn inherit_box_shadow(&mut self) {
83721        let inherited_struct =
83722            self.inherited_style.get_effects();
83723
83724        self.modified_reset = true;
83725        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83726
83727
83728
83729        if self.effects.ptr_eq(inherited_struct) {
83730            return;
83731        }
83732
83733        self.effects.mutate()
83734            .copy_box_shadow_from(inherited_struct);
83735    }
83736
83737    /// Set the `box_shadow` to the computed value `value`.
83738    #[allow(non_snake_case)]
83739    pub fn set_box_shadow(
83740        &mut self,
83741        value: longhands::box_shadow::computed_value::T
83742    ) {
83743        self.modified_reset = true;
83744
83745        self.effects.mutate()
83746            .set_box_shadow(
83747                value,
83748            );
83749    }
83750    /// Inherit `clip` from our parent style.
83751    #[allow(non_snake_case)]
83752    pub fn inherit_clip(&mut self) {
83753        let inherited_struct =
83754            self.inherited_style.get_effects();
83755
83756        self.modified_reset = true;
83757        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83758
83759
83760
83761        if self.effects.ptr_eq(inherited_struct) {
83762            return;
83763        }
83764
83765        self.effects.mutate()
83766            .copy_clip_from(inherited_struct);
83767    }
83768
83769    /// Set the `clip` to the computed value `value`.
83770    #[allow(non_snake_case)]
83771    pub fn set_clip(
83772        &mut self,
83773        value: longhands::clip::computed_value::T
83774    ) {
83775        self.modified_reset = true;
83776
83777        self.effects.mutate()
83778            .set_clip(
83779                value,
83780            );
83781    }
83782    /// Inherit `clip_path` from our parent style.
83783    #[allow(non_snake_case)]
83784    pub fn inherit_clip_path(&mut self) {
83785        let inherited_struct =
83786            self.inherited_style.get_svg();
83787
83788        self.modified_reset = true;
83789        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83790
83791
83792
83793        if self.svg.ptr_eq(inherited_struct) {
83794            return;
83795        }
83796
83797        self.svg.mutate()
83798            .copy_clip_path_from(inherited_struct);
83799    }
83800
83801    /// Set the `clip_path` to the computed value `value`.
83802    #[allow(non_snake_case)]
83803    pub fn set_clip_path(
83804        &mut self,
83805        value: longhands::clip_path::computed_value::T
83806    ) {
83807        self.modified_reset = true;
83808
83809        self.svg.mutate()
83810            .set_clip_path(
83811                value,
83812            );
83813    }
83814    /// Reset `color` to the initial value.
83815    #[allow(non_snake_case)]
83816    pub fn reset_color(&mut self) {
83817        let reset_struct =
83818            self.reset_style.get_inherited_text();
83819
83820        if self.inherited_text.ptr_eq(reset_struct) {
83821            return;
83822        }
83823
83824        self.inherited_text.mutate()
83825            .reset_color(reset_struct);
83826    }
83827
83828    /// Set the `color` to the computed value `value`.
83829    #[allow(non_snake_case)]
83830    pub fn set_color(
83831        &mut self,
83832        value: longhands::color::computed_value::T
83833    ) {
83834
83835        self.inherited_text.mutate()
83836            .set_color(
83837                value,
83838            );
83839    }
83840    /// Reset `color_scheme` to the initial value.
83841    #[allow(non_snake_case)]
83842    pub fn reset_color_scheme(&mut self) {
83843        let reset_struct =
83844            self.reset_style.get_inherited_ui();
83845
83846        if self.inherited_ui.ptr_eq(reset_struct) {
83847            return;
83848        }
83849
83850        self.inherited_ui.mutate()
83851            .reset_color_scheme(reset_struct);
83852    }
83853
83854    /// Set the `color_scheme` to the computed value `value`.
83855    #[allow(non_snake_case)]
83856    pub fn set_color_scheme(
83857        &mut self,
83858        value: longhands::color_scheme::computed_value::T
83859    ) {
83860
83861        self.inherited_ui.mutate()
83862            .set_color_scheme(
83863                value,
83864            );
83865    }
83866    /// Inherit `column_width` from our parent style.
83867    #[allow(non_snake_case)]
83868    pub fn inherit_column_width(&mut self) {
83869        let inherited_struct =
83870            self.inherited_style.get_column();
83871
83872        self.modified_reset = true;
83873        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83874
83875
83876
83877        if self.column.ptr_eq(inherited_struct) {
83878            return;
83879        }
83880
83881        self.column.mutate()
83882            .copy_column_width_from(inherited_struct);
83883    }
83884
83885    /// Set the `column_width` to the computed value `value`.
83886    #[allow(non_snake_case)]
83887    pub fn set_column_width(
83888        &mut self,
83889        value: longhands::column_width::computed_value::T
83890    ) {
83891        self.modified_reset = true;
83892
83893        self.column.mutate()
83894            .set_column_width(
83895                value,
83896            );
83897    }
83898    /// Inherit `container_name` from our parent style.
83899    #[allow(non_snake_case)]
83900    pub fn inherit_container_name(&mut self) {
83901        let inherited_struct =
83902            self.inherited_style.get_box();
83903
83904        self.modified_reset = true;
83905        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83906
83907
83908
83909        if self.box_.ptr_eq(inherited_struct) {
83910            return;
83911        }
83912
83913        self.box_.mutate()
83914            .copy_container_name_from(inherited_struct);
83915    }
83916
83917    /// Set the `container_name` to the computed value `value`.
83918    #[allow(non_snake_case)]
83919    pub fn set_container_name(
83920        &mut self,
83921        value: longhands::container_name::computed_value::T
83922    ) {
83923        self.modified_reset = true;
83924
83925        self.box_.mutate()
83926            .set_container_name(
83927                value,
83928            );
83929    }
83930    /// Inherit `content` from our parent style.
83931    #[allow(non_snake_case)]
83932    pub fn inherit_content(&mut self) {
83933        let inherited_struct =
83934            self.inherited_style.get_counters();
83935
83936        self.modified_reset = true;
83937        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83938
83939        self.add_flags(ComputedValueFlags::CONTENT_DEPENDS_ON_INHERITED_STYLE);
83940
83941
83942        if self.counters.ptr_eq(inherited_struct) {
83943            return;
83944        }
83945
83946        self.counters.mutate()
83947            .copy_content_from(inherited_struct);
83948    }
83949
83950    /// Set the `content` to the computed value `value`.
83951    #[allow(non_snake_case)]
83952    pub fn set_content(
83953        &mut self,
83954        value: longhands::content::computed_value::T
83955    ) {
83956        self.modified_reset = true;
83957
83958        self.counters.mutate()
83959            .set_content(
83960                value,
83961            );
83962    }
83963    /// Inherit `counter_increment` from our parent style.
83964    #[allow(non_snake_case)]
83965    pub fn inherit_counter_increment(&mut self) {
83966        let inherited_struct =
83967            self.inherited_style.get_counters();
83968
83969        self.modified_reset = true;
83970        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
83971
83972
83973
83974        if self.counters.ptr_eq(inherited_struct) {
83975            return;
83976        }
83977
83978        self.counters.mutate()
83979            .copy_counter_increment_from(inherited_struct);
83980    }
83981
83982    /// Set the `counter_increment` to the computed value `value`.
83983    #[allow(non_snake_case)]
83984    pub fn set_counter_increment(
83985        &mut self,
83986        value: longhands::counter_increment::computed_value::T
83987    ) {
83988        self.modified_reset = true;
83989
83990        self.counters.mutate()
83991            .set_counter_increment(
83992                value,
83993            );
83994    }
83995    /// Inherit `counter_reset` from our parent style.
83996    #[allow(non_snake_case)]
83997    pub fn inherit_counter_reset(&mut self) {
83998        let inherited_struct =
83999            self.inherited_style.get_counters();
84000
84001        self.modified_reset = true;
84002        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84003
84004
84005
84006        if self.counters.ptr_eq(inherited_struct) {
84007            return;
84008        }
84009
84010        self.counters.mutate()
84011            .copy_counter_reset_from(inherited_struct);
84012    }
84013
84014    /// Set the `counter_reset` to the computed value `value`.
84015    #[allow(non_snake_case)]
84016    pub fn set_counter_reset(
84017        &mut self,
84018        value: longhands::counter_reset::computed_value::T
84019    ) {
84020        self.modified_reset = true;
84021
84022        self.counters.mutate()
84023            .set_counter_reset(
84024                value,
84025            );
84026    }
84027    /// Reset `cursor` to the initial value.
84028    #[allow(non_snake_case)]
84029    pub fn reset_cursor(&mut self) {
84030        let reset_struct =
84031            self.reset_style.get_inherited_ui();
84032
84033        if self.inherited_ui.ptr_eq(reset_struct) {
84034            return;
84035        }
84036
84037        self.inherited_ui.mutate()
84038            .reset_cursor(reset_struct);
84039    }
84040
84041    /// Set the `cursor` to the computed value `value`.
84042    #[allow(non_snake_case)]
84043    pub fn set_cursor(
84044        &mut self,
84045        value: longhands::cursor::computed_value::T
84046    ) {
84047
84048        self.inherited_ui.mutate()
84049            .set_cursor(
84050                value,
84051            );
84052    }
84053    /// Inherit `filter` from our parent style.
84054    #[allow(non_snake_case)]
84055    pub fn inherit_filter(&mut self) {
84056        let inherited_struct =
84057            self.inherited_style.get_effects();
84058
84059        self.modified_reset = true;
84060        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84061
84062
84063
84064        if self.effects.ptr_eq(inherited_struct) {
84065            return;
84066        }
84067
84068        self.effects.mutate()
84069            .copy_filter_from(inherited_struct);
84070    }
84071
84072    /// Set the `filter` to the computed value `value`.
84073    #[allow(non_snake_case)]
84074    pub fn set_filter(
84075        &mut self,
84076        value: longhands::filter::computed_value::T
84077    ) {
84078        self.modified_reset = true;
84079
84080        self.effects.mutate()
84081            .set_filter(
84082                value,
84083            );
84084    }
84085    /// Inherit `flex_basis` from our parent style.
84086    #[allow(non_snake_case)]
84087    pub fn inherit_flex_basis(&mut self) {
84088        let inherited_struct =
84089            self.inherited_style.get_position();
84090
84091        self.modified_reset = true;
84092        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84093
84094
84095
84096        if self.position.ptr_eq(inherited_struct) {
84097            return;
84098        }
84099
84100        self.position.mutate()
84101            .copy_flex_basis_from(inherited_struct);
84102    }
84103
84104    /// Set the `flex_basis` to the computed value `value`.
84105    #[allow(non_snake_case)]
84106    pub fn set_flex_basis(
84107        &mut self,
84108        value: longhands::flex_basis::computed_value::T
84109    ) {
84110        self.modified_reset = true;
84111
84112        self.position.mutate()
84113            .set_flex_basis(
84114                value,
84115            );
84116    }
84117    /// Reset `font_family` to the initial value.
84118    #[allow(non_snake_case)]
84119    pub fn reset_font_family(&mut self) {
84120        let reset_struct =
84121            self.reset_style.get_font();
84122
84123        if self.font.ptr_eq(reset_struct) {
84124            return;
84125        }
84126
84127        self.font.mutate()
84128            .reset_font_family(reset_struct);
84129    }
84130
84131    /// Set the `font_family` to the computed value `value`.
84132    #[allow(non_snake_case)]
84133    pub fn set_font_family(
84134        &mut self,
84135        value: longhands::font_family::computed_value::T
84136    ) {
84137
84138        self.font.mutate()
84139            .set_font_family(
84140                value,
84141            );
84142    }
84143    /// Reset `font_size` to the initial value.
84144    #[allow(non_snake_case)]
84145    pub fn reset_font_size(&mut self) {
84146        let reset_struct =
84147            self.reset_style.get_font();
84148
84149        if self.font.ptr_eq(reset_struct) {
84150            return;
84151        }
84152
84153        self.font.mutate()
84154            .reset_font_size(reset_struct);
84155    }
84156
84157    /// Set the `font_size` to the computed value `value`.
84158    #[allow(non_snake_case)]
84159    pub fn set_font_size(
84160        &mut self,
84161        value: longhands::font_size::computed_value::T
84162    ) {
84163
84164        self.font.mutate()
84165            .set_font_size(
84166                value,
84167            );
84168    }
84169    /// Reset `font_variation_settings` to the initial value.
84170    #[allow(non_snake_case)]
84171    pub fn reset_font_variation_settings(&mut self) {
84172        let reset_struct =
84173            self.reset_style.get_font();
84174
84175        if self.font.ptr_eq(reset_struct) {
84176            return;
84177        }
84178
84179        self.font.mutate()
84180            .reset_font_variation_settings(reset_struct);
84181    }
84182
84183    /// Set the `font_variation_settings` to the computed value `value`.
84184    #[allow(non_snake_case)]
84185    pub fn set_font_variation_settings(
84186        &mut self,
84187        value: longhands::font_variation_settings::computed_value::T
84188    ) {
84189
84190        self.font.mutate()
84191            .set_font_variation_settings(
84192                value,
84193            );
84194    }
84195    /// Inherit `grid_template_areas` from our parent style.
84196    #[allow(non_snake_case)]
84197    pub fn inherit_grid_template_areas(&mut self) {
84198        let inherited_struct =
84199            self.inherited_style.get_position();
84200
84201        self.modified_reset = true;
84202        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84203
84204
84205
84206        if self.position.ptr_eq(inherited_struct) {
84207            return;
84208        }
84209
84210        self.position.mutate()
84211            .copy_grid_template_areas_from(inherited_struct);
84212    }
84213
84214    /// Set the `grid_template_areas` to the computed value `value`.
84215    #[allow(non_snake_case)]
84216    pub fn set_grid_template_areas(
84217        &mut self,
84218        value: longhands::grid_template_areas::computed_value::T
84219    ) {
84220        self.modified_reset = true;
84221
84222        self.position.mutate()
84223            .set_grid_template_areas(
84224                value,
84225            );
84226    }
84227    /// Reset `letter_spacing` to the initial value.
84228    #[allow(non_snake_case)]
84229    pub fn reset_letter_spacing(&mut self) {
84230        let reset_struct =
84231            self.reset_style.get_inherited_text();
84232
84233        if self.inherited_text.ptr_eq(reset_struct) {
84234            return;
84235        }
84236
84237        self.inherited_text.mutate()
84238            .reset_letter_spacing(reset_struct);
84239    }
84240
84241    /// Set the `letter_spacing` to the computed value `value`.
84242    #[allow(non_snake_case)]
84243    pub fn set_letter_spacing(
84244        &mut self,
84245        value: longhands::letter_spacing::computed_value::T
84246    ) {
84247
84248        self.inherited_text.mutate()
84249            .set_letter_spacing(
84250                value,
84251            );
84252    }
84253    /// Reset `line_height` to the initial value.
84254    #[allow(non_snake_case)]
84255    pub fn reset_line_height(&mut self) {
84256        let reset_struct =
84257            self.reset_style.get_font();
84258
84259        if self.font.ptr_eq(reset_struct) {
84260            return;
84261        }
84262
84263        self.font.mutate()
84264            .reset_line_height(reset_struct);
84265    }
84266
84267    /// Set the `line_height` to the computed value `value`.
84268    #[allow(non_snake_case)]
84269    pub fn set_line_height(
84270        &mut self,
84271        value: longhands::line_height::computed_value::T
84272    ) {
84273
84274        self.font.mutate()
84275            .set_line_height(
84276                value,
84277            );
84278    }
84279    /// Inherit `mask_image` from our parent style.
84280    #[allow(non_snake_case)]
84281    pub fn inherit_mask_image(&mut self) {
84282        let inherited_struct =
84283            self.inherited_style.get_svg();
84284
84285        self.modified_reset = true;
84286        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84287
84288
84289
84290        if self.svg.ptr_eq(inherited_struct) {
84291            return;
84292        }
84293
84294        self.svg.mutate()
84295            .copy_mask_image_from(inherited_struct);
84296    }
84297
84298    /// Set the `mask_image` to the computed value `value`.
84299    #[allow(non_snake_case)]
84300    pub fn set_mask_image(
84301        &mut self,
84302        value: longhands::mask_image::computed_value::T
84303    ) {
84304        self.modified_reset = true;
84305
84306        self.svg.mutate()
84307            .set_mask_image(
84308                value,
84309            );
84310    }
84311    /// Inherit `offset_path` from our parent style.
84312    #[allow(non_snake_case)]
84313    pub fn inherit_offset_path(&mut self) {
84314        let inherited_struct =
84315            self.inherited_style.get_box();
84316
84317        self.modified_reset = true;
84318        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84319
84320
84321
84322        if self.box_.ptr_eq(inherited_struct) {
84323            return;
84324        }
84325
84326        self.box_.mutate()
84327            .copy_offset_path_from(inherited_struct);
84328    }
84329
84330    /// Set the `offset_path` to the computed value `value`.
84331    #[allow(non_snake_case)]
84332    pub fn set_offset_path(
84333        &mut self,
84334        value: longhands::offset_path::computed_value::T
84335    ) {
84336        self.modified_reset = true;
84337
84338        self.box_.mutate()
84339            .set_offset_path(
84340                value,
84341            );
84342    }
84343    /// Inherit `perspective` from our parent style.
84344    #[allow(non_snake_case)]
84345    pub fn inherit_perspective(&mut self) {
84346        let inherited_struct =
84347            self.inherited_style.get_box();
84348
84349        self.modified_reset = true;
84350        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84351
84352
84353
84354        if self.box_.ptr_eq(inherited_struct) {
84355            return;
84356        }
84357
84358        self.box_.mutate()
84359            .copy_perspective_from(inherited_struct);
84360    }
84361
84362    /// Set the `perspective` to the computed value `value`.
84363    #[allow(non_snake_case)]
84364    pub fn set_perspective(
84365        &mut self,
84366        value: longhands::perspective::computed_value::T
84367    ) {
84368        self.modified_reset = true;
84369
84370        self.box_.mutate()
84371            .set_perspective(
84372                value,
84373            );
84374    }
84375    /// Reset `quotes` to the initial value.
84376    #[allow(non_snake_case)]
84377    pub fn reset_quotes(&mut self) {
84378        let reset_struct =
84379            self.reset_style.get_list();
84380
84381        if self.list.ptr_eq(reset_struct) {
84382            return;
84383        }
84384
84385        self.list.mutate()
84386            .reset_quotes(reset_struct);
84387    }
84388
84389    /// Set the `quotes` to the computed value `value`.
84390    #[allow(non_snake_case)]
84391    pub fn set_quotes(
84392        &mut self,
84393        value: longhands::quotes::computed_value::T
84394    ) {
84395
84396        self.list.mutate()
84397            .set_quotes(
84398                value,
84399            );
84400    }
84401    /// Inherit `rotate` from our parent style.
84402    #[allow(non_snake_case)]
84403    pub fn inherit_rotate(&mut self) {
84404        let inherited_struct =
84405            self.inherited_style.get_box();
84406
84407        self.modified_reset = true;
84408        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84409
84410
84411
84412        if self.box_.ptr_eq(inherited_struct) {
84413            return;
84414        }
84415
84416        self.box_.mutate()
84417            .copy_rotate_from(inherited_struct);
84418    }
84419
84420    /// Set the `rotate` to the computed value `value`.
84421    #[allow(non_snake_case)]
84422    pub fn set_rotate(
84423        &mut self,
84424        value: longhands::rotate::computed_value::T
84425    ) {
84426        self.modified_reset = true;
84427
84428        self.box_.mutate()
84429            .set_rotate(
84430                value,
84431            );
84432    }
84433    /// Inherit `scale` from our parent style.
84434    #[allow(non_snake_case)]
84435    pub fn inherit_scale(&mut self) {
84436        let inherited_struct =
84437            self.inherited_style.get_box();
84438
84439        self.modified_reset = true;
84440        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84441
84442
84443
84444        if self.box_.ptr_eq(inherited_struct) {
84445            return;
84446        }
84447
84448        self.box_.mutate()
84449            .copy_scale_from(inherited_struct);
84450    }
84451
84452    /// Set the `scale` to the computed value `value`.
84453    #[allow(non_snake_case)]
84454    pub fn set_scale(
84455        &mut self,
84456        value: longhands::scale::computed_value::T
84457    ) {
84458        self.modified_reset = true;
84459
84460        self.box_.mutate()
84461            .set_scale(
84462                value,
84463            );
84464    }
84465    /// Reset `text_indent` to the initial value.
84466    #[allow(non_snake_case)]
84467    pub fn reset_text_indent(&mut self) {
84468        let reset_struct =
84469            self.reset_style.get_inherited_text();
84470
84471        if self.inherited_text.ptr_eq(reset_struct) {
84472            return;
84473        }
84474
84475        self.inherited_text.mutate()
84476            .reset_text_indent(reset_struct);
84477    }
84478
84479    /// Set the `text_indent` to the computed value `value`.
84480    #[allow(non_snake_case)]
84481    pub fn set_text_indent(
84482        &mut self,
84483        value: longhands::text_indent::computed_value::T
84484    ) {
84485
84486        self.inherited_text.mutate()
84487            .set_text_indent(
84488                value,
84489            );
84490    }
84491    /// Inherit `text_overflow` from our parent style.
84492    #[allow(non_snake_case)]
84493    pub fn inherit_text_overflow(&mut self) {
84494        let inherited_struct =
84495            self.inherited_style.get_text();
84496
84497        self.modified_reset = true;
84498        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84499
84500
84501
84502        if self.text.ptr_eq(inherited_struct) {
84503            return;
84504        }
84505
84506        self.text.mutate()
84507            .copy_text_overflow_from(inherited_struct);
84508    }
84509
84510    /// Set the `text_overflow` to the computed value `value`.
84511    #[allow(non_snake_case)]
84512    pub fn set_text_overflow(
84513        &mut self,
84514        value: longhands::text_overflow::computed_value::T
84515    ) {
84516        self.modified_reset = true;
84517
84518        self.text.mutate()
84519            .set_text_overflow(
84520                value,
84521            );
84522    }
84523    /// Reset `text_shadow` to the initial value.
84524    #[allow(non_snake_case)]
84525    pub fn reset_text_shadow(&mut self) {
84526        let reset_struct =
84527            self.reset_style.get_inherited_text();
84528
84529        if self.inherited_text.ptr_eq(reset_struct) {
84530            return;
84531        }
84532
84533        self.inherited_text.mutate()
84534            .reset_text_shadow(reset_struct);
84535    }
84536
84537    /// Set the `text_shadow` to the computed value `value`.
84538    #[allow(non_snake_case)]
84539    pub fn set_text_shadow(
84540        &mut self,
84541        value: longhands::text_shadow::computed_value::T
84542    ) {
84543
84544        self.inherited_text.mutate()
84545            .set_text_shadow(
84546                value,
84547            );
84548    }
84549    /// Inherit `transform` from our parent style.
84550    #[allow(non_snake_case)]
84551    pub fn inherit_transform(&mut self) {
84552        let inherited_struct =
84553            self.inherited_style.get_box();
84554
84555        self.modified_reset = true;
84556        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84557
84558
84559
84560        if self.box_.ptr_eq(inherited_struct) {
84561            return;
84562        }
84563
84564        self.box_.mutate()
84565            .copy_transform_from(inherited_struct);
84566    }
84567
84568    /// Set the `transform` to the computed value `value`.
84569    #[allow(non_snake_case)]
84570    pub fn set_transform(
84571        &mut self,
84572        value: longhands::transform::computed_value::T
84573    ) {
84574        self.modified_reset = true;
84575
84576        self.box_.mutate()
84577            .set_transform(
84578                value,
84579            );
84580    }
84581    /// Inherit `transform_origin` from our parent style.
84582    #[allow(non_snake_case)]
84583    pub fn inherit_transform_origin(&mut self) {
84584        let inherited_struct =
84585            self.inherited_style.get_box();
84586
84587        self.modified_reset = true;
84588        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84589
84590
84591
84592        if self.box_.ptr_eq(inherited_struct) {
84593            return;
84594        }
84595
84596        self.box_.mutate()
84597            .copy_transform_origin_from(inherited_struct);
84598    }
84599
84600    /// Set the `transform_origin` to the computed value `value`.
84601    #[allow(non_snake_case)]
84602    pub fn set_transform_origin(
84603        &mut self,
84604        value: longhands::transform_origin::computed_value::T
84605    ) {
84606        self.modified_reset = true;
84607
84608        self.box_.mutate()
84609            .set_transform_origin(
84610                value,
84611            );
84612    }
84613    /// Inherit `transition_behavior` from our parent style.
84614    #[allow(non_snake_case)]
84615    pub fn inherit_transition_behavior(&mut self) {
84616        let inherited_struct =
84617            self.inherited_style.get_ui();
84618
84619        self.modified_reset = true;
84620        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84621
84622
84623
84624        if self.ui.ptr_eq(inherited_struct) {
84625            return;
84626        }
84627
84628        self.ui.mutate()
84629            .copy_transition_behavior_from(inherited_struct);
84630    }
84631
84632    /// Set the `transition_behavior` to the computed value `value`.
84633    #[allow(non_snake_case)]
84634    pub fn set_transition_behavior(
84635        &mut self,
84636        value: longhands::transition_behavior::computed_value::T
84637    ) {
84638        self.modified_reset = true;
84639
84640        self.ui.mutate()
84641            .set_transition_behavior(
84642                value,
84643            );
84644    }
84645    /// Inherit `transition_delay` from our parent style.
84646    #[allow(non_snake_case)]
84647    pub fn inherit_transition_delay(&mut self) {
84648        let inherited_struct =
84649            self.inherited_style.get_ui();
84650
84651        self.modified_reset = true;
84652        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84653
84654
84655
84656        if self.ui.ptr_eq(inherited_struct) {
84657            return;
84658        }
84659
84660        self.ui.mutate()
84661            .copy_transition_delay_from(inherited_struct);
84662    }
84663
84664    /// Set the `transition_delay` to the computed value `value`.
84665    #[allow(non_snake_case)]
84666    pub fn set_transition_delay(
84667        &mut self,
84668        value: longhands::transition_delay::computed_value::T
84669    ) {
84670        self.modified_reset = true;
84671
84672        self.ui.mutate()
84673            .set_transition_delay(
84674                value,
84675            );
84676    }
84677    /// Inherit `transition_duration` from our parent style.
84678    #[allow(non_snake_case)]
84679    pub fn inherit_transition_duration(&mut self) {
84680        let inherited_struct =
84681            self.inherited_style.get_ui();
84682
84683        self.modified_reset = true;
84684        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84685
84686
84687
84688        if self.ui.ptr_eq(inherited_struct) {
84689            return;
84690        }
84691
84692        self.ui.mutate()
84693            .copy_transition_duration_from(inherited_struct);
84694    }
84695
84696    /// Set the `transition_duration` to the computed value `value`.
84697    #[allow(non_snake_case)]
84698    pub fn set_transition_duration(
84699        &mut self,
84700        value: longhands::transition_duration::computed_value::T
84701    ) {
84702        self.modified_reset = true;
84703
84704        self.ui.mutate()
84705            .set_transition_duration(
84706                value,
84707            );
84708    }
84709    /// Inherit `transition_property` from our parent style.
84710    #[allow(non_snake_case)]
84711    pub fn inherit_transition_property(&mut self) {
84712        let inherited_struct =
84713            self.inherited_style.get_ui();
84714
84715        self.modified_reset = true;
84716        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84717
84718
84719
84720        if self.ui.ptr_eq(inherited_struct) {
84721            return;
84722        }
84723
84724        self.ui.mutate()
84725            .copy_transition_property_from(inherited_struct);
84726    }
84727
84728    /// Set the `transition_property` to the computed value `value`.
84729    #[allow(non_snake_case)]
84730    pub fn set_transition_property(
84731        &mut self,
84732        value: longhands::transition_property::computed_value::T
84733    ) {
84734        self.modified_reset = true;
84735
84736        self.ui.mutate()
84737            .set_transition_property(
84738                value,
84739            );
84740    }
84741    /// Inherit `transition_timing_function` from our parent style.
84742    #[allow(non_snake_case)]
84743    pub fn inherit_transition_timing_function(&mut self) {
84744        let inherited_struct =
84745            self.inherited_style.get_ui();
84746
84747        self.modified_reset = true;
84748        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84749
84750
84751
84752        if self.ui.ptr_eq(inherited_struct) {
84753            return;
84754        }
84755
84756        self.ui.mutate()
84757            .copy_transition_timing_function_from(inherited_struct);
84758    }
84759
84760    /// Set the `transition_timing_function` to the computed value `value`.
84761    #[allow(non_snake_case)]
84762    pub fn set_transition_timing_function(
84763        &mut self,
84764        value: longhands::transition_timing_function::computed_value::T
84765    ) {
84766        self.modified_reset = true;
84767
84768        self.ui.mutate()
84769            .set_transition_timing_function(
84770                value,
84771            );
84772    }
84773    /// Inherit `translate` from our parent style.
84774    #[allow(non_snake_case)]
84775    pub fn inherit_translate(&mut self) {
84776        let inherited_struct =
84777            self.inherited_style.get_box();
84778
84779        self.modified_reset = true;
84780        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84781
84782
84783
84784        if self.box_.ptr_eq(inherited_struct) {
84785            return;
84786        }
84787
84788        self.box_.mutate()
84789            .copy_translate_from(inherited_struct);
84790    }
84791
84792    /// Set the `translate` to the computed value `value`.
84793    #[allow(non_snake_case)]
84794    pub fn set_translate(
84795        &mut self,
84796        value: longhands::translate::computed_value::T
84797    ) {
84798        self.modified_reset = true;
84799
84800        self.box_.mutate()
84801            .set_translate(
84802                value,
84803            );
84804    }
84805    /// Inherit `vertical_align` from our parent style.
84806    #[allow(non_snake_case)]
84807    pub fn inherit_vertical_align(&mut self) {
84808        let inherited_struct =
84809            self.inherited_style.get_box();
84810
84811        self.modified_reset = true;
84812        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84813
84814
84815
84816        if self.box_.ptr_eq(inherited_struct) {
84817            return;
84818        }
84819
84820        self.box_.mutate()
84821            .copy_vertical_align_from(inherited_struct);
84822    }
84823
84824    /// Set the `vertical_align` to the computed value `value`.
84825    #[allow(non_snake_case)]
84826    pub fn set_vertical_align(
84827        &mut self,
84828        value: longhands::vertical_align::computed_value::T
84829    ) {
84830        self.modified_reset = true;
84831
84832        self.box_.mutate()
84833            .set_vertical_align(
84834                value,
84835            );
84836    }
84837    /// Inherit `view_transition_class` from our parent style.
84838    #[allow(non_snake_case)]
84839    pub fn inherit_view_transition_class(&mut self) {
84840        let inherited_struct =
84841            self.inherited_style.get_ui();
84842
84843        self.modified_reset = true;
84844        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84845
84846
84847
84848        if self.ui.ptr_eq(inherited_struct) {
84849            return;
84850        }
84851
84852        self.ui.mutate()
84853            .copy_view_transition_class_from(inherited_struct);
84854    }
84855
84856    /// Set the `view_transition_class` to the computed value `value`.
84857    #[allow(non_snake_case)]
84858    pub fn set_view_transition_class(
84859        &mut self,
84860        value: longhands::view_transition_class::computed_value::T
84861    ) {
84862        self.modified_reset = true;
84863
84864        self.ui.mutate()
84865            .set_view_transition_class(
84866                value,
84867            );
84868    }
84869    /// Inherit `view_transition_name` from our parent style.
84870    #[allow(non_snake_case)]
84871    pub fn inherit_view_transition_name(&mut self) {
84872        let inherited_struct =
84873            self.inherited_style.get_ui();
84874
84875        self.modified_reset = true;
84876        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84877
84878
84879
84880        if self.ui.ptr_eq(inherited_struct) {
84881            return;
84882        }
84883
84884        self.ui.mutate()
84885            .copy_view_transition_name_from(inherited_struct);
84886    }
84887
84888    /// Set the `view_transition_name` to the computed value `value`.
84889    #[allow(non_snake_case)]
84890    pub fn set_view_transition_name(
84891        &mut self,
84892        value: longhands::view_transition_name::computed_value::T
84893    ) {
84894        self.modified_reset = true;
84895
84896        self.ui.mutate()
84897            .set_view_transition_name(
84898                value,
84899            );
84900    }
84901    /// Inherit `will_change` from our parent style.
84902    #[allow(non_snake_case)]
84903    pub fn inherit_will_change(&mut self) {
84904        let inherited_struct =
84905            self.inherited_style.get_box();
84906
84907        self.modified_reset = true;
84908        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84909
84910
84911
84912        if self.box_.ptr_eq(inherited_struct) {
84913            return;
84914        }
84915
84916        self.box_.mutate()
84917            .copy_will_change_from(inherited_struct);
84918    }
84919
84920    /// Set the `will_change` to the computed value `value`.
84921    #[allow(non_snake_case)]
84922    pub fn set_will_change(
84923        &mut self,
84924        value: longhands::will_change::computed_value::T
84925    ) {
84926        self.modified_reset = true;
84927
84928        self.box_.mutate()
84929            .set_will_change(
84930                value,
84931            );
84932    }
84933    /// Reset `word_spacing` to the initial value.
84934    #[allow(non_snake_case)]
84935    pub fn reset_word_spacing(&mut self) {
84936        let reset_struct =
84937            self.reset_style.get_inherited_text();
84938
84939        if self.inherited_text.ptr_eq(reset_struct) {
84940            return;
84941        }
84942
84943        self.inherited_text.mutate()
84944            .reset_word_spacing(reset_struct);
84945    }
84946
84947    /// Set the `word_spacing` to the computed value `value`.
84948    #[allow(non_snake_case)]
84949    pub fn set_word_spacing(
84950        &mut self,
84951        value: longhands::word_spacing::computed_value::T
84952    ) {
84953
84954        self.inherited_text.mutate()
84955            .set_word_spacing(
84956                value,
84957            );
84958    }
84959    /// Reset `_x_lang` to the initial value.
84960    #[allow(non_snake_case)]
84961    pub fn reset__x_lang(&mut self) {
84962        let reset_struct =
84963            self.reset_style.get_font();
84964
84965        if self.font.ptr_eq(reset_struct) {
84966            return;
84967        }
84968
84969        self.font.mutate()
84970            .reset__x_lang(reset_struct);
84971    }
84972
84973    /// Set the `_x_lang` to the computed value `value`.
84974    #[allow(non_snake_case)]
84975    pub fn set__x_lang(
84976        &mut self,
84977        value: longhands::_x_lang::computed_value::T
84978    ) {
84979
84980        self.font.mutate()
84981            .set__x_lang(
84982                value,
84983            );
84984    }
84985    /// Inherit `object_position` from our parent style.
84986    #[allow(non_snake_case)]
84987    pub fn inherit_object_position(&mut self) {
84988        let inherited_struct =
84989            self.inherited_style.get_position();
84990
84991        self.modified_reset = true;
84992        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
84993
84994
84995
84996        if self.position.ptr_eq(inherited_struct) {
84997            return;
84998        }
84999
85000        self.position.mutate()
85001            .copy_object_position_from(inherited_struct);
85002    }
85003
85004    /// Set the `object_position` to the computed value `value`.
85005    #[allow(non_snake_case)]
85006    pub fn set_object_position(
85007        &mut self,
85008        value: longhands::object_position::computed_value::T
85009    ) {
85010        self.modified_reset = true;
85011
85012        self.position.mutate()
85013            .set_object_position(
85014                value,
85015            );
85016    }
85017    /// Inherit `perspective_origin` from our parent style.
85018    #[allow(non_snake_case)]
85019    pub fn inherit_perspective_origin(&mut self) {
85020        let inherited_struct =
85021            self.inherited_style.get_box();
85022
85023        self.modified_reset = true;
85024        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85025
85026
85027
85028        if self.box_.ptr_eq(inherited_struct) {
85029            return;
85030        }
85031
85032        self.box_.mutate()
85033            .copy_perspective_origin_from(inherited_struct);
85034    }
85035
85036    /// Set the `perspective_origin` to the computed value `value`.
85037    #[allow(non_snake_case)]
85038    pub fn set_perspective_origin(
85039        &mut self,
85040        value: longhands::perspective_origin::computed_value::T
85041    ) {
85042        self.modified_reset = true;
85043
85044        self.box_.mutate()
85045            .set_perspective_origin(
85046                value,
85047            );
85048    }
85049    /// Inherit `grid_template_columns` from our parent style.
85050    #[allow(non_snake_case)]
85051    pub fn inherit_grid_template_columns(&mut self) {
85052        let inherited_struct =
85053            self.inherited_style.get_position();
85054
85055        self.modified_reset = true;
85056        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85057
85058
85059
85060        if self.position.ptr_eq(inherited_struct) {
85061            return;
85062        }
85063
85064        self.position.mutate()
85065            .copy_grid_template_columns_from(inherited_struct);
85066    }
85067
85068    /// Set the `grid_template_columns` to the computed value `value`.
85069    #[allow(non_snake_case)]
85070    pub fn set_grid_template_columns(
85071        &mut self,
85072        value: longhands::grid_template_columns::computed_value::T
85073    ) {
85074        self.modified_reset = true;
85075
85076        self.position.mutate()
85077            .set_grid_template_columns(
85078                value,
85079            );
85080    }
85081    /// Inherit `grid_template_rows` from our parent style.
85082    #[allow(non_snake_case)]
85083    pub fn inherit_grid_template_rows(&mut self) {
85084        let inherited_struct =
85085            self.inherited_style.get_position();
85086
85087        self.modified_reset = true;
85088        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85089
85090
85091
85092        if self.position.ptr_eq(inherited_struct) {
85093            return;
85094        }
85095
85096        self.position.mutate()
85097            .copy_grid_template_rows_from(inherited_struct);
85098    }
85099
85100    /// Set the `grid_template_rows` to the computed value `value`.
85101    #[allow(non_snake_case)]
85102    pub fn set_grid_template_rows(
85103        &mut self,
85104        value: longhands::grid_template_rows::computed_value::T
85105    ) {
85106        self.modified_reset = true;
85107
85108        self.position.mutate()
85109            .set_grid_template_rows(
85110                value,
85111            );
85112    }
85113    /// Inherit `border_image_source` from our parent style.
85114    #[allow(non_snake_case)]
85115    pub fn inherit_border_image_source(&mut self) {
85116        let inherited_struct =
85117            self.inherited_style.get_border();
85118
85119        self.modified_reset = true;
85120        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85121
85122
85123
85124        if self.border.ptr_eq(inherited_struct) {
85125            return;
85126        }
85127
85128        self.border.mutate()
85129            .copy_border_image_source_from(inherited_struct);
85130    }
85131
85132    /// Set the `border_image_source` to the computed value `value`.
85133    #[allow(non_snake_case)]
85134    pub fn set_border_image_source(
85135        &mut self,
85136        value: longhands::border_image_source::computed_value::T
85137    ) {
85138        self.modified_reset = true;
85139
85140        self.border.mutate()
85141            .set_border_image_source(
85142                value,
85143            );
85144    }
85145    /// Reset `list_style_image` to the initial value.
85146    #[allow(non_snake_case)]
85147    pub fn reset_list_style_image(&mut self) {
85148        let reset_struct =
85149            self.reset_style.get_list();
85150
85151        if self.list.ptr_eq(reset_struct) {
85152            return;
85153        }
85154
85155        self.list.mutate()
85156            .reset_list_style_image(reset_struct);
85157    }
85158
85159    /// Set the `list_style_image` to the computed value `value`.
85160    #[allow(non_snake_case)]
85161    pub fn set_list_style_image(
85162        &mut self,
85163        value: longhands::list_style_image::computed_value::T
85164    ) {
85165
85166        self.list.mutate()
85167            .set_list_style_image(
85168                value,
85169            );
85170    }
85171    /// Inherit `grid_auto_columns` from our parent style.
85172    #[allow(non_snake_case)]
85173    pub fn inherit_grid_auto_columns(&mut self) {
85174        let inherited_struct =
85175            self.inherited_style.get_position();
85176
85177        self.modified_reset = true;
85178        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85179
85180
85181
85182        if self.position.ptr_eq(inherited_struct) {
85183            return;
85184        }
85185
85186        self.position.mutate()
85187            .copy_grid_auto_columns_from(inherited_struct);
85188    }
85189
85190    /// Set the `grid_auto_columns` to the computed value `value`.
85191    #[allow(non_snake_case)]
85192    pub fn set_grid_auto_columns(
85193        &mut self,
85194        value: longhands::grid_auto_columns::computed_value::T
85195    ) {
85196        self.modified_reset = true;
85197
85198        self.position.mutate()
85199            .set_grid_auto_columns(
85200                value,
85201            );
85202    }
85203    /// Inherit `grid_auto_rows` from our parent style.
85204    #[allow(non_snake_case)]
85205    pub fn inherit_grid_auto_rows(&mut self) {
85206        let inherited_struct =
85207            self.inherited_style.get_position();
85208
85209        self.modified_reset = true;
85210        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85211
85212
85213
85214        if self.position.ptr_eq(inherited_struct) {
85215            return;
85216        }
85217
85218        self.position.mutate()
85219            .copy_grid_auto_rows_from(inherited_struct);
85220    }
85221
85222    /// Set the `grid_auto_rows` to the computed value `value`.
85223    #[allow(non_snake_case)]
85224    pub fn set_grid_auto_rows(
85225        &mut self,
85226        value: longhands::grid_auto_rows::computed_value::T
85227    ) {
85228        self.modified_reset = true;
85229
85230        self.position.mutate()
85231            .set_grid_auto_rows(
85232                value,
85233            );
85234    }
85235    /// Inherit `outline_offset` from our parent style.
85236    #[allow(non_snake_case)]
85237    pub fn inherit_outline_offset(&mut self) {
85238        let inherited_struct =
85239            self.inherited_style.get_outline();
85240
85241        self.modified_reset = true;
85242        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85243
85244
85245
85246        if self.outline.ptr_eq(inherited_struct) {
85247            return;
85248        }
85249
85250        self.outline.mutate()
85251            .copy_outline_offset_from(inherited_struct);
85252    }
85253
85254    /// Set the `outline_offset` to the computed value `value`.
85255    #[allow(non_snake_case)]
85256    pub fn set_outline_offset(
85257        &mut self,
85258        value: longhands::outline_offset::computed_value::T
85259    ) {
85260        self.modified_reset = true;
85261
85262        self.outline.mutate()
85263            .set_outline_offset(
85264                value,
85265            );
85266    }
85267    /// Inherit `overflow_clip_margin` from our parent style.
85268    #[allow(non_snake_case)]
85269    pub fn inherit_overflow_clip_margin(&mut self) {
85270        let inherited_struct =
85271            self.inherited_style.get_margin();
85272
85273        self.modified_reset = true;
85274        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85275
85276
85277
85278        if self.margin.ptr_eq(inherited_struct) {
85279            return;
85280        }
85281
85282        self.margin.mutate()
85283            .copy_overflow_clip_margin_from(inherited_struct);
85284    }
85285
85286    /// Set the `overflow_clip_margin` to the computed value `value`.
85287    #[allow(non_snake_case)]
85288    pub fn set_overflow_clip_margin(
85289        &mut self,
85290        value: longhands::overflow_clip_margin::computed_value::T
85291    ) {
85292        self.modified_reset = true;
85293
85294        self.margin.mutate()
85295            .set_overflow_clip_margin(
85296                value,
85297            );
85298    }
85299    /// Inherit `column_gap` from our parent style.
85300    #[allow(non_snake_case)]
85301    pub fn inherit_column_gap(&mut self) {
85302        let inherited_struct =
85303            self.inherited_style.get_position();
85304
85305        self.modified_reset = true;
85306        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85307
85308
85309
85310        if self.position.ptr_eq(inherited_struct) {
85311            return;
85312        }
85313
85314        self.position.mutate()
85315            .copy_column_gap_from(inherited_struct);
85316    }
85317
85318    /// Set the `column_gap` to the computed value `value`.
85319    #[allow(non_snake_case)]
85320    pub fn set_column_gap(
85321        &mut self,
85322        value: longhands::column_gap::computed_value::T
85323    ) {
85324        self.modified_reset = true;
85325
85326        self.position.mutate()
85327            .set_column_gap(
85328                value,
85329            );
85330    }
85331    /// Inherit `row_gap` from our parent style.
85332    #[allow(non_snake_case)]
85333    pub fn inherit_row_gap(&mut self) {
85334        let inherited_struct =
85335            self.inherited_style.get_position();
85336
85337        self.modified_reset = true;
85338        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85339
85340
85341
85342        if self.position.ptr_eq(inherited_struct) {
85343            return;
85344        }
85345
85346        self.position.mutate()
85347            .copy_row_gap_from(inherited_struct);
85348    }
85349
85350    /// Set the `row_gap` to the computed value `value`.
85351    #[allow(non_snake_case)]
85352    pub fn set_row_gap(
85353        &mut self,
85354        value: longhands::row_gap::computed_value::T
85355    ) {
85356        self.modified_reset = true;
85357
85358        self.position.mutate()
85359            .set_row_gap(
85360                value,
85361            );
85362    }
85363    /// Inherit `grid_column_end` from our parent style.
85364    #[allow(non_snake_case)]
85365    pub fn inherit_grid_column_end(&mut self) {
85366        let inherited_struct =
85367            self.inherited_style.get_position();
85368
85369        self.modified_reset = true;
85370        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85371
85372
85373
85374        if self.position.ptr_eq(inherited_struct) {
85375            return;
85376        }
85377
85378        self.position.mutate()
85379            .copy_grid_column_end_from(inherited_struct);
85380    }
85381
85382    /// Set the `grid_column_end` to the computed value `value`.
85383    #[allow(non_snake_case)]
85384    pub fn set_grid_column_end(
85385        &mut self,
85386        value: longhands::grid_column_end::computed_value::T
85387    ) {
85388        self.modified_reset = true;
85389
85390        self.position.mutate()
85391            .set_grid_column_end(
85392                value,
85393            );
85394    }
85395    /// Inherit `grid_column_start` from our parent style.
85396    #[allow(non_snake_case)]
85397    pub fn inherit_grid_column_start(&mut self) {
85398        let inherited_struct =
85399            self.inherited_style.get_position();
85400
85401        self.modified_reset = true;
85402        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85403
85404
85405
85406        if self.position.ptr_eq(inherited_struct) {
85407            return;
85408        }
85409
85410        self.position.mutate()
85411            .copy_grid_column_start_from(inherited_struct);
85412    }
85413
85414    /// Set the `grid_column_start` to the computed value `value`.
85415    #[allow(non_snake_case)]
85416    pub fn set_grid_column_start(
85417        &mut self,
85418        value: longhands::grid_column_start::computed_value::T
85419    ) {
85420        self.modified_reset = true;
85421
85422        self.position.mutate()
85423            .set_grid_column_start(
85424                value,
85425            );
85426    }
85427    /// Inherit `grid_row_end` from our parent style.
85428    #[allow(non_snake_case)]
85429    pub fn inherit_grid_row_end(&mut self) {
85430        let inherited_struct =
85431            self.inherited_style.get_position();
85432
85433        self.modified_reset = true;
85434        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85435
85436
85437
85438        if self.position.ptr_eq(inherited_struct) {
85439            return;
85440        }
85441
85442        self.position.mutate()
85443            .copy_grid_row_end_from(inherited_struct);
85444    }
85445
85446    /// Set the `grid_row_end` to the computed value `value`.
85447    #[allow(non_snake_case)]
85448    pub fn set_grid_row_end(
85449        &mut self,
85450        value: longhands::grid_row_end::computed_value::T
85451    ) {
85452        self.modified_reset = true;
85453
85454        self.position.mutate()
85455            .set_grid_row_end(
85456                value,
85457            );
85458    }
85459    /// Inherit `grid_row_start` from our parent style.
85460    #[allow(non_snake_case)]
85461    pub fn inherit_grid_row_start(&mut self) {
85462        let inherited_struct =
85463            self.inherited_style.get_position();
85464
85465        self.modified_reset = true;
85466        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85467
85468
85469
85470        if self.position.ptr_eq(inherited_struct) {
85471            return;
85472        }
85473
85474        self.position.mutate()
85475            .copy_grid_row_start_from(inherited_struct);
85476    }
85477
85478    /// Set the `grid_row_start` to the computed value `value`.
85479    #[allow(non_snake_case)]
85480    pub fn set_grid_row_start(
85481        &mut self,
85482        value: longhands::grid_row_start::computed_value::T
85483    ) {
85484        self.modified_reset = true;
85485
85486        self.position.mutate()
85487            .set_grid_row_start(
85488                value,
85489            );
85490    }
85491    /// Inherit `max_height` from our parent style.
85492    #[allow(non_snake_case)]
85493    pub fn inherit_max_height(&mut self) {
85494        let inherited_struct =
85495            self.inherited_style.get_position();
85496
85497        self.modified_reset = true;
85498        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85499
85500
85501
85502        if self.position.ptr_eq(inherited_struct) {
85503            return;
85504        }
85505
85506        self.position.mutate()
85507            .copy_max_height_from(inherited_struct);
85508    }
85509
85510    /// Set the `max_height` to the computed value `value`.
85511    #[allow(non_snake_case)]
85512    pub fn set_max_height(
85513        &mut self,
85514        value: longhands::max_height::computed_value::T
85515    ) {
85516        self.modified_reset = true;
85517
85518        self.position.mutate()
85519            .set_max_height(
85520                value,
85521            );
85522    }
85523    /// Inherit `max_width` from our parent style.
85524    #[allow(non_snake_case)]
85525    pub fn inherit_max_width(&mut self) {
85526        let inherited_struct =
85527            self.inherited_style.get_position();
85528
85529        self.modified_reset = true;
85530        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85531
85532
85533
85534        if self.position.ptr_eq(inherited_struct) {
85535            return;
85536        }
85537
85538        self.position.mutate()
85539            .copy_max_width_from(inherited_struct);
85540    }
85541
85542    /// Set the `max_width` to the computed value `value`.
85543    #[allow(non_snake_case)]
85544    pub fn set_max_width(
85545        &mut self,
85546        value: longhands::max_width::computed_value::T
85547    ) {
85548        self.modified_reset = true;
85549
85550        self.position.mutate()
85551            .set_max_width(
85552                value,
85553            );
85554    }
85555    /// Inherit `border_bottom_left_radius` from our parent style.
85556    #[allow(non_snake_case)]
85557    pub fn inherit_border_bottom_left_radius(&mut self) {
85558        let inherited_struct =
85559            self.inherited_style.get_border();
85560
85561        self.modified_reset = true;
85562        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85563
85564
85565
85566        if self.border.ptr_eq(inherited_struct) {
85567            return;
85568        }
85569
85570        self.border.mutate()
85571            .copy_border_bottom_left_radius_from(inherited_struct);
85572    }
85573
85574    /// Set the `border_bottom_left_radius` to the computed value `value`.
85575    #[allow(non_snake_case)]
85576    pub fn set_border_bottom_left_radius(
85577        &mut self,
85578        value: longhands::border_bottom_left_radius::computed_value::T
85579    ) {
85580        self.modified_reset = true;
85581
85582        self.border.mutate()
85583            .set_border_bottom_left_radius(
85584                value,
85585            );
85586    }
85587    /// Inherit `border_bottom_right_radius` from our parent style.
85588    #[allow(non_snake_case)]
85589    pub fn inherit_border_bottom_right_radius(&mut self) {
85590        let inherited_struct =
85591            self.inherited_style.get_border();
85592
85593        self.modified_reset = true;
85594        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85595
85596
85597
85598        if self.border.ptr_eq(inherited_struct) {
85599            return;
85600        }
85601
85602        self.border.mutate()
85603            .copy_border_bottom_right_radius_from(inherited_struct);
85604    }
85605
85606    /// Set the `border_bottom_right_radius` to the computed value `value`.
85607    #[allow(non_snake_case)]
85608    pub fn set_border_bottom_right_radius(
85609        &mut self,
85610        value: longhands::border_bottom_right_radius::computed_value::T
85611    ) {
85612        self.modified_reset = true;
85613
85614        self.border.mutate()
85615            .set_border_bottom_right_radius(
85616                value,
85617            );
85618    }
85619    /// Inherit `border_top_left_radius` from our parent style.
85620    #[allow(non_snake_case)]
85621    pub fn inherit_border_top_left_radius(&mut self) {
85622        let inherited_struct =
85623            self.inherited_style.get_border();
85624
85625        self.modified_reset = true;
85626        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85627
85628
85629
85630        if self.border.ptr_eq(inherited_struct) {
85631            return;
85632        }
85633
85634        self.border.mutate()
85635            .copy_border_top_left_radius_from(inherited_struct);
85636    }
85637
85638    /// Set the `border_top_left_radius` to the computed value `value`.
85639    #[allow(non_snake_case)]
85640    pub fn set_border_top_left_radius(
85641        &mut self,
85642        value: longhands::border_top_left_radius::computed_value::T
85643    ) {
85644        self.modified_reset = true;
85645
85646        self.border.mutate()
85647            .set_border_top_left_radius(
85648                value,
85649            );
85650    }
85651    /// Inherit `border_top_right_radius` from our parent style.
85652    #[allow(non_snake_case)]
85653    pub fn inherit_border_top_right_radius(&mut self) {
85654        let inherited_struct =
85655            self.inherited_style.get_border();
85656
85657        self.modified_reset = true;
85658        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85659
85660
85661
85662        if self.border.ptr_eq(inherited_struct) {
85663            return;
85664        }
85665
85666        self.border.mutate()
85667            .copy_border_top_right_radius_from(inherited_struct);
85668    }
85669
85670    /// Set the `border_top_right_radius` to the computed value `value`.
85671    #[allow(non_snake_case)]
85672    pub fn set_border_top_right_radius(
85673        &mut self,
85674        value: longhands::border_top_right_radius::computed_value::T
85675    ) {
85676        self.modified_reset = true;
85677
85678        self.border.mutate()
85679            .set_border_top_right_radius(
85680                value,
85681            );
85682    }
85683    /// Inherit `bottom` from our parent style.
85684    #[allow(non_snake_case)]
85685    pub fn inherit_bottom(&mut self) {
85686        let inherited_struct =
85687            self.inherited_style.get_position();
85688
85689        self.modified_reset = true;
85690        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85691
85692
85693
85694        if self.position.ptr_eq(inherited_struct) {
85695            return;
85696        }
85697
85698        self.position.mutate()
85699            .copy_bottom_from(inherited_struct);
85700    }
85701
85702    /// Set the `bottom` to the computed value `value`.
85703    #[allow(non_snake_case)]
85704    pub fn set_bottom(
85705        &mut self,
85706        value: longhands::bottom::computed_value::T
85707    ) {
85708        self.modified_reset = true;
85709
85710        self.position.mutate()
85711            .set_bottom(
85712                value,
85713            );
85714    }
85715    /// Inherit `left` from our parent style.
85716    #[allow(non_snake_case)]
85717    pub fn inherit_left(&mut self) {
85718        let inherited_struct =
85719            self.inherited_style.get_position();
85720
85721        self.modified_reset = true;
85722        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85723
85724
85725
85726        if self.position.ptr_eq(inherited_struct) {
85727            return;
85728        }
85729
85730        self.position.mutate()
85731            .copy_left_from(inherited_struct);
85732    }
85733
85734    /// Set the `left` to the computed value `value`.
85735    #[allow(non_snake_case)]
85736    pub fn set_left(
85737        &mut self,
85738        value: longhands::left::computed_value::T
85739    ) {
85740        self.modified_reset = true;
85741
85742        self.position.mutate()
85743            .set_left(
85744                value,
85745            );
85746    }
85747    /// Inherit `right` from our parent style.
85748    #[allow(non_snake_case)]
85749    pub fn inherit_right(&mut self) {
85750        let inherited_struct =
85751            self.inherited_style.get_position();
85752
85753        self.modified_reset = true;
85754        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85755
85756
85757
85758        if self.position.ptr_eq(inherited_struct) {
85759            return;
85760        }
85761
85762        self.position.mutate()
85763            .copy_right_from(inherited_struct);
85764    }
85765
85766    /// Set the `right` to the computed value `value`.
85767    #[allow(non_snake_case)]
85768    pub fn set_right(
85769        &mut self,
85770        value: longhands::right::computed_value::T
85771    ) {
85772        self.modified_reset = true;
85773
85774        self.position.mutate()
85775            .set_right(
85776                value,
85777            );
85778    }
85779    /// Inherit `top` from our parent style.
85780    #[allow(non_snake_case)]
85781    pub fn inherit_top(&mut self) {
85782        let inherited_struct =
85783            self.inherited_style.get_position();
85784
85785        self.modified_reset = true;
85786        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85787
85788
85789
85790        if self.position.ptr_eq(inherited_struct) {
85791            return;
85792        }
85793
85794        self.position.mutate()
85795            .copy_top_from(inherited_struct);
85796    }
85797
85798    /// Set the `top` to the computed value `value`.
85799    #[allow(non_snake_case)]
85800    pub fn set_top(
85801        &mut self,
85802        value: longhands::top::computed_value::T
85803    ) {
85804        self.modified_reset = true;
85805
85806        self.position.mutate()
85807            .set_top(
85808                value,
85809            );
85810    }
85811    /// Inherit `margin_bottom` from our parent style.
85812    #[allow(non_snake_case)]
85813    pub fn inherit_margin_bottom(&mut self) {
85814        let inherited_struct =
85815            self.inherited_style.get_margin();
85816
85817        self.modified_reset = true;
85818        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85819
85820
85821
85822        if self.margin.ptr_eq(inherited_struct) {
85823            return;
85824        }
85825
85826        self.margin.mutate()
85827            .copy_margin_bottom_from(inherited_struct);
85828    }
85829
85830    /// Set the `margin_bottom` to the computed value `value`.
85831    #[allow(non_snake_case)]
85832    pub fn set_margin_bottom(
85833        &mut self,
85834        value: longhands::margin_bottom::computed_value::T
85835    ) {
85836        self.modified_reset = true;
85837
85838        self.margin.mutate()
85839            .set_margin_bottom(
85840                value,
85841            );
85842    }
85843    /// Inherit `margin_left` from our parent style.
85844    #[allow(non_snake_case)]
85845    pub fn inherit_margin_left(&mut self) {
85846        let inherited_struct =
85847            self.inherited_style.get_margin();
85848
85849        self.modified_reset = true;
85850        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85851
85852
85853
85854        if self.margin.ptr_eq(inherited_struct) {
85855            return;
85856        }
85857
85858        self.margin.mutate()
85859            .copy_margin_left_from(inherited_struct);
85860    }
85861
85862    /// Set the `margin_left` to the computed value `value`.
85863    #[allow(non_snake_case)]
85864    pub fn set_margin_left(
85865        &mut self,
85866        value: longhands::margin_left::computed_value::T
85867    ) {
85868        self.modified_reset = true;
85869
85870        self.margin.mutate()
85871            .set_margin_left(
85872                value,
85873            );
85874    }
85875    /// Inherit `margin_right` from our parent style.
85876    #[allow(non_snake_case)]
85877    pub fn inherit_margin_right(&mut self) {
85878        let inherited_struct =
85879            self.inherited_style.get_margin();
85880
85881        self.modified_reset = true;
85882        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85883
85884
85885
85886        if self.margin.ptr_eq(inherited_struct) {
85887            return;
85888        }
85889
85890        self.margin.mutate()
85891            .copy_margin_right_from(inherited_struct);
85892    }
85893
85894    /// Set the `margin_right` to the computed value `value`.
85895    #[allow(non_snake_case)]
85896    pub fn set_margin_right(
85897        &mut self,
85898        value: longhands::margin_right::computed_value::T
85899    ) {
85900        self.modified_reset = true;
85901
85902        self.margin.mutate()
85903            .set_margin_right(
85904                value,
85905            );
85906    }
85907    /// Inherit `margin_top` from our parent style.
85908    #[allow(non_snake_case)]
85909    pub fn inherit_margin_top(&mut self) {
85910        let inherited_struct =
85911            self.inherited_style.get_margin();
85912
85913        self.modified_reset = true;
85914        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85915
85916
85917
85918        if self.margin.ptr_eq(inherited_struct) {
85919            return;
85920        }
85921
85922        self.margin.mutate()
85923            .copy_margin_top_from(inherited_struct);
85924    }
85925
85926    /// Set the `margin_top` to the computed value `value`.
85927    #[allow(non_snake_case)]
85928    pub fn set_margin_top(
85929        &mut self,
85930        value: longhands::margin_top::computed_value::T
85931    ) {
85932        self.modified_reset = true;
85933
85934        self.margin.mutate()
85935            .set_margin_top(
85936                value,
85937            );
85938    }
85939    /// Inherit `padding_bottom` from our parent style.
85940    #[allow(non_snake_case)]
85941    pub fn inherit_padding_bottom(&mut self) {
85942        let inherited_struct =
85943            self.inherited_style.get_padding();
85944
85945        self.modified_reset = true;
85946        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85947
85948
85949
85950        if self.padding.ptr_eq(inherited_struct) {
85951            return;
85952        }
85953
85954        self.padding.mutate()
85955            .copy_padding_bottom_from(inherited_struct);
85956    }
85957
85958    /// Set the `padding_bottom` to the computed value `value`.
85959    #[allow(non_snake_case)]
85960    pub fn set_padding_bottom(
85961        &mut self,
85962        value: longhands::padding_bottom::computed_value::T
85963    ) {
85964        self.modified_reset = true;
85965
85966        self.padding.mutate()
85967            .set_padding_bottom(
85968                value,
85969            );
85970    }
85971    /// Inherit `padding_left` from our parent style.
85972    #[allow(non_snake_case)]
85973    pub fn inherit_padding_left(&mut self) {
85974        let inherited_struct =
85975            self.inherited_style.get_padding();
85976
85977        self.modified_reset = true;
85978        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
85979
85980
85981
85982        if self.padding.ptr_eq(inherited_struct) {
85983            return;
85984        }
85985
85986        self.padding.mutate()
85987            .copy_padding_left_from(inherited_struct);
85988    }
85989
85990    /// Set the `padding_left` to the computed value `value`.
85991    #[allow(non_snake_case)]
85992    pub fn set_padding_left(
85993        &mut self,
85994        value: longhands::padding_left::computed_value::T
85995    ) {
85996        self.modified_reset = true;
85997
85998        self.padding.mutate()
85999            .set_padding_left(
86000                value,
86001            );
86002    }
86003    /// Inherit `padding_right` from our parent style.
86004    #[allow(non_snake_case)]
86005    pub fn inherit_padding_right(&mut self) {
86006        let inherited_struct =
86007            self.inherited_style.get_padding();
86008
86009        self.modified_reset = true;
86010        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
86011
86012
86013
86014        if self.padding.ptr_eq(inherited_struct) {
86015            return;
86016        }
86017
86018        self.padding.mutate()
86019            .copy_padding_right_from(inherited_struct);
86020    }
86021
86022    /// Set the `padding_right` to the computed value `value`.
86023    #[allow(non_snake_case)]
86024    pub fn set_padding_right(
86025        &mut self,
86026        value: longhands::padding_right::computed_value::T
86027    ) {
86028        self.modified_reset = true;
86029
86030        self.padding.mutate()
86031            .set_padding_right(
86032                value,
86033            );
86034    }
86035    /// Inherit `padding_top` from our parent style.
86036    #[allow(non_snake_case)]
86037    pub fn inherit_padding_top(&mut self) {
86038        let inherited_struct =
86039            self.inherited_style.get_padding();
86040
86041        self.modified_reset = true;
86042        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
86043
86044
86045
86046        if self.padding.ptr_eq(inherited_struct) {
86047            return;
86048        }
86049
86050        self.padding.mutate()
86051            .copy_padding_top_from(inherited_struct);
86052    }
86053
86054    /// Set the `padding_top` to the computed value `value`.
86055    #[allow(non_snake_case)]
86056    pub fn set_padding_top(
86057        &mut self,
86058        value: longhands::padding_top::computed_value::T
86059    ) {
86060        self.modified_reset = true;
86061
86062        self.padding.mutate()
86063            .set_padding_top(
86064                value,
86065            );
86066    }
86067    /// Inherit `height` from our parent style.
86068    #[allow(non_snake_case)]
86069    pub fn inherit_height(&mut self) {
86070        let inherited_struct =
86071            self.inherited_style.get_position();
86072
86073        self.modified_reset = true;
86074        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
86075
86076
86077
86078        if self.position.ptr_eq(inherited_struct) {
86079            return;
86080        }
86081
86082        self.position.mutate()
86083            .copy_height_from(inherited_struct);
86084    }
86085
86086    /// Set the `height` to the computed value `value`.
86087    #[allow(non_snake_case)]
86088    pub fn set_height(
86089        &mut self,
86090        value: longhands::height::computed_value::T
86091    ) {
86092        self.modified_reset = true;
86093
86094        self.position.mutate()
86095            .set_height(
86096                value,
86097            );
86098    }
86099    /// Inherit `min_height` from our parent style.
86100    #[allow(non_snake_case)]
86101    pub fn inherit_min_height(&mut self) {
86102        let inherited_struct =
86103            self.inherited_style.get_position();
86104
86105        self.modified_reset = true;
86106        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
86107
86108
86109
86110        if self.position.ptr_eq(inherited_struct) {
86111            return;
86112        }
86113
86114        self.position.mutate()
86115            .copy_min_height_from(inherited_struct);
86116    }
86117
86118    /// Set the `min_height` to the computed value `value`.
86119    #[allow(non_snake_case)]
86120    pub fn set_min_height(
86121        &mut self,
86122        value: longhands::min_height::computed_value::T
86123    ) {
86124        self.modified_reset = true;
86125
86126        self.position.mutate()
86127            .set_min_height(
86128                value,
86129            );
86130    }
86131    /// Inherit `min_width` from our parent style.
86132    #[allow(non_snake_case)]
86133    pub fn inherit_min_width(&mut self) {
86134        let inherited_struct =
86135            self.inherited_style.get_position();
86136
86137        self.modified_reset = true;
86138        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
86139
86140
86141
86142        if self.position.ptr_eq(inherited_struct) {
86143            return;
86144        }
86145
86146        self.position.mutate()
86147            .copy_min_width_from(inherited_struct);
86148    }
86149
86150    /// Set the `min_width` to the computed value `value`.
86151    #[allow(non_snake_case)]
86152    pub fn set_min_width(
86153        &mut self,
86154        value: longhands::min_width::computed_value::T
86155    ) {
86156        self.modified_reset = true;
86157
86158        self.position.mutate()
86159            .set_min_width(
86160                value,
86161            );
86162    }
86163    /// Inherit `width` from our parent style.
86164    #[allow(non_snake_case)]
86165    pub fn inherit_width(&mut self) {
86166        let inherited_struct =
86167            self.inherited_style.get_position();
86168
86169        self.modified_reset = true;
86170        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
86171
86172
86173
86174        if self.position.ptr_eq(inherited_struct) {
86175            return;
86176        }
86177
86178        self.position.mutate()
86179            .copy_width_from(inherited_struct);
86180    }
86181
86182    /// Set the `width` to the computed value `value`.
86183    #[allow(non_snake_case)]
86184    pub fn set_width(
86185        &mut self,
86186        value: longhands::width::computed_value::T
86187    ) {
86188        self.modified_reset = true;
86189
86190        self.position.mutate()
86191            .set_width(
86192                value,
86193            );
86194    }
86195    /// Inherit `border_bottom_width` from our parent style.
86196    #[allow(non_snake_case)]
86197    pub fn inherit_border_bottom_width(&mut self) {
86198        let inherited_struct =
86199            self.inherited_style.get_border();
86200
86201        self.modified_reset = true;
86202        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
86203
86204
86205
86206        if self.border.ptr_eq(inherited_struct) {
86207            return;
86208        }
86209
86210        self.border.mutate()
86211            .copy_border_bottom_width_from(inherited_struct);
86212    }
86213
86214    /// Set the `border_bottom_width` to the computed value `value`.
86215    #[allow(non_snake_case)]
86216    pub fn set_border_bottom_width(
86217        &mut self,
86218        value: longhands::border_bottom_width::computed_value::T
86219    ) {
86220        self.modified_reset = true;
86221
86222        self.border.mutate()
86223            .set_border_bottom_width(
86224                value,
86225            );
86226    }
86227    /// Inherit `border_left_width` from our parent style.
86228    #[allow(non_snake_case)]
86229    pub fn inherit_border_left_width(&mut self) {
86230        let inherited_struct =
86231            self.inherited_style.get_border();
86232
86233        self.modified_reset = true;
86234        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
86235
86236
86237
86238        if self.border.ptr_eq(inherited_struct) {
86239            return;
86240        }
86241
86242        self.border.mutate()
86243            .copy_border_left_width_from(inherited_struct);
86244    }
86245
86246    /// Set the `border_left_width` to the computed value `value`.
86247    #[allow(non_snake_case)]
86248    pub fn set_border_left_width(
86249        &mut self,
86250        value: longhands::border_left_width::computed_value::T
86251    ) {
86252        self.modified_reset = true;
86253
86254        self.border.mutate()
86255            .set_border_left_width(
86256                value,
86257            );
86258    }
86259    /// Inherit `border_right_width` from our parent style.
86260    #[allow(non_snake_case)]
86261    pub fn inherit_border_right_width(&mut self) {
86262        let inherited_struct =
86263            self.inherited_style.get_border();
86264
86265        self.modified_reset = true;
86266        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
86267
86268
86269
86270        if self.border.ptr_eq(inherited_struct) {
86271            return;
86272        }
86273
86274        self.border.mutate()
86275            .copy_border_right_width_from(inherited_struct);
86276    }
86277
86278    /// Set the `border_right_width` to the computed value `value`.
86279    #[allow(non_snake_case)]
86280    pub fn set_border_right_width(
86281        &mut self,
86282        value: longhands::border_right_width::computed_value::T
86283    ) {
86284        self.modified_reset = true;
86285
86286        self.border.mutate()
86287            .set_border_right_width(
86288                value,
86289            );
86290    }
86291    /// Inherit `border_top_width` from our parent style.
86292    #[allow(non_snake_case)]
86293    pub fn inherit_border_top_width(&mut self) {
86294        let inherited_struct =
86295            self.inherited_style.get_border();
86296
86297        self.modified_reset = true;
86298        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
86299
86300
86301
86302        if self.border.ptr_eq(inherited_struct) {
86303            return;
86304        }
86305
86306        self.border.mutate()
86307            .copy_border_top_width_from(inherited_struct);
86308    }
86309
86310    /// Set the `border_top_width` to the computed value `value`.
86311    #[allow(non_snake_case)]
86312    pub fn set_border_top_width(
86313        &mut self,
86314        value: longhands::border_top_width::computed_value::T
86315    ) {
86316        self.modified_reset = true;
86317
86318        self.border.mutate()
86319            .set_border_top_width(
86320                value,
86321            );
86322    }
86323    /// Inherit `outline_width` from our parent style.
86324    #[allow(non_snake_case)]
86325    pub fn inherit_outline_width(&mut self) {
86326        let inherited_struct =
86327            self.inherited_style.get_outline();
86328
86329        self.modified_reset = true;
86330        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
86331
86332
86333
86334        if self.outline.ptr_eq(inherited_struct) {
86335            return;
86336        }
86337
86338        self.outline.mutate()
86339            .copy_outline_width_from(inherited_struct);
86340    }
86341
86342    /// Set the `outline_width` to the computed value `value`.
86343    #[allow(non_snake_case)]
86344    pub fn set_outline_width(
86345        &mut self,
86346        value: longhands::outline_width::computed_value::T
86347    ) {
86348        self.modified_reset = true;
86349
86350        self.outline.mutate()
86351            .set_outline_width(
86352                value,
86353            );
86354    }
86355    /// Inherit `background_color` from our parent style.
86356    #[allow(non_snake_case)]
86357    pub fn inherit_background_color(&mut self) {
86358        let inherited_struct =
86359            self.inherited_style.get_background();
86360
86361        self.modified_reset = true;
86362        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
86363
86364
86365
86366        if self.background.ptr_eq(inherited_struct) {
86367            return;
86368        }
86369
86370        self.background.mutate()
86371            .copy_background_color_from(inherited_struct);
86372    }
86373
86374    /// Set the `background_color` to the computed value `value`.
86375    #[allow(non_snake_case)]
86376    pub fn set_background_color(
86377        &mut self,
86378        value: longhands::background_color::computed_value::T
86379    ) {
86380        self.modified_reset = true;
86381
86382        self.background.mutate()
86383            .set_background_color(
86384                value,
86385            );
86386    }
86387    /// Inherit `border_bottom_color` from our parent style.
86388    #[allow(non_snake_case)]
86389    pub fn inherit_border_bottom_color(&mut self) {
86390        let inherited_struct =
86391            self.inherited_style.get_border();
86392
86393        self.modified_reset = true;
86394        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
86395
86396
86397
86398        if self.border.ptr_eq(inherited_struct) {
86399            return;
86400        }
86401
86402        self.border.mutate()
86403            .copy_border_bottom_color_from(inherited_struct);
86404    }
86405
86406    /// Set the `border_bottom_color` to the computed value `value`.
86407    #[allow(non_snake_case)]
86408    pub fn set_border_bottom_color(
86409        &mut self,
86410        value: longhands::border_bottom_color::computed_value::T
86411    ) {
86412        self.modified_reset = true;
86413
86414        self.border.mutate()
86415            .set_border_bottom_color(
86416                value,
86417            );
86418    }
86419    /// Inherit `border_left_color` from our parent style.
86420    #[allow(non_snake_case)]
86421    pub fn inherit_border_left_color(&mut self) {
86422        let inherited_struct =
86423            self.inherited_style.get_border();
86424
86425        self.modified_reset = true;
86426        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
86427
86428
86429
86430        if self.border.ptr_eq(inherited_struct) {
86431            return;
86432        }
86433
86434        self.border.mutate()
86435            .copy_border_left_color_from(inherited_struct);
86436    }
86437
86438    /// Set the `border_left_color` to the computed value `value`.
86439    #[allow(non_snake_case)]
86440    pub fn set_border_left_color(
86441        &mut self,
86442        value: longhands::border_left_color::computed_value::T
86443    ) {
86444        self.modified_reset = true;
86445
86446        self.border.mutate()
86447            .set_border_left_color(
86448                value,
86449            );
86450    }
86451    /// Inherit `border_right_color` from our parent style.
86452    #[allow(non_snake_case)]
86453    pub fn inherit_border_right_color(&mut self) {
86454        let inherited_struct =
86455            self.inherited_style.get_border();
86456
86457        self.modified_reset = true;
86458        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
86459
86460
86461
86462        if self.border.ptr_eq(inherited_struct) {
86463            return;
86464        }
86465
86466        self.border.mutate()
86467            .copy_border_right_color_from(inherited_struct);
86468    }
86469
86470    /// Set the `border_right_color` to the computed value `value`.
86471    #[allow(non_snake_case)]
86472    pub fn set_border_right_color(
86473        &mut self,
86474        value: longhands::border_right_color::computed_value::T
86475    ) {
86476        self.modified_reset = true;
86477
86478        self.border.mutate()
86479            .set_border_right_color(
86480                value,
86481            );
86482    }
86483    /// Inherit `border_top_color` from our parent style.
86484    #[allow(non_snake_case)]
86485    pub fn inherit_border_top_color(&mut self) {
86486        let inherited_struct =
86487            self.inherited_style.get_border();
86488
86489        self.modified_reset = true;
86490        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
86491
86492
86493
86494        if self.border.ptr_eq(inherited_struct) {
86495            return;
86496        }
86497
86498        self.border.mutate()
86499            .copy_border_top_color_from(inherited_struct);
86500    }
86501
86502    /// Set the `border_top_color` to the computed value `value`.
86503    #[allow(non_snake_case)]
86504    pub fn set_border_top_color(
86505        &mut self,
86506        value: longhands::border_top_color::computed_value::T
86507    ) {
86508        self.modified_reset = true;
86509
86510        self.border.mutate()
86511            .set_border_top_color(
86512                value,
86513            );
86514    }
86515    /// Inherit `outline_color` from our parent style.
86516    #[allow(non_snake_case)]
86517    pub fn inherit_outline_color(&mut self) {
86518        let inherited_struct =
86519            self.inherited_style.get_outline();
86520
86521        self.modified_reset = true;
86522        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
86523
86524
86525
86526        if self.outline.ptr_eq(inherited_struct) {
86527            return;
86528        }
86529
86530        self.outline.mutate()
86531            .copy_outline_color_from(inherited_struct);
86532    }
86533
86534    /// Set the `outline_color` to the computed value `value`.
86535    #[allow(non_snake_case)]
86536    pub fn set_outline_color(
86537        &mut self,
86538        value: longhands::outline_color::computed_value::T
86539    ) {
86540        self.modified_reset = true;
86541
86542        self.outline.mutate()
86543            .set_outline_color(
86544                value,
86545            );
86546    }
86547    /// Inherit `text_decoration_color` from our parent style.
86548    #[allow(non_snake_case)]
86549    pub fn inherit_text_decoration_color(&mut self) {
86550        let inherited_struct =
86551            self.inherited_style.get_text();
86552
86553        self.modified_reset = true;
86554        self.add_flags(ComputedValueFlags::INHERITS_RESET_STYLE);
86555
86556
86557
86558        if self.text.ptr_eq(inherited_struct) {
86559            return;
86560        }
86561
86562        self.text.mutate()
86563            .copy_text_decoration_color_from(inherited_struct);
86564    }
86565
86566    /// Set the `text_decoration_color` to the computed value `value`.
86567    #[allow(non_snake_case)]
86568    pub fn set_text_decoration_color(
86569        &mut self,
86570        value: longhands::text_decoration_color::computed_value::T
86571    ) {
86572        self.modified_reset = true;
86573
86574        self.text.mutate()
86575            .set_text_decoration_color(
86576                value,
86577            );
86578    }
86579    
86580
86581    /// Inherits style from the parent element, accounting for the default
86582    /// computed values that need to be provided as well.
86583    pub fn for_inheritance(
86584        device: &'a Device,
86585        stylist: Option<&'a Stylist>,
86586        parent: Option<&'a ComputedValues>,
86587        pseudo: Option<&'a PseudoElement>,
86588    ) -> Self {
86589        // Rebuild the visited style from the parent, ensuring that it will also
86590        // not have rules.  This matches the unvisited style that will be
86591        // produced by this builder.  This assumes that the caller doesn't need
86592        // to adjust or process visited style, so we can just build visited
86593        // style here for simplicity.
86594        let visited_style = parent.and_then(|parent| {
86595            parent.visited_style().map(|style| {
86596                Self::for_inheritance(
86597                    device,
86598                    stylist,
86599                    Some(style),
86600                    pseudo,
86601                ).build()
86602            })
86603        });
86604        let custom_properties = if let Some(p) = parent { p.custom_properties().clone() } else { crate::custom_properties::ComputedCustomProperties::default() };
86605        let mut ret = Self::new(
86606            device,
86607            stylist,
86608            parent,
86609            pseudo,
86610            /* rules = */ None,
86611            /* is_root_element = */ false,
86612        );
86613        ret.custom_properties = custom_properties;
86614        ret.visited_style = visited_style;
86615        ret
86616    }
86617
86618    /// Returns whether we have a visited style.
86619    pub fn has_visited_style(&self) -> bool {
86620        self.visited_style.is_some()
86621    }
86622
86623    /// Returns whether we're a pseudo-elements style.
86624    pub fn is_pseudo_element(&self) -> bool {
86625        self.pseudo.map_or(false, |p| !p.is_anon_box())
86626    }
86627
86628    /// Returns the style we're getting reset properties from.
86629    pub fn default_style(&self) -> &'a ComputedValues {
86630        self.reset_style
86631    }
86632
86633        /// Gets an immutable view of the current `Background` style.
86634        pub fn get_background(&self) -> &style_structs::Background {
86635            &self.background
86636        }
86637
86638        /// Gets a mutable view of the current `Background` style.
86639        pub fn mutate_background(&mut self) -> &mut style_structs::Background {
86640            self.modified_reset = true;
86641            self.background.mutate()
86642        }
86643
86644        /// Gets a mutable view of the current `Background` style.
86645        pub fn take_background(&mut self) -> UniqueArc<style_structs::Background> {
86646            self.modified_reset = true;
86647            self.background.take()
86648        }
86649
86650        /// Gets a mutable view of the current `Background` style.
86651        pub fn put_background(&mut self, s: UniqueArc<style_structs::Background>) {
86652            self.background.put(s)
86653        }
86654
86655        /// Gets a mutable view of the current `Background` style,
86656        /// only if it's been mutated before.
86657        pub fn get_background_if_mutated(&mut self)
86658                                                         -> Option<&mut style_structs::Background> {
86659            self.background.get_if_mutated()
86660        }
86661
86662        /// Reset the current `Background` style to its default value.
86663        pub fn reset_background_struct(&mut self) {
86664            self.background =
86665                StyleStructRef::Borrowed(self.reset_style.get_background());
86666        }
86667        /// Gets an immutable view of the current `Border` style.
86668        pub fn get_border(&self) -> &style_structs::Border {
86669            &self.border
86670        }
86671
86672        /// Gets a mutable view of the current `Border` style.
86673        pub fn mutate_border(&mut self) -> &mut style_structs::Border {
86674            self.modified_reset = true;
86675            self.border.mutate()
86676        }
86677
86678        /// Gets a mutable view of the current `Border` style.
86679        pub fn take_border(&mut self) -> UniqueArc<style_structs::Border> {
86680            self.modified_reset = true;
86681            self.border.take()
86682        }
86683
86684        /// Gets a mutable view of the current `Border` style.
86685        pub fn put_border(&mut self, s: UniqueArc<style_structs::Border>) {
86686            self.border.put(s)
86687        }
86688
86689        /// Gets a mutable view of the current `Border` style,
86690        /// only if it's been mutated before.
86691        pub fn get_border_if_mutated(&mut self)
86692                                                         -> Option<&mut style_structs::Border> {
86693            self.border.get_if_mutated()
86694        }
86695
86696        /// Reset the current `Border` style to its default value.
86697        pub fn reset_border_struct(&mut self) {
86698            self.border =
86699                StyleStructRef::Borrowed(self.reset_style.get_border());
86700        }
86701        /// Gets an immutable view of the current `Box` style.
86702        pub fn get_box(&self) -> &style_structs::Box {
86703            &self.box_
86704        }
86705
86706        /// Gets a mutable view of the current `Box` style.
86707        pub fn mutate_box(&mut self) -> &mut style_structs::Box {
86708            self.modified_reset = true;
86709            self.box_.mutate()
86710        }
86711
86712        /// Gets a mutable view of the current `Box` style.
86713        pub fn take_box(&mut self) -> UniqueArc<style_structs::Box> {
86714            self.modified_reset = true;
86715            self.box_.take()
86716        }
86717
86718        /// Gets a mutable view of the current `Box` style.
86719        pub fn put_box(&mut self, s: UniqueArc<style_structs::Box>) {
86720            self.box_.put(s)
86721        }
86722
86723        /// Gets a mutable view of the current `Box` style,
86724        /// only if it's been mutated before.
86725        pub fn get_box_if_mutated(&mut self)
86726                                                         -> Option<&mut style_structs::Box> {
86727            self.box_.get_if_mutated()
86728        }
86729
86730        /// Reset the current `Box` style to its default value.
86731        pub fn reset_box_struct(&mut self) {
86732            self.box_ =
86733                StyleStructRef::Borrowed(self.reset_style.get_box());
86734        }
86735        /// Gets an immutable view of the current `Column` style.
86736        pub fn get_column(&self) -> &style_structs::Column {
86737            &self.column
86738        }
86739
86740        /// Gets a mutable view of the current `Column` style.
86741        pub fn mutate_column(&mut self) -> &mut style_structs::Column {
86742            self.modified_reset = true;
86743            self.column.mutate()
86744        }
86745
86746        /// Gets a mutable view of the current `Column` style.
86747        pub fn take_column(&mut self) -> UniqueArc<style_structs::Column> {
86748            self.modified_reset = true;
86749            self.column.take()
86750        }
86751
86752        /// Gets a mutable view of the current `Column` style.
86753        pub fn put_column(&mut self, s: UniqueArc<style_structs::Column>) {
86754            self.column.put(s)
86755        }
86756
86757        /// Gets a mutable view of the current `Column` style,
86758        /// only if it's been mutated before.
86759        pub fn get_column_if_mutated(&mut self)
86760                                                         -> Option<&mut style_structs::Column> {
86761            self.column.get_if_mutated()
86762        }
86763
86764        /// Reset the current `Column` style to its default value.
86765        pub fn reset_column_struct(&mut self) {
86766            self.column =
86767                StyleStructRef::Borrowed(self.reset_style.get_column());
86768        }
86769        /// Gets an immutable view of the current `Counters` style.
86770        pub fn get_counters(&self) -> &style_structs::Counters {
86771            &self.counters
86772        }
86773
86774        /// Gets a mutable view of the current `Counters` style.
86775        pub fn mutate_counters(&mut self) -> &mut style_structs::Counters {
86776            self.modified_reset = true;
86777            self.counters.mutate()
86778        }
86779
86780        /// Gets a mutable view of the current `Counters` style.
86781        pub fn take_counters(&mut self) -> UniqueArc<style_structs::Counters> {
86782            self.modified_reset = true;
86783            self.counters.take()
86784        }
86785
86786        /// Gets a mutable view of the current `Counters` style.
86787        pub fn put_counters(&mut self, s: UniqueArc<style_structs::Counters>) {
86788            self.counters.put(s)
86789        }
86790
86791        /// Gets a mutable view of the current `Counters` style,
86792        /// only if it's been mutated before.
86793        pub fn get_counters_if_mutated(&mut self)
86794                                                         -> Option<&mut style_structs::Counters> {
86795            self.counters.get_if_mutated()
86796        }
86797
86798        /// Reset the current `Counters` style to its default value.
86799        pub fn reset_counters_struct(&mut self) {
86800            self.counters =
86801                StyleStructRef::Borrowed(self.reset_style.get_counters());
86802        }
86803        /// Gets an immutable view of the current `Effects` style.
86804        pub fn get_effects(&self) -> &style_structs::Effects {
86805            &self.effects
86806        }
86807
86808        /// Gets a mutable view of the current `Effects` style.
86809        pub fn mutate_effects(&mut self) -> &mut style_structs::Effects {
86810            self.modified_reset = true;
86811            self.effects.mutate()
86812        }
86813
86814        /// Gets a mutable view of the current `Effects` style.
86815        pub fn take_effects(&mut self) -> UniqueArc<style_structs::Effects> {
86816            self.modified_reset = true;
86817            self.effects.take()
86818        }
86819
86820        /// Gets a mutable view of the current `Effects` style.
86821        pub fn put_effects(&mut self, s: UniqueArc<style_structs::Effects>) {
86822            self.effects.put(s)
86823        }
86824
86825        /// Gets a mutable view of the current `Effects` style,
86826        /// only if it's been mutated before.
86827        pub fn get_effects_if_mutated(&mut self)
86828                                                         -> Option<&mut style_structs::Effects> {
86829            self.effects.get_if_mutated()
86830        }
86831
86832        /// Reset the current `Effects` style to its default value.
86833        pub fn reset_effects_struct(&mut self) {
86834            self.effects =
86835                StyleStructRef::Borrowed(self.reset_style.get_effects());
86836        }
86837        /// Gets an immutable view of the current `Font` style.
86838        pub fn get_font(&self) -> &style_structs::Font {
86839            &self.font
86840        }
86841
86842        /// Gets a mutable view of the current `Font` style.
86843        pub fn mutate_font(&mut self) -> &mut style_structs::Font {
86844            self.font.mutate()
86845        }
86846
86847        /// Gets a mutable view of the current `Font` style.
86848        pub fn take_font(&mut self) -> UniqueArc<style_structs::Font> {
86849            self.font.take()
86850        }
86851
86852        /// Gets a mutable view of the current `Font` style.
86853        pub fn put_font(&mut self, s: UniqueArc<style_structs::Font>) {
86854            self.font.put(s)
86855        }
86856
86857        /// Gets a mutable view of the current `Font` style,
86858        /// only if it's been mutated before.
86859        pub fn get_font_if_mutated(&mut self)
86860                                                         -> Option<&mut style_structs::Font> {
86861            self.font.get_if_mutated()
86862        }
86863
86864        /// Reset the current `Font` style to its default value.
86865        pub fn reset_font_struct(&mut self) {
86866            self.font =
86867                StyleStructRef::Borrowed(self.reset_style.get_font());
86868        }
86869        /// Gets an immutable view of the current `InheritedBox` style.
86870        pub fn get_inherited_box(&self) -> &style_structs::InheritedBox {
86871            &self.inherited_box
86872        }
86873
86874        /// Gets a mutable view of the current `InheritedBox` style.
86875        pub fn mutate_inherited_box(&mut self) -> &mut style_structs::InheritedBox {
86876            self.inherited_box.mutate()
86877        }
86878
86879        /// Gets a mutable view of the current `InheritedBox` style.
86880        pub fn take_inherited_box(&mut self) -> UniqueArc<style_structs::InheritedBox> {
86881            self.inherited_box.take()
86882        }
86883
86884        /// Gets a mutable view of the current `InheritedBox` style.
86885        pub fn put_inherited_box(&mut self, s: UniqueArc<style_structs::InheritedBox>) {
86886            self.inherited_box.put(s)
86887        }
86888
86889        /// Gets a mutable view of the current `InheritedBox` style,
86890        /// only if it's been mutated before.
86891        pub fn get_inherited_box_if_mutated(&mut self)
86892                                                         -> Option<&mut style_structs::InheritedBox> {
86893            self.inherited_box.get_if_mutated()
86894        }
86895
86896        /// Reset the current `InheritedBox` style to its default value.
86897        pub fn reset_inherited_box_struct(&mut self) {
86898            self.inherited_box =
86899                StyleStructRef::Borrowed(self.reset_style.get_inherited_box());
86900        }
86901        /// Gets an immutable view of the current `InheritedTable` style.
86902        pub fn get_inherited_table(&self) -> &style_structs::InheritedTable {
86903            &self.inherited_table
86904        }
86905
86906        /// Gets a mutable view of the current `InheritedTable` style.
86907        pub fn mutate_inherited_table(&mut self) -> &mut style_structs::InheritedTable {
86908            self.inherited_table.mutate()
86909        }
86910
86911        /// Gets a mutable view of the current `InheritedTable` style.
86912        pub fn take_inherited_table(&mut self) -> UniqueArc<style_structs::InheritedTable> {
86913            self.inherited_table.take()
86914        }
86915
86916        /// Gets a mutable view of the current `InheritedTable` style.
86917        pub fn put_inherited_table(&mut self, s: UniqueArc<style_structs::InheritedTable>) {
86918            self.inherited_table.put(s)
86919        }
86920
86921        /// Gets a mutable view of the current `InheritedTable` style,
86922        /// only if it's been mutated before.
86923        pub fn get_inherited_table_if_mutated(&mut self)
86924                                                         -> Option<&mut style_structs::InheritedTable> {
86925            self.inherited_table.get_if_mutated()
86926        }
86927
86928        /// Reset the current `InheritedTable` style to its default value.
86929        pub fn reset_inherited_table_struct(&mut self) {
86930            self.inherited_table =
86931                StyleStructRef::Borrowed(self.reset_style.get_inherited_table());
86932        }
86933        /// Gets an immutable view of the current `InheritedText` style.
86934        pub fn get_inherited_text(&self) -> &style_structs::InheritedText {
86935            &self.inherited_text
86936        }
86937
86938        /// Gets a mutable view of the current `InheritedText` style.
86939        pub fn mutate_inherited_text(&mut self) -> &mut style_structs::InheritedText {
86940            self.inherited_text.mutate()
86941        }
86942
86943        /// Gets a mutable view of the current `InheritedText` style.
86944        pub fn take_inherited_text(&mut self) -> UniqueArc<style_structs::InheritedText> {
86945            self.inherited_text.take()
86946        }
86947
86948        /// Gets a mutable view of the current `InheritedText` style.
86949        pub fn put_inherited_text(&mut self, s: UniqueArc<style_structs::InheritedText>) {
86950            self.inherited_text.put(s)
86951        }
86952
86953        /// Gets a mutable view of the current `InheritedText` style,
86954        /// only if it's been mutated before.
86955        pub fn get_inherited_text_if_mutated(&mut self)
86956                                                         -> Option<&mut style_structs::InheritedText> {
86957            self.inherited_text.get_if_mutated()
86958        }
86959
86960        /// Reset the current `InheritedText` style to its default value.
86961        pub fn reset_inherited_text_struct(&mut self) {
86962            self.inherited_text =
86963                StyleStructRef::Borrowed(self.reset_style.get_inherited_text());
86964        }
86965        /// Gets an immutable view of the current `InheritedUI` style.
86966        pub fn get_inherited_ui(&self) -> &style_structs::InheritedUI {
86967            &self.inherited_ui
86968        }
86969
86970        /// Gets a mutable view of the current `InheritedUI` style.
86971        pub fn mutate_inherited_ui(&mut self) -> &mut style_structs::InheritedUI {
86972            self.inherited_ui.mutate()
86973        }
86974
86975        /// Gets a mutable view of the current `InheritedUI` style.
86976        pub fn take_inherited_ui(&mut self) -> UniqueArc<style_structs::InheritedUI> {
86977            self.inherited_ui.take()
86978        }
86979
86980        /// Gets a mutable view of the current `InheritedUI` style.
86981        pub fn put_inherited_ui(&mut self, s: UniqueArc<style_structs::InheritedUI>) {
86982            self.inherited_ui.put(s)
86983        }
86984
86985        /// Gets a mutable view of the current `InheritedUI` style,
86986        /// only if it's been mutated before.
86987        pub fn get_inherited_ui_if_mutated(&mut self)
86988                                                         -> Option<&mut style_structs::InheritedUI> {
86989            self.inherited_ui.get_if_mutated()
86990        }
86991
86992        /// Reset the current `InheritedUI` style to its default value.
86993        pub fn reset_inherited_ui_struct(&mut self) {
86994            self.inherited_ui =
86995                StyleStructRef::Borrowed(self.reset_style.get_inherited_ui());
86996        }
86997        /// Gets an immutable view of the current `List` style.
86998        pub fn get_list(&self) -> &style_structs::List {
86999            &self.list
87000        }
87001
87002        /// Gets a mutable view of the current `List` style.
87003        pub fn mutate_list(&mut self) -> &mut style_structs::List {
87004            self.list.mutate()
87005        }
87006
87007        /// Gets a mutable view of the current `List` style.
87008        pub fn take_list(&mut self) -> UniqueArc<style_structs::List> {
87009            self.list.take()
87010        }
87011
87012        /// Gets a mutable view of the current `List` style.
87013        pub fn put_list(&mut self, s: UniqueArc<style_structs::List>) {
87014            self.list.put(s)
87015        }
87016
87017        /// Gets a mutable view of the current `List` style,
87018        /// only if it's been mutated before.
87019        pub fn get_list_if_mutated(&mut self)
87020                                                         -> Option<&mut style_structs::List> {
87021            self.list.get_if_mutated()
87022        }
87023
87024        /// Reset the current `List` style to its default value.
87025        pub fn reset_list_struct(&mut self) {
87026            self.list =
87027                StyleStructRef::Borrowed(self.reset_style.get_list());
87028        }
87029        /// Gets an immutable view of the current `Margin` style.
87030        pub fn get_margin(&self) -> &style_structs::Margin {
87031            &self.margin
87032        }
87033
87034        /// Gets a mutable view of the current `Margin` style.
87035        pub fn mutate_margin(&mut self) -> &mut style_structs::Margin {
87036            self.modified_reset = true;
87037            self.margin.mutate()
87038        }
87039
87040        /// Gets a mutable view of the current `Margin` style.
87041        pub fn take_margin(&mut self) -> UniqueArc<style_structs::Margin> {
87042            self.modified_reset = true;
87043            self.margin.take()
87044        }
87045
87046        /// Gets a mutable view of the current `Margin` style.
87047        pub fn put_margin(&mut self, s: UniqueArc<style_structs::Margin>) {
87048            self.margin.put(s)
87049        }
87050
87051        /// Gets a mutable view of the current `Margin` style,
87052        /// only if it's been mutated before.
87053        pub fn get_margin_if_mutated(&mut self)
87054                                                         -> Option<&mut style_structs::Margin> {
87055            self.margin.get_if_mutated()
87056        }
87057
87058        /// Reset the current `Margin` style to its default value.
87059        pub fn reset_margin_struct(&mut self) {
87060            self.margin =
87061                StyleStructRef::Borrowed(self.reset_style.get_margin());
87062        }
87063        /// Gets an immutable view of the current `Outline` style.
87064        pub fn get_outline(&self) -> &style_structs::Outline {
87065            &self.outline
87066        }
87067
87068        /// Gets a mutable view of the current `Outline` style.
87069        pub fn mutate_outline(&mut self) -> &mut style_structs::Outline {
87070            self.modified_reset = true;
87071            self.outline.mutate()
87072        }
87073
87074        /// Gets a mutable view of the current `Outline` style.
87075        pub fn take_outline(&mut self) -> UniqueArc<style_structs::Outline> {
87076            self.modified_reset = true;
87077            self.outline.take()
87078        }
87079
87080        /// Gets a mutable view of the current `Outline` style.
87081        pub fn put_outline(&mut self, s: UniqueArc<style_structs::Outline>) {
87082            self.outline.put(s)
87083        }
87084
87085        /// Gets a mutable view of the current `Outline` style,
87086        /// only if it's been mutated before.
87087        pub fn get_outline_if_mutated(&mut self)
87088                                                         -> Option<&mut style_structs::Outline> {
87089            self.outline.get_if_mutated()
87090        }
87091
87092        /// Reset the current `Outline` style to its default value.
87093        pub fn reset_outline_struct(&mut self) {
87094            self.outline =
87095                StyleStructRef::Borrowed(self.reset_style.get_outline());
87096        }
87097        /// Gets an immutable view of the current `Padding` style.
87098        pub fn get_padding(&self) -> &style_structs::Padding {
87099            &self.padding
87100        }
87101
87102        /// Gets a mutable view of the current `Padding` style.
87103        pub fn mutate_padding(&mut self) -> &mut style_structs::Padding {
87104            self.modified_reset = true;
87105            self.padding.mutate()
87106        }
87107
87108        /// Gets a mutable view of the current `Padding` style.
87109        pub fn take_padding(&mut self) -> UniqueArc<style_structs::Padding> {
87110            self.modified_reset = true;
87111            self.padding.take()
87112        }
87113
87114        /// Gets a mutable view of the current `Padding` style.
87115        pub fn put_padding(&mut self, s: UniqueArc<style_structs::Padding>) {
87116            self.padding.put(s)
87117        }
87118
87119        /// Gets a mutable view of the current `Padding` style,
87120        /// only if it's been mutated before.
87121        pub fn get_padding_if_mutated(&mut self)
87122                                                         -> Option<&mut style_structs::Padding> {
87123            self.padding.get_if_mutated()
87124        }
87125
87126        /// Reset the current `Padding` style to its default value.
87127        pub fn reset_padding_struct(&mut self) {
87128            self.padding =
87129                StyleStructRef::Borrowed(self.reset_style.get_padding());
87130        }
87131        /// Gets an immutable view of the current `Position` style.
87132        pub fn get_position(&self) -> &style_structs::Position {
87133            &self.position
87134        }
87135
87136        /// Gets a mutable view of the current `Position` style.
87137        pub fn mutate_position(&mut self) -> &mut style_structs::Position {
87138            self.modified_reset = true;
87139            self.position.mutate()
87140        }
87141
87142        /// Gets a mutable view of the current `Position` style.
87143        pub fn take_position(&mut self) -> UniqueArc<style_structs::Position> {
87144            self.modified_reset = true;
87145            self.position.take()
87146        }
87147
87148        /// Gets a mutable view of the current `Position` style.
87149        pub fn put_position(&mut self, s: UniqueArc<style_structs::Position>) {
87150            self.position.put(s)
87151        }
87152
87153        /// Gets a mutable view of the current `Position` style,
87154        /// only if it's been mutated before.
87155        pub fn get_position_if_mutated(&mut self)
87156                                                         -> Option<&mut style_structs::Position> {
87157            self.position.get_if_mutated()
87158        }
87159
87160        /// Reset the current `Position` style to its default value.
87161        pub fn reset_position_struct(&mut self) {
87162            self.position =
87163                StyleStructRef::Borrowed(self.reset_style.get_position());
87164        }
87165        /// Gets an immutable view of the current `SVG` style.
87166        pub fn get_svg(&self) -> &style_structs::SVG {
87167            &self.svg
87168        }
87169
87170        /// Gets a mutable view of the current `SVG` style.
87171        pub fn mutate_svg(&mut self) -> &mut style_structs::SVG {
87172            self.modified_reset = true;
87173            self.svg.mutate()
87174        }
87175
87176        /// Gets a mutable view of the current `SVG` style.
87177        pub fn take_svg(&mut self) -> UniqueArc<style_structs::SVG> {
87178            self.modified_reset = true;
87179            self.svg.take()
87180        }
87181
87182        /// Gets a mutable view of the current `SVG` style.
87183        pub fn put_svg(&mut self, s: UniqueArc<style_structs::SVG>) {
87184            self.svg.put(s)
87185        }
87186
87187        /// Gets a mutable view of the current `SVG` style,
87188        /// only if it's been mutated before.
87189        pub fn get_svg_if_mutated(&mut self)
87190                                                         -> Option<&mut style_structs::SVG> {
87191            self.svg.get_if_mutated()
87192        }
87193
87194        /// Reset the current `SVG` style to its default value.
87195        pub fn reset_svg_struct(&mut self) {
87196            self.svg =
87197                StyleStructRef::Borrowed(self.reset_style.get_svg());
87198        }
87199        /// Gets an immutable view of the current `Table` style.
87200        pub fn get_table(&self) -> &style_structs::Table {
87201            &self.table
87202        }
87203
87204        /// Gets a mutable view of the current `Table` style.
87205        pub fn mutate_table(&mut self) -> &mut style_structs::Table {
87206            self.modified_reset = true;
87207            self.table.mutate()
87208        }
87209
87210        /// Gets a mutable view of the current `Table` style.
87211        pub fn take_table(&mut self) -> UniqueArc<style_structs::Table> {
87212            self.modified_reset = true;
87213            self.table.take()
87214        }
87215
87216        /// Gets a mutable view of the current `Table` style.
87217        pub fn put_table(&mut self, s: UniqueArc<style_structs::Table>) {
87218            self.table.put(s)
87219        }
87220
87221        /// Gets a mutable view of the current `Table` style,
87222        /// only if it's been mutated before.
87223        pub fn get_table_if_mutated(&mut self)
87224                                                         -> Option<&mut style_structs::Table> {
87225            self.table.get_if_mutated()
87226        }
87227
87228        /// Reset the current `Table` style to its default value.
87229        pub fn reset_table_struct(&mut self) {
87230            self.table =
87231                StyleStructRef::Borrowed(self.reset_style.get_table());
87232        }
87233        /// Gets an immutable view of the current `Text` style.
87234        pub fn get_text(&self) -> &style_structs::Text {
87235            &self.text
87236        }
87237
87238        /// Gets a mutable view of the current `Text` style.
87239        pub fn mutate_text(&mut self) -> &mut style_structs::Text {
87240            self.modified_reset = true;
87241            self.text.mutate()
87242        }
87243
87244        /// Gets a mutable view of the current `Text` style.
87245        pub fn take_text(&mut self) -> UniqueArc<style_structs::Text> {
87246            self.modified_reset = true;
87247            self.text.take()
87248        }
87249
87250        /// Gets a mutable view of the current `Text` style.
87251        pub fn put_text(&mut self, s: UniqueArc<style_structs::Text>) {
87252            self.text.put(s)
87253        }
87254
87255        /// Gets a mutable view of the current `Text` style,
87256        /// only if it's been mutated before.
87257        pub fn get_text_if_mutated(&mut self)
87258                                                         -> Option<&mut style_structs::Text> {
87259            self.text.get_if_mutated()
87260        }
87261
87262        /// Reset the current `Text` style to its default value.
87263        pub fn reset_text_struct(&mut self) {
87264            self.text =
87265                StyleStructRef::Borrowed(self.reset_style.get_text());
87266        }
87267        /// Gets an immutable view of the current `UI` style.
87268        pub fn get_ui(&self) -> &style_structs::UI {
87269            &self.ui
87270        }
87271
87272        /// Gets a mutable view of the current `UI` style.
87273        pub fn mutate_ui(&mut self) -> &mut style_structs::UI {
87274            self.modified_reset = true;
87275            self.ui.mutate()
87276        }
87277
87278        /// Gets a mutable view of the current `UI` style.
87279        pub fn take_ui(&mut self) -> UniqueArc<style_structs::UI> {
87280            self.modified_reset = true;
87281            self.ui.take()
87282        }
87283
87284        /// Gets a mutable view of the current `UI` style.
87285        pub fn put_ui(&mut self, s: UniqueArc<style_structs::UI>) {
87286            self.ui.put(s)
87287        }
87288
87289        /// Gets a mutable view of the current `UI` style,
87290        /// only if it's been mutated before.
87291        pub fn get_ui_if_mutated(&mut self)
87292                                                         -> Option<&mut style_structs::UI> {
87293            self.ui.get_if_mutated()
87294        }
87295
87296        /// Reset the current `UI` style to its default value.
87297        pub fn reset_ui_struct(&mut self) {
87298            self.ui =
87299                StyleStructRef::Borrowed(self.reset_style.get_ui());
87300        }
87301    
87302
87303    /// Returns whether this computed style represents a floated object.
87304    pub fn is_floating(&self) -> bool {
87305        self.get_box().clone_float().is_floating()
87306    }
87307
87308    /// Returns whether this computed style represents an absolutely-positioned
87309    /// object.
87310    pub fn is_absolutely_positioned(&self) -> bool {
87311        self.get_box().clone_position().is_absolutely_positioned()
87312    }
87313
87314    /// Whether this style has a top-layer style.
87315    #[cfg(feature = "servo")]
87316    pub fn in_top_layer(&self) -> bool {
87317        matches!(self.get_box().clone__servo_top_layer(),
87318                 longhands::_servo_top_layer::computed_value::T::Top)
87319    }
87320
87321    /// Whether this style has a top-layer style.
87322    #[cfg(feature = "gecko")]
87323    pub fn in_top_layer(&self) -> bool {
87324        matches!(self.get_box().clone__moz_top_layer(),
87325                 longhands::_moz_top_layer::computed_value::T::Auto)
87326    }
87327
87328    /// Clears the "have any reset structs been modified" flag.
87329    pub fn clear_modified_reset(&mut self) {
87330        self.modified_reset = false;
87331    }
87332
87333    /// Returns whether we have mutated any reset structs since the the last
87334    /// time `clear_modified_reset` was called.
87335    pub fn modified_reset(&self) -> bool {
87336        self.modified_reset
87337    }
87338
87339    /// Return the current flags.
87340    #[inline]
87341    pub fn flags(&self) -> ComputedValueFlags {
87342        self.flags.get()
87343    }
87344
87345    /// Add a flag to the current builder.
87346    #[inline]
87347    pub fn add_flags(&self, flag: ComputedValueFlags) {
87348        let flags = self.flags() | flag;
87349        self.flags.set(flags);
87350    }
87351
87352    /// Removes a flag to the current builder.
87353    #[inline]
87354    pub fn remove_flags(&self, flag: ComputedValueFlags) {
87355        let flags = self.flags() & !flag;
87356        self.flags.set(flags);
87357    }
87358
87359    /// Turns this `StyleBuilder` into a proper `ComputedValues` instance.
87360    pub fn build(self) -> Arc<ComputedValues> {
87361        ComputedValues::new(
87362            self.pseudo,
87363            self.custom_properties,
87364            self.writing_mode,
87365            self.effective_zoom,
87366            self.flags.get(),
87367            self.rules,
87368            self.visited_style,
87369            self.background.build(),
87370            self.border.build(),
87371            self.box_.build(),
87372            self.column.build(),
87373            self.counters.build(),
87374            self.effects.build(),
87375            self.font.build(),
87376            self.inherited_box.build(),
87377            self.inherited_table.build(),
87378            self.inherited_text.build(),
87379            self.inherited_ui.build(),
87380            self.list.build(),
87381            self.margin.build(),
87382            self.outline.build(),
87383            self.padding.build(),
87384            self.position.build(),
87385            self.svg.build(),
87386            self.table.build(),
87387            self.text.build(),
87388            self.ui.build(),
87389        )
87390    }
87391
87392    /// Get the custom properties map if necessary.
87393    pub fn custom_properties(&self) -> &crate::custom_properties::ComputedCustomProperties {
87394        &self.custom_properties
87395    }
87396
87397
87398    /// Get the inherited custom properties map.
87399    pub fn inherited_custom_properties(&self) -> &crate::custom_properties::ComputedCustomProperties {
87400        &self.inherited_style.custom_properties
87401    }
87402
87403    /// Access to various information about our inherited styles.  We don't
87404    /// expose an inherited ComputedValues directly, because in the
87405    /// ::first-line case some of the inherited information needs to come from
87406    /// one ComputedValues instance and some from a different one.
87407
87408    /// Inherited writing-mode.
87409    pub fn inherited_writing_mode(&self) -> &WritingMode {
87410        &self.inherited_style.writing_mode
87411    }
87412
87413    /// The effective zoom value that we should multiply absolute lengths by.
87414    pub fn effective_zoom(&self) -> computed::Zoom {
87415        self.effective_zoom
87416    }
87417
87418    /// The zoom specified on this element.
87419    pub fn specified_zoom(&self) -> computed::Zoom {
87420        self.get_box().clone_zoom()
87421    }
87422
87423    /// Computes effective_zoom and effective_zoom_for_inheritance based on the current style
87424    /// information.
87425    pub fn recompute_effective_zooms(&mut self) {
87426        let specified = self.specified_zoom();
87427        self.effective_zoom = self.inherited_style.effective_zoom.compute_effective(specified);
87428        self.effective_zoom_for_inheritance = Self::zoom_for_inheritance(specified, self.inherited_style);
87429    }
87430
87431    fn zoom_for_inheritance(specified: computed::Zoom, inherited_style: &ComputedValues) -> computed::Zoom {
87432        if specified.is_document() {
87433            // If our inherited effective zoom has derived to zero, there's not much we can do.
87434            // This value is not exposed to content anyways (it's used for scrollbars and to avoid
87435            // zoom affecting canvas).
87436            inherited_style.effective_zoom.inverted().unwrap_or(computed::Zoom::ONE)
87437        } else {
87438            specified
87439        }
87440    }
87441
87442    /// The computed value flags of our parent.
87443    #[inline]
87444    pub fn get_parent_flags(&self) -> ComputedValueFlags {
87445        self.inherited_style.flags
87446    }
87447
87448    /// Calculate the line height, given the currently resolved line-height and font.
87449    pub fn calc_line_height(
87450        &self,
87451        device: &Device,
87452        line_height_base: LineHeightBase,
87453        writing_mode: WritingMode,
87454    ) -> computed::NonNegativeLength {
87455        use crate::computed_value_flags::ComputedValueFlags;
87456        let (font, flag) = match line_height_base {
87457            LineHeightBase::CurrentStyle => (
87458                self.get_font(),
87459                ComputedValueFlags::DEPENDS_ON_SELF_FONT_METRICS,
87460            ),
87461            LineHeightBase::InheritedStyle => (
87462                self.get_parent_font(),
87463                ComputedValueFlags::DEPENDS_ON_INHERITED_FONT_METRICS,
87464            ),
87465        };
87466        let line_height = font.clone_line_height();
87467        if matches!(line_height, computed::LineHeight::Normal) {
87468            self.add_flags(flag);
87469        }
87470        let lh = device.calc_line_height(&font, writing_mode, None);
87471        if line_height_base == LineHeightBase::InheritedStyle {
87472            // Apply our own zoom if our style source is the parent style.
87473            computed::NonNegativeLength::new(self.effective_zoom_for_inheritance.zoom(lh.px()))
87474        } else {
87475            lh
87476        }
87477    }
87478
87479    /// And access to inherited style structs.
87480        /// Gets our inherited `Background`.  We don't name these
87481        /// accessors `inherited_background` because we already
87482        /// have things like "box" vs "inherited_box" as struct names.  Do the
87483        /// next-best thing and call them `parent_background`
87484        /// instead.
87485        pub fn get_parent_background(&self) -> &style_structs::Background {
87486            self.inherited_style.get_background()
87487        }
87488        /// Gets our inherited `Border`.  We don't name these
87489        /// accessors `inherited_border` because we already
87490        /// have things like "box" vs "inherited_box" as struct names.  Do the
87491        /// next-best thing and call them `parent_border`
87492        /// instead.
87493        pub fn get_parent_border(&self) -> &style_structs::Border {
87494            self.inherited_style.get_border()
87495        }
87496        /// Gets our inherited `Box`.  We don't name these
87497        /// accessors `inherited_box` because we already
87498        /// have things like "box" vs "inherited_box" as struct names.  Do the
87499        /// next-best thing and call them `parent_box`
87500        /// instead.
87501        pub fn get_parent_box(&self) -> &style_structs::Box {
87502            self.inherited_style.get_box()
87503        }
87504        /// Gets our inherited `Column`.  We don't name these
87505        /// accessors `inherited_column` because we already
87506        /// have things like "box" vs "inherited_box" as struct names.  Do the
87507        /// next-best thing and call them `parent_column`
87508        /// instead.
87509        pub fn get_parent_column(&self) -> &style_structs::Column {
87510            self.inherited_style.get_column()
87511        }
87512        /// Gets our inherited `Counters`.  We don't name these
87513        /// accessors `inherited_counters` because we already
87514        /// have things like "box" vs "inherited_box" as struct names.  Do the
87515        /// next-best thing and call them `parent_counters`
87516        /// instead.
87517        pub fn get_parent_counters(&self) -> &style_structs::Counters {
87518            self.inherited_style.get_counters()
87519        }
87520        /// Gets our inherited `Effects`.  We don't name these
87521        /// accessors `inherited_effects` because we already
87522        /// have things like "box" vs "inherited_box" as struct names.  Do the
87523        /// next-best thing and call them `parent_effects`
87524        /// instead.
87525        pub fn get_parent_effects(&self) -> &style_structs::Effects {
87526            self.inherited_style.get_effects()
87527        }
87528        /// Gets our inherited `Font`.  We don't name these
87529        /// accessors `inherited_font` because we already
87530        /// have things like "box" vs "inherited_box" as struct names.  Do the
87531        /// next-best thing and call them `parent_font`
87532        /// instead.
87533        pub fn get_parent_font(&self) -> &style_structs::Font {
87534            self.inherited_style.get_font()
87535        }
87536        /// Gets our inherited `InheritedBox`.  We don't name these
87537        /// accessors `inherited_inherited_box` because we already
87538        /// have things like "box" vs "inherited_box" as struct names.  Do the
87539        /// next-best thing and call them `parent_inherited_box`
87540        /// instead.
87541        pub fn get_parent_inherited_box(&self) -> &style_structs::InheritedBox {
87542            self.inherited_style.get_inherited_box()
87543        }
87544        /// Gets our inherited `InheritedTable`.  We don't name these
87545        /// accessors `inherited_inherited_table` because we already
87546        /// have things like "box" vs "inherited_box" as struct names.  Do the
87547        /// next-best thing and call them `parent_inherited_table`
87548        /// instead.
87549        pub fn get_parent_inherited_table(&self) -> &style_structs::InheritedTable {
87550            self.inherited_style.get_inherited_table()
87551        }
87552        /// Gets our inherited `InheritedText`.  We don't name these
87553        /// accessors `inherited_inherited_text` because we already
87554        /// have things like "box" vs "inherited_box" as struct names.  Do the
87555        /// next-best thing and call them `parent_inherited_text`
87556        /// instead.
87557        pub fn get_parent_inherited_text(&self) -> &style_structs::InheritedText {
87558            self.inherited_style.get_inherited_text()
87559        }
87560        /// Gets our inherited `InheritedUI`.  We don't name these
87561        /// accessors `inherited_inherited_ui` because we already
87562        /// have things like "box" vs "inherited_box" as struct names.  Do the
87563        /// next-best thing and call them `parent_inherited_ui`
87564        /// instead.
87565        pub fn get_parent_inherited_ui(&self) -> &style_structs::InheritedUI {
87566            self.inherited_style.get_inherited_ui()
87567        }
87568        /// Gets our inherited `List`.  We don't name these
87569        /// accessors `inherited_list` because we already
87570        /// have things like "box" vs "inherited_box" as struct names.  Do the
87571        /// next-best thing and call them `parent_list`
87572        /// instead.
87573        pub fn get_parent_list(&self) -> &style_structs::List {
87574            self.inherited_style.get_list()
87575        }
87576        /// Gets our inherited `Margin`.  We don't name these
87577        /// accessors `inherited_margin` because we already
87578        /// have things like "box" vs "inherited_box" as struct names.  Do the
87579        /// next-best thing and call them `parent_margin`
87580        /// instead.
87581        pub fn get_parent_margin(&self) -> &style_structs::Margin {
87582            self.inherited_style.get_margin()
87583        }
87584        /// Gets our inherited `Outline`.  We don't name these
87585        /// accessors `inherited_outline` because we already
87586        /// have things like "box" vs "inherited_box" as struct names.  Do the
87587        /// next-best thing and call them `parent_outline`
87588        /// instead.
87589        pub fn get_parent_outline(&self) -> &style_structs::Outline {
87590            self.inherited_style.get_outline()
87591        }
87592        /// Gets our inherited `Padding`.  We don't name these
87593        /// accessors `inherited_padding` because we already
87594        /// have things like "box" vs "inherited_box" as struct names.  Do the
87595        /// next-best thing and call them `parent_padding`
87596        /// instead.
87597        pub fn get_parent_padding(&self) -> &style_structs::Padding {
87598            self.inherited_style.get_padding()
87599        }
87600        /// Gets our inherited `Position`.  We don't name these
87601        /// accessors `inherited_position` because we already
87602        /// have things like "box" vs "inherited_box" as struct names.  Do the
87603        /// next-best thing and call them `parent_position`
87604        /// instead.
87605        pub fn get_parent_position(&self) -> &style_structs::Position {
87606            self.inherited_style.get_position()
87607        }
87608        /// Gets our inherited `SVG`.  We don't name these
87609        /// accessors `inherited_svg` because we already
87610        /// have things like "box" vs "inherited_box" as struct names.  Do the
87611        /// next-best thing and call them `parent_svg`
87612        /// instead.
87613        pub fn get_parent_svg(&self) -> &style_structs::SVG {
87614            self.inherited_style.get_svg()
87615        }
87616        /// Gets our inherited `Table`.  We don't name these
87617        /// accessors `inherited_table` because we already
87618        /// have things like "box" vs "inherited_box" as struct names.  Do the
87619        /// next-best thing and call them `parent_table`
87620        /// instead.
87621        pub fn get_parent_table(&self) -> &style_structs::Table {
87622            self.inherited_style.get_table()
87623        }
87624        /// Gets our inherited `Text`.  We don't name these
87625        /// accessors `inherited_text` because we already
87626        /// have things like "box" vs "inherited_box" as struct names.  Do the
87627        /// next-best thing and call them `parent_text`
87628        /// instead.
87629        pub fn get_parent_text(&self) -> &style_structs::Text {
87630            self.inherited_style.get_text()
87631        }
87632        /// Gets our inherited `UI`.  We don't name these
87633        /// accessors `inherited_ui` because we already
87634        /// have things like "box" vs "inherited_box" as struct names.  Do the
87635        /// next-best thing and call them `parent_ui`
87636        /// instead.
87637        pub fn get_parent_ui(&self) -> &style_structs::UI {
87638            self.inherited_style.get_ui()
87639        }
87640}
87641
87642/// A per-longhand function that performs the CSS cascade for that longhand.
87643pub type CascadePropertyFn =
87644    unsafe extern "Rust" fn(
87645        declaration: &PropertyDeclaration,
87646        context: &mut computed::Context,
87647    );
87648
87649/// A per-longhand array of functions to perform the CSS cascade on each of
87650/// them, effectively doing virtual dispatch.
87651pub static CASCADE_PROPERTY: [CascadePropertyFn; 220] = [
87652        longhands::align_content::cascade_property,
87653        longhands::align_items::cascade_property,
87654        longhands::align_self::cascade_property,
87655        longhands::aspect_ratio::cascade_property,
87656        longhands::backface_visibility::cascade_property,
87657        longhands::baseline_source::cascade_property,
87658        longhands::border_collapse::cascade_property,
87659        longhands::border_image_repeat::cascade_property,
87660        longhands::box_sizing::cascade_property,
87661        longhands::caption_side::cascade_property,
87662        longhands::clear::cascade_property,
87663        longhands::column_count::cascade_property,
87664        longhands::column_span::cascade_property,
87665        longhands::contain::cascade_property,
87666        longhands::container_type::cascade_property,
87667        longhands::direction::cascade_property,
87668        longhands::display::cascade_property,
87669        longhands::empty_cells::cascade_property,
87670        longhands::flex_direction::cascade_property,
87671        longhands::flex_wrap::cascade_property,
87672        longhands::float::cascade_property,
87673        longhands::font_language_override::cascade_property,
87674        longhands::font_stretch::cascade_property,
87675        longhands::font_style::cascade_property,
87676        longhands::font_variant_caps::cascade_property,
87677        longhands::font_weight::cascade_property,
87678        longhands::grid_auto_flow::cascade_property,
87679        longhands::image_rendering::cascade_property,
87680        longhands::isolation::cascade_property,
87681        longhands::justify_content::cascade_property,
87682        longhands::justify_items::cascade_property,
87683        longhands::justify_self::cascade_property,
87684        longhands::list_style_position::cascade_property,
87685        longhands::list_style_type::cascade_property,
87686        longhands::mix_blend_mode::cascade_property,
87687        longhands::object_fit::cascade_property,
87688        longhands::opacity::cascade_property,
87689        longhands::order::cascade_property,
87690        longhands::outline_style::cascade_property,
87691        longhands::overflow_wrap::cascade_property,
87692        longhands::pointer_events::cascade_property,
87693        longhands::position::cascade_property,
87694        longhands::_servo_overflow_clip_box::cascade_property,
87695        longhands::_servo_top_layer::cascade_property,
87696        longhands::table_layout::cascade_property,
87697        longhands::text_align::cascade_property,
87698        longhands::text_align_last::cascade_property,
87699        longhands::text_decoration_line::cascade_property,
87700        longhands::text_decoration_style::cascade_property,
87701        longhands::text_justify::cascade_property,
87702        longhands::text_rendering::cascade_property,
87703        longhands::text_transform::cascade_property,
87704        longhands::text_wrap_mode::cascade_property,
87705        longhands::transform_style::cascade_property,
87706        longhands::unicode_bidi::cascade_property,
87707        longhands::visibility::cascade_property,
87708        longhands::white_space_collapse::cascade_property,
87709        longhands::word_break::cascade_property,
87710        longhands::writing_mode::cascade_property,
87711        longhands::z_index::cascade_property,
87712        longhands::zoom::cascade_property,
87713        longhands::flex_grow::cascade_property,
87714        longhands::flex_shrink::cascade_property,
87715        longhands::overflow_block::cascade_property,
87716        longhands::overflow_inline::cascade_property,
87717        longhands::overflow_x::cascade_property,
87718        longhands::overflow_y::cascade_property,
87719        longhands::border_block_end_style::cascade_property,
87720        longhands::border_block_start_style::cascade_property,
87721        longhands::border_bottom_style::cascade_property,
87722        longhands::border_inline_end_style::cascade_property,
87723        longhands::border_inline_start_style::cascade_property,
87724        longhands::border_left_style::cascade_property,
87725        longhands::border_right_style::cascade_property,
87726        longhands::border_top_style::cascade_property,
87727        longhands::animation_composition::cascade_property,
87728        longhands::animation_delay::cascade_property,
87729        longhands::animation_direction::cascade_property,
87730        longhands::animation_duration::cascade_property,
87731        longhands::animation_fill_mode::cascade_property,
87732        longhands::animation_iteration_count::cascade_property,
87733        longhands::animation_name::cascade_property,
87734        longhands::animation_play_state::cascade_property,
87735        longhands::animation_timeline::cascade_property,
87736        longhands::animation_timing_function::cascade_property,
87737        longhands::backdrop_filter::cascade_property,
87738        longhands::background_attachment::cascade_property,
87739        longhands::background_clip::cascade_property,
87740        longhands::background_image::cascade_property,
87741        longhands::background_origin::cascade_property,
87742        longhands::background_position_x::cascade_property,
87743        longhands::background_position_y::cascade_property,
87744        longhands::background_repeat::cascade_property,
87745        longhands::background_size::cascade_property,
87746        longhands::border_image_outset::cascade_property,
87747        longhands::border_image_slice::cascade_property,
87748        longhands::border_image_width::cascade_property,
87749        longhands::border_spacing::cascade_property,
87750        longhands::box_shadow::cascade_property,
87751        longhands::clip::cascade_property,
87752        longhands::clip_path::cascade_property,
87753        longhands::color::cascade_property,
87754        longhands::color_scheme::cascade_property,
87755        longhands::column_width::cascade_property,
87756        longhands::container_name::cascade_property,
87757        longhands::content::cascade_property,
87758        longhands::counter_increment::cascade_property,
87759        longhands::counter_reset::cascade_property,
87760        longhands::cursor::cascade_property,
87761        longhands::filter::cascade_property,
87762        longhands::flex_basis::cascade_property,
87763        longhands::font_family::cascade_property,
87764        longhands::font_size::cascade_property,
87765        longhands::font_variation_settings::cascade_property,
87766        longhands::grid_template_areas::cascade_property,
87767        longhands::letter_spacing::cascade_property,
87768        longhands::line_height::cascade_property,
87769        longhands::mask_image::cascade_property,
87770        longhands::offset_path::cascade_property,
87771        longhands::perspective::cascade_property,
87772        longhands::quotes::cascade_property,
87773        longhands::rotate::cascade_property,
87774        longhands::scale::cascade_property,
87775        longhands::text_indent::cascade_property,
87776        longhands::text_overflow::cascade_property,
87777        longhands::text_shadow::cascade_property,
87778        longhands::transform::cascade_property,
87779        longhands::transform_origin::cascade_property,
87780        longhands::transition_behavior::cascade_property,
87781        longhands::transition_delay::cascade_property,
87782        longhands::transition_duration::cascade_property,
87783        longhands::transition_property::cascade_property,
87784        longhands::transition_timing_function::cascade_property,
87785        longhands::translate::cascade_property,
87786        longhands::vertical_align::cascade_property,
87787        longhands::view_transition_class::cascade_property,
87788        longhands::view_transition_name::cascade_property,
87789        longhands::will_change::cascade_property,
87790        longhands::word_spacing::cascade_property,
87791        longhands::_x_lang::cascade_property,
87792        longhands::object_position::cascade_property,
87793        longhands::perspective_origin::cascade_property,
87794        longhands::grid_template_columns::cascade_property,
87795        longhands::grid_template_rows::cascade_property,
87796        longhands::border_image_source::cascade_property,
87797        longhands::list_style_image::cascade_property,
87798        longhands::grid_auto_columns::cascade_property,
87799        longhands::grid_auto_rows::cascade_property,
87800        longhands::outline_offset::cascade_property,
87801        longhands::overflow_clip_margin::cascade_property,
87802        longhands::column_gap::cascade_property,
87803        longhands::row_gap::cascade_property,
87804        longhands::grid_column_end::cascade_property,
87805        longhands::grid_column_start::cascade_property,
87806        longhands::grid_row_end::cascade_property,
87807        longhands::grid_row_start::cascade_property,
87808        longhands::max_block_size::cascade_property,
87809        longhands::max_height::cascade_property,
87810        longhands::max_inline_size::cascade_property,
87811        longhands::max_width::cascade_property,
87812        longhands::border_bottom_left_radius::cascade_property,
87813        longhands::border_bottom_right_radius::cascade_property,
87814        longhands::border_end_end_radius::cascade_property,
87815        longhands::border_end_start_radius::cascade_property,
87816        longhands::border_start_end_radius::cascade_property,
87817        longhands::border_start_start_radius::cascade_property,
87818        longhands::border_top_left_radius::cascade_property,
87819        longhands::border_top_right_radius::cascade_property,
87820        longhands::bottom::cascade_property,
87821        longhands::inset_block_end::cascade_property,
87822        longhands::inset_block_start::cascade_property,
87823        longhands::inset_inline_end::cascade_property,
87824        longhands::inset_inline_start::cascade_property,
87825        longhands::left::cascade_property,
87826        longhands::right::cascade_property,
87827        longhands::top::cascade_property,
87828        longhands::margin_block_end::cascade_property,
87829        longhands::margin_block_start::cascade_property,
87830        longhands::margin_bottom::cascade_property,
87831        longhands::margin_inline_end::cascade_property,
87832        longhands::margin_inline_start::cascade_property,
87833        longhands::margin_left::cascade_property,
87834        longhands::margin_right::cascade_property,
87835        longhands::margin_top::cascade_property,
87836        longhands::padding_block_end::cascade_property,
87837        longhands::padding_block_start::cascade_property,
87838        longhands::padding_bottom::cascade_property,
87839        longhands::padding_inline_end::cascade_property,
87840        longhands::padding_inline_start::cascade_property,
87841        longhands::padding_left::cascade_property,
87842        longhands::padding_right::cascade_property,
87843        longhands::padding_top::cascade_property,
87844        longhands::block_size::cascade_property,
87845        longhands::height::cascade_property,
87846        longhands::inline_size::cascade_property,
87847        longhands::min_block_size::cascade_property,
87848        longhands::min_height::cascade_property,
87849        longhands::min_inline_size::cascade_property,
87850        longhands::min_width::cascade_property,
87851        longhands::width::cascade_property,
87852        longhands::border_block_end_width::cascade_property,
87853        longhands::border_block_start_width::cascade_property,
87854        longhands::border_bottom_width::cascade_property,
87855        longhands::border_inline_end_width::cascade_property,
87856        longhands::border_inline_start_width::cascade_property,
87857        longhands::border_left_width::cascade_property,
87858        longhands::border_right_width::cascade_property,
87859        longhands::border_top_width::cascade_property,
87860        longhands::outline_width::cascade_property,
87861        longhands::background_color::cascade_property,
87862        longhands::border_block_end_color::cascade_property,
87863        longhands::border_block_start_color::cascade_property,
87864        longhands::border_bottom_color::cascade_property,
87865        longhands::border_inline_end_color::cascade_property,
87866        longhands::border_inline_start_color::cascade_property,
87867        longhands::border_left_color::cascade_property,
87868        longhands::border_right_color::cascade_property,
87869        longhands::border_top_color::cascade_property,
87870        longhands::outline_color::cascade_property,
87871        longhands::text_decoration_color::cascade_property,
87872];
87873
87874/// See StyleAdjuster::adjust_for_border_width.
87875pub fn adjust_border_width(style: &mut StyleBuilder) {
87876        // Like calling to_computed_value, which wouldn't type check.
87877        if style.get_border().clone_border_top_style().none_or_hidden() &&
87878           style.get_border().border_top_has_nonzero_width() {
87879            style.set_border_top_width(Au(0));
87880        }
87881        // Like calling to_computed_value, which wouldn't type check.
87882        if style.get_border().clone_border_right_style().none_or_hidden() &&
87883           style.get_border().border_right_has_nonzero_width() {
87884            style.set_border_right_width(Au(0));
87885        }
87886        // Like calling to_computed_value, which wouldn't type check.
87887        if style.get_border().clone_border_bottom_style().none_or_hidden() &&
87888           style.get_border().border_bottom_has_nonzero_width() {
87889            style.set_border_bottom_width(Au(0));
87890        }
87891        // Like calling to_computed_value, which wouldn't type check.
87892        if style.get_border().clone_border_left_style().none_or_hidden() &&
87893           style.get_border().border_left_has_nonzero_width() {
87894            style.set_border_left_width(Au(0));
87895        }
87896}
87897
87898/// An identifier for a given alias property.
87899#[derive(Clone, Copy, Eq, PartialEq, MallocSizeOf)]
87900#[repr(u16)]
87901pub enum AliasId {
87902        /// word-wrap
87903        WordWrap = 0,
87904        /// grid-column-gap
87905        GridColumnGap = 1,
87906        /// grid-row-gap
87907        GridRowGap = 2,
87908        /// grid-gap
87909        GridGap = 3,
87910}
87911
87912impl fmt::Debug for AliasId {
87913    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
87914        let name = NonCustomPropertyId::from(*self).name();
87915        formatter.write_str(name)
87916    }
87917}
87918
87919impl AliasId {
87920    /// Returns the property we're aliasing, as a longhand or a shorthand.
87921    #[inline]
87922    pub fn aliased_property(self) -> NonCustomPropertyId {
87923        static MAP: [NonCustomPropertyId; 4] = [
87924            NonCustomPropertyId::from_longhand(LonghandId::OverflowWrap),
87925            NonCustomPropertyId::from_longhand(LonghandId::ColumnGap),
87926            NonCustomPropertyId::from_longhand(LonghandId::RowGap),
87927            
87928            NonCustomPropertyId::from_shorthand(ShorthandId::Gap),
87929        ];
87930        MAP[self as usize]
87931    }
87932}
87933
87934/// Call the given macro with tokens like this for each longhand and shorthand properties
87935/// that is enabled in content:
87936///
87937/// ```
87938/// [CamelCaseName, SetCamelCaseName, PropertyId::Longhand(LonghandId::CamelCaseName)],
87939/// ```
87940///
87941/// NOTE(emilio): Callers are responsible to deal with prefs.
87942#[macro_export]
87943macro_rules! css_properties_accessors {
87944    ($macro_name: ident) => {
87945        $macro_name! {
87946                                [Align_content, SetAlign_content,
87947                                 PropertyId::NonCustom(LonghandId::AlignContent.into())],
87948                            [AlignContent, SetAlignContent,
87949                             PropertyId::NonCustom(LonghandId::AlignContent.into())],
87950                                [Align_items, SetAlign_items,
87951                                 PropertyId::NonCustom(LonghandId::AlignItems.into())],
87952                            [AlignItems, SetAlignItems,
87953                             PropertyId::NonCustom(LonghandId::AlignItems.into())],
87954                                [Align_self, SetAlign_self,
87955                                 PropertyId::NonCustom(LonghandId::AlignSelf.into())],
87956                            [AlignSelf, SetAlignSelf,
87957                             PropertyId::NonCustom(LonghandId::AlignSelf.into())],
87958                                [Aspect_ratio, SetAspect_ratio,
87959                                 PropertyId::NonCustom(LonghandId::AspectRatio.into())],
87960                            [AspectRatio, SetAspectRatio,
87961                             PropertyId::NonCustom(LonghandId::AspectRatio.into())],
87962                                [Backface_visibility, SetBackface_visibility,
87963                                 PropertyId::NonCustom(LonghandId::BackfaceVisibility.into())],
87964                            [BackfaceVisibility, SetBackfaceVisibility,
87965                             PropertyId::NonCustom(LonghandId::BackfaceVisibility.into())],
87966                                [Baseline_source, SetBaseline_source,
87967                                 PropertyId::NonCustom(LonghandId::BaselineSource.into())],
87968                            [BaselineSource, SetBaselineSource,
87969                             PropertyId::NonCustom(LonghandId::BaselineSource.into())],
87970                                [Border_collapse, SetBorder_collapse,
87971                                 PropertyId::NonCustom(LonghandId::BorderCollapse.into())],
87972                            [BorderCollapse, SetBorderCollapse,
87973                             PropertyId::NonCustom(LonghandId::BorderCollapse.into())],
87974                                [Border_image_repeat, SetBorder_image_repeat,
87975                                 PropertyId::NonCustom(LonghandId::BorderImageRepeat.into())],
87976                            [BorderImageRepeat, SetBorderImageRepeat,
87977                             PropertyId::NonCustom(LonghandId::BorderImageRepeat.into())],
87978                                [Box_sizing, SetBox_sizing,
87979                                 PropertyId::NonCustom(LonghandId::BoxSizing.into())],
87980                            [BoxSizing, SetBoxSizing,
87981                             PropertyId::NonCustom(LonghandId::BoxSizing.into())],
87982                                [Caption_side, SetCaption_side,
87983                                 PropertyId::NonCustom(LonghandId::CaptionSide.into())],
87984                            [CaptionSide, SetCaptionSide,
87985                             PropertyId::NonCustom(LonghandId::CaptionSide.into())],
87986                            [Clear, SetClear,
87987                             PropertyId::NonCustom(LonghandId::Clear.into())],
87988                                [Column_count, SetColumn_count,
87989                                 PropertyId::NonCustom(LonghandId::ColumnCount.into())],
87990                            [ColumnCount, SetColumnCount,
87991                             PropertyId::NonCustom(LonghandId::ColumnCount.into())],
87992                                [Column_span, SetColumn_span,
87993                                 PropertyId::NonCustom(LonghandId::ColumnSpan.into())],
87994                            [ColumnSpan, SetColumnSpan,
87995                             PropertyId::NonCustom(LonghandId::ColumnSpan.into())],
87996                            [Contain, SetContain,
87997                             PropertyId::NonCustom(LonghandId::Contain.into())],
87998                                [Container_type, SetContainer_type,
87999                                 PropertyId::NonCustom(LonghandId::ContainerType.into())],
88000                            [ContainerType, SetContainerType,
88001                             PropertyId::NonCustom(LonghandId::ContainerType.into())],
88002                            [Direction, SetDirection,
88003                             PropertyId::NonCustom(LonghandId::Direction.into())],
88004                            [Display, SetDisplay,
88005                             PropertyId::NonCustom(LonghandId::Display.into())],
88006                                [Empty_cells, SetEmpty_cells,
88007                                 PropertyId::NonCustom(LonghandId::EmptyCells.into())],
88008                            [EmptyCells, SetEmptyCells,
88009                             PropertyId::NonCustom(LonghandId::EmptyCells.into())],
88010                                [Flex_direction, SetFlex_direction,
88011                                 PropertyId::NonCustom(LonghandId::FlexDirection.into())],
88012                            [FlexDirection, SetFlexDirection,
88013                             PropertyId::NonCustom(LonghandId::FlexDirection.into())],
88014                                [Flex_wrap, SetFlex_wrap,
88015                                 PropertyId::NonCustom(LonghandId::FlexWrap.into())],
88016                            [FlexWrap, SetFlexWrap,
88017                             PropertyId::NonCustom(LonghandId::FlexWrap.into())],
88018                            [Float, SetFloat,
88019                             PropertyId::NonCustom(LonghandId::Float.into())],
88020                                [Font_language_override, SetFont_language_override,
88021                                 PropertyId::NonCustom(LonghandId::FontLanguageOverride.into())],
88022                            [FontLanguageOverride, SetFontLanguageOverride,
88023                             PropertyId::NonCustom(LonghandId::FontLanguageOverride.into())],
88024                                [Font_stretch, SetFont_stretch,
88025                                 PropertyId::NonCustom(LonghandId::FontStretch.into())],
88026                            [FontStretch, SetFontStretch,
88027                             PropertyId::NonCustom(LonghandId::FontStretch.into())],
88028                                [Font_style, SetFont_style,
88029                                 PropertyId::NonCustom(LonghandId::FontStyle.into())],
88030                            [FontStyle, SetFontStyle,
88031                             PropertyId::NonCustom(LonghandId::FontStyle.into())],
88032                                [Font_variant_caps, SetFont_variant_caps,
88033                                 PropertyId::NonCustom(LonghandId::FontVariantCaps.into())],
88034                            [FontVariantCaps, SetFontVariantCaps,
88035                             PropertyId::NonCustom(LonghandId::FontVariantCaps.into())],
88036                                [Font_weight, SetFont_weight,
88037                                 PropertyId::NonCustom(LonghandId::FontWeight.into())],
88038                            [FontWeight, SetFontWeight,
88039                             PropertyId::NonCustom(LonghandId::FontWeight.into())],
88040                                [Grid_auto_flow, SetGrid_auto_flow,
88041                                 PropertyId::NonCustom(LonghandId::GridAutoFlow.into())],
88042                            [GridAutoFlow, SetGridAutoFlow,
88043                             PropertyId::NonCustom(LonghandId::GridAutoFlow.into())],
88044                                [Image_rendering, SetImage_rendering,
88045                                 PropertyId::NonCustom(LonghandId::ImageRendering.into())],
88046                            [ImageRendering, SetImageRendering,
88047                             PropertyId::NonCustom(LonghandId::ImageRendering.into())],
88048                            [Isolation, SetIsolation,
88049                             PropertyId::NonCustom(LonghandId::Isolation.into())],
88050                                [Justify_content, SetJustify_content,
88051                                 PropertyId::NonCustom(LonghandId::JustifyContent.into())],
88052                            [JustifyContent, SetJustifyContent,
88053                             PropertyId::NonCustom(LonghandId::JustifyContent.into())],
88054                                [Justify_items, SetJustify_items,
88055                                 PropertyId::NonCustom(LonghandId::JustifyItems.into())],
88056                            [JustifyItems, SetJustifyItems,
88057                             PropertyId::NonCustom(LonghandId::JustifyItems.into())],
88058                                [Justify_self, SetJustify_self,
88059                                 PropertyId::NonCustom(LonghandId::JustifySelf.into())],
88060                            [JustifySelf, SetJustifySelf,
88061                             PropertyId::NonCustom(LonghandId::JustifySelf.into())],
88062                                [List_style_position, SetList_style_position,
88063                                 PropertyId::NonCustom(LonghandId::ListStylePosition.into())],
88064                            [ListStylePosition, SetListStylePosition,
88065                             PropertyId::NonCustom(LonghandId::ListStylePosition.into())],
88066                                [List_style_type, SetList_style_type,
88067                                 PropertyId::NonCustom(LonghandId::ListStyleType.into())],
88068                            [ListStyleType, SetListStyleType,
88069                             PropertyId::NonCustom(LonghandId::ListStyleType.into())],
88070                                [Mix_blend_mode, SetMix_blend_mode,
88071                                 PropertyId::NonCustom(LonghandId::MixBlendMode.into())],
88072                            [MixBlendMode, SetMixBlendMode,
88073                             PropertyId::NonCustom(LonghandId::MixBlendMode.into())],
88074                                [Object_fit, SetObject_fit,
88075                                 PropertyId::NonCustom(LonghandId::ObjectFit.into())],
88076                            [ObjectFit, SetObjectFit,
88077                             PropertyId::NonCustom(LonghandId::ObjectFit.into())],
88078                            [Opacity, SetOpacity,
88079                             PropertyId::NonCustom(LonghandId::Opacity.into())],
88080                            [Order, SetOrder,
88081                             PropertyId::NonCustom(LonghandId::Order.into())],
88082                                [Outline_style, SetOutline_style,
88083                                 PropertyId::NonCustom(LonghandId::OutlineStyle.into())],
88084                            [OutlineStyle, SetOutlineStyle,
88085                             PropertyId::NonCustom(LonghandId::OutlineStyle.into())],
88086                                [Overflow_wrap, SetOverflow_wrap,
88087                                 PropertyId::NonCustom(LonghandId::OverflowWrap.into())],
88088                            [OverflowWrap, SetOverflowWrap,
88089                             PropertyId::NonCustom(LonghandId::OverflowWrap.into())],
88090                                [Word_wrap, SetWord_wrap,
88091                                 PropertyId::NonCustom(LonghandId::OverflowWrap.into())],
88092                            [WordWrap, SetWordWrap,
88093                             PropertyId::NonCustom(LonghandId::OverflowWrap.into())],
88094                                [Pointer_events, SetPointer_events,
88095                                 PropertyId::NonCustom(LonghandId::PointerEvents.into())],
88096                            [PointerEvents, SetPointerEvents,
88097                             PropertyId::NonCustom(LonghandId::PointerEvents.into())],
88098                            [Position, SetPosition,
88099                             PropertyId::NonCustom(LonghandId::Position.into())],
88100                                [Table_layout, SetTable_layout,
88101                                 PropertyId::NonCustom(LonghandId::TableLayout.into())],
88102                            [TableLayout, SetTableLayout,
88103                             PropertyId::NonCustom(LonghandId::TableLayout.into())],
88104                                [Text_align, SetText_align,
88105                                 PropertyId::NonCustom(LonghandId::TextAlign.into())],
88106                            [TextAlign, SetTextAlign,
88107                             PropertyId::NonCustom(LonghandId::TextAlign.into())],
88108                                [Text_align_last, SetText_align_last,
88109                                 PropertyId::NonCustom(LonghandId::TextAlignLast.into())],
88110                            [TextAlignLast, SetTextAlignLast,
88111                             PropertyId::NonCustom(LonghandId::TextAlignLast.into())],
88112                                [Text_decoration_line, SetText_decoration_line,
88113                                 PropertyId::NonCustom(LonghandId::TextDecorationLine.into())],
88114                            [TextDecorationLine, SetTextDecorationLine,
88115                             PropertyId::NonCustom(LonghandId::TextDecorationLine.into())],
88116                                [Text_decoration_style, SetText_decoration_style,
88117                                 PropertyId::NonCustom(LonghandId::TextDecorationStyle.into())],
88118                            [TextDecorationStyle, SetTextDecorationStyle,
88119                             PropertyId::NonCustom(LonghandId::TextDecorationStyle.into())],
88120                                [Text_justify, SetText_justify,
88121                                 PropertyId::NonCustom(LonghandId::TextJustify.into())],
88122                            [TextJustify, SetTextJustify,
88123                             PropertyId::NonCustom(LonghandId::TextJustify.into())],
88124                                [Text_rendering, SetText_rendering,
88125                                 PropertyId::NonCustom(LonghandId::TextRendering.into())],
88126                            [TextRendering, SetTextRendering,
88127                             PropertyId::NonCustom(LonghandId::TextRendering.into())],
88128                                [Text_transform, SetText_transform,
88129                                 PropertyId::NonCustom(LonghandId::TextTransform.into())],
88130                            [TextTransform, SetTextTransform,
88131                             PropertyId::NonCustom(LonghandId::TextTransform.into())],
88132                                [Text_wrap_mode, SetText_wrap_mode,
88133                                 PropertyId::NonCustom(LonghandId::TextWrapMode.into())],
88134                            [TextWrapMode, SetTextWrapMode,
88135                             PropertyId::NonCustom(LonghandId::TextWrapMode.into())],
88136                                [Transform_style, SetTransform_style,
88137                                 PropertyId::NonCustom(LonghandId::TransformStyle.into())],
88138                            [TransformStyle, SetTransformStyle,
88139                             PropertyId::NonCustom(LonghandId::TransformStyle.into())],
88140                                [Unicode_bidi, SetUnicode_bidi,
88141                                 PropertyId::NonCustom(LonghandId::UnicodeBidi.into())],
88142                            [UnicodeBidi, SetUnicodeBidi,
88143                             PropertyId::NonCustom(LonghandId::UnicodeBidi.into())],
88144                            [Visibility, SetVisibility,
88145                             PropertyId::NonCustom(LonghandId::Visibility.into())],
88146                                [White_space_collapse, SetWhite_space_collapse,
88147                                 PropertyId::NonCustom(LonghandId::WhiteSpaceCollapse.into())],
88148                            [WhiteSpaceCollapse, SetWhiteSpaceCollapse,
88149                             PropertyId::NonCustom(LonghandId::WhiteSpaceCollapse.into())],
88150                                [Word_break, SetWord_break,
88151                                 PropertyId::NonCustom(LonghandId::WordBreak.into())],
88152                            [WordBreak, SetWordBreak,
88153                             PropertyId::NonCustom(LonghandId::WordBreak.into())],
88154                                [Writing_mode, SetWriting_mode,
88155                                 PropertyId::NonCustom(LonghandId::WritingMode.into())],
88156                            [WritingMode, SetWritingMode,
88157                             PropertyId::NonCustom(LonghandId::WritingMode.into())],
88158                                [Z_index, SetZ_index,
88159                                 PropertyId::NonCustom(LonghandId::ZIndex.into())],
88160                            [ZIndex, SetZIndex,
88161                             PropertyId::NonCustom(LonghandId::ZIndex.into())],
88162                                [Flex_grow, SetFlex_grow,
88163                                 PropertyId::NonCustom(LonghandId::FlexGrow.into())],
88164                            [FlexGrow, SetFlexGrow,
88165                             PropertyId::NonCustom(LonghandId::FlexGrow.into())],
88166                                [Flex_shrink, SetFlex_shrink,
88167                                 PropertyId::NonCustom(LonghandId::FlexShrink.into())],
88168                            [FlexShrink, SetFlexShrink,
88169                             PropertyId::NonCustom(LonghandId::FlexShrink.into())],
88170                                [Overflow_block, SetOverflow_block,
88171                                 PropertyId::NonCustom(LonghandId::OverflowBlock.into())],
88172                            [OverflowBlock, SetOverflowBlock,
88173                             PropertyId::NonCustom(LonghandId::OverflowBlock.into())],
88174                                [Overflow_inline, SetOverflow_inline,
88175                                 PropertyId::NonCustom(LonghandId::OverflowInline.into())],
88176                            [OverflowInline, SetOverflowInline,
88177                             PropertyId::NonCustom(LonghandId::OverflowInline.into())],
88178                                [Overflow_x, SetOverflow_x,
88179                                 PropertyId::NonCustom(LonghandId::OverflowX.into())],
88180                            [OverflowX, SetOverflowX,
88181                             PropertyId::NonCustom(LonghandId::OverflowX.into())],
88182                                [Overflow_y, SetOverflow_y,
88183                                 PropertyId::NonCustom(LonghandId::OverflowY.into())],
88184                            [OverflowY, SetOverflowY,
88185                             PropertyId::NonCustom(LonghandId::OverflowY.into())],
88186                                [Border_block_end_style, SetBorder_block_end_style,
88187                                 PropertyId::NonCustom(LonghandId::BorderBlockEndStyle.into())],
88188                            [BorderBlockEndStyle, SetBorderBlockEndStyle,
88189                             PropertyId::NonCustom(LonghandId::BorderBlockEndStyle.into())],
88190                                [Border_block_start_style, SetBorder_block_start_style,
88191                                 PropertyId::NonCustom(LonghandId::BorderBlockStartStyle.into())],
88192                            [BorderBlockStartStyle, SetBorderBlockStartStyle,
88193                             PropertyId::NonCustom(LonghandId::BorderBlockStartStyle.into())],
88194                                [Border_bottom_style, SetBorder_bottom_style,
88195                                 PropertyId::NonCustom(LonghandId::BorderBottomStyle.into())],
88196                            [BorderBottomStyle, SetBorderBottomStyle,
88197                             PropertyId::NonCustom(LonghandId::BorderBottomStyle.into())],
88198                                [Border_inline_end_style, SetBorder_inline_end_style,
88199                                 PropertyId::NonCustom(LonghandId::BorderInlineEndStyle.into())],
88200                            [BorderInlineEndStyle, SetBorderInlineEndStyle,
88201                             PropertyId::NonCustom(LonghandId::BorderInlineEndStyle.into())],
88202                                [Border_inline_start_style, SetBorder_inline_start_style,
88203                                 PropertyId::NonCustom(LonghandId::BorderInlineStartStyle.into())],
88204                            [BorderInlineStartStyle, SetBorderInlineStartStyle,
88205                             PropertyId::NonCustom(LonghandId::BorderInlineStartStyle.into())],
88206                                [Border_left_style, SetBorder_left_style,
88207                                 PropertyId::NonCustom(LonghandId::BorderLeftStyle.into())],
88208                            [BorderLeftStyle, SetBorderLeftStyle,
88209                             PropertyId::NonCustom(LonghandId::BorderLeftStyle.into())],
88210                                [Border_right_style, SetBorder_right_style,
88211                                 PropertyId::NonCustom(LonghandId::BorderRightStyle.into())],
88212                            [BorderRightStyle, SetBorderRightStyle,
88213                             PropertyId::NonCustom(LonghandId::BorderRightStyle.into())],
88214                                [Border_top_style, SetBorder_top_style,
88215                                 PropertyId::NonCustom(LonghandId::BorderTopStyle.into())],
88216                            [BorderTopStyle, SetBorderTopStyle,
88217                             PropertyId::NonCustom(LonghandId::BorderTopStyle.into())],
88218                                [Animation_composition, SetAnimation_composition,
88219                                 PropertyId::NonCustom(LonghandId::AnimationComposition.into())],
88220                            [AnimationComposition, SetAnimationComposition,
88221                             PropertyId::NonCustom(LonghandId::AnimationComposition.into())],
88222                                [Animation_delay, SetAnimation_delay,
88223                                 PropertyId::NonCustom(LonghandId::AnimationDelay.into())],
88224                            [AnimationDelay, SetAnimationDelay,
88225                             PropertyId::NonCustom(LonghandId::AnimationDelay.into())],
88226                                [Animation_direction, SetAnimation_direction,
88227                                 PropertyId::NonCustom(LonghandId::AnimationDirection.into())],
88228                            [AnimationDirection, SetAnimationDirection,
88229                             PropertyId::NonCustom(LonghandId::AnimationDirection.into())],
88230                                [Animation_duration, SetAnimation_duration,
88231                                 PropertyId::NonCustom(LonghandId::AnimationDuration.into())],
88232                            [AnimationDuration, SetAnimationDuration,
88233                             PropertyId::NonCustom(LonghandId::AnimationDuration.into())],
88234                                [Animation_fill_mode, SetAnimation_fill_mode,
88235                                 PropertyId::NonCustom(LonghandId::AnimationFillMode.into())],
88236                            [AnimationFillMode, SetAnimationFillMode,
88237                             PropertyId::NonCustom(LonghandId::AnimationFillMode.into())],
88238                                [Animation_iteration_count, SetAnimation_iteration_count,
88239                                 PropertyId::NonCustom(LonghandId::AnimationIterationCount.into())],
88240                            [AnimationIterationCount, SetAnimationIterationCount,
88241                             PropertyId::NonCustom(LonghandId::AnimationIterationCount.into())],
88242                                [Animation_name, SetAnimation_name,
88243                                 PropertyId::NonCustom(LonghandId::AnimationName.into())],
88244                            [AnimationName, SetAnimationName,
88245                             PropertyId::NonCustom(LonghandId::AnimationName.into())],
88246                                [Animation_play_state, SetAnimation_play_state,
88247                                 PropertyId::NonCustom(LonghandId::AnimationPlayState.into())],
88248                            [AnimationPlayState, SetAnimationPlayState,
88249                             PropertyId::NonCustom(LonghandId::AnimationPlayState.into())],
88250                                [Animation_timeline, SetAnimation_timeline,
88251                                 PropertyId::NonCustom(LonghandId::AnimationTimeline.into())],
88252                            [AnimationTimeline, SetAnimationTimeline,
88253                             PropertyId::NonCustom(LonghandId::AnimationTimeline.into())],
88254                                [Animation_timing_function, SetAnimation_timing_function,
88255                                 PropertyId::NonCustom(LonghandId::AnimationTimingFunction.into())],
88256                            [AnimationTimingFunction, SetAnimationTimingFunction,
88257                             PropertyId::NonCustom(LonghandId::AnimationTimingFunction.into())],
88258                                [Backdrop_filter, SetBackdrop_filter,
88259                                 PropertyId::NonCustom(LonghandId::BackdropFilter.into())],
88260                            [BackdropFilter, SetBackdropFilter,
88261                             PropertyId::NonCustom(LonghandId::BackdropFilter.into())],
88262                                [Background_attachment, SetBackground_attachment,
88263                                 PropertyId::NonCustom(LonghandId::BackgroundAttachment.into())],
88264                            [BackgroundAttachment, SetBackgroundAttachment,
88265                             PropertyId::NonCustom(LonghandId::BackgroundAttachment.into())],
88266                                [Background_clip, SetBackground_clip,
88267                                 PropertyId::NonCustom(LonghandId::BackgroundClip.into())],
88268                            [BackgroundClip, SetBackgroundClip,
88269                             PropertyId::NonCustom(LonghandId::BackgroundClip.into())],
88270                                [Background_image, SetBackground_image,
88271                                 PropertyId::NonCustom(LonghandId::BackgroundImage.into())],
88272                            [BackgroundImage, SetBackgroundImage,
88273                             PropertyId::NonCustom(LonghandId::BackgroundImage.into())],
88274                                [Background_origin, SetBackground_origin,
88275                                 PropertyId::NonCustom(LonghandId::BackgroundOrigin.into())],
88276                            [BackgroundOrigin, SetBackgroundOrigin,
88277                             PropertyId::NonCustom(LonghandId::BackgroundOrigin.into())],
88278                                [Background_position_x, SetBackground_position_x,
88279                                 PropertyId::NonCustom(LonghandId::BackgroundPositionX.into())],
88280                            [BackgroundPositionX, SetBackgroundPositionX,
88281                             PropertyId::NonCustom(LonghandId::BackgroundPositionX.into())],
88282                                [Background_position_y, SetBackground_position_y,
88283                                 PropertyId::NonCustom(LonghandId::BackgroundPositionY.into())],
88284                            [BackgroundPositionY, SetBackgroundPositionY,
88285                             PropertyId::NonCustom(LonghandId::BackgroundPositionY.into())],
88286                                [Background_repeat, SetBackground_repeat,
88287                                 PropertyId::NonCustom(LonghandId::BackgroundRepeat.into())],
88288                            [BackgroundRepeat, SetBackgroundRepeat,
88289                             PropertyId::NonCustom(LonghandId::BackgroundRepeat.into())],
88290                                [Background_size, SetBackground_size,
88291                                 PropertyId::NonCustom(LonghandId::BackgroundSize.into())],
88292                            [BackgroundSize, SetBackgroundSize,
88293                             PropertyId::NonCustom(LonghandId::BackgroundSize.into())],
88294                                [Border_image_outset, SetBorder_image_outset,
88295                                 PropertyId::NonCustom(LonghandId::BorderImageOutset.into())],
88296                            [BorderImageOutset, SetBorderImageOutset,
88297                             PropertyId::NonCustom(LonghandId::BorderImageOutset.into())],
88298                                [Border_image_slice, SetBorder_image_slice,
88299                                 PropertyId::NonCustom(LonghandId::BorderImageSlice.into())],
88300                            [BorderImageSlice, SetBorderImageSlice,
88301                             PropertyId::NonCustom(LonghandId::BorderImageSlice.into())],
88302                                [Border_image_width, SetBorder_image_width,
88303                                 PropertyId::NonCustom(LonghandId::BorderImageWidth.into())],
88304                            [BorderImageWidth, SetBorderImageWidth,
88305                             PropertyId::NonCustom(LonghandId::BorderImageWidth.into())],
88306                                [Border_spacing, SetBorder_spacing,
88307                                 PropertyId::NonCustom(LonghandId::BorderSpacing.into())],
88308                            [BorderSpacing, SetBorderSpacing,
88309                             PropertyId::NonCustom(LonghandId::BorderSpacing.into())],
88310                                [Box_shadow, SetBox_shadow,
88311                                 PropertyId::NonCustom(LonghandId::BoxShadow.into())],
88312                            [BoxShadow, SetBoxShadow,
88313                             PropertyId::NonCustom(LonghandId::BoxShadow.into())],
88314                            [Clip, SetClip,
88315                             PropertyId::NonCustom(LonghandId::Clip.into())],
88316                                [Clip_path, SetClip_path,
88317                                 PropertyId::NonCustom(LonghandId::ClipPath.into())],
88318                            [ClipPath, SetClipPath,
88319                             PropertyId::NonCustom(LonghandId::ClipPath.into())],
88320                            [Color, SetColor,
88321                             PropertyId::NonCustom(LonghandId::Color.into())],
88322                                [Color_scheme, SetColor_scheme,
88323                                 PropertyId::NonCustom(LonghandId::ColorScheme.into())],
88324                            [ColorScheme, SetColorScheme,
88325                             PropertyId::NonCustom(LonghandId::ColorScheme.into())],
88326                                [Column_width, SetColumn_width,
88327                                 PropertyId::NonCustom(LonghandId::ColumnWidth.into())],
88328                            [ColumnWidth, SetColumnWidth,
88329                             PropertyId::NonCustom(LonghandId::ColumnWidth.into())],
88330                                [Container_name, SetContainer_name,
88331                                 PropertyId::NonCustom(LonghandId::ContainerName.into())],
88332                            [ContainerName, SetContainerName,
88333                             PropertyId::NonCustom(LonghandId::ContainerName.into())],
88334                            [Content, SetContent,
88335                             PropertyId::NonCustom(LonghandId::Content.into())],
88336                                [Counter_increment, SetCounter_increment,
88337                                 PropertyId::NonCustom(LonghandId::CounterIncrement.into())],
88338                            [CounterIncrement, SetCounterIncrement,
88339                             PropertyId::NonCustom(LonghandId::CounterIncrement.into())],
88340                                [Counter_reset, SetCounter_reset,
88341                                 PropertyId::NonCustom(LonghandId::CounterReset.into())],
88342                            [CounterReset, SetCounterReset,
88343                             PropertyId::NonCustom(LonghandId::CounterReset.into())],
88344                            [Cursor, SetCursor,
88345                             PropertyId::NonCustom(LonghandId::Cursor.into())],
88346                            [Filter, SetFilter,
88347                             PropertyId::NonCustom(LonghandId::Filter.into())],
88348                                [Flex_basis, SetFlex_basis,
88349                                 PropertyId::NonCustom(LonghandId::FlexBasis.into())],
88350                            [FlexBasis, SetFlexBasis,
88351                             PropertyId::NonCustom(LonghandId::FlexBasis.into())],
88352                                [Font_family, SetFont_family,
88353                                 PropertyId::NonCustom(LonghandId::FontFamily.into())],
88354                            [FontFamily, SetFontFamily,
88355                             PropertyId::NonCustom(LonghandId::FontFamily.into())],
88356                                [Font_size, SetFont_size,
88357                                 PropertyId::NonCustom(LonghandId::FontSize.into())],
88358                            [FontSize, SetFontSize,
88359                             PropertyId::NonCustom(LonghandId::FontSize.into())],
88360                                [Font_variation_settings, SetFont_variation_settings,
88361                                 PropertyId::NonCustom(LonghandId::FontVariationSettings.into())],
88362                            [FontVariationSettings, SetFontVariationSettings,
88363                             PropertyId::NonCustom(LonghandId::FontVariationSettings.into())],
88364                                [Grid_template_areas, SetGrid_template_areas,
88365                                 PropertyId::NonCustom(LonghandId::GridTemplateAreas.into())],
88366                            [GridTemplateAreas, SetGridTemplateAreas,
88367                             PropertyId::NonCustom(LonghandId::GridTemplateAreas.into())],
88368                                [Letter_spacing, SetLetter_spacing,
88369                                 PropertyId::NonCustom(LonghandId::LetterSpacing.into())],
88370                            [LetterSpacing, SetLetterSpacing,
88371                             PropertyId::NonCustom(LonghandId::LetterSpacing.into())],
88372                                [Line_height, SetLine_height,
88373                                 PropertyId::NonCustom(LonghandId::LineHeight.into())],
88374                            [LineHeight, SetLineHeight,
88375                             PropertyId::NonCustom(LonghandId::LineHeight.into())],
88376                                [Mask_image, SetMask_image,
88377                                 PropertyId::NonCustom(LonghandId::MaskImage.into())],
88378                            [MaskImage, SetMaskImage,
88379                             PropertyId::NonCustom(LonghandId::MaskImage.into())],
88380                                [Offset_path, SetOffset_path,
88381                                 PropertyId::NonCustom(LonghandId::OffsetPath.into())],
88382                            [OffsetPath, SetOffsetPath,
88383                             PropertyId::NonCustom(LonghandId::OffsetPath.into())],
88384                            [Perspective, SetPerspective,
88385                             PropertyId::NonCustom(LonghandId::Perspective.into())],
88386                            [Quotes, SetQuotes,
88387                             PropertyId::NonCustom(LonghandId::Quotes.into())],
88388                            [Rotate, SetRotate,
88389                             PropertyId::NonCustom(LonghandId::Rotate.into())],
88390                            [Scale, SetScale,
88391                             PropertyId::NonCustom(LonghandId::Scale.into())],
88392                                [Text_indent, SetText_indent,
88393                                 PropertyId::NonCustom(LonghandId::TextIndent.into())],
88394                            [TextIndent, SetTextIndent,
88395                             PropertyId::NonCustom(LonghandId::TextIndent.into())],
88396                                [Text_overflow, SetText_overflow,
88397                                 PropertyId::NonCustom(LonghandId::TextOverflow.into())],
88398                            [TextOverflow, SetTextOverflow,
88399                             PropertyId::NonCustom(LonghandId::TextOverflow.into())],
88400                                [Text_shadow, SetText_shadow,
88401                                 PropertyId::NonCustom(LonghandId::TextShadow.into())],
88402                            [TextShadow, SetTextShadow,
88403                             PropertyId::NonCustom(LonghandId::TextShadow.into())],
88404                            [Transform, SetTransform,
88405                             PropertyId::NonCustom(LonghandId::Transform.into())],
88406                                [Transform_origin, SetTransform_origin,
88407                                 PropertyId::NonCustom(LonghandId::TransformOrigin.into())],
88408                            [TransformOrigin, SetTransformOrigin,
88409                             PropertyId::NonCustom(LonghandId::TransformOrigin.into())],
88410                                [Transition_behavior, SetTransition_behavior,
88411                                 PropertyId::NonCustom(LonghandId::TransitionBehavior.into())],
88412                            [TransitionBehavior, SetTransitionBehavior,
88413                             PropertyId::NonCustom(LonghandId::TransitionBehavior.into())],
88414                                [Transition_delay, SetTransition_delay,
88415                                 PropertyId::NonCustom(LonghandId::TransitionDelay.into())],
88416                            [TransitionDelay, SetTransitionDelay,
88417                             PropertyId::NonCustom(LonghandId::TransitionDelay.into())],
88418                                [Transition_duration, SetTransition_duration,
88419                                 PropertyId::NonCustom(LonghandId::TransitionDuration.into())],
88420                            [TransitionDuration, SetTransitionDuration,
88421                             PropertyId::NonCustom(LonghandId::TransitionDuration.into())],
88422                                [Transition_property, SetTransition_property,
88423                                 PropertyId::NonCustom(LonghandId::TransitionProperty.into())],
88424                            [TransitionProperty, SetTransitionProperty,
88425                             PropertyId::NonCustom(LonghandId::TransitionProperty.into())],
88426                                [Transition_timing_function, SetTransition_timing_function,
88427                                 PropertyId::NonCustom(LonghandId::TransitionTimingFunction.into())],
88428                            [TransitionTimingFunction, SetTransitionTimingFunction,
88429                             PropertyId::NonCustom(LonghandId::TransitionTimingFunction.into())],
88430                            [Translate, SetTranslate,
88431                             PropertyId::NonCustom(LonghandId::Translate.into())],
88432                                [Vertical_align, SetVertical_align,
88433                                 PropertyId::NonCustom(LonghandId::VerticalAlign.into())],
88434                            [VerticalAlign, SetVerticalAlign,
88435                             PropertyId::NonCustom(LonghandId::VerticalAlign.into())],
88436                                [Will_change, SetWill_change,
88437                                 PropertyId::NonCustom(LonghandId::WillChange.into())],
88438                            [WillChange, SetWillChange,
88439                             PropertyId::NonCustom(LonghandId::WillChange.into())],
88440                                [Word_spacing, SetWord_spacing,
88441                                 PropertyId::NonCustom(LonghandId::WordSpacing.into())],
88442                            [WordSpacing, SetWordSpacing,
88443                             PropertyId::NonCustom(LonghandId::WordSpacing.into())],
88444                                [Object_position, SetObject_position,
88445                                 PropertyId::NonCustom(LonghandId::ObjectPosition.into())],
88446                            [ObjectPosition, SetObjectPosition,
88447                             PropertyId::NonCustom(LonghandId::ObjectPosition.into())],
88448                                [Perspective_origin, SetPerspective_origin,
88449                                 PropertyId::NonCustom(LonghandId::PerspectiveOrigin.into())],
88450                            [PerspectiveOrigin, SetPerspectiveOrigin,
88451                             PropertyId::NonCustom(LonghandId::PerspectiveOrigin.into())],
88452                                [Grid_template_columns, SetGrid_template_columns,
88453                                 PropertyId::NonCustom(LonghandId::GridTemplateColumns.into())],
88454                            [GridTemplateColumns, SetGridTemplateColumns,
88455                             PropertyId::NonCustom(LonghandId::GridTemplateColumns.into())],
88456                                [Grid_template_rows, SetGrid_template_rows,
88457                                 PropertyId::NonCustom(LonghandId::GridTemplateRows.into())],
88458                            [GridTemplateRows, SetGridTemplateRows,
88459                             PropertyId::NonCustom(LonghandId::GridTemplateRows.into())],
88460                                [Border_image_source, SetBorder_image_source,
88461                                 PropertyId::NonCustom(LonghandId::BorderImageSource.into())],
88462                            [BorderImageSource, SetBorderImageSource,
88463                             PropertyId::NonCustom(LonghandId::BorderImageSource.into())],
88464                                [List_style_image, SetList_style_image,
88465                                 PropertyId::NonCustom(LonghandId::ListStyleImage.into())],
88466                            [ListStyleImage, SetListStyleImage,
88467                             PropertyId::NonCustom(LonghandId::ListStyleImage.into())],
88468                                [Grid_auto_columns, SetGrid_auto_columns,
88469                                 PropertyId::NonCustom(LonghandId::GridAutoColumns.into())],
88470                            [GridAutoColumns, SetGridAutoColumns,
88471                             PropertyId::NonCustom(LonghandId::GridAutoColumns.into())],
88472                                [Grid_auto_rows, SetGrid_auto_rows,
88473                                 PropertyId::NonCustom(LonghandId::GridAutoRows.into())],
88474                            [GridAutoRows, SetGridAutoRows,
88475                             PropertyId::NonCustom(LonghandId::GridAutoRows.into())],
88476                                [Outline_offset, SetOutline_offset,
88477                                 PropertyId::NonCustom(LonghandId::OutlineOffset.into())],
88478                            [OutlineOffset, SetOutlineOffset,
88479                             PropertyId::NonCustom(LonghandId::OutlineOffset.into())],
88480                                [Overflow_clip_margin, SetOverflow_clip_margin,
88481                                 PropertyId::NonCustom(LonghandId::OverflowClipMargin.into())],
88482                            [OverflowClipMargin, SetOverflowClipMargin,
88483                             PropertyId::NonCustom(LonghandId::OverflowClipMargin.into())],
88484                                [Column_gap, SetColumn_gap,
88485                                 PropertyId::NonCustom(LonghandId::ColumnGap.into())],
88486                            [ColumnGap, SetColumnGap,
88487                             PropertyId::NonCustom(LonghandId::ColumnGap.into())],
88488                                [Grid_column_gap, SetGrid_column_gap,
88489                                 PropertyId::NonCustom(LonghandId::ColumnGap.into())],
88490                            [GridColumnGap, SetGridColumnGap,
88491                             PropertyId::NonCustom(LonghandId::ColumnGap.into())],
88492                                [Row_gap, SetRow_gap,
88493                                 PropertyId::NonCustom(LonghandId::RowGap.into())],
88494                            [RowGap, SetRowGap,
88495                             PropertyId::NonCustom(LonghandId::RowGap.into())],
88496                                [Grid_row_gap, SetGrid_row_gap,
88497                                 PropertyId::NonCustom(LonghandId::RowGap.into())],
88498                            [GridRowGap, SetGridRowGap,
88499                             PropertyId::NonCustom(LonghandId::RowGap.into())],
88500                                [Grid_column_end, SetGrid_column_end,
88501                                 PropertyId::NonCustom(LonghandId::GridColumnEnd.into())],
88502                            [GridColumnEnd, SetGridColumnEnd,
88503                             PropertyId::NonCustom(LonghandId::GridColumnEnd.into())],
88504                                [Grid_column_start, SetGrid_column_start,
88505                                 PropertyId::NonCustom(LonghandId::GridColumnStart.into())],
88506                            [GridColumnStart, SetGridColumnStart,
88507                             PropertyId::NonCustom(LonghandId::GridColumnStart.into())],
88508                                [Grid_row_end, SetGrid_row_end,
88509                                 PropertyId::NonCustom(LonghandId::GridRowEnd.into())],
88510                            [GridRowEnd, SetGridRowEnd,
88511                             PropertyId::NonCustom(LonghandId::GridRowEnd.into())],
88512                                [Grid_row_start, SetGrid_row_start,
88513                                 PropertyId::NonCustom(LonghandId::GridRowStart.into())],
88514                            [GridRowStart, SetGridRowStart,
88515                             PropertyId::NonCustom(LonghandId::GridRowStart.into())],
88516                                [Max_block_size, SetMax_block_size,
88517                                 PropertyId::NonCustom(LonghandId::MaxBlockSize.into())],
88518                            [MaxBlockSize, SetMaxBlockSize,
88519                             PropertyId::NonCustom(LonghandId::MaxBlockSize.into())],
88520                                [Max_height, SetMax_height,
88521                                 PropertyId::NonCustom(LonghandId::MaxHeight.into())],
88522                            [MaxHeight, SetMaxHeight,
88523                             PropertyId::NonCustom(LonghandId::MaxHeight.into())],
88524                                [Max_inline_size, SetMax_inline_size,
88525                                 PropertyId::NonCustom(LonghandId::MaxInlineSize.into())],
88526                            [MaxInlineSize, SetMaxInlineSize,
88527                             PropertyId::NonCustom(LonghandId::MaxInlineSize.into())],
88528                                [Max_width, SetMax_width,
88529                                 PropertyId::NonCustom(LonghandId::MaxWidth.into())],
88530                            [MaxWidth, SetMaxWidth,
88531                             PropertyId::NonCustom(LonghandId::MaxWidth.into())],
88532                                [Border_bottom_left_radius, SetBorder_bottom_left_radius,
88533                                 PropertyId::NonCustom(LonghandId::BorderBottomLeftRadius.into())],
88534                            [BorderBottomLeftRadius, SetBorderBottomLeftRadius,
88535                             PropertyId::NonCustom(LonghandId::BorderBottomLeftRadius.into())],
88536                                [Border_bottom_right_radius, SetBorder_bottom_right_radius,
88537                                 PropertyId::NonCustom(LonghandId::BorderBottomRightRadius.into())],
88538                            [BorderBottomRightRadius, SetBorderBottomRightRadius,
88539                             PropertyId::NonCustom(LonghandId::BorderBottomRightRadius.into())],
88540                                [Border_end_end_radius, SetBorder_end_end_radius,
88541                                 PropertyId::NonCustom(LonghandId::BorderEndEndRadius.into())],
88542                            [BorderEndEndRadius, SetBorderEndEndRadius,
88543                             PropertyId::NonCustom(LonghandId::BorderEndEndRadius.into())],
88544                                [Border_end_start_radius, SetBorder_end_start_radius,
88545                                 PropertyId::NonCustom(LonghandId::BorderEndStartRadius.into())],
88546                            [BorderEndStartRadius, SetBorderEndStartRadius,
88547                             PropertyId::NonCustom(LonghandId::BorderEndStartRadius.into())],
88548                                [Border_start_end_radius, SetBorder_start_end_radius,
88549                                 PropertyId::NonCustom(LonghandId::BorderStartEndRadius.into())],
88550                            [BorderStartEndRadius, SetBorderStartEndRadius,
88551                             PropertyId::NonCustom(LonghandId::BorderStartEndRadius.into())],
88552                                [Border_start_start_radius, SetBorder_start_start_radius,
88553                                 PropertyId::NonCustom(LonghandId::BorderStartStartRadius.into())],
88554                            [BorderStartStartRadius, SetBorderStartStartRadius,
88555                             PropertyId::NonCustom(LonghandId::BorderStartStartRadius.into())],
88556                                [Border_top_left_radius, SetBorder_top_left_radius,
88557                                 PropertyId::NonCustom(LonghandId::BorderTopLeftRadius.into())],
88558                            [BorderTopLeftRadius, SetBorderTopLeftRadius,
88559                             PropertyId::NonCustom(LonghandId::BorderTopLeftRadius.into())],
88560                                [Border_top_right_radius, SetBorder_top_right_radius,
88561                                 PropertyId::NonCustom(LonghandId::BorderTopRightRadius.into())],
88562                            [BorderTopRightRadius, SetBorderTopRightRadius,
88563                             PropertyId::NonCustom(LonghandId::BorderTopRightRadius.into())],
88564                            [Bottom, SetBottom,
88565                             PropertyId::NonCustom(LonghandId::Bottom.into())],
88566                                [Inset_block_end, SetInset_block_end,
88567                                 PropertyId::NonCustom(LonghandId::InsetBlockEnd.into())],
88568                            [InsetBlockEnd, SetInsetBlockEnd,
88569                             PropertyId::NonCustom(LonghandId::InsetBlockEnd.into())],
88570                                [Inset_block_start, SetInset_block_start,
88571                                 PropertyId::NonCustom(LonghandId::InsetBlockStart.into())],
88572                            [InsetBlockStart, SetInsetBlockStart,
88573                             PropertyId::NonCustom(LonghandId::InsetBlockStart.into())],
88574                                [Inset_inline_end, SetInset_inline_end,
88575                                 PropertyId::NonCustom(LonghandId::InsetInlineEnd.into())],
88576                            [InsetInlineEnd, SetInsetInlineEnd,
88577                             PropertyId::NonCustom(LonghandId::InsetInlineEnd.into())],
88578                                [Inset_inline_start, SetInset_inline_start,
88579                                 PropertyId::NonCustom(LonghandId::InsetInlineStart.into())],
88580                            [InsetInlineStart, SetInsetInlineStart,
88581                             PropertyId::NonCustom(LonghandId::InsetInlineStart.into())],
88582                            [Left, SetLeft,
88583                             PropertyId::NonCustom(LonghandId::Left.into())],
88584                            [Right, SetRight,
88585                             PropertyId::NonCustom(LonghandId::Right.into())],
88586                            [Top, SetTop,
88587                             PropertyId::NonCustom(LonghandId::Top.into())],
88588                                [Margin_block_end, SetMargin_block_end,
88589                                 PropertyId::NonCustom(LonghandId::MarginBlockEnd.into())],
88590                            [MarginBlockEnd, SetMarginBlockEnd,
88591                             PropertyId::NonCustom(LonghandId::MarginBlockEnd.into())],
88592                                [Margin_block_start, SetMargin_block_start,
88593                                 PropertyId::NonCustom(LonghandId::MarginBlockStart.into())],
88594                            [MarginBlockStart, SetMarginBlockStart,
88595                             PropertyId::NonCustom(LonghandId::MarginBlockStart.into())],
88596                                [Margin_bottom, SetMargin_bottom,
88597                                 PropertyId::NonCustom(LonghandId::MarginBottom.into())],
88598                            [MarginBottom, SetMarginBottom,
88599                             PropertyId::NonCustom(LonghandId::MarginBottom.into())],
88600                                [Margin_inline_end, SetMargin_inline_end,
88601                                 PropertyId::NonCustom(LonghandId::MarginInlineEnd.into())],
88602                            [MarginInlineEnd, SetMarginInlineEnd,
88603                             PropertyId::NonCustom(LonghandId::MarginInlineEnd.into())],
88604                                [Margin_inline_start, SetMargin_inline_start,
88605                                 PropertyId::NonCustom(LonghandId::MarginInlineStart.into())],
88606                            [MarginInlineStart, SetMarginInlineStart,
88607                             PropertyId::NonCustom(LonghandId::MarginInlineStart.into())],
88608                                [Margin_left, SetMargin_left,
88609                                 PropertyId::NonCustom(LonghandId::MarginLeft.into())],
88610                            [MarginLeft, SetMarginLeft,
88611                             PropertyId::NonCustom(LonghandId::MarginLeft.into())],
88612                                [Margin_right, SetMargin_right,
88613                                 PropertyId::NonCustom(LonghandId::MarginRight.into())],
88614                            [MarginRight, SetMarginRight,
88615                             PropertyId::NonCustom(LonghandId::MarginRight.into())],
88616                                [Margin_top, SetMargin_top,
88617                                 PropertyId::NonCustom(LonghandId::MarginTop.into())],
88618                            [MarginTop, SetMarginTop,
88619                             PropertyId::NonCustom(LonghandId::MarginTop.into())],
88620                                [Padding_block_end, SetPadding_block_end,
88621                                 PropertyId::NonCustom(LonghandId::PaddingBlockEnd.into())],
88622                            [PaddingBlockEnd, SetPaddingBlockEnd,
88623                             PropertyId::NonCustom(LonghandId::PaddingBlockEnd.into())],
88624                                [Padding_block_start, SetPadding_block_start,
88625                                 PropertyId::NonCustom(LonghandId::PaddingBlockStart.into())],
88626                            [PaddingBlockStart, SetPaddingBlockStart,
88627                             PropertyId::NonCustom(LonghandId::PaddingBlockStart.into())],
88628                                [Padding_bottom, SetPadding_bottom,
88629                                 PropertyId::NonCustom(LonghandId::PaddingBottom.into())],
88630                            [PaddingBottom, SetPaddingBottom,
88631                             PropertyId::NonCustom(LonghandId::PaddingBottom.into())],
88632                                [Padding_inline_end, SetPadding_inline_end,
88633                                 PropertyId::NonCustom(LonghandId::PaddingInlineEnd.into())],
88634                            [PaddingInlineEnd, SetPaddingInlineEnd,
88635                             PropertyId::NonCustom(LonghandId::PaddingInlineEnd.into())],
88636                                [Padding_inline_start, SetPadding_inline_start,
88637                                 PropertyId::NonCustom(LonghandId::PaddingInlineStart.into())],
88638                            [PaddingInlineStart, SetPaddingInlineStart,
88639                             PropertyId::NonCustom(LonghandId::PaddingInlineStart.into())],
88640                                [Padding_left, SetPadding_left,
88641                                 PropertyId::NonCustom(LonghandId::PaddingLeft.into())],
88642                            [PaddingLeft, SetPaddingLeft,
88643                             PropertyId::NonCustom(LonghandId::PaddingLeft.into())],
88644                                [Padding_right, SetPadding_right,
88645                                 PropertyId::NonCustom(LonghandId::PaddingRight.into())],
88646                            [PaddingRight, SetPaddingRight,
88647                             PropertyId::NonCustom(LonghandId::PaddingRight.into())],
88648                                [Padding_top, SetPadding_top,
88649                                 PropertyId::NonCustom(LonghandId::PaddingTop.into())],
88650                            [PaddingTop, SetPaddingTop,
88651                             PropertyId::NonCustom(LonghandId::PaddingTop.into())],
88652                                [Block_size, SetBlock_size,
88653                                 PropertyId::NonCustom(LonghandId::BlockSize.into())],
88654                            [BlockSize, SetBlockSize,
88655                             PropertyId::NonCustom(LonghandId::BlockSize.into())],
88656                            [Height, SetHeight,
88657                             PropertyId::NonCustom(LonghandId::Height.into())],
88658                                [Inline_size, SetInline_size,
88659                                 PropertyId::NonCustom(LonghandId::InlineSize.into())],
88660                            [InlineSize, SetInlineSize,
88661                             PropertyId::NonCustom(LonghandId::InlineSize.into())],
88662                                [Min_block_size, SetMin_block_size,
88663                                 PropertyId::NonCustom(LonghandId::MinBlockSize.into())],
88664                            [MinBlockSize, SetMinBlockSize,
88665                             PropertyId::NonCustom(LonghandId::MinBlockSize.into())],
88666                                [Min_height, SetMin_height,
88667                                 PropertyId::NonCustom(LonghandId::MinHeight.into())],
88668                            [MinHeight, SetMinHeight,
88669                             PropertyId::NonCustom(LonghandId::MinHeight.into())],
88670                                [Min_inline_size, SetMin_inline_size,
88671                                 PropertyId::NonCustom(LonghandId::MinInlineSize.into())],
88672                            [MinInlineSize, SetMinInlineSize,
88673                             PropertyId::NonCustom(LonghandId::MinInlineSize.into())],
88674                                [Min_width, SetMin_width,
88675                                 PropertyId::NonCustom(LonghandId::MinWidth.into())],
88676                            [MinWidth, SetMinWidth,
88677                             PropertyId::NonCustom(LonghandId::MinWidth.into())],
88678                            [Width, SetWidth,
88679                             PropertyId::NonCustom(LonghandId::Width.into())],
88680                                [Border_block_end_width, SetBorder_block_end_width,
88681                                 PropertyId::NonCustom(LonghandId::BorderBlockEndWidth.into())],
88682                            [BorderBlockEndWidth, SetBorderBlockEndWidth,
88683                             PropertyId::NonCustom(LonghandId::BorderBlockEndWidth.into())],
88684                                [Border_block_start_width, SetBorder_block_start_width,
88685                                 PropertyId::NonCustom(LonghandId::BorderBlockStartWidth.into())],
88686                            [BorderBlockStartWidth, SetBorderBlockStartWidth,
88687                             PropertyId::NonCustom(LonghandId::BorderBlockStartWidth.into())],
88688                                [Border_bottom_width, SetBorder_bottom_width,
88689                                 PropertyId::NonCustom(LonghandId::BorderBottomWidth.into())],
88690                            [BorderBottomWidth, SetBorderBottomWidth,
88691                             PropertyId::NonCustom(LonghandId::BorderBottomWidth.into())],
88692                                [Border_inline_end_width, SetBorder_inline_end_width,
88693                                 PropertyId::NonCustom(LonghandId::BorderInlineEndWidth.into())],
88694                            [BorderInlineEndWidth, SetBorderInlineEndWidth,
88695                             PropertyId::NonCustom(LonghandId::BorderInlineEndWidth.into())],
88696                                [Border_inline_start_width, SetBorder_inline_start_width,
88697                                 PropertyId::NonCustom(LonghandId::BorderInlineStartWidth.into())],
88698                            [BorderInlineStartWidth, SetBorderInlineStartWidth,
88699                             PropertyId::NonCustom(LonghandId::BorderInlineStartWidth.into())],
88700                                [Border_left_width, SetBorder_left_width,
88701                                 PropertyId::NonCustom(LonghandId::BorderLeftWidth.into())],
88702                            [BorderLeftWidth, SetBorderLeftWidth,
88703                             PropertyId::NonCustom(LonghandId::BorderLeftWidth.into())],
88704                                [Border_right_width, SetBorder_right_width,
88705                                 PropertyId::NonCustom(LonghandId::BorderRightWidth.into())],
88706                            [BorderRightWidth, SetBorderRightWidth,
88707                             PropertyId::NonCustom(LonghandId::BorderRightWidth.into())],
88708                                [Border_top_width, SetBorder_top_width,
88709                                 PropertyId::NonCustom(LonghandId::BorderTopWidth.into())],
88710                            [BorderTopWidth, SetBorderTopWidth,
88711                             PropertyId::NonCustom(LonghandId::BorderTopWidth.into())],
88712                                [Outline_width, SetOutline_width,
88713                                 PropertyId::NonCustom(LonghandId::OutlineWidth.into())],
88714                            [OutlineWidth, SetOutlineWidth,
88715                             PropertyId::NonCustom(LonghandId::OutlineWidth.into())],
88716                                [Background_color, SetBackground_color,
88717                                 PropertyId::NonCustom(LonghandId::BackgroundColor.into())],
88718                            [BackgroundColor, SetBackgroundColor,
88719                             PropertyId::NonCustom(LonghandId::BackgroundColor.into())],
88720                                [Border_block_end_color, SetBorder_block_end_color,
88721                                 PropertyId::NonCustom(LonghandId::BorderBlockEndColor.into())],
88722                            [BorderBlockEndColor, SetBorderBlockEndColor,
88723                             PropertyId::NonCustom(LonghandId::BorderBlockEndColor.into())],
88724                                [Border_block_start_color, SetBorder_block_start_color,
88725                                 PropertyId::NonCustom(LonghandId::BorderBlockStartColor.into())],
88726                            [BorderBlockStartColor, SetBorderBlockStartColor,
88727                             PropertyId::NonCustom(LonghandId::BorderBlockStartColor.into())],
88728                                [Border_bottom_color, SetBorder_bottom_color,
88729                                 PropertyId::NonCustom(LonghandId::BorderBottomColor.into())],
88730                            [BorderBottomColor, SetBorderBottomColor,
88731                             PropertyId::NonCustom(LonghandId::BorderBottomColor.into())],
88732                                [Border_inline_end_color, SetBorder_inline_end_color,
88733                                 PropertyId::NonCustom(LonghandId::BorderInlineEndColor.into())],
88734                            [BorderInlineEndColor, SetBorderInlineEndColor,
88735                             PropertyId::NonCustom(LonghandId::BorderInlineEndColor.into())],
88736                                [Border_inline_start_color, SetBorder_inline_start_color,
88737                                 PropertyId::NonCustom(LonghandId::BorderInlineStartColor.into())],
88738                            [BorderInlineStartColor, SetBorderInlineStartColor,
88739                             PropertyId::NonCustom(LonghandId::BorderInlineStartColor.into())],
88740                                [Border_left_color, SetBorder_left_color,
88741                                 PropertyId::NonCustom(LonghandId::BorderLeftColor.into())],
88742                            [BorderLeftColor, SetBorderLeftColor,
88743                             PropertyId::NonCustom(LonghandId::BorderLeftColor.into())],
88744                                [Border_right_color, SetBorder_right_color,
88745                                 PropertyId::NonCustom(LonghandId::BorderRightColor.into())],
88746                            [BorderRightColor, SetBorderRightColor,
88747                             PropertyId::NonCustom(LonghandId::BorderRightColor.into())],
88748                                [Border_top_color, SetBorder_top_color,
88749                                 PropertyId::NonCustom(LonghandId::BorderTopColor.into())],
88750                            [BorderTopColor, SetBorderTopColor,
88751                             PropertyId::NonCustom(LonghandId::BorderTopColor.into())],
88752                                [Outline_color, SetOutline_color,
88753                                 PropertyId::NonCustom(LonghandId::OutlineColor.into())],
88754                            [OutlineColor, SetOutlineColor,
88755                             PropertyId::NonCustom(LonghandId::OutlineColor.into())],
88756                                [Text_decoration_color, SetText_decoration_color,
88757                                 PropertyId::NonCustom(LonghandId::TextDecorationColor.into())],
88758                            [TextDecorationColor, SetTextDecorationColor,
88759                             PropertyId::NonCustom(LonghandId::TextDecorationColor.into())],
88760                            [Background, SetBackground,
88761                             PropertyId::NonCustom(ShorthandId::Background.into())],
88762                                [Background_position, SetBackground_position,
88763                                 PropertyId::NonCustom(ShorthandId::BackgroundPosition.into())],
88764                            [BackgroundPosition, SetBackgroundPosition,
88765                             PropertyId::NonCustom(ShorthandId::BackgroundPosition.into())],
88766                                [Border_color, SetBorder_color,
88767                                 PropertyId::NonCustom(ShorthandId::BorderColor.into())],
88768                            [BorderColor, SetBorderColor,
88769                             PropertyId::NonCustom(ShorthandId::BorderColor.into())],
88770                                [Border_style, SetBorder_style,
88771                                 PropertyId::NonCustom(ShorthandId::BorderStyle.into())],
88772                            [BorderStyle, SetBorderStyle,
88773                             PropertyId::NonCustom(ShorthandId::BorderStyle.into())],
88774                                [Border_width, SetBorder_width,
88775                                 PropertyId::NonCustom(ShorthandId::BorderWidth.into())],
88776                            [BorderWidth, SetBorderWidth,
88777                             PropertyId::NonCustom(ShorthandId::BorderWidth.into())],
88778                                [Border_top, SetBorder_top,
88779                                 PropertyId::NonCustom(ShorthandId::BorderTop.into())],
88780                            [BorderTop, SetBorderTop,
88781                             PropertyId::NonCustom(ShorthandId::BorderTop.into())],
88782                                [Border_right, SetBorder_right,
88783                                 PropertyId::NonCustom(ShorthandId::BorderRight.into())],
88784                            [BorderRight, SetBorderRight,
88785                             PropertyId::NonCustom(ShorthandId::BorderRight.into())],
88786                                [Border_bottom, SetBorder_bottom,
88787                                 PropertyId::NonCustom(ShorthandId::BorderBottom.into())],
88788                            [BorderBottom, SetBorderBottom,
88789                             PropertyId::NonCustom(ShorthandId::BorderBottom.into())],
88790                                [Border_left, SetBorder_left,
88791                                 PropertyId::NonCustom(ShorthandId::BorderLeft.into())],
88792                            [BorderLeft, SetBorderLeft,
88793                             PropertyId::NonCustom(ShorthandId::BorderLeft.into())],
88794                                [Border_block_start, SetBorder_block_start,
88795                                 PropertyId::NonCustom(ShorthandId::BorderBlockStart.into())],
88796                            [BorderBlockStart, SetBorderBlockStart,
88797                             PropertyId::NonCustom(ShorthandId::BorderBlockStart.into())],
88798                                [Border_block_end, SetBorder_block_end,
88799                                 PropertyId::NonCustom(ShorthandId::BorderBlockEnd.into())],
88800                            [BorderBlockEnd, SetBorderBlockEnd,
88801                             PropertyId::NonCustom(ShorthandId::BorderBlockEnd.into())],
88802                                [Border_inline_start, SetBorder_inline_start,
88803                                 PropertyId::NonCustom(ShorthandId::BorderInlineStart.into())],
88804                            [BorderInlineStart, SetBorderInlineStart,
88805                             PropertyId::NonCustom(ShorthandId::BorderInlineStart.into())],
88806                                [Border_inline_end, SetBorder_inline_end,
88807                                 PropertyId::NonCustom(ShorthandId::BorderInlineEnd.into())],
88808                            [BorderInlineEnd, SetBorderInlineEnd,
88809                             PropertyId::NonCustom(ShorthandId::BorderInlineEnd.into())],
88810                            [Border, SetBorder,
88811                             PropertyId::NonCustom(ShorthandId::Border.into())],
88812                                [Border_radius, SetBorder_radius,
88813                                 PropertyId::NonCustom(ShorthandId::BorderRadius.into())],
88814                            [BorderRadius, SetBorderRadius,
88815                             PropertyId::NonCustom(ShorthandId::BorderRadius.into())],
88816                                [Border_image, SetBorder_image,
88817                                 PropertyId::NonCustom(ShorthandId::BorderImage.into())],
88818                            [BorderImage, SetBorderImage,
88819                             PropertyId::NonCustom(ShorthandId::BorderImage.into())],
88820                                [Border_block_width, SetBorder_block_width,
88821                                 PropertyId::NonCustom(ShorthandId::BorderBlockWidth.into())],
88822                            [BorderBlockWidth, SetBorderBlockWidth,
88823                             PropertyId::NonCustom(ShorthandId::BorderBlockWidth.into())],
88824                                [Border_block_style, SetBorder_block_style,
88825                                 PropertyId::NonCustom(ShorthandId::BorderBlockStyle.into())],
88826                            [BorderBlockStyle, SetBorderBlockStyle,
88827                             PropertyId::NonCustom(ShorthandId::BorderBlockStyle.into())],
88828                                [Border_block_color, SetBorder_block_color,
88829                                 PropertyId::NonCustom(ShorthandId::BorderBlockColor.into())],
88830                            [BorderBlockColor, SetBorderBlockColor,
88831                             PropertyId::NonCustom(ShorthandId::BorderBlockColor.into())],
88832                                [Border_inline_width, SetBorder_inline_width,
88833                                 PropertyId::NonCustom(ShorthandId::BorderInlineWidth.into())],
88834                            [BorderInlineWidth, SetBorderInlineWidth,
88835                             PropertyId::NonCustom(ShorthandId::BorderInlineWidth.into())],
88836                                [Border_inline_style, SetBorder_inline_style,
88837                                 PropertyId::NonCustom(ShorthandId::BorderInlineStyle.into())],
88838                            [BorderInlineStyle, SetBorderInlineStyle,
88839                             PropertyId::NonCustom(ShorthandId::BorderInlineStyle.into())],
88840                                [Border_inline_color, SetBorder_inline_color,
88841                                 PropertyId::NonCustom(ShorthandId::BorderInlineColor.into())],
88842                            [BorderInlineColor, SetBorderInlineColor,
88843                             PropertyId::NonCustom(ShorthandId::BorderInlineColor.into())],
88844                                [Border_block, SetBorder_block,
88845                                 PropertyId::NonCustom(ShorthandId::BorderBlock.into())],
88846                            [BorderBlock, SetBorderBlock,
88847                             PropertyId::NonCustom(ShorthandId::BorderBlock.into())],
88848                                [Border_inline, SetBorder_inline,
88849                                 PropertyId::NonCustom(ShorthandId::BorderInline.into())],
88850                            [BorderInline, SetBorderInline,
88851                             PropertyId::NonCustom(ShorthandId::BorderInline.into())],
88852                            [Overflow, SetOverflow,
88853                             PropertyId::NonCustom(ShorthandId::Overflow.into())],
88854                            [Columns, SetColumns,
88855                             PropertyId::NonCustom(ShorthandId::Columns.into())],
88856                            [Font, SetFont,
88857                             PropertyId::NonCustom(ShorthandId::Font.into())],
88858                                [Font_variant, SetFont_variant,
88859                                 PropertyId::NonCustom(ShorthandId::FontVariant.into())],
88860                            [FontVariant, SetFontVariant,
88861                             PropertyId::NonCustom(ShorthandId::FontVariant.into())],
88862                                [White_space, SetWhite_space,
88863                                 PropertyId::NonCustom(ShorthandId::WhiteSpace.into())],
88864                            [WhiteSpace, SetWhiteSpace,
88865                             PropertyId::NonCustom(ShorthandId::WhiteSpace.into())],
88866                                [List_style, SetList_style,
88867                                 PropertyId::NonCustom(ShorthandId::ListStyle.into())],
88868                            [ListStyle, SetListStyle,
88869                             PropertyId::NonCustom(ShorthandId::ListStyle.into())],
88870                            [Margin, SetMargin,
88871                             PropertyId::NonCustom(ShorthandId::Margin.into())],
88872                                [Margin_block, SetMargin_block,
88873                                 PropertyId::NonCustom(ShorthandId::MarginBlock.into())],
88874                            [MarginBlock, SetMarginBlock,
88875                             PropertyId::NonCustom(ShorthandId::MarginBlock.into())],
88876                                [Margin_inline, SetMargin_inline,
88877                                 PropertyId::NonCustom(ShorthandId::MarginInline.into())],
88878                            [MarginInline, SetMarginInline,
88879                             PropertyId::NonCustom(ShorthandId::MarginInline.into())],
88880                            [Outline, SetOutline,
88881                             PropertyId::NonCustom(ShorthandId::Outline.into())],
88882                            [Padding, SetPadding,
88883                             PropertyId::NonCustom(ShorthandId::Padding.into())],
88884                                [Padding_block, SetPadding_block,
88885                                 PropertyId::NonCustom(ShorthandId::PaddingBlock.into())],
88886                            [PaddingBlock, SetPaddingBlock,
88887                             PropertyId::NonCustom(ShorthandId::PaddingBlock.into())],
88888                                [Padding_inline, SetPadding_inline,
88889                                 PropertyId::NonCustom(ShorthandId::PaddingInline.into())],
88890                            [PaddingInline, SetPaddingInline,
88891                             PropertyId::NonCustom(ShorthandId::PaddingInline.into())],
88892                                [Flex_flow, SetFlex_flow,
88893                                 PropertyId::NonCustom(ShorthandId::FlexFlow.into())],
88894                            [FlexFlow, SetFlexFlow,
88895                             PropertyId::NonCustom(ShorthandId::FlexFlow.into())],
88896                            [Flex, SetFlex,
88897                             PropertyId::NonCustom(ShorthandId::Flex.into())],
88898                            [Gap, SetGap,
88899                             PropertyId::NonCustom(ShorthandId::Gap.into())],
88900                                [Grid_gap, SetGrid_gap,
88901                                 PropertyId::NonCustom(ShorthandId::Gap.into())],
88902                            [GridGap, SetGridGap,
88903                             PropertyId::NonCustom(ShorthandId::Gap.into())],
88904                                [Grid_row, SetGrid_row,
88905                                 PropertyId::NonCustom(ShorthandId::GridRow.into())],
88906                            [GridRow, SetGridRow,
88907                             PropertyId::NonCustom(ShorthandId::GridRow.into())],
88908                                [Grid_column, SetGrid_column,
88909                                 PropertyId::NonCustom(ShorthandId::GridColumn.into())],
88910                            [GridColumn, SetGridColumn,
88911                             PropertyId::NonCustom(ShorthandId::GridColumn.into())],
88912                                [Grid_area, SetGrid_area,
88913                                 PropertyId::NonCustom(ShorthandId::GridArea.into())],
88914                            [GridArea, SetGridArea,
88915                             PropertyId::NonCustom(ShorthandId::GridArea.into())],
88916                                [Grid_template, SetGrid_template,
88917                                 PropertyId::NonCustom(ShorthandId::GridTemplate.into())],
88918                            [GridTemplate, SetGridTemplate,
88919                             PropertyId::NonCustom(ShorthandId::GridTemplate.into())],
88920                            [Grid, SetGrid,
88921                             PropertyId::NonCustom(ShorthandId::Grid.into())],
88922                                [Place_content, SetPlace_content,
88923                                 PropertyId::NonCustom(ShorthandId::PlaceContent.into())],
88924                            [PlaceContent, SetPlaceContent,
88925                             PropertyId::NonCustom(ShorthandId::PlaceContent.into())],
88926                                [Place_self, SetPlace_self,
88927                                 PropertyId::NonCustom(ShorthandId::PlaceSelf.into())],
88928                            [PlaceSelf, SetPlaceSelf,
88929                             PropertyId::NonCustom(ShorthandId::PlaceSelf.into())],
88930                                [Place_items, SetPlace_items,
88931                                 PropertyId::NonCustom(ShorthandId::PlaceItems.into())],
88932                            [PlaceItems, SetPlaceItems,
88933                             PropertyId::NonCustom(ShorthandId::PlaceItems.into())],
88934                            [Inset, SetInset,
88935                             PropertyId::NonCustom(ShorthandId::Inset.into())],
88936                                [Inset_block, SetInset_block,
88937                                 PropertyId::NonCustom(ShorthandId::InsetBlock.into())],
88938                            [InsetBlock, SetInsetBlock,
88939                             PropertyId::NonCustom(ShorthandId::InsetBlock.into())],
88940                                [Inset_inline, SetInset_inline,
88941                                 PropertyId::NonCustom(ShorthandId::InsetInline.into())],
88942                            [InsetInline, SetInsetInline,
88943                             PropertyId::NonCustom(ShorthandId::InsetInline.into())],
88944                                [Text_decoration, SetText_decoration,
88945                                 PropertyId::NonCustom(ShorthandId::TextDecoration.into())],
88946                            [TextDecoration, SetTextDecoration,
88947                             PropertyId::NonCustom(ShorthandId::TextDecoration.into())],
88948                            [Transition, SetTransition,
88949                             PropertyId::NonCustom(ShorthandId::Transition.into())],
88950                            [Animation, SetAnimation,
88951                             PropertyId::NonCustom(ShorthandId::Animation.into())],
88952                            [All, SetAll,
88953                             PropertyId::NonCustom(ShorthandId::All.into())],
88954        }
88955    }
88956}
88957
88958/// Call the given macro with tokens like this for each longhand properties:
88959///
88960/// ```
88961/// { snake_case_ident }
88962/// ```
88963#[macro_export]
88964macro_rules! longhand_properties_idents {
88965    ($macro_name: ident) => {
88966        $macro_name! {
88967                { align_content }
88968                { align_items }
88969                { align_self }
88970                { aspect_ratio }
88971                { backface_visibility }
88972                { baseline_source }
88973                { border_collapse }
88974                { border_image_repeat }
88975                { box_sizing }
88976                { caption_side }
88977                { clear }
88978                { column_count }
88979                { column_span }
88980                { contain }
88981                { container_type }
88982                { direction }
88983                { display }
88984                { empty_cells }
88985                { flex_direction }
88986                { flex_wrap }
88987                { float }
88988                { font_language_override }
88989                { font_stretch }
88990                { font_style }
88991                { font_variant_caps }
88992                { font_weight }
88993                { grid_auto_flow }
88994                { image_rendering }
88995                { isolation }
88996                { justify_content }
88997                { justify_items }
88998                { justify_self }
88999                { list_style_position }
89000                { list_style_type }
89001                { mix_blend_mode }
89002                { object_fit }
89003                { opacity }
89004                { order }
89005                { outline_style }
89006                { overflow_wrap }
89007                { pointer_events }
89008                { position }
89009                { _servo_overflow_clip_box }
89010                { _servo_top_layer }
89011                { table_layout }
89012                { text_align }
89013                { text_align_last }
89014                { text_decoration_line }
89015                { text_decoration_style }
89016                { text_justify }
89017                { text_rendering }
89018                { text_transform }
89019                { text_wrap_mode }
89020                { transform_style }
89021                { unicode_bidi }
89022                { visibility }
89023                { white_space_collapse }
89024                { word_break }
89025                { writing_mode }
89026                { z_index }
89027                { zoom }
89028                { flex_grow }
89029                { flex_shrink }
89030                { overflow_block }
89031                { overflow_inline }
89032                { overflow_x }
89033                { overflow_y }
89034                { border_block_end_style }
89035                { border_block_start_style }
89036                { border_bottom_style }
89037                { border_inline_end_style }
89038                { border_inline_start_style }
89039                { border_left_style }
89040                { border_right_style }
89041                { border_top_style }
89042                { animation_composition }
89043                { animation_delay }
89044                { animation_direction }
89045                { animation_duration }
89046                { animation_fill_mode }
89047                { animation_iteration_count }
89048                { animation_name }
89049                { animation_play_state }
89050                { animation_timeline }
89051                { animation_timing_function }
89052                { backdrop_filter }
89053                { background_attachment }
89054                { background_clip }
89055                { background_image }
89056                { background_origin }
89057                { background_position_x }
89058                { background_position_y }
89059                { background_repeat }
89060                { background_size }
89061                { border_image_outset }
89062                { border_image_slice }
89063                { border_image_width }
89064                { border_spacing }
89065                { box_shadow }
89066                { clip }
89067                { clip_path }
89068                { color }
89069                { color_scheme }
89070                { column_width }
89071                { container_name }
89072                { content }
89073                { counter_increment }
89074                { counter_reset }
89075                { cursor }
89076                { filter }
89077                { flex_basis }
89078                { font_family }
89079                { font_size }
89080                { font_variation_settings }
89081                { grid_template_areas }
89082                { letter_spacing }
89083                { line_height }
89084                { mask_image }
89085                { offset_path }
89086                { perspective }
89087                { quotes }
89088                { rotate }
89089                { scale }
89090                { text_indent }
89091                { text_overflow }
89092                { text_shadow }
89093                { transform }
89094                { transform_origin }
89095                { transition_behavior }
89096                { transition_delay }
89097                { transition_duration }
89098                { transition_property }
89099                { transition_timing_function }
89100                { translate }
89101                { vertical_align }
89102                { view_transition_class }
89103                { view_transition_name }
89104                { will_change }
89105                { word_spacing }
89106                { _x_lang }
89107                { object_position }
89108                { perspective_origin }
89109                { grid_template_columns }
89110                { grid_template_rows }
89111                { border_image_source }
89112                { list_style_image }
89113                { grid_auto_columns }
89114                { grid_auto_rows }
89115                { outline_offset }
89116                { overflow_clip_margin }
89117                { column_gap }
89118                { row_gap }
89119                { grid_column_end }
89120                { grid_column_start }
89121                { grid_row_end }
89122                { grid_row_start }
89123                { max_block_size }
89124                { max_height }
89125                { max_inline_size }
89126                { max_width }
89127                { border_bottom_left_radius }
89128                { border_bottom_right_radius }
89129                { border_end_end_radius }
89130                { border_end_start_radius }
89131                { border_start_end_radius }
89132                { border_start_start_radius }
89133                { border_top_left_radius }
89134                { border_top_right_radius }
89135                { bottom }
89136                { inset_block_end }
89137                { inset_block_start }
89138                { inset_inline_end }
89139                { inset_inline_start }
89140                { left }
89141                { right }
89142                { top }
89143                { margin_block_end }
89144                { margin_block_start }
89145                { margin_bottom }
89146                { margin_inline_end }
89147                { margin_inline_start }
89148                { margin_left }
89149                { margin_right }
89150                { margin_top }
89151                { padding_block_end }
89152                { padding_block_start }
89153                { padding_bottom }
89154                { padding_inline_end }
89155                { padding_inline_start }
89156                { padding_left }
89157                { padding_right }
89158                { padding_top }
89159                { block_size }
89160                { height }
89161                { inline_size }
89162                { min_block_size }
89163                { min_height }
89164                { min_inline_size }
89165                { min_width }
89166                { width }
89167                { border_block_end_width }
89168                { border_block_start_width }
89169                { border_bottom_width }
89170                { border_inline_end_width }
89171                { border_inline_start_width }
89172                { border_left_width }
89173                { border_right_width }
89174                { border_top_width }
89175                { outline_width }
89176                { background_color }
89177                { border_block_end_color }
89178                { border_block_start_color }
89179                { border_bottom_color }
89180                { border_inline_end_color }
89181                { border_inline_start_color }
89182                { border_left_color }
89183                { border_right_color }
89184                { border_top_color }
89185                { outline_color }
89186                { text_decoration_color }
89187        }
89188    }
89189}
89190
89191// Large pages generate tens of thousands of ComputedValues.
89192#[cfg(feature = "gecko")]
89193size_of_test!(ComputedValues, 248);
89194#[cfg(feature = "servo")]
89195size_of_test!(ComputedValues, 216);
89196
89197// FFI relies on this.
89198size_of_test!(Option<Arc<ComputedValues>>, 8);
89199
89200// There are two reasons for this test to fail:
89201//
89202//   * Your changes made a specified value type for a given property go
89203//     over the threshold. In that case, you should try to shrink it again
89204//     or, if not possible, mark the property as boxed in the property
89205//     definition.
89206//
89207//   * Your changes made a specified value type smaller, so that it no
89208//     longer needs to be boxed. In this case you just need to remove
89209//     boxed=True from the property definition. Nice job!
89210#[cfg(target_pointer_width = "64")]
89211#[allow(dead_code)] // https://github.com/rust-lang/rust/issues/96952
89212const BOX_THRESHOLD: usize = 24;
89213#[cfg(target_pointer_width = "64")]
89214const_assert!(std::mem::size_of::<longhands::align_content::SpecifiedValue>() <= BOX_THRESHOLD);
89215#[cfg(target_pointer_width = "64")]
89216const_assert!(std::mem::size_of::<longhands::align_items::SpecifiedValue>() <= BOX_THRESHOLD);
89217#[cfg(target_pointer_width = "64")]
89218const_assert!(std::mem::size_of::<longhands::align_self::SpecifiedValue>() <= BOX_THRESHOLD);
89219#[cfg(target_pointer_width = "64")]
89220const_assert!(std::mem::size_of::<longhands::aspect_ratio::SpecifiedValue>() <= BOX_THRESHOLD);
89221#[cfg(target_pointer_width = "64")]
89222const_assert!(std::mem::size_of::<longhands::backface_visibility::SpecifiedValue>() <= BOX_THRESHOLD);
89223#[cfg(target_pointer_width = "64")]
89224const_assert!(std::mem::size_of::<longhands::baseline_source::SpecifiedValue>() <= BOX_THRESHOLD);
89225#[cfg(target_pointer_width = "64")]
89226const_assert!(std::mem::size_of::<longhands::border_collapse::SpecifiedValue>() <= BOX_THRESHOLD);
89227#[cfg(target_pointer_width = "64")]
89228const_assert!(std::mem::size_of::<longhands::border_image_repeat::SpecifiedValue>() <= BOX_THRESHOLD);
89229#[cfg(target_pointer_width = "64")]
89230const_assert!(std::mem::size_of::<longhands::box_sizing::SpecifiedValue>() <= BOX_THRESHOLD);
89231#[cfg(target_pointer_width = "64")]
89232const_assert!(std::mem::size_of::<longhands::caption_side::SpecifiedValue>() <= BOX_THRESHOLD);
89233#[cfg(target_pointer_width = "64")]
89234const_assert!(std::mem::size_of::<longhands::clear::SpecifiedValue>() <= BOX_THRESHOLD);
89235#[cfg(target_pointer_width = "64")]
89236const_assert!(std::mem::size_of::<longhands::column_count::SpecifiedValue>() <= BOX_THRESHOLD);
89237#[cfg(target_pointer_width = "64")]
89238const_assert!(std::mem::size_of::<longhands::column_span::SpecifiedValue>() <= BOX_THRESHOLD);
89239#[cfg(target_pointer_width = "64")]
89240const_assert!(std::mem::size_of::<longhands::contain::SpecifiedValue>() <= BOX_THRESHOLD);
89241#[cfg(target_pointer_width = "64")]
89242const_assert!(std::mem::size_of::<longhands::container_type::SpecifiedValue>() <= BOX_THRESHOLD);
89243#[cfg(target_pointer_width = "64")]
89244const_assert!(std::mem::size_of::<longhands::direction::SpecifiedValue>() <= BOX_THRESHOLD);
89245#[cfg(target_pointer_width = "64")]
89246const_assert!(std::mem::size_of::<longhands::display::SpecifiedValue>() <= BOX_THRESHOLD);
89247#[cfg(target_pointer_width = "64")]
89248const_assert!(std::mem::size_of::<longhands::empty_cells::SpecifiedValue>() <= BOX_THRESHOLD);
89249#[cfg(target_pointer_width = "64")]
89250const_assert!(std::mem::size_of::<longhands::flex_direction::SpecifiedValue>() <= BOX_THRESHOLD);
89251#[cfg(target_pointer_width = "64")]
89252const_assert!(std::mem::size_of::<longhands::flex_wrap::SpecifiedValue>() <= BOX_THRESHOLD);
89253#[cfg(target_pointer_width = "64")]
89254const_assert!(std::mem::size_of::<longhands::float::SpecifiedValue>() <= BOX_THRESHOLD);
89255#[cfg(target_pointer_width = "64")]
89256const_assert!(std::mem::size_of::<longhands::font_language_override::SpecifiedValue>() <= BOX_THRESHOLD);
89257#[cfg(target_pointer_width = "64")]
89258const_assert!(std::mem::size_of::<longhands::font_stretch::SpecifiedValue>() <= BOX_THRESHOLD);
89259#[cfg(target_pointer_width = "64")]
89260const_assert!(std::mem::size_of::<longhands::font_style::SpecifiedValue>() <= BOX_THRESHOLD);
89261#[cfg(target_pointer_width = "64")]
89262const_assert!(std::mem::size_of::<longhands::font_variant_caps::SpecifiedValue>() <= BOX_THRESHOLD);
89263#[cfg(target_pointer_width = "64")]
89264const_assert!(std::mem::size_of::<longhands::font_weight::SpecifiedValue>() <= BOX_THRESHOLD);
89265#[cfg(target_pointer_width = "64")]
89266const_assert!(std::mem::size_of::<longhands::grid_auto_flow::SpecifiedValue>() <= BOX_THRESHOLD);
89267#[cfg(target_pointer_width = "64")]
89268const_assert!(std::mem::size_of::<longhands::image_rendering::SpecifiedValue>() <= BOX_THRESHOLD);
89269#[cfg(target_pointer_width = "64")]
89270const_assert!(std::mem::size_of::<longhands::isolation::SpecifiedValue>() <= BOX_THRESHOLD);
89271#[cfg(target_pointer_width = "64")]
89272const_assert!(std::mem::size_of::<longhands::justify_content::SpecifiedValue>() <= BOX_THRESHOLD);
89273#[cfg(target_pointer_width = "64")]
89274const_assert!(std::mem::size_of::<longhands::justify_items::SpecifiedValue>() <= BOX_THRESHOLD);
89275#[cfg(target_pointer_width = "64")]
89276const_assert!(std::mem::size_of::<longhands::justify_self::SpecifiedValue>() <= BOX_THRESHOLD);
89277#[cfg(target_pointer_width = "64")]
89278const_assert!(std::mem::size_of::<longhands::list_style_position::SpecifiedValue>() <= BOX_THRESHOLD);
89279#[cfg(target_pointer_width = "64")]
89280const_assert!(std::mem::size_of::<longhands::list_style_type::SpecifiedValue>() <= BOX_THRESHOLD);
89281#[cfg(target_pointer_width = "64")]
89282const_assert!(std::mem::size_of::<longhands::mix_blend_mode::SpecifiedValue>() <= BOX_THRESHOLD);
89283#[cfg(target_pointer_width = "64")]
89284const_assert!(std::mem::size_of::<longhands::object_fit::SpecifiedValue>() <= BOX_THRESHOLD);
89285#[cfg(target_pointer_width = "64")]
89286const_assert!(std::mem::size_of::<longhands::opacity::SpecifiedValue>() <= BOX_THRESHOLD);
89287#[cfg(target_pointer_width = "64")]
89288const_assert!(std::mem::size_of::<longhands::order::SpecifiedValue>() <= BOX_THRESHOLD);
89289#[cfg(target_pointer_width = "64")]
89290const_assert!(std::mem::size_of::<longhands::outline_style::SpecifiedValue>() <= BOX_THRESHOLD);
89291#[cfg(target_pointer_width = "64")]
89292const_assert!(std::mem::size_of::<longhands::overflow_wrap::SpecifiedValue>() <= BOX_THRESHOLD);
89293#[cfg(target_pointer_width = "64")]
89294const_assert!(std::mem::size_of::<longhands::pointer_events::SpecifiedValue>() <= BOX_THRESHOLD);
89295#[cfg(target_pointer_width = "64")]
89296const_assert!(std::mem::size_of::<longhands::position::SpecifiedValue>() <= BOX_THRESHOLD);
89297#[cfg(target_pointer_width = "64")]
89298const_assert!(std::mem::size_of::<longhands::_servo_overflow_clip_box::SpecifiedValue>() <= BOX_THRESHOLD);
89299#[cfg(target_pointer_width = "64")]
89300const_assert!(std::mem::size_of::<longhands::_servo_top_layer::SpecifiedValue>() <= BOX_THRESHOLD);
89301#[cfg(target_pointer_width = "64")]
89302const_assert!(std::mem::size_of::<longhands::table_layout::SpecifiedValue>() <= BOX_THRESHOLD);
89303#[cfg(target_pointer_width = "64")]
89304const_assert!(std::mem::size_of::<longhands::text_align::SpecifiedValue>() <= BOX_THRESHOLD);
89305#[cfg(target_pointer_width = "64")]
89306const_assert!(std::mem::size_of::<longhands::text_align_last::SpecifiedValue>() <= BOX_THRESHOLD);
89307#[cfg(target_pointer_width = "64")]
89308const_assert!(std::mem::size_of::<longhands::text_decoration_line::SpecifiedValue>() <= BOX_THRESHOLD);
89309#[cfg(target_pointer_width = "64")]
89310const_assert!(std::mem::size_of::<longhands::text_decoration_style::SpecifiedValue>() <= BOX_THRESHOLD);
89311#[cfg(target_pointer_width = "64")]
89312const_assert!(std::mem::size_of::<longhands::text_justify::SpecifiedValue>() <= BOX_THRESHOLD);
89313#[cfg(target_pointer_width = "64")]
89314const_assert!(std::mem::size_of::<longhands::text_rendering::SpecifiedValue>() <= BOX_THRESHOLD);
89315#[cfg(target_pointer_width = "64")]
89316const_assert!(std::mem::size_of::<longhands::text_transform::SpecifiedValue>() <= BOX_THRESHOLD);
89317#[cfg(target_pointer_width = "64")]
89318const_assert!(std::mem::size_of::<longhands::text_wrap_mode::SpecifiedValue>() <= BOX_THRESHOLD);
89319#[cfg(target_pointer_width = "64")]
89320const_assert!(std::mem::size_of::<longhands::transform_style::SpecifiedValue>() <= BOX_THRESHOLD);
89321#[cfg(target_pointer_width = "64")]
89322const_assert!(std::mem::size_of::<longhands::unicode_bidi::SpecifiedValue>() <= BOX_THRESHOLD);
89323#[cfg(target_pointer_width = "64")]
89324const_assert!(std::mem::size_of::<longhands::visibility::SpecifiedValue>() <= BOX_THRESHOLD);
89325#[cfg(target_pointer_width = "64")]
89326const_assert!(std::mem::size_of::<longhands::white_space_collapse::SpecifiedValue>() <= BOX_THRESHOLD);
89327#[cfg(target_pointer_width = "64")]
89328const_assert!(std::mem::size_of::<longhands::word_break::SpecifiedValue>() <= BOX_THRESHOLD);
89329#[cfg(target_pointer_width = "64")]
89330const_assert!(std::mem::size_of::<longhands::writing_mode::SpecifiedValue>() <= BOX_THRESHOLD);
89331#[cfg(target_pointer_width = "64")]
89332const_assert!(std::mem::size_of::<longhands::z_index::SpecifiedValue>() <= BOX_THRESHOLD);
89333#[cfg(target_pointer_width = "64")]
89334const_assert!(std::mem::size_of::<longhands::zoom::SpecifiedValue>() <= BOX_THRESHOLD);
89335#[cfg(target_pointer_width = "64")]
89336const_assert!(std::mem::size_of::<longhands::flex_grow::SpecifiedValue>() <= BOX_THRESHOLD);
89337#[cfg(target_pointer_width = "64")]
89338const_assert!(std::mem::size_of::<longhands::flex_shrink::SpecifiedValue>() <= BOX_THRESHOLD);
89339#[cfg(target_pointer_width = "64")]
89340const_assert!(std::mem::size_of::<longhands::overflow_block::SpecifiedValue>() <= BOX_THRESHOLD);
89341#[cfg(target_pointer_width = "64")]
89342const_assert!(std::mem::size_of::<longhands::overflow_inline::SpecifiedValue>() <= BOX_THRESHOLD);
89343#[cfg(target_pointer_width = "64")]
89344const_assert!(std::mem::size_of::<longhands::overflow_x::SpecifiedValue>() <= BOX_THRESHOLD);
89345#[cfg(target_pointer_width = "64")]
89346const_assert!(std::mem::size_of::<longhands::overflow_y::SpecifiedValue>() <= BOX_THRESHOLD);
89347#[cfg(target_pointer_width = "64")]
89348const_assert!(std::mem::size_of::<longhands::border_block_end_style::SpecifiedValue>() <= BOX_THRESHOLD);
89349#[cfg(target_pointer_width = "64")]
89350const_assert!(std::mem::size_of::<longhands::border_block_start_style::SpecifiedValue>() <= BOX_THRESHOLD);
89351#[cfg(target_pointer_width = "64")]
89352const_assert!(std::mem::size_of::<longhands::border_bottom_style::SpecifiedValue>() <= BOX_THRESHOLD);
89353#[cfg(target_pointer_width = "64")]
89354const_assert!(std::mem::size_of::<longhands::border_inline_end_style::SpecifiedValue>() <= BOX_THRESHOLD);
89355#[cfg(target_pointer_width = "64")]
89356const_assert!(std::mem::size_of::<longhands::border_inline_start_style::SpecifiedValue>() <= BOX_THRESHOLD);
89357#[cfg(target_pointer_width = "64")]
89358const_assert!(std::mem::size_of::<longhands::border_left_style::SpecifiedValue>() <= BOX_THRESHOLD);
89359#[cfg(target_pointer_width = "64")]
89360const_assert!(std::mem::size_of::<longhands::border_right_style::SpecifiedValue>() <= BOX_THRESHOLD);
89361#[cfg(target_pointer_width = "64")]
89362const_assert!(std::mem::size_of::<longhands::border_top_style::SpecifiedValue>() <= BOX_THRESHOLD);
89363#[cfg(target_pointer_width = "64")]
89364const_assert!(std::mem::size_of::<longhands::animation_composition::SpecifiedValue>() <= BOX_THRESHOLD);
89365#[cfg(target_pointer_width = "64")]
89366const_assert!(std::mem::size_of::<longhands::animation_delay::SpecifiedValue>() <= BOX_THRESHOLD);
89367#[cfg(target_pointer_width = "64")]
89368const_assert!(std::mem::size_of::<longhands::animation_direction::SpecifiedValue>() <= BOX_THRESHOLD);
89369#[cfg(target_pointer_width = "64")]
89370const_assert!(std::mem::size_of::<longhands::animation_duration::SpecifiedValue>() <= BOX_THRESHOLD);
89371#[cfg(target_pointer_width = "64")]
89372const_assert!(std::mem::size_of::<longhands::animation_fill_mode::SpecifiedValue>() <= BOX_THRESHOLD);
89373#[cfg(target_pointer_width = "64")]
89374const_assert!(std::mem::size_of::<longhands::animation_iteration_count::SpecifiedValue>() <= BOX_THRESHOLD);
89375#[cfg(target_pointer_width = "64")]
89376const_assert!(std::mem::size_of::<longhands::animation_name::SpecifiedValue>() <= BOX_THRESHOLD);
89377#[cfg(target_pointer_width = "64")]
89378const_assert!(std::mem::size_of::<longhands::animation_play_state::SpecifiedValue>() <= BOX_THRESHOLD);
89379#[cfg(target_pointer_width = "64")]
89380const_assert!(std::mem::size_of::<longhands::animation_timeline::SpecifiedValue>() <= BOX_THRESHOLD);
89381#[cfg(target_pointer_width = "64")]
89382const_assert!(std::mem::size_of::<longhands::animation_timing_function::SpecifiedValue>() <= BOX_THRESHOLD);
89383#[cfg(target_pointer_width = "64")]
89384const_assert!(std::mem::size_of::<longhands::backdrop_filter::SpecifiedValue>() <= BOX_THRESHOLD);
89385#[cfg(target_pointer_width = "64")]
89386const_assert!(std::mem::size_of::<longhands::background_attachment::SpecifiedValue>() <= BOX_THRESHOLD);
89387#[cfg(target_pointer_width = "64")]
89388const_assert!(std::mem::size_of::<longhands::background_clip::SpecifiedValue>() <= BOX_THRESHOLD);
89389#[cfg(target_pointer_width = "64")]
89390const_assert!(std::mem::size_of::<longhands::background_image::SpecifiedValue>() <= BOX_THRESHOLD);
89391#[cfg(target_pointer_width = "64")]
89392const_assert!(std::mem::size_of::<longhands::background_origin::SpecifiedValue>() <= BOX_THRESHOLD);
89393#[cfg(target_pointer_width = "64")]
89394const_assert!(std::mem::size_of::<longhands::background_position_x::SpecifiedValue>() <= BOX_THRESHOLD);
89395#[cfg(target_pointer_width = "64")]
89396const_assert!(std::mem::size_of::<longhands::background_position_y::SpecifiedValue>() <= BOX_THRESHOLD);
89397#[cfg(target_pointer_width = "64")]
89398const_assert!(std::mem::size_of::<longhands::background_repeat::SpecifiedValue>() <= BOX_THRESHOLD);
89399#[cfg(target_pointer_width = "64")]
89400const_assert!(std::mem::size_of::<longhands::background_size::SpecifiedValue>() <= BOX_THRESHOLD);
89401#[cfg(target_pointer_width = "64")]
89402const_assert!(std::mem::size_of::<longhands::border_image_outset::SpecifiedValue>() > BOX_THRESHOLD);
89403#[cfg(target_pointer_width = "64")]
89404const_assert!(std::mem::size_of::<longhands::border_image_slice::SpecifiedValue>() > BOX_THRESHOLD);
89405#[cfg(target_pointer_width = "64")]
89406const_assert!(std::mem::size_of::<longhands::border_image_width::SpecifiedValue>() > BOX_THRESHOLD);
89407#[cfg(target_pointer_width = "64")]
89408const_assert!(std::mem::size_of::<longhands::border_spacing::SpecifiedValue>() > BOX_THRESHOLD);
89409#[cfg(target_pointer_width = "64")]
89410const_assert!(std::mem::size_of::<longhands::box_shadow::SpecifiedValue>() <= BOX_THRESHOLD);
89411#[cfg(target_pointer_width = "64")]
89412const_assert!(std::mem::size_of::<longhands::clip::SpecifiedValue>() > BOX_THRESHOLD);
89413#[cfg(target_pointer_width = "64")]
89414const_assert!(std::mem::size_of::<longhands::clip_path::SpecifiedValue>() <= BOX_THRESHOLD);
89415#[cfg(target_pointer_width = "64")]
89416const_assert!(std::mem::size_of::<longhands::color::SpecifiedValue>() <= BOX_THRESHOLD);
89417#[cfg(target_pointer_width = "64")]
89418const_assert!(std::mem::size_of::<longhands::color_scheme::SpecifiedValue>() <= BOX_THRESHOLD);
89419#[cfg(target_pointer_width = "64")]
89420const_assert!(std::mem::size_of::<longhands::column_width::SpecifiedValue>() <= BOX_THRESHOLD);
89421#[cfg(target_pointer_width = "64")]
89422const_assert!(std::mem::size_of::<longhands::container_name::SpecifiedValue>() <= BOX_THRESHOLD);
89423#[cfg(target_pointer_width = "64")]
89424const_assert!(std::mem::size_of::<longhands::content::SpecifiedValue>() <= BOX_THRESHOLD);
89425#[cfg(target_pointer_width = "64")]
89426const_assert!(std::mem::size_of::<longhands::counter_increment::SpecifiedValue>() <= BOX_THRESHOLD);
89427#[cfg(target_pointer_width = "64")]
89428const_assert!(std::mem::size_of::<longhands::counter_reset::SpecifiedValue>() <= BOX_THRESHOLD);
89429#[cfg(target_pointer_width = "64")]
89430const_assert!(std::mem::size_of::<longhands::cursor::SpecifiedValue>() <= BOX_THRESHOLD);
89431#[cfg(target_pointer_width = "64")]
89432const_assert!(std::mem::size_of::<longhands::filter::SpecifiedValue>() <= BOX_THRESHOLD);
89433#[cfg(target_pointer_width = "64")]
89434const_assert!(std::mem::size_of::<longhands::flex_basis::SpecifiedValue>() > BOX_THRESHOLD);
89435#[cfg(target_pointer_width = "64")]
89436const_assert!(std::mem::size_of::<longhands::font_family::SpecifiedValue>() <= BOX_THRESHOLD);
89437#[cfg(target_pointer_width = "64")]
89438const_assert!(std::mem::size_of::<longhands::font_size::SpecifiedValue>() <= BOX_THRESHOLD);
89439#[cfg(target_pointer_width = "64")]
89440const_assert!(std::mem::size_of::<longhands::font_variation_settings::SpecifiedValue>() <= BOX_THRESHOLD);
89441#[cfg(target_pointer_width = "64")]
89442const_assert!(std::mem::size_of::<longhands::grid_template_areas::SpecifiedValue>() <= BOX_THRESHOLD);
89443#[cfg(target_pointer_width = "64")]
89444const_assert!(std::mem::size_of::<longhands::letter_spacing::SpecifiedValue>() <= BOX_THRESHOLD);
89445#[cfg(target_pointer_width = "64")]
89446const_assert!(std::mem::size_of::<longhands::line_height::SpecifiedValue>() <= BOX_THRESHOLD);
89447#[cfg(target_pointer_width = "64")]
89448const_assert!(std::mem::size_of::<longhands::mask_image::SpecifiedValue>() <= BOX_THRESHOLD);
89449#[cfg(target_pointer_width = "64")]
89450const_assert!(std::mem::size_of::<longhands::offset_path::SpecifiedValue>() <= BOX_THRESHOLD);
89451#[cfg(target_pointer_width = "64")]
89452const_assert!(std::mem::size_of::<longhands::perspective::SpecifiedValue>() <= BOX_THRESHOLD);
89453#[cfg(target_pointer_width = "64")]
89454const_assert!(std::mem::size_of::<longhands::quotes::SpecifiedValue>() <= BOX_THRESHOLD);
89455#[cfg(target_pointer_width = "64")]
89456const_assert!(std::mem::size_of::<longhands::rotate::SpecifiedValue>() > BOX_THRESHOLD);
89457#[cfg(target_pointer_width = "64")]
89458const_assert!(std::mem::size_of::<longhands::scale::SpecifiedValue>() > BOX_THRESHOLD);
89459#[cfg(target_pointer_width = "64")]
89460const_assert!(std::mem::size_of::<longhands::text_indent::SpecifiedValue>() <= BOX_THRESHOLD);
89461#[cfg(target_pointer_width = "64")]
89462const_assert!(std::mem::size_of::<longhands::text_overflow::SpecifiedValue>() > BOX_THRESHOLD);
89463#[cfg(target_pointer_width = "64")]
89464const_assert!(std::mem::size_of::<longhands::text_shadow::SpecifiedValue>() <= BOX_THRESHOLD);
89465#[cfg(target_pointer_width = "64")]
89466const_assert!(std::mem::size_of::<longhands::transform::SpecifiedValue>() <= BOX_THRESHOLD);
89467#[cfg(target_pointer_width = "64")]
89468const_assert!(std::mem::size_of::<longhands::transform_origin::SpecifiedValue>() > BOX_THRESHOLD);
89469#[cfg(target_pointer_width = "64")]
89470const_assert!(std::mem::size_of::<longhands::transition_behavior::SpecifiedValue>() <= BOX_THRESHOLD);
89471#[cfg(target_pointer_width = "64")]
89472const_assert!(std::mem::size_of::<longhands::transition_delay::SpecifiedValue>() <= BOX_THRESHOLD);
89473#[cfg(target_pointer_width = "64")]
89474const_assert!(std::mem::size_of::<longhands::transition_duration::SpecifiedValue>() <= BOX_THRESHOLD);
89475#[cfg(target_pointer_width = "64")]
89476const_assert!(std::mem::size_of::<longhands::transition_property::SpecifiedValue>() <= BOX_THRESHOLD);
89477#[cfg(target_pointer_width = "64")]
89478const_assert!(std::mem::size_of::<longhands::transition_timing_function::SpecifiedValue>() <= BOX_THRESHOLD);
89479#[cfg(target_pointer_width = "64")]
89480const_assert!(std::mem::size_of::<longhands::translate::SpecifiedValue>() > BOX_THRESHOLD);
89481#[cfg(target_pointer_width = "64")]
89482const_assert!(std::mem::size_of::<longhands::vertical_align::SpecifiedValue>() <= BOX_THRESHOLD);
89483#[cfg(target_pointer_width = "64")]
89484const_assert!(std::mem::size_of::<longhands::view_transition_class::SpecifiedValue>() <= BOX_THRESHOLD);
89485#[cfg(target_pointer_width = "64")]
89486const_assert!(std::mem::size_of::<longhands::view_transition_name::SpecifiedValue>() <= BOX_THRESHOLD);
89487#[cfg(target_pointer_width = "64")]
89488const_assert!(std::mem::size_of::<longhands::will_change::SpecifiedValue>() <= BOX_THRESHOLD);
89489#[cfg(target_pointer_width = "64")]
89490const_assert!(std::mem::size_of::<longhands::word_spacing::SpecifiedValue>() <= BOX_THRESHOLD);
89491#[cfg(target_pointer_width = "64")]
89492const_assert!(std::mem::size_of::<longhands::_x_lang::SpecifiedValue>() <= BOX_THRESHOLD);
89493#[cfg(target_pointer_width = "64")]
89494const_assert!(std::mem::size_of::<longhands::object_position::SpecifiedValue>() > BOX_THRESHOLD);
89495#[cfg(target_pointer_width = "64")]
89496const_assert!(std::mem::size_of::<longhands::perspective_origin::SpecifiedValue>() > BOX_THRESHOLD);
89497#[cfg(target_pointer_width = "64")]
89498const_assert!(std::mem::size_of::<longhands::grid_template_columns::SpecifiedValue>() <= BOX_THRESHOLD);
89499#[cfg(target_pointer_width = "64")]
89500const_assert!(std::mem::size_of::<longhands::grid_template_rows::SpecifiedValue>() <= BOX_THRESHOLD);
89501#[cfg(target_pointer_width = "64")]
89502const_assert!(std::mem::size_of::<longhands::border_image_source::SpecifiedValue>() <= BOX_THRESHOLD);
89503#[cfg(target_pointer_width = "64")]
89504const_assert!(std::mem::size_of::<longhands::list_style_image::SpecifiedValue>() <= BOX_THRESHOLD);
89505#[cfg(target_pointer_width = "64")]
89506const_assert!(std::mem::size_of::<longhands::grid_auto_columns::SpecifiedValue>() <= BOX_THRESHOLD);
89507#[cfg(target_pointer_width = "64")]
89508const_assert!(std::mem::size_of::<longhands::grid_auto_rows::SpecifiedValue>() <= BOX_THRESHOLD);
89509#[cfg(target_pointer_width = "64")]
89510const_assert!(std::mem::size_of::<longhands::outline_offset::SpecifiedValue>() <= BOX_THRESHOLD);
89511#[cfg(target_pointer_width = "64")]
89512const_assert!(std::mem::size_of::<longhands::overflow_clip_margin::SpecifiedValue>() <= BOX_THRESHOLD);
89513#[cfg(target_pointer_width = "64")]
89514const_assert!(std::mem::size_of::<longhands::column_gap::SpecifiedValue>() <= BOX_THRESHOLD);
89515#[cfg(target_pointer_width = "64")]
89516const_assert!(std::mem::size_of::<longhands::row_gap::SpecifiedValue>() <= BOX_THRESHOLD);
89517#[cfg(target_pointer_width = "64")]
89518const_assert!(std::mem::size_of::<longhands::grid_column_end::SpecifiedValue>() <= BOX_THRESHOLD);
89519#[cfg(target_pointer_width = "64")]
89520const_assert!(std::mem::size_of::<longhands::grid_column_start::SpecifiedValue>() <= BOX_THRESHOLD);
89521#[cfg(target_pointer_width = "64")]
89522const_assert!(std::mem::size_of::<longhands::grid_row_end::SpecifiedValue>() <= BOX_THRESHOLD);
89523#[cfg(target_pointer_width = "64")]
89524const_assert!(std::mem::size_of::<longhands::grid_row_start::SpecifiedValue>() <= BOX_THRESHOLD);
89525#[cfg(target_pointer_width = "64")]
89526const_assert!(std::mem::size_of::<longhands::max_block_size::SpecifiedValue>() <= BOX_THRESHOLD);
89527#[cfg(target_pointer_width = "64")]
89528const_assert!(std::mem::size_of::<longhands::max_height::SpecifiedValue>() <= BOX_THRESHOLD);
89529#[cfg(target_pointer_width = "64")]
89530const_assert!(std::mem::size_of::<longhands::max_inline_size::SpecifiedValue>() <= BOX_THRESHOLD);
89531#[cfg(target_pointer_width = "64")]
89532const_assert!(std::mem::size_of::<longhands::max_width::SpecifiedValue>() <= BOX_THRESHOLD);
89533#[cfg(target_pointer_width = "64")]
89534const_assert!(std::mem::size_of::<longhands::border_bottom_left_radius::SpecifiedValue>() > BOX_THRESHOLD);
89535#[cfg(target_pointer_width = "64")]
89536const_assert!(std::mem::size_of::<longhands::border_bottom_right_radius::SpecifiedValue>() > BOX_THRESHOLD);
89537#[cfg(target_pointer_width = "64")]
89538const_assert!(std::mem::size_of::<longhands::border_end_end_radius::SpecifiedValue>() > BOX_THRESHOLD);
89539#[cfg(target_pointer_width = "64")]
89540const_assert!(std::mem::size_of::<longhands::border_end_start_radius::SpecifiedValue>() > BOX_THRESHOLD);
89541#[cfg(target_pointer_width = "64")]
89542const_assert!(std::mem::size_of::<longhands::border_start_end_radius::SpecifiedValue>() > BOX_THRESHOLD);
89543#[cfg(target_pointer_width = "64")]
89544const_assert!(std::mem::size_of::<longhands::border_start_start_radius::SpecifiedValue>() > BOX_THRESHOLD);
89545#[cfg(target_pointer_width = "64")]
89546const_assert!(std::mem::size_of::<longhands::border_top_left_radius::SpecifiedValue>() > BOX_THRESHOLD);
89547#[cfg(target_pointer_width = "64")]
89548const_assert!(std::mem::size_of::<longhands::border_top_right_radius::SpecifiedValue>() > BOX_THRESHOLD);
89549#[cfg(target_pointer_width = "64")]
89550const_assert!(std::mem::size_of::<longhands::bottom::SpecifiedValue>() <= BOX_THRESHOLD);
89551#[cfg(target_pointer_width = "64")]
89552const_assert!(std::mem::size_of::<longhands::inset_block_end::SpecifiedValue>() <= BOX_THRESHOLD);
89553#[cfg(target_pointer_width = "64")]
89554const_assert!(std::mem::size_of::<longhands::inset_block_start::SpecifiedValue>() <= BOX_THRESHOLD);
89555#[cfg(target_pointer_width = "64")]
89556const_assert!(std::mem::size_of::<longhands::inset_inline_end::SpecifiedValue>() <= BOX_THRESHOLD);
89557#[cfg(target_pointer_width = "64")]
89558const_assert!(std::mem::size_of::<longhands::inset_inline_start::SpecifiedValue>() <= BOX_THRESHOLD);
89559#[cfg(target_pointer_width = "64")]
89560const_assert!(std::mem::size_of::<longhands::left::SpecifiedValue>() <= BOX_THRESHOLD);
89561#[cfg(target_pointer_width = "64")]
89562const_assert!(std::mem::size_of::<longhands::right::SpecifiedValue>() <= BOX_THRESHOLD);
89563#[cfg(target_pointer_width = "64")]
89564const_assert!(std::mem::size_of::<longhands::top::SpecifiedValue>() <= BOX_THRESHOLD);
89565#[cfg(target_pointer_width = "64")]
89566const_assert!(std::mem::size_of::<longhands::margin_block_end::SpecifiedValue>() <= BOX_THRESHOLD);
89567#[cfg(target_pointer_width = "64")]
89568const_assert!(std::mem::size_of::<longhands::margin_block_start::SpecifiedValue>() <= BOX_THRESHOLD);
89569#[cfg(target_pointer_width = "64")]
89570const_assert!(std::mem::size_of::<longhands::margin_bottom::SpecifiedValue>() <= BOX_THRESHOLD);
89571#[cfg(target_pointer_width = "64")]
89572const_assert!(std::mem::size_of::<longhands::margin_inline_end::SpecifiedValue>() <= BOX_THRESHOLD);
89573#[cfg(target_pointer_width = "64")]
89574const_assert!(std::mem::size_of::<longhands::margin_inline_start::SpecifiedValue>() <= BOX_THRESHOLD);
89575#[cfg(target_pointer_width = "64")]
89576const_assert!(std::mem::size_of::<longhands::margin_left::SpecifiedValue>() <= BOX_THRESHOLD);
89577#[cfg(target_pointer_width = "64")]
89578const_assert!(std::mem::size_of::<longhands::margin_right::SpecifiedValue>() <= BOX_THRESHOLD);
89579#[cfg(target_pointer_width = "64")]
89580const_assert!(std::mem::size_of::<longhands::margin_top::SpecifiedValue>() <= BOX_THRESHOLD);
89581#[cfg(target_pointer_width = "64")]
89582const_assert!(std::mem::size_of::<longhands::padding_block_end::SpecifiedValue>() <= BOX_THRESHOLD);
89583#[cfg(target_pointer_width = "64")]
89584const_assert!(std::mem::size_of::<longhands::padding_block_start::SpecifiedValue>() <= BOX_THRESHOLD);
89585#[cfg(target_pointer_width = "64")]
89586const_assert!(std::mem::size_of::<longhands::padding_bottom::SpecifiedValue>() <= BOX_THRESHOLD);
89587#[cfg(target_pointer_width = "64")]
89588const_assert!(std::mem::size_of::<longhands::padding_inline_end::SpecifiedValue>() <= BOX_THRESHOLD);
89589#[cfg(target_pointer_width = "64")]
89590const_assert!(std::mem::size_of::<longhands::padding_inline_start::SpecifiedValue>() <= BOX_THRESHOLD);
89591#[cfg(target_pointer_width = "64")]
89592const_assert!(std::mem::size_of::<longhands::padding_left::SpecifiedValue>() <= BOX_THRESHOLD);
89593#[cfg(target_pointer_width = "64")]
89594const_assert!(std::mem::size_of::<longhands::padding_right::SpecifiedValue>() <= BOX_THRESHOLD);
89595#[cfg(target_pointer_width = "64")]
89596const_assert!(std::mem::size_of::<longhands::padding_top::SpecifiedValue>() <= BOX_THRESHOLD);
89597#[cfg(target_pointer_width = "64")]
89598const_assert!(std::mem::size_of::<longhands::block_size::SpecifiedValue>() <= BOX_THRESHOLD);
89599#[cfg(target_pointer_width = "64")]
89600const_assert!(std::mem::size_of::<longhands::height::SpecifiedValue>() <= BOX_THRESHOLD);
89601#[cfg(target_pointer_width = "64")]
89602const_assert!(std::mem::size_of::<longhands::inline_size::SpecifiedValue>() <= BOX_THRESHOLD);
89603#[cfg(target_pointer_width = "64")]
89604const_assert!(std::mem::size_of::<longhands::min_block_size::SpecifiedValue>() <= BOX_THRESHOLD);
89605#[cfg(target_pointer_width = "64")]
89606const_assert!(std::mem::size_of::<longhands::min_height::SpecifiedValue>() <= BOX_THRESHOLD);
89607#[cfg(target_pointer_width = "64")]
89608const_assert!(std::mem::size_of::<longhands::min_inline_size::SpecifiedValue>() <= BOX_THRESHOLD);
89609#[cfg(target_pointer_width = "64")]
89610const_assert!(std::mem::size_of::<longhands::min_width::SpecifiedValue>() <= BOX_THRESHOLD);
89611#[cfg(target_pointer_width = "64")]
89612const_assert!(std::mem::size_of::<longhands::width::SpecifiedValue>() <= BOX_THRESHOLD);
89613#[cfg(target_pointer_width = "64")]
89614const_assert!(std::mem::size_of::<longhands::border_block_end_width::SpecifiedValue>() <= BOX_THRESHOLD);
89615#[cfg(target_pointer_width = "64")]
89616const_assert!(std::mem::size_of::<longhands::border_block_start_width::SpecifiedValue>() <= BOX_THRESHOLD);
89617#[cfg(target_pointer_width = "64")]
89618const_assert!(std::mem::size_of::<longhands::border_bottom_width::SpecifiedValue>() <= BOX_THRESHOLD);
89619#[cfg(target_pointer_width = "64")]
89620const_assert!(std::mem::size_of::<longhands::border_inline_end_width::SpecifiedValue>() <= BOX_THRESHOLD);
89621#[cfg(target_pointer_width = "64")]
89622const_assert!(std::mem::size_of::<longhands::border_inline_start_width::SpecifiedValue>() <= BOX_THRESHOLD);
89623#[cfg(target_pointer_width = "64")]
89624const_assert!(std::mem::size_of::<longhands::border_left_width::SpecifiedValue>() <= BOX_THRESHOLD);
89625#[cfg(target_pointer_width = "64")]
89626const_assert!(std::mem::size_of::<longhands::border_right_width::SpecifiedValue>() <= BOX_THRESHOLD);
89627#[cfg(target_pointer_width = "64")]
89628const_assert!(std::mem::size_of::<longhands::border_top_width::SpecifiedValue>() <= BOX_THRESHOLD);
89629#[cfg(target_pointer_width = "64")]
89630const_assert!(std::mem::size_of::<longhands::outline_width::SpecifiedValue>() <= BOX_THRESHOLD);
89631#[cfg(target_pointer_width = "64")]
89632const_assert!(std::mem::size_of::<longhands::background_color::SpecifiedValue>() <= BOX_THRESHOLD);
89633#[cfg(target_pointer_width = "64")]
89634const_assert!(std::mem::size_of::<longhands::border_block_end_color::SpecifiedValue>() <= BOX_THRESHOLD);
89635#[cfg(target_pointer_width = "64")]
89636const_assert!(std::mem::size_of::<longhands::border_block_start_color::SpecifiedValue>() <= BOX_THRESHOLD);
89637#[cfg(target_pointer_width = "64")]
89638const_assert!(std::mem::size_of::<longhands::border_bottom_color::SpecifiedValue>() <= BOX_THRESHOLD);
89639#[cfg(target_pointer_width = "64")]
89640const_assert!(std::mem::size_of::<longhands::border_inline_end_color::SpecifiedValue>() <= BOX_THRESHOLD);
89641#[cfg(target_pointer_width = "64")]
89642const_assert!(std::mem::size_of::<longhands::border_inline_start_color::SpecifiedValue>() <= BOX_THRESHOLD);
89643#[cfg(target_pointer_width = "64")]
89644const_assert!(std::mem::size_of::<longhands::border_left_color::SpecifiedValue>() <= BOX_THRESHOLD);
89645#[cfg(target_pointer_width = "64")]
89646const_assert!(std::mem::size_of::<longhands::border_right_color::SpecifiedValue>() <= BOX_THRESHOLD);
89647#[cfg(target_pointer_width = "64")]
89648const_assert!(std::mem::size_of::<longhands::border_top_color::SpecifiedValue>() <= BOX_THRESHOLD);
89649#[cfg(target_pointer_width = "64")]
89650const_assert!(std::mem::size_of::<longhands::outline_color::SpecifiedValue>() <= BOX_THRESHOLD);
89651#[cfg(target_pointer_width = "64")]
89652const_assert!(std::mem::size_of::<longhands::text_decoration_color::SpecifiedValue>() <= BOX_THRESHOLD);
89653
89654pub(crate) fn restyle_damage_repaint (old: &ComputedValues, new: &ComputedValues) -> bool {
89655                old.get_background().background_color != new.get_background().background_color ||
89656                old.get_background().background_image != new.get_background().background_image ||
89657                old.get_background().background_position_x != new.get_background().background_position_x ||
89658                old.get_background().background_position_y != new.get_background().background_position_y ||
89659                old.get_background().background_repeat != new.get_background().background_repeat ||
89660                old.get_background().background_attachment != new.get_background().background_attachment ||
89661                old.get_background().background_clip != new.get_background().background_clip ||
89662                old.get_background().background_origin != new.get_background().background_origin ||
89663                old.get_background().background_size != new.get_background().background_size ||
89664                old.get_border().border_image_source != new.get_border().border_image_source ||
89665                old.get_border().border_image_outset != new.get_border().border_image_outset ||
89666                old.get_border().border_image_repeat != new.get_border().border_image_repeat ||
89667                old.get_border().border_image_width != new.get_border().border_image_width ||
89668                old.get_border().border_image_slice != new.get_border().border_image_slice ||
89669                old.get_box().isolation != new.get_box().isolation ||
89670                old.get_box().backface_visibility != new.get_box().backface_visibility ||
89671                old.get_effects().opacity != new.get_effects().opacity ||
89672                old.get_effects().filter != new.get_effects().filter ||
89673                old.get_effects().mix_blend_mode != new.get_effects().mix_blend_mode ||
89674                old.get_inherited_text().color != new.get_inherited_text().color ||
89675                old.get_inherited_ui().cursor != new.get_inherited_ui().cursor ||
89676                old.get_inherited_ui().pointer_events != new.get_inherited_ui().pointer_events ||
89677                old.get_outline().outline_color != new.get_outline().outline_color ||
89678                old.get_outline().outline_style != new.get_outline().outline_style ||
89679                old.get_outline().outline_width != new.get_outline().outline_width ||
89680                old.get_outline().outline_offset != new.get_outline().outline_offset ||
89681                old.get_svg().clip_path != new.get_svg().clip_path ||
89682    false
89683}
89684pub(crate) fn restyle_damage_recalculate_overflow (old: &ComputedValues, new: &ComputedValues) -> bool {
89685                old.get_box().transform != new.get_box().transform ||
89686                old.get_box().rotate != new.get_box().rotate ||
89687                old.get_box().scale != new.get_box().scale ||
89688                old.get_box().translate != new.get_box().translate ||
89689                old.get_box().perspective != new.get_box().perspective ||
89690                old.get_box().perspective_origin != new.get_box().perspective_origin ||
89691                old.get_box().transform_style != new.get_box().transform_style ||
89692                old.get_box().transform_origin != new.get_box().transform_origin ||
89693    false
89694}
89695pub(crate) fn restyle_damage_rebuild_stacking_context (old: &ComputedValues, new: &ComputedValues) -> bool {
89696                old.get_position().z_index != new.get_position().z_index ||
89697    false
89698}
89699pub(crate) fn restyle_damage_rebuild_box (old: &ComputedValues, new: &ComputedValues) -> bool {
89700                old.get_border().border_top_color != new.get_border().border_top_color ||
89701                old.get_border().border_top_style != new.get_border().border_top_style ||
89702                old.get_border().border_top_width != new.get_border().border_top_width ||
89703                old.get_border().border_right_color != new.get_border().border_right_color ||
89704                old.get_border().border_right_style != new.get_border().border_right_style ||
89705                old.get_border().border_right_width != new.get_border().border_right_width ||
89706                old.get_border().border_bottom_color != new.get_border().border_bottom_color ||
89707                old.get_border().border_bottom_style != new.get_border().border_bottom_style ||
89708                old.get_border().border_bottom_width != new.get_border().border_bottom_width ||
89709                old.get_border().border_left_color != new.get_border().border_left_color ||
89710                old.get_border().border_left_style != new.get_border().border_left_style ||
89711                old.get_border().border_left_width != new.get_border().border_left_width ||
89712                old.get_border().border_top_left_radius != new.get_border().border_top_left_radius ||
89713                old.get_border().border_top_right_radius != new.get_border().border_top_right_radius ||
89714                old.get_border().border_bottom_right_radius != new.get_border().border_bottom_right_radius ||
89715                old.get_border().border_bottom_left_radius != new.get_border().border_bottom_left_radius ||
89716                old.get_box().display != new.get_box().display ||
89717                old.get_box()._servo_top_layer != new.get_box()._servo_top_layer ||
89718                old.get_box().position != new.get_box().position ||
89719                old.get_box().float != new.get_box().float ||
89720                old.get_box().clear != new.get_box().clear ||
89721                old.get_box().vertical_align != new.get_box().vertical_align ||
89722                old.get_box().baseline_source != new.get_box().baseline_source ||
89723                old.get_box()._servo_overflow_clip_box != new.get_box()._servo_overflow_clip_box ||
89724                old.get_box().overflow_y != new.get_box().overflow_y ||
89725                old.get_box().overflow_x != new.get_box().overflow_x ||
89726                old.get_box().offset_path != new.get_box().offset_path ||
89727                old.get_box().contain != new.get_box().contain ||
89728                old.get_box().container_type != new.get_box().container_type ||
89729                old.get_box().container_name != new.get_box().container_name ||
89730                old.get_box().will_change != new.get_box().will_change ||
89731                old.get_box().zoom != new.get_box().zoom ||
89732                old.get_column().column_width != new.get_column().column_width ||
89733                old.get_column().column_count != new.get_column().column_count ||
89734                old.get_column().column_span != new.get_column().column_span ||
89735                old.get_counters().content != new.get_counters().content ||
89736                old.get_counters().counter_increment != new.get_counters().counter_increment ||
89737                old.get_counters().counter_reset != new.get_counters().counter_reset ||
89738                old.get_effects().box_shadow != new.get_effects().box_shadow ||
89739                old.get_effects().clip != new.get_effects().clip ||
89740                old.get_effects().backdrop_filter != new.get_effects().backdrop_filter ||
89741                old.get_font().font_family != new.get_font().font_family ||
89742                old.get_font().font_style != new.get_font().font_style ||
89743                old.get_font().font_variant_caps != new.get_font().font_variant_caps ||
89744                old.get_font().font_weight != new.get_font().font_weight ||
89745                old.get_font().font_size != new.get_font().font_size ||
89746                old.get_font().font_stretch != new.get_font().font_stretch ||
89747                old.get_font().font_variation_settings != new.get_font().font_variation_settings ||
89748                old.get_font().font_language_override != new.get_font().font_language_override ||
89749                old.get_font()._x_lang != new.get_font()._x_lang ||
89750                old.get_font().line_height != new.get_font().line_height ||
89751                old.get_inherited_box().visibility != new.get_inherited_box().visibility ||
89752                old.get_inherited_box().writing_mode != new.get_inherited_box().writing_mode ||
89753                old.get_inherited_box().direction != new.get_inherited_box().direction ||
89754                old.get_inherited_box().image_rendering != new.get_inherited_box().image_rendering ||
89755                old.get_inherited_table().border_collapse != new.get_inherited_table().border_collapse ||
89756                old.get_inherited_table().empty_cells != new.get_inherited_table().empty_cells ||
89757                old.get_inherited_table().caption_side != new.get_inherited_table().caption_side ||
89758                old.get_inherited_table().border_spacing != new.get_inherited_table().border_spacing ||
89759                old.get_inherited_text().text_transform != new.get_inherited_text().text_transform ||
89760                old.get_inherited_text().text_indent != new.get_inherited_text().text_indent ||
89761                old.get_inherited_text().overflow_wrap != new.get_inherited_text().overflow_wrap ||
89762                old.get_inherited_text().word_break != new.get_inherited_text().word_break ||
89763                old.get_inherited_text().text_justify != new.get_inherited_text().text_justify ||
89764                old.get_inherited_text().text_align_last != new.get_inherited_text().text_align_last ||
89765                old.get_inherited_text().text_align != new.get_inherited_text().text_align ||
89766                old.get_inherited_text().letter_spacing != new.get_inherited_text().letter_spacing ||
89767                old.get_inherited_text().word_spacing != new.get_inherited_text().word_spacing ||
89768                old.get_inherited_text().white_space_collapse != new.get_inherited_text().white_space_collapse ||
89769                old.get_inherited_text().text_shadow != new.get_inherited_text().text_shadow ||
89770                old.get_inherited_text().text_rendering != new.get_inherited_text().text_rendering ||
89771                old.get_inherited_text().text_wrap_mode != new.get_inherited_text().text_wrap_mode ||
89772                old.get_inherited_ui().color_scheme != new.get_inherited_ui().color_scheme ||
89773                old.get_list().list_style_position != new.get_list().list_style_position ||
89774                old.get_list().list_style_type != new.get_list().list_style_type ||
89775                old.get_list().list_style_image != new.get_list().list_style_image ||
89776                old.get_list().quotes != new.get_list().quotes ||
89777                old.get_margin().margin_top != new.get_margin().margin_top ||
89778                old.get_margin().margin_right != new.get_margin().margin_right ||
89779                old.get_margin().margin_bottom != new.get_margin().margin_bottom ||
89780                old.get_margin().margin_left != new.get_margin().margin_left ||
89781                old.get_margin().overflow_clip_margin != new.get_margin().overflow_clip_margin ||
89782                old.get_padding().padding_top != new.get_padding().padding_top ||
89783                old.get_padding().padding_right != new.get_padding().padding_right ||
89784                old.get_padding().padding_bottom != new.get_padding().padding_bottom ||
89785                old.get_padding().padding_left != new.get_padding().padding_left ||
89786                old.get_position().top != new.get_position().top ||
89787                old.get_position().right != new.get_position().right ||
89788                old.get_position().bottom != new.get_position().bottom ||
89789                old.get_position().left != new.get_position().left ||
89790                old.get_position().flex_direction != new.get_position().flex_direction ||
89791                old.get_position().flex_wrap != new.get_position().flex_wrap ||
89792                old.get_position().justify_content != new.get_position().justify_content ||
89793                old.get_position().align_content != new.get_position().align_content ||
89794                old.get_position().align_items != new.get_position().align_items ||
89795                old.get_position().justify_items != new.get_position().justify_items ||
89796                old.get_position().flex_grow != new.get_position().flex_grow ||
89797                old.get_position().flex_shrink != new.get_position().flex_shrink ||
89798                old.get_position().align_self != new.get_position().align_self ||
89799                old.get_position().justify_self != new.get_position().justify_self ||
89800                old.get_position().order != new.get_position().order ||
89801                old.get_position().flex_basis != new.get_position().flex_basis ||
89802                old.get_position().height != new.get_position().height ||
89803                old.get_position().min_height != new.get_position().min_height ||
89804                old.get_position().max_height != new.get_position().max_height ||
89805                old.get_position().width != new.get_position().width ||
89806                old.get_position().min_width != new.get_position().min_width ||
89807                old.get_position().max_width != new.get_position().max_width ||
89808                old.get_position().box_sizing != new.get_position().box_sizing ||
89809                old.get_position().object_fit != new.get_position().object_fit ||
89810                old.get_position().object_position != new.get_position().object_position ||
89811                old.get_position().grid_row_start != new.get_position().grid_row_start ||
89812                old.get_position().grid_row_end != new.get_position().grid_row_end ||
89813                old.get_position().grid_auto_rows != new.get_position().grid_auto_rows ||
89814                old.get_position().grid_template_rows != new.get_position().grid_template_rows ||
89815                old.get_position().grid_column_start != new.get_position().grid_column_start ||
89816                old.get_position().grid_column_end != new.get_position().grid_column_end ||
89817                old.get_position().grid_auto_columns != new.get_position().grid_auto_columns ||
89818                old.get_position().grid_template_columns != new.get_position().grid_template_columns ||
89819                old.get_position().grid_auto_flow != new.get_position().grid_auto_flow ||
89820                old.get_position().grid_template_areas != new.get_position().grid_template_areas ||
89821                old.get_position().column_gap != new.get_position().column_gap ||
89822                old.get_position().row_gap != new.get_position().row_gap ||
89823                old.get_position().aspect_ratio != new.get_position().aspect_ratio ||
89824                old.get_svg().mask_image != new.get_svg().mask_image ||
89825                old.get_table().table_layout != new.get_table().table_layout ||
89826                old.get_text().text_overflow != new.get_text().text_overflow ||
89827                old.get_text().unicode_bidi != new.get_text().unicode_bidi ||
89828                old.get_text().text_decoration_line != new.get_text().text_decoration_line ||
89829                old.get_text().text_decoration_style != new.get_text().text_decoration_style ||
89830                old.get_text().text_decoration_color != new.get_text().text_decoration_color ||
89831                old.get_ui().transition_duration != new.get_ui().transition_duration ||
89832                old.get_ui().transition_timing_function != new.get_ui().transition_timing_function ||
89833                old.get_ui().transition_property != new.get_ui().transition_property ||
89834                old.get_ui().transition_delay != new.get_ui().transition_delay ||
89835                old.get_ui().transition_behavior != new.get_ui().transition_behavior ||
89836                old.get_ui().animation_name != new.get_ui().animation_name ||
89837                old.get_ui().animation_duration != new.get_ui().animation_duration ||
89838                old.get_ui().animation_timing_function != new.get_ui().animation_timing_function ||
89839                old.get_ui().animation_iteration_count != new.get_ui().animation_iteration_count ||
89840                old.get_ui().animation_direction != new.get_ui().animation_direction ||
89841                old.get_ui().animation_play_state != new.get_ui().animation_play_state ||
89842                old.get_ui().animation_fill_mode != new.get_ui().animation_fill_mode ||
89843                old.get_ui().animation_composition != new.get_ui().animation_composition ||
89844                old.get_ui().animation_delay != new.get_ui().animation_delay ||
89845                old.get_ui().animation_timeline != new.get_ui().animation_timeline ||
89846                old.get_ui().view_transition_name != new.get_ui().view_transition_name ||
89847                old.get_ui().view_transition_class != new.get_ui().view_transition_class ||
89848    false
89849}