[webkit-gtk] XHTML files being processed as HTML files

Mario Sanchez Prada mario at webkit.org
Thu Jan 7 03:12:33 PST 2016


On 07/01/16 01:47, Michael Catanzaro wrote:
> [...]
> Questions:
> 
>  - Does WebKitGTK+ rely on shared-mime-info to determine the MIME type
> of the files it loads?

My knowledge on this area might be outdated, but at least 3 years ago
WebKitGTK+ did rely on shared-mime-info for that. See this patch I wrote to
fix a similar (not exactly the same, though) issue related to .mhtml files:

http://trac.webkit.org/changeset/123088

>  - If so, can we simply teach shared-mime-info that .xht means .XHTML?
> (If so, we need to add an appropriately-patched shared-mime-info to our
> jhbuild environment.)

Sounds like a plan.

>  - If not, where is the code that needs fixed?

As far as I remember, shared-mime-info determines the mime type out of the
file and then WebKit processe

As far as I remember, shared-mime-info determines the MIME type out of the
file and then WebKit processes that according to the initialization done in
WebCore/platform/MIMETypeRegistry.cpp, so shared-mime-info looks like the
right thing to change.

> Please, let's track this in bug #152455.

I'll comment there too.

Cheers,
Mario


More information about the webkit-gtk mailing list