Remove unnecessary IIFEs when setting the compatParams

This really isn't necessary, and it's just a left-over from before the code was moved into the current file.

Also, spotted during rebasing, use the existing "locale" hash-parameter in integration-tests rather than adding a duplicate one for testing.
This commit is contained in:
Jonas Jenwald 2026-01-30 09:35:36 +01:00
parent 5d02076313
commit 1370950843
3 changed files with 7 additions and 12 deletions

View File

@ -111,7 +111,7 @@ describe("Comment", () => {
".annotationEditorLayer",
"page-width",
null,
{ enableComment: true, localeProperties: "ar" }
{ enableComment: true, locale: "ar" }
);
});

View File

@ -387,7 +387,6 @@ const PDFViewerApplication = {
forcePageColors: x => x === "true",
pageColorsBackground: x => x,
pageColorsForeground: x => x,
localeProperties: x => ({ lang: x }),
sidebarViewOnLoad: x => parseInt(x),
});
}

View File

@ -37,19 +37,15 @@ if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
// Limit canvas size to 5 mega-pixels on mobile.
// Support: Android, iOS
(function () {
if (isIOS || isAndroid) {
compatParams.set("maxCanvasPixels", 5242880);
}
})();
if (isIOS || isAndroid) {
compatParams.set("maxCanvasPixels", 5242880);
}
// Don't use system fonts on Android (issue 18210).
// Support: Android
(function () {
if (isAndroid) {
compatParams.set("useSystemFonts", false);
}
})();
if (isAndroid) {
compatParams.set("useSystemFonts", false);
}
}
const OptionKind = {