Bug 1547496 - remove warning for minimum font sizes being big as internal pages are no longer affected, r=mconley,flod
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Tue, 30 Apr 2019 17:14:40 +0000
changeset 530820 7abd077c82945d4f968bf51b1d3fd3136f45d106
parent 530819 8103d39d64da40f1a4da604cf66061b0131c0509
child 530821 1fdcbbc79e87fbad2984a6e1f047e71d5cd6c4f8
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley, flod
bugs1547496, 1047586, 1528712
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 1547496 - remove warning for minimum font sizes being big as internal pages are no longer affected, r=mconley,flod This warning was added in https://bugzilla.mozilla.org/show_bug.cgi?id=1047586 . As a result of https://bugzilla.mozilla.org/show_bug.cgi?id=1528712 , internal pages are no longer affected by this change. Instead, they obey the OS font size configuration, in which we cannot warn. So let's remove the now-inaccurate warning dialog. Differential Revision: https://phabricator.services.mozilla.com/D29218
browser/components/preferences/fonts.js
browser/components/preferences/fonts.xul
browser/locales/en-US/browser/preferences/fonts.ftl
--- a/browser/components/preferences/fonts.js
+++ b/browser/components/preferences/fonts.js
@@ -86,35 +86,9 @@ var gFontsDialog = {
     var preference = Preferences.get("browser.display.use_document_fonts");
     return preference.value == 1;
   },
 
   writeUseDocumentFonts() {
     var useDocumentFonts = document.getElementById("useDocumentFonts");
     return useDocumentFonts.checked ? 1 : 0;
   },
-
-  async confirmMinSizeChange() {
-    let menulist = document.getElementById("minSize");
-    let preference = menulist.getAttribute("preference");
-    let defaultValue = Preferences.get(preference).valueFromPreferences;
-    let oldValue = Preferences.get(preference).value;
-    let newValue = menulist.value;
-
-    if (newValue <= 24 || newValue == defaultValue) {
-      return;
-    }
-
-    let [title, warningMessage, confirmLabel] = await document.l10n.formatValues([
-      {id: "fonts-very-large-warning-title"},
-      {id: "fonts-very-large-warning-message"},
-      {id: "fonts-very-large-warning-accept"},
-    ]);
-    let {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-    let flags = Services.prompt.BUTTON_POS_1 * Services.prompt.BUTTON_TITLE_CANCEL |
-                Services.prompt.BUTTON_POS_0 * Services.prompt.BUTTON_TITLE_IS_STRING |
-                Services.prompt.BUTTON_POS_1_DEFAULT;
-    let buttonChosen = Services.prompt.confirmEx(window, title, warningMessage, flags, confirmLabel, null, "", "", {});
-    if (buttonChosen != 0) {
-      menulist.value = oldValue;
-    }
-  },
 };
--- a/browser/components/preferences/fonts.xul
+++ b/browser/components/preferences/fonts.xul
@@ -200,17 +200,17 @@
       </rows>
     </grid>
     <separator class="thin"/>
     <hbox pack="end">
       <hbox align="center" pack="end">
         <label data-l10n-id="fonts-minsize" control="minSize"/>
         <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
         <hbox>
-          <menulist id="minSize" oncommand="gFontsDialog.confirmMinSizeChange();">
+          <menulist id="minSize">
             <menupopup>
               <menuitem value="0" data-l10n-id="fonts-minsize-none"/>
               <menuitem value="9" label="9"/>
               <menuitem value="10" label="10"/>
               <menuitem value="11" label="11"/>
               <menuitem value="12" label="12"/>
               <menuitem value="13" label="13"/>
               <menuitem value="14" label="14"/>
--- a/browser/locales/en-US/browser/preferences/fonts.ftl
+++ b/browser/locales/en-US/browser/preferences/fonts.ftl
@@ -147,18 +147,14 @@ fonts-languages-fallback-name-thai =
     .label = Thai
 fonts-languages-fallback-name-turkish =
     .label = Turkish
 fonts-languages-fallback-name-vietnamese =
     .label = Vietnamese
 fonts-languages-fallback-name-other =
     .label = Other (incl. Western European)
 
-fonts-very-large-warning-title = Large minimum font size
-fonts-very-large-warning-message = You have selected a very large minimum font size (more than 24 pixels). This may make it difficult or impossible to use some important configuration pages like this one.
-fonts-very-large-warning-accept = Keep my changes anyway
-
 # Variables:
 #   $name {string, "Arial"} - Name of the default font
 fonts-label-default =
     .label = Default ({ $name })
 fonts-label-default-unnamed =
     .label = Default