LibWeb: Set about base URL before document URL

Install the inherited about base URL before setting the document URL so
fallback-base URL consumers see the correct source during URL-dependent
style and content blocker work.
This commit is contained in:
Andreas Kling 2026-05-21 17:50:33 +02:00 committed by Andreas Kling
parent a289601eb0
commit 3f1a6926f4

View file

@ -446,9 +446,9 @@ WebIDL::ExceptionOr<GC::Ref<Document>> Document::create_and_initialize(Type type
document->m_active_sandboxing_flag_set = navigation_params.final_sandboxing_flag_set;
document->m_navigation_id = navigation_params.id;
document->set_load_timing_info(load_timing_info);
document->m_about_base_url = navigation_params.about_base_url;
document->set_url(*creation_url);
document->m_readiness = HTML::DocumentReadyState::Loading;
document->m_about_base_url = navigation_params.about_base_url;
document->set_allow_declarative_shadow_roots(true);
document->set_custom_element_registry(realm.create<HTML::CustomElementRegistry>(realm));