mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 07:02:44 +00:00 
			
		
		
		
	LibWeb: Keep track of associated AnimationEffects in Animatable
This commit is contained in:
		
							parent
							
								
									2ade834655
								
							
						
					
					
						commit
						5eea53f27a
					
				
					 4 changed files with 33 additions and 1 deletions
				
			
		|  | @ -732,6 +732,15 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<KeyframeEffect>> KeyframeEffect::construct_ | |||
|     return effect; | ||||
| } | ||||
| 
 | ||||
| void KeyframeEffect::set_target(DOM::Element* target) | ||||
| { | ||||
|     if (m_target_element) | ||||
|         m_target_element->disassociate_with_effect(*this); | ||||
|     m_target_element = target; | ||||
|     if (m_target_element) | ||||
|         m_target_element->associate_with_effect(*this); | ||||
| } | ||||
| 
 | ||||
| void KeyframeEffect::set_pseudo_element(Optional<String> pseudo_element) | ||||
| { | ||||
|     // On setting, sets the target pseudo-selector of the animation effect to the provided value after applying the
 | ||||
|  | @ -834,6 +843,12 @@ KeyframeEffect::KeyframeEffect(JS::Realm& realm) | |||
| { | ||||
| } | ||||
| 
 | ||||
| KeyframeEffect::~KeyframeEffect() | ||||
| { | ||||
|     if (m_target_element) | ||||
|         m_target_element->disassociate_with_effect(*this); | ||||
| } | ||||
| 
 | ||||
| void KeyframeEffect::initialize(JS::Realm& realm) | ||||
| { | ||||
|     Base::initialize(realm); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Matthew Olsson
						Matthew Olsson