Repository navigation
Open
Labels
removal/deprecationRemoving or deprecating a featuretopic: embed and objectThe embed and object elements
Description
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:
- Page load processing model for plugin documents, under the assumption that PDFs count as inline content that doesn't have a DOM (TODO test if that assumption holds; the above indicates it might not in Chrome)
- Sandboxing infrastructure for plugins, but see Interop: pdf might or might not render in a sandboxed iframe (depending on a browser) #3958 for PDF-related concerns
- Description of plugins
NavigatorPluginsand friends, but see Consider a standardized way to detect PDF in HTML? #3462; PDF support might end up living here in existing browsers.embedand especiallyobjectcould likely be simplified to be more likeiframe.- The
paramelement might be able to be totally neutered and moved to the obsolete section.
The param simplification likely holds even if PDF ends up staying around as a plugin. (And in turn we can close #387.)
Reacted by saeidsaeid and Raura
Metadata
Metadata
Assignees
Labels
removal/deprecationRemoving or deprecating a featuretopic: embed and objectThe embed and object elements
Activity
annevk commentedon Oct 5, 2020
If we can remove https://html.spec.whatwg.org/#concept-embed-type that would be nice. Hopefully browsers do not look for
.pdf.annevk commentedon Jan 6, 2021
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
annevk commentedon Jan 9, 2021
For
navigator.pluginsandnavigator.mimeTypesI filed https://bugs.chromium.org/p/chromium/issues/detail?id=1164635 and https://bugs.webkit.org/show_bug.cgi?id=220495.Remove the object element from submittable elements
Remove the object element from submittable elements
domenic commentedon Jan 15, 2021
It looks like @mfreed7 is interested in having Chrome follow Firefox and return empty for
navigator.pluginsandnavigator.mimeTypes, hooray!@annevk, can you give more details on what Firefox does? For example, I could imagine:
PluginArray,MimeTypeArray,Plugin, andMimeType, and havingnavigator.pluginsandnavigator.mimeTypesreturn (frozen?) normal arrays.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?)mfreed7 commentedon Jan 15, 2021
😄
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 [].
domenic commentedon Jan 15, 2021
On the compat front, I suspect that removing
PluginArrayandMimeTypeArraywould be hard, because of the extra methods (refresh(),item(), andnamedItem()) which wouldn't be present on normal arrays.But removing
PluginandMimeTypemight be easier, since ifnavigator.pluginsandnavigator.mimeTypesreturn[], then the only way to detect their existence is by checking forwindow.Pluginandwindow.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!
mfreed7 commentedon Jan 15, 2021
Good point about
PluginandMimeType. Perhaps while I'm emptying the arrays, I'll also add use counters for thePluginandMimeTypeconstructors. Then we can see how often people construct those directly.Make all plugin-related APIs no-ops
domenic commentedon Jan 15, 2021
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
PluginorMimeTypeinstances can ever exist, we can simplify their IDL and algorithms dramatically.Make all plugin-related APIs no-ops
davidp3 commentedon Jan 15, 2021
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
PluginArrayandMimeTypeArrayIDL 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
PluginandMimeTypetypes but they are useless as mentioned.39 remaining items
domenic commentedon Jul 22, 2021
I think we've finished the saga of
navigator.pluginsandnavigator.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.
Plugins are no longer an extensibility mechanism
Remove the notion of "secured plugins"
Remove the notion of "secured plugins"
mfreed7 commentedon Oct 4, 2021
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.
mfreed7 commentedon Nov 10, 2021
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:
Obsolete the <param> element
Obsolete the <param> element
Restore navigator.plugins and navigator.mimeTypes as PDF-focused
Plugins are no longer an extensibility mechanism
Remove the notion of "secured plugins"
Obsolete the <param> element
domenic commentedon Nov 30, 2022
A status update:
Much of what the OP lists has been completed. What remains is:
It's tempting to entangle these tasks. E.g. do browsers really check for file extensions for PDFs? Do mutations of the
classidattribute really cause PDFs to reload? Is thetypeattribute still relevant when PDFs are the only option? Etc.Some sub-issues on this subject:
<embed>and<object>behave like<iframe>for image loading #7939Disable HTMLParamElementUrlSupport and remove the flag/code