Merge inbound to mozilla-central r=merge a=merge
authorshindli <shindli@mozilla.com>
Tue, 05 Dec 2017 11:58:51 +0200
changeset 394988 b4cef8d1dff06a1ec2b9bb17211c0c3c7f5b76fa
parent 394987 390c1aad9d4d5bd44bc5f347d2233d14eb9a2944 (current diff)
parent 394918 a26e71300a880ad99bd5bb0fd2d4be514113c7d5 (diff)
child 394989 8842dba7396bea1f1f006bd90bb3f2bb4232c5bd
child 395115 03d3143e3d6043f8537523b9a2cc5ebe14cf2839
child 395164 ba31c572806050e51c3a7c76631635327c9d6a53
push id97987
push usernerli@mozilla.com
push dateTue, 05 Dec 2017 13:52:50 +0000
treeherdermozilla-inbound@8842dba7396b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge, merge
milestone59.0a1
first release with
nightly linux32
b4cef8d1dff0 / 59.0a1 / 20171205100345 / files
nightly linux64
b4cef8d1dff0 / 59.0a1 / 20171205100345 / files
nightly mac
b4cef8d1dff0 / 59.0a1 / 20171205123322 / files
nightly win32
b4cef8d1dff0 / 59.0a1 / 20171205100345 / files
nightly win64
b4cef8d1dff0 / 59.0a1 / 20171205100345 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge inbound to mozilla-central r=merge a=merge
js/src/jit-test/tests/jaeger/bug553781-2.js
js/src/jit-test/tests/jaeger/bug553781.js
js/src/tests/js1_5/extensions/catchguard-001-n.js
js/src/tests/js1_5/extensions/catchguard-001.js
js/src/tests/js1_5/extensions/catchguard-002.js
js/src/tests/js1_5/extensions/catchguard-003.js
js/src/tests/js1_5/extensions/regress-346494-01.js
js/src/tests/js1_5/extensions/regress-346494.js
js/src/tests/js1_5/extensions/regress-350312-02.js
js/src/tests/js1_5/extensions/regress-350312-03.js
js/src/tests/js1_5/extensions/regress-351102-01.js
js/src/tests/js1_5/extensions/regress-351102-02.js
js/src/tests/js1_5/extensions/regress-351102-06.js
js/src/tests/js1_5/extensions/regress-374589.js
js/src/tests/js1_7/extensions/regress-351102-03.js
js/src/tests/js1_7/extensions/regress-351102-04.js
js/src/tests/js1_7/extensions/regress-351102-05.js
js/src/tests/js1_7/extensions/regress-351102-07.js
js/src/tests/js1_7/regress/regress-375695.js
js/src/tests/js1_8_5/extensions/regress-677589.js
modules/libpref/init/all.js
toolkit/themes/shared/extensions/navigation.svg
--- a/accessible/windows/msaa/LazyInstantiator.cpp
+++ b/accessible/windows/msaa/LazyInstantiator.cpp
@@ -232,16 +232,23 @@ LazyInstantiator::GetClientExecutableNam
  * This is the blocklist for known "bad" DLLs that instantiate a11y.
  */
 static const wchar_t* gBlockedInprocDlls[] = {
   L"dtvhooks.dll",  // RealPlayer, bug 1418535
   L"dtvhooks64.dll" // RealPlayer, bug 1418535
 };
 
 /**
+ * This is the blocklist for known "bad" remote clients that instantiate a11y.
+ */
+static const char* gBlockedRemoteClients[] = {
+  "tbnnotifier.exe" // Ask.com Toolbar, bug 1421018
+};
+
+/**
  * Check for the presence of any known "bad" injected DLLs that may be trying
  * to instantiate a11y.
  *
  * @return true to block a11y instantiation, otherwise false to continue
  */
 bool
 LazyInstantiator::IsBlockedInjection()
 {
@@ -287,27 +294,34 @@ LazyInstantiator::ShouldInstantiate(cons
   if (!GetClientExecutableName(aClientTid, getter_AddRefs(clientExe))) {
 #if defined(MOZ_TELEMETRY_REPORTING)
     AccumulateTelemetry(NS_LITERAL_STRING("(Failed to retrieve client image name)"));
 #endif // defined(MOZ_TELEMETRY_REPORTING)
     // We should return true as a failsafe
     return true;
   }
 
-  // Blocklist checks for external clients should go here.
-  // return false if we should not instantiate.
-  /*
-  if (ClientShouldBeBlocked(clientExe)) {
-    return false;
+  nsresult rv;
+  if (!PR_GetEnv("MOZ_DISABLE_ACCESSIBLE_BLOCKLIST")) {
+    // Debugging option is not present, so check blocklist.
+    nsAutoString leafName;
+    rv = clientExe->GetLeafName(leafName);
+    if (NS_SUCCEEDED(rv)) {
+      for (size_t i = 0, len = ArrayLength(gBlockedRemoteClients); i < len; ++i) {
+        if (leafName.EqualsIgnoreCase(gBlockedRemoteClients[i])) {
+          // If client exe is in our blocklist, do not instantiate.
+          return false;
+        }
+      }
+    }
   }
-  */
 
   // Store full path to executable for support purposes.
   nsAutoString filePath;
-  nsresult rv = clientExe->GetPath(filePath);
+  rv = clientExe->GetPath(filePath);
   if (NS_SUCCEEDED(rv)) {
     a11y::SetInstantiator(filePath);
   }
 
 #if defined(MOZ_TELEMETRY_REPORTING)
   if (!mTelemetryThread) {
     // Call GatherTelemetry on a background thread because it does I/O on
     // the executable file to retrieve version information.
@@ -904,9 +918,8 @@ LazyInstantiator::QueryService(REFGUID a
     return hr;
   }
 
   return servProv->QueryService(aServiceId, aServiceIid, aOutInterface);
 }
 
 } // namespace a11y
 } // namespace mozilla
