Bug 677421 - Add support for OpenSearch from Thunderbird. Part 2 - add opensearch. r=Standard8
authorJim Porter <squibblyflabbetydoo@gmail.com>
Tue, 08 Nov 2011 08:50:48 +0000
changeset 8813 77d2995562e0e8593278fd3384a69f365549cf62
parent 8812 d29730042bdf4fe317d6ec9562527d1f44b95630
child 8814 b4ae149b9eb5240130eb64e400b8750abb9e44c3
push idunknown
push userunknown
push dateunknown
reviewersStandard8
bugs677421
Bug 677421 - Add support for OpenSearch from Thunderbird. Part 2 - add opensearch. r=Standard8
config/config.mk
mail/app/profile/all-thunderbird.js
mail/base/content/mailWindow.js
mail/base/content/mailWindowOverlay.xul
mail/base/content/messenger.css
mail/base/content/messenger.xul
mail/base/content/msgMail3PaneWindow.js
mail/base/content/nsContextMenu.js
mail/base/content/utilityOverlay.js
mail/base/content/webSearch.xml
mail/base/content/webSearchTab.js
mail/base/content/webSearchTab.xul
mail/base/jar.mn
mail/base/modules/Makefile.in
mail/base/modules/glodaWebSearch.js
mail/components/Makefile.in
mail/components/mailComponents.manifest
mail/components/webSearchProvider.js
mail/installer/package-manifest.in
mail/locales/Makefile.in
mail/locales/en-US/chrome/messenger-region/region.properties
mail/locales/en-US/chrome/messenger/glodaComplete.properties
mail/locales/en-US/chrome/messenger/messenger.properties
mail/locales/en-US/searchplugins/amazondotcom.xml
mail/locales/en-US/searchplugins/aol-web-search.xml
mail/locales/en-US/searchplugins/bing.xml
mail/locales/en-US/searchplugins/eBay.xml
mail/locales/en-US/searchplugins/google.xml
mail/locales/en-US/searchplugins/list.txt
mail/locales/en-US/searchplugins/twitter.xml
mail/locales/en-US/searchplugins/wikipedia.xml
mail/locales/en-US/searchplugins/yahoo.xml
mail/locales/filter.py
mail/themes/gnomestripe/jar.mn
mail/themes/gnomestripe/mail/icons/search-favorite.png
mail/themes/gnomestripe/mail/webSearch.css
mail/themes/pinstripe/jar.mn
mail/themes/pinstripe/mail/icons/search-favorite.png
mail/themes/pinstripe/mail/webSearch.css
mail/themes/qute/jar.mn
mail/themes/qute/mail/icons/search-favorite.png
mail/themes/qute/mail/webSearch-aero.css
mail/themes/qute/mail/webSearch.css
--- a/config/config.mk
+++ b/config/config.mk
@@ -341,16 +341,26 @@ TAR_CREATE_FLAGS = -cvhf
 ifeq ($(OS_ARCH),BSD_OS)
 TAR_CREATE_FLAGS = -cvLf
 endif
 
 ifeq ($(OS_ARCH),OS2)
 TAR_CREATE_FLAGS = -cvf
 endif
 
+ifdef LOCALE_MERGEDIR
+MERGE_FILE = $(firstword \
+  $(wildcard $(LOCALE_MERGEDIR)/$(subst /locales,,$(relativesrcdir))/$(1)) \
+  $(wildcard $(LOCALE_SRCDIR)/$(1)) \
+  $(srcdir)/en-US/$(1) )
+else
+MERGE_FILE = $(LOCALE_SRCDIR)/$(1)
+endif
+MERGE_FILES = $(foreach f,$(1),$(call MERGE_FILE,$(f)))
+
 #
 # Personal makefile customizations go in these optional make include files.
 #
 MY_CONFIG	:= $(DEPTH)/config/myconfig.mk
 MY_RULES	:= $(DEPTH)/config/myrules.mk
 
 #
 # Default command macros; can be overridden in <arch>.mk.
