Bug 251588 - [GTK] Don't enable favicon database by default
Summary: [GTK] Don't enable favicon database by default
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Carlos Garcia Campos
URL:
Keywords:
Depends on:
Blocks: GTK4
  Show dependency treegraph
 
Reported: 2023-02-02 08:01 PST by Michael Catanzaro
Modified: 2023-02-06 03:49 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2023-02-02 08:01:36 PST
I asked Carlos Garcia to enable WebKitFaviconDatabase by default in the new API, since web browsers want favicons. But I think this was a mistake, because WebKitFaviconDatabase does not do anything useful unless your application has code to use it.
Comment 1 Carlos Garcia Campos 2023-02-03 06:12:03 PST
I've thought about this, because favicon database now can be null, which maybe it's not the best approach either. You might want to disable favicon loads, but still get favicons from the database, for anything in the browser UI (bookmarks, etc.). So, I can think of different options here:

1.- Leave things as they are but simply change the default value to disabled.
2.- Disable favicon loads per WebView, for example using a new setting, but favicon database can still be used to query favicons.
3.- Disable favicon loads per request, by adding a new signal that would expose IconLoadingClient::getLoadDecisionForIcon(). In this case, favicons database can always be used too. The signal is similar to accept-certificate, where you are supposed to just return TRUE or FALSE. I think we can keep it synchronous too.

In case of 2 and 3 if the database is not used by the app and the setting disabled or signal unhandled or returning FALSE, the database is not even created.
Comment 2 Michael Catanzaro 2023-02-03 06:46:57 PST
I'd prefer 1.

> You might want to disable favicon loads, but still get favicons from the database, for anything in the browser UI (bookmarks, etc.).

Why?
Comment 3 Carlos Garcia Campos 2023-02-03 23:07:46 PST
(In reply to Michael Catanzaro from comment #2)
> I'd prefer 1.
> 
> > You might want to disable favicon loads, but still get favicons from the database, for anything in the browser UI (bookmarks, etc.).
> 
> Why?

For anything in the browser UI like bookmarks, history, etc. But I guess in the end apps either want favicons for everything or nothing, so maybe 1. is indeed the simplest solution.
Comment 4 Carlos Garcia Campos 2023-02-06 01:53:44 PST
Pull request: https://github.com/WebKit/WebKit/pull/9678
Comment 5 EWS 2023-02-06 03:48:58 PST
Committed 259888@main (ac3878ed7421): <https://commits.webkit.org/259888@main>

Reviewed commits have been landed. Closing PR #9678 and removing active labels.