mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-23 08:06:11 +00:00
LibWeb: Only call page_did_change_title() from main frame
Otherwise an embedded iframe will override the page title in the browser, for example.
This commit is contained in:
committed by
Andreas Kling
parent
ae95ed5ddd
commit
c183ebc723
@@ -42,8 +42,10 @@ HTMLTitleElement::~HTMLTitleElement()
|
||||
void HTMLTitleElement::children_changed()
|
||||
{
|
||||
HTMLElement::children_changed();
|
||||
if (auto* page = document().page())
|
||||
page->client().page_did_change_title(document().title());
|
||||
if (auto* page = document().page()) {
|
||||
if (document().frame() == &page->main_frame())
|
||||
page->client().page_did_change_title(document().title());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user