Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b29eae826faaf0aff766c3a64a48b514fb0efb76
      
https://github.com/WebKit/WebKit/commit/b29eae826faaf0aff766c3a64a48b514fb0efb76
  Author: Patrick Griffis <[email protected]>
  Date:   2026-08-07 (Fri, 07 Aug 2026)

  Changed paths:
    M Source/WebKit/UIProcess/API/glib/IconDatabase.cpp
    M Source/WebKit/UIProcess/API/glib/WebKitFaviconDatabase.cpp
    M 
Tools/TestWebKitAPI/Tests/WebKit/WKWebView/glib/TestWebKitFaviconDatabase.cpp

  Log Message:
  -----------
  [GLib] Fix webkit_favicon_database_get_page_icons() lookups
https://bugs.webkit.org/show_bug.cgi?id=321310

Reviewed by Adrian Perez de Castro.

This fixes two bugs:

The commit introducing this feature used AllowDatabaseWrite::No which meant the
in-memory cache worked but loading it would fail. The database contains a 
timestamp
of when icons were last used, so it must be writable, otherwise every icon is
considered not recently used and ignored.

The purpose of this API was to return multiple sizes for the same URL, however
the schema was `pageURL (url UNIQUE ..., iconID ...)` which meant there could
only be one entry per URL. Change this to `UNIQUE (url, iconID)` so the 
combination
must be unique.

Test: 
Tools/TestWebKitAPI/Tests/WebKit/WKWebView/glib/TestWebKitFaviconDatabase.cpp

* Source/WebKit/UIProcess/API/glib/IconDatabase.cpp:
(WebKit::IconDatabase::createTablesIfNeeded):
* Source/WebKit/UIProcess/API/glib/WebKitFaviconDatabase.cpp:
(webkit_favicon_database_get_page_icons):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/glib/TestWebKitFaviconDatabase.cpp:
(testFaviconDatabaseGetPageIcons):

Canonical link: https://commits.webkit.org/318812@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to