Bug 89877

Summary: mime apps: clarify precedence vs. subtypes
Product: Specifications Reporter: Allison Lortie (desrt) <desrt>
Component: GeneralAssignee: Allison Lortie (desrt) <desrt>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: desrt, faure
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: mime apps: clarify precedence vs. subtypes

Description Allison Lortie (desrt) 2015-04-02 16:35:34 UTC
Clarify that we always prefer specific subtypes (like text/html) to the
more generic types (like text/plain) when deciding on associations and
default apps.

This avoids some strange cases where applications that operate on
text/plain are being taken in preference to more-specific applications,
just because they are present in 'higher' directories, or explicitly
listed in defaults files.
Comment 1 Allison Lortie (desrt) 2015-04-02 16:35:57 UTC
Created attachment 114832 [details] [review]
mime apps: clarify precedence vs. subtypes

Clarify that we always prefer specific subtypes (like text/html) to the
more generic types (like text/plain) when deciding on associations and
default apps.

This avoids some strange cases where applications that operate on
text/plain are being taken in preference to more-specific applications,
just because they are present in 'higher' directories, or explicitly
listed in defaults files.
Comment 2 Vladimir 2015-04-05 16:03:12 UTC
This sounds logical.
What is the way to determine if given MIME type is specific or generic?
Comment 3 Allison Lortie (desrt) 2015-04-08 13:32:38 UTC
Each mime-info entry has the ability to specify something like

    <sub-class-of type="text/plain"/>

to designate itself as a special-case of another type.
Comment 4 David Faure 2015-05-10 14:43:12 UTC
Comment on attachment 114832 [details] [review]
mime apps: clarify precedence vs. subtypes

Yep, looks good to me. We completely failed to talk about mimetype inheritance indeed.
Comment 5 David Faure 2015-05-10 14:58:46 UTC
You asked in the email: "do we reset the blacklist (removed apps) between each iteration of the algorithm for the different types in the inheritance chain when building the list of apps that support a given type?".

I would say no. If I blacklist gedit from text/plain, that means I don't want to see it popping up for a text/plain subclass either.
Comment 6 Vincent Untz 2015-09-18 09:41:37 UTC
Sorry for the noise, reassigning to new (since 2 years) maintainers (Ryan & David).
Comment 7 Allison Lortie (desrt) 2016-04-28 08:06:17 UTC
Attachment 114832 [details] pushed as 01c809e - mime apps: clarify precedence vs. subtypes

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.