NEW 252263
[GLib] Get rid of bundled xdgmime
https://bugs.webkit.org/show_bug.cgi?id=252263
Summary [GLib] Get rid of bundled xdgmime
Michael Catanzaro
Reported 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.)
Attachments
Note You need to log in before you can comment on or make changes to this bug.