Merge pull request #13249 from Snuffleupagus/rm-generic-signature-warn

[GENERIC viewer] Don't display the `errorWrapper`, for documents with signatures (PR 13217 follow-up)
This commit is contained in:
Tim van der Meij 2021-04-16 20:36:52 +02:00 committed by GitHub
commit ad2afab585
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 22 deletions

View File

@ -246,6 +246,3 @@ password_cancel=Cancel
printing_not_supported=Warning: Printing is not fully supported by this browser.
printing_not_ready=Warning: The PDF is not fully loaded for printing.
web_fonts_disabled=Web fonts are disabled: unable to use embedded PDF fonts.
# LOCALIZATION NOTE (unsupported_feature_signatures): Should contain the same
# exact string as in the `chrome.properties` file.
unsupported_feature_signatures=This PDF document contains digital signatures. Validation of signatures is not supported.

View File

@ -1048,13 +1048,6 @@ const PDFViewerApplication = {
featureId,
});
// Don't show the fallback bar for things that are *very* unlikely to cause
// user-visible errors, to avoid bothering the user unnecessarily.
switch (featureId) {
case UNSUPPORTED_FEATURES.errorFontLoadNative:
case UNSUPPORTED_FEATURES.errorFontMissing:
return;
}
// Only trigger the fallback once so we don't spam the user with messages
// for one PDF.
if (this._fellback) {
@ -1062,16 +1055,6 @@ const PDFViewerApplication = {
}
this._fellback = true;
// Ensure that, for signatures, a warning is shown in non-Firefox builds.
if (
(typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) &&
featureId === UNSUPPORTED_FEATURES.signatures
) {
this.l10n.get("unsupported_feature_signatures").then(msg => {
this._otherError(msg);
});
}
this.externalServices
.fallback({
featureId,

View File

@ -81,8 +81,6 @@ const DEFAULT_L10N_STRINGS = {
printing_not_ready: "Warning: The PDF is not fully loaded for printing.",
web_fonts_disabled:
"Web fonts are disabled: unable to use embedded PDF fonts.",
unsupported_feature_signatures:
"This PDF document contains digital signatures. Validation of signatures is not supported.",
};
function getL10nFallback(key, args) {