mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
LibWeb: Update Page to use navigables
This commit is contained in:
committed by
Andreas Kling
parent
f91b34ef2e
commit
ee50d9b2b5
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/HTMLTitleElement.h>
|
||||
#include <LibWeb/HTML/TraversableNavigable.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
@@ -26,9 +27,8 @@ void HTMLTitleElement::initialize(JS::Realm& realm)
|
||||
void HTMLTitleElement::children_changed()
|
||||
{
|
||||
HTMLElement::children_changed();
|
||||
if (auto* page = document().page()) {
|
||||
if (document().browsing_context() == &page->top_level_browsing_context())
|
||||
page->client().page_did_change_title(document().title());
|
||||
if (navigable() && navigable()->is_traversable()) {
|
||||
navigable()->traversable_navigable()->page()->client().page_did_change_title(document().title());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user