2021-09-12 20:05:29 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								/*
 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-20 18:56:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  Copyright  ( c )  2021 - 2023 ,  Andreas  Kling  < kling @ serenityos . org > 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-13 19:54:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  Copyright  ( c )  2021 ,  Tobias  Christiansen  < tobyase @ serenityos . org > 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-23 17:44:13 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								 *  Copyright  ( c )  2022 - 2023 ,  Sam  Atkins  < atkinssj @ serenityos . org > 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 20:05:29 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 *  SPDX - License - Identifier :  BSD - 2 - Clause 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								 */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-02-06 14:17:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <AK/Debug.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-06 03:08:20 -03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <AK/Format.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-14 00:38:46 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <AK/NonnullRefPtr.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-13 20:05:56 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/Enums.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-23 12:35:56 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/ResolvedCSSStyleDeclaration.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-24 13:49:57 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleComputer.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-23 17:44:13 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/BackgroundRepeatStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-23 17:35:44 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/BackgroundStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-25 00:29:33 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/BorderRadiusShorthandStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-25 00:33:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/BorderRadiusStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-23 20:56:30 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/BorderStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-30 17:34:14 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/CalculatedStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-23 21:12:15 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/ColorStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-03 00:04:00 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/EdgeStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-24 14:48:19 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-24 14:50:50 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/GridTrackPlacementShorthandStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-24 14:53:08 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-29 19:32:56 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/GridTrackSizeListShorthandStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-29 17:59:07 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/GridTrackSizeListStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-24 15:04:24 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/IdentifierStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-24 16:55:44 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/InitialStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-24 17:04:04 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/LengthStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-24 17:16:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/NumericStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-24 17:28:43 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/PercentageStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-24 17:35:31 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/PositionStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-25 00:02:50 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/RectStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-24 17:45:25 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/ShadowStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-25 00:12:21 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/StyleValueList.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-24 17:59:33 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/CSS/StyleValues/TransformationStyleValue.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 20:05:29 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								# include  <LibWeb/DOM/Document.h> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# include  <LibWeb/DOM/Element.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-25 11:04:29 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/Layout/Viewport.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-19 16:44:24 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# include  <LibWeb/Painting/PaintableBox.h> 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# include  <LibWeb/Painting/StackingContext.h> 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 20:05:29 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								namespace  Web : : CSS  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-02-14 20:39:13 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								WebIDL : : ExceptionOr < JS : : NonnullGCPtr < ResolvedCSSStyleDeclaration > >  ResolvedCSSStyleDeclaration : : create ( DOM : : Element &  element ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-07 16:21:26 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-14 20:39:13 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    return  MUST_OR_THROW_OOM ( element . realm ( ) . heap ( ) . allocate < ResolvedCSSStyleDeclaration > ( element . realm ( ) ,  element ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-07 16:21:26 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-23 12:35:56 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								ResolvedCSSStyleDeclaration : : ResolvedCSSStyleDeclaration ( DOM : : Element &  element ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-24 16:34:04 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    :  CSSStyleDeclaration ( element . realm ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-07 16:21:26 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    ,  m_element ( element ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 20:05:29 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-08-28 13:42:07 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								void  ResolvedCSSStyleDeclaration : : visit_edges ( Cell : : Visitor &  visitor ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    Base : : visit_edges ( visitor ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    visitor . visit ( m_element . ptr ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-23 12:35:56 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								size_t  ResolvedCSSStyleDeclaration : : length ( )  const 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 20:05:29 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    return  0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-12-04 18:02:33 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								DeprecatedString  ResolvedCSSStyleDeclaration : : item ( size_t  index )  const 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 20:05:29 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ( void ) index ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    return  { } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-03-30 23:26:28 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								static  NonnullRefPtr < StyleValue  const >  style_value_for_background_property ( Layout : : NodeWithStyle  const &  layout_node ,  Function < NonnullRefPtr < StyleValue  const > ( BackgroundLayerData  const & ) >  callback ,  Function < NonnullRefPtr < StyleValue  const > ( ) >  default_value ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    auto  const &  background_layers  =  layout_node . background_layers ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  ( background_layers . is_empty ( ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  default_value ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  ( background_layers . size ( )  = =  1 ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  callback ( background_layers . first ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    StyleValueVector  values ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    for  ( auto  const &  layer  :  background_layers ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        values . append ( callback ( layer ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    return  StyleValueList : : create ( move ( values ) ,  StyleValueList : : Separator : : Comma ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-30 23:26:28 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								static  RefPtr < StyleValue >  style_value_for_display ( CSS : : Display  display ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 20:05:29 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( display . is_none ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( CSS : : ValueID : : None ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-04-13 01:03:40 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( display . is_outside_and_inside ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-20 00:41:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        StyleValueVector  values ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        switch  ( display . outside ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Outside : : Inline : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            values . append ( IdentifierStyleValue : : create ( CSS : : ValueID : : Inline ) . release_value_but_fixme_should_propagate_errors ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            break ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Outside : : Block : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            values . append ( IdentifierStyleValue : : create ( CSS : : ValueID : : Block ) . release_value_but_fixme_should_propagate_errors ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            break ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Outside : : RunIn : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            values . append ( IdentifierStyleValue : : create ( CSS : : ValueID : : RunIn ) . release_value_but_fixme_should_propagate_errors ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            break ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        switch  ( display . inside ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Inside : : Flow : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            values . append ( IdentifierStyleValue : : create ( CSS : : ValueID : : Flow ) . release_value_but_fixme_should_propagate_errors ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            break ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Inside : : FlowRoot : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            values . append ( IdentifierStyleValue : : create ( CSS : : ValueID : : FlowRoot ) . release_value_but_fixme_should_propagate_errors ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            break ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Inside : : Table : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            values . append ( IdentifierStyleValue : : create ( CSS : : ValueID : : Table ) . release_value_but_fixme_should_propagate_errors ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            break ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Inside : : Flex : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            values . append ( IdentifierStyleValue : : create ( CSS : : ValueID : : Flex ) . release_value_but_fixme_should_propagate_errors ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            break ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Inside : : Grid : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            values . append ( IdentifierStyleValue : : create ( CSS : : ValueID : : Grid ) . release_value_but_fixme_should_propagate_errors ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            break ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Inside : : Ruby : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            values . append ( IdentifierStyleValue : : create ( CSS : : ValueID : : Ruby ) . release_value_but_fixme_should_propagate_errors ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            break ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  StyleValueList : : create ( move ( values ) ,  StyleValueList : : Separator : : Space ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 20:05:29 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  ( display . is_internal ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        switch  ( display . internal ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Internal : : TableRowGroup : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            return  IdentifierStyleValue : : create ( CSS : : ValueID : : TableRowGroup ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Internal : : TableHeaderGroup : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            return  IdentifierStyleValue : : create ( CSS : : ValueID : : TableHeaderGroup ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Internal : : TableFooterGroup : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            return  IdentifierStyleValue : : create ( CSS : : ValueID : : TableFooterGroup ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Internal : : TableRow : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            return  IdentifierStyleValue : : create ( CSS : : ValueID : : TableRow ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Internal : : TableCell : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            return  IdentifierStyleValue : : create ( CSS : : ValueID : : TableCell ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Internal : : TableColumnGroup : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            return  IdentifierStyleValue : : create ( CSS : : ValueID : : TableColumnGroup ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Internal : : TableColumn : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            return  IdentifierStyleValue : : create ( CSS : : ValueID : : TableColumn ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Internal : : TableCaption : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            return  IdentifierStyleValue : : create ( CSS : : ValueID : : TableCaption ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Internal : : RubyBase : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            return  IdentifierStyleValue : : create ( CSS : : ValueID : : RubyBase ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Internal : : RubyText : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            return  IdentifierStyleValue : : create ( CSS : : ValueID : : RubyText ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Internal : : RubyBaseContainer : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            return  IdentifierStyleValue : : create ( CSS : : ValueID : : RubyBaseContainer ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        case  CSS : : Display : : Internal : : RubyTextContainer : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            return  IdentifierStyleValue : : create ( CSS : : ValueID : : RubyTextContainer ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-06 17:57:44 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    TODO ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 20:05:29 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-02-20 18:56:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								static  NonnullRefPtr < StyleValue  const >  value_or_default ( Optional < StyleProperty >  property ,  NonnullRefPtr < StyleValue >  default_style ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-14 00:38:46 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  ( property . has_value ( ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  property . value ( ) . value ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    return  default_style ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-02-20 18:56:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								static  NonnullRefPtr < StyleValue  const >  style_value_for_length_percentage ( LengthPercentage  const &  length_percentage ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-19 11:52:01 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-19 11:20:50 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( length_percentage . is_auto ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( ValueID : : Auto ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-19 11:52:01 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( length_percentage . is_percentage ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  PercentageStyleValue : : create ( length_percentage . percentage ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-03 22:05:03 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( length_percentage . is_length ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  LengthStyleValue : : create ( length_percentage . length ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-03 22:05:03 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    return  length_percentage . calculated ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-19 11:52:01 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-02-20 18:56:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								static  NonnullRefPtr < StyleValue  const >  style_value_for_size ( CSS : : Size  const &  size ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-25 15:48:23 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  ( size . is_none ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( ValueID : : None ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-25 15:48:23 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( size . is_percentage ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  PercentageStyleValue : : create ( size . percentage ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-25 15:48:23 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( size . is_length ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  LengthStyleValue : : create ( size . length ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-25 15:48:23 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( size . is_auto ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( ValueID : : Auto ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-30 10:50:40 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( size . is_calculated ( ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  size . calculated ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-25 15:48:23 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( size . is_min_content ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( ValueID : : MinContent ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-25 15:48:23 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( size . is_max_content ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( ValueID : : MaxContent ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-25 15:48:23 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    // FIXME: Support fit-content(<length>)
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    TODO ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-02-20 18:56:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								RefPtr < StyleValue  const >  ResolvedCSSStyleDeclaration : : style_value_for_property ( Layout : : NodeWithStyle  const &  layout_node ,  PropertyID  property_id )  const 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 20:05:29 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    switch  ( property_id )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Background :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_background_color  =  property ( CSS : : PropertyID : : BackgroundColor ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_background_image  =  property ( CSS : : PropertyID : : BackgroundImage ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_background_position  =  property ( CSS : : PropertyID : : BackgroundPosition ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_background_size  =  property ( CSS : : PropertyID : : BackgroundSize ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_background_repeat  =  property ( CSS : : PropertyID : : BackgroundRepeat ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_background_attachment  =  property ( CSS : : PropertyID : : BackgroundAttachment ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_background_origin  =  property ( CSS : : PropertyID : : BackgroundOrigin ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_background_clip  =  property ( CSS : : PropertyID : : BackgroundClip ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  BackgroundStyleValue : : create ( 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            value_or_default ( maybe_background_color ,  InitialStyleValue : : the ( ) . release_value_but_fixme_should_propagate_errors ( ) ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            value_or_default ( maybe_background_image ,  IdentifierStyleValue : : create ( CSS : : ValueID : : None ) . release_value_but_fixme_should_propagate_errors ( ) ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            value_or_default ( maybe_background_position ,  PositionStyleValue : : create ( EdgeStyleValue : : create ( PositionEdge : : Left ,  Length : : make_px ( 0 ) ) . release_value_but_fixme_should_propagate_errors ( ) ,  EdgeStyleValue : : create ( PositionEdge : : Top ,  Length : : make_px ( 0 ) ) . release_value_but_fixme_should_propagate_errors ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            value_or_default ( maybe_background_size ,  IdentifierStyleValue : : create ( CSS : : ValueID : : Auto ) . release_value_but_fixme_should_propagate_errors ( ) ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            value_or_default ( maybe_background_repeat ,  BackgroundRepeatStyleValue : : create ( CSS : : Repeat : : Repeat ,  CSS : : Repeat : : Repeat ) . release_value_but_fixme_should_propagate_errors ( ) ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            value_or_default ( maybe_background_attachment ,  IdentifierStyleValue : : create ( CSS : : ValueID : : Scroll ) . release_value_but_fixme_should_propagate_errors ( ) ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            value_or_default ( maybe_background_origin ,  IdentifierStyleValue : : create ( CSS : : ValueID : : PaddingBox ) . release_value_but_fixme_should_propagate_errors ( ) ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            value_or_default ( maybe_background_clip ,  IdentifierStyleValue : : create ( CSS : : ValueID : : BorderBox ) . release_value_but_fixme_should_propagate_errors ( ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-30 23:26:28 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BackgroundAttachment : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  style_value_for_background_property ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            layout_node , 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            [ ] ( auto &  layer )  {  return  IdentifierStyleValue : : create ( to_value_id ( layer . attachment ) ) . release_value_but_fixme_should_propagate_errors ( ) ;  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            [ ]  {  return  IdentifierStyleValue : : create ( CSS : : ValueID : : Scroll ) . release_value_but_fixme_should_propagate_errors ( ) ;  } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-30 23:26:28 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BackgroundClip : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  style_value_for_background_property ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            layout_node , 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            [ ] ( auto &  layer )  {  return  IdentifierStyleValue : : create ( to_value_id ( layer . clip ) ) . release_value_but_fixme_should_propagate_errors ( ) ;  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            [ ]  {  return  IdentifierStyleValue : : create ( CSS : : ValueID : : BorderBox ) . release_value_but_fixme_should_propagate_errors ( ) ;  } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  PropertyID : : BackgroundColor : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  ColorStyleValue : : create ( layout_node . computed_values ( ) . background_color ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-30 23:26:28 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BackgroundImage : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  style_value_for_background_property ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            layout_node , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            [ ] ( auto &  layer )  - >  NonnullRefPtr < StyleValue  const >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                if  ( layer . background_image ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    return  * layer . background_image ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                return  IdentifierStyleValue : : create ( CSS : : ValueID : : None ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-30 23:26:28 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            } , 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            [ ]  {  return  IdentifierStyleValue : : create ( CSS : : ValueID : : None ) . release_value_but_fixme_should_propagate_errors ( ) ;  } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-30 23:26:28 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BackgroundOrigin : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  style_value_for_background_property ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            layout_node , 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            [ ] ( auto &  layer )  {  return  IdentifierStyleValue : : create ( to_value_id ( layer . origin ) ) . release_value_but_fixme_should_propagate_errors ( ) ;  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            [ ]  {  return  IdentifierStyleValue : : create ( CSS : : ValueID : : PaddingBox ) . release_value_but_fixme_should_propagate_errors ( ) ;  } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-30 23:26:28 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BackgroundRepeat : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  style_value_for_background_property ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            layout_node , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            [ ] ( auto &  layer )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                StyleValueVector  repeat  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                    IdentifierStyleValue : : create ( to_value_id ( layer . repeat_x ) ) . release_value_but_fixme_should_propagate_errors ( ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                    IdentifierStyleValue : : create ( to_value_id ( layer . repeat_y ) ) . release_value_but_fixme_should_propagate_errors ( ) , 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-30 23:26:28 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                } ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                return  StyleValueList : : create ( move ( repeat ) ,  StyleValueList : : Separator : : Space ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-30 23:26:28 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            } , 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            [ ]  {  return  BackgroundRepeatStyleValue : : create ( CSS : : Repeat : : Repeat ,  CSS : : Repeat : : Repeat ) . release_value_but_fixme_should_propagate_errors ( ) ;  } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderBottom :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  border  =  layout_node . computed_values ( ) . border_bottom ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        auto  width  =  LengthStyleValue : : create ( Length : : make_px ( border . width ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  style  =  IdentifierStyleValue : : create ( to_value_id ( border . line_style ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  color  =  ColorStyleValue : : create ( border . color ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  BorderStyleValue : : create ( width ,  style ,  color ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderBottomColor : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  ColorStyleValue : : create ( layout_node . computed_values ( ) . border_bottom ( ) . color ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderBottomLeftRadius :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  const &  border_radius  =  layout_node . computed_values ( ) . border_bottom_left_radius ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  BorderRadiusStyleValue : : create ( border_radius . horizontal_radius ,  border_radius . vertical_radius ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderBottomRightRadius :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  const &  border_radius  =  layout_node . computed_values ( ) . border_bottom_right_radius ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  BorderRadiusStyleValue : : create ( border_radius . horizontal_radius ,  border_radius . vertical_radius ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderBottomStyle : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . border_bottom ( ) . line_style ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderBottomWidth : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  LengthStyleValue : : create ( Length : : make_px ( layout_node . computed_values ( ) . border_bottom ( ) . width ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-02 23:01:29 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderCollapse : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . border_collapse ( ) ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderLeft :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  border  =  layout_node . computed_values ( ) . border_left ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        auto  width  =  LengthStyleValue : : create ( Length : : make_px ( border . width ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  style  =  IdentifierStyleValue : : create ( to_value_id ( border . line_style ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  color  =  ColorStyleValue : : create ( border . color ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  BorderStyleValue : : create ( width ,  style ,  color ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderLeftColor : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  ColorStyleValue : : create ( layout_node . computed_values ( ) . border_left ( ) . color ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderLeftStyle : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . border_left ( ) . line_style ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderLeftWidth : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  LengthStyleValue : : create ( Length : : make_px ( layout_node . computed_values ( ) . border_left ( ) . width ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderRadius :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_top_left_radius  =  property ( CSS : : PropertyID : : BorderTopLeftRadius ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_top_right_radius  =  property ( CSS : : PropertyID : : BorderTopRightRadius ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_bottom_left_radius  =  property ( CSS : : PropertyID : : BorderBottomLeftRadius ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_bottom_right_radius  =  property ( CSS : : PropertyID : : BorderBottomRightRadius ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-20 18:56:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        RefPtr < BorderRadiusStyleValue  const >  top_left_radius ,  top_right_radius ,  bottom_left_radius ,  bottom_right_radius ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        if  ( maybe_top_left_radius . has_value ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            VERIFY ( maybe_top_left_radius . value ( ) . value - > is_border_radius ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            top_left_radius  =  maybe_top_left_radius . value ( ) . value - > as_border_radius ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( maybe_top_right_radius . has_value ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            VERIFY ( maybe_top_right_radius . value ( ) . value - > is_border_radius ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            top_right_radius  =  maybe_top_right_radius . value ( ) . value - > as_border_radius ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( maybe_bottom_left_radius . has_value ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            VERIFY ( maybe_bottom_left_radius . value ( ) . value - > is_border_radius ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            bottom_left_radius  =  maybe_bottom_left_radius . value ( ) . value - > as_border_radius ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( maybe_bottom_right_radius . has_value ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            VERIFY ( maybe_bottom_right_radius . value ( ) . value - > is_border_radius ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            bottom_right_radius  =  maybe_bottom_right_radius . value ( ) . value - > as_border_radius ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  BorderRadiusShorthandStyleValue : : create ( top_left_radius . release_nonnull ( ) ,  top_right_radius . release_nonnull ( ) ,  bottom_right_radius . release_nonnull ( ) ,  bottom_left_radius . release_nonnull ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderRight :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  border  =  layout_node . computed_values ( ) . border_right ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        auto  width  =  LengthStyleValue : : create ( Length : : make_px ( border . width ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  style  =  IdentifierStyleValue : : create ( to_value_id ( border . line_style ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  color  =  ColorStyleValue : : create ( border . color ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  BorderStyleValue : : create ( width ,  style ,  color ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderRightColor : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  ColorStyleValue : : create ( layout_node . computed_values ( ) . border_right ( ) . color ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderRightStyle : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . border_right ( ) . line_style ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderRightWidth : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  LengthStyleValue : : create ( Length : : make_px ( layout_node . computed_values ( ) . border_right ( ) . width ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderTop :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  border  =  layout_node . computed_values ( ) . border_top ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        auto  width  =  LengthStyleValue : : create ( Length : : make_px ( border . width ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  style  =  IdentifierStyleValue : : create ( to_value_id ( border . line_style ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  color  =  ColorStyleValue : : create ( border . color ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  BorderStyleValue : : create ( width ,  style ,  color ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderTopColor : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  ColorStyleValue : : create ( layout_node . computed_values ( ) . border_top ( ) . color ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderTopLeftRadius :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  const &  border_radius  =  layout_node . computed_values ( ) . border_top_left_radius ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  BorderRadiusStyleValue : : create ( border_radius . horizontal_radius ,  border_radius . vertical_radius ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderTopRightRadius :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  const &  border_radius  =  layout_node . computed_values ( ) . border_top_right_radius ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  BorderRadiusStyleValue : : create ( border_radius . horizontal_radius ,  border_radius . vertical_radius ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderTopStyle : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . border_top ( ) . line_style ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BorderTopWidth : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  LengthStyleValue : : create ( Length : : make_px ( layout_node . computed_values ( ) . border_top ( ) . width ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BoxShadow :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  box_shadow_layers  =  layout_node . computed_values ( ) . box_shadow ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( box_shadow_layers . is_empty ( ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            return  { } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  make_box_shadow_style_value  =  [ ] ( ShadowData  const &  data )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            return  ShadowStyleValue : : create ( data . color ,  data . offset_x ,  data . offset_y ,  data . blur_radius ,  data . spread_distance ,  data . placement ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( box_shadow_layers . size ( )  = =  1 ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            return  make_box_shadow_style_value ( box_shadow_layers . first ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-02-20 00:41:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        StyleValueVector  box_shadow ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        box_shadow . ensure_capacity ( box_shadow_layers . size ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        for  ( auto  const &  layer  :  box_shadow_layers ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            box_shadow . append ( make_box_shadow_style_value ( layer ) . release_value_but_fixme_should_propagate_errors ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  StyleValueList : : create ( move ( box_shadow ) ,  StyleValueList : : Separator : : Comma ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : BoxSizing : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . box_sizing ( ) ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-11-14 21:18:52 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Bottom : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  style_value_for_length_percentage ( layout_node . computed_values ( ) . inset ( ) . bottom ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-13 19:54:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Clear : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . clear ( ) ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-31 18:47:09 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Clip : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  RectStyleValue : : create ( layout_node . computed_values ( ) . clip ( ) . to_rect ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Color : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  ColorStyleValue : : create ( layout_node . computed_values ( ) . color ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-11-06 12:42:22 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : ColumnGap : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  style_value_for_size ( layout_node . computed_values ( ) . column_gap ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-13 19:54:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Cursor : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . cursor ( ) ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-13 19:54:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Display : 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-06 16:02:53 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  style_value_for_display ( layout_node . display ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-13 19:54:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : FlexBasis :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        switch  ( layout_node . computed_values ( ) . flex_basis ( ) . type )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        case  FlexBasis : : Content : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            return  IdentifierStyleValue : : create ( CSS : : ValueID : : Content ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-01-19 11:52:01 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        case  FlexBasis : : LengthPercentage : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            return  style_value_for_length_percentage ( * layout_node . computed_values ( ) . flex_basis ( ) . length_percentage ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-13 19:54:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        case  FlexBasis : : Auto : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            return  IdentifierStyleValue : : create ( CSS : : ValueID : : Auto ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-18 13:14:40 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        default : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            VERIFY_NOT_REACHED ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-13 19:54:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-18 13:14:40 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        break ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : FlexDirection : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . flex_direction ( ) ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-19 15:22:08 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : FlexGrow : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  NumericStyleValue : : create_float ( layout_node . computed_values ( ) . flex_grow ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-19 15:22:08 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : FlexShrink : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  NumericStyleValue : : create_float ( layout_node . computed_values ( ) . flex_shrink ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : FlexWrap : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . flex_wrap ( ) ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Float : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . float_ ( ) ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 15:51:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : FontSize : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  LengthStyleValue : : create ( Length : : make_px ( layout_node . computed_values ( ) . font_size ( ) ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 15:51:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : FontVariant :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  font_variant  =  layout_node . computed_values ( ) . font_variant ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        switch  ( font_variant )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        case  FontVariant : : Normal : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            return  IdentifierStyleValue : : create ( ValueID : : Normal ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 15:51:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        case  FontVariant : : SmallCaps : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            return  IdentifierStyleValue : : create ( ValueID : : SmallCaps ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 15:51:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        VERIFY_NOT_REACHED ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : FontWeight : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  NumericStyleValue : : create_integer ( layout_node . computed_values ( ) . font_weight ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-16 19:02:39 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : GridArea :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_grid_row_start  =  property ( CSS : : PropertyID : : GridRowStart ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_grid_column_start  =  property ( CSS : : PropertyID : : GridColumnStart ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_grid_row_end  =  property ( CSS : : PropertyID : : GridRowEnd ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_grid_column_end  =  property ( CSS : : PropertyID : : GridColumnEnd ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-20 18:56:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        RefPtr < GridTrackPlacementStyleValue  const >  grid_row_start ,  grid_column_start ,  grid_row_end ,  grid_column_end ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-16 19:02:39 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        if  ( maybe_grid_row_start . has_value ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            VERIFY ( maybe_grid_row_start . value ( ) . value - > is_grid_track_placement ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            grid_row_start  =  maybe_grid_row_start . value ( ) . value - > as_grid_track_placement ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( maybe_grid_column_start . has_value ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            VERIFY ( maybe_grid_column_start . value ( ) . value - > is_grid_track_placement ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            grid_column_start  =  maybe_grid_column_start . value ( ) . value - > as_grid_track_placement ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( maybe_grid_row_end . has_value ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            VERIFY ( maybe_grid_row_end . value ( ) . value - > is_grid_track_placement ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            grid_row_end  =  maybe_grid_row_end . value ( ) . value - > as_grid_track_placement ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( maybe_grid_column_end . has_value ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            VERIFY ( maybe_grid_column_end . value ( ) . value - > is_grid_track_placement ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            grid_column_end  =  maybe_grid_column_end . value ( ) . value - > as_grid_track_placement ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  GridAreaShorthandStyleValue : : create ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            grid_row_start . release_nonnull ( ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            grid_column_start . release_nonnull ( ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            grid_row_end . release_nonnull ( ) , 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            grid_column_end . release_nonnull ( ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-01-16 19:02:39 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-23 20:00:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : GridColumn :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_grid_column_end  =  property ( CSS : : PropertyID : : GridColumnEnd ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_grid_column_start  =  property ( CSS : : PropertyID : : GridColumnStart ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-20 18:56:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        RefPtr < GridTrackPlacementStyleValue  const >  grid_column_start ,  grid_column_end ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-23 20:00:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        if  ( maybe_grid_column_end . has_value ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            VERIFY ( maybe_grid_column_end . value ( ) . value - > is_grid_track_placement ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            grid_column_end  =  maybe_grid_column_end . value ( ) . value - > as_grid_track_placement ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( maybe_grid_column_start . has_value ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            VERIFY ( maybe_grid_column_start . value ( ) . value - > is_grid_track_placement ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            grid_column_start  =  maybe_grid_column_start . value ( ) . value - > as_grid_track_placement ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  GridTrackPlacementShorthandStyleValue : : create ( grid_column_end . release_nonnull ( ) ,  grid_column_start . release_nonnull ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-23 20:00:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-23 19:58:00 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : GridColumnEnd : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  GridTrackPlacementStyleValue : : create ( layout_node . computed_values ( ) . grid_column_end ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-23 19:58:00 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : GridColumnStart : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  GridTrackPlacementStyleValue : : create ( layout_node . computed_values ( ) . grid_column_start ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-23 20:00:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : GridRow :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_grid_row_end  =  property ( CSS : : PropertyID : : GridRowEnd ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_grid_row_start  =  property ( CSS : : PropertyID : : GridRowStart ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-20 18:56:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        RefPtr < GridTrackPlacementStyleValue  const >  grid_row_start ,  grid_row_end ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-23 20:00:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        if  ( maybe_grid_row_end . has_value ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            VERIFY ( maybe_grid_row_end . value ( ) . value - > is_grid_track_placement ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            grid_row_end  =  maybe_grid_row_end . value ( ) . value - > as_grid_track_placement ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( maybe_grid_row_start . has_value ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            VERIFY ( maybe_grid_row_start . value ( ) . value - > is_grid_track_placement ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            grid_row_start  =  maybe_grid_row_start . value ( ) . value - > as_grid_track_placement ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  GridTrackPlacementShorthandStyleValue : : create ( grid_row_end . release_nonnull ( ) ,  grid_row_start . release_nonnull ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-23 20:00:16 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-23 19:58:00 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : GridRowEnd : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  GridTrackPlacementStyleValue : : create ( layout_node . computed_values ( ) . grid_row_end ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-23 19:58:00 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : GridRowStart : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  GridTrackPlacementStyleValue : : create ( layout_node . computed_values ( ) . grid_row_start ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-29 19:32:56 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : GridTemplate :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_grid_template_areas  =  property ( CSS : : PropertyID : : GridTemplateAreas ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_grid_template_rows  =  property ( CSS : : PropertyID : : GridTemplateRows ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_grid_template_columns  =  property ( CSS : : PropertyID : : GridTemplateColumns ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        RefPtr < GridTemplateAreaStyleValue  const >  grid_template_areas ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        RefPtr < GridTrackSizeListStyleValue  const >  grid_template_rows ,  grid_template_columns ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( maybe_grid_template_areas . has_value ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            VERIFY ( maybe_grid_template_areas . value ( ) . value - > is_grid_template_area ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            grid_template_areas  =  maybe_grid_template_areas . value ( ) . value - > as_grid_template_area ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( maybe_grid_template_rows . has_value ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            VERIFY ( maybe_grid_template_rows . value ( ) . value - > is_grid_track_size_list ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            grid_template_rows  =  maybe_grid_template_rows . value ( ) . value - > as_grid_track_size_list ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( maybe_grid_template_columns . has_value ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            VERIFY ( maybe_grid_template_columns . value ( ) . value - > is_grid_track_size_list ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            grid_template_columns  =  maybe_grid_template_columns . value ( ) . value - > as_grid_track_size_list ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  GridTrackSizeListShorthandStyleValue : : create ( grid_template_areas . release_nonnull ( ) ,  grid_template_rows . release_nonnull ( ) ,  grid_template_columns . release_nonnull ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-29 19:32:56 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-23 19:49:07 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : GridTemplateColumns : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  GridTrackSizeListStyleValue : : create ( layout_node . computed_values ( ) . grid_template_columns ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-08-23 19:49:07 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : GridTemplateRows : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  GridTrackSizeListStyleValue : : create ( layout_node . computed_values ( ) . grid_template_rows ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-01 11:23:40 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : GridTemplateAreas : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  GridTemplateAreaStyleValue : : create ( layout_node . computed_values ( ) . grid_template_areas ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Height : 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-25 15:48:23 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  style_value_for_size ( layout_node . computed_values ( ) . height ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-18 12:21:27 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : ImageRendering : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . image_rendering ( ) ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-13 19:54:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : JustifyContent : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . justify_content ( ) ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-11-14 21:18:52 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Left : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  style_value_for_length_percentage ( layout_node . computed_values ( ) . inset ( ) . left ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-26 15:51:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : LineHeight : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  LengthStyleValue : : create ( Length : : make_px ( layout_node . line_height ( ) ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : ListStyleType : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . list_style_type ( ) ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-05 17:11:38 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Margin :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  margin  =  layout_node . computed_values ( ) . margin ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-20 00:41:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        auto  values  =  StyleValueVector  { } ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-13 17:42:39 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        values . append ( style_value_for_length_percentage ( margin . top ( ) ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        values . append ( style_value_for_length_percentage ( margin . right ( ) ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        values . append ( style_value_for_length_percentage ( margin . bottom ( ) ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        values . append ( style_value_for_length_percentage ( margin . left ( ) ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  StyleValueList : : create ( move ( values ) ,  StyleValueList : : Separator : : Space ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-05 17:11:38 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-13 19:54:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : MarginBottom : 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-13 17:42:39 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  style_value_for_length_percentage ( layout_node . computed_values ( ) . margin ( ) . bottom ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-13 19:54:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : MarginLeft : 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-13 17:42:39 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  style_value_for_length_percentage ( layout_node . computed_values ( ) . margin ( ) . left ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : MarginRight : 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-13 17:42:39 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  style_value_for_length_percentage ( layout_node . computed_values ( ) . margin ( ) . right ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : MarginTop : 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-13 17:42:39 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  style_value_for_length_percentage ( layout_node . computed_values ( ) . margin ( ) . top ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : MaxHeight : 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-25 15:48:23 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  style_value_for_size ( layout_node . computed_values ( ) . max_height ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : MaxWidth : 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-25 15:48:23 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  style_value_for_size ( layout_node . computed_values ( ) . max_width ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : MinHeight : 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-25 15:48:23 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  style_value_for_size ( layout_node . computed_values ( ) . min_height ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : MinWidth : 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-25 15:48:23 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  style_value_for_size ( layout_node . computed_values ( ) . min_width ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Opacity : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  NumericStyleValue : : create_float ( layout_node . computed_values ( ) . opacity ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Order : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  NumericStyleValue : : create_integer ( layout_node . computed_values ( ) . order ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : OverflowX : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . overflow_x ( ) ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : OverflowY : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . overflow_y ( ) ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-05 17:11:38 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Padding :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  padding  =  layout_node . computed_values ( ) . padding ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-20 00:41:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        auto  values  =  StyleValueVector  { } ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-13 17:42:39 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        values . append ( style_value_for_length_percentage ( padding . top ( ) ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        values . append ( style_value_for_length_percentage ( padding . right ( ) ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        values . append ( style_value_for_length_percentage ( padding . bottom ( ) ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        values . append ( style_value_for_length_percentage ( padding . left ( ) ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  StyleValueList : : create ( move ( values ) ,  StyleValueList : : Separator : : Space ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-05 17:11:38 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-13 19:54:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : PaddingBottom : 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-27 13:13:21 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  style_value_for_length_percentage ( layout_node . computed_values ( ) . padding ( ) . bottom ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-13 19:54:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : PaddingLeft : 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-13 17:42:39 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  style_value_for_length_percentage ( layout_node . computed_values ( ) . padding ( ) . left ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : PaddingRight : 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-13 17:42:39 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  style_value_for_length_percentage ( layout_node . computed_values ( ) . padding ( ) . right ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : PaddingTop : 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-13 17:42:39 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  style_value_for_length_percentage ( layout_node . computed_values ( ) . padding ( ) . top ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Position : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . position ( ) ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-11-14 21:18:52 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Right : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  style_value_for_length_percentage ( layout_node . computed_values ( ) . inset ( ) . right ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-11-06 12:42:22 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : RowGap : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  style_value_for_size ( layout_node . computed_values ( ) . row_gap ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : TextAlign : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . text_align ( ) ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : TextDecorationLine :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  text_decoration_lines  =  layout_node . computed_values ( ) . text_decoration_line ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( text_decoration_lines . is_empty ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            return  IdentifierStyleValue : : create ( ValueID : : None ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-20 00:41:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        StyleValueVector  style_values ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        for  ( auto  const &  line  :  text_decoration_lines )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            style_values . append ( IdentifierStyleValue : : create ( to_value_id ( line ) ) . release_value_but_fixme_should_propagate_errors ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-14 00:38:46 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  StyleValueList : : create ( move ( style_values ) ,  StyleValueList : : Separator : : Space ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-14 00:38:46 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : TextDecorationStyle : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . text_decoration_style ( ) ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : TextTransform : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . text_transform ( ) ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-11-14 21:18:52 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Top : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  style_value_for_length_percentage ( layout_node . computed_values ( ) . inset ( ) . top ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-19 16:44:24 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Transform :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        // NOTE: The computed value for `transform` serializes as a single `matrix(...)` value, instead of
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        //       the original list of transform functions. So, we produce a StyleValue for that.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        //       https://www.w3.org/TR/css-transforms-1/#serialization-of-the-computed-value
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  transformations  =  layout_node . computed_values ( ) . transformations ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( transformations . is_empty ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            return  IdentifierStyleValue : : create ( ValueID : : None ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-19 16:44:24 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        // The transform matrix is held by the StackingContext, so we need to make sure we have one first.
 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-25 11:04:29 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        auto  const *  viewport  =  layout_node . document ( ) . layout_node ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        VERIFY ( viewport ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        const_cast < Layout : : Viewport & > ( * viewport ) . build_stacking_context_tree_if_needed ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-19 16:44:24 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        VERIFY ( layout_node . paintable ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  const &  paintable_box  =  verify_cast < Painting : : PaintableBox  const > ( layout_node . paintable ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        VERIFY ( paintable_box - > stacking_context ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-01 01:57:54 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        // FIXME: This needs to serialize to matrix3d if the transformation matrix is a 3D matrix.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        //        https://w3c.github.io/csswg-drafts/css-transforms-2/#serialization-of-the-computed-value
 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-19 16:44:24 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        auto  affine_matrix  =  paintable_box - > stacking_context ( ) - > affine_transform_matrix ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-02-20 00:41:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        StyleValueVector  parameters ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-19 16:44:24 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        parameters . ensure_capacity ( 6 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        parameters . append ( NumericStyleValue : : create_float ( affine_matrix . a ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        parameters . append ( NumericStyleValue : : create_float ( affine_matrix . b ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        parameters . append ( NumericStyleValue : : create_float ( affine_matrix . c ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        parameters . append ( NumericStyleValue : : create_float ( affine_matrix . d ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        parameters . append ( NumericStyleValue : : create_float ( affine_matrix . e ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        parameters . append ( NumericStyleValue : : create_float ( affine_matrix . f ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-19 16:44:24 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        NonnullRefPtr < StyleValue >  matrix_function  =  TransformationStyleValue : : create ( TransformFunction : : Matrix ,  move ( parameters ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-19 16:44:24 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        // Elsewhere we always store the transform property's value as a StyleValueList of TransformationStyleValues,
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        // so this is just for consistency.
 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-20 00:41:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        StyleValueVector  matrix_functions ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-19 16:44:24 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        matrix_functions . append ( matrix_function ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  StyleValueList : : create ( move ( matrix_functions ) ,  StyleValueList : : Separator : : Space ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-19 16:44:24 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-26 01:34:07 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : VerticalAlign : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( auto  const *  length_percentage  =  layout_node . computed_values ( ) . vertical_align ( ) . get_pointer < CSS : : LengthPercentage > ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-19 11:20:50 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            return  style_value_for_length_percentage ( * length_percentage ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-26 01:34:07 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . vertical_align ( ) . get < CSS : : VerticalAlign > ( ) ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : WhiteSpace : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( to_value_id ( layout_node . computed_values ( ) . white_space ( ) ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Width : 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-25 15:48:23 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  style_value_for_size ( layout_node . computed_values ( ) . width ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : ZIndex :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  maybe_z_index  =  layout_node . computed_values ( ) . z_index ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( ! maybe_z_index . has_value ( ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            return  { } ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  NumericStyleValue : : create_integer ( maybe_z_index . release_value ( ) ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-14 17:04:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-14 00:38:46 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Invalid : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 15:02:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  IdentifierStyleValue : : create ( CSS : : ValueID : : Invalid ) . release_value_but_fixme_should_propagate_errors ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-14 00:38:46 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    case  CSS : : PropertyID : : Custom : 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-06 14:17:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        dbgln_if ( LIBWEB_CSS_DEBUG ,  " Computed style for custom properties was requested (?) " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-14 00:38:46 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  { } ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 20:05:29 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    default : 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-06 14:17:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        dbgln_if ( LIBWEB_CSS_DEBUG ,  " FIXME: Computed style for the '{}' property was requested " ,  string_from_property_id ( property_id ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 20:05:29 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								        return  { } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-18 13:14:40 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-23 12:35:56 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Optional < StyleProperty >  ResolvedCSSStyleDeclaration : : property ( PropertyID  property_id )  const 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-18 13:14:40 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-20 21:12:19 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if  ( CSS : : property_affects_layout ( property_id ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        const_cast < DOM : : Document & > ( m_element - > document ( ) ) . update_layout ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        // FIXME: If we had a way to update style for a single element, this would be a good place to use it.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        const_cast < DOM : : Document & > ( m_element - > document ( ) ) . update_style ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-18 13:14:40 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  ( ! m_element - > layout_node ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-06 03:08:20 -03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        auto  style_or_error  =  m_element - > document ( ) . style_computer ( ) . compute_style ( const_cast < DOM : : Element & > ( * m_element ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( style_or_error . is_error ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            dbgln ( " ResolvedCSSStyleDeclaration::property style computer failed " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            return  { } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  style  =  style_or_error . release_value ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-10-28 15:42:18 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        // FIXME: This is a stopgap until we implement shorthand -> longhand conversion.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        auto  value  =  style - > maybe_null_property ( property_id ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        if  ( ! value )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            dbgln ( " FIXME: ResolvedCSSStyleDeclaration::property(property_id=0x{:x}) No value for property ID in newly computed style case. " ,  to_underlying ( property_id ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            return  { } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-14 11:52:35 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        return  StyleProperty  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            . property_id  =  property_id , 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-28 15:42:18 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            . value  =  value . release_nonnull ( ) , 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-14 11:52:35 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        } ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-18 13:14:40 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    auto &  layout_node  =  * m_element - > layout_node ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    auto  value  =  style_value_for_property ( layout_node ,  property_id ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if  ( ! value ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        return  { } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    return  StyleProperty  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        . property_id  =  property_id , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        . value  =  value . release_nonnull ( ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 20:05:29 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-04-11 16:10:55 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								// https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty
 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-25 17:03:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								WebIDL : : ExceptionOr < void >  ResolvedCSSStyleDeclaration : : set_property ( PropertyID ,  StringView ,  StringView ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 20:05:29 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-11 16:10:55 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    // 1. If the computed flag is set, then throw a NoModificationAllowedError exception.
 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-24 16:34:04 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    return  WebIDL : : NoModificationAllowedError : : create ( realm ( ) ,  " Cannot modify properties in result of getComputedStyle() " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-11 16:10:55 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								// https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-removeproperty
 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-04 18:02:33 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								WebIDL : : ExceptionOr < DeprecatedString >  ResolvedCSSStyleDeclaration : : remove_property ( PropertyID ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-04-11 16:10:55 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    // 1. If the computed flag is set, then throw a NoModificationAllowedError exception.
 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-24 16:34:04 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    return  WebIDL : : NoModificationAllowedError : : create ( realm ( ) ,  " Cannot remove properties from result of getComputedStyle() " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 20:05:29 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-01 19:57:45 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-12-04 18:02:33 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								DeprecatedString  ResolvedCSSStyleDeclaration : : serialized ( )  const 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-01 19:57:45 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-15 19:38:39 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    // https://www.w3.org/TR/cssom/#dom-cssstyledeclaration-csstext
 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-01 19:57:45 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    // If the computed flag is set, then return the empty string.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    // NOTE: ResolvedCSSStyleDeclaration is something you would only get from window.getComputedStyle(),
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    //       which returns what the spec calls "resolved style". The "computed flag" is always set here.
 
							 
						 
					
						
							
								
									
										
										
										
											2022-12-04 18:02:33 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    return  DeprecatedString : : empty ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-01 19:57:45 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-11-05 04:51:05 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								// https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-csstext
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								WebIDL : : ExceptionOr < void >  ResolvedCSSStyleDeclaration : : set_css_text ( StringView ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    // 1. If the computed flag is set, then throw a NoModificationAllowedError exception.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    return  WebIDL : : NoModificationAllowedError : : create ( realm ( ) ,  " Cannot modify properties in result of getComputedStyle() " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-12 20:05:29 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								}