mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Wait until child navigable's SHE is ready before navigating
This change fixes a bug that can be reproduced with the following steps: ```js const iframe = document.createElement("iframe"); document.body.appendChild(iframe); iframe.contentWindow.location.href = ("http://localhost:8080/demo.html"); ``` These steps are executed in the following order: 1. Create iframe and schedule session history traversal task that adds session history entry for the iframe. 2. Generate navigation id for scheduled navigation to `http://localhost:8080/demo.html`. 3. Execute the scheduled session history traversal task, which adds session history entry for the iframe. 4. Ooops, navigation to `http://localhost:8080/demo.html` is aborted because addings SHE for the iframe resets the navigation id. This change fixes this by delaying all navigations until SHE for a navigable is created.
This commit is contained in:
parent
718e874cc7
commit
b8af3fccf6
Notes:
github-actions[bot]
2025-02-27 13:32:33 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: b8af3fccf6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3711
12 changed files with 155 additions and 57 deletions
|
@ -137,6 +137,7 @@ WebIDL::ExceptionOr<GC::Ref<TraversableNavigable>> TraversableNavigable::create_
|
|||
|
||||
// 9. Append initialHistoryEntry to traversable's session history entries.
|
||||
traversable->m_session_history_entries.append(*initial_history_entry);
|
||||
traversable->set_has_session_history_entry_and_ready_for_navigation();
|
||||
|
||||
// FIXME: 10. If opener is non-null, then legacy-clone a traversable storage shed given opener's top-level traversable and traversable. [STORAGE]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue