Bug 1534699 - ensure new windows default to 'setup sync' state. r=eoger a=pascalc
authorMark Hammond <mhammond@skippinet.com.au>
Mon, 25 Mar 2019 21:47:10 +0000
changeset 525759 db9f6521276f71271f8836b16ba94c3baf401033
parent 525758 dccd60f0b7bac255d706a50d712e9b839ffe6bb0
child 525760 70c4704cadd562eb821e96dd219d78ced79b4189
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerseoger, pascalc
bugs1534699
milestone67.0
Bug 1534699 - ensure new windows default to 'setup sync' state. r=eoger a=pascalc Differential Revision: https://phabricator.services.mozilla.com/D24665
browser/base/content/browser-sync.js
--- a/browser/base/content/browser-sync.js
+++ b/browser/base/content/browser-sync.js
@@ -128,19 +128,24 @@ var gSync = {
       // We are in a window without our elements - just abort now, without
       // setting this._initialized, so we don't attempt to remove observers.
       return;
     }
     let syncNow = document.getElementById("PanelUI-remotetabs-syncnow");
     let label = this.syncStrings.GetStringFromName("syncnow.label");
     syncIcon.setAttribute("label", label);
     syncNow.setAttribute("label", label);
-    // We start with every menuitem hidden, so that we don't need to init
-    // the sync UI on windows like pageInfo.xul (see bug 1384856).
+    // We start with every menuitem hidden (except for the "setup sync" state),
+    // so that we don't need to init the sync UI on windows like pageInfo.xul
+    // (see bug 1384856).
+    // maybeUpdateUIState() also optimizes for this - if we should be in the
+    // "setup sync" state, that function assumes we are already in it and
+    // doesn't re-initialize the UI elements.
     document.getElementById("sync-setup").hidden = false;
+    document.getElementById("PanelUI-remotetabs-setupsync").hidden = false;
 
     for (let topic of this._obs) {
       Services.obs.addObserver(this, topic, true);
     }
 
     this._generateNodeGetters();
 
     this._maybeUpdateUIState();