diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 38f1f3dd7365..213761881c6d 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -1968,7 +1968,7 @@ function getShortcutOrURI(aURL, aPostDataRef) { var engine = Services.search.getEngineByAlias(keyword); if (engine) { - var submission = engine.getSubmission(param, null); + var submission = engine.getSubmission(param); aPostDataRef.value = submission.postData; return submission.uri.spec; } @@ -3143,7 +3143,7 @@ const BrowserSearch = { else engine = Services.search.defaultEngine; - var submission = engine.getSubmission(searchText, null); // HTML response + var submission = engine.getSubmission(searchText); // HTML response // getSubmission can return null if the engine doesn't have a URL // with a text/html response type. This is unlikely (since diff --git a/browser/components/nsBrowserContentHandler.js b/browser/components/nsBrowserContentHandler.js index 10b8f7a14e69..0c0f2b77b12d 100644 --- a/browser/components/nsBrowserContentHandler.js +++ b/browser/components/nsBrowserContentHandler.js @@ -303,7 +303,7 @@ function doSearch(searchTerm, cmdLine) { var ss = Components.classes["@mozilla.org/browser/search-service;1"] .getService(nsIBrowserSearchService); - var submission = ss.defaultEngine.getSubmission(searchTerm, null); + var submission = ss.defaultEngine.getSubmission(searchTerm); // fill our nsISupportsArray with uri-as-wstring, null, null, postData var sa = Components.classes["@mozilla.org/supports-array;1"] diff --git a/browser/components/search/content/search.xml b/browser/components/search/content/search.xml index 4ad104482543..31bfe6b26b99 100644 --- a/browser/components/search/content/search.xml +++ b/browser/components/search/content/search.xml @@ -489,7 +489,7 @@ diff --git a/testing/mozmill/tests/shared-modules/testSearchAPI.js b/testing/mozmill/tests/shared-modules/testSearchAPI.js index 5aac045275d4..502052cf28da 100644 --- a/testing/mozmill/tests/shared-modules/testSearchAPI.js +++ b/testing/mozmill/tests/shared-modules/testSearchAPI.js @@ -509,7 +509,7 @@ searchBar.prototype = { */ checkSearchResultPage : function searchBar_checkSearchResultPage(searchTerm) { // Retrieve the URL which is used for the currently selected search engine - var targetUrl = this._bss.currentEngine.getSubmission(searchTerm, null).uri; + var targetUrl = this._bss.currentEngine.getSubmission(searchTerm).uri; var currentUrl = this._controller.tabs.activeTabWindow.document.location.href; // Check if pure domain names are identical diff --git a/toolkit/components/search/nsIBrowserSearchService.idl b/toolkit/components/search/nsIBrowserSearchService.idl index dbeda4ef8fe8..0abac5d74329 100644 --- a/toolkit/components/search/nsIBrowserSearchService.idl +++ b/toolkit/components/search/nsIBrowserSearchService.idl @@ -69,7 +69,7 @@ interface nsISearchEngine : nsISupports * Data to add to the submission object. * i.e. the search terms. * - * @param responseType + * @param responseType [optional] * The MIME type that we'd like to receive in response * to this submission. If null, will default to "text/html". * @@ -77,7 +77,8 @@ interface nsISearchEngine : nsISupports * to send to the search engine. If no submission can be * obtained for the given responseType, returns null. */ - nsISearchSubmission getSubmission(in AString data, in AString responseType); + nsISearchSubmission getSubmission(in AString data, + [optional] in AString responseType); /** * Adds a parameter to the search engine's submission data. This should only @@ -126,7 +127,8 @@ interface nsISearchEngine : nsISupports const unsigned long DATA_TEXT = 2; /** - * The shortcut alias of the engine. This is a unique identifier. + * An optional shortcut alias for the engine. + * When non-null, this is a unique identifier. */ attribute AString alias;