-
--- a/docshell/base/nsDefaultURIFixup.cpp
+++ b/docshell/base/nsDefaultURIFixup.cpp
@@ -256,31 +256,41 @@ nsDefaultURIFixup::GetFixupURIInfo(const
         scheme.LowerCaseEqualsLiteral("ftp") ||
         scheme.LowerCaseEqualsLiteral("file")) {
       // Do nothing.
     } else if (scheme.LowerCaseEqualsLiteral("ttp")) {
       // ttp -> http.
       uriString.ReplaceLiteral(0, 3, "http");
       scheme.AssignLiteral("http");
       info->mFixupChangedProtocol = true;
+    } else if (scheme.LowerCaseEqualsLiteral("htp")) {
+      // htp -> http.
+      uriString.ReplaceLiteral(0, 3, "http");
+      scheme.AssignLiteral("http");
+      info->mFixupChangedProtocol = true;
     } else if (scheme.LowerCaseEqualsLiteral("ttps")) {
       // ttps -> https.
       uriString.ReplaceLiteral(0, 4, "https");
       scheme.AssignLiteral("https");
       info->mFixupChangedProtocol = true;
     } else if (scheme.LowerCaseEqualsLiteral("tps")) {
       // tps -> https.
       uriString.ReplaceLiteral(0, 3, "https");
       scheme.AssignLiteral("https");
       info->mFixupChangedProtocol = true;
     } else if (scheme.LowerCaseEqualsLiteral("ps")) {
       // ps -> https.
       uriString.ReplaceLiteral(0, 2, "https");
       scheme.AssignLiteral("https");
       info->mFixupChangedProtocol = true;
+    } else if (scheme.LowerCaseEqualsLiteral("htps")) {
+      // htps -> https.
+      uriString.ReplaceLiteral(0, 4, "https");
+      scheme.AssignLiteral("https");
+      info->mFixupChangedProtocol = true;
     } else if (scheme.LowerCaseEqualsLiteral("ile")) {
       // ile -> file.
       uriString.ReplaceLiteral(0, 3, "file");
       scheme.AssignLiteral("file");
       info->mFixupChangedProtocol = true;
     } else if (scheme.LowerCaseEqualsLiteral("le")) {
       // le -> file.
       uriString.ReplaceLiteral(0, 2, "file");
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -950,17 +950,18 @@ nsDocShell::DestroyChildren()
   }
 
   nsDocLoader::DestroyChildren();
 }
 
 NS_IMPL_CYCLE_COLLECTION_INHERITED(nsDocShell,
                                    nsDocLoader,
                                    mSessionStorageManager,
-                                   mScriptGlobal)
+                                   mScriptGlobal,
+                                   mInitialClientSource)
 
 NS_IMPL_ADDREF_INHERITED(nsDocShell, nsDocLoader)
 NS_IMPL_RELEASE_INHERITED(nsDocShell, nsDocLoader)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDocShell)
   NS_INTERFACE_MAP_ENTRY(nsIDocShell)
   NS_INTERFACE_MAP_ENTRY(nsIDocShellTreeItem)
   NS_INTERFACE_MAP_ENTRY(nsIWebNavigation)
@@ -7048,17 +7049,17 @@ nsDocShell::ForceRefreshURI(nsIURI* aURI
   if (aPrincipal) {
     loadInfo->SetTriggeringPrincipal(aPrincipal);
   }
 
   /*
    * LoadURI(...) will cancel all refresh timers... This causes the
    * Timer and its refreshData instance to be released...
    */
-  LoadURI(aURI, loadInfo, nsIWebNavigation::LOAD_FLAGS_NONE, true);
+  LoadURI(aURI, loadInfo, nsIWebNavigation::LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL, true);
 
   return NS_OK;
 }
 
 nsresult
 nsDocShell::SetupRefreshURIFromHeader(nsIURI* aBaseURI,
                                       nsIPrincipal* aPrincipal,
                                       const nsACString& aHeader)
