Bug 1377669 - about:support: Port bug 1351783 [scrolling information] and bug 1375692 [Stylo status] to TB. r=aceman
authorRichard Marti <richard.marti@gmail.com>
Sat, 01 Jul 2017 14:03:10 +0200
changeset 28409 a07b00fe1a3b7e715d1fe5ed73fee8ed89f35052
parent 28408 408fd2480e7e9e33d7a0f5f154553f2a297a2f16
child 28410 3e98289e630350dd956ba213a5c0715a51219026
push id1986
push userclokep@gmail.com
push dateWed, 02 Aug 2017 14:43:31 +0000
treeherdercomm-beta@b51c9adf2c9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaceman
bugs1377669, 1351783, 1375692
Bug 1377669 - about:support: Port bug 1351783 [scrolling information] and bug 1375692 [Stylo status] to TB. r=aceman Bug 1351783: part 18 - Add async keyboard scrolling information to about:support Bug 1375692: Add Stylo status to about:support
mail/components/about-support/content/aboutSupport.js
mail/components/about-support/content/aboutSupport.xhtml
--- a/mail/components/about-support/content/aboutSupport.js
+++ b/mail/components/about-support/content/aboutSupport.js
@@ -90,16 +90,32 @@ var snapshotFormatters = {
       case 10:
         statusText = (Services.appinfo.OS == "Darwin" ? "OS X 10.6 - 10.8" : "Windows XP");
         break;
     }
 
     $("multiprocess-box").textContent = strings.formatStringFromName("multiProcessWindows",
       [data.numRemoteWindows, data.numTotalWindows, statusText], 3);
 
+    let styloReason;
+    if (!data.styloBuild) {
+      styloReason = strings.GetStringFromName("disabledByBuild");
+    } else if (data.styloResult != data.styloDefault) {
+      if (data.styloResult) {
+        styloReason = strings.GetStringFromName("enabledByUser");
+      } else {
+        styloReason = strings.GetStringFromName("disabledByUser");
+      }
+    } else if (data.styloDefault) {
+      styloReason = strings.GetStringFromName("enabledByDefault");
+    } else {
+      styloReason = strings.GetStringFromName("disabledByDefault");
+    }
+    $("stylo-box").textContent = `${data.styloResult} (${styloReason})`;
+
     let keyGoogleFound = data.keyGoogleFound ? "found" : "missing";
     $("key-google-box").textContent = strings.GetStringFromName(keyGoogleFound);
 
     let keyMozillaFound = data.keyMozillaFound ? "found" : "missing";
     $("key-mozilla-box").textContent = strings.GetStringFromName(keyMozillaFound);
 
     $("safemode-box").textContent = data.safeMode;
 
@@ -285,17 +301,17 @@ var snapshotFormatters = {
       }
       return nameOrMsg;
     }
 
     // Read APZ info out of data.info, stripping it out in the process.
     let apzInfo = [];
     let formatApzInfo = function(info) {
       let out = [];
-      for (let type of ["Wheel", "Touch", "Drag"]) {
+      for (let type of ["Wheel", "Touch", "Drag", "Keyboard"]) {
         let key = "Apz" + type + "Input";
 
         if (!(key in info))
           continue;
 
         delete info[key];
 
         let message = localizedMsg([type.toLowerCase() + "Enabled"]);
--- a/mail/components/about-support/content/aboutSupport.xhtml
+++ b/mail/components/about-support/content/aboutSupport.xhtml
@@ -252,16 +252,25 @@
             </th>
 
             <td id="multiprocess-box">
             </td>
           </tr>
 
           <tr>
             <th class="column">
+              Stylo
+            </th>
+
+            <td id="stylo-box">
+            </td>
+          </tr>
+
+          <tr>
+            <th class="column">
               &aboutSupport.appBasicsKeyGoogle;
             </th>
 
             <td id="key-google-box">
             </td>
           </tr>
 
           <tr>