mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:27:35 +00:00
LibWeb: Remove scopes for execution contexts in Animation finish steps
This commit is contained in:
parent
fc6a6d29ec
commit
d76c2d45c4
1 changed files with 4 additions and 8 deletions
|
@ -1101,10 +1101,8 @@ void Animation::update_finished_state(DidSeek did_seek, SynchronouslyNotify sync
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// 2. Resolve animation’s current finished promise object with animation.
|
// 2. Resolve animation’s current finished promise object with animation.
|
||||||
{
|
HTML::TemporaryExecutionContext execution_context { Bindings::host_defined_environment_settings_object(realm) };
|
||||||
HTML::TemporaryExecutionContext execution_context { Bindings::host_defined_environment_settings_object(realm) };
|
WebIDL::resolve_promise(realm, current_finished_promise(), this);
|
||||||
WebIDL::resolve_promise(realm, current_finished_promise(), this);
|
|
||||||
}
|
|
||||||
m_is_finished = true;
|
m_is_finished = true;
|
||||||
|
|
||||||
// 3. Create an AnimationPlaybackEvent, finishEvent.
|
// 3. Create an AnimationPlaybackEvent, finishEvent.
|
||||||
|
@ -1166,10 +1164,8 @@ void Animation::update_finished_state(DidSeek did_seek, SynchronouslyNotify sync
|
||||||
// 6. If current finished state is false and animation’s current finished promise is already resolved, set
|
// 6. If current finished state is false and animation’s current finished promise is already resolved, set
|
||||||
// animation’s current finished promise to a new promise in the relevant Realm of animation.
|
// animation’s current finished promise to a new promise in the relevant Realm of animation.
|
||||||
if (!current_finished_state && m_is_finished) {
|
if (!current_finished_state && m_is_finished) {
|
||||||
{
|
HTML::TemporaryExecutionContext execution_context { Bindings::host_defined_environment_settings_object(realm) };
|
||||||
HTML::TemporaryExecutionContext execution_context { Bindings::host_defined_environment_settings_object(realm) };
|
m_current_finished_promise = WebIDL::create_promise(realm);
|
||||||
m_current_finished_promise = WebIDL::create_promise(realm);
|
|
||||||
}
|
|
||||||
m_is_finished = false;
|
m_is_finished = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue