Bug 1357800 - The One-Off search buttons not visible in the search bar. r=florian draft
authorDrew Willcoxon <adw@mozilla.com>
Wed, 17 May 2017 15:58:56 -0700
changeset 579877 5bdef5513a8c8f8f02fd9383867b0ed57610b606
parent 577862 0f4df67c5f162e00d6f52825badf468aefbfba19
child 629139 17d727b7d82407ae21939b22c1d7603f77759fa5
push id59393
push userdwillcoxon@mozilla.com
push dateWed, 17 May 2017 22:59:16 +0000
reviewersflorian
bugs1357800
milestone55.0a1
Bug 1357800 - The One-Off search buttons not visible in the search bar. r=florian Rebuild the one-off search buttons when the theme changes. See bug 1357800 for details. Summary: On Linux, switching between themes can cause a row of buttons to disappear. MozReview-Commit-ID: 8lfsUO00jYP
browser/components/search/content/search.xml
--- a/browser/components/search/content/search.xml
+++ b/browser/components/search/content/search.xml
@@ -1414,16 +1414,21 @@
         menu.addEventListener("popuphidden", aEvent => {
           this._ignoreMouseEvents = false;
           aEvent.stopPropagation();
         });
 
         // Add weak referenced observers to invalidate our cached list of engines.
         Services.prefs.addObserver("browser.search.hiddenOneOffs", this, true);
         Services.obs.addObserver(this, "browser-search-engine-modified", true);
+
+        // Rebuild the buttons when the theme changes.  See bug 1357800 for
+        // details.  Summary: On Linux, switching between themes can cause a row
+        // of buttons to disappear.
+        Services.obs.addObserver(this, "lightweight-theme-changed", true);
       ]]></constructor>
 
       <!-- This handles events outside the one-off buttons, like on the popup
            and textbox. -->
       <method name="handleEvent">
         <parameter name="event"/>
         <body><![CDATA[
           switch (event.type) {