mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:47:34 +00:00
LibWebView+Ladybird: Remove duplicate WebContent callback
We have on_navigate_back + on_back_button and on_navigate_forward + on_forward_button. Remove the *_button variants.
This commit is contained in:
parent
1adf06c9f0
commit
9608bfb576
5 changed files with 14 additions and 28 deletions
|
@ -554,16 +554,6 @@ Tab::Tab(BrowserWindow& window)
|
|||
update_status();
|
||||
};
|
||||
|
||||
view().on_back_button = [this] {
|
||||
if (m_history.can_go_back())
|
||||
go_back();
|
||||
};
|
||||
|
||||
view().on_forward_button = [this] {
|
||||
if (m_history.can_go_forward())
|
||||
go_forward();
|
||||
};
|
||||
|
||||
view().on_new_tab = [this](auto activate_tab) {
|
||||
auto& tab = this->window().create_new_tab(URL("about:blank"), activate_tab);
|
||||
return tab.view().handle();
|
||||
|
@ -689,6 +679,9 @@ void Tab::reload()
|
|||
|
||||
void Tab::go_back(int steps)
|
||||
{
|
||||
if (!m_history.can_go_back(steps))
|
||||
return;
|
||||
|
||||
m_history.go_back(steps);
|
||||
update_actions();
|
||||
load(m_history.current().url, LoadType::HistoryNavigation);
|
||||
|
@ -696,6 +689,9 @@ void Tab::go_back(int steps)
|
|||
|
||||
void Tab::go_forward(int steps)
|
||||
{
|
||||
if (!m_history.can_go_forward(steps))
|
||||
return;
|
||||
|
||||
m_history.go_forward(steps);
|
||||
update_actions();
|
||||
load(m_history.current().url, LoadType::HistoryNavigation);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue