LibWeb: Use correct relevant settings object in Document initialization
The code was not in line with the spec comment right above it.
This commit is contained in:
parent
5724a04553
commit
1029ea4b32
Notes:
sideshowbarker
2024-07-17 07:26:16 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/1029ea4b32 Pull-request: https://github.com/SerenityOS/serenity/pull/14816 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/linusg ✅
1 changed files with 2 additions and 1 deletions
|
@ -188,7 +188,8 @@ JS::NonnullGCPtr<Document> Document::create_and_initialize(Type type, String con
|
|||
// 8. If browsingContext is not a top-level browsing context, then:
|
||||
if (!browsing_context->is_top_level()) {
|
||||
// 1. Let parentEnvironment be browsingContext's container's relevant settings object.
|
||||
auto& parent_environment = browsing_context->container()->document().relevant_settings_object();
|
||||
VERIFY(browsing_context->container());
|
||||
auto& parent_environment = HTML::relevant_settings_object(*browsing_context->container());
|
||||
|
||||
// 2. Set topLevelCreationURL to parentEnvironment's top-level creation URL.
|
||||
top_level_creation_url = parent_environment.top_level_creation_url;
|
||||
|
|
Loading…
Add table
Reference in a new issue