mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
LibWeb: Update Page to use navigables
This commit is contained in:
committed by
Andreas Kling
parent
f91b34ef2e
commit
ee50d9b2b5
@@ -21,6 +21,7 @@
|
||||
#include <LibWeb/HTML/EventNames.h>
|
||||
#include <LibWeb/HTML/HTMLLinkElement.h>
|
||||
#include <LibWeb/HTML/PotentialCORSRequest.h>
|
||||
#include <LibWeb/HTML/TraversableNavigable.h>
|
||||
#include <LibWeb/Infra/CharacterTypes.h>
|
||||
#include <LibWeb/Loader/ResourceLoader.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
@@ -458,11 +459,9 @@ bool HTMLLinkElement::load_favicon_and_use_if_window_is_active()
|
||||
if (!page)
|
||||
return favicon_bitmap;
|
||||
|
||||
if (document().browsing_context() == &page->top_level_browsing_context())
|
||||
if (favicon_bitmap) {
|
||||
page->client().page_did_change_favicon(*favicon_bitmap);
|
||||
return true;
|
||||
}
|
||||
if (navigable() && navigable()->is_traversable()) {
|
||||
navigable()->traversable_navigable()->page()->client().page_did_change_favicon(*favicon_bitmap);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user