Repository navigation
Hard-code the list of plugins and mimetypes in navigator - #29652
Merged
Merged
Conversation
wpt-pr-bot
approved these changes
Jul 13, 2021
wpt-pr-bot
left a comment
Collaborator
There was a problem hiding this comment.
The review process for this patch is being conducted in the Chromium project.
chromium-wpt-export-bot
force-pushed
the
chromium-export-cl-3017890
branch
from
July 16, 2021 01:33
bf21d5a to
d79e43e
Compare
chromium-wpt-export-bot
force-pushed
the
chromium-export-cl-3017890
branch
2 times, most recently
from
July 23, 2021 20:55
a6d0793 to
15a3d6d
Compare
chromium-wpt-export-bot
force-pushed
the
chromium-export-cl-3017890
branch
3 times, most recently
from
August 6, 2021 18:24
ad08704 to
d724482
Compare
See [1] for a previous attempt to completely empty the navigator.plugins and navigator.mimeTypes APIs. That caused site breakage due to sites scanning for a PDF reader. This new attempt is discussed in significant detail in [2], and involves the hard-coding of a list of PDF viewers and mime types. The plugins/mimetypes lists will be empty if the user setting to download PDFs instead of viewing them (chrome://settings/content/pdfDocuments) is enabled. This is to ensure compat with sites that scan the plugins list for specific PDF plugins to decide on behavior. Prior to this CL, when the PDF viewer is disabled, the PDF viewer plugins are unloaded. Tests were copied mostly verbatim from [3], thanks @domenic. I2S: https://groups.google.com/a/chromium.org/g/blink-dev/c/bbxAGu90LgM [1] https://chromium-review.googlesource.com/c/chromium/src/+/2783393 [2] whatwg/html#6738 [3] #29559 Bug: 1164635 Change-Id: I7c52af5b918768d8b4c4a9faa409fb4e6b72ecc2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3017890 Commit-Queue: Mason Freed <[email protected]> Auto-Submit: Mason Freed <[email protected]> Reviewed-by: Joey Arhar <[email protected]> Reviewed-by: Chris Harrelson <[email protected]> Cr-Commit-Position: refs/heads/master@{#909443}
chromium-wpt-export-bot
force-pushed
the
chromium-export-cl-3017890
branch
from
August 6, 2021 20:38
d724482 to
ce51d0d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See [1] for a previous attempt to completely empty the navigator.plugins
and navigator.mimeTypes APIs. That caused site breakage due to sites
scanning for a PDF reader. This new attempt is discussed in significant
detail in [2], and involves the hard-coding of a list of PDF viewers and
mime types.
The plugins/mimetypes lists will be empty if the user setting to
download PDFs instead of viewing them
(chrome://settings/content/pdfDocuments) is enabled. This is to ensure
compat with sites that scan the plugins list for specific PDF plugins
to decide on behavior. Prior to this CL, when the PDF viewer is
disabled, the PDF viewer plugins are unloaded.
Tests were copied mostly verbatim from [3], thanks @domenic.
I2S:
https://groups.google.com/a/chromium.org/g/blink-dev/c/bbxAGu90LgM
[1] https://chromium-review.googlesource.com/c/chromium/src/+/2783393
[2] whatwg/html#6738
[3] #29559
Bug: 1164635
Change-Id: I7c52af5b918768d8b4c4a9faa409fb4e6b72ecc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3017890
Commit-Queue: Mason Freed <[email protected]>
Auto-Submit: Mason Freed <[email protected]>
Reviewed-by: Joey Arhar <[email protected]>
Reviewed-by: Chris Harrelson <[email protected]>
Cr-Commit-Position: refs/heads/master@{#909443}