LibWeb: Use struct to pass Navigable::navigate() params

Using structs makes the navigate() calls looks cleaner. No change
in behavior is intended.
This commit is contained in:
Aliaksandr Kalenik 2023-10-10 16:05:38 +02:00 committed by Alexander Kalenik
parent 3e86f88d6a
commit 44f7d7406c
Notes: sideshowbarker 2024-07-18 02:47:59 +09:00
12 changed files with 56 additions and 34 deletions

View file

@ -258,7 +258,9 @@ void HTMLObjectElement::run_object_representation_handler_steps(Optional<Depreca
// If the URL of the given resource does not match about:blank, then navigate the element's nested browsing context to that resource, with historyHandling set to "replace" and the source browsing context set to the object element's node document's browsing context. (The data attribute of the object element doesn't get updated if the browsing context gets further navigated to other locations.)
if (auto const& url = resource()->url(); url != "about:blank"sv)
MUST(m_content_navigable->navigate(url, document(), Empty {}, nullptr, false, Bindings::NavigationHistoryBehavior::Replace));
MUST(m_content_navigable->navigate({ .url = url,
.source_document = document(),
.history_handling = Bindings::NavigationHistoryBehavior::Replace }));
// The object element represents its nested browsing context.
run_object_representation_completed_steps(Representation::NestedBrowsingContext);