Skip to content

Removing plugins? #6003

Open
Open

Description

@domenic

With Flash deprecation, it might be the case that browsers no longer implement plugins, and as such we could remove some of the spec complexity around them.

Note, however, that we do need to keep enough to allow rendering of PDFs, and to allow rendering of HTML pages (and other supported content types) in embed and object. So it's not like we can completely gut the embed and object sections.

And, it looks like at the time of #3958, Chrome treated PDFs as plugins. So maybe we can't remove much.

Anyway, some candidates for removal:

The param simplification likely holds even if PDF ends up staying around as a plugin. (And in turn we can close #387.)

Activity

  1. added
    removal/deprecation
    on Oct 1, 2020
  2. annevk commented on Oct 5, 2020

    @annevk
    Member

    If we can remove https://html.spec.whatwg.org/#concept-embed-type that would be nice. Hopefully browsers do not look for .pdf.

  3. added
    topic: embed and object
    on Jan 6, 2021
  4. annevk commented on Jan 6, 2021

    @annevk
    Member

    The way Chrome and Firefox support PDF is as the result of a navigation, so plugin documents continue to exist, but I'm not sure they would be different from inline content that doesn't have a DOM as the result is basically a document with an opaque origin.

    A question that came up in annevk/orb#5 is whether we can make these always create nested browsing contexts. I suspect that won't work due to images, but it might be worth investigating more. (See also w3c/webappsec-fetch-metadata#37 and w3c/webappsec-fetch-metadata#45.) whatwg/fetch#948 suggests this might be possible now plugins are removed, but we may need to keep some quirks. Seems very much worth investigating.

    cc @anforowicz @arturjanc @mikewest

  5. domenic commented on Jan 15, 2021

    @domenic
    MemberAuthor

    It looks like @mfreed7 is interested in having Chrome follow Firefox and return empty for navigator.plugins and navigator.mimeTypes, hooray!

    @annevk, can you give more details on what Firefox does? For example, I could imagine:

    1. Totally removing PluginArray, MimeTypeArray, Plugin, and MimeType, and having navigator.plugins and navigator.mimeTypes return (frozen?) normal arrays.
    2. Not removing any interfaces, and just having the lists always be zero-length, and navigator.plugins.refresh() always a no-op

    ... or something in between

    I suspect (2) is going to be easiest, but is that what Firefox did? A spec PR would be great, where we can hash out the details.

    (Also, I guess navigator.javaEnabled() always returns false now?)

  6. mfreed7 commented on Jan 15, 2021

    @mfreed7
    Contributor

    😄

    For at least a while (weeks? a milestone or two?) my plan is to just do #2. That also appears to be what Firefox has done, at least in effect. And in Chromium, FYI, javaEnabled() has been false since M45.

    I'd be happy to do more (i.e. #1), but I suspect that would cause major compat issues. Navigator.plugins is used on 60% of pageloads today. And I would guess those numbers will stay high even after the APIs start returning [].

  7. domenic commented on Jan 15, 2021

    @domenic
    MemberAuthor

    On the compat front, I suspect that removing PluginArray and MimeTypeArray would be hard, because of the extra methods (refresh(), item(), and namedItem()) which wouldn't be present on normal arrays.

    But removing Plugin and MimeType might be easier, since if navigator.plugins and navigator.mimeTypes return [], then the only way to detect their existence is by checking for window.Plugin and window.MimeType, which is pretty pointless (and so, I would suspect, unlikely).

    Going with just (2) for now makes a lot of sense to me; you're already taking on a nice chunk of work!

  8. mfreed7 commented on Jan 15, 2021

    @mfreed7
    Contributor

    Good point about Plugin and MimeType. Perhaps while I'm emptying the arrays, I'll also add use counters for the Plugin and MimeType constructors. Then we can see how often people construct those directly.

  9. added a commit that references this issue on Jan 15, 2021
  10. domenic commented on Jan 15, 2021

    @domenic
    MemberAuthor

    They don't even have constructors, so literally the only thing people could be doing is accessing the properties, like if (window.Plugin) or something.

    I posted a PR at #6296. As you can see there, because the arrays are now always empty and thus no Plugin or MimeType instances can ever exist, we can simplify their IDL and algorithms dramatically.

  11. added a commit that references this issue on Jan 15, 2021
  12. davidp3 commented on Jan 15, 2021

    @davidp3

    I suspect (2) is going to be easiest, but is that what Firefox did?

    Firefox does (2) but not as a special case -- the arrays are just naturally empty. In an upcoming cleanup patch, they will be replaced with hard-coded empty arrays but still type (2) -- we do still have the PluginArray and MimeTypeArray IDL types. But this is the browser's only use of those types -- finding a way to get rid of them would be nice.

    I guess we also still have the Plugin and MimeType types but they are useless as mentioned.

  13. 39 remaining items

  14. domenic commented on Jul 22, 2021

    @domenic
    MemberAuthor

    I think we've finished the saga of navigator.plugins and navigator.mimeTypes.

    At the next triage meeting I'd like to discuss if anyone is willing to spend time on the other issues in the OP.

  15. added a commit that references this issue on Aug 30, 2021
  16. removed
    agenda+
    on Sep 2, 2021
  17. mfreed7 commented on Oct 4, 2021

    @mfreed7
    Contributor

    Quick check in on this issue. Chromium implemented and shipped the "Fixed" set of plugins and mimetypes in M94, which has been in stable release for about a week at this point. It is still too early to declare a full success, but I can at least report that I do not know of any reported breakage bugs due to this change. Which at least means that this change doesn't break the world. I'll update here if something does come up that looks bad, but otherwise we can perhaps conclude that the fixed plugin lists are web compatible.

  18. mfreed7 commented on Nov 10, 2021

    @mfreed7
    Contributor

    It has now been about a month and a half, and Chromium is almost 2 versions past M94 where these changes were made. I am unaware of any reported issues. I think it might now be safe to declare victory in removing this fingerprinting vector.

    For reference, here are the related implementation bugs:

  19. added a commit that references this issue on Apr 12, 2022
  20. added a commit that references this issue on Apr 21, 2022
  21. domenic commented on Nov 30, 2022

    @domenic
    MemberAuthor

    A status update:

    Much of what the OP lists has been completed. What remains is:

    • Removing the concept of a plugin, and ensuring every part of the spec that used to interface with it, instead talks about PDF rendering.
    • Simplifying object and embed, as much as possible.

    It's tempting to entangle these tasks. E.g. do browsers really check for file extensions for PDFs? Do mutations of the classid attribute really cause PDFs to reload? Is the type attribute still relevant when PDFs are the only option? Etc.

    Some sub-issues on this subject:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    removal/deprecationtopic: embed and object

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions