| 
									
										
										
										
											2021-03-09 17:36:21 +01:00
										 |  |  | /*
 | 
					
						
							| 
									
										
										
										
											2021-04-28 22:46:44 +02:00
										 |  |  |  * Copyright (c) 2020-2021, the SerenityOS developers. | 
					
						
							| 
									
										
										
										
											2021-03-09 17:36:21 +01:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2021-04-22 01:24:48 -07:00
										 |  |  |  * SPDX-License-Identifier: BSD-2-Clause | 
					
						
							| 
									
										
										
										
											2021-03-09 17:36:21 +01:00
										 |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-04 18:02:33 +00:00
										 |  |  | #include <AK/DeprecatedString.h>
 | 
					
						
							| 
									
										
										
										
											2021-03-09 17:36:21 +01:00
										 |  |  | #include <AK/Vector.h>
 | 
					
						
							| 
									
										
										
										
											2022-02-12 14:53:59 +00:00
										 |  |  | #include <LibWeb/CSS/CSSStyleDeclaration.h>
 | 
					
						
							| 
									
										
										
										
											2022-03-31 11:43:07 +01:00
										 |  |  | #include <LibWeb/CSS/Parser/ComponentValue.h>
 | 
					
						
							| 
									
										
										
										
											2021-03-09 17:36:21 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-12 14:51:19 +01:00
										 |  |  | namespace Web::CSS::Parser { | 
					
						
							| 
									
										
										
										
											2021-03-09 17:36:21 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-03-31 14:36:12 +01:00
										 |  |  | class Declaration { | 
					
						
							| 
									
										
										
										
											2021-03-09 17:36:21 +01:00
										 |  |  | public: | 
					
						
							| 
									
										
										
										
											2023-01-08 19:23:00 -05:00
										 |  |  |     Declaration(DeprecatedFlyString name, Vector<ComponentValue> values, Important); | 
					
						
							| 
									
										
										
										
											2022-03-31 14:36:12 +01:00
										 |  |  |     ~Declaration(); | 
					
						
							| 
									
										
										
										
											2021-03-09 17:36:21 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-12 16:09:18 +01:00
										 |  |  |     StringView name() const { return m_name; } | 
					
						
							| 
									
										
										
										
											2022-04-12 14:51:19 +01:00
										 |  |  |     Vector<ComponentValue> const& values() const { return m_values; } | 
					
						
							| 
									
										
										
										
											2022-03-31 14:41:39 +01:00
										 |  |  |     Important importance() const { return m_important; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-06 01:12:49 +00:00
										 |  |  |     DeprecatedString to_deprecated_string() const; | 
					
						
							| 
									
										
										
										
											2021-03-09 17:36:21 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							| 
									
										
										
										
											2023-01-08 19:23:00 -05:00
										 |  |  |     DeprecatedFlyString m_name; | 
					
						
							| 
									
										
										
										
											2022-04-12 14:51:19 +01:00
										 |  |  |     Vector<ComponentValue> m_values; | 
					
						
							| 
									
										
										
										
											2022-02-12 14:53:59 +00:00
										 |  |  |     Important m_important { Important::No }; | 
					
						
							| 
									
										
										
										
											2021-03-09 17:36:21 +01:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } |