mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-05 00:21:52 +00:00
LibWeb: Process navigations after initial about:blank navigation is done
Otherwise finalization step of initial `about:blank` navigation might cancel user-initiated navigations by changing ongoing navigation id. This is implemented by marking navigable as ready to start processing navigation in SHTQ task, because we know for sure this task cannot be processed until finalization step of initial `about:blank` navigation is done.
This commit is contained in:
parent
3fd1538191
commit
3f71907255
Notes:
github-actions[bot]
2025-02-27 22:33:56 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 3f71907255
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3725
3 changed files with 33 additions and 1 deletions
|
@ -16,6 +16,7 @@
|
|||
#include <LibWeb/HTML/HTMLIFrameElement.h>
|
||||
#include <LibWeb/HTML/Navigable.h>
|
||||
#include <LibWeb/HTML/Parser/HTMLParser.h>
|
||||
#include <LibWeb/HTML/TraversableNavigable.h>
|
||||
#include <LibWeb/Layout/NavigableContainerViewport.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
@ -93,7 +94,12 @@ void HTMLIFrameElement::post_connection()
|
|||
// 3. Process the iframe attributes for insertedNode, with initialInsertion set to true.
|
||||
process_the_iframe_attributes(true);
|
||||
|
||||
set_content_navigable_has_session_history_entry_and_ready_for_navigation();
|
||||
if (auto navigable = content_navigable()) {
|
||||
auto traversable = navigable->traversable_navigable();
|
||||
traversable->append_session_history_traversal_steps(GC::create_function(heap(), [this] {
|
||||
set_content_navigable_has_session_history_entry_and_ready_for_navigation();
|
||||
}));
|
||||
}
|
||||
})));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue