LibWeb: Load favicon.ico only for http/https URLs

This commit is contained in:
Brendan Coles 2020-11-07 09:03:52 +00:00 committed by Andreas Kling
parent 021c8dea1f
commit a0130b55d4
Notes: sideshowbarker 2024-07-19 01:32:23 +09:00

View file

@ -163,7 +163,10 @@ bool FrameLoader::load(const LoadRequest& request, Type type)
if (type == Type::Navigation)
frame().page().client().page_did_start_loading(url);
if (type != Type::IFrame && url.protocol() != "file" && url.protocol() != "about") {
if (type == Type::IFrame)
return true;
if (url.protocol() == "http" || url.protocol() == "https") {
URL favicon_url;
favicon_url.set_protocol(url.protocol());
favicon_url.set_host(url.host());