Bug 1274746: Use previous custom scale value when switching from Shrink To Fit in Print Preview. r=mconley
authorBob Owen <bobowencode@gmail.com>
Mon, 11 Sep 2017 11:53:14 +0100
changeset 429561 ad3316ee67aa7a70af38fec7ecbc6a6566c1876f
parent 429560 5b06c9c1013ef4c614a58f12d6b98bdadd5b06d6
child 429562 4edf631edd326bf69999b229516d994a84fe2748
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1274746
milestone57.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 1274746: Use previous custom scale value when switching from Shrink To Fit in Print Preview. r=mconley The change here is to make the prompt return the value even if it hasn't changed, because we still need to reprocess if we are switching from Shrink To Fit.
toolkit/components/printing/content/printPreviewBindings.xml
--- a/toolkit/components/printing/content/printPreviewBindings.xml
+++ b/toolkit/components/printing/content/printPreviewBindings.xml
@@ -292,17 +292,17 @@
         <body>
         <![CDATA[
           var value = Math.round(aValue);
           var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
           var promptStr = this.mScaleLabel.value;
           var renameTitle = this.mCustomTitle;
           var result = {value};
           var confirmed = promptService.prompt(window, renameTitle, promptStr, result, null, {value});
-          if (!confirmed || (!result.value) || (result.value == "") || result.value == value) {
+          if (!confirmed || (!result.value) || (result.value == "")) {
             return -1;
           }
           return result.value;
         ]]>
         </body>
       </method>
 
       <method name="setScaleCombobox">