mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
LibWeb: Update Page to use navigables
This commit is contained in:
parent
f91b34ef2e
commit
ee50d9b2b5
9 changed files with 41 additions and 25 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue