Merge mozilla-central to inbound. a=merge CLOSED TREE
authorNarcis Beleuzu <nbeleuzu@mozilla.com>
Fri, 10 Aug 2018 19:07:27 +0300
changeset 486116 299ae7dac53a80e9843e75da290d4c3153573d03
parent 486115 485fdf8e37e801c10fa32190481d8c1f3f7310b3 (current diff)
parent 486070 61e553ff703e2d93db2f03aa901d1976e8084723 (diff)
child 486117 71af60e17c8bdd72065137083be9eb61ac0a68d7
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone63.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
Merge mozilla-central to inbound. a=merge CLOSED TREE
--- a/devtools/client/framework/test/browser_toolbox_window_title_frame_select.js
+++ b/devtools/client/framework/test/browser_toolbox_window_title_frame_select.js
@@ -20,20 +20,16 @@ const L10N = new LocalizationHelper("dev
 add_task(async function() {
   Services.prefs.setBoolPref("devtools.command-button-frames.enabled", true);
 
   await addTab(URL);
   const target = TargetFactory.forTab(gBrowser.selectedTab);
   let toolbox = await gDevTools.showToolbox(target, null,
     Toolbox.HostType.BOTTOM);
 
-  let onTitleChanged = waitForTitleChange(toolbox);
-  await toolbox.selectTool("inspector");
-  await onTitleChanged;
-
   await toolbox.switchHost(Toolbox.HostType.WINDOW);
   // Wait for title change event *after* switch host, in order to listen
   // for the event on the WINDOW host window, which only exists after switchHost
   await waitForTitleChange(toolbox);
 
   is(getTitle(), `Developer Tools - Page title - ${URL}`,
     "Devtools title correct after switching to detached window host");
 
@@ -60,17 +56,17 @@ add_task(async function() {
   const topFrameBtn = frames.filter(b => b.label == URL)[0];
   const iframeBtn = frames.filter(b => b.label == IFRAME_URL)[0];
   ok(topFrameBtn, "Got top level document in the list");
   ok(iframeBtn, "Got iframe document in the list");
 
   // Listen to will-navigate to check if the view is empty
   const willNavigate = toolbox.target.once("will-navigate");
 
-  onTitleChanged = waitForTitleChange(toolbox);
+  const onTitleChanged = waitForTitleChange(toolbox);
 
   // Only select the iframe after we are able to select an element from the top
   // level document.
   const newRoot = toolbox.getPanel("inspector").once("new-root");
   info("Select the iframe");
   iframeBtn.click();
 
   await willNavigate;
--- a/devtools/client/preferences/devtools-client.js
+++ b/devtools/client/preferences/devtools-client.js
@@ -5,17 +5,17 @@
 // Enable DevTools WebIDE by default
 pref("devtools.webide.enabled", true);
 
 // Toolbox preferences
 pref("devtools.toolbox.footer.height", 250);
 pref("devtools.toolbox.sidebar.width", 500);
 pref("devtools.toolbox.host", "bottom");
 pref("devtools.toolbox.previousHost", "right");
-pref("devtools.toolbox.selectedTool", "webconsole");
+pref("devtools.toolbox.selectedTool", "inspector");
 pref("devtools.toolbox.sideEnabled", true);
 pref("devtools.toolbox.zoomValue", "1");
 pref("devtools.toolbox.splitconsoleEnabled", false);
 pref("devtools.toolbox.splitconsoleHeight", 100);
 pref("devtools.toolbox.tabsOrder", "");
 
 // Toolbox Button preferences
 pref("devtools.command-button-pick.enabled", true);
--- a/mobile/android/base/java/org/mozilla/gecko/notifications/NotificationClient.java
+++ b/mobile/android/base/java/org/mozilla/gecko/notifications/NotificationClient.java
@@ -229,21 +229,21 @@ public final class NotificationClient im
             return;
         }
 
         final Notification.Builder notificationBuilder = new Notification.Builder(mContext)
                 .setContentText(alertText)
                 .setSmallIcon(notification.icon)
                 .setWhen(notification.when)
                 .setContentIntent(notification.contentIntent)
+                .setOnlyAlertOnce(true)
                 .setProgress((int) progressMax, (int) progress, false);
 
         if (!AppConstants.Versions.preO) {
-            notificationBuilder.setChannelId(NotificationHelper.getInstance(mContext)
-                    .getNotificationChannel(NotificationHelper.Channel.DEFAULT).getId());
+            notificationBuilder.setChannelId(notification.getChannelId());
         }
 
         notification = notificationBuilder.build();
         add(name, notification);
     }
 
     /* package */ synchronized Notification onNotificationClose(final String name) {
         mNotificationManager.cancel(name, 0);
--- a/mobile/android/base/java/org/mozilla/gecko/notifications/NotificationHelper.java
+++ b/mobile/android/base/java/org/mozilla/gecko/notifications/NotificationHelper.java
@@ -21,16 +21,17 @@ import android.os.StrictMode;
 import android.support.v4.app.NotificationCompat;
 import android.support.v4.util.SimpleArrayMap;
 import android.util.Log;
 
 import org.mozilla.gecko.AppConstants;
 import org.mozilla.gecko.EventDispatcher;
 import org.mozilla.gecko.GeckoActivityMonitor;
 import org.mozilla.gecko.GeckoAppShell;
+import org.mozilla.gecko.GeckoApplication;
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.mozglue.SafeIntent;
 import org.mozilla.gecko.util.BitmapUtils;
 import org.mozilla.gecko.util.BundleEventListener;
 import org.mozilla.gecko.util.EventCallback;
 import org.mozilla.gecko.util.GeckoBundle;
 import org.mozilla.gecko.util.ThreadUtils;
 
@@ -87,25 +88,32 @@ public final class NotificationHelper im
     public enum Channel {
         /**
          * Default notification channel.
          */
         DEFAULT,
         /**
          * Mozilla Location Services notification channel.
          */
-        MLS
+        MLS,
+        /**
+         * Mozilla Location Services notification channel.
+         */
+        DOWNLOAD
     }
 
     private final Map<Channel, String> mDefinedNotificationChannels = new HashMap<Channel, String>() {{
         final String DEFAULT_CHANNEL_TAG = "default-notification-channel";
         put(Channel.DEFAULT, DEFAULT_CHANNEL_TAG);
 
         final String MLS_CHANNEL_TAG     = "mls-notification-channel";
         put(Channel.MLS, MLS_CHANNEL_TAG);
+
+        final String DOWNLOAD_NOTIFICATION_TAG = "download-notification-channel";
+        put(Channel.DOWNLOAD, DOWNLOAD_NOTIFICATION_TAG);
     }};
 
     // Holds a list of notifications that should be cleared if the Fennec Activity is shut down.
     // Will not include ongoing or persistent notifications that are tied to Gecko's lifecycle.
     private SimpleArrayMap<String, GeckoBundle> mClearableNotifications;
 
     private boolean mInitialized;
     private static NotificationHelper sInstance;
@@ -157,16 +165,22 @@ public final class NotificationHelper im
         if (channel == null) {
             switch (definedChannel) {
                 case MLS: {
                     channel = new NotificationChannel(mDefinedNotificationChannels.get(definedChannel),
                             mContext.getString(R.string.mls_notification_channel), NotificationManager.IMPORTANCE_LOW);
                 }
                 break;
 
+                case DOWNLOAD: {
+                    channel = new NotificationChannel(mDefinedNotificationChannels.get(definedChannel),
+                            mContext.getString(R.string.download_notification_channel), NotificationManager.IMPORTANCE_LOW);
+                }
+                break;
+
                 case DEFAULT:
 
                 default: {
                     channel = new NotificationChannel(mDefinedNotificationChannels.get(definedChannel),
                             mContext.getString(R.string.default_notification_channel), NotificationManager.IMPORTANCE_HIGH);
                 }
                 break;
             }
@@ -314,20 +328,16 @@ public final class NotificationHelper im
         final Uri imageUri = Uri.parse(message.getString(SMALLICON_ATTR, ""));
         builder.setSmallIcon(BitmapUtils.getResource(mContext, imageUri));
 
         final int[] light = message.getIntArray(LIGHT_ATTR);
         if (light != null && light.length == 3) {
             builder.setLights(light[0], light[1], light[2]);
         }
 
-        if (!AppConstants.Versions.preO) {
-            builder.setChannelId(getNotificationChannel(Channel.DEFAULT).getId());
-        }
-
         final boolean ongoing = message.getBoolean(ONGOING_ATTR);
         builder.setOngoing(ongoing);
 
         if (message.containsKey(WHEN_ATTR)) {
             final long when = (long) message.getDouble(WHEN_ATTR);
             builder.setWhen(when);
         }
 
@@ -337,16 +347,25 @@ public final class NotificationHelper im
         }
 
         if (message.containsKey(LARGE_ICON_ATTR)) {
             final Bitmap b = BitmapUtils.getBitmapFromDataURI(
                     message.getString(LARGE_ICON_ATTR, ""));
             builder.setLargeIcon(b);
         }
 
+        if (!AppConstants.Versions.preO) {
+            if (message.getString(HANDLER_ATTR).equals("downloads")) {
+                builder.setChannelId(getNotificationChannel(Channel.DOWNLOAD).getId());
+                builder.setOnlyAlertOnce(true);
+            } else {
+                builder.setChannelId(getNotificationChannel(Channel.DEFAULT).getId());
+            }
+        }
+
         if (message.containsKey(PROGRESS_VALUE_ATTR) &&
             message.containsKey(PROGRESS_MAX_ATTR) &&
             message.containsKey(PROGRESS_INDETERMINATE_ATTR)) {
             final int progress = message.getInt(PROGRESS_VALUE_ATTR);
             final int progressMax = message.getInt(PROGRESS_MAX_ATTR);
             final boolean progressIndeterminate = message.getBoolean(PROGRESS_INDETERMINATE_ATTR);
             builder.setProgress(progressMax, progress, progressIndeterminate);
         }
--- a/mobile/android/base/locales/en-US/android_strings.dtd
+++ b/mobile/android/base/locales/en-US/android_strings.dtd
@@ -891,9 +891,10 @@ See also https://bug1409261.bmoattachmen
 Picture-in-picture mini window -->
 <!ENTITY pip_play_button_title "Play">
 <!ENTITY pip_play_button_description "Resume playing">
 <!ENTITY pip_pause_button_title "Pause">
 <!ENTITY pip_pause_button_description "Pause playing">
 
 <!-- Notification channels names -->
 <!ENTITY default_notification_channel "&brandShortName;">
-<!ENTITY mls_notification_channel "&vendorShortName; Location Service">
\ No newline at end of file
+<!ENTITY mls_notification_channel "&vendorShortName; Location Service">
+<!ENTITY download_notification_channel "Downloads">
\ No newline at end of file
--- a/mobile/android/base/strings.xml.in
+++ b/mobile/android/base/strings.xml.in
@@ -645,9 +645,10 @@
 
   <string name="pip_play_button_title">&pip_play_button_title;</string>
   <string name="pip_play_button_description">&pip_play_button_description;</string>
   <string name="pip_pause_button_title">&pip_pause_button_title;</string>
   <string name="pip_pause_button_description">&pip_pause_button_description;</string>
 
   <string name="default_notification_channel">&default_notification_channel;</string>
   <string name="mls_notification_channel">&mls_notification_channel;</string>
+  <string name="download_notification_channel">&download_notification_channel;</string>
 </resources>
--- a/third_party/webkit/PerformanceTests/StyleBench/index.html
+++ b/third_party/webkit/PerformanceTests/StyleBench/index.html
@@ -5,22 +5,16 @@
     <title>StyleBench 0.3</title>
     <link rel="stylesheet" href="resources/main.css">
     <script src="resources/main.js" defer></script>
     <script src="resources/benchmark-runner.js" defer></script>
     <script src="resources/benchmark-report.js" defer></script>
     <script src="../resources/statistics.js" defer></script>
     <script src="resources/style-bench.js" defer></script>
     <script src="resources/tests.js" defer></script>
-    <script>
-        addEventListener('load', () => {
-            if (location.search == '?gecko' || location.search == '?raptor')
-                startTest();
-        });
-    </script>
 </head>
 <body>
 <main>
     <a id="logo-link" href="javascript:showHome()"></a>
 
     <section id="home" class="selected">
         <p>
             StyleBench is a browser benchmark that measures the performance of the style resolution mechanism.
--- a/third_party/webkit/PerformanceTests/StyleBench/mozilla.patch
+++ b/third_party/webkit/PerformanceTests/StyleBench/mozilla.patch
@@ -1,35 +1,8 @@
-diff --git a/third_party/webkit/PerformanceTests/StyleBench/index.html b/third_party/webkit/PerformanceTests/StyleBench/index.html
-index c77554dc3506..2a561a9cbb54 100644
---- a/third_party/webkit/PerformanceTests/StyleBench/index.html
-+++ b/third_party/webkit/PerformanceTests/StyleBench/index.html
-@@ -5,16 +5,22 @@
-     <title>StyleBench 0.3</title>
-     <link rel="stylesheet" href="resources/main.css">
-     <script src="resources/main.js" defer></script>
-     <script src="resources/benchmark-runner.js" defer></script>
-     <script src="resources/benchmark-report.js" defer></script>
-     <script src="../resources/statistics.js" defer></script>
-     <script src="resources/style-bench.js" defer></script>
-     <script src="resources/tests.js" defer></script>
-+    <script>
-+        addEventListener('load', () => {
-+            if (location.search == '?gecko' || location.search == '?raptor')
-+                startTest();
-+        });
-+    </script>
- </head>
- <body>
- <main>
-     <a id="logo-link" href="javascript:showHome()"></a>
- 
-     <section id="home" class="selected">
-         <p>
-             StyleBench is a browser benchmark that measures the performance of the style resolution mechanism.
 diff --git a/third_party/webkit/PerformanceTests/StyleBench/resources/benchmark-report.js b/third_party/webkit/PerformanceTests/StyleBench/resources/benchmark-report.js
 index b33021d9d9ce..58b3e46982d1 100644
 --- a/third_party/webkit/PerformanceTests/StyleBench/resources/benchmark-report.js
 +++ b/third_party/webkit/PerformanceTests/StyleBench/resources/benchmark-report.js
 @@ -1,12 +1,13 @@
  // This file can be customized to report results as needed.
  
  (function () {