From e2b7896826a9fa2ab239f73b1b557bfde0affc80 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Thu, 21 Sep 2023 12:51:34 +0200 Subject: [PATCH] [GeckoView] Avoid bundling the `AltTextManager` class, since it's unused --- gulpfile.mjs | 1 + test/unit/unit_test.html | 1 + web/app.js | 2 +- web/stubs-geckoview.js | 2 ++ web/viewer-geckoview.html | 1 + web/viewer.html | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gulpfile.mjs b/gulpfile.mjs index 6248cf33b..deafd10ad 100644 --- a/gulpfile.mjs +++ b/gulpfile.mjs @@ -244,6 +244,7 @@ function createWebpackConfig( "display-svg": "src/display/stubs.js", }; const viewerAlias = { + "web-alt_text_manager": "web/alt_text_manager.js", "web-annotation_editor_params": "web/annotation_editor_params.js", "web-com": "", "web-pdf_attachment_viewer": "web/pdf_attachment_viewer.js", diff --git a/test/unit/unit_test.html b/test/unit/unit_test.html index 193aa3a76..222c3c6e3 100644 --- a/test/unit/unit_test.html +++ b/test/unit/unit_test.html @@ -24,6 +24,7 @@ "display-node_utils": "../../src/display/stubs.js", "display-svg": "../../src/display/stubs.js", + "web-alt_text_manager": "../../web/alt_text_manager.js", "web-annotation_editor_params": "../../web/annotation_editor_params.js", "web-com": "../../web/genericcom.js", "web-pdf_attachment_viewer": "../../web/pdf_attachment_viewer.js", diff --git a/web/app.js b/web/app.js index 83217cb52..d7261fed1 100644 --- a/web/app.js +++ b/web/app.js @@ -55,7 +55,7 @@ import { import { AppOptions, OptionKind } from "./app_options.js"; import { AutomationEventBus, EventBus } from "./event_utils.js"; import { LinkTarget, PDFLinkService } from "./pdf_link_service.js"; -import { AltTextManager } from "./alt_text_manager.js"; +import { AltTextManager } from "web-alt_text_manager"; import { AnnotationEditorParams } from "web-annotation_editor_params"; import { OverlayManager } from "./overlay_manager.js"; import { PasswordPrompt } from "./password_prompt.js"; diff --git a/web/stubs-geckoview.js b/web/stubs-geckoview.js index 3a206482e..726f03242 100644 --- a/web/stubs-geckoview.js +++ b/web/stubs-geckoview.js @@ -13,6 +13,7 @@ * limitations under the License. */ +const AltTextManager = null; const AnnotationEditorParams = null; const PDFAttachmentViewer = null; const PDFCursorTools = null; @@ -26,6 +27,7 @@ const PDFThumbnailViewer = null; const SecondaryToolbar = null; export { + AltTextManager, AnnotationEditorParams, PDFAttachmentViewer, PDFCursorTools, diff --git a/web/viewer-geckoview.html b/web/viewer-geckoview.html index ddbb87a81..bf359720b 100644 --- a/web/viewer-geckoview.html +++ b/web/viewer-geckoview.html @@ -56,6 +56,7 @@ See https://github.com/adobe-type-tools/cmap-resources "display-node_utils": "../src/display/stubs.js", "display-svg": "../src/display/stubs.js", + "web-alt_text_manager": "./stubs-geckoview.js", "web-annotation_editor_params": "./stubs-geckoview.js", "web-com": "./genericcom.js", "web-pdf_attachment_viewer": "./stubs-geckoview.js", diff --git a/web/viewer.html b/web/viewer.html index e49b622b8..e2d886733 100644 --- a/web/viewer.html +++ b/web/viewer.html @@ -67,6 +67,7 @@ See https://github.com/adobe-type-tools/cmap-resources "display-node_utils": "../src/display/stubs.js", "display-svg": "../src/display/stubs.js", + "web-alt_text_manager": "./alt_text_manager.js", "web-annotation_editor_params": "./annotation_editor_params.js", "web-com": "./genericcom.js", "web-pdf_attachment_viewer": "./pdf_attachment_viewer.js",