Merge mozilla-central to autoland
authorarthur.iakab <aiakab@mozilla.com>
Fri, 08 Mar 2019 06:41:04 +0200
changeset 520973 904bfb7c423f
parent 520972 9a94bd3da98f (current diff)
parent 520882 13db12a097df (diff)
child 520974 6943cbd4af05
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone67.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 autoland
dom/base/crashtests/326778-1.xul
dom/base/test/test_bug340571.html
dom/xul/crashtests/326644-2-inner.xul
dom/xul/crashtests/326644-2.html
layout/xul/crashtests/327776-1.xul
layout/xul/crashtests/346083-1.xul
layout/xul/crashtests/346281-1.xul
layout/xul/crashtests/407152.xul
modules/libpref/init/all.js
--- a/browser/components/preferences/siteDataSettings.js
+++ b/browser/components/preferences/siteDataSettings.js
@@ -216,34 +216,42 @@ let gSiteDataSettings = {
       if (siteForHost) {
         siteForHost.userAction = "remove";
       }
       item.remove();
     }
     this._updateButtonsState();
   },
 
-  saveChanges() {
+  async saveChanges() {
     // Tracks whether the user confirmed their decision.
     let allowed = false;
 
     let removals = this._sites
       .filter(site => site.userAction == "remove")
       .map(site => site.host);
 
     if (removals.length > 0) {
       if (this._sites.length == removals.length) {
         allowed = SiteDataManager.promptSiteDataRemoval(window);
         if (allowed) {
-          SiteDataManager.removeAll();
+          try {
+            await SiteDataManager.removeAll();
+          } catch (e) {
+            Cu.reportError(e);
+          }
         }
       } else {
         allowed = SiteDataManager.promptSiteDataRemoval(window, removals);
         if (allowed) {
-          SiteDataManager.remove(removals).catch(Cu.reportError);
+          try {
+            await SiteDataManager.remove(removals);
+          } catch (e) {
+            Cu.reportError(e);
+          }
         }
       }
     }
 
     // If the user cancelled the confirm dialog keep the site data window open,
     // they can still press cancel again to exit.
     if (allowed) {
       this.close();
deleted file mode 100644
--- a/dom/base/crashtests/326778-1.xul
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-<script>
-<![CDATA[
-try {
-  document.getBoxObjectFor({});
-} catch(e) { }
-]]>
-</script>
-</window>
--- a/dom/base/crashtests/crashtests.list
+++ b/dom/base/crashtests/crashtests.list
@@ -6,17 +6,16 @@ load 205225-1.html
 load 231475-1.html
 load 244933-1.html
 load 275912-1.html
 load 293388-1.html
 load 308120-1.xul
 load 325730-1.html
 load 326618-1.html
 load 326646-1.html
-load 326778-1.xul
 load 326865-1.html
 load 327571-1.html
 load 327694.html
 load 327695-1.html
 load 329481-1.xhtml
 load 330925-1.xhtml
 load 336381-1.xhtml
 load 336715-1.xhtml
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -303,17 +303,16 @@ skip-if = toolkit == 'android' || headle
 [test_bug333673.html]
 [test_bug337631.html]
 [test_bug338541.xhtml]
 [test_bug338583.html]
 skip-if = toolkit == 'android'
 [test_bug338679.html]
 [test_bug339494.html]
 [test_bug339494.xhtml]
-[test_bug340571.html]
 [test_bug343596.html]
 [test_bug345339.html]
 [test_bug346485.html]
 [test_bug352728.html]
 [test_bug352728.xhtml]
 [test_bug353334.html]
 [test_bug355026.html]
 [test_bug357450.html]
deleted file mode 100644
--- a/dom/base/test/test_bug340571.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=340571
--->
-<head>
-  <title>Test for Bug 340571</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=340571">Mozilla Bug 340571</a>
-<p id="display"></p>
-<div><select id="sel"></select></div>
-<script type="application/javascript">
-ok(!document.getBoxObjectFor, "Detecting getBoxObjectFor");
-try {
-  document.getBoxObjectFor(document.body);
-  ok(false, "getBoxObjectFor succeeded");
-} catch (e) {
-  ok(true, "getBoxObjectFor succeeded");
-}
-
-var sel = document.getElementById("sel");
-ok(!sel.boxObject, "Getting boxObject");
-</script>
-</body>
-</html>
--- a/dom/webidl/TreeColumn.webidl
+++ b/dom/webidl/TreeColumn.webidl
@@ -23,11 +23,17 @@ interface TreeColumn {
   const short TYPE_TEXT                = 1;
   const short TYPE_CHECKBOX            = 2;
   const short TYPE_PASSWORD            = 3;
   readonly attribute short type;
 
   TreeColumn? getNext();
   TreeColumn? getPrevious();
 
+  /**
+   * Returns the previous displayed column, if any, accounting for
+   * the ordinals set on the columns.
+   */
+  readonly attribute TreeColumn? previousColumn;
+
   [Throws]
   void invalidate();
 };
deleted file mode 100644
--- a/dom/xul/crashtests/326644-2-inner.xul
+++ /dev/null
@@ -1,10 +0,0 @@
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"
- title="Testcase bug 326644 - Crash when changing enumerated properties of objects in xul">
-<html:script><![CDATA[
-function doe() {
-document.documentElement.boxObject.firstChild.hidden = true;
-document.documentElement.boxObject.firstChild.tooltip = 'test';
-}
-setTimeout(doe,100);
-]]></html:script>
-</window>
deleted file mode 100644
--- a/dom/xul/crashtests/326644-2.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<html class="reftest-wait">
-<head>
-<script>
-setTimeout('document.documentElement.className = ""', 1000);
-</script>
-<body>
-<iframe src="326644-2-inner.xul"></iframe>
-</body>
-</html>
--- a/dom/xul/crashtests/crashtests.list
+++ b/dom/xul/crashtests/crashtests.list
@@ -1,15 +1,14 @@
 load 107518-1.xml
 load 252448-1.xul
 load 253479-1.xul
 load 253479-2.xul
 load 326204-1.xul
 load 326644-1.html
-load 326644-2.html
 load 326864-1.xul
 load 326875-1.xul
 load 326881-1.xul
 load 329982-1.xhtml
 load 336096-1.xhtml
 load 344215-1.xul
 load 354611-1.html
 load 360078-1.xhtml
--- a/gfx/layers/PersistentBufferProvider.cpp
+++ b/gfx/layers/PersistentBufferProvider.cpp
@@ -299,17 +299,17 @@ PersistentBufferProviderShared::BorrowDr
           gfxCriticalNote << "Managed to allocate after flush.";
           mBack = Some(i);
           tex = mTextures[i];
           break;
         }
       }
 
       if (!tex) {
-        gfxCriticalError() << "Unexpected BufferProvider over-production.";
+        gfxCriticalNote << "Unexpected BufferProvider over-production.";
         // It would be pretty bad to keep piling textures up at this point so we
         // call NotifyInactive to remove some of our textures.
         NotifyInactive();
         // Give up now. The caller can fall-back to a non-shared buffer
         // provider.
         return nullptr;
       }
     }
deleted file mode 100644
--- a/layout/xul/crashtests/327776-1.xul
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-<script>
-<![CDATA[
-function init()
-{ 
-  var span = document.getElementsByTagName("span")[0]; 
-  var boxobj = document.getBoxObjectFor(span);
-  try {
-    boxobj.setPropertyAsSupports(undefined, undefined);
-  } catch(e) {
-  }
-}
-window.addEventListener("load", init, false);
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-
-<span></span>
-
-</body>
-</window>
deleted file mode 100644
--- a/layout/xul/crashtests/346083-1.xul
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-<body xmlns="http://www.w3.org/1999/xhtml">
-
-<script>
-<![CDATA[
-document.getBoxObjectFor(document.getElementsByTagName("body")[0]).setProperty("foo", undefined);
-]]>
-</script>
-
-</body>
-</window>
deleted file mode 100644
--- a/layout/xul/crashtests/346281-1.xul
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-<body xmlns="http://www.w3.org/1999/xhtml">
-
-<script>
-<![CDATA[
-var boxy = document.getBoxObjectFor(document.getElementsByTagName("body")[0]);
-boxy.setPropertyAsSupports("zoink", undefined);
-try {
-  boxy.removeProperty(undefined);
-} catch(e) { }
-]]>
-</script>
-
-</body>
-</window>
deleted file mode 100644
--- a/layout/xul/crashtests/407152.xul
+++ /dev/null
@@ -1,7 +0,0 @@
-<triple xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" style="display: block;">
-<box style="display: block; position: relative; -moz-binding: url(data:text/xml;charset=utf-8,%3Cbindings%20xmlns%3D%22http%3A//www.mozilla.org/xbl%22%3E%0A%3Cbinding%20id%3D%22a%22%3E%0A%3Cimplementation%3E%0A%3Cfield%20name%3D%22_field%22%3Ethis.ownerDocument.getBoxObjectFor%28this.ownerDocument.documentElement%29%3B%3C/field%3E%0A%3C/implementation%3E%0A%3Ccontent%3E%0A%3C/binding%3E%0A%3C/bindings%3E);">
-<box style="position: fixed; -moz-binding: url(data:text/xml;charset=utf-8,%3Cbindings%20xmlns%3D%22http%3A//www.mozilla.org/xbl%22%3E%0A%3Cbinding%20id%3D%22a%22%3E%0A%3Ccontent%3E%0A%3Cchildren%20xmlns%3D%22http%3A//www.mozilla.org/xbl%22/%3E%3C/content%3E%3C/binding%3E%3C/bindings%3E);"/>
-<iframe/>
-</box>
-<scrollbox onoverflow="document.documentElement.removeAttribute('style')"/>
-</triple>
\ No newline at end of file
--- a/layout/xul/crashtests/crashtests.list
+++ b/layout/xul/crashtests/crashtests.list
@@ -10,25 +10,22 @@ load 291702-1.xul
 load 291702-2.xul
 load 291702-3.xul
 load 294371-1.xul
 load 311457-1.html
 load 321056-1.xhtml
 load 322786-1.xul
 load 325377.xul
 load 326879-1.xul
-load 327776-1.xul
 load 328135-1.xul
 load 329327-1.xul
 load 329407-1.xml
 load 329477-1.xhtml
 load 336962-1.xul
 load 344228-1.xul
-load 346083-1.xul
-load 346281-1.xul
 load 350460.xul
 load 365151.xul
 load 366112-1.xul
 load 366203-1.xul
 load 367185-1.xhtml
 load 369942-1.xhtml
 load 374102-1.xul
 load 376137-1.html
@@ -44,17 +41,16 @@ load 384373.html
 load 384871-1.html
 load 386642.xul
 load 387033-1.xhtml
 load 387080-1.xul
 load 391974-1.html
 load 399013.xul
 load 402912-1.xhtml
 load 404192.xhtml
-load 407152.xul
 load 408904-1.xul
 load 412479-1.xhtml
 load 417509.xul
 load 430356-1.xhtml
 load 452185.html
 asserts(0-1) load 464407-1.xhtml # Bugs 450974, 1267054, 718883
 load 467080.xul
 load 470063-1.html
--- a/layout/xul/tree/nsTreeColumns.cpp
+++ b/layout/xul/tree/nsTreeColumns.cpp
@@ -231,16 +231,32 @@ int32_t nsTreeColumn::GetWidth(mozilla::
   if (NS_WARN_IF(!frame)) {
     aRv.Throw(NS_ERROR_FAILURE);
     return 0;
   }
 
   return nsPresContext::AppUnitsToIntCSSPixels(frame->GetRect().width);
 }
 
+already_AddRefed<nsTreeColumn> nsTreeColumn::GetPreviousColumn() {
+  nsIFrame* frame = GetFrame();
+  while (frame) {
+    frame = frame->GetPrevSibling();
+    if (frame && frame->GetContent()->IsElement()) {
+      RefPtr<nsTreeColumn> column =
+        mColumns->GetColumnFor(frame->GetContent()->AsElement());
+      if (column) {
+        return column.forget();
+      }
+    }
+  }
+
+  return nullptr;
+}
+
 nsTreeColumns::nsTreeColumns(nsTreeBodyFrame* aTree) : mTree(aTree) {}
 
 nsTreeColumns::~nsTreeColumns() { nsTreeColumns::InvalidateColumns(); }
 
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(nsTreeColumns)
 
 // QueryInterface implementation for nsTreeColumns
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsTreeColumns)
--- a/layout/xul/tree/nsTreeColumns.h
+++ b/layout/xul/tree/nsTreeColumns.h
@@ -66,16 +66,18 @@ class nsTreeColumn final : public nsISup
   bool Primary() const { return mIsPrimary; }
   bool Cycler() const { return mIsCycler; }
   bool Editable() const { return mIsEditable; }
   int16_t Type() const { return mType; }
 
   nsTreeColumn* GetNext() const { return mNext; }
   nsTreeColumn* GetPrevious() const { return mPrevious; }
 
+  already_AddRefed<nsTreeColumn> GetPreviousColumn();
+
   void Invalidate(mozilla::ErrorResult& aRv);
 
   friend class nsTreeBodyFrame;
   friend class nsTreeColumns;
 
  protected:
   ~nsTreeColumn();
   nsIFrame* GetFrame();
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/GeckoLoader.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/GeckoLoader.java
@@ -207,17 +207,17 @@ public final class GeckoLoader {
 
         loadMozGlue(context);
         loadLibsSetupLocked(context);
         loadNSSLibsNative();
         sNSSLibsLoaded = true;
     }
 
     @SuppressWarnings("deprecation")
-    private static final String getCPUABI() {
+    private static String getCPUABI() {
         return android.os.Build.CPU_ABI;
     }
 
     /**
      * Copy a library out of our APK.
      *
      * @param context a Context.
      * @param lib the name of the library; e.g., "mozglue".
@@ -354,34 +354,34 @@ public final class GeckoLoader {
             message.append(", libx=" + nativeLibLibExists);
         } catch (Throwable e) {
             message.append(", nativeLib fail.");
         }
 
         return message.toString();
     }
 
-    private static final boolean attemptLoad(final String path) {
+    private static boolean attemptLoad(final String path) {
         try {
             System.load(path);
             return true;
         } catch (Throwable e) {
             Log.wtf(LOGTAG, "Couldn't load " + path + ": " + e);
         }
 
         return false;
     }
 
     /**
      * The first two attempts at loading a library: directly, and
      * then using the app library path.
      *
      * Returns null or the cause exception.
      */
-    private static final Throwable doLoadLibraryExpected(final Context context, final String lib) {
+    private static Throwable doLoadLibraryExpected(final Context context, final String lib) {
         try {
             // Attempt 1: the way that should work.
             System.loadLibrary(lib);
             return null;
         } catch (Throwable e) {
             Log.wtf(LOGTAG, "Couldn't load " + lib + ". Trying native library dir.");
 
             // Attempt 2: use nativeLibraryDir, which should also work.
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java
@@ -158,17 +158,17 @@ public final class GeckoRuntime implemen
                     context.startForegroundService(i);
                 } else {
                     context.startService(i);
                 }
             }
         }
     };
 
-    private static final String getProcessName(Context context) {
+    private static String getProcessName(Context context) {
         final ActivityManager manager = (ActivityManager)context.getSystemService(Context.ACTIVITY_SERVICE);
         for (final ActivityManager.RunningAppProcessInfo info : manager.getRunningAppProcesses()) {
             if (info.pid == Process.myPid()) {
                 return info.processName;
             }
         }
 
         return null;
--- a/security/manager/ssl/nsCertTree.cpp
+++ b/security/manager/ssl/nsCertTree.cpp
@@ -1006,17 +1006,20 @@ nsCertTree::SetTree(mozilla::dom::XULTre
 
 NS_IMETHODIMP
 nsCertTree::ToggleOpenState(int32_t index) {
   if (!mTreeArray) return NS_ERROR_NOT_INITIALIZED;
   treeArrayEl *el = GetThreadDescAtIndex(index);
   if (el) {
     el->open = !el->open;
     int32_t newChildren = (el->open) ? el->numChildren : -el->numChildren;
-    if (mTree) mTree->RowCountChanged(index + 1, newChildren);
+    if (mTree) {
+      mTree->RowCountChanged(index + 1, newChildren);
+      mTree->InvalidateRow(index);
+    }
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCertTree::CycleHeader(nsTreeColumn *col) { return NS_OK; }
 
 NS_IMETHODIMP
--- a/toolkit/content/widgets/tree.js
+++ b/toolkit/content/widgets/tree.js
@@ -330,25 +330,26 @@
       var val = this.getAttribute("ordinal");
       if (val == "")
         return "1";
 
       return "" + (val == "0" ? 0 : parseInt(val));
     }
 
     get _previousVisibleColumn() {
-      var sib = this.boxObject.previousSibling;
+      var tree = this.parentNode.parentNode;
+      let sib = tree.columns.getColumnFor(this).previousColumn;
       while (sib) {
-        if (sib.localName == "treecol" &&
-            sib.getBoundingClientRect().width > 0 &&
-            sib.parentNode == this.parentNode) {
-          return sib;
+        if (sib.element && sib.element.getBoundingClientRect().width > 0) {
+          return sib.element;
         }
-        sib = sib.boxObject.previousSibling;
+
+        sib = sib.previousColumn;
       }
+
       return null;
     }
 
     _onDragMouseMove(aEvent) {
       var col = document.treecolDragging;
       if (!col) return;
 
       // determine if we have moved the mouse far enough