1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:07:36 +00:00

LibWeb: Replace check for BrowsingContext's about blank state with false

This check has been if (false && stuff) for quite a while, since the
transition to Navigables. No one updates the BrowsingContext's session
history, so the check for it having an about blank document and only an
about blank document is always false.
This commit is contained in:
Andrew Kaster 2024-02-04 03:38:11 -07:00 committed by Andrew Kaster
parent b6fc29ca21
commit 5d9d0aa267

View file

@ -181,7 +181,11 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Document>> Document::create_and_initialize(
// 7. If browsingContext's active document's is initial about:blank is true, // 7. If browsingContext's active document's is initial about:blank is true,
// and browsingContext's active document's origin is same origin-domain with navigationParams's origin, // and browsingContext's active document's origin is same origin-domain with navigationParams's origin,
// then set window to browsingContext's active window. // then set window to browsingContext's active window.
if (browsing_context->still_on_its_initial_about_blank_document() // FIXME: still_on_its_initial_about_blank_document() is not in the spec anymore.
// However, replacing this with the spec-mandated is_initial_about_blank() results in the browsing context
// holding an incorrect active document for the replace from initial about:blank to the real document.
// See #22293 for more details.
if (false
&& (browsing_context->active_document() && browsing_context->active_document()->origin().is_same_origin(navigation_params.origin))) { && (browsing_context->active_document() && browsing_context->active_document()->origin().is_same_origin(navigation_params.origin))) {
window = browsing_context->active_window(); window = browsing_context->active_window();
} }