Bug 1438511 - Copy top window's uidensity attribute in sidebarUtils.js instead of forcing gUIDensity.update(). r=florian
authorNihanth Subramanya <nhnt11@gmail.com>
Thu, 15 Feb 2018 19:59:13 +0530
changeset 404323 3ae4195fba9785117f76bdbe2cf3775cbb806a46
parent 404322 be58311261fcad925faeaceefe3303ceb1653865
child 404339 d9f11f7aab0bdd947e452d3b739a7b31ee0a7952
push id59778
push usernhnt11@gmail.com
push dateSat, 17 Feb 2018 13:24:04 +0000
treeherderautoland@3ae4195fba97 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs1438511
milestone60.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 1438511 - Copy top window's uidensity attribute in sidebarUtils.js instead of forcing gUIDensity.update(). r=florian MozReview-Commit-ID: Ljwn5iyV37V
browser/components/places/content/sidebarUtils.js
--- a/browser/components/places/content/sidebarUtils.js
+++ b/browser/components/places/content/sidebarUtils.js
@@ -1,14 +1,18 @@
 /* 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/. */
 
 ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
-window.top.gUIDensity.update();
+
+let uidensity = window.top.document.documentElement.getAttribute("uidensity");
+if (uidensity) {
+  document.documentElement.setAttribute("uidensity", uidensity);
+}
 
 var SidebarUtils = {
   handleTreeClick: function SU_handleTreeClick(aTree, aEvent, aGutterSelect) {
     // right-clicks are not handled here
     if (aEvent.button == 2)
       return;
 
     var tbo = aTree.treeBoxObject;