Remove the abstract BaseViewer-class

After the changes in PR 14112 the `PDFViewer`-class is now "identical" to the `BaseViewer`-class and the `PDFSinglePageViewer`-class is just a very thin wrapper around the `BaseViewer`-class.
Hence we can rename these files, and also remove the abstract `BaseViewer`-class, which helps reduce some unnecessary "closures" in the *built* viewer.

*Please note:* These changes are made in two separate commits, to allow GitHub to preserve `blame` for the affected files.
This commit is contained in:
Jonas Jenwald 2022-09-08 11:53:56 +02:00
parent 6dc4c994b8
commit 21fe5017bb
8 changed files with 7 additions and 7 deletions

View File

@ -9,7 +9,6 @@
"annotation_spec.js",
"annotation_storage_spec.js",
"api_spec.js",
"base_viewer_spec.js",
"bidi_spec.js",
"cff_parser_spec.js",
"cmap_spec.js",
@ -35,6 +34,7 @@
"pdf_find_controller_spec.js",
"pdf_find_utils_spec.js",
"pdf_history_spec.js",
"pdf_viewer_spec.js",
"primitives_spec.js",
"stream_spec.js",
"struct_tree_spec.js",

View File

@ -54,7 +54,6 @@ async function initializePDFJS(callback) {
"pdfjs-test/unit/annotation_spec.js",
"pdfjs-test/unit/annotation_storage_spec.js",
"pdfjs-test/unit/api_spec.js",
"pdfjs-test/unit/base_viewer_spec.js",
"pdfjs-test/unit/bidi_spec.js",
"pdfjs-test/unit/cff_parser_spec.js",
"pdfjs-test/unit/cmap_spec.js",
@ -81,6 +80,7 @@ async function initializePDFJS(callback) {
"pdfjs-test/unit/pdf_find_controller_spec.js",
"pdfjs-test/unit/pdf_find_utils_spec.js",
"pdfjs-test/unit/pdf_history_spec.js",
"pdfjs-test/unit/pdf_viewer_spec.js",
"pdfjs-test/unit/primitives_spec.js",
"pdfjs-test/unit/scripting_spec.js",
"pdfjs-test/unit/stream_spec.js",

View File

@ -13,7 +13,7 @@
* limitations under the License.
*/
import { PDFPageViewBuffer } from "../../web/base_viewer.js";
import { PDFPageViewBuffer } from "../../web/pdf_viewer.js";
describe("PDFViewer", function () {
describe("PDFPageViewBuffer", function () {

View File

@ -73,7 +73,7 @@ import { PDFScriptingManager } from "./pdf_scripting_manager.js";
import { PDFSidebar } from "./pdf_sidebar.js";
import { PDFSidebarResizer } from "./pdf_sidebar_resizer.js";
import { PDFThumbnailViewer } from "./pdf_thumbnail_viewer.js";
import { PDFViewer } from "./base_viewer.js";
import { PDFViewer } from "./pdf_viewer.js";
import { SecondaryToolbar } from "./secondary_toolbar.js";
import { Toolbar } from "./toolbar.js";
import { ViewHistory } from "./view_history.js";

View File

@ -14,7 +14,7 @@
*/
import { ScrollMode, SpreadMode } from "./ui_utils.js";
import { PDFViewer } from "./base_viewer.js";
import { PDFViewer } from "./pdf_viewer.js";
class PDFSinglePageViewer extends PDFViewer {
_resetView() {

View File

@ -41,7 +41,7 @@ import { PDFHistory } from "./pdf_history.js";
import { PDFPageView } from "./pdf_page_view.js";
import { PDFScriptingManager } from "./pdf_scripting_manager.js";
import { PDFSinglePageViewer } from "./pdf_single_page_viewer.js";
import { PDFViewer } from "./base_viewer.js";
import { PDFViewer } from "./pdf_viewer.js";
import { StructTreeLayerBuilder } from "./struct_tree_layer_builder.js";
import { TextLayerBuilder } from "./text_layer_builder.js";
import { XfaLayerBuilder } from "./xfa_layer_builder.js";

View File

@ -15,7 +15,7 @@
import { ScrollMode, SpreadMode } from "./ui_utils.js";
import { CursorTool } from "./pdf_cursor_tools.js";
import { PagesCountLimit } from "./base_viewer.js";
import { PagesCountLimit } from "./pdf_viewer.js";
/**
* @typedef {Object} SecondaryToolbarOptions