diff --git a/addon-sdk/source/python-lib/cuddlefish/prefs.py b/addon-sdk/source/python-lib/cuddlefish/prefs.py index e02f6fca15be6..9efe77433d6c2 100644 --- a/addon-sdk/source/python-lib/cuddlefish/prefs.py +++ b/addon-sdk/source/python-lib/cuddlefish/prefs.py @@ -238,8 +238,6 @@ 'media.eme.apiVisible': True, # Don't forceably kill content processes after a timeout 'dom.ipc.tabs.shutdownTimeoutSecs': 0, - # Don't show the search first run UI by default - 'browser.search.highlightCount': 0, 'general.useragent.locale': "en-US", 'intl.locale.matchOS': "en-US", 'dom.indexedDB.experimental': True diff --git a/addon-sdk/source/test/preferences/test.json b/addon-sdk/source/test/preferences/test.json index 17e9abd418193..5acee08715aba 100644 --- a/addon-sdk/source/test/preferences/test.json +++ b/addon-sdk/source/test/preferences/test.json @@ -45,7 +45,6 @@ "media.eme.enabled": true, "media.eme.apiVisible": true, "dom.ipc.tabs.shutdownTimeoutSecs": 0, - "browser.search.highlightCount": 0, "general.useragent.locale": "en-US", "intl.locale.matchOS": "en-US", "dom.indexedDB.experimental": true diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 3ed24e805dc2f..65cc1704e2ef1 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -408,9 +408,6 @@ pref("browser.search.showOneOffButtons", true); // comma seperated list of of engines to hide in the search panel. pref("browser.search.hiddenOneOffs", ""); -// How many times to show the new search highlight -pref("browser.search.highlightCount", 5); - pref("browser.sessionhistory.max_entries", 50); // handle links targeting new windows @@ -1670,7 +1667,6 @@ pref("shumway.swf.whitelist", "http://g-ecx.images-amazon.com/*/AiryBasicRendere pref("image.mem.max_decoded_image_kb", 256000); pref("loop.enabled", true); -pref("loop.screenshare.enabled", false); pref("loop.server", "https://loop.services.mozilla.com/v0"); pref("loop.seenToS", "unseen"); pref("loop.showPartnerLogo", true); diff --git a/browser/base/content/browser-doctype.inc b/browser/base/content/browser-doctype.inc index 66282611c4f5f..ad08f4b03464b 100644 --- a/browser/base/content/browser-doctype.inc +++ b/browser/base/content/browser-doctype.inc @@ -19,8 +19,6 @@ #endif %aboutHomeDTD; - -%searchBarDTD; %syncBrandDTD; ]> diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 731dbc93f5650..ab7403ff4f796 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -1427,7 +1427,6 @@ var gBrowserInit = { SocialUI.init(); TabView.init(); - SearchHighlight.init(); // Telemetry for master-password - we do this after 5 seconds as it // can cause IO if NSS/PSM has not already initialized. @@ -3636,138 +3635,6 @@ const BrowserSearch = { } }; -const SearchHighlight = { - eventsReady: false, - // The pref that controls how many times to show the highlight. - countPref: "browser.search.highlightCount", - // The current highlight to show. - currentPos: 0, - // Tracks if the popup closed very recently. - hideTimer: null, - - // The list of highlights and the items in the panel to anchor them to. - highlights: [{ - id: "SearchHighlight1", - anchor: "search-panel-one-offs" - }, { - id: "SearchHighlight2", - anchor: "searchbar-engine", - }], - - init: function() { - this.panel = document.getElementById("PopupSearchAutoComplete"); - this.panel.addEventListener("popupshowing", this.searchPanelShown.bind(this), false); - }, - - initEvents: function() { - if (this.eventsReady) { - return; - } - - this.panel.addEventListener("popuphidden", this.searchPanelHidden.bind(this), false); - - for (let highlight of this.highlights) { - highlight.panel = document.getElementById(highlight.id); - highlight.panel.addEventListener("popupshowing", this.disablePanelHiding.bind(this), false); - highlight.panel.addEventListener("popuphiding", this.enablePanelHiding.bind(this), false); - - highlight.panel.querySelector("button").addEventListener("command", this.highlightButtonClicked.bind(this), false); - } - - this.eventsReady = true; - }, - - get highlightPanel() { - return this.highlights[this.currentPos].panel; - }, - - showHighlight: function() { - // Check that all the events are setup. - this.initEvents(); - - // If a highlight is already showing then do nothing. - if (this.highlightPanel.state != "closed") { - return; - } - - // Show the first highlight. - this.currentPos = 0; - this.showCurrentHighlight(); - }, - - showCurrentHighlight: function() { - let highlight = this.highlights[this.currentPos]; - let anchor = document.getAnonymousElementByAttribute(this.panel, "anonid", highlight.anchor); - highlight.panel.hidden = false; - highlight.panel.openPopup(anchor, "leftcenter topright"); - }, - - searchPanelShown: function() { - let placement = CustomizableUI.getPlacementOfWidget("search-container"); - if (placement.area == CustomizableUI.AREA_PANEL) { - // Opening a panel anchored to a panel anchored to a panel anchored to the - // window doesn't work very well - return; - } - - if (!BrowserSearch.searchBar.value) { - // Don't show the panels when there is no text in the search box - return; - } - - // If the panel was only very recently closed re-show the last highlight. - if (this.hideTimer) { - clearTimeout(this.hideTimer); - this.hideTimer = null; - this.showCurrentHighlight(); - return; - } - - // If the highlight has already been show the appropriate number of times - // do nothing. - let count = Services.prefs.getIntPref(this.countPref); - if (count <= 0) - return; - - this.showHighlight(); - Services.prefs.setIntPref(this.countPref, count - 1); - }, - - searchPanelHidden: function() { - if (this.highlightPanel.state == "closed") { - return; - } - - this.highlightPanel.hidePopup(); - - // Set a flag when the panel was closed in the last short time. - this.hideTimer = setTimeout(() => { - this.hideTimer = null; - }, 500); - }, - - highlightButtonClicked: function() { - // When the button is clicked close the current highlight and open the next - // one. - this.highlightPanel.hidePopup(); - this.currentPos++; - if (this.currentPos < this.highlights.length) { - this.showCurrentHighlight(); - } else { - Services.prefs.setIntPref(this.countPref, 0); - this.currentPos = 0; - } - }, - - disablePanelHiding: function() { - this.panel.setAttribute("noautohide", "true"); - }, - - enablePanelHiding: function() { - this.panel.setAttribute("noautohide", "false"); - }, -}; - function FillHistoryMenu(aParent) { // Lazily add the hover listeners on first showing and never remove them if (!aParent.hasStatusListener) { diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index db1a63c164ae6..83e194a8c6a0d 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -245,41 +245,6 @@ mousethrough="always"> - -