LibWeb: Set the "loading" flag for HTMLTrackElement sooner

We don't want to wait for the queued task to run to indicate that the
processing model is in progress.
This commit is contained in:
Timothy Flynn 2025-06-12 11:40:33 -04:00 committed by Tim Flynn
parent 8da6731048
commit 24ac860998
Notes: github-actions[bot] 2025-06-12 16:26:57 +00:00

View file

@ -155,10 +155,11 @@ void HTMLTrackElement::start_the_track_processing_model()
if (!is<HTMLMediaElement>(parent_element().ptr()))
return;
m_loading = true;
// 4. Run the remainder of these steps in parallel, allowing whatever caused these steps to run to continue.
auto& realm = this->realm();
Platform::EventLoopPlugin::the().deferred_invoke(GC::create_function(realm.heap(), [this, &realm] {
m_loading = true;
start_the_track_processing_model_parallel_steps(realm);
}));
}