--- a/mail/app/profile/all-thunderbird.js
+++ b/mail/app/profile/all-thunderbird.js
@@ -725,8 +725,24 @@ pref("plugins.update.url", "https://www.
 pref("plugins.update.notifyUser", false);
 pref("plugins.crash.supportUrl", "https://live.mozillamessaging.com/%APP%/plugin-crashed?locale=%LOCALE%&version=%VERSION%&os=%OS%&buildid=%APPBUILDID%");
 
 // Windows taskbar support
 #ifdef XP_WIN
 pref("mail.taskbar.lists.enabled", true);
 pref("mail.taskbar.lists.tasks.enabled", true);
 #endif
+
+pref("mail.websearch.open_externally", false);
+
+// Pointer to the default engine name.
+pref("browser.search.defaultenginename", "chrome://messenger-region/locale/region.properties");
+
+// Ordering of search engines in the engine list.
+pref("browser.search.order.1", "chrome://messenger-region/locale/region.properties");
+pref("browser.search.order.2", "chrome://messenger-region/locale/region.properties");
+pref("browser.search.order.3", "chrome://messenger-region/locale/region.properties");
+
+// XXX Don't update yet, until we've verified how that affects us.
+pref("browser.search.update", false);
+
+// Check whether we need to perform engine updates every 6 hours
+pref("browser.search.update.interval", 21600);
--- a/mail/base/content/mailWindow.js
+++ b/mail/base/content/mailWindow.js
@@ -36,16 +36,17 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 Components.utils.import("resource:///modules/appIdleManager.js");
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource:///modules/gloda/log4moz.js");
 Components.utils.import("resource:///modules/gloda/public.js");
+Components.utils.import("resource:///modules/glodaWebSearch.js");
 
 //This file stores variables common to mail windows
 var messenger;
 var pref;
 var statusFeedback;
 var msgWindow;
 
 var msgComposeService;
@@ -143,16 +144,18 @@ function InitMsgWindow()
             .AddMsgWindow(msgWindow);
   let messagepane = document.getElementById("messagepane");
   messagepane.docShell.allowAuth = false;
   messagepane.docShell.allowDNSPrefetch = false;
   msgWindow.rootDocShell.allowAuth = true;
   msgWindow.rootDocShell.appType = Components.interfaces.nsIDocShell.APP_TYPE_MAIL;
   // Ensure we don't load xul error pages into the main window
   msgWindow.rootDocShell.useErrorPages = false;
+
+  GlodaWebSearch.onLoad();
 }
 
 // We're going to implement our status feedback for the mail window in JS now.
 // the following contains the implementation of our status feedback object
 
 function nsMsgStatusFeedback()
 {
   this._statusText = document.getElementById("statusText");
--- a/mail/base/content/mailWindowOverlay.xul
+++ b/mail/base/content/mailWindowOverlay.xul
@@ -599,21 +599,25 @@
     <menuitem id="mailContext-copy"
               label="&copyCmd.label;"
               accesskey="&copyCmd.accesskey;"
               command="cmd_copy"/>
     <menuitem id="mailContext-paste"
               label="&pasteCmd.label;"
               accesskey="&pasteCmd.accesskey;"
               command="cmd_paste"/>
-    <menuseparator id="mailContext-sep-clipboard"/>
     <menuitem id="mailContext-selectall"
               label="&selectAllCmd.label;"
               accesskey="&selectAllCmd.accesskey;"
               command="cmd_selectAll"/>
+    <menuseparator id="mailContext-sep-clipboard"/>
+
+    <menuitem id="mailContext-searchTheWeb"
+              label="Search the web"
+              oncommand="openSearchTab(event.target.value)"/>
 
     <!-- Spellchecking general menu items (enable, add dictionaries...) -->
     <menuseparator id="mailContext-spell-separator"/>
     <menuitem id="mailContext-spell-check-enabled"
               label="&spellCheckEnable.label;"
               type="checkbox"
               accesskey="&spellCheckEnable.accesskey;"
               oncommand="gSpellChecker.toggleEnabled();"/>
--- a/mail/base/content/messenger.css
+++ b/mail/base/content/messenger.css
@@ -38,16 +38,20 @@
 /* ===== messenger.css ==================================================
   == Content specific styles for Messenger.
   ======================================================================= */
 
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 
 /* ::::: mail xbl bindings ::::: */
 
+.autocomplete-richlistitem[type="websearch"] {
+  -moz-binding: url("chrome://messenger/content/webSearch.xml#websearch");
+}
+
 /* attachment list styles */
 
 attachmentlist {
   -moz-appearance: listbox;
   -moz-user-focus: normal;
 }
 
 attachmentlist[orient="horizontal"] {
--- a/mail/base/content/messenger.xul
+++ b/mail/base/content/messenger.xul
@@ -45,16 +45,17 @@
 
 <?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
 <?xul-overlay href="chrome://messenger/content/msgHdrViewOverlay.xul"?>
 <?xul-overlay href="chrome://messenger/content/mailWindowOverlay.xul"?>
 <?xul-overlay href="chrome://messenger/content/extraCustomizeItems.xul"?>
 <?xul-overlay href="chrome://messenger/content/mailOverlay.xul"?>
 <?xul-overlay href="chrome://messenger/content/editContactOverlay.xul"?>
 <?xul-overlay href="chrome://messenger/content/specialTabs.xul"?>
+<?xul-overlay href="chrome://messenger/content/webSearchTab.xul"?>
 <?xul-overlay href="chrome://messenger/content/quickFilterBar.xul"?>
 
 <!DOCTYPE window [
 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
 %brandDTD;
 <!ENTITY % messengerDTD SYSTEM "chrome://messenger/locale/messenger.dtd" >
 %messengerDTD;
 <!ENTITY % customizeToolbarDTD SYSTEM "chrome://global/locale/customizeToolbar.dtd">
@@ -137,16 +138,17 @@
   <commandset id="mailMessageMenuItems"/>
   <commandset id="mailToolbarItems"/>
   <commandset id="mailGetMsgMenuItems"/>
   <commandset id="mailMarkMenuItems"/>
   <commandset id="mailToolsMenuItems"/>
   <commandset id="globalEditMenuItems"/>
   <commandset id="selectEditMenuItems"/>
   <commandset id="clipboardEditMenuItems"/>
+  <commandset id="webSearchItems"/>
   <commandset id="FocusRingUpdate_Mail"
         commandupdater="true"
         events="focus"
         oncommandupdate="FocusRingUpdate_Mail()"/>
   <commandset id="tasksCommands"/>
 #ifdef XP_MACOSX
   <commandset id="macWindowMenuItems"/>
 #endif
--- a/mail/base/content/msgMail3PaneWindow.js
+++ b/mail/base/content/msgMail3PaneWindow.js
@@ -396,16 +396,17 @@ function OnLoadMessenger()
     panelcontainer.addEventListener("ResetBrowserThemePreview",
                                     LightWeightThemeWebInstaller, false, true);
   }
 
   Services.obs.addObserver(gPluginHandler.pluginCrashed, "plugin-crashed", false);
 
   // This also registers the contentTabType ("contentTab")
   specialTabs.openSpecialTabsOnStartup();
+  tabmail.registerTabType(webSearchTabType);
 
   window.addEventListener("AppCommand", HandleAppCommandEvent, true);
 }
 
 function LoadPostAccountWizard()
 {
   InitMsgWindow();
   messenger.setWindow(window, msgWindow);
--- a/mail/base/content/nsContextMenu.js
+++ b/mail/base/content/nsContextMenu.js
@@ -39,16 +39,17 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 Components.utils.import("resource://gre/modules/InlineSpellChecker.jsm");
 Components.utils.import("resource:///modules/MailUtils.js");
 
 var gSpellChecker = new InlineSpellChecker();
+var gGlodaBundle = null;
 
 function nsContextMenu(aXulMenu) {
   this.target         = null;
   this.menu           = null;
   this.onTextInput    = false;
   this.onImage        = false;
   this.onLoadedImage  = false;
   this.onCanvas       = false;
@@ -169,16 +170,38 @@ nsContextMenu.prototype = {
     this.showItem("mailContext-selectall", !this.inThreadPane && !this.onPlayableMedia);
     this.showItem("mailContext-copyemail", this.onMailtoLink);
     this.showItem("mailContext-copylink", this.onLink && !this.onMailtoLink);
     this.showItem("mailContext-copyimage", this.onImage);
 
     this.showItem("mailContext-composeemailto", this.onMailtoLink && !this.inThreadPane);
     this.showItem("mailContext-addemail", this.onMailtoLink && !this.inThreadPane);
 
+
+    let searchTheWeb = document.getElementById("mailContext-searchTheWeb");
+    this.showItem(searchTheWeb, !this.inThreadPane && !this.onPlayableMedia &&
+                  this.isContentSelected);
+
+    if (!searchTheWeb.hidden) {
+      let selection = document.commandDispatcher.focusedWindow.getSelection();
+      if (gGlodaBundle === null)
+        gGlodaBundle = Services.strings.createBundle(
+          "chrome://messenger/locale/glodaComplete.properties");
+
+      let key = "glodaComplete.webSearch.label";
+      let selString = selection.toString();
+      if (selString.length > 15) {
+        key += ".truncated";
+        selString = selString.slice(0, 15);
+      }
+
+      searchTheWeb.label = gGlodaBundle.GetStringFromName(key)
+                                      .replace("#1", selString);
+      searchTheWeb.value = selection.toString();
+    }
   },
   initMediaPlayerItems: function CM_initMediaPlayerItems() {
     let onMedia = this.onVideo || this.onAudio;
     // Several mutually exclusive items.... play/pause, mute/unmute, show/hide
     this.showItem("mailContext-media-play", onMedia && this.target.paused);
     this.showItem("mailContext-media-pause", onMedia && !this.target.paused);
     this.showItem("mailContext-media-mute", onMedia && !this.target.muted);
     this.showItem("mailContext-media-unmute", onMedia && this.target.muted);
--- a/mail/base/content/utilityOverlay.js
+++ b/mail/base/content/utilityOverlay.js
@@ -230,54 +230,96 @@ function openWhatsNew()
     Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
               .getService(Components.interfaces.nsIURLFormatter)
               .formatURLPref("mailnews.start_page.override_url");
 
   openContentTab(startpage);
 }
 
 /**
+ * Open the specified tab type (possibly in a new window)
+ *
+ * @param tabType the tab type to open (e.g. "contentTab")
+ * @param tabParams the parameters to pass to the tab
+ * @param where 'tab' to open in a new tab (default) or 'window' to open in a
+ *        new window
+ */
+function openTab(tabType, tabParams, where)
+{
+  if (where != "window") {
+    let tabmail = document.getElementById("tabmail");
+    if (!tabmail) {
+      // Try opening new tabs in an existing 3pane window
+      let mail3PaneWindow = Services.wm.getMostRecentWindow("mail:3pane");
+      if (mail3PaneWindow) {
+        tabmail = mail3PaneWindow.document.getElementById("tabmail");
+        mail3PaneWindow.focus();
+      }
+    }
+
+    if (tabmail) {
+      tabmail.openTab(tabType, tabParams);
+      return;
+    }
+  }
+
+  // Either we explicitly wanted to open in a new window, or we fell through to
+  // here because there's no 3pane.
+  window.openDialog("chrome://messenger/content/", "_blank",
+                    "chrome,dialog=no,all", null,
+                    { tabType: tabType, tabParams: tabParams });
+}
+
+/**
  * Open the specified URL as a content tab (or window)
  *
  * @param url the location to open
  * @param where 'tab' to open in a new tab (default) or 'window' to open in a
  *        new window
  * @param handlerRegExp a regular expression (as a string) to use for the
  *        siteClickHandler for determining whether a link should be opened in
  *        Thunderbird or passed to the system
  */
 function openContentTab(url, where, handlerRegExp)
 {
   let clickHandler = null;
   if (handlerRegExp)
     clickHandler = "specialTabs.siteClickHandler(event, new RegExp(\"" + handlerRegExp + "\"));";
 
-  if (where != "window") {
-    let tabmail = document.getElementById("tabmail");
-    if (!tabmail) {
-      // Try opening new tabs in an existing 3pane window
-      let mail3PaneWindow = Services.wm.getMostRecentWindow("mail:3pane");
-      if (mail3PaneWindow) {
-        tabmail = mail3PaneWindow.document.getElementById("tabmail");
-        mail3PaneWindow.focus();
-      }
-    }
+  openTab("contentTab", {contentPage: url, clickHandler: clickHandler}, where);
+}
 
-    if (tabmail) {
-      tabmail.openTab("contentTab", {contentPage: url, clickHandler: clickHandler});
-      return;
-    }
+/**
+ * Open a search page for the specified query in a new tab, window, or
+ * externally. If mail.websearch.open_externally is true, always open
+ * externally.
+ *
+ * @param query the term to search for
+ * @param where 'tab' to open in a new tab (default), 'window' to open in a
+ *        new window, or 'external' to open in the default browser
+ */
+function openSearchTab(query, where) {
+  let currentEngine = Services.search.currentEngine;
+  let submission = currentEngine.getSubmission(query);
+
+  if (where == "external" ||
+      Services.prefs.getBoolPref("mail.websearch.open_externally")) {
+    openLinkExternally(submission.uri.spec);
+    return;
   }
 
-  // Either we explicitly wanted to open in a new window, or we fell through to
-  // here because there's no 3pane.
-  window.openDialog("chrome://messenger/content/", "_blank",
-                    "chrome,dialog=no,all", null,
-                    { tabType: "contentTab",
-                      tabParams: {contentPage: url, clickHandler: clickHandler} });
+  let params = {
+    background: false,
+    contentPage: submission.uri.spec,
+    postData: submission.postData,
+    query: query,
+    engine: currentEngine,
+    clickHandler: "webSearchTabType.siteClickHandler(event)",
+  };
+  openTab("webSearchTab", params, where);
 }
 
 /**
  * Open the Migration Assistant.
  *
  * @param aIsUpgrade whether this is being opened as a result of upgrading
  *     from an earlier version of Thunderbird.
  */
new file mode 100644
--- /dev/null
+++ b/mail/base/content/webSearch.xml
@@ -0,0 +1,81 @@
+<!-- ***** BEGIN LICENSE BLOCK *****
+  -   Version: MPL 1.1/GPL 2.0/LGPL 2.1
+  -
+  - The contents of this file are subject to the Mozilla Public License Version
+  - 1.1 (the "License"); you may not use this file except in compliance with
+  - the License. You may obtain a copy of the License at
+  - http://www.mozilla.org/MPL/
+  -
+  - Software distributed under the License is distributed on an "AS IS" basis,
+  - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+  - for the specific language governing rights and limitations under the
+  - License.
+  -
+  - The Original Code is Mozilla Thunderbird.
+  -
+  - The Initial Developer of the Original Code is
+  -   Mozilla Foundation.
+  - Portions created by the Initial Developer are Copyright (C) 2010-2011
+  - the Initial Developer. All Rights Reserved.
+  -
+  - Contributor(s):
+  -   David Ascher <dascher@mozilla.com>
+  -   Jim Porter <squibblyflabbetydoo@gmail.com>
+  -
+  - Alternatively, the contents of this file may be used under the terms of
+  - either the GNU General Public License Version 2 or later (the "GPL"), or
+  - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+  - in which case the provisions of the GPL or the LGPL are applicable instead
+  - of those above. If you wish to allow use of your version of this file only
+  - under the terms of either the GPL or the LGPL, and not to allow others to
+  - use your version of this file under the terms of the MPL, indicate your
+  - decision by deleting the provisions above and replace them with the notice
+  - and other provisions required by the GPL or the LGPL. If you do not delete
+  - the provisions above, a recipient may use your version of this file under
+  - the terms of any one of the MPL, the GPL or the LGPL.
+  -
+  - ***** END LICENSE BLOCK ***** -->
+
+<bindings id="autocompleteBindings"
+          xmlns="http://www.mozilla.org/xbl"
+          xmlns:html="http://www.w3.org/1999/xhtml"
+          xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+          xmlns:xbl="http://www.mozilla.org/xbl">
+  <binding id="websearch" extends="chrome://gloda/content/glodacomplete.xml#glodacomplete-base-richlistitem">
+    <content orient="horizontal">
+      <xul:image anonid="icon"/>
+      <xul:description anonid="explanation" class="explanation websearch"/>
+    </content>
+    <implementation implements="nsIDOMXULSelectControlItemElement">
+      <constructor>
+        <![CDATA[
+          this._explanation = document.getAnonymousElementByAttribute(
+            this, "anonid", "explanation");
+          this.bundle = Services.strings.createBundle(
+            "chrome://messenger/locale/glodaComplete.properties");
+          this._adjustAcItem();
+          ]]>
+      </constructor>
+
+      <property name="label" readonly="true">
+        <getter>
+          <![CDATA[
+            return this.bundle
+                       .GetStringFromName("glodaComplete.webSearch.label")
+                       .replace("#1", this.row.item.tag);
+          ]]>
+        </getter>
+      </property>
+
+      <method name="_adjustAcItem">
+        <body>
+          <![CDATA[
+            this._explanation.value =
+              this.bundle.GetStringFromName("glodaComplete.webSearch.label")
+                         .replace("#1", this.row.term);
+          ]]>
+        </body>
+      </method>
+    </implementation>
+  </binding>
+</bindings>
new file mode 100644
--- /dev/null
+++ b/mail/base/content/webSearchTab.js
@@ -0,0 +1,298 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ *   Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Thunderbird.
+ *
+ * The Initial Developer of the Original Code is
+ *   Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2010-2011
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   David Ascher <dascher@mozilla.com>
+ *   Jim Porter <squibblyflabbetydoo@gmail.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+Components.utils.import("resource://gre/modules/Services.jsm");
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+Components.utils.import("resource:///modules/errUtils.js");
+
+/**
+ * A tab to show search results.
+ */
+let webSearchTabType = {
+  __proto__: contentTabBaseType,
+  name: "webSearchTab",
+  perTabPanel: "vbox",
+  lastBrowserId: 0,
+  bundle: Services.strings.createBundle(
+    "chrome://messenger/locale/messenger.properties"),
+  protoSvc: Components.classes["@mozilla.org/uriloader/external-protocol-service;1"]
+                      .getService(Components.interfaces.nsIExternalProtocolService),
+
+  get loadingTabString() {
+    delete this.loadingTabString;
+    return this.loadingTabString = document.getElementById("bundle_messenger")
+                                           .getString("loadingTab");
+  },
+
+  modes: {
+    webSearchTab: {
+      type: "webSearchTab",
+      maxTabs: 10
+    }
+  },
+
+  openTab: function onTabOpened(aTab, aArgs) {
+    if (!"contentPane" in aArgs || !"engine" in aArgs || !"query" in aArgs)
+      throw("contentPage, engine, and query must be specified");
+
+    // First clone the page and set up the basics.
+    let clone = document.getElementById("webSearchTab").firstChild
+                        .cloneNode(true);
+
+    clone.setAttribute("id", "webSearchTab" + this.lastBrowserId);
+    clone.setAttribute("collapsed", false);
+
+    aTab.panel.appendChild(clone);
+
+    aTab.engines = clone.getElementsByClassName("engines")[0];
+    aTab.defaultButton = clone.getElementsByClassName("defaultButton")[0];
+
+    // Start setting up the browser.
+    aTab.browser = aTab.panel.getElementsByTagName("browser")[0];
+
+    // As we're opening this tab, showTab may not get called, so set
+    // the type according to if we're opening in background or not.
+    let background = ("background" in aArgs) && aArgs.background;
+    aTab.browser.setAttribute("type", background ? "content-targetable" :
+                                                   "content-primary");
+
+    aTab.browser.setAttribute("id", "webSearchTabBrowser" + this.lastBrowserId);
+
+    aTab.clickHandler = "clickHandler" in aArgs && aArgs.clickHandler ?
+                        aArgs.clickHandler :
+                        "specialTabs.defaultClickHandler(event);";
+    aTab.browser.setAttribute("onclick", aTab.clickHandler);
+
+    aTab.browser.addEventListener("DOMLinkAdded", DOMLinkHandler, false);
+    gPluginHandler.addEventListeners(aTab.browser);
+
+    // Now initialise the find bar.
+    aTab.findbar = aTab.panel.getElementsByTagName("findbar")[0];
+    aTab.findbar.setAttribute("browserid",
+                              "webSearchTabBrowser" + this.lastBrowserId);
+
+    // Default to reload being disabled.
+    aTab.reloadEnabled = false;
+
+    aTab.currentEngine = aArgs.engine;
+    aTab.query = aArgs.query;
+
+    for each (let engine in Services.search.getVisibleEngines()) {
+      let button = document.createElement("toolbarbutton");
+      button.setAttribute("type", "radio");
+      button.setAttribute("group", "engines");
+      button.setAttribute("image", engine.iconURI.spec);
+      button.setAttribute("tooltiptext", engine.name);
+      button.engine = engine;
+      if (aArgs.engine.name == engine.name)
+        button.setAttribute("checked", true);
+      aTab.engines.appendChild(button);
+    }
+
+    // Now set up the listeners.
+    this._setUpTitleListener(aTab);
+    this._setUpCloseWindowListener(aTab);
+    this._setUpBrowserListener(aTab);
+
+    // Now start loading the content.
+    aTab.title = this.loadingTabString;
+
+    this._setDefaultButtonState(aTab, aTab.currentEngine ==
+                                      Services.search.currentEngine);
+
+    // Set up onclick/oncommand listeners.
+    let self = this;
+    aTab.engines.addEventListener("command", function(event) {
+      if (event.target.localName != "toolbarbutton")
+        return;
+      self._doSearch(aTab, event.target.engine);
+      self._setDefaultButtonState(aTab, aTab.currentEngine ==
+                                        Services.search.currentEngine);
+    }, true);
+    aTab.defaultButton.addEventListener("click", function () {
+      Services.search.currentEngine = aTab.currentEngine;
+      self._setDefaultButtonState(aTab, true);
+    }, true);
+
+    aTab.browser.loadURIWithFlags(aArgs.contentPage, null, null, null,
+                                  aArgs.postData);
+
+    this.lastBrowserId++;
+  },
+
+  persistTab: function onPersistTab(aTab) {
+    if (aTab.browser.currentURI.spec == "about:blank")
+      return null;
+
+    let onClick = aTab.clickHandler;
+
+    return { tabURI: aTab.browser.currentURI.spec,
+             query: aTab.query,
+             engine: aTab.currentEngine.name,
+             clickHandler: onClick ? onClick : null,
+           };
+  },
+
+  restoreTab: function onRestoreTab(aTabmail, aPersistedState) {
+    let engine = Services.search.getEngineByName(aPersistedState.engine);
+    aTabmail.openTab("webSearchTab",
+                     { contentPage: aPersistedState.tabURI,
+                       clickHandler: aPersistedState.clickHandler,
+                       query: aPersistedState.query,
+                       engine: engine,
+                       background: true,
+                     });
+  },
+
+  siteClickHandler: function(aEvent) {
+    // Don't handle events that: a) aren't trusted, b) have already been
+    // handled or c) aren't left-click.
+    if (!aEvent.isTrusted || aEvent.getPreventDefault() || aEvent.button)
+      return true;
+
+    let href = hRefForClickEvent(aEvent, true);
+    if (href) {
+      let tab = document.getElementById("tabmail").selectedTab;
+      let preUri = tab.browser.currentURI;
+      let postUri = makeURI(href);
+
+      if (!this.protoSvc.isExposedProtocol(postUri.scheme) ||
+          postUri.schemeIs("http") || postUri.schemeIs("https")) {
+        if (!this._isInEngine(tab.currentEngine, preUri, postUri)) {
+          aEvent.preventDefault();
+          openLinkExternally(href);
+        }
+      }
+    }
+  },
+
+  supportsCommand: function supportsCommand(aCommand, aTab) {
+    switch (aCommand) {
+      case "cmd_goBackSearch":
+      case "cmd_goForwardSearch":
+        return true;
+      default:
+        return this.__proto__.supportsCommand(aCommand, aTab);
+    }
+  },
+
+  isCommandEnabled: function isCommandEnabled(aCommand, aTab) {
+    switch (aCommand) {
+      case "cmd_goBackSearch":
+        return aTab.browser.canGoBack;
+      case "cmd_goForwardSearch":
+        return aTab.browser.canGoForward;
+      default:
+        return this.__proto__.isCommandEnabled(aCommand, aTab);
+    }
+  },
+
+  doCommand: function doCommand(aCommand, aTab) {
+    switch (aCommand) {
+      case "cmd_goBackSearch":
+        aTab.browser.goBack();
+      case "cmd_goForwardSearch":
+        aTab.browser.goForward();
+      default:
+        this.__proto__.doCommand(aCommand, aTab);
+    }
+  },
+
+  _doSearch: function(aTab, engine) {
+    aTab.currentEngine = engine;
+    let submission = aTab.currentEngine.getSubmission(aTab.query);
+
+    aTab.browser.loadURIWithFlags(submission.uri.spec, null, null, null,
+                                  submission.postData);
+  },
+
+  _isInEngine: function(aEngine, aPreUri, aPostUri) {
+    switch (aEngine.name) {
+      case "Google":
+        return aPreUri.host == aPostUri.host &&
+               !/^\/url?/.test(aPostUri.path);
+      case "Yahoo":
+        return /search\.yahoo\.com$/.test(aPostUri.host) &&
+               !/^\/r\//.test(aPostUri.path);
+    }
+
+    return aPreUri.host == aPostUri.host;
+  },
+
+  _setDefaultButtonState: function setDefaultButtonState(aTab, isDefault) {
+    aTab.defaultButton.checked = isDefault;
+    let key = "websearch." + (isDefault ? "isDefault" : "setDefault");
+    aTab.defaultButton.tooltipText = this.bundle.GetStringFromName(key);
+  },
+
+  _setUpBrowserListener: function setUpBrowserListener(aTab) {
+    // Browser navigation (front/back) does not cause onDOMContentLoaded,
+    // so we have to use nsIWebProgressListener
+    this.progressListener = {
+      QueryInterface: XPCOMUtils.generateQI([
+        Components.interfaces.nsIWebProgressListener,
+        Components.interfaces.nsISupportsWeakReference,
+      ]),
+
+      onLocationChange: function(aProgress, aRequest, aURI) {
+        goUpdateCommand("cmd_goBackSearch");
+        goUpdateCommand("cmd_goForwardSearch");
+      },
+
+      onStateChange: function(aWebProgress, aRequest, aFlag, aStatus) {},
+      onProgressChange: function(aWebProgress, aRequest, curSelf, maxSelf,
+                                 curTot, maxTot) {},
+      onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {},
+      onSecurityChange: function(aWebProgress, aRequest, aState) {},
+    };
+
+    aTab.browser.addProgressListener(this.progressListener);
+
+    // Create a filter and hook it up to our browser
+    aTab.filter = Components.classes["@mozilla.org/appshell/component/browser-status-filter;1"]
+                            .createInstance(Components.interfaces.nsIWebProgress);
+
+    // Wire up a progress listener to the filter for this browser
+    aTab.progressListener = new tabProgressListener(aTab, false);
+
+    aTab.filter.addProgressListener(aTab.progressListener,
+                                    Components.interfaces.nsIWebProgress.NOTIFY_ALL);
+    aTab.browser.webProgress.addProgressListener(aTab.filter,
+                                                 Components.interfaces.nsIWebProgress.NOTIFY_ALL);
+  },
+};
new file mode 100644
--- /dev/null
+++ b/mail/base/content/webSearchTab.xul
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ***** BEGIN LICENSE BLOCK *****
+  -   Version: MPL 1.1/GPL 2.0/LGPL 2.1
+  -
+  - The contents of this file are subject to the Mozilla Public License Version
+  - 1.1 (the "License"); you may not use this file except in compliance with
+  - the License. You may obtain a copy of the License at
+  - http://www.mozilla.org/MPL/
+  -
+  - Software distributed under the License is distributed on an "AS IS" basis,
+  - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+  - for the specific language governing rights and limitations under the
+  - License.
+  -
+  - The Original Code is Mozilla Thunderbird.
+  -
+  - The Initial Developer of the Original Code is
+  -   Mozilla Foundation.
+  - Portions created by the Initial Developer are Copyright (C) 2010-2011
+  - the Initial Developer. All Rights Reserved.
+  -
+  - Contributor(s):
+  -   David Ascher <dascher@mozilla.com>
+  -   Jim Porter <squibblyflabbetydoo@gmail.com>
+  -
+  - Alternatively, the contents of this file may be used under the terms of
+  - either the GNU General Public License Version 2 or later (the "GPL"), or
+  - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+  - in which case the provisions of the GPL or the LGPL are applicable instead
+  - of those above. If you wish to allow use of your version of this file only
+  - under the terms of either the GPL or the LGPL, and not to allow others to
+  - use your version of this file under the terms of the MPL, indicate your
+  - decision by deleting the provisions above and replace them with the notice
+  - and other provisions required by the GPL or the LGPL. If you do not delete
+  - the provisions above, a recipient may use your version of this file under
+  - the terms of any one of the MPL, the GPL or the LGPL.
+  -
+  - ***** END LICENSE BLOCK ***** -->
+
+<?xml-stylesheet href="chrome://messenger/skin/webSearch.css" type="text/css"?>
+
+<overlay id="websearch-overlay"
+         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+  <script type="application/x-javascript"
+          src="chrome://messenger/content/webSearch.js"/>
+  <script type="application/x-javascript"
+          src="chrome://messenger/content/webSearchTab.js"/>
+
+  <commandset id="webSearchItems" commandupdater="true">
+    <command id="cmd_goBackSearch" oncommand="goDoCommand('cmd_goBackSearch')"/>
+    <command id="cmd_goForwardSearch" oncommand="goDoCommand('cmd_goForwardSearch')"/>
+  </commandset>
+
+
+  <!--We want to enable browser history, and at least the Go menu-->
+  <browser id="dummycontentbrowser" type="content" disablehistory="false"/>
+  <tabmail id="tabmail">
+    <vbox id="webSearchTab" collapsed="true">
+      <hbox flex="1">
+        <vbox class="navbar">
+          <vbox class="navbuttons">
+            <toolbarbutton class="back" command="cmd_goBackSearch"/>
+            <toolbarbutton class="forward" command="cmd_goForwardSearch"/>
+          </vbox>
+          <arrowscrollbox class="engines" orient="vertical"
+                          flex="1"/>
+          <button class="defaultButton" type="checkbox"/>
+        </vbox>
+        <browser id="dummycontentbrowser" type="content-targetable" flex="1"
+                 disablehistory="true" autocompletepopup="PopupAutoComplete"
+                 context="mailContext"/>
+        <findbar browserid="dummycontentbrowser"/>
+      </hbox>
+    </vbox>
+  </tabmail>
+</overlay>
--- a/mail/base/jar.mn
+++ b/mail/base/jar.mn
@@ -44,16 +44,19 @@ messenger.jar:
     content/messenger/SearchDialog.js               (content/SearchDialog.js)
 *   content/messenger/ABSearchDialog.xul            (content/ABSearchDialog.xul)
 *   content/messenger/ABSearchDialog.js             (content/ABSearchDialog.js)
 *   content/messenger/FilterListDialog.xul          (content/FilterListDialog.xul)
 *   content/messenger/FilterListDialog.js           (content/FilterListDialog.js)
 *   content/messenger/plugins.js                    (content/plugins.js)
     content/messenger/specialTabs.js                (content/specialTabs.js)
     content/messenger/specialTabs.xul               (content/specialTabs.xul)
+    content/messenger/webSearch.xml                 (content/webSearch.xml)
+    content/messenger/webSearchTab.xul              (content/webSearchTab.xul)
+    content/messenger/webSearchTab.js               (content/webSearchTab.js)
 *   content/messenger/subscribe.xul                 (content/subscribe.xul)
     content/messenger/subscribe.js                  (content/subscribe.js)
 *   content/messenger/aboutDialog.xul               (content/aboutDialog.xul)
 *   content/messenger/aboutDialog.js                (content/aboutDialog.js)
 *   content/messenger/aboutRights.xhtml             (content/aboutRights.xhtml)
     content/messenger/featureConfigurator.xhtml     (content/featureConfigurator.xhtml)
     content/messenger/featureConfigurator.js        (content/featureConfigurator.js)
     content/messenger/featureConfigurator.css       (content/featureConfigurator.css)
--- a/mail/base/modules/Makefile.in
+++ b/mail/base/modules/Makefile.in
@@ -50,11 +50,12 @@ EXTRA_JS_MODULES = \
   dbViewWrapper.js \
   mailViewManager.js \
   quickFilterManager.js \
   searchSpec.js \
   MsgHdrSyntheticView.js \
   sessionStoreManager.js \
   mailMigrator.js \
   mailInstrumentation.js \
+  glodaWebSearch.js \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/mail/base/modules/glodaWebSearch.js
@@ -0,0 +1,110 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ *   Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Thunderbird.
+ *
+ * The Initial Developer of the Original Code is
+ *   Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2010-2011
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   David Ascher <dascher@mozilla.com>
+ *   Jim Porter <squibblyflabbetydoo@gmail.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+const EXPORTED_SYMBOLS = ["GlodaWebSearch"];
+
+const Cc = Components.classes;
+const Ci = Components.interfaces;
+const Cu = Components.utils;
+
+Cu.import("resource://gre/modules/Services.jsm");
+Cu.import("resource://gre/modules/XPCOMUtils.jsm");
+
+function ResultRowSingle(term) {
+  this.term = term;
+  this.typeForStyle = "websearch";
+  this.nounDef = null;
+}
+
+ResultRowSingle.prototype = {
+  multi: false,
+  fullText: false,
+};
+
+function GlodaWebSearchCompleter() { }
+
+GlodaWebSearchCompleter.prototype = {
+  complete: function GlodaWebSearchCompleter_complete(aResult, aString) {
+    aResult.addRows([new ResultRowSingle(aString)]);
+    // We have nothing pending.
+    return false;
+  },
+  onItemsAdded: function(aItems, aCollection) {
+  },
+  onItemsModified: function(aItems, aCollection) {
+  },
+  onItemsRemoved: function(aItems, aCollection) {
+  },
+  onQueryCompleted: function(aCollection) {
+  }
+};
+
+var GlodaWebSearch = {
+  bundle: Services.strings.createBundle(
+    "chrome://messenger/locale/glodaComplete.properties"),
+
+  _initialized: false,
+
+  onLoad: function() {
+    if (this._initialized)
+      return;
+    this._initialized = true;
+
+    Services.obs.addObserver(this, "autocomplete-did-enter-text", false);
+    this.glodaCompleter = Cc["@mozilla.org/autocomplete/search;1?name=gloda"]
+                            .getService().wrappedJSObject;
+
+    // Add us as the second completer.
+    this.glodaCompleter.completers.splice(1, 0, new GlodaWebSearchCompleter());
+  },
+
+  observe: function(aSubject, aTopic, aData) {
+    if (aTopic == "autocomplete-did-enter-text") {
+      let curResult = this.glodaCompleter.curResult;
+      if (!curResult)
+        return; // autocomplete didn't even finish.
+
+      let row = curResult.getObjectAt(aSubject.popup.selectedIndex);
+      if (!row || (row.typeForStyle != "websearch"))
+        return; // It's not our row.
+
+      let ownerWindow = aSubject.ownerDocument.defaultView;
+      ownerWindow.openSearchTab(aSubject.state.string);
+    }
+  },
+};
--- a/mail/components/Makefile.in
+++ b/mail/components/Makefile.in
@@ -60,16 +60,17 @@ endif
 
 DIRS += build
 
 EXTRA_COMPONENTS = \
 	nsMailDefaultHandler.js \
 	mailContentHandler.js \
 	aboutRedirector.js \
 	mailGlue.js \
+	webSearchProvider.js \
 	mailComponents.manifest \
 	$(NULL)
 
 EXTRA_JS_MODULES = \
   appIdleManager.js \
   $(NULL)
 
 
--- a/mail/components/mailComponents.manifest
+++ b/mail/components/mailComponents.manifest
@@ -11,8 +11,12 @@ category command-line-validator b-defaul
 
 component {1c73f03a-b817-4640-b984-18c3478a9ae3} mailContentHandler.js
 contract @mozilla.org/uriloader/content-handler;1?type=text/html {1c73f03a-b817-4640-b984-18c3478a9ae3}
 contract @mozilla.org/uriloader/content-handler;1?type=text/plain {1c73f03a-b817-4640-b984-18c3478a9ae3}
 
 component {eb239c82-fac9-431e-98d7-11cacd0f71b8} mailGlue.js
 contract @mozilla.org/mail/mailglue;1 {eb239c82-fac9-431e-98d7-11cacd0f71b8}
 category app-startup MailGlue service,@mozilla.org/mail/mailglue;1
+
+component {76a80bff-8c3f-4b78-ad2c-80099e35375d} webSearchProvider.js
+contract @mozilla.org/mail/web-search-provider;1 {76a80bff-8c3f-4b78-ad2c-80099e35375d}
+category xpcom-directory-providers web-search-directory-provider service,@mozilla.org/mail/web-search-provider;1
new file mode 100644
--- /dev/null
+++ b/mail/components/webSearchProvider.js
@@ -0,0 +1,174 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Thunderbird.
+ *
+ * The Initial Developer of the Original Code is Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2011
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Jim Porter <squibblyflabbetydoo@gmail.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+const NS_APP_SEARCH_DIR_LIST = "SrchPluginsDL";
+const NS_APP_USER_SEARCH_DIR = "UsrSrchPlugns";
+const NS_APP_SEARCH_DIR = "SrchPlugns";
+const NS_XPCOM_CURRENT_PROCESS_DIR = "XCurProdD";
+const XRE_EXTENSIONS_DIR_LIST = "XREExtDL";
+
+const Cc = Components.classes;
+const Ci = Components.interfaces;
+
+Cu.import("resource://gre/modules/XPCOMUtils.jsm");
+Cu.import("resource://gre/modules/Services.jsm");
+
+function AppendingEnumerator(base, append) {
+  this.base = base;
+  this.append = append;
+}
+
+AppendingEnumerator.prototype = {
+  QueryInterface: XPCOMUtils.generateQI([Ci.nsISimpleEnumerator]),
+
+  hasMoreElements: function() {
+    return this.base.hasMoreElements();
+  },
+
+  getNext: function() {
+    let file = this.base.getNext().QueryInterface(Ci.nsIFile);
+    file.append(this.append);
+    return file;
+  },
+};
+
+function UnionEnumerator(first, second) {
+  this.first = first;
+  this.second = second;
+}
+
+UnionEnumerator.prototype = {
+  QueryInterface: XPCOMUtils.generateQI([Ci.nsISimpleEnumerator]),
+
+  hasMoreElements: function() {
+    return this.first.hasMoreElements() ||
+           this.second.hasMoreElements();
+  },
+
+  getNext: function() {
+    if (this.first.hasMoreElements())
+      return this.first.getNext();
+    else
+      return this.second.getNext();
+  },
+};
+
+function WebSearchProvider() {}
+WebSearchProvider.prototype = {
+  classDescription: "Web Search Provider",
+  classID: Components.ID("{76a80bff-8c3f-4b78-ad2c-80099e35375d}"),
+  QueryInterface: XPCOMUtils.generateQI([Ci.nsIDirectoryServiceProvider,
+                                         Ci.nsIDirectoryServiceProvider2]),
+
+  getFile: function() {
+    throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
+  },
+
+  getFiles: function(prop) {
+    if (prop != NS_APP_SEARCH_DIR_LIST)
+      return null;
+
+    /**
+     * We want to preserve the following order, since the search service loads
+     * engines in first-loaded-wins order.
+     *   - extension search plugin locations (prepended below using
+     *     UnionEnumerator)
+     *   - distro search plugin locations
+     *   - user search plugin locations (profile)
+     *   - app search plugin location (shipped engines)
+     */
+    let baseFiles = Cc["@mozilla.org/array;1"]
+                      .createInstance(Ci.nsIMutableArray);
+
+    this.appendDistroSearchDirs(baseFiles);
+    this.appendFileKey(NS_APP_USER_SEARCH_DIR, baseFiles);
+    this.appendFileKey(NS_APP_SEARCH_DIR, baseFiles);
+
+    let baseEnum = baseFiles.enumerate();
+
+    let list = Services.dirsvc.get(XRE_EXTENSIONS_DIR_LIST,
+                                   Ci.nsISimpleEnumerator);
+    let extEnum = new AppendingEnumerator(list, "searchplugins");
+    return new UnionEnumerator(extEnum, baseEnum);
+  },
+
+  appendDistroSearchDirs: function(array) {
+    try {
+      let searchPlugins = Services.dirsvc.get(NS_XPCOM_CURRENT_PROCESS_DIR,
+                                              Ci.nsIFile);
+      searchPlugins.append("distribution");
+      searchPlugins.append("searchplugins");
+
+      if (!searchPlugins.exists())
+        return;
+
+      let commonPlugins = searchPlugins.clone();
+      commonPlugins.append("common");
+      if (commonPlugins.exists())
+        array.appendElement(commonPlugins, false);
+
+      let localePlugins = searchPlugins.clone();
+      localePlugins.append("locale");
+
+      let locale = Services.prefs.getCharPref("general.useragent.locale");
+      let curLocalePlugins = localePlugins.clone();
+      curLocalePlugins.append(locale);
+      if (curLocalePlugins.exists()) {
+        array.appendElement(curLocalePlugins, false);
+        return;
+      }
+
+      let defLocale = Services.prefs.getCharPref(
+        "distribution.searchplugins.defaultLocale");
+      let defLocalePlugins = localePlugins.clone();
+      defLocalePlugins.append(defLocale);
+      if (defLocalePlugins.exists())
+        array.appendElement(defLocalePlugins, false);
+    }
+    catch(e) {}
+  },
+
+  appendFileKey: function(key, array) {
+    try {
+      let file = Services.dirsvc.get(key, Ci.nsIFile);
+      if (!file.exists())
+        array.appendElement(file, false);
+    }
+    catch(e) {}
+  },
+};
+
+const NSGetFactory = XPCOMUtils.generateNSGetFactory([WebSearchProvider]);
--- a/mail/installer/package-manifest.in
+++ b/mail/installer/package-manifest.in
@@ -23,16 +23,17 @@
 @APPNAME@/Contents/Resources/
 @APPNAME@/Contents/Library/
 #endif
 
 [@AB_CD@]
 @BINPATH@/chrome/@AB_CD@@JAREXT@
 @BINPATH@/chrome/@AB_CD@.manifest
 @BINPATH@/@PREF_DIR@/all-l10n.js
+@BINPATH@/searchplugins/*
 @BINPATH@/dictionaries/*
 @BINPATH@/hyphenation/*
 #ifdef XP_WIN32
 @BINPATH@/uninstall/helper.exe
 #endif
 @BINPATH@/update.locale
 @BINPATH@/updater.ini
 
@@ -207,16 +208,17 @@
 @BINPATH@/MapiProxy.dll
 @BINPATH@/mozMapi32.dll
 @BINPATH@/components/mapihook.xpt
 #endif
 @BINPATH@/components/mailComponents.manifest
 @BINPATH@/components/mailContentHandler.js
 @BINPATH@/components/mailGlue.js
 @BINPATH@/components/nsMailDefaultHandler.js
+@BINPATH@/components/webSearchProvider.js
 #ifndef XP_OS2
 @BINPATH@/components/nsSetDefaultMail.js
 @BINPATH@/components/shell.manifest
 #endif
 @BINPATH@/components/offlineStartup.js
 @BINPATH@/components/offlineStartup.manifest
 @BINPATH@/components/steelApplication.js
 @BINPATH@/components/steelApplication.manifest
--- a/mail/locales/Makefile.in
+++ b/mail/locales/Makefile.in
@@ -39,16 +39,19 @@ topsrcdir       = @top_srcdir@
 srcdir          = @srcdir@
 VPATH           = @srcdir@
 relativesrcdir  = mail/locales
 
 include $(DEPTH)/config/autoconf.mk
 
 include $(topsrcdir)/config/config.mk
 
+vpath %.xml @srcdir@/en-US/searchplugins
+vpath %.xml $(LOCALE_SRCDIR)/searchplugins
+
 _ABS_SRCDIR := $(call core_abspath,$(topsrcdir))
 
 SUBMAKEFILES += \
 	$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/Makefile \
 	$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales/Makefile \
 	$(NULL)
 
 # This makefile uses variable overrides from the libs-% target to
@@ -91,16 +94,24 @@ include $(topsrcdir)/config/rules.mk
 
 include $(topsrcdir)/mozilla/toolkit/locales/l10n.mk
 
 $(STAGEDIST): $(DIST)/branding
 
 $(DIST)/branding:
 	$(NSINSTALL) -D $@
 
+SEARCH_PLUGINS = $(shell cat $(call MERGE_FILE,/searchplugins/list.txt))
+
+libs:: $(addsuffix .xml,$(SEARCH_PLUGINS))
+	$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/searchplugins
+
+install:: $(addsuffix .xml,$(SEARCH_PLUGINS))
+	$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/searchplugins
+
 libs-%:
 	$(NSINSTALL) -D $(DIST)/install
 	@$(MAKE) -C ../../mozilla/toolkit/locales libs-$* BOTH_MANIFESTS=1
 	@$(MAKE) -C ../../editor/ui/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
 	@$(MAKE) -C ../../mozilla/extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
 	@$(MAKE) -C ../../mozilla/intl/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
 	@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref BOTH_MANIFESTS=1
 	@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
@@ -134,17 +145,18 @@ STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MO
 else
 STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_DIR)
 endif
 
 clobber-zip:
 	$(RM) $(STAGEDIST)/chrome/$(AB_CD).jar \
 	  $(STAGEDIST)/chrome/$(AB_CD).manifest \
 	  $(STAGEDIST)/defaults/pref/all-l10n.js
-	$(RM) -r $(STAGEDIST)/dictionaries \
+	$(RM) -rf $(STAGEDIST)/searchplugins \
+	  $(STAGEDIST)/dictionaries \
 	  $(STAGEDIST)/hyphenation/$(AB_CD) \
 	  $(STAGEDIST)/isp/$(AB_CD) \
 	  $(STAGEDIST)/chrome/$(AB_CD)
 
 langpack: langpack-$(AB_CD)
 
 # This is a generic target that will make a langpack, repack ZIP (+tarball)
 # builds, and repack and installer if applicable. It is called from the
--- a/mail/locales/en-US/chrome/messenger-region/region.properties
+++ b/mail/locales/en-US/chrome/messenger-region/region.properties
@@ -1,8 +1,16 @@
+# Default search engine
+browser.search.defaultenginename=Google
+
+# Search engine order (order displayed in the search bar dropdown)s
+browser.search.order.1=Google
+browser.search.order.2=Yahoo
+browser.search.order.3=Bing
+
 # To make mapit buttons to disappear in the addressbook, specify empty string.  For example:
 # mail.addr_book.mapit_url.format=
 # The format for "mail.addr_book.mapit_url.format" is:
 # @A1 == address, part 1
 # @A2 == address, part 2
 # @CI == city
 # @ST == state
 # @ZI == zip code
--- a/mail/locales/en-US/chrome/messenger/glodaComplete.properties
+++ b/mail/locales/en-US/chrome/messenger/glodaComplete.properties
@@ -46,8 +46,18 @@ glodaComplete.messagesTagged.label=Messa
 glodaComplete.messagesMentioning.label=Messages mentioning: #1
 
 # LOCALIZATION NOTE (glodaComplete.messagesWithMany.label): The label used
 #  in the autocomplete widget to refer to a search for all messages mentioning
 #  a set of words, or a phrase containing multiple words (e.g. "red pepper")
 #  We use the same words in en-US, but maybe that's not always true.
 glodaComplete.messagesMentioningMany.label=Messages mentioning: #1
 
+# LOCALIZATION NOTE (glodaComplete.webSearch.label): The label used in the
+#  autocomplete widget to refer to a search on the web for a short string
+#  containing at most 15 characters. #1 is the string to search for.
+glodaComplete.webSearch.label=Search the web for: #1
+
+# LOCALIZATION NOTE (glodaComplete.webSearch.label.truncated): The label used in
+#  the autocomplete widget to refer to a search on the web for a short string
+#  containing more than 15 characters. #1 is the string to search for, truncated
+#  to 15 characters.
+glodaComplete.webSearch.label.truncated=Search the web for: #1…
--- a/mail/locales/en-US/chrome/messenger/messenger.properties
+++ b/mail/locales/en-US/chrome/messenger/messenger.properties
@@ -698,16 +698,19 @@ update.openUpdateUI.applyButton.label=Apply Update…
 update.openUpdateUI.applyButton.accesskey=A
 update.restart.applyButton.label=Apply Update
 update.restart.applyButton.accesskey=A
 update.openUpdateUI.upgradeButton.label=Upgrade Now…
 update.openUpdateUI.upgradeButton.accesskey=U
 update.restart.upgradeButton.label=Upgrade Now
 update.restart.upgradeButton.accesskey=U
 
+websearch.setDefault=Set this search engine as the default
+websearch.isDefault=This search engine is currently the default
+
 # missing plugin installer
 missingpluginsMessage.title=Additional plugins are required to display all the media on this page.
 missingpluginsMessage.button.label=Install Missing Plugins…
 missingpluginsMessage.button.accesskey=I
 outdatedpluginsMessage.title=Some plugins used by this page are out of date.
 outdatedpluginsMessage.updateButton.label=Update Plugins…
 outdatedpluginsMessage.updateButton.accesskey=U
 blockedpluginsMessage.title=Some plugins required by this page have been blocked for your protection.
new file mode 100644
--- /dev/null
+++ b/mail/locales/en-US/searchplugins/amazondotcom.xml
@@ -0,0 +1,11 @@
+<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
+<ShortName>Amazon.com</ShortName>
+<Description>Amazon.com Search</Description>
+<InputEncoding>ISO-8859-1</InputEncoding>
+<Image width="16" height="16">data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHgSURBVHjalFM9TNtQEP4cB7PwM1RITUXIgsRaYEEVEyKZwhiyZAQyd0BhpFOlIjoBqhjSqVQMoVMLLAjEwECCQJkSkBqJYDOAFOMKFSf28d7DTUxiUDnp/Pzeu/vuu7t3ICKF6SLTMv2/lB0fRWKfjwDm4JJisYh0Oo3fpZLYT0SjSCQS8JAFMADNDZ3NZsnf1taiqVTKi4nGASruk5lkkmTmMB6JUKFQqO+DfX1eABWeQoVR6f7HSdM0obqu48Yw8G1tDT82NsRd1TSbU9BbGPCog8PDj+jLzurFoAVgMh4XxoNDQ6SqKi0tL9eBvAB8zZwymYxYY7EYAoEA8vm82BNTg6XUIs0MeGTZoR1mhXSnwNl4pmAbjU7mcjkKhkL1ynMnntZ4OEw3VyrV8utk7s5TdW++0QXz+1i3P7IK36t+PCfVn1OQOoOA0gXr5DPak+cPXbBK+/T3S69AtY3LJ98vZ1or/iLr+pTuvr59/A6s003UdqZFJF/PCKQ3o5CUznoBST2AfbEF/9iqYEDaIfwj73VJPEfgNTe0tWNYR0uwy9uOW0OkrgHI7z5ADo2C7v48nLV3XHKAT+x/1m1sX58xsBxg8rZJrDYD8DHHp4aJj/MK09sXjPOt46PcCzAACXY8/u34wN0AAAAASUVORK5CYII=</Image>
+<Url type="text/html" method="GET" template="http://www.amazon.com/exec/obidos/external-search/">
+  <Param name="field-keywords" value="{searchTerms}"/>
+  <Param name="mode" value="blended"/>
+</Url>
+<SearchForm>http://www.amazon.com/</SearchForm>
+</SearchPlugin>
new file mode 100644
--- /dev/null
+++ b/mail/locales/en-US/searchplugins/aol-web-search.xml
@@ -0,0 +1,10 @@
+<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
+<os:ShortName>AOL Web Search</os:ShortName>
+<os:Description>The AOL Search engine delivers great web search results, enhanced by Google, plus relevant multimedia results delivered on a single page-so you can search less and discover more.</os:Description>
+<os:InputEncoding>UTF-8</os:InputEncoding>
+<os:Image width="16" height="16">data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%06bKGD%00%FF%00%FF%00%FF%A0%BD%A7%93%00%00%00%09pHYs%00%00%00H%00%00%00H%00F%C9k%3E%00%00%00%FAIDAT8%CB%9D%D3%B1q%C2%40%10%85%E1%0F%8F%0B%A0%04%97%00%1D%40%05%C6%01%B9%95*1%AA%C0C%05%E0%84%D4%E4%0A%0C%15H%EE%40%1D%98%12%D4%81%1D%E84%C8B%60%C9%2F9%AD%EE%EE%9F%DD%B7%7B%23%B0%DC%7D%A3D%22%8D%F7%06h%D4%00%D4*%02(%EF%03%B8%EB%F87Af%B9%7B%EF%03%B8o%C59%DE%A4%F1%E1%3F%25%EC%91%60%83%87%B0%FF%89m%F8%5Et%F9S%032%3C%E1%0B%E3%D6%99%02s%7C%848%91%C6E%1B0%C1%0B%9E%AFd%9A%E0%D4%80l%B1%96%C6eebE%9C%DC(%F51dRk%15%B2%FD%D5%85%B1a*%CF%80%AA%84%FC%C6%E1%23f%8Dx%8D)%E76n%10aq%C5%C4%03%B2%B0%26%D2%F8To%D6%80Y0q%8AW%97m%1C%23%EA%9A%CE%E6%20%AD%82%91%5D%83T%AA%BAp%A1%AE%B7Pk%2F%8D%A3%BF%9C%ECz%0B9%E6%7D.7K(%C3%3A%F89%FF%00_%82G%C3%D5%0E(%3E%00%00%00%00IEND%AEB%60%82</os:Image>
+<SearchForm>http://search.aol.com</SearchForm>
+<os:Url type="text/html" method="GET" template="http://search.aol.com/aol/search">
+  <os:Param name="query" value="{searchTerms}"/>
+</os:Url>
+</SearchPlugin>
new file mode 100644
--- /dev/null
+++ b/mail/locales/en-US/searchplugins/bing.xml
@@ -0,0 +1,17 @@
+<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
+    <ShortName>Bing</ShortName>
+    <Description>Bing. Search by Microsoft.</Description>
+    <InputEncoding>UTF-8</InputEncoding>
+    <Image width="16" height="16" type="image/x-icon">data:image/x-icon;base64,AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAAAAAABMLAAATCwAAAAAAAAAAAAAVpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8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C5W</Image>
+    <Url type="application/x-suggestions+json" template="http://api.bing.com/osjson.aspx">
+        <Param name="query" value="{searchTerms}"/>
+        <Param name="form" value="OSDJAS"/>
+    </Url>
+    <Url type="text/html" method="GET" template="http://www.bing.com/search">
+        <Param name="q" value="{searchTerms}"/>
+    </Url>
+    <Url type="application/x-moz-keywordsearch" method="GET" template="http://www.bing.com/search">
+        <Param name="q" value="{searchTerms}"/>
+    </Url>
+    <SearchForm>http://www.bing.com/search</SearchForm>
+</SearchPlugin>
new file mode 100644
--- /dev/null
+++ b/mail/locales/en-US/searchplugins/eBay.xml
@@ -0,0 +1,10 @@
+<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
+<ShortName>eBay</ShortName>
+<Description>eBay - Online auctions</Description>
+<InputEncoding>ISO-8859-1</InputEncoding>
+<Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAAAAEACABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAADAAAAA/wAAAABAAABAQAAAgEAAAMBAAAD/QAAAAIAAAECAAACAgAAAwIAAAP+AAAAAwAAAQMAAAIDAAADAwAAA/8AAAAD/AABA/wAAgP8AAMD/AAD//wAAAABAAEAAQACAAEAAwABAAP8AQAAAQEAAQEBAAIBAQADAQEAA/0BAAACAQABAgEAAgIBAAMCAQAD/gEAAAMBAAEDAQACAwEAAwMBAAP/AQAAA/0AAQP9AAID/QADA/0AA//9AAAAAgABAAIAAgACAAMAAgAD/AIAAAECAAEBAgACAQIAAwECAAP9AgAAAgIAAQICAAICAgADAgIAA/4CAAADAgABAwIAAgMCAAMDAgAD/wIAAAP+AAED/gACA/4AAwP+AAP//gAAAAMAAQADAAIAAwADAAMAA/wDAAABAwABAQMAAgEDAAMBAwAD/QMAAAIDAAECAwACAgMAAwIDAAP+AwAAAwMAAQMDAAIDAwADAwMAA/8DAAAD/wABA/8AAgP/AAMD/wAD//8AAAAD/AEAA/w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8fHx8HBx8b29vCnwPCnwAAAB8fBwcfHx8EBB8Dwp8AAAAAHx8fHwAfHx8AHx8fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAD//wAA//8AAP//AACAAwAAAAMAAAADAAAAAQAAAAAAAAAAAACAAAAA4AAAAPCIAAD//wAA//8AAP//AAA=</Image>
+<Url type="text/html" method="GET" template="http://rover.ebay.com/rover/1/711-47294-18009-3/4">
+  <Param name="satitle" value="{searchTerms}"/>
+</Url>
+<SearchForm>http://search.ebay.com/</SearchForm>
+</SearchPlugin>
new file mode 100644
--- /dev/null
+++ b/mail/locales/en-US/searchplugins/google.xml
@@ -0,0 +1,14 @@
+<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
+<ShortName>Google</ShortName>
+<Description>Google Search</Description>
+<InputEncoding>UTF-8</InputEncoding>
+<Image width="16" height="16">data:image/png;base64,AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADs9Pt8xetPtu9FsfFNtu%2BTzvb2%2B%2Fne4dFJeBw0egA%2FfAJAfAA8ewBBegAAAAD%2B%2FPtft98Mp%2BwWsfAVsvEbs%2FQeqvF8xO7%2F%2F%2F63yqkxdgM7gwE%2FggM%2BfQA%2BegBDeQDe7PIbotgQufcMufEPtfIPsvAbs%2FQvq%2Bfz%2Bf%2F%2B%2B%2FZKhR05hgBBhQI8hgBAgAI9ewD0%2B%2Fg3pswAtO8Cxf4Kw%2FsJvvYAqupKsNv%2B%2Fv7%2F%2FP5VkSU0iQA7jQA9hgBDgQU%2BfQH%2F%2Ff%2FQ6fM4sM4KsN8AteMCruIqqdbZ7PH8%2Fv%2Fg6Nc%2Fhg05kAA8jAM9iQI%2BhQA%2BgQDQu6b97uv%2F%2F%2F7V8Pqw3eiWz97q8%2Ff%2F%2F%2F%2F7%2FPptpkkqjQE4kwA7kAA5iwI8iAA8hQCOSSKdXjiyflbAkG7u2s%2F%2B%2F%2F39%2F%2F7r8utrqEYtjQE8lgA7kwA7kwA9jwA9igA9hACiWSekVRyeSgiYSBHx6N%2F%2B%2Fv7k7OFRmiYtlAA5lwI7lwI4lAA7kgI9jwE9iwI4iQCoVhWcTxCmb0K%2BooT8%2Fv%2F7%2F%2F%2FJ2r8fdwI1mwA3mQA3mgA8lAE8lAE4jwA9iwE%2BhwGfXifWvqz%2B%2Ff%2F58u%2Fev6Dt4tr%2B%2F%2F2ZuIUsggA7mgM6mAM3lgA5lgA6kQE%2FkwBChwHt4dv%2F%2F%2F728ei1bCi7VAC5XQ7kz7n%2F%2F%2F6bsZkgcB03lQA9lgM7kwA2iQktZToPK4r9%2F%2F%2F9%2F%2F%2FSqYK5UwDKZAS9WALIkFn%2B%2F%2F3%2F%2BP8oKccGGcIRJrERILYFEMwAAuEAAdX%2F%2Ff7%2F%2FP%2B%2BfDvGXQLIZgLEWgLOjlf7%2F%2F%2F%2F%2F%2F9QU90EAPQAAf8DAP0AAfMAAOUDAtr%2F%2F%2F%2F7%2B%2Fu2bCTIYwDPZgDBWQDSr4P%2F%2Fv%2F%2F%2FP5GRuABAPkAA%2FwBAfkDAPAAAesAAN%2F%2F%2B%2Fz%2F%2F%2F64g1C5VwDMYwK8Yg7y5tz8%2Fv%2FV1PYKDOcAAP0DAf4AAf0AAfYEAOwAAuAAAAD%2F%2FPvi28ymXyChTATRrIb8%2F%2F3v8fk6P8MAAdUCAvoAAP0CAP0AAfYAAO4AAACAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQAA</Image>
+<Url type="application/x-suggestions+json" method="GET" template="http://suggestqueries.google.com/complete/search?output=firefox&amp;hl={moz:locale}&amp;q={searchTerms}"/>
+<Url type="text/html" method="GET" template="http://www.google.com/search">
+  <Param name="q" value="{searchTerms}"/>
+  <Param name="ie" value="utf-8"/>
+  <Param name="oe" value="utf-8"/>
+  <Param name="aq" value="t"/>
+</Url>
+<SearchForm>http://www.google.com</SearchForm>
+</SearchPlugin>
new file mode 100644
--- /dev/null
+++ b/mail/locales/en-US/searchplugins/list.txt
@@ -0,0 +1,8 @@
+amazondotcom
+aol-web-search
+bing
+eBay
+google
+twitter
+wikipedia
+yahoo
new file mode 100644
--- /dev/null
+++ b/mail/locales/en-US/searchplugins/twitter.xml
@@ -0,0 +1,10 @@
+<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
+<ShortName>Twitter Search</ShortName>
+<Description>Realtime Twitter Search</Description>
+<InputEncoding>UTF-8</InputEncoding>
+<Image width="16" height="16">data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%20%00%00%00%20%08%06%00%00%00szz%F4%00%00%00%19tEXtSoftware%00Adobe%20ImageReadyq%C9e%3C%00%00%06%60IDATx%DA%ACWMLSY%14%BE%F7%F5%97%B6%96%96%16P%84q%02H%A0%01%85%08%26%C4%18%C9D%60%D8L2%0Bfm2%89%86%85%3B%E2l%5D%BA%9Ad%E2%CEY%B8%18c2a%8C%B3%10%893%02e%98d%F0%07%22c%D0%22%88%C4%01K)%D0%3F%FA%FF%DE%BB%F3%DD%F7Z%82%B5%16%A8%DE%E4%B6%AF%AF%EF%DD%F3%DDs%BEs%BEs)c%8C%F0A)%25%D9q%F9%F2eC%7F%7F%7F%1D.%BF%12%04%A1%F30F%22%91%10%A3%D1%E8%92%C1%60ponn%FE%3D99%E9%BDz%F5%AAL%3Ea(%B6%F9G%16%04%1F%83%83%83%E6%B1%B1%B1oVVV%86%E2%F1%F8%7F%C9d2%22%8Ab%2C%95J%C5p%1D%8A%C5b%9E%85%85%85%1F%EF%DF%BF%DF%06%90%9A%CF%0A%00%3B%D2%3Fy%F2%A4okkk%0C%06%A3%B8%CF%D22c1%91%B1%B8%C4%98%84kY%96%19%3C%B1%B6%B8%B8%F83F%13w%DE%E7%02%40%1F%3E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FF_%80%01%00%94%13%9D%26%E9%81%03P%00%00%00%00IEND%AEB%60%82</Image>
+<Url type="text/html" method="get"
+     template="http://search.twitter.com/search?q={searchTerms}"/>
+<SearchForm>http://search.twitter.com/</SearchForm>
+</SearchPlugin>
+
new file mode 100644
--- /dev/null
+++ b/mail/locales/en-US/searchplugins/wikipedia.xml
@@ -0,0 +1,14 @@
+<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
+<ShortName>Wikipedia (en)</ShortName>
+<Description>Wikipedia, the free encyclopedia</Description>
+<InputEncoding>UTF-8</InputEncoding>
+<Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAEAgQAhIOEAMjHyABIR0gA6ejpAGlqaQCpqKkAKCgoAPz9%2FAAZGBkAmJiYANjZ2ABXWFcAent6ALm6uQA8OjwAiIiIiIiIiIiIiI4oiL6IiIiIgzuIV4iIiIhndo53KIiIiB%2FWvXoYiIiIfEZfWBSIiIEGi%2FfoqoiIgzuL84i9iIjpGIoMiEHoiMkos3FojmiLlUipYliEWIF%2BiDe0GoRa7D6GPbjcu1yIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</Image>
+<Url type="application/x-suggestions+json" method="GET" template="http://en.wikipedia.org/w/api.php">
+  <Param name="action" value="opensearch"/>
+  <Param name="search" value="{searchTerms}"/>
+</Url>
+<Url type="text/html" method="GET" template="http://en.wikipedia.org/wiki/Special:Search">
+  <Param name="search" value="{searchTerms}"/>
+</Url>
+<SearchForm>http://en.wikipedia.org/wiki/Special:Search</SearchForm>
+</SearchPlugin>
new file mode 100644
--- /dev/null
+++ b/mail/locales/en-US/searchplugins/yahoo.xml
@@ -0,0 +1,13 @@
+<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
+<ShortName>Yahoo</ShortName>
+<Description>Yahoo Search</Description>
+<InputEncoding>UTF-8</InputEncoding>
+<Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbgJqAIoCdgCaAnoAnhKCAKYijgCuLpIAskKeALpSpgC+Yq4AzHy8ANqezgDmvt4A7tLqAPz5+wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKlRFIoABWAKERERE6ADcKMzzu2hOgAAhERK8REWCWBERE36ERMHMEREvo6iEgY6hEn6Pu0mAzqkz/xjMzoDNwpERERDoAMzAKlERIoAAzMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAA//8AAP//AADAOQAAgBkAAAAPAAAACQAAAAkAAAAIAAAACAAAAAgAAIAYAADAOAAA//8AAP//AAD//wAA</Image>
+<Url type="application/x-suggestions+json" method="GET"
+     template="http://ff.search.yahoo.com/gossip?output=fxjson&amp;command={searchTerms}" />
+<Url type="text/html" method="GET" template="http://search.yahoo.com/search">
+  <Param name="p" value="{searchTerms}"/>
+  <Param name="ei" value="UTF-8"/>
+</Url>
+<SearchForm>http://search.yahoo.com/</SearchForm>
+</SearchPlugin>
--- a/mail/locales/filter.py
+++ b/mail/locales/filter.py
@@ -11,9 +11,16 @@ def test(mod, path, entity = None):
     if entity.startswith('reloadPlugin.'): return False
     if entity.startswith('report.'): return False
 
   # ignore MOZ_LANGPACK_CONTRIBUTORS
   if mod == "mail" and path == "defines.inc" and \
      entity == "MOZ_LANGPACK_CONTRIBUTORS":
     return False
   # ignore dictionaries
-  return not mod == "extensions/spellcheck"
+  if mod == "extensions/spellcheck":
+    return False
+
+  if path == "chrome/messenger-region/region.properties":
+    return not (re.match(r"browser\.search\.order\.[1-9]", entity)) 
+
+  # ignore search plugins
+  return not (re.match(r"searchplugins\/.+\.xml", path))
--- a/mail/themes/gnomestripe/jar.mn
+++ b/mail/themes/gnomestripe/jar.mn
@@ -12,16 +12,17 @@ classic.jar:
   skin/classic/messenger/accountCentral.css                   (mail/accountCentral.css)
   skin/classic/messenger/accountCreation.css                  (mail/accountCreation.css)
   skin/classic/messenger/accountManage.css                    (mail/accountManage.css)
   skin/classic/messenger/accountWizard.css                    (mail/accountWizard.css)
   skin/classic/messenger/section_collapsed.png                (mail/section_collapsed.png)
   skin/classic/messenger/section_expanded.png                 (mail/section_expanded.png)
   skin/classic/messenger/messageHeader.css                    (mail/messageHeader.css)
   skin/classic/messenger/messageBody.css                      (mail/messageBody.css)
+  skin/classic/messenger/webSearch.css                        (mail/webSearch.css)
   skin/classic/messenger/messageQuotes.css                    (mail/messageQuotes.css)
   skin/classic/messenger/messenger.css                        (mail/messenger.css)
   skin/classic/messenger/attachmentList.css                   (mail/attachmentList.css)
   skin/classic/messenger/imageFilters.svg                     (mail/imageFilters.svg)
   skin/classic/messenger/mailWindow1.css                      (mail/mailWindow1.css)
   skin/classic/messenger/tagColors.css                        (mail/tagColors.css)
   skin/classic/messenger/messageWindow.css                    (mail/messageWindow.css)
   skin/classic/messenger/searchBox.css                        (mail/searchBox.css)
@@ -206,16 +207,17 @@ classic.jar:
   skin/classic/messenger/icons/arrow/arrow-up.png             (mail/icons/arrow/arrow-up.png)
   skin/classic/messenger/icons/arrow/arrow-down.png           (mail/icons/arrow/arrow-down.png)
   skin/classic/messenger/icons/arrow/arrow-left-dim.png       (mail/icons/arrow/arrow-left-dim.png)
   skin/classic/messenger/icons/arrow/arrow-right-dim.png      (mail/icons/arrow/arrow-right-dim.png)
   skin/classic/messenger/icons/arrow/arrow-up-dim.png         (mail/icons/arrow/arrow-up-dim.png)
   skin/classic/messenger/icons/arrow/arrow-down-dim.png       (mail/icons/arrow/arrow-down-dim.png)
   skin/classic/messenger/icons/arrow/foldercycler-arrow-left.png        (mail/icons/arrow/foldercycler-arrow-left.png)
   skin/classic/messenger/icons/arrow/foldercycler-arrow-right.png       (mail/icons/arrow/foldercycler-arrow-right.png)
+  skin/classic/messenger/icons/search-favorite.png            (mail/icons/search-favorite.png)
   skin/classic/messenger/tagbg.png                            (mail/tagbg.png)
 % skin editor classic/1.0 %skin/classic/editor/
   skin/classic/editor/editor.css                              (editor/editor.css)
   skin/classic/editor/EditorDialog.css                        (editor/EditorDialog.css)
   skin/classic/editor/icons/img-align-bottom.gif              (editor/img-align-bottom.gif)
   skin/classic/editor/icons/img-align-left.gif                (editor/img-align-left.gif)
   skin/classic/editor/icons/img-align-middle.gif              (editor/img-align-middle.gif)
   skin/classic/editor/icons/img-align-right.gif               (editor/img-align-right.gif)
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5387822a9e6ac4d9af1b9b75014acec2167d0b92
GIT binary patch
literal 1096
zc$@)91h@N%P)<h;3K|Lk000e1NJLTq001BW000mO1^@s6cL04^00001b5ch_0Itp)
z=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01ejw01ejxLMWSf00007bV*G`2ipe%
z6%HSzViPw200YQLL_t(Y$HkRzXq8nQ$3N$Jp1b?cY1#f{7I|CA3Zq43AToE%SoTLM
zU-XBF!WYtupop|GuH$Yh5z#+_uzH~p7~zr-(am{c#6qk|R6@b*>S(6B+ue5W-Sa&6
z`Ez=4SFJfs_om;g!;i!He9!ls-|q+ibBMndQp%0Mdf+C&2X+9vfn`7%XaP<GCxDNY
zQb(pA)DBNrhIm?-Mx)l+^8Bz3*aci`2|6&0`wc_n(fY@-AMQ-UfxiVvDcgaEfLDP5
z;A)@^SOO%0t-wCu8lVa20NRvNI{`Wbn`4P+`mWYH67y>p;FLW2yN<czBZYB|PTt(q
z5MSDSo8cC1^1tWk?>TOJez1K@5OxSD<zv7rz-pybe)_GXlr6xJQtH<k`3B$+@S;@8
zN+zS9t$k)qJQ_97Wd}4E@g!#k^F-rO7S<#Q3S(fHn8|9Kz~taZ`<+tJ*<_|tsn>wd
zl~R2(-zQs%ky-NjR4U~F>y{3lx^>y|hNimuYJ%}mwCkW<hoCS)GA4-O;pd0ZwoN!$
zA{ZON3I)l;JZtFm*(DaxI_1FS#+Sfb8WAkMz7~Hhk9Hl<8m%>G4U;7ZHKFU{o*5@7
zI0UwbFi%pqqJ>cZaDxSSfS!YZ1TdzxzCwfsVX=Vr{R*6l03CvtD^mWWfDZpb=paBu
zs?cb|0DcB;pM!w=fIiC<1NpO~=ui;Y4x#N3+AcxS!5$dK9h&$T93XO44Y_l}n1WLV
zuork)N+~XtETy~-$N+Enq5kxz<0ox%K`o(MCbY|Vxe|7EjG*M5U-wpoSks*x?L9i_
zg={u}4}k!9=@Q{r0-eB{N~!)J&~J~A*}t6lJ{ySWBAmej<(!T7!}H;h2-PcF=sWz4
z>y^FEG<2HTY?f3irGWQRsZ>oioBjGC@Oq#J=u%2$02Js|nnNR_6OV^RB)0gLM$;QU
zSNVj~!iYwh-+V8<-M!9eF5ly8o>UM{?}Rl|&E_{?gHozIi|vPj-Abu#GsR_~#xg{A
zeci&wyPKECO2@t>wCxH!ks!HpHAlYca*E@HeZJ<Ybj5YV3`lgUeJ%nXQA&+Y<!=PK
zfp?Tr?_S8E3`8x#o_W>DR{8MSxbs~fx?Co<Vii4m4>*&P_O3wlTzXp7iCJtGz&7Af
z-~k{G90ay1r9SzuKav4q3U*XgMV`NB{eub9H0b_fzvH^@`&%@dE;x*45wf8&V=#ah
zlu~;xr$*c1S<5s&FbqR@zTf`3X8UCqx|DK_lyco%M{NdL+F|3x_WTKKA;I4l;gE#@
O0000<MNUMnLSTYscLo3e
new file mode 100644
--- /dev/null
+++ b/mail/themes/gnomestripe/mail/webSearch.css
@@ -0,0 +1,91 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Thunderbird.
+ *
+ * The Initial Developer of the Original Code is
+ *   Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2010-2011
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Jim Porter <squibblyflabbetydoo@gmail.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+.navbar {
+  -moz-border-end: 2px solid;
+  -moz-border-left-colors: threeDShadow threeDHighlight;
+  -moz-border-right-colors: threeDShadow threeDHighlight;
+  padding: 2px 0;
+  -moz-box-align: center;
+}
+
+.navbuttons {
+  border-bottom: 1px solid #bbb;
+  padding-bottom: 10px;
+  margin-bottom: 10px;
+}
+
+.navbuttons .toolbarbutton-text {
+  display: none;
+}
+
+.back {
+  list-style-image: url("moz-icon://stock/gtk-go-back?size=menu");
+}
+
+.back[disabled="true"] {
+  list-style-image: url("moz-icon://stock/gtk-go-back?size=menu&state=disabled");
+}
+
+.forward {
+  list-style-image: url("moz-icon://stock/gtk-go-forward?size=menu");
+}
+
+.forward[disabled="true"] {
+  list-style-image: url("moz-icon://stock/gtk-go-forward?size=menu&state=disabled");
+}
+
+.engines .toolbarbutton-icon {
+  width: 16px;
+  height: 16px;
+}
+
+.defaultButton {
+  -moz-appearance: none;
+  list-style-image: url("chrome://messenger/skin/icons/search-favorite.png");
+  -moz-image-region: rect(0px 16px 16px 0px);
+
+  border: none;
+  padding: 0;
+  margin: 0;
+  min-width: 0;
+  background: transparent;
+}
+
+.defaultButton[checked="true"] {
+  -moz-image-region: rect(0px 32px 16px 16px);
+}
--- a/mail/themes/pinstripe/jar.mn
+++ b/mail/themes/pinstripe/jar.mn
@@ -16,16 +16,17 @@ classic.jar:
   skin/classic/messenger/accountCreation.css                     (mail/accountCreation.css)
   skin/classic/messenger/accountManage.css                       (mail/accountManage.css)
   skin/classic/messenger/accountWizard.css                       (mail/accountWizard.css)
   skin/classic/messenger/section_collapsed.png                   (mail/section_collapsed.png)
   skin/classic/messenger/section_expanded.png                    (mail/section_expanded.png)
   skin/classic/messenger/messageHeader.css                       (mail/messageHeader.css)
   skin/classic/messenger/messageWindow.css                       (mail/messageWindow.css)
   skin/classic/messenger/messageBody.css                         (mail/messageBody.css)
+  skin/classic/messenger/webSearch.css                          (mail/webSearch.css)
   skin/classic/messenger/attachmentList.css                      (mail/attachmentList.css)
   skin/classic/messenger/msgSelectOffline.css                    (mail/msgSelectOffline.css)
   skin/classic/messenger/mailWindow1.css                         (mail/mailWindow1.css)
   skin/classic/messenger/searchBox.css                           (mail/searchBox.css)
   skin/classic/messenger/tagColors.css                           (mail/tagColors.css)
   skin/classic/messenger/junkMail.css                            (mail/junkMail.css)
   skin/classic/messenger/folderMenus.css                         (mail/folderMenus.css)
   skin/classic/messenger/folderPane.css                          (mail/folderPane.css)
@@ -270,16 +271,17 @@ classic.jar:
   skin/classic/messenger/icons/arrow/arrow-left.png              (mail/icons/arrow/arrow-left.png)
   skin/classic/messenger/icons/arrow/arrow-right.png             (mail/icons/arrow/arrow-right.png)
   skin/classic/messenger/icons/arrow/arrow-up.png                (mail/icons/arrow/arrow-up.png)
   skin/classic/messenger/icons/arrow/arrow-down.png              (mail/icons/arrow/arrow-down.png)
   skin/classic/messenger/icons/arrow/arrow-left-dim.png          (mail/icons/arrow/arrow-left-dim.png)
   skin/classic/messenger/icons/arrow/arrow-right-dim.png         (mail/icons/arrow/arrow-right-dim.png)
   skin/classic/messenger/icons/arrow/arrow-up-dim.png            (mail/icons/arrow/arrow-up-dim.png)
   skin/classic/messenger/icons/arrow/arrow-down-dim.png          (mail/icons/arrow/arrow-down-dim.png)
+  skin/classic/messenger/icons/search-favorite.png               (mail/icons/search-favorite.png)
   skin/classic/messenger/tagbg.png                               (mail/tagbg.png)
   skin/classic/messenger/icons/download.png                      (mail/icons/download.png)
 % skin editor classic/1.0 %skin/classic/editor/
   skin/classic/editor/editor.css                                 (editor/editor.css)
   skin/classic/editor/EditorDialog.css                           (editor/EditorDialog.css)
   skin/classic/editor/icons/img-align-bottom.gif                 (editor/img-align-bottom.gif)
   skin/classic/editor/icons/img-align-left.gif                   (editor/img-align-left.gif)
   skin/classic/editor/icons/img-align-middle.gif                 (editor/img-align-middle.gif)
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5387822a9e6ac4d9af1b9b75014acec2167d0b92
GIT binary patch
literal 1096
zc$@)91h@N%P)<h;3K|Lk000e1NJLTq001BW000mO1^@s6cL04^00001b5ch_0Itp)
z=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01ejw01ejxLMWSf00007bV*G`2ipe%
z6%HSzViPw200YQLL_t(Y$HkRzXq8nQ$3N$Jp1b?cY1#f{7I|CA3Zq43AToE%SoTLM
zU-XBF!WYtupop|GuH$Yh5z#+_uzH~p7~zr-(am{c#6qk|R6@b*>S(6B+ue5W-Sa&6
z`Ez=4SFJfs_om;g!;i!He9!ls-|q+ibBMndQp%0Mdf+C&2X+9vfn`7%XaP<GCxDNY
zQb(pA)DBNrhIm?-Mx)l+^8Bz3*aci`2|6&0`wc_n(fY@-AMQ-UfxiVvDcgaEfLDP5
z;A)@^SOO%0t-wCu8lVa20NRvNI{`Wbn`4P+`mWYH67y>p;FLW2yN<czBZYB|PTt(q
z5MSDSo8cC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LOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Thunderbird.
+ *
+ * The Initial Developer of the Original Code is
+ *   Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2010-2011
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Jim Porter <squibblyflabbetydoo@gmail.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+.navbar {
+  -moz-border-end: 2px solid;
+  -moz-border-left-colors: threeDShadow threeDHighlight;
+  -moz-border-right-colors: threeDShadow threeDHighlight;
+  padding: 2px 0;
+  -moz-box-align: center;
+}
+
+.navbuttons {
+  border-bottom: 1px solid #bbb;
+  padding-bottom: 10px;
+  margin-bottom: 10px;
+}
+
+.navbuttons .toolbarbutton-text {
+  display: none;
+}
+
+.back {
+  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar-small.png");
+  -moz-image-region: rect(0px 408px 24px 384px);
+}
+
+.back:hover:active {
+  -moz-image-region: rect(24px 408px 48px 384px);
+}
+
+.back[disabled] {
+  -moz-image-region: rect(48px 408px 72px 384px) !important;
+}
+
+.forward {
+  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar-small.png");
+  -moz-image-region: rect(0px 432px 24px 408px);
+}
+
+.forward:hover:active {
+  -moz-image-region: rect(24px 432px 48px 408px);
+}
+
+.forward[disabled="true"] {
+  -moz-image-region: rect(48px 432px 72px 408px) !important;
+}
+
+.engines .toolbarbutton-icon {
+  width: 16px;
+  height: 16px;
+}
+
+.defaultButton {
+  -moz-appearance: none;
+  list-style-image: url("chrome://messenger/skin/icons/search-favorite.png");
+  -moz-image-region: rect(0px 16px 16px 0px);
+
+  border: none;
+  padding: 0;
+  margin: 0;
+  min-width: 0;
+  background: transparent;
+}
+
+.defaultButton[checked="true"] {
+  -moz-image-region: rect(0px 32px 16px 16px);
+}
--- a/mail/themes/qute/jar.mn
+++ b/mail/themes/qute/jar.mn
@@ -52,16 +52,17 @@ classic.jar:
   skin/classic/messenger/accountCentral.css                   (mail/accountCentral.css)
   skin/classic/messenger/accountCreation.css                  (mail/accountCreation.css)
   skin/classic/messenger/accountManage.css                    (mail/accountManage.css)
   skin/classic/messenger/accountWizard.css                    (mail/accountWizard.css)
   skin/classic/messenger/section_collapsed.png                (mail/section_collapsed.png)
   skin/classic/messenger/section_expanded.png                 (mail/section_expanded.png)
   skin/classic/messenger/messageHeader.css                    (mail/messageHeader.css)
   skin/classic/messenger/messageBody.css                      (mail/messageBody.css)
+  skin/classic/messenger/webSearch.css                        (mail/webSearch.css)
   skin/classic/messenger/messageQuotes.css                    (mail/messageQuotes.css)
   skin/classic/messenger/messenger.css                        (mail/messenger.css)
   skin/classic/messenger/attachmentList.css                   (mail/attachmentList.css)
   skin/classic/messenger/imageFilters.svg                     (mail/imageFilters.svg)
   skin/classic/messenger/mailWindow1.css                      (mail/mailWindow1.css)
   skin/classic/messenger/tagColors.css                        (mail/tagColors.css)
   skin/classic/messenger/messageWindow.css                    (mail/messageWindow.css)
   skin/classic/messenger/searchBox.css                        (mail/searchBox.css)
@@ -242,16 +243,17 @@ classic.jar:
   skin/classic/messenger/icons/arrow/arrow-right-dim.png      (mail/icons/arrow/arrow-right-dim.png)
   skin/classic/messenger/icons/arrow/arrow-up-dim.png         (mail/icons/arrow/arrow-up-dim.png)
   skin/classic/messenger/icons/arrow/arrow-down-dim.png       (mail/icons/arrow/arrow-down-dim.png)
   skin/classic/messenger/icons/timeline.png                   (mail/icons/timeline.png)
   skin/classic/messenger/icons/timeline-inverted.png          (mail/icons/timeline-inverted.png)
   skin/classic/messenger/icons/empty-search-results.png       (mail/icons/empty-search-results.png)
   skin/classic/messenger/icons/arrow/foldercycler-arrow-left.png        (mail/icons/arrow/foldercycler-arrow-left.png)
   skin/classic/messenger/icons/arrow/foldercycler-arrow-right.png       (mail/icons/arrow/foldercycler-arrow-right.png)
+  skin/classic/messenger/icons/search-favorite.png            (mail/icons/search-favorite.png)
   skin/classic/messenger/icons/filter.png                     (mail/icons/filter.png)
   skin/classic/messenger/icons/xp-pin-grey.png                (mail/icons/xp-pin-grey.png)
   skin/classic/messenger/icons/xp-pin-red.png                 (mail/icons/xp-pin-red.png)
   skin/classic/messenger/tagbg.png                            (mail/tagbg.png)
 % skin messenger-newsblog classic/1.0 %skin/classic/messenger-newsblog/ os=WINNT osversion<6
 % skin messenger-newsblog classic/1.0 %skin/classic/messenger-newsblog/ os!=WINNT
   skin/classic/messenger-newsblog/feed-subscriptions.css      (mail/newsblog/feed-subscriptions.css)
   skin/classic/messenger-newsblog/icons/rss-feed.png          (mail/newsblog/rss-feed.png)
@@ -288,16 +290,17 @@ classic.jar:
   skin/classic/aero/messenger/accountCentral.css                   (mail/accountCentral.css)
   skin/classic/aero/messenger/accountCreation.css                  (mail/accountCreation.css)
   skin/classic/aero/messenger/accountManage.css                    (mail/accountManage.css)
   skin/classic/aero/messenger/accountWizard.css                    (mail/accountWizard.css)
   skin/classic/aero/messenger/section_collapsed.png                (mail/section_collapsed.png)
   skin/classic/aero/messenger/section_expanded.png                 (mail/section_expanded.png)
 * skin/classic/aero/messenger/messageHeader.css                    (mail/messageHeader-aero.css)
   skin/classic/aero/messenger/messageBody.css                      (mail/messageBody.css)
+  skin/classic/aero/messenger/webSearch.css                        (mail/webSearch-aero.css)
   skin/classic/aero/messenger/messageQuotes.css                    (mail/messageQuotes.css)
 * skin/classic/aero/messenger/messenger.css                        (mail/messenger-aero.css)
   skin/classic/aero/messenger/attachmentList.css                   (mail/attachmentList.css)
   skin/classic/aero/messenger/imageFilters.svg                     (mail/imageFilters.svg)
 * skin/classic/aero/messenger/mailWindow1.css                      (mail/mailWindow1-aero.css)
   skin/classic/aero/messenger/tagColors.css                        (mail/tagColors.css)
   skin/classic/aero/messenger/messageWindow.css                    (mail/messageWindow-aero.css)
   skin/classic/aero/messenger/searchBox.css                        (mail/searchBox.css)
@@ -456,16 +459,17 @@ classic.jar:
   skin/classic/aero/messenger/icons/arrow/arrow-up.png             (mail/icons/arrow/arrow-up.png)
   skin/classic/aero/messenger/icons/arrow/arrow-down.png           (mail/icons/arrow/arrow-down.png)
   skin/classic/aero/messenger/icons/arrow/arrow-left-dim.png       (mail/icons/arrow/arrow-left-dim.png)
   skin/classic/aero/messenger/icons/arrow/arrow-right-dim.png      (mail/icons/arrow/arrow-right-dim.png)
   skin/classic/aero/messenger/icons/arrow/arrow-up-dim.png         (mail/icons/arrow/arrow-up-dim.png)
   skin/classic/aero/messenger/icons/arrow/arrow-down-dim.png       (mail/icons/arrow/arrow-down-dim.png)
   skin/classic/aero/messenger/icons/arrow/foldercycler-arrow-left.png        (mail/icons/arrow/foldercycler-arrow-left.png)
   skin/classic/aero/messenger/icons/arrow/foldercycler-arrow-right.png       (mail/icons/arrow/foldercycler-arrow-right.png)
+  skin/classic/aero/messenger/icons/search-favorite.png            (mail/icons/search-favorite.png)
   skin/classic/aero/messenger/icons/filter.png                     (mail/icons/filter.png)
   skin/classic/aero/messenger/icons/xp-pin-grey.png                (mail/icons/xp-pin-grey.png)
   skin/classic/aero/messenger/icons/xp-pin-red.png                 (mail/icons/xp-pin-red.png)
   skin/classic/aero/messenger/tagbg.png                            (mail/tagbg.png)
   skin/classic/aero/messenger/icons/download.png                   (mail/icons/download.png)
 % skin messenger-newsblog classic/1.0 %skin/classic/aero/messenger-newsblog/ os=WINNT osversion>=6
   skin/classic/aero/messenger-newsblog/feed-subscriptions.css      (mail/newsblog/feed-subscriptions.css)
   skin/classic/aero/messenger-newsblog/icons/rss-feed.png          (mail/newsblog/rss-feed-aero.png)
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5387822a9e6ac4d9af1b9b75014acec2167d0b92
GIT binary patch
literal 1096
zc$@)91h@N%P)<h;3K|Lk000e1NJLTq001BW000mO1^@s6cL04^00001b5ch_0Itp)
z=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01ejw01ejxLMWSf00007bV*G`2ipe%
z6%HSzViPw200YQLL_t(Y$HkRzXq8nQ$3N$Jp1b?cY1#f{7I|CA3Zq43AToE%SoTLM
zU-XBF!WYtupop|GuH$Yh5z#+_uzH~p7~zr-(am{c#6qk|R6@b*>S(6B+ue5W-Sa&6
z`Ez=4SFJfs_om;g!;i!He9!ls-|q+ibBMndQp%0Mdf+C&2X+9vfn`7%XaP<GCxDNY
zQb(pA)DBNrhIm?-Mx)l+^8Bz3*aci`2|6&0`wc_n(fY@-AMQ-UfxiVvDcgaEfLDP5
z;A)@^SOO%0t-wCu8lVa20NRvNI{`Wbn`4P+`mWYH67y>p;FLW2yN<czBZYB|PTt(q
z5MSDSo8cC1^1tWk?>TOJez1K@5OxSD<zv7rz-pybe)_GXlr6xJQtH<k`3B$+@S;@8
zN+zS9t$k)qJQ_97Wd}4E@g!#k^F-rO7S<#Q3S(fHn8|9Kz~taZ`<+tJ*<_|tsn>wd
zl~R2(-zQs%ky-NjR4U~F>y{3lx^>y|hNimuYJ%}mwCkW<hoCS)GA4-O;pd0ZwoN!$
zA{ZON3I)l;JZtFm*(DaxI_1FS#+Sfb8WAkMz7~Hhk9Hl<8m%>G4U;7ZHKFU{o*5@7
zI0UwbFi%pqqJ>cZaDxSSfS!YZ1TdzxzCwfsVX=Vr{R*6l03CvtD^mWWfDZpb=paBu
zs?cb|0DcB;pM!w=fIiC<1NpO~=ui;Y4x#N3+AcxS!5$dK9h&$T93XO44Y_l}n1WLV
zuork)N+~XtETy~-$N+Enq5kxz<0ox%K`o(MCbY|Vxe|7EjG*M5U-wpoSks*x?L9i_
zg={u}4}k!9=@Q{r0-eB{N~!)J&~J~A*}t6lJ{ySWBAmej<(!T7!}H;h2-PcF=sWz4
z>y^FEG<2HTY?f3irGWQRsZ>oioBjGC@Oq#J=u%2$02Js|nnNR_6OV^RB)0gLM$;QU
zSNVj~!iYwh-+V8<-M!9eF5ly8o>UM{?}Rl|&E_{?gHozIi|vPj-Abu#GsR_~#xg{A
zeci&wyPKECO2@t>wCxH!ks!HpHAlYca*E@HeZJ<Ybj5YV3`lgUeJ%nXQA&+Y<!=PK
zfp?Tr?_S8E3`8x#o_W>DR{8MSxbs~fx?Co<Vii4m4>*&P_O3wlTzXp7iCJtGz&7Af
z-~k{G90ay1r9SzuKav4q3U*XgMV`NB{eub9H0b_fzvH^@`&%@dE;x*45wf8&V=#ah
zlu~;xr$*c1S<5s&FbqR@zTf`3X8UCqx|DK_lyco%M{NdL+F|3x_WTKKA;I4l;gE#@
O0000<MNUMnLSTYscLo3e
new file mode 100644
--- /dev/null
+++ b/mail/themes/qute/mail/webSearch-aero.css
@@ -0,0 +1,85 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Thunderbird.
+ *
+ * The Initial Developer of the Original Code is
+ *   Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2010-2011
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Jim Porter <squibblyflabbetydoo@gmail.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+.navbar {
+  -moz-border-end: 2px solid;
+  -moz-border-left-colors: threeDShadow threeDHighlight;
+  -moz-border-right-colors: threeDShadow threeDHighlight;
+  padding: 2px 0;
+  -moz-box-align: center;
+}
+
+.navbuttons {
+  border-bottom: 1px solid #bbb;
+  padding-bottom: 10px;
+  margin-bottom: 10px;
+}
+
+.navbuttons .toolbarbutton-text {
+  display: none;
+}
+
+.back {
+  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.png");
+  -moz-image-region: rect(0px, 306px, 18px, 288px);
+}
+
+.forward {
+  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar.png");
+  -moz-image-region: rect(0px, 324px, 18px, 306px);
+}
+
+.engines .toolbarbutton-icon {
+  width: 16px;
+  height: 16px;
+}
+
+.defaultButton {
+  -moz-appearance: none;
+  list-style-image: url("chrome://messenger/skin/icons/search-favorite.png");
+  -moz-image-region: rect(0px 16px 16px 0px);
+
+  border: none;
+  padding: 0;
+  margin: 0;
+  min-width: 0;
+  background: transparent;
+}
+
+.defaultButton[checked="true"] {
+  -moz-image-region: rect(0px 32px 16px 16px);
+}
new file mode 100644
--- /dev/null
+++ b/mail/themes/qute/mail/webSearch.css
@@ -0,0 +1,101 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Thunderbird.
+ *
+ * The Initial Developer of the Original Code is
+ *   Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2010-2011
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Jim Porter <squibblyflabbetydoo@gmail.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+.navbar {
+  -moz-border-end: 2px solid;
+  -moz-border-left-colors: threeDShadow threeDHighlight;
+  -moz-border-right-colors: threeDShadow threeDHighlight;
+  padding: 2px 0;
+  -moz-box-align: center;
+}
+
+.navbuttons {
+  border-bottom: 1px solid #bbb;
+  padding-bottom: 10px;
+  margin-bottom: 10px;
+}
+
+.navbuttons .toolbarbutton-text {
+  display: none;
+}
+
+.back {
+  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar-small.png");
+  -moz-image-region: rect(0px 272px 16px 256px);
+}
+
+.back:hover {
+  -moz-image-region: rect(16px 272px 32px 256px);
+}
+
+.back[disabled="true"] {
+  -moz-image-region: rect(32px 272px 48px 256px) !important;
+}
+
+.forward {
+  list-style-image: url("chrome://messenger/skin/icons/mail-toolbar-small.png");
+  -moz-image-region: rect(0px 288px 16px 272px);
+}
+
+.forward:hover {
+  -moz-image-region: rect(16px 288px 32px 272px);
+}
+
+.forward[disabled="true"] {
+  -moz-image-region: rect(32px 288px 48px 272px) !important;
+}
+
+.engines .toolbarbutton-icon {
+  width: 16px;
+  height: 16px;
+}
+
+.defaultButton {
+  -moz-appearance: none;
+  list-style-image: url("chrome://messenger/skin/icons/search-favorite.png");
+  -moz-image-region: rect(0px 16px 16px 0px);
+
+  border: none;
+  padding: 0;
+  margin: 0;
+  min-width: 0;
+  background: transparent;
+}
+
+.defaultButton[checked="true"] {
+  -moz-image-region: rect(0px 32px 16px 16px);
+}