From b2758c302307706c91744cc1bc04adb64ff9b73e Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Tue, 6 Apr 2021 13:04:23 +0200 Subject: [PATCH 1/3] Remove the deprecated properties from the "presentationmodechanged" event (PR 12788 follow-up) These properties have been deprecated in two releases now, hence we shouldn't need to keep this code around. --- web/pdf_presentation_mode.js | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/web/pdf_presentation_mode.js b/web/pdf_presentation_mode.js index fd16f5a63..6fb788e14 100644 --- a/web/pdf_presentation_mode.js +++ b/web/pdf_presentation_mode.js @@ -155,28 +155,10 @@ class PDFPresentationMode { } else if (this.active) { state = PresentationModeState.FULLSCREEN; } - - if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) { - this.eventBus.dispatch("presentationmodechanged", { - source: this, - state, - }); - } else { - this.eventBus.dispatch("presentationmodechanged", { - source: this, - state, - get active() { - throw new Error( - "Deprecated parameter: `active`, please use `state` instead." - ); - }, - get switchInProgress() { - throw new Error( - "Deprecated parameter: `switchInProgress`, please use `state` instead." - ); - }, - }); - } + this.eventBus.dispatch("presentationmodechanged", { + source: this, + state, + }); } /** From 92ec10bfcad11fea430c5bda6e4b104b1653d57f Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Tue, 6 Apr 2021 13:07:38 +0200 Subject: [PATCH 2/3] Remove the deprecated `PDFLinkService.navigateTo`-method (PR 12440 follow-up) This method has been deprecated in two releases now, hence we shouldn't need to keep this code around. --- web/pdf_link_service.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/web/pdf_link_service.js b/web/pdf_link_service.js index a8a393e75..29d6d2daa 100644 --- a/web/pdf_link_service.js +++ b/web/pdf_link_service.js @@ -107,16 +107,6 @@ class PDFLinkService { this.pdfViewer.pagesRotation = value; } - /** - * @deprecated - */ - navigateTo(dest) { - console.error( - "Deprecated method: `navigateTo`, use `goToDestination` instead." - ); - this.goToDestination(dest); - } - /** * @private */ From 4e81e0e14f3c353cca4aff4fd0c045920d1289ce Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Tue, 6 Apr 2021 13:09:55 +0200 Subject: [PATCH 3/3] Remove the deprecated `AnnotationStorage.getOrCreateValue`-method (PR 12759 follow-up) While this method has only been deprecated in one releases now, the `AnnotationStorage`-functionality is new enough that third-party implementations hopefully don't rely heavily on it just yet. (And removing this quickly should help reduce the likelihood that someone starts using it.) --- src/display/annotation_storage.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/display/annotation_storage.js b/src/display/annotation_storage.js index c8d51d1e5..e1d9c1744 100644 --- a/src/display/annotation_storage.js +++ b/src/display/annotation_storage.js @@ -13,7 +13,6 @@ * limitations under the License. */ -import { deprecated } from "./display_utils.js"; import { objectFromMap } from "../shared/util.js"; /** @@ -27,7 +26,7 @@ class AnnotationStorage { // Callbacks to signal when the modification state is set or reset. // This is used by the viewer to only bind on `beforeunload` if forms // are actually edited to prevent doing so unconditionally since that - // can have undesirable efffects. + // can have undesirable effects. this.onSetModified = null; this.onResetModified = null; } @@ -46,19 +45,6 @@ class AnnotationStorage { return obj !== undefined ? obj : defaultValue; } - /** - * @deprecated - */ - getOrCreateValue(key, defaultValue) { - deprecated("Use getValue instead."); - if (this._storage.has(key)) { - return this._storage.get(key); - } - - this._storage.set(key, defaultValue); - return defaultValue; - } - /** * Set the value for a given key *