| 
									
										
										
										
											2024-09-19 12:58:38 +01:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Copyright (c) 2024, Sam Atkins <sam@ladybird.org> | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * SPDX-License-Identifier: BSD-2-Clause | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #pragma once
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <LibWeb/CSS/CSSStyleValue.h>
 | 
					
						
							| 
									
										
										
										
											2025-04-17 19:11:14 +01:00
										 |  |  | #include <LibWeb/CSS/Enums.h>
 | 
					
						
							| 
									
										
										
										
											2025-07-03 22:02:40 +10:00
										 |  |  | #include <LibWeb/CSS/StyleValues/CSSColorValue.h>
 | 
					
						
							| 
									
										
										
										
											2024-09-19 12:58:38 +01:00
										 |  |  | #include <LibWeb/Forward.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace Web::CSS { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-01-08 16:14:17 +00:00
										 |  |  | struct CalculationContext; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-22 17:16:17 +01:00
										 |  |  | enum class AllowDiscrete { | 
					
						
							|  |  |  |     Yes, | 
					
						
							|  |  |  |     No, | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | ValueComparingRefPtr<CSSStyleValue const> interpolate_property(DOM::Element&, PropertyID, CSSStyleValue const& from, CSSStyleValue const& to, float delta, AllowDiscrete); | 
					
						
							| 
									
										
										
										
											2024-09-19 12:58:38 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-19 14:13:20 +01:00
										 |  |  | // https://drafts.csswg.org/css-transitions/#transitionable
 | 
					
						
							| 
									
										
										
										
											2025-05-22 17:16:17 +01:00
										 |  |  | bool property_values_are_transitionable(PropertyID, CSSStyleValue const& old_value, CSSStyleValue const& new_value, DOM::Element&, TransitionBehavior); | 
					
						
							| 
									
										
										
										
											2024-09-19 14:13:20 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-22 17:16:17 +01:00
										 |  |  | RefPtr<CSSStyleValue const> interpolate_value(DOM::Element&, CalculationContext const&, CSSStyleValue const& from, CSSStyleValue const& to, float delta, AllowDiscrete); | 
					
						
							|  |  |  | RefPtr<CSSStyleValue const> interpolate_repeatable_list(DOM::Element&, CalculationContext const&, CSSStyleValue const& from, CSSStyleValue const& to, float delta, AllowDiscrete); | 
					
						
							|  |  |  | RefPtr<CSSStyleValue const> interpolate_box_shadow(DOM::Element&, CalculationContext const&, CSSStyleValue const& from, CSSStyleValue const& to, float delta, AllowDiscrete); | 
					
						
							|  |  |  | RefPtr<CSSStyleValue const> interpolate_transform(DOM::Element&, CSSStyleValue const& from, CSSStyleValue const& to, float delta, AllowDiscrete); | 
					
						
							| 
									
										
										
										
											2024-09-19 12:58:38 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-03 22:02:40 +10:00
										 |  |  | Color interpolate_color(Color from, Color to, float delta, ColorSyntax syntax); | 
					
						
							| 
									
										
										
										
											2024-09-19 12:58:38 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | } |