1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-24 00:55:06 +00:00

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
12 changed files with 56 additions and 34 deletions

View file

@ -799,7 +799,13 @@ void HTMLFormElement::plan_to_navigate_to(AK::URL url, Variant<Empty, String, PO
// 2. Navigate targetNavigable to url using the form element's node document, with historyHandling set to historyHandling,
// referrerPolicy set to referrerPolicy, documentResource set to postResource, and cspNavigationType set to "form-submission".
MUST(target_navigable->navigate(url, this->document(), post_resource, nullptr, false, to_navigation_history_behavior(history_handling), {}, {}, referrer_policy));
MUST(target_navigable->navigate({ .url = url,
.source_document = this->document(),
.document_resource = post_resource,
.response = nullptr,
.exceptions_enabled = false,
.history_handling = to_navigation_history_behavior(history_handling),
.referrer_policy = referrer_policy }));
});
// 5. Set the form's planned navigation to the just-queued task.