1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:07:44 +00:00

LibWeb: Implement loading a favicon in absence of a <link> icon element

For example, serenityos.org does not contain a <link rel="icon"> element
to indicate its favicon. Before navigables, we implemented attempting to
load a fallback favicon in a rather ad-hoc manner. This implements the
full spec steps to do so after the HTML document is parsed.
This commit is contained in:
Timothy Flynn 2023-10-30 10:47:34 -04:00 committed by Andreas Kling
parent b1274a885b
commit 19313945f2
3 changed files with 62 additions and 15 deletions

View file

@ -35,6 +35,8 @@ public:
bool has_loaded_icon() const;
bool load_favicon_and_use_if_window_is_active();
static WebIDL::ExceptionOr<void> load_fallback_favicon_if_needed(JS::NonnullGCPtr<DOM::Document>);
private:
HTMLLinkElement(DOM::Document&, DOM::QualifiedName);