summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-09-03 15:45:17 +0200
committerAndreas Kling <kling@serenityos.org>2022-09-06 00:27:09 +0200
commit1029ea4b3240ba22f132ae390f5dd9b49a778659 (patch)
tree3ddb74970c33252b06e6c9146119bd3ce6e5d93d /Userland/Libraries/LibWeb
parent5724a04553b7fce011870b4a766ae17161b897c3 (diff)
downloadserenity-1029ea4b3240ba22f132ae390f5dd9b49a778659.zip
LibWeb: Use correct relevant settings object in Document initialization
The code was not in line with the spec comment right above it.
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r--Userland/Libraries/LibWeb/DOM/Document.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp
index 6aa2c76809..895511768a 100644
--- a/Userland/Libraries/LibWeb/DOM/Document.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Document.cpp
@@ -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;