mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:07:35 +00:00
Browser+Ladybird+LibWebView: Consolidate title handling in LibWebView
Namely, let's have empty titles behave the same in both Browser and Ladybird (display the URL).
This commit is contained in:
parent
f2a28e83de
commit
5a3825b561
3 changed files with 13 additions and 18 deletions
|
@ -428,14 +428,10 @@ Tab::Tab(BrowserWindow& window)
|
|||
view().on_link_click(href, "_blank", 0);
|
||||
};
|
||||
|
||||
view().on_title_change = [this](auto& title) {
|
||||
if (title.is_null()) {
|
||||
m_history.update_title(url().to_deprecated_string());
|
||||
m_title = url().to_deprecated_string();
|
||||
} else {
|
||||
m_history.update_title(title);
|
||||
m_title = title;
|
||||
}
|
||||
view().on_title_change = [this](auto const& title) {
|
||||
m_history.update_title(title);
|
||||
m_title = title;
|
||||
|
||||
if (on_title_change)
|
||||
on_title_change(m_title);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue