mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Replace spin_until in apply_the_history_step with state machine
Replace the blocking spin_processing_tasks_with_source_until calls in apply_the_history_step_after_unload_check() with an event-driven ApplyHistoryStepState GC cell that tracks 5 phases, following the same pattern used by CheckUnloadingCanceledState. Key changes: - Introduce ApplyHistoryStepState with phases: WaitingForDocumentPopulation, ProcessingContinuations, WaitingForChangeJobCompletion, WaitingForNonChangingJobs and Completed - Add on_complete callbacks to apply_the_push_or_replace_history_step, finalize_a_same_document_navigation, finalize_a_cross_document_navigation, and update_for_navigable_creation_or_destruction - Remove spin_until from Document::open() - Use null-document tasks for non-changing navigable updates and document unload/destroy to avoid stuck tasks when documents become non-fully-active - Defer completely_finish_loading when document has no navigable yet, and re-trigger post-load steps in activate_history_entry for documents that completed loading before activation Co-Authored-By: Shannon Booth <shannon@serenityos.org>
This commit is contained in:
committed by
Alexander Kalenik
parent
b36f2361f1
commit
2a69fd4c52
Notes:
github-actions[bot]
2026-03-31 07:49:17 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/2a69fd4c528 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8687 Reviewed-by: https://github.com/shannonbooth
@@ -443,7 +443,6 @@ void HTMLObjectElement::run_object_representation_handler_steps(Fetch::Infrastru
|
||||
// If the object element's content navigable is null, then create a new child navigable for the element.
|
||||
if (!m_content_navigable && in_a_document_tree()) {
|
||||
MUST(create_new_child_navigable());
|
||||
set_content_navigable_has_session_history_entry_and_ready_for_navigation();
|
||||
}
|
||||
|
||||
// NOTE: Creating a new nested browsing context can fail if the document is not attached to a browsing context
|
||||
|
||||
Reference in New Issue
Block a user