Bug 252263 - [GLib] Get rid of bundled xdgmime
Summary: [GLib] Get rid of bundled xdgmime
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-14 13:28 PST by Michael Catanzaro
Modified: 2023-02-14 13:28 PST (History)
1 user (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-14 13:28:35 PST
This is more a goal than something we can do today. Source/ThirdParty/xdgmime is currently used only by MIMETypeRegistryXdg.cpp. We use two functions: xdg_mime_get_mime_type_from_file_name(), which can probably be replaced with one call to g_content_type_guess() with NULL data parameter, and xdg_mime_get_simple_globs(). To drop our bundled xdgmime we would need to expose a new GLib API to replace xdg_mime_get_simple_globs(). We could call it, say, g_content_type_get_preferred_extension(). Then we'd only need our own bundled xdgmime when building against older GLib. (Of course, with newer GLib we'd just wind up using GLib's bundled xdgmime instead, but that's still an improvement.)