1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 13:27:34 +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

@ -285,7 +285,7 @@ bool EventHandler::handle_mouseup(CSSPixelPoint position, CSSPixelPoint screen_p
auto url = document->parse_url(href);
dbgln("Web::EventHandler: Clicking on a link to {}", url);
if (button == GUI::MouseButton::Primary) {
MUST(document->navigable()->navigate(url, document));
MUST(document->navigable()->navigate({ .url = url, .source_document = document }));
} else if (button == GUI::MouseButton::Middle) {
if (auto* page = m_browsing_context->page())
page->client().page_did_middle_click_link(url, link->target(), modifiers);