Bug 170001

Summary: [GTK] Add MIMETypeRegistry implementation using xdgmime and remove the GTK+ one
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, commit-queue, lforschler, mcatanzaro, zan
Priority: P2 Keywords: Gtk
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
mcatanzaro: review+, cgarcia: commit-queue-
Patch for landing commit-queue: commit-queue-

Carlos Garcia Campos
Reported 2017-03-23 03:56:24 PDT
The XDG implementation could be used by any port where shared-mime-info is expected to be available. It also improves the current GTK+ implementation that is based on a very small map of mime types and extensions.
Attachments
Patch (143.26 KB, patch)
2017-03-23 04:02 PDT, Carlos Garcia Campos
mcatanzaro: review+
cgarcia: commit-queue-
Patch for landing (146.19 KB, patch)
2017-03-23 06:42 PDT, Carlos Garcia Campos
commit-queue: commit-queue-
Carlos Garcia Campos
Comment 1 2017-03-23 04:02:43 PDT
Michael Catanzaro
Comment 2 2017-03-23 04:50:22 PDT
Comment on attachment 305180 [details] Patch It's a shame there is no GLib API for this, but this seems like the sort of thing that is acceptable to keep in ThirdParty.
Carlos Garcia Campos
Comment 3 2017-03-23 04:53:19 PDT
Yes, xdgmime is still designed to be copied as third party.
Carlos Garcia Campos
Comment 4 2017-03-23 04:54:30 PDT
Comment on attachment 305180 [details] Patch Thanks for the review, I still need to update the style checker to ignore xdgmime sources. And I'm checking a few diffs in layout tests too.
Carlos Garcia Campos
Comment 5 2017-03-23 06:42:45 PDT
Created attachment 305192 [details] Patch for landing
Carlos Garcia Campos
Comment 6 2017-03-23 06:44:31 PDT
I don't know how to land this. The SVN commit hooks complains about tabs in xdgmime sources and suggests to set allow-tabs svn prop, but it seems git-svn doesn't allow to set a property on a new file that is not yet in the repository
Carlos Garcia Campos
Comment 7 2017-03-23 07:24:31 PDT
Comment on attachment 305192 [details] Patch for landing Let's see if commit-queue knows how to deal with this...
WebKit Commit Bot
Comment 8 2017-03-23 07:55:18 PDT
Comment on attachment 305192 [details] Patch for landing Rejecting attachment 305192 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 305192, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: 342b53b9ba47346259522a0b7beb4007cf3 062d6873dec7afe86e241f457b3b62d2d6324ca9 M Tools Current branch master is up to date. ERROR: Not all changes have been committed into SVN, however the committed ones (if any) seem to be successfully integrated into the working tree. Please see the above messages for details. Failed to run "['git', 'svn', 'dcommit', '--rmdir']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Updating OpenSource Current branch master is up to date. Total errors found: 0 in 0 files Full output: http://webkit-queues.webkit.org/results/3395185
Carlos Garcia Campos
Comment 9 2017-03-23 08:00:49 PDT
Any idea Lucas? I don't want to untabify third party sources . . . Is there any way to set the allow-tabs properties in new files or bypass the svn hook somehow?
Carlos Garcia Campos
Comment 10 2017-03-24 01:21:36 PDT
Michael Catanzaro
Comment 11 2017-04-07 09:46:36 PDT
Did you notice this build warning: [103/5550] Building C object Source/Th...Files/xdgmime.dir/src/xdgmimecache.c.o ../../Source/ThirdParty/xdgmime/src/xdgmimecache.c: In function ‘cache_magic_matchlet_compare_to_data’: ../../Source/ThirdParty/xdgmime/src/xdgmimecache.c:200:62: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith] valid_matchlet = memcmp(cache->buffer + data_offset, data + i, data_length) == 0; That's invalid code, so it should be fixed, not suppressed.
Note You need to log in before you can comment on or make changes to this bug.