Skip to content

Hard-code the list of plugins and mimetypes in navigator - #29652

Merged
chromium-wpt-export-bot merged 1 commit into
masterfrom
chromium-export-cl-3017890
Aug 6, 2021
Merged

chromium-wpt-export-bot merged 1 commit into
masterfrom
chromium-export-cl-3017890

Conversation

@chromium-wpt-export-bot

@chromium-wpt-export-bot chromium-wpt-export-bot commented Jul 13, 2021 •

Copy link
Copy Markdown
Collaborator

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}

@wpt-pr-bot wpt-pr-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot
chromium-wpt-export-bot force-pushed the chromium-export-cl-3017890 branch 2 times, most recently from a6d0793 to 15a3d6d Compare July 23, 2021 20:55
@chromium-wpt-export-bot
chromium-wpt-export-bot force-pushed the chromium-export-cl-3017890 branch 3 times, most recently from ad08704 to d724482 Compare August 6, 2021 18:24
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
chromium-wpt-export-bot merged commit 7be5ecf into master Aug 6, 2021
@chromium-wpt-export-bot
chromium-wpt-export-bot deleted the chromium-export-cl-3017890 branch August 6, 2021 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants