mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +00:00
LibWeb: Update displayed favicon when a favicon is loaded
When a favicon has been loaded, trigger a favicon update on document level. Of all the link tags in the header, the last favicon that is load should be shown. When the favicon could not be loaded, load the next icon in reverse tree order.
This commit is contained in:
parent
13847aa7e8
commit
06d9853a8b
4 changed files with 116 additions and 0 deletions
|
@ -28,6 +28,9 @@ public:
|
|||
String type() const { return attribute(HTML::AttributeNames::type); }
|
||||
String href() const { return attribute(HTML::AttributeNames::href); }
|
||||
|
||||
bool has_loaded_icon() const;
|
||||
bool load_favicon_and_use_if_window_is_active();
|
||||
|
||||
private:
|
||||
void parse_attribute(FlyString const&, String const&) override;
|
||||
|
||||
|
@ -35,6 +38,9 @@ private:
|
|||
virtual void resource_did_fail() override;
|
||||
virtual void resource_did_load() override;
|
||||
|
||||
void resource_did_load_stylesheet();
|
||||
void resource_did_load_favicon();
|
||||
|
||||
struct Relationship {
|
||||
enum {
|
||||
Alternate = 1 << 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue