From 797ef236a98e9133f5ab6881bee359d050d0d361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eddy=20Bru=C3=ABl?= Date: Wed, 11 Feb 2015 20:29:51 +0100 Subject: [PATCH 01/44] Bug 943517 - Convert to Promise.jsm in the debugger server;r=jlong --- toolkit/devtools/server/actors/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolkit/devtools/server/actors/script.js b/toolkit/devtools/server/actors/script.js index 5659d0da803..34712954ab0 100644 --- a/toolkit/devtools/server/actors/script.js +++ b/toolkit/devtools/server/actors/script.js @@ -19,7 +19,7 @@ const xpcInspector = require("xpcInspector"); const mapURIToAddonID = require("./utils/map-uri-to-addon-id"); const ScriptStore = require("./utils/ScriptStore"); -const { defer, resolve, reject, all } = require("devtools/toolkit/deprecated-sync-thenables"); +const { defer, resolve, reject, all } = promise; loader.lazyGetter(this, "Debugger", () => { let Debugger = require("Debugger"); From c5d34a8d9ba86ca6c2b0e81f7e2db19087a014b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Qu=C3=A8ze?= Date: Wed, 11 Feb 2015 20:47:27 +0100 Subject: [PATCH 02/44] Bug 1129401 - Can't copy URL by right clicking it the first time, r=Mossop. --- toolkit/content/widgets/textbox.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toolkit/content/widgets/textbox.xml b/toolkit/content/widgets/textbox.xml index 86bbcafd50d..def0d050c18 100644 --- a/toolkit/content/widgets/textbox.xml +++ b/toolkit/content/widgets/textbox.xml @@ -241,9 +241,10 @@ #ifndef XP_WIN - // Only care about context clicks on the input field itself - if (event.target != this.inputField) + // Only care about context clicks on the textbox itself. + if (event.target != this) return; + if (!event.button) // context menu opened via keyboard shortcut return; this._maybeSelectAll(); From 8dcddd5d6612b2adddc868e88ac17962ceb4b4fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Qu=C3=A8ze?= Date: Wed, 11 Feb 2015 20:47:27 +0100 Subject: [PATCH 03/44] Bug 1111638 - add a localization note for the 'changeSearchSettings.button' string, r=flod. --- browser/locales/en-US/chrome/browser/browser.dtd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/browser/locales/en-US/chrome/browser/browser.dtd b/browser/locales/en-US/chrome/browser/browser.dtd index 5eb959c4d21..1c8bfe5bac2 100644 --- a/browser/locales/en-US/chrome/browser/browser.dtd +++ b/browser/locales/en-US/chrome/browser/browser.dtd @@ -427,6 +427,9 @@ These should match what Safari and other Apple applications use on OS X Lion. -- searchFor.label and searchWith.label. This string will be used instead of them when the user has not typed any keyword. --> + From 7533723cca6e015ef085777799d8c4dbe4cda04b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Qu=C3=A8ze?= Date: Wed, 11 Feb 2015 20:47:27 +0100 Subject: [PATCH 04/44] Bug 1102038 - the 'Change Search Settings' button and the open search items cannot be used via the keyboard - follow-up to also apply the CSS changes on Windows and Linux, r=Mossop. --- browser/themes/linux/searchbar.css | 5 ++--- browser/themes/windows/searchbar.css | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/browser/themes/linux/searchbar.css b/browser/themes/linux/searchbar.css index ad2c28ff493..fc8a51531bf 100644 --- a/browser/themes/linux/searchbar.css +++ b/browser/themes/linux/searchbar.css @@ -164,7 +164,6 @@ searchbar[oneoffui] .search-go-button:-moz-locale-dir(rtl) > .toolbarbutton-icon background-image: none; } -.searchbar-engine-one-off-item:hover:not(.dummy), .searchbar-engine-one-off-item[selected] { background-color: Highlight; background-image: none; @@ -202,7 +201,7 @@ searchbar[oneoffui] .search-go-button:-moz-locale-dir(rtl) > .toolbarbutton-icon border-top: 1px solid #ccc; } -.addengine-item:hover { +.addengine-item[selected] { background-color: Highlight; color: HighlightText; } @@ -266,7 +265,7 @@ searchbar[oneoffui] .searchbar-engine-image { min-height: 32px; } -.search-setting-button:hover { +.search-setting-button[selected] { background-color: #d3d3d3; border-top-color: #bdbebe; } diff --git a/browser/themes/windows/searchbar.css b/browser/themes/windows/searchbar.css index a05b572aca9..0a60812b5a9 100644 --- a/browser/themes/windows/searchbar.css +++ b/browser/themes/windows/searchbar.css @@ -178,7 +178,6 @@ searchbar[oneoffui] .search-go-button:-moz-locale-dir(rtl) > .toolbarbutton-icon background-image: none; } -.searchbar-engine-one-off-item:hover:not(.dummy), .searchbar-engine-one-off-item[selected] { background-color: Highlight; background-image: none; @@ -214,7 +213,7 @@ searchbar[oneoffui] .search-go-button:-moz-locale-dir(rtl) > .toolbarbutton-icon border-top: 1px solid #ccc; } -.addengine-item:hover { +.addengine-item[selected] { background-color: Highlight; color: HighlightText; } @@ -279,7 +278,7 @@ searchbar[oneoffui] .searchbar-engine-image { min-height: 32px; } -.search-setting-button:hover { +.search-setting-button[selected] { background-color: #d3d3d3; border-top-color: #bdbebe; } From fc1b4ea06f1cfe0f2399471eeda15ce180893531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Qu=C3=A8ze?= Date: Wed, 11 Feb 2015 20:47:28 +0100 Subject: [PATCH 05/44] Bug 1123620 - remove the one-time intro popup for the new searchbox UI, r=Mossop. --- .../source/python-lib/cuddlefish/prefs.py | 2 - addon-sdk/source/test/preferences/test.json | 1 - browser/app/profile/firefox.js | 3 - browser/base/content/browser-doctype.inc | 2 - browser/base/content/browser.js | 133 --------- browser/base/content/browser.xul | 35 --- browser/base/content/test/general/browser.ini | 2 - .../test/general/browser_searchHighlight.js | 260 ------------------ .../en-US/chrome/browser/searchbar.dtd | 11 - browser/themes/linux/jar.mn | 2 - browser/themes/osx/jar.mn | 2 - browser/themes/shared/UITour.inc.css | 48 ---- browser/themes/shared/dots.png | Bin 496 -> 0 bytes browser/themes/shared/dots@2x.png | Bin 519 -> 0 bytes browser/themes/windows/jar.mn | 4 - testing/profiles/prefs_general.js | 2 - 16 files changed, 507 deletions(-) delete mode 100644 browser/base/content/test/general/browser_searchHighlight.js delete mode 100644 browser/themes/shared/dots.png delete mode 100644 browser/themes/shared/dots@2x.png diff --git a/addon-sdk/source/python-lib/cuddlefish/prefs.py b/addon-sdk/source/python-lib/cuddlefish/prefs.py index 8a311110ad8..972a5932045 100644 --- a/addon-sdk/source/python-lib/cuddlefish/prefs.py +++ b/addon-sdk/source/python-lib/cuddlefish/prefs.py @@ -237,8 +237,6 @@ DEFAULT_TEST_PREFS = { 'media.eme.enabled': 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 006fad81c90..a38ed141db6 100644 --- a/addon-sdk/source/test/preferences/test.json +++ b/addon-sdk/source/test/preferences/test.json @@ -44,7 +44,6 @@ "dom.apps.customization.enabled": true, "media.eme.enabled": 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 df90f4d7d95..be343e7ce42 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 diff --git a/browser/base/content/browser-doctype.inc b/browser/base/content/browser-doctype.inc index 66282611c4f..ad08f4b0346 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 cdc4f4dc473..35971e09896 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 db1a63c164a..83e194a8c6a 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -245,41 +245,6 @@ mousethrough="always"> - -