diff --git a/Tests/LibWeb/Text/expected/iframe-removed-asyncronously.txt b/Tests/LibWeb/Text/expected/iframe-removed-asyncronously.txt new file mode 100644 index 00000000000..50586a4cbfb --- /dev/null +++ b/Tests/LibWeb/Text/expected/iframe-removed-asyncronously.txt @@ -0,0 +1 @@ +PASS! (Didn't crash) diff --git a/Tests/LibWeb/Text/input/iframe-removed-asyncronously.html b/Tests/LibWeb/Text/input/iframe-removed-asyncronously.html new file mode 100644 index 00000000000..fb0d904f507 --- /dev/null +++ b/Tests/LibWeb/Text/input/iframe-removed-asyncronously.html @@ -0,0 +1,20 @@ + + + + diff --git a/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp index a52570ae2fd..1fc92d6a7b3 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp @@ -77,12 +77,6 @@ void HTMLIFrameElement::process_the_iframe_attributes(bool initial_insertion) if (!content_navigable()) return; - // Make sure applying of history step caused by potential sync navigation to "about:blank" - // is finished. Otherwise, it might interrupt navigation caused by changing src or srcdoc. - if (!initial_insertion && !content_navigable_initialized()) { - main_thread_event_loop().spin_processing_tasks_with_source_until(Task::Source::NavigationAndTraversal, [this] { return content_navigable_initialized(); }); - } - // 1. If element's srcdoc attribute is specified, then: if (has_attribute(HTML::AttributeNames::srcdoc)) { // 1. Set element's current navigation was lazy loaded boolean to false.