Bug 1654548 - fix printing in compose, view source, mail viewer, address book and attempt to improve state for calendar r=mkmelin a=wsmwk
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Thu, 06 Aug 2020 12:31:53 +0000
changeset 40124 f645a932dd65505d9215d13a57a79f46844da5ca
parent 40123 12e9a7dd397b4c00b926cdf70a7d0edec420bbc9
child 40125 db11b2b52f1f1275345ee4ffb4a4ed02bb3580f6
push id404
push userclokep@gmail.com
push dateMon, 24 Aug 2020 19:48:23 +0000
reviewersmkmelin, wsmwk
bugs1654548
Bug 1654548 - fix printing in compose, view source, mail viewer, address book and attempt to improve state for calendar r=mkmelin a=wsmwk Differential Revision: https://phabricator.services.mozilla.com/D86013
calendar/base/content/calendar-ui-utils.js
calendar/base/content/dialogs/calendar-event-dialog.xhtml
common/src/viewSource.xhtml
mailnews/base/content/msgPrintEngine.js
mailnews/base/content/msgPrintEngine.xhtml
--- a/calendar/base/content/calendar-ui-utils.js
+++ b/calendar/base/content/calendar-ui-utils.js
@@ -12,16 +12,17 @@
  *          setupAttendanceMenu
  */
 
 /* import-globals-from ../../../../toolkit/content/globalOverlay.js */
 
 var { cal } = ChromeUtils.import("resource:///modules/calendar/calUtils.jsm");
 var { PluralForm } = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 /**
  * Helper function for filling the form,
  * Set the value of a property of a XUL element
  *
  * @param aElement      ID of XUL element to set, or the element node itself
  * @param aNewValue     value to set property to ( if undefined no change is made )
  * @param aPropertyName OPTIONAL name of property to set, default is "value",
--- a/calendar/base/content/dialogs/calendar-event-dialog.xhtml
+++ b/calendar/base/content/dialogs/calendar-event-dialog.xhtml
@@ -44,16 +44,17 @@
 
   <!-- Javascript includes -->
   <script src="chrome://lightning/content/lightning-item-panel.js"/>
   <script src="chrome://calendar/content/calendar-dialog-utils.js"/>
   <script src="chrome://calendar/content/calendar-ui-utils.js"/>
   <script src="chrome://global/content/globalOverlay.js"/>
   <script src="chrome://messenger/content/toolbarIconColor.js"/>
   <script src="chrome://messenger/content/customizable-toolbar.js"/>
+  <script src="chrome://global/content/printUtils.js"/>
 
   <stringbundle id="languageBundle" src="chrome://global/locale/languageNames.properties"/>
 
   <!-- Command updater -->
   <commandset id="globalEditMenuItems"
               commandupdater="true"
               events="focus"
               oncommandupdate="goUpdateGlobalEditMenuItems()"/>
--- a/common/src/viewSource.xhtml
+++ b/common/src/viewSource.xhtml
@@ -34,18 +34,18 @@
         persist="screenX screenY width height sizemode">
 
 <linkset>
   <html:link rel="localization" href="messenger/menubar.ftl"/>
   <html:link rel="localization" href="toolkit/global/textActions.ftl"/>
 </linkset>
 
   <script src="chrome://global/content/globalOverlay.js"/>
+  <script src="chrome://global/content/contentAreaUtils.js"/>
   <script src="chrome://global/content/printUtils.js"/>
-  <script src="chrome://global/content/contentAreaUtils.js"/>
 #ifndef MOZ_SUITE
   <script src="chrome://messenger/content/mailCore.js"/>
 #endif
   <script src="chrome://messenger/content/viewSource.js"/>
   <script src="chrome://messenger/content/viewZoomOverlay.js"/>
   <script src="chrome://global/content/editMenuOverlay.js"/>
 
   <stringbundle id="viewSourceBundle" src="chrome://messenger/locale/viewSource.properties"/>
--- a/mailnews/base/content/msgPrintEngine.js
+++ b/mailnews/base/content/msgPrintEngine.js
@@ -3,16 +3,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* This is where functions related to the print engine are kept */
 
 /* import-globals-from ../../../../toolkit/components/printing/content/printUtils.js */
 
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 /* globals for a particular window */
 var printEngineContractID = "@mozilla.org/messenger/msgPrintEngine;1";
 var printEngineWindow;
 var printEngine;
 var printSettings = null;
 var printOpener = null;
 
--- a/mailnews/base/content/msgPrintEngine.xhtml
+++ b/mailnews/base/content/msgPrintEngine.xhtml
@@ -18,19 +18,19 @@
 
   <stringbundle id="bundle_brand" src="chrome://branding/locale/brand.properties"/>
   <stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
 
   <!-- Provide shortcut keys for toolkit's print preview; commands will be overridden by printUtils.js -->
   <key id="printKb" key="&printCmd.key;" command="cmd_print" modifiers="accel"/>
   <key id="key_close" key="&closeCmd.key;" command="cmd_close" modifiers="accel"/>
 
-  <script src="chrome://global/content/printUtils.js"/>
   <script src="chrome://global/content/globalOverlay.js"/>
   <script src="chrome://messenger/content/msgPrintEngine.js"/>
+  <script src="chrome://global/content/printUtils.js"/>
 
   <!-- The main display frame -->
   <browser id="content"
            type="content"
            primary="true"
            name="content"
            src="about:blank"
            flex="1"