--- a/docshell/test/unit/test_nsDefaultURIFixup.js
+++ b/docshell/test/unit/test_nsDefaultURIFixup.js
@@ -7,31 +7,41 @@ var pref = "browser.fixup.typo.scheme";
 
 var data = [
   {
     // ttp -> http.
     wrong: 'ttp://www.example.com/',
     fixed: 'http://www.example.com/',
   },
   {
+    // htp -> http.
+    wrong: 'htp://www.example.com/',
+    fixed: 'http://www.example.com/',
+  },
+  {
     // ttps -> https.
     wrong: 'ttps://www.example.com/',
     fixed: 'https://www.example.com/',
   },
   {
     // tps -> https.
     wrong: 'tps://www.example.com/',
     fixed: 'https://www.example.com/',
   },
   {
     // ps -> https.
     wrong: 'ps://www.example.com/',
     fixed: 'https://www.example.com/',
   },
   {
+    // htps -> https.
+    wrong: 'htps://www.example.com/',
+    fixed: 'https://www.example.com/',
+  },
+  {
     // ile -> file.
     wrong: 'ile:///this/is/a/test.html',
     fixed: 'file:///this/is/a/test.html',
   },
   {
     // le -> file.
     wrong: 'le:///this/is/a/test.html',
     fixed: 'file:///this/is/a/test.html',
--- a/dom/base/nsGlobalWindowInner.cpp
+++ b/dom/base/nsGlobalWindowInner.cpp
@@ -1479,16 +1479,18 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_
 
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mIdleRequestExecutor)
   for (IdleRequest* request : tmp->mIdleRequestCallbacks) {
     cb.NoteNativeChild(request, NS_CYCLE_COLLECTION_PARTICIPANT(IdleRequest));
   }
 
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mIdleObservers)
 
+  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mClientSource)
+
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mGamepads)
 
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCacheStorage)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mVRDisplays)
 
   // Traverse stuff from nsPIDOMWindow
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mChromeEventHandler)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mParentTarget)
@@ -1590,17 +1592,17 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(ns
   tmp->UnlinkHostObjectURIs();
 
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mIdleRequestExecutor)
 
   // Here the IdleRequest list would've been unlinked, but we rely on
   // that IdleRequest objects have been traced and will remove
   // themselves while unlinking.
 
-  tmp->mClientSource.reset();
+  NS_IMPL_CYCLE_COLLECTION_UNLINK(mClientSource)
 
   if (tmp->IsChromeWindow()) {
     if (tmp->mChromeFields.mMessageManager) {
       static_cast<nsFrameMessageManager*>(
         tmp->mChromeFields.mMessageManager.get())->Disconnect();
       NS_IMPL_CYCLE_COLLECTION_UNLINK(mChromeFields.mMessageManager)
     }
     tmp->DisconnectAndClearGroupMessageManagers();
--- a/dom/clients/manager/ClientSource.cpp
+++ b/dom/clients/manager/ClientSource.cpp
@@ -258,10 +258,26 @@ ClientSource::Info() const
 }
 
 nsISerialEventTarget*
 ClientSource::EventTarget() const
 {
   return mEventTarget;
 }
 
+void
+ClientSource::Traverse(nsCycleCollectionTraversalCallback& aCallback,
+                       const char* aName,
+                       uint32_t aFlags)
+{
+  if (mOwner.is<RefPtr<nsPIDOMWindowInner>>()) {
+    ImplCycleCollectionTraverse(aCallback,
+                                mOwner.as<RefPtr<nsPIDOMWindowInner>>(),
+                                aName, aFlags);
+  } else if (mOwner.is<nsCOMPtr<nsIDocShell>>()) {
+    ImplCycleCollectionTraverse(aCallback,
+                                mOwner.as<nsCOMPtr<nsIDocShell>>(),
+                                aName, aFlags);
+  }
+}
+
 } // namespace dom
 } // namespace mozilla
--- a/dom/clients/manager/ClientSource.h
+++ b/dom/clients/manager/ClientSource.h
@@ -88,14 +88,36 @@ public:
   void
   Thaw();
 
   const ClientInfo&
   Info() const;
 
   nsISerialEventTarget*
   EventTarget() const;
+
+  void
+  Traverse(nsCycleCollectionTraversalCallback& aCallback,
+           const char* aName,
+           uint32_t aFlags);
 };
 
+inline void
+ImplCycleCollectionUnlink(UniquePtr<ClientSource>& aField)
+{
+  aField.reset();
+}
+
+inline void
+ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& aCallback,
+                            UniquePtr<ClientSource>& aField,
+                            const char* aName,
+                            uint32_t aFlags)
+{
+  if (aField) {
+    aField->Traverse(aCallback, aName, aFlags);
+  }
+}
+
 } // namespace dom
 } // namespace mozilla
 
 #endif // _mozilla_dom_ClientSource_h
--- a/gfx/layers/wr/WebRenderBridgeChild.cpp
+++ b/gfx/layers/wr/WebRenderBridgeChild.cpp
@@ -283,33 +283,32 @@ WriteFontDescriptor(const uint8_t* aData
   FontFileDataSink* sink = static_cast<FontFileDataSink*>(aBaton);
 
   *sink->mFontKey = sink->mWrBridge->GetNextFontKey();
 
   sink->mResources->AddFontDescriptor(*sink->mFontKey, Range<uint8_t>(const_cast<uint8_t*>(aData), aLength), aIndex);
 }
 
 void
-WebRenderBridgeChild::PushGlyphs(wr::DisplayListBuilder& aBuilder, const nsTArray<wr::GlyphInstance>& aGlyphs,
+WebRenderBridgeChild::PushGlyphs(wr::DisplayListBuilder& aBuilder, Range<const wr::GlyphInstance> aGlyphs,
                                  gfx::ScaledFont* aFont, const wr::ColorF& aColor, const StackingContextHelper& aSc,
                                  const wr::LayerRect& aBounds, const wr::LayerRect& aClip, bool aBackfaceVisible,
                                  const wr::GlyphOptions* aGlyphOptions)
 {
   MOZ_ASSERT(aFont);
-  MOZ_ASSERT(!aGlyphs.IsEmpty());
 
   wr::WrFontInstanceKey key = GetFontKeyForScaledFont(aFont);
   MOZ_ASSERT(key.mNamespace.mHandle && key.mHandle);
 
   aBuilder.PushText(aBounds,
                     aClip,
                     aBackfaceVisible,
                     aColor,
                     key,
-                    Range<const wr::GlyphInstance>(aGlyphs.Elements(), aGlyphs.Length()),
+                    aGlyphs,
                     aGlyphOptions);
 }
 
 wr::FontInstanceKey
 WebRenderBridgeChild::GetFontKeyForScaledFont(gfx::ScaledFont* aScaledFont)
 {
   MOZ_ASSERT(!mDestroyed);
   MOZ_ASSERT(aScaledFont);
--- a/gfx/layers/wr/WebRenderBridgeChild.h
+++ b/gfx/layers/wr/WebRenderBridgeChild.h
@@ -125,17 +125,17 @@ public:
     return wr::FontInstanceKey { GetNamespace(), GetNextResourceId() };
   }
 
   wr::WrImageKey GetNextImageKey()
   {
     return wr::WrImageKey{ GetNamespace(), GetNextResourceId() };
   }
 
-  void PushGlyphs(wr::DisplayListBuilder& aBuilder, const nsTArray<wr::GlyphInstance>& aGlyphs,
+  void PushGlyphs(wr::DisplayListBuilder& aBuilder, Range<const wr::GlyphInstance> aGlyphs,
                   gfx::ScaledFont* aFont, const wr::ColorF& aColor,
                   const StackingContextHelper& aSc,
                   const wr::LayerRect& aBounds, const wr::LayerRect& aClip,
                   bool aBackfaceVisible,
                   const wr::GlyphOptions* aGlyphOptions = nullptr);
 
   wr::FontInstanceKey GetFontKeyForScaledFont(gfx::ScaledFont* aScaledFont);
   wr::FontKey GetFontKeyForUnscaledFont(gfx::UnscaledFont* aUnscaledFont);
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -6948,17 +6948,17 @@ GCRuntime::incrementalCollectSlice(Slice
 
         MOZ_FALLTHROUGH;
 
       case State::Mark:
         for (const CooperatingContext& target : rt->cooperatingContexts())
             AutoGCRooter::traceAllWrappers(target, &marker);
 
         /* If we needed delayed marking for gray roots, then collect until done. */
-        if (!hasBufferedGrayRoots()) {
+        if (isIncremental && !hasBufferedGrayRoots()) {
             budget.makeUnlimited();
             isIncremental = false;
             stats().nonincremental(AbortReason::GrayRootBufferingFailed);
         }
 
         if (drainMarkStack(budget, gcstats::PhaseKind::MARK) == NotFinished)
             break;
 
--- a/layout/generic/TextDrawTarget.h
+++ b/layout/generic/TextDrawTarget.h
@@ -100,37 +100,45 @@ public:
              const GlyphBuffer& aBuffer,
              const Pattern& aPattern,
              const DrawOptions& aOptions) override
   {
     // Make sure we're only given boring color patterns
     MOZ_RELEASE_ASSERT(aOptions.mCompositionOp == CompositionOp::OP_OVER);
     MOZ_RELEASE_ASSERT(aOptions.mAlpha == 1.0f);
     MOZ_RELEASE_ASSERT(aPattern.GetType() == PatternType::COLOR);
-    auto* colorPat = static_cast<const ColorPattern*>(&aPattern);
-    auto color = wr::ToColorF(colorPat->mColor);
 
     // Make sure the font exists, and can be serialized
     MOZ_RELEASE_ASSERT(aFont);
     if (!aFont->CanSerialize()) {
       FoundUnsupportedFeature();
       return;
     }
 
-    // 170 is the maximum size gfxFont is expected to hand us
-    AutoTArray<wr::GlyphInstance, 170> glyphs;
-    glyphs.SetLength(aBuffer.mNumGlyphs);
-
-    for (size_t i = 0; i < aBuffer.mNumGlyphs; i++) {
-      wr::GlyphInstance& targetGlyph = glyphs[i];
-      const gfx::Glyph& sourceGlyph = aBuffer.mGlyphs[i];
-      targetGlyph.index = sourceGlyph.mIndex;
-      targetGlyph.point = mSc.ToRelativeLayoutPoint(
-          LayoutDevicePoint::FromUnknownPoint(sourceGlyph.mPosition));
-    }
+    auto* colorPat = static_cast<const ColorPattern*>(&aPattern);
+    auto color = wr::ToColorF(colorPat->mColor);
+    MOZ_ASSERT(aBuffer.mNumGlyphs);
+    auto glyphs = Range<const wr::GlyphInstance>(reinterpret_cast<const wr::GlyphInstance*>(aBuffer.mGlyphs), aBuffer.mNumGlyphs);
+    // MSVC won't let us use offsetof on the following directly so we give it a
+    // name with typedef
+    typedef std::remove_reference<decltype(aBuffer.mGlyphs[0])>::type GlyphType;
+    // Compare gfx::Glyph and wr::GlyphInstance to make sure that they are
+    // structurally equivalent to ensure that our cast above was ok
+    static_assert(std::is_same<decltype(aBuffer.mGlyphs[0].mIndex), decltype(glyphs[0].index)>()
+                  && std::is_same<decltype(aBuffer.mGlyphs[0].mPosition.x), decltype(glyphs[0].point.x)>()
+                  && std::is_same<decltype(aBuffer.mGlyphs[0].mPosition.y), decltype(glyphs[0].point.y)>()
+                  && offsetof(GlyphType, mIndex) == offsetof(wr::GlyphInstance, index)
+                  && offsetof(GlyphType, mPosition) == offsetof(wr::GlyphInstance, point)
+                  && offsetof(decltype(aBuffer.mGlyphs[0].mPosition), x) == offsetof(decltype(glyphs[0].point), x)
+                  && offsetof(decltype(aBuffer.mGlyphs[0].mPosition), y) == offsetof(decltype(glyphs[0].point), y)
+                  && std::is_standard_layout<std::remove_reference<decltype(aBuffer.mGlyphs[0])>>::value
+                  && std::is_standard_layout<std::remove_reference<decltype(glyphs[0])>>::value
+                  && sizeof(aBuffer.mGlyphs[0]) == sizeof(glyphs[0])
+                  && sizeof(aBuffer.mGlyphs[0].mPosition) == sizeof(glyphs[0].point)
+                  , "glyph buf types don't match");
 
     wr::GlyphOptions glyphOptions;
     glyphOptions.render_mode = wr::ToFontRenderMode(aOptions.mAntialiasMode, GetPermitSubpixelAA());
 
     mManager->WrBridge()->PushGlyphs(mBuilder, glyphs, aFont,
                                      color, mSc, mBoundsRect, mClipRect,
                                      mBackfaceVisible, &glyphOptions);
   }
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -1579,19 +1579,21 @@ pref("network.protocol-handler.external.
 #endif
 pref("network.protocol-handler.external.disk", false);
 pref("network.protocol-handler.external.disks", false);
 pref("network.protocol-handler.external.afp", false);
 pref("network.protocol-handler.external.moz-icon", false);
 
 // Don't allow  external protocol handlers for common typos
 pref("network.protocol-handler.external.ttp", false);  // http
+pref("network.protocol-handler.external.htp", false);  // http
 pref("network.protocol-handler.external.ttps", false); // https
 pref("network.protocol-handler.external.tps", false);  // https
 pref("network.protocol-handler.external.ps", false);   // https
+pref("network.protocol-handler.external.htps", false); // https
 pref("network.protocol-handler.external.ile", false);  // file
 pref("network.protocol-handler.external.le", false);   // file
 
 // An exposed protocol handler is one that can be used in all contexts.  A
 // non-exposed protocol handler is one that can only be used internally by the
 // application.  For example, a non-exposed protocol would not be loaded by the
 // application in response to a link click or a X-remote openURL command.
 // Instead, it would be deferred to the system's external protocol handler.
--- a/mozglue/build/WindowsDllBlocklist.cpp
+++ b/mozglue/build/WindowsDllBlocklist.cpp
@@ -255,21 +255,16 @@ static const DllBlockInfo sWindowsDllBlo
   { "klsihk64.dll", MAKE_VERSION(14, 0, 456, 0xffff), DllBlockInfo::BLOCK_WIN8_ONLY },
 
   // Bug 1407337, crashes with OpenSC < 0.16.0
   { "onepin-opensc-pkcs11.dll", MAKE_VERSION(0, 15, 0xffff, 0xffff) },
 
   // Avecto Privilege Guard causes crashes, bug 1385542
   { "pghook.dll", ALL_VERSIONS },
 
-  // Microsoft UI automation causing performance problems on 57+, bug 1420276
-#if defined(MOZ_DEV_EDITION) || defined(RELEASE_OR_BETA)
-  { "uiautomationcore.dll", ALL_VERSIONS },
-#endif // defined(MOZ_DEV_EDITION) || defined(RELEASE_OR_BETA)
-
   { nullptr, 0 }
 };
 
 #ifndef STATUS_DLL_NOT_FOUND
 #define STATUS_DLL_NOT_FOUND ((DWORD)0xC0000135L)
 #endif
 
 // define this for very verbose dll load debug spew
--- a/security/pkix/lib/pkixcert.cpp
+++ b/security/pkix/lib/pkixcert.cpp
@@ -152,17 +152,17 @@ BackCert::Init()
   // standard extensions:
   //
   // Netscape Cert Type  |  BasicConstraints.cA  |  Extended Key Usage
   // --------------------+-----------------------+----------------------
   // SSL Server          |  false                |  id_kp_serverAuth
   // SSL Client          |  false                |  id_kp_clientAuth
   // S/MIME Client       |  false                |  id_kp_emailProtection
   // Object Signing      |  false                |  id_kp_codeSigning
-  // SSL Server CA       |  true                 |  id_pk_serverAuth
+  // SSL Server CA       |  true                 |  id_kp_serverAuth
   // SSL Client CA       |  true                 |  id_kp_clientAuth
   // S/MIME CA           |  true                 |  id_kp_emailProtection
   // Object Signing CA   |  true                 |  id_kp_codeSigning
   if (criticalNetscapeCertificateType.GetLength() > 0 &&
       (basicConstraints.GetLength() == 0 || extKeyUsage.GetLength() == 0)) {
     return Result::ERROR_UNKNOWN_CRITICAL_EXTENSION;
   }
 
--- a/toolkit/mozapps/extensions/content/extensions.xul
+++ b/toolkit/mozapps/extensions/content/extensions.xul
@@ -126,17 +126,17 @@
     <command id="cmd_neverActivateItem"/>
   </commandset>
 
   <keyset>
     <key id="focusSearch" key="&search.commandkey;" modifiers="accel"
          command="cmd_focusSearch"/>
   </keyset>
   <hbox flex="1">
-    <vbox>
+    <vbox id="category-box">
       <!-- category list -->
       <richlistbox id="categories" flex="1">
         <richlistitem id="category-search" value="addons://search/"
                       class="category"
                       name="&view.search.label;" priority="0"
                       tooltiptext="&view.search.label;" disabled="true"/>
         <richlistitem id="category-discover" value="addons://discover/"
                       class="category"
--- a/toolkit/themes/shared/extensions/extensions.inc.css
+++ b/toolkit/themes/shared/extensions/extensions.inc.css
@@ -284,25 +284,16 @@ button.warning {
   background-color: #ebebeb;
   cursor: pointer;
 }
 
 .header-button > .toolbarbutton-text {
   display: none;
 }
 
-.nav-button {
-  list-style-image: url(chrome://mozapps/skin/extensions/navigation.svg);
-  margin-top: 15px;
-  margin-bottom: 15px;
-  border-color: transparent;
-  -moz-context-properties: fill;
-  fill: currentColor;
-}
-
 /*** sorters ***/
 
 .sort-controls {
   -moz-appearance: none;
 }
 
 .sorter {
   height: 35px;
deleted file mode 100644
--- a/toolkit/themes/shared/extensions/navigation.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
-  <path fill-opacity="context-fill-opacity" fill="context-fill" d="M14 7H4.4l4.3-4.3c.92-.94-.46-2.32-1.4-1.4l-6 6c-.4.38-.4 1 0 1.4l6 6c.94.92 2.32-.46 1.4-1.4L4.4 9H14c1.33 0 1.33-2 0-2z"/>
-</svg>
--- a/toolkit/themes/shared/mozapps.inc.mn
+++ b/toolkit/themes/shared/mozapps.inc.mn
@@ -14,17 +14,16 @@
   skin/classic/mozapps/extensions/category-search.svg        (../../shared/extensions/category-search.svg)
   skin/classic/mozapps/extensions/category-discover.svg      (../../shared/extensions/category-discover.svg)
   skin/classic/mozapps/extensions/category-service.svg       (../../shared/extensions/category-service.svg)
   skin/classic/mozapps/extensions/category-recent.svg        (../../shared/extensions/category-recent.svg)
   skin/classic/mozapps/extensions/category-available.svg     (../../shared/extensions/category-available.svg)
 
   skin/classic/mozapps/extensions/extensionGeneric-16.svg    (../../shared/extensions/extensionGeneric-16.svg)
   skin/classic/mozapps/extensions/utilities.svg              (../../shared/extensions/utilities.svg)
-  skin/classic/mozapps/extensions/navigation.svg             (../../shared/extensions/navigation.svg)
   skin/classic/mozapps/extensions/alerticon-warning.svg      (../../shared/extensions/alerticon-warning.svg)
   skin/classic/mozapps/extensions/alerticon-error.svg        (../../shared/extensions/alerticon-error.svg)
   skin/classic/mozapps/extensions/alerticon-info-positive.svg (../../shared/extensions/alerticon-info-positive.svg)
   skin/classic/mozapps/extensions/alerticon-info-negative.svg (../../shared/extensions/alerticon-info-negative.svg)
   skin/classic/mozapps/extensions/category-legacy.svg        (../../shared/extensions/category-legacy.svg)
   skin/classic/mozapps/plugins/plugin.svg                    (../../shared/plugins/plugin.svg)
   skin/classic/mozapps/plugins/plugin-blocked.svg            (../../shared/plugins/plugin-blocked.svg)
   skin/classic/mozapps/plugins/pluginGeneric.svg             (../../shared/extensions/category-plugins.svg)
--- a/widget/cocoa/nsCocoaWindow.h
+++ b/widget/cocoa/nsCocoaWindow.h
@@ -349,18 +349,17 @@ public:
 
     bool InFullScreenMode() const { return mInFullScreenMode; }
 
 protected:
   virtual ~nsCocoaWindow();
 
   nsresult             CreateNativeWindow(const NSRect &aRect,
                                           nsBorderStyle aBorderStyle,
-                                          bool aRectIsFrameRect,
-                                          bool aIsPrivateBrowsing);
+                                          bool aRectIsFrameRect);
   nsresult             CreatePopupContentView(const LayoutDeviceIntRect &aRect,
                                               nsWidgetInitData* aInitData);
   void                 DestroyNativeWindow();
   void                 AdjustWindowShadow();
   void                 SetWindowBackgroundBlur();
   void                 UpdateBounds();
 
   void                 DoResize(double aX, double aY, double aWidth, double aHeight,
--- a/widget/cocoa/nsCocoaWindow.mm
+++ b/widget/cocoa/nsCocoaWindow.mm
@@ -323,17 +323,17 @@ nsCocoaWindow::Create(nsIWidget* aParent
   mAncestorLink = aParent;
 
   // Applications that use native popups don't want us to create popup windows.
   if ((mWindowType == eWindowType_popup) && UseNativePopupWindows())
     return NS_OK;
 
   nsresult rv =
     CreateNativeWindow(nsCocoaUtils::GeckoRectToCocoaRect(newBounds),
-                       mBorderStyle, false, aInitData->mIsPrivateBrowsing);
+                       mBorderStyle, false);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (mWindowType == eWindowType_popup) {
     if (aInitData->mMouseTransparent) {
       [mWindow setIgnoresMouseEvents:YES];
     }
     // now we can convert newBounds to device pixels for the window we created,
     // as the child view expects a rect expressed in the dev pix of its parent
@@ -385,18 +385,17 @@ static unsigned int WindowMaskForBorderS
 }
 
 // If aRectIsFrameRect, aRect specifies the frame rect of the new window.
 // Otherwise, aRect.x/y specify the position of the window's frame relative to
 // the bottom of the menubar and aRect.width/height specify the size of the
 // content rect.
 nsresult nsCocoaWindow::CreateNativeWindow(const NSRect &aRect,
                                            nsBorderStyle aBorderStyle,
-                                           bool aRectIsFrameRect,
-                                           bool aIsPrivateBrowsing)
+                                           bool aRectIsFrameRect)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
 
   // We default to NSBorderlessWindowMask, add features if needed.
   unsigned int features = NSBorderlessWindowMask;
 
   // Configure the window we will create based on the window type.
   switch (mWindowType)
@@ -486,20 +485,18 @@ nsresult nsCocoaWindow::CreateNativeWind
     windowClass = [BorderlessWindow class];
 
   // Create the window
   mWindow = [[windowClass alloc] initWithContentRect:contentRect styleMask:features 
                                  backing:NSBackingStoreBuffered defer:YES];
 
   // Make sure that window titles don't leak to disk in private browsing mode
   // due to macOS' resume feature.
-  [mWindow setRestorable:!aIsPrivateBrowsing];
-  if (aIsPrivateBrowsing) {
-    [mWindow disableSnapshotRestoration];
-  }
+  [mWindow setRestorable:NO];
+  [mWindow disableSnapshotRestoration];
 
   // setup our notification delegate. Note that setDelegate: does NOT retain.
   mDelegate = [[WindowDelegate alloc] initWithGeckoWindow:this];
   [mWindow setDelegate:mDelegate];
 
   // Make sure that the content rect we gave has been honored.
   NSRect wantedFrame = [mWindow frameRectForContentRect:contentRect];
   if (!NSEqualRects([mWindow frame], wantedFrame)) {
@@ -1367,21 +1364,17 @@ nsCocoaWindow::HideWindowChrome(bool aSh
   [contentView removeFromSuperviewWithoutNeedingDisplay];
 
   // Save state (like window title).
   NSMutableDictionary* state = [mWindow exportState];
 
   // Recreate the window with the right border style.
   NSRect frameRect = [mWindow frame];
   DestroyNativeWindow();
-  nsresult rv = CreateNativeWindow(frameRect,
-                                   aShouldHide ? eBorderStyle_none :
-                                                 mBorderStyle,
-                                   true,
-                                   mWindow.restorable);
+  nsresult rv = CreateNativeWindow(frameRect, aShouldHide ? eBorderStyle_none : mBorderStyle, true);
   NS_ENSURE_SUCCESS_VOID(rv);
 
   // Re-import state.
   [mWindow importState:state];
 
   // Reparent the content view.
   [mWindow setContentView:contentView];
   [contentView release];
--- a/widget/nsWidgetInitData.h
+++ b/widget/nsWidgetInitData.h
@@ -101,18 +101,17 @@ struct nsWidgetInitData {
       mListenForResizes(false),
       mUnicode(true),
       mRTL(false),
       mNoAutoHide(false),
       mIsDragPopup(false),
       mIsAnimationSuppressed(false),
       mSupportTranslucency(false),
       mMouseTransparent(false),
-      mHasRemoteContent(false),
-      mIsPrivateBrowsing(false)
+      mHasRemoteContent(false)
   {
   }
 
   nsWindowType  mWindowType;
   nsBorderStyle mBorderStyle;
   nsPopupType   mPopupHint;
   nsPopupLevel  mPopupLevel;
   // B2G multi-screen support. Screen ID is for differentiating screens of
@@ -129,12 +128,11 @@ struct nsWidgetInitData {
   // true if window creation animation is suppressed, e.g. for session restore
   bool          mIsAnimationSuppressed;
   // true if the window should support an alpha channel, if available.
   bool          mSupportTranslucency;
   // true if the window should be transparent to mouse events. Currently this is
   // only valid for eWindowType_popup widgets
   bool          mMouseTransparent;
   bool          mHasRemoteContent;
-  bool          mIsPrivateBrowsing;
 };
 
 #endif // nsWidgetInitData_h__
--- a/xpfe/appshell/nsAppShellService.cpp
+++ b/xpfe/appshell/nsAppShellService.cpp
@@ -728,58 +728,57 @@ nsAppShellService::JustCreateTopWindow(n
     aInitialHeight = 1;
     window->SetIntrinsicallySized(true);
   }
 
   bool center = aChromeMask & nsIWebBrowserChrome::CHROME_CENTER_SCREEN;
 
   widgetInitData.mRTL = LocaleService::GetInstance()->IsAppLocaleRTL();
 
-  bool isUsingRemoteTabs = mozilla::BrowserTabsRemoteAutostart();
-  if (aChromeMask & nsIWebBrowserChrome::CHROME_REMOTE_WINDOW) {
-    isUsingRemoteTabs = true;
-  }
+  nsresult rv = window->Initialize(parent, center ? aParent : nullptr,
+                                   aUrl, aInitialWidth, aInitialHeight,
+                                   aIsHiddenWindow, aOpeningTab,
+                                   aOpenerWindow, widgetInitData);
+
+  NS_ENSURE_SUCCESS(rv, rv);
 
   // Enforce the Private Browsing autoStart pref first.
   bool isPrivateBrowsingWindow =
     Preferences::GetBool("browser.privatebrowsing.autostart");
+  bool isUsingRemoteTabs = mozilla::BrowserTabsRemoteAutostart();
+
   if (aChromeMask & nsIWebBrowserChrome::CHROME_PRIVATE_WINDOW) {
     // Caller requested a private window
     isPrivateBrowsingWindow = true;
   }
-  widgetInitData.mIsPrivateBrowsing = isPrivateBrowsingWindow;
+  if (aChromeMask & nsIWebBrowserChrome::CHROME_REMOTE_WINDOW) {
+    isUsingRemoteTabs = true;
+  }
 
-  bool isParentPrivateBrowsingWindow = false;
   nsCOMPtr<mozIDOMWindowProxy> domWin = do_GetInterface(aParent);
   nsCOMPtr<nsIWebNavigation> webNav = do_GetInterface(domWin);
   nsCOMPtr<nsILoadContext> parentContext = do_QueryInterface(webNav);
+
   if (!isPrivateBrowsingWindow && parentContext) {
     // Ensure that we propagate any existing private browsing status
     // from the parent, even if it will not actually be used
     // as a parent value.
-    isParentPrivateBrowsingWindow = parentContext->UsePrivateBrowsing();
+    isPrivateBrowsingWindow = parentContext->UsePrivateBrowsing();
   }
 
-  nsresult rv = window->Initialize(parent, center ? aParent : nullptr,
-                                   aUrl, aInitialWidth, aInitialHeight,
-                                   aIsHiddenWindow, aOpeningTab,
-                                   aOpenerWindow, widgetInitData);
-  NS_ENSURE_SUCCESS(rv, rv);
-
   if (parentContext) {
     isUsingRemoteTabs = parentContext->UseRemoteTabs();
   }
 
   nsCOMPtr<mozIDOMWindowProxy> newDomWin =
       do_GetInterface(NS_ISUPPORTS_CAST(nsIBaseWindow*, window));
   nsCOMPtr<nsIWebNavigation> newWebNav = do_GetInterface(newDomWin);
   nsCOMPtr<nsILoadContext> thisContext = do_GetInterface(newWebNav);
   if (thisContext) {
-    thisContext->SetPrivateBrowsing(isPrivateBrowsingWindow ||
-                                    isParentPrivateBrowsingWindow);
+    thisContext->SetPrivateBrowsing(isPrivateBrowsingWindow);
     thisContext->SetRemoteTabs(isUsingRemoteTabs);
   }
 
   window.forget(aResult);
   if (parent)
     parent->AddChildWindow(*aResult);
 
   if (center)