mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
LibWeb: Call the_end() on Documents from window.open("about:blank")
This commit is contained in:
parent
bc9c710904
commit
889b903e40
1 changed files with 6 additions and 3 deletions
|
@ -48,6 +48,7 @@
|
||||||
#include <LibWeb/HTML/Navigator.h>
|
#include <LibWeb/HTML/Navigator.h>
|
||||||
#include <LibWeb/HTML/Origin.h>
|
#include <LibWeb/HTML/Origin.h>
|
||||||
#include <LibWeb/HTML/PageTransitionEvent.h>
|
#include <LibWeb/HTML/PageTransitionEvent.h>
|
||||||
|
#include <LibWeb/HTML/Parser/HTMLParser.h>
|
||||||
#include <LibWeb/HTML/Scripting/Environments.h>
|
#include <LibWeb/HTML/Scripting/Environments.h>
|
||||||
#include <LibWeb/HTML/Scripting/ExceptionReporter.h>
|
#include <LibWeb/HTML/Scripting/ExceptionReporter.h>
|
||||||
#include <LibWeb/HTML/Scripting/TemporaryExecutionContext.h>
|
#include <LibWeb/HTML/Scripting/TemporaryExecutionContext.h>
|
||||||
|
@ -395,9 +396,11 @@ WebIDL::ExceptionOr<JS::GCPtr<WindowProxy>> Window::open_impl(StringView url, St
|
||||||
}
|
}
|
||||||
|
|
||||||
// 6. If urlRecord matches about:blank, then perform the URL and history update steps given targetNavigable's active document and urlRecord.
|
// 6. If urlRecord matches about:blank, then perform the URL and history update steps given targetNavigable's active document and urlRecord.
|
||||||
// FIXME: If we only perform the URL and history update steps here, we never fire the load event for the new window/tab.
|
if (url_matches_about_blank(url_record)) {
|
||||||
// This breaks WPT. See #23067
|
// AD-HOC: Mark the initial about:blank for the new window as load complete
|
||||||
if (false && url_matches_about_blank(url_record)) {
|
// FIXME: We do this other places too when creating a new about:blank document. Perhaps it's worth a spec issue?
|
||||||
|
HTML::HTMLParser::the_end(*target_navigable->active_document());
|
||||||
|
|
||||||
perform_url_and_history_update_steps(*target_navigable->active_document(), url_record);
|
perform_url_and_history_update_steps(*target_navigable->active_document(), url_record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue