Bug 1551609. Follow-up to mark PrintUtils.enterPrintPreview internal. r=mconley
authorJonathan Watt <jwatt@jwatt.org>
Tue, 30 Apr 2019 10:40:13 +0100
changeset 474160 d8d0020e4b9edce245d75feb0f0670f2247d4a73
parent 474159 9e9c2e06d0fbf2688be81b6f210a18c3da01cb3a
child 474161 5c2a7a00594f28e2d09e7acdf8f1fae7959c220d
push id36023
push userncsoregi@mozilla.com
push dateThu, 16 May 2019 21:56:43 +0000
treeherdermozilla-central@786f094a30ae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1551609
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1551609. Follow-up to mark PrintUtils.enterPrintPreview internal. r=mconley
toolkit/components/printing/content/printUtils.js
--- a/toolkit/components/printing/content/printUtils.js
+++ b/toolkit/components/printing/content/printUtils.js
@@ -184,17 +184,17 @@ var PrintUtils = {
       // Here we log telemetry data for when the user enters print preview.
       this.logTelemetry("PRINT_PREVIEW_OPENED_COUNT");
     } else {
       // Disable toolbar elements that can cause another update to be triggered
       // during this update.
       printPreviewTB.disableUpdateTriggers(true);
 
       // collapse the browser here -- it will be shown in
-      // enterPrintPreview; this forces a reflow which fixes display
+      // _enterPrintPreview; this forces a reflow which fixes display
       // issues in bug 267422.
       // We use the print preview browser as the source browser to avoid
       // re-initializing print preview with a document that might now have changed.
       this._sourceBrowser = this._shouldSimplify ?
         this._listener.getSimplifiedPrintPreviewBrowser() :
         this._listener.getPrintPreviewBrowser();
       this._sourceBrowser.collapsed = true;
 
@@ -222,20 +222,20 @@ var PrintUtils = {
       if (ppParams.value) {
         ppParams.value.docTitle = this._originalTitle;
         ppParams.value.docURL   = this._originalURL;
       }
 
       // this tells us whether we should continue on with PP or
       // wait for the callback via the observer
       if (!notifyOnOpen.value.valueOf() || this._webProgressPP.value == null) {
-        this.enterPrintPreview();
+        this._enterPrintPreview();
       }
     } catch (e) {
-      this.enterPrintPreview();
+      this._enterPrintPreview();
     }
   },
 
   // "private" methods and members. Don't use them.
 
   _listener: null,
   _closeHandlerPP: null,
   _webProgressPP: null,
@@ -391,17 +391,17 @@ var PrintUtils = {
   {
     observe(aSubject, aTopic, aData) {
       // Only process a null topic which means the progress dialog is open.
       if (aTopic) {
         return;
       }
 
       // delay the print preview to show the content of the progress dialog
-      setTimeout(function() { PrintUtils.enterPrintPreview(); }, 0);
+      setTimeout(function() { PrintUtils._enterPrintPreview(); }, 0);
     },
 
     QueryInterface: ChromeUtils.generateQI(["nsIObserver",
                                             "nsISupportsWeakReference"]),
   },
 
   get shouldSimplify() {
     return this._shouldSimplify;
@@ -420,17 +420,17 @@ var PrintUtils = {
   * _ppBrowsers
   *        Set of print preview browsers.
   * _currentPPBrowser
   *        References the current print preview browser that is being presented.
   */
   _ppBrowsers: new Set(),
   _currentPPBrowser: null,
 
-  enterPrintPreview() {
+  _enterPrintPreview() {
     // Send a message to the print preview browser to initialize
     // print preview. If we happen to have gotten a print preview
     // progress listener from nsIPrintingPromptService.showPrintProgressDialog
     // in printPreview, we add listeners to feed that progress
     // listener.
     let ppBrowser = this._shouldSimplify ?
       this._listener.getSimplifiedPrintPreviewBrowser() :
       this._listener.getPrintPreviewBrowser();