mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 02:40:49 +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:
committed by
Alexander Kalenik
parent
3fd1538191
commit
3f71907255
@@ -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();
|
||||
}));
|
||||
}
|
||||
})));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user