mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-01 14:18:15 +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:
committed by
Andreas Kling
parent
f2a28e83de
commit
5a3825b561
@@ -95,7 +95,12 @@ void WebContentClient::did_change_title(DeprecatedString const& title)
|
||||
{
|
||||
dbgln_if(SPAM_DEBUG, "handle: WebContentClient::DidChangeTitle! title={}", title);
|
||||
|
||||
if (m_view.on_title_change)
|
||||
if (!m_view.on_title_change)
|
||||
return;
|
||||
|
||||
if (title.is_empty())
|
||||
m_view.on_title_change(m_view.url().to_deprecated_string());
|
||||
else
|
||||
m_view.on_title_change(title);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user