Bug 1438511 - Copy top window's uidensity attribute in sidebarUtils.js instead of forcing gUIDensity.update(). r=florian
MozReview-Commit-ID: Ljwn5iyV37V
--- 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;