From a71b2e5fd9522ddf72d3b083320ff9bfbd75e372 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Sat, 13 Apr 2024 18:53:41 +0200 Subject: [PATCH] Ladybird/Qt: Use reload() IPC call for reload button Instead of treating reloading as a regular navigation by using load_url(), now we invoke a navigable reloading algorithm implemented from the spec. Now both reloading triggered from UI and location.reload() will use the same code path. --- Ladybird/Qt/Tab.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Ladybird/Qt/Tab.cpp b/Ladybird/Qt/Tab.cpp index 9a4b2ab2f3c..a020b14222a 100644 --- a/Ladybird/Qt/Tab.cpp +++ b/Ladybird/Qt/Tab.cpp @@ -786,11 +786,7 @@ void Tab::forward() void Tab::reload() { - if (m_history.is_empty()) - return; - - m_is_history_navigation = true; - view().load(m_history.current().url.to_byte_string()); + view().reload(); } void Tab::open_link(URL::URL const& url)