LibWeb: Make TemporaryExecutionContext take a Realm&

This commit is contained in:
Shannon Booth 2024-10-24 20:39:18 +13:00 committed by Andrew Kaster
parent f7a4d94b24
commit cc91473f4d
Notes: github-actions[bot] 2024-11-02 00:56:36 +00:00
34 changed files with 106 additions and 107 deletions

View file

@ -1140,10 +1140,10 @@ static void apply_animation_properties(DOM::Document& document, StyleProperties&
if (play_state != effect.last_css_animation_play_state()) {
if (play_state == CSS::AnimationPlayState::Running && animation.play_state() == Bindings::AnimationPlayState::Paused) {
HTML::TemporaryExecutionContext context(document.relevant_settings_object());
HTML::TemporaryExecutionContext context(document.realm());
animation.play().release_value_but_fixme_should_propagate_errors();
} else if (play_state == CSS::AnimationPlayState::Paused && animation.play_state() != Bindings::AnimationPlayState::Paused) {
HTML::TemporaryExecutionContext context(document.relevant_settings_object());
HTML::TemporaryExecutionContext context(document.realm());
animation.pause().release_value_but_fixme_should_propagate_errors();
}
@ -1561,7 +1561,7 @@ void StyleComputer::compute_cascaded_values(StyleProperties& style, DOM::Element
effect->set_target(&element);
element.set_cached_animation_name_animation(animation, pseudo_element);
HTML::TemporaryExecutionContext context(m_document->relevant_settings_object());
HTML::TemporaryExecutionContext context(realm);
animation->play().release_value_but_fixme_should_propagate_errors();
} else {
// The animation hasn't changed, but some properties of the animation may have