mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 17:28:11 +00:00
Browser+LibWeb: Make sure the default favicon is loaded
Previously in Browser, when we navigate back from a page that has an icon to a page that does not have an icon, the icon does not update and the old icon is displayed because FrameLoader does not set the default favicon when the favicon cannot be loaded. This patch ensures that Browser receives a new icon bitmap every time a load takes place.
This commit is contained in:
parent
4f5c69a04c
commit
e80b887059
3 changed files with 30 additions and 14 deletions
|
@ -515,10 +515,6 @@ void BrowserWindow::create_new_tab(URL url, bool activate)
|
|||
|
||||
m_tab_widget->set_bar_visible(!is_fullscreen() && m_tab_widget->children().size() > 1);
|
||||
|
||||
auto default_favicon = Gfx::Bitmap::try_load_from_file("/res/icons/16x16/filetype-html.png");
|
||||
VERIFY(default_favicon);
|
||||
m_tab_widget->set_tab_icon(new_tab, default_favicon);
|
||||
|
||||
new_tab.on_title_change = [this, &new_tab](auto& title) {
|
||||
m_tab_widget->set_tab_title(new_tab, title);
|
||||
if (m_tab_widget->active_widget() == &new_tab)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue