mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-20 08:18:55 +00:00
Ladybird: Fix reloading functionality
Previously, reloading went back to the first page loaded by WebView::load() or WebView::load_html(), as they are the only methods that modify m_url, which is what the reload loaded. Now we handle reloads in Tab.cpp by simply loading the last entry in the m_history.
This commit is contained in:
parent
0b15fd4a12
commit
e80147afba
Notes:
sideshowbarker
2024-07-17 04:41:05 +09:00
Author: https://github.com/Baitinq
Commit: e80147afba
Pull-request: https://github.com/SerenityOS/serenity/pull/16583
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/awesomekling ✅
Reviewed-by: https://github.com/linusg
3 changed files with 2 additions and 7 deletions
|
@ -159,7 +159,8 @@ void Tab::home()
|
|||
|
||||
void Tab::reload()
|
||||
{
|
||||
view().reload();
|
||||
m_is_history_navigation = true;
|
||||
view().load(m_history.current().url.to_string());
|
||||
}
|
||||
|
||||
void Tab::location_edit_return_pressed()
|
||||
|
|
|
@ -79,11 +79,6 @@ WebContentView::~WebContentView()
|
|||
{
|
||||
}
|
||||
|
||||
void WebContentView::reload()
|
||||
{
|
||||
load(m_url);
|
||||
}
|
||||
|
||||
void WebContentView::load(AK::URL const& url)
|
||||
{
|
||||
m_url = url;
|
||||
|
|
|
@ -53,7 +53,6 @@ public:
|
|||
|
||||
void load(AK::URL const&);
|
||||
void load_html(StringView html, AK::URL const&);
|
||||
void reload();
|
||||
|
||||
Function<void(Gfx::IntPoint const& screen_position)> on_context_menu_request;
|
||||
Function<void(const AK::URL&, String const& target, unsigned modifiers)> on_link_click;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue