Bug 431842, support autocomplete list and findbar, r=gavin
authorNeil Deakin <neil@mozilla.com>
Wed, 16 Jul 2008 17:41:38 +0200
changeset 64755 1f9b831f9b4e4c122083b4c70a4efd03d9d3e2f0
parent 64754 426f4c2b5a22ebfb12c4a5d67a59b15acf69742f
child 64756 aed3ced86b565a9217aacea6db39e3b2738bcb27
push id19389
push userffxbld
push dateWed, 06 Apr 2011 21:33:21 +0000
treeherdermozilla-central@8e9f90073a20 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin
bugs431842
Bug 431842, support autocomplete list and findbar, r=gavin
mobile/app/mobile.js
mobile/chrome/content/browser-ui.js
mobile/chrome/content/browser.css
mobile/chrome/content/browser.js
mobile/chrome/content/browser.xul
mobile/chrome/content/deckbrowser.css
mobile/chrome/content/urlbar.xml
mobile/chrome/jar.mn
mobile/chrome/locale/en-US/browser.dtd
mobile/chrome/locale/en-US/region.properties
mobile/chrome/locale/en-US/search.properties
mobile/chrome/skin/browser.css
mobile/chrome/skin/images/page-starred.png
mobile/chrome/skin/images/tag.png
--- a/mobile/app/mobile.js
+++ b/mobile/app/mobile.js
@@ -128,8 +128,32 @@ pref("browser.display.focus_text_color",
 /* block popups by default, and notify the user about blocked popups */
 pref("dom.disable_open_during_load", true);
 pref("privacy.popups.showBrowserMessage", true);
 
 pref("keyword.enabled", true);
 pref("keyword.URL", "http://www.google.com/search?q=");
 
 pref("snav.enabled", true);
+
+pref("accessibility.typeaheadfind", false);
+pref("accessibility.typeaheadfind.timeout", 5000);
+pref("accessibility.typeaheadfind.flashBar", 1);
+pref("accessibility.typeaheadfind.linksonly", false);
+pref("accessibility.typeaheadfind.casesensitive", false);
+
+// pointer to the default engine name
+pref("browser.search.defaultenginename",      "chrome://browser/locale/region.properties");
+
+// disable logging for the search service by default
+pref("browser.search.log", false);
+
+// Ordering of Search Engines in the Engine list. 
+pref("browser.search.order.1",                "chrome://browser/locale/region.properties");
+pref("browser.search.order.2",                "chrome://browser/locale/region.properties");
+
+// disable updating
+pref("browser.search.update", false);
+pref("browser.search.update.log", false);
+pref("browser.search.updateinterval", 6);
+
+// enable search suggestions by default
+pref("browser.search.suggest.enabled", true);
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -44,16 +44,17 @@ const PANELMODE_EDIT              = 2;
 const PANELMODE_BOOKMARK          = 3;
 const PANELMODE_BOOKMARKLIST      = 4;
 
 var BrowserUI = {
   _panel : null,
   _caption : null,
   _edit : null,
   _throbber : null,
+  _autocompleteNavbuttons : null,
   _favicon : null,
   _faviconAdded : false,
   _fadeoutID : null,
   _allowHide : true,
 
   _titleChanged : function(aEvent) {
     if (aEvent.target != getBrowser().contentDocument)
       return;
@@ -133,20 +134,22 @@ var BrowserUI = {
   },
 
   init : function() {
     this._caption = document.getElementById("urlbar-caption");
     this._caption.addEventListener("click", this, false);
     this._edit = document.getElementById("urlbar-edit");
     this._edit.addEventListener("focus", this, false);
     this._edit.addEventListener("blur", this, false);
-    this._edit.addEventListener("keypress", this, false);
+    this._edit.addEventListener("keypress", this, true);
+    this._edit.addEventListener("input", this, false);
     this._throbber = document.getElementById("urlbar-throbber");
     this._favicon = document.getElementById("urlbar-favicon");
     this._favicon.addEventListener("error", this, false);
+    this._autocompleteNavbuttons = document.getElementById("autocomplete_navbuttons");
 
     getBrowser().addEventListener("DOMTitleChanged", this, true);
     getBrowser().addEventListener("DOMLinkAdded", this, true);
   },
 
   update : function(aState) {
     if (aState == TOOLBARSTATE_INDETERMINATE) {
       this._faviconAdded = false;
@@ -214,31 +217,91 @@ var BrowserUI = {
       this._allowHide = false;
     }
 
     this._caption.value = urlString;
     this._edit.value = urlString;
   },
 
   goToURI : function(aURI) {
+    this._edit.reallyClosePopup();
+
     if (!aURI)
       aURI = this._edit.value;
 
     var flags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
     getBrowser().loadURIWithFlags(aURI, flags, null, null);
     this._showMode(PANELMODE_VIEW);
   },
 
   search : function() {
     var queryURI = "http://www.google.com/search?q=" + this._edit.value + "&hl=en&lr=&btnG=Search";
     getBrowser().loadURI(queryURI, null, null, false);
 
     this._showMode(PANELMODE_VIEW);
   },
 
+  sizeAutocompletePopup : function () {
+    var rect = document.getElementById("browser-container").getBoundingClientRect();
+    var popup = document.getElementById("popup_autocomplete");
+    popup.height = rect.bottom - rect.top;
+  },
+
+  openDefaultHistory : function () {
+    if (!this._edit.value) {
+      this._autocompleteNavbuttons.hidden = true;
+      this._edit.showHistoryPopup();
+    }
+  },
+
+  doButtonSearch : function(button)
+  {
+    if (!("engine" in button) || !button.engine)
+      return;
+
+    var urlbar = this._edit;
+    urlbar.open = false;
+    var value = urlbar.value;
+    if (!value)
+      return;
+
+    var submission = button.engine.getSubmission(value, null);
+    getBrowser().loadURI(submission.uri.spec, null, submission.postData, false);
+  },
+
+  engines : null,
+  updateSearchEngines : function () {
+    if (this.engines)
+      return;
+
+    // XXXndeakin remove the try-catch once the search service is properly built
+    try {
+      var searchService = Cc["@mozilla.org/browser/search-service;1"].
+                          getService(Ci.nsIBrowserSearchService);
+    } catch (ex) {
+      this.engines = [ ];
+      return;
+    }
+
+    var engines = searchService.getVisibleEngines({ });
+    this.engines = engines;
+    const kXULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
+    var container = this._autocompleteNavbuttons;
+    for (var e = 0; e < engines.length; e++) {
+      var button = document.createElementNS(kXULNS, "toolbarbutton");
+      var engine = engines[e];
+      button.id = engine.name;
+      button.setAttribute("label", engine.name);
+      if (engine.iconURI)
+        button.setAttribute("image", engine.iconURI.spec);
+      container.insertBefore(button, container.firstChild);
+      button.engine = engine;
+    }
+  },
+
   _showMode : function(aMode) {
     if (this._fadeoutID) {
       clearTimeout(this._fadeoutID);
       this._fadeoutID = null;
     }
 
     var toolbar = document.getElementById("toolbar-main");
     var bookmark = document.getElementById("bookmark-container");
@@ -250,21 +313,19 @@ var BrowserUI = {
       bookmark.hidden = true;
       urllist.hidden = true;
     }
     else if (aMode == PANELMODE_EDIT) {
       toolbar.setAttribute("mode", "edit");
       this._caption.hidden = true;
       this._edit.hidden = false;
       this._edit.focus();
-
-      this.showHistory();
-
       bookmark.hidden = true;
-      urllist.hidden = false;
+      urllist.hidden = true;
+      this.openDefaultHistory();
     }
     else if (aMode == PANELMODE_BOOKMARK) {
       toolbar.setAttribute("mode", "view");
       this._edit.hidden = true;
       this._caption.hidden = false;
 
       urllist.hidden = true;
       bookmark.hidden = false;
@@ -348,24 +409,30 @@ var BrowserUI = {
         break;
       case "DOMLinkAdded":
         this._linkAdded(aEvent);
         break;
       // URL textbox events
       case "click":
         this._showMode(PANELMODE_EDIT);
         break;
+      case "input":
+        if (this._edit.value) {
+          this.updateSearchEngines();
+          this._autocompleteNavbuttons.hidden = false;
+        }
+        break;
       case "focus":
         setTimeout(function() { aEvent.target.select(); }, 0);
         break;
       case "keypress":
-        if (aEvent.keyCode == aEvent.DOM_VK_RETURN)
-          this.goToURI();
-        if (aEvent.keyCode == aEvent.DOM_VK_ESCAPE)
+        if (aEvent.keyCode == aEvent.DOM_VK_ESCAPE) {
+          this._edit.reallyClosePopup();
           this._showMode(PANELMODE_VIEW);
+        }
         break;
       // Favicon events
       case "error":
         this._favicon.setAttribute("src", "chrome://browser/skin/images/default-favicon.png");
         break;
     }
   },
 
rename from mobile/chrome/content/deckbrowser.css
rename to mobile/chrome/content/browser.css
--- a/mobile/chrome/content/deckbrowser.css
+++ b/mobile/chrome/content/browser.css
@@ -1,3 +1,7 @@
 deckbrowser {
     -moz-binding: url("chrome://browser/content/deckbrowser.xml#deckbrowser");
 }
+
+#urlbar-edit {
+    -moz-binding: url("chrome://browser/content/urlbar.xml#autocomplete-aligned");
+}
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -38,16 +38,20 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
+const FINDSTATE_FIND = 0;
+const FINDSTATE_FIND_AGAIN = 1;
+const FINDSTATE_FIND_PREVIOUS = 2;
+
 Cu.import("resource://gre/modules/SpatialNavigation.js");
 
 // create a lazy-initialized handle for the pref service on the global object
 // in the style of bug 385809
 __defineGetter__("gPrefService", function () {
   delete gPrefService;
   return gPrefService = Components.classes["@mozilla.org/preferences-service;1"]
                                   .getService(Components.interfaces.nsIPrefBranch2);
@@ -220,17 +224,44 @@ var Browser = {
       case "cmd_downloads":
         Cc["@mozilla.org/download-manager-ui;1"].getService(Ci.nsIDownloadManagerUI).show(window);
         break;
     }
   },
 
   getNotificationBox : function() {
     return document.getElementById("notifications");
-  }
+  },
+
+
+  findState: FINDSTATE_FIND,
+  openFind: function(aState) {
+    this.findState = aState;
+
+    var findbar = document.getElementById("findbar");
+    var browser = findbar.browser;
+    if (!browser) {
+      browser = this.content.browser;
+      findbar.browser = browser;
+    }
+
+    var panel = document.getElementById("findpanel");
+    if (panel.state == "open")
+      this.doFind(null);
+    else
+      panel.openPopup(document.getElementById("findpanel-placeholder"), "before_start");
+  },
+
+  doFind: function (aEvent) {
+    var findbar = document.getElementById("findbar");
+    if (Browser.findState == FINDSTATE_FIND)
+      findbar.onFindCommand();
+    else
+      findbar.onFindAgainCommand(Browser.findState == FINDSTATE_FIND_PREVIOUS);
+   }
 };
 
 function ProgressController(aTabBrowser) {
   this._tabbrowser = aTabBrowser;
   this.init(aTabBrowser.browser);
 }
 
 ProgressController.prototype = {
--- a/mobile/chrome/content/browser.xul
+++ b/mobile/chrome/content/browser.xul
@@ -34,17 +34,17 @@
    - decision by deleting the provisions above and replace them with the notice
    - and other provisions required by the LGPL or the GPL. 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://browser/skin/browser.css" type="text/css"?>
-<?xml-stylesheet href="chrome://browser/content/deckbrowser.css" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
 
 <!DOCTYPE window [
 <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
 %browserDTD;
 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
 %brandDTD;
 ]>
 
@@ -89,16 +89,20 @@
 
     <!-- editing -->
     <command id="cmd_cut" label="&cut.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
     <command id="cmd_copy" label="&copy.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
     <command id="cmd_copylink" label="&copylink.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
     <command id="cmd_paste" label="&paste.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
     <command id="cmd_delete" label="&delete.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
     <command id="cmd_selectAll" label="&selectAll.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
+
+    <command id="cmd_find" oncommand="Browser.openFind(FINDSTATE_FIND);"/>
+    <command id="cmd_findAgain" oncommand="Browser.openFind(FINDSTATE_FIND_AGAIN);"/>
+    <command id="cmd_findPrevious" oncommand="Browser.openFind(FINDSTATE_FIND_PREVIOUS);"/>
   </commandset>
 
   <keyset id="mainKeyset">
     <!-- basic navigation -->
     <key id="key_back" keycode="VK_LEFT" command="cmd_back" modifiers="control"/>
     <key id="key_forward" keycode="VK_RIGHT" command="cmd_forward" modifiers="control"/>
     <key id="key_back2" keycode="VK_BACK" command="cmd_back"/>
     <key id="key_forward2" keycode="VK_BACK" command="cmd_forward" modifiers="shift"/>
@@ -108,21 +112,35 @@
     <key id="key_pageUp" keycode="VK_UP" command="cmd_scrollPageUp" modifiers="shift"/>
     <key id="key_pageDown" keycode="VK_DOWN" command="cmd_scrollPageDown" modifiers="shift"/>
 
     <!-- misc -->
     <key id="key_menu" keycode="VK_F4" command="cmd_menu"/>
     <key id="key_fullscreen" keycode="VK_F6" command="cmd_fullscreen"/>
     <key id="key_addons" key="E" command="cmd_addons" modifiers="control"/>
     <key id="key_downloads" key="J" command="cmd_downloads" modifiers="control"/>
+
+    <key id="key_find" key="&findOnCmd.commandkey;" command="cmd_find" modifiers="accel"/>
+    <key id="key_findAgain" key="&findAgainCmd.commandkey;" command="cmd_findAgain" modifiers="accel"/>
+    <key id="key_findPrevious" key="&findAgainCmd.commandkey;" command="cmd_findPrevious" modifiers="accel,shift"/>
+    <key keycode="&findAgainCmd.commandkey2;" command="cmd_findAgain"/>
+    <key keycode="&findAgainCmd.commandkey2;"  command="cmd_findPrevious" modifiers="shift"/>
   </keyset>
 
   <popupset id="mainPopupSet">
+    <panel type="autocomplete-richlistbox" id="popup_autocomplete"
+           noautofocus="true" onpopupshowing="BrowserUI.sizeAutocompletePopup()">
+      <hbox id="autocomplete_navbuttons" align="center" flex="1"
+            oncommand="BrowserUI.doButtonSearch(event.target);">
+        <image class="tool-search"/>
+      </hbox>
+    </panel>
+
     <!-- popup for content autocomplete -->
-    <panel type="autocomplete" id="popup_autocomplete" noautofocus="true"/>
+    <panel type="autocomplete" id="popup_autocomplete_content" noautofocus="true"/>
 
     <!-- popup for site identity information -->
     <panel id="identity-popup" position="after_start" hidden="true" noautofocus="true"
            norestorefocus="true">
       <hbox id="identity-popup-container" align="top">
         <image id="identity-popup-icon"/>
         <vbox id="identity-popup-content-box">
           <label id="identity-popup-connectedToLabel" value="&identity.connectedTo;"/>
@@ -151,50 +169,53 @@
              onclick="getIdentityHandler().handleIdentityButtonEvent(event);"
              onkeypress="getIdentityHandler().handleIdentityButtonEvent(event);">
           <stack id="urlbar-image-stack">
             <image id="urlbar-throbber" src=""/>
             <image id="urlbar-favicon" src=""/>
           </stack>
         </box>
         <description id="urlbar-caption" crop="end" flex="1"/>
-        <textbox id="urlbar-edit" flex="1" hidden="true"/>
+        <textbox id="urlbar-edit" type="autocomplete" autocompletesearch="history" enablehistory="false"
+                 maxrows="6" completeselectedindex="true" minresultsforpopup="0" flex="1" hidden="true"
+                 autocompletepopup="popup_autocomplete"
+                 ontextentered="BrowserUI.goToURI();"/>
       </hbox>
       <hbox id="urlbar-icons">
         <toolbarbutton id="tool-reload" class="urlbar-icon-button" command="cmd_reload"/>
         <toolbarbutton id="tool-stop" class="urlbar-icon-button" command="cmd_stop"/>
         <toolbarbutton id="tool-go" class="urlbar-icon-button" command="cmd_go"/>
       </hbox>
     </toolbar>
   </toolbox>
 
   <stack flex="1">
     <hbox id="browser-container" flex="1">
       <vbox id="browser" flex="1">
         <notificationbox id="notifications" flex="1">
-          <deckbrowser id="content" autocompletepopup="popup_autocomplete" flex="1"/>
+          <deckbrowser id="content" autocompletepopup="popup_autocomplete_content" flex="1"/>
         </notificationbox>
       </vbox>
       <vbox id="browser-controls" collapsed="true">
         <toolbarbutton id="tool-back" class="browser-control-button" command="cmd_back"/>
         <toolbarbutton id="tool-forward" class="browser-control-button" command="cmd_forward"/>
         <toolbarbutton id="tool-star" class="browser-control-button" command="cmd_star"/>
         <toolbarbutton id="tool-bookmarks" class="browser-control-button" command="cmd_bookmarks"/>
         <toolbarbutton id="tool-actions" class="browser-control-button" command="cmd_actions"/>
       </vbox>
     </hbox>
 
     <vbox id="urllist-container" flex="1" hidden="true">
       <hbox id="urllist-items-container" flex="1">
         <richlistbox id="urllist-items" flex="1"/>
-      </hbox>
-      <separator class="thin"/>
-      <hbox id="urllist-search">
-        <image id="tool-search"/>
-      </hbox>
+     </hbox>
+     <separator class="thin"/>
+     <hbox id="urllist-search">
+       <image class="tool-search"/>
+     </hbox>
     </vbox>
 
     <vbox id="bookmark-container" flex="1" hidden="true">
       <vbox id="bookmark-form">
         <hbox align="start">
           <image id="bookmark-image" src="chrome://browser/skin/images/starred48.png"/>
           <grid id="bookmark-grid" flex="1">
             <columns>
@@ -222,9 +243,15 @@
           <spacer flex="1"/>
           <button label="&bookmarkCancel.label;" oncommand="BookmarkHelper.close()"/>
           <button label="&bookmarkDone.label;" oncommand="BookmarkHelper.save()"/>
         </hbox>
       </vbox>
     </vbox>
   </stack>
 
+  <vbox id="findpanel-placeholder" sizetopopup="always">
+    <panel id="findpanel" onpopupshown="Browser.doFind()">
+      <findbar id="findbar"/>
+   </panel>
+  </vbox>
+
 </window>
new file mode 100644
--- /dev/null
+++ b/mobile/chrome/content/urlbar.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!DOCTYPE bindings PUBLIC "-//MOZILLA//DTD XBL V1.0//EN" "http://www.mozilla.org/xbl">
+
+<bindings
+    xmlns="http://www.mozilla.org/xbl"
+    xmlns:xbl="http://www.mozilla.org/xbl"
+    xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+  <binding id="autocomplete-aligned" extends="chrome://global/content/bindings/autocomplete.xml#autocomplete">
+    <implementation>
+      <method name="openPopup">
+        <body><![CDATA[
+          this.popup.openAutocompletePopup(this, document.getElementById("toolbar-main"));
+        ]]></body>
+      </method>
+      <method name="closePopup">
+        <body><![CDATA[
+          // do nothing
+        ]]></body>
+      </method>
+      <method name="reallyClosePopup">
+        <body><![CDATA[
+          this.mConsumeRollupEvent = false;
+          this.popup.closePopup();
+        ]]></body>
+      </method>
+    </implementation>
+  </binding>
+
+</bindings>
--- a/mobile/chrome/jar.mn
+++ b/mobile/chrome/jar.mn
@@ -1,35 +1,40 @@
 #filter substitution
 
 browser.jar:
 % content browser %content/
 * content/browser.xul                  (content/browser.xul)
   content/browser.js                   (content/browser.js)
   content/browser-ui.js                (content/browser-ui.js)
   content/commandUtil.js               (content/commandUtil.js)
+  content/urlbar.xml                   (content/urlbar.xml)
   content/deckbrowser.xml              (content/deckbrowser.xml)
-  content/deckbrowser.css              (content/deckbrowser.css)
+  content/browser.css                  (content/browser.css)
   content/scrollbars.css               (content/scrollbars.css)
   content/content.css                  (content/content.css)
 % content branding %branding/
 % locale branding @AB_CD@ %branding/
   branding/brand.dtd                   (locale/@AB_CD@/brand/brand.dtd)
   branding/brand.properties            (locale/@AB_CD@/brand/brand.properties)
 
 classic.jar:
 % skin browser classic/1.0 %
   browser.css                          (skin/browser.css)
   images/close.png                     (skin/images/close.png)
   images/close-small.png               (skin/images/close-small.png)
   images/default-favicon.png           (skin/images/default-favicon.png)
   images/identity.png                  (skin/images/identity.png)
   images/starred48.png                 (skin/images/starred48.png)
+  images/page-starred.png              (skin/images/page-starred.png)
+  images/tag.png                       (skin/images/tag.png)
   images/throbber.png                  (skin/images/throbber.png)
   images/throbber.gif                  (skin/images/throbber.gif)
   images/toolbar.png                   (skin/images/toolbar.png)
   images/mono-toolbar.png              (skin/images/mono-toolbar.png)
   images/toolbar-background.png        (skin/images/toolbar-background.png)
 
 @AB_CD@.jar:
 % locale browser @AB_CD@ %
   browser.dtd                          (locale/@AB_CD@/browser.dtd)
   browser.properties                   (locale/@AB_CD@/browser.properties)
+  search.properties                    (locale/@AB_CD@/search.properties)
+  region.properties                    (locale/@AB_CD@/region.properties)
--- a/mobile/chrome/locale/en-US/browser.dtd
+++ b/mobile/chrome/locale/en-US/browser.dtd
@@ -26,16 +26,24 @@
 
 <!ENTITY bookmarkName.label    "Name:">
 <!ENTITY bookmarkFolder.label  "Folder:">
 <!ENTITY bookmarkTags.label    "Tags:">
 <!ENTITY bookmarkRemove.label  "Remove Bookmark">
 <!ENTITY bookmarkCancel.label  "Cancel">
 <!ENTITY bookmarkDone.label    "Done">
 
+<!ENTITY findOnCmd.label     "Find in This Pageā€¦">
+<!ENTITY findOnCmd.accesskey "F">
+<!ENTITY findOnCmd.commandkey "f">
+<!ENTITY findAgainCmd.label  "Find Again">
+<!ENTITY findAgainCmd.accesskey "g">
+<!ENTITY findAgainCmd.commandkey "g">
+<!ENTITY findAgainCmd.commandkey2 "VK_F3">
+
 <!ENTITY identity.unverifiedsite2 "This web site does not supply identity information.">
 <!ENTITY identity.connectedTo "You are connected to">
 <!-- Localization note (identity.runBy) : This string appears between a
 domain name (above) and an organization name (below). E.g.
 
 example.com
 which is run by
 Example Enterprises, Inc.
new file mode 100644
--- /dev/null
+++ b/mobile/chrome/locale/en-US/region.properties
@@ -0,0 +1,34 @@
+# 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
+
+# This is the default set of web based feed handlers shown in the reader
+# selection UI
+browser.contentHandlers.types.0.title=Bloglines
+browser.contentHandlers.types.0.uri=http://www.bloglines.com/login?r=/sub/%s
+browser.contentHandlers.types.1.title=My Yahoo
+browser.contentHandlers.types.1.uri=http://add.my.yahoo.com/rss?url=%s
+browser.contentHandlers.types.2.title=Google
+browser.contentHandlers.types.2.uri=http://fusion.google.com/add?feedurl=%s
+
+# Keyword URL (for location bar searches)
+keyword.URL=http://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=
+
+# increment this number when anything gets changed in the list below.  This will
+# cause Firefox to re-read these prefs and inject any new handlers into the 
+# profile database.  Note that "new" is defined as "has a different URL"; this
+# means that it's not possible to update the name of existing handler, so 
+# don't make any spelling errors here.
+gecko.handlerService.defaultHandlersVersion=1
+
+# The default set of protocol handlers for webcal:
+gecko.handlerService.schemes.webcal.0.name=30 Boxes
+gecko.handlerService.schemes.webcal.0.uriTemplate=http://30boxes.com/external/widget?refer=ff&url=%s
+
+# The default set of protocol handlers for mailto:
+gecko.handlerService.schemes.mailto.0.name=Yahoo! Mail
+gecko.handlerService.schemes.mailto.0.uriTemplate=http://compose.mail.yahoo.com/?To=%s 
+
new file mode 100755
--- /dev/null
+++ b/mobile/chrome/locale/en-US/search.properties
@@ -0,0 +1,25 @@
+searchtip=Search using %S
+
+cmd_clearHistory=Clear Search History
+cmd_clearHistory_accesskey=C
+
+cmd_showSuggestions=Show Suggestions
+cmd_showSuggestions_accesskey=S
+
+addEngineConfirmTitle=Add Search Engine
+addEngineConfirmation=Add "%S" to the list of engines available in the search bar?\n\nFrom: %S
+addEngineUseNowText=Start &using it right away
+addEngineAddButtonLabel=Add
+
+error_loading_engine_title=Download Error
+# LOCALIZATION NOTE (error_loading_engine_msg2): %1$S = brandShortName, %2$S = location
+error_loading_engine_msg2=%S could not download the search plugin from:\n%S
+error_duplicate_engine_msg=%S could not install the search plugin from "%S" because an engine with the same name already exists.
+
+error_invalid_engine_title=Install Error
+# LOCALIZATION NOTE (error_invalid_engine_msg): %S = brandShortName
+error_invalid_engine_msg=This search engine isn't supported by %S and can't be installed.
+
+cmd_addFoundEngine=Add "%S"
+
+suggestion_label=Suggestions
--- a/mobile/chrome/skin/browser.css
+++ b/mobile/chrome/skin/browser.css
@@ -150,17 +150,17 @@ toolbarbutton.browser-control-button {
 #tool-bookmarks {
   -moz-image-region: rect(1px 190px 37px 160px);
 }
 
 #tool-actions {
   -moz-image-region: rect(0px 242px 45px 197px);
 }
 
-#tool-search {
+.tool-search {
   list-style-image: url("chrome://browser/skin/images/mono-toolbar.png");
   -moz-image-region: rect(0px 36px 36px 0px);
 }
 
 #toolbar-main[mode="loading"] > #urlbar-icons > #tool-go,
 #toolbar-main[mode="loading"] > #urlbar-icons > #tool-reload {
   visibility: collapse;
 }
@@ -216,17 +216,17 @@ toolbarbutton.browser-control-button {
 
 
 /* URL List */
 #urllist-container {
   background-color: rgba(123,125,123,0.9);
   padding: 8px;
 }
 
-#urllist-items {
+#urllist-items, .autocomplete-richlistbox {
   -moz-appearance: none !important;
   background-color: rgba(207,207,207,0.9);
   border: 2px solid #fff !important;
   -moz-border-radius: 10px;
 }
 
 .urllist-item {
   -moz-appearance: none !important;
@@ -234,23 +234,81 @@ toolbarbutton.browser-control-button {
   color: #000;
 }
 
 .urllist-image {
   width: 24px;
   height: 24px;
 }
 
-#urllist-search {
+#urllist-search, #autocomplete_navbuttons {
   background-color: rgba(207,207,207,0.9);
   border: 2px solid #fff !important;
   -moz-border-radius: 10px;
   _moz-box-align: start;
 }
 
+/* autocomplete */
+
+#popup_autocomplete {
+  moz-appearance: none;
+  background-color: rgba(207,207,207,0.9);
+}
+
+#autocomplete_navbuttons {
+  margin-top: 12px;
+}
+
+#PopupAutoCompleteRichResult {
+  direction: ltr !important;
+}
+
+.ac-result-type-bookmark {
+   list-style-image: url("chrome://browser/skin/images/page-starred.png");
+   width: 16px;
+   height: 16px;
+ }
+ 
+.ac-result-type-tag {
+   list-style-image: url("chrome://browser/skin/images/tag.png");
+   width: 16px;
+   height: 16px;
+ }
+ 
+.ac-comment {
+  font-size: 1.15em;
+}
+
+.ac-extra > .ac-comment {
+  font-size: inherit;
+}
+
+.ac-url-box {
+  display: none;
+}
+
+.ac-url-text {
+  color: GrayText;
+}
+
+.ac-comment[selected="true"], .ac-url-text[selected="true"] {
+  color: inherit !important;
+}
+
+/* find bar */
+
+#findpanel {
+  padding: 0 !important;
+  -moz-appearance: none;
+  background: transparent;
+}
+
+findbar {
+  background: rgba(128, 128, 128, 0.75);
+}
 
 /* Bookmark editor */
 #bookmark-container {
   background-color: rgba(123,125,123,0.9);
   padding: 8px;
 }
 
 #bookmark-form {
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..efc863368c335baddeb3a85521dd2eb25c46e62f
GIT binary patch
literal 718
zc$@*w0x|uGP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV0007&Nkl<ZIE{^x
zy=zlp6o;Spz4zw3P1<NQ3W~8*MX}hVB8r1JIXEb|*g<emsXCR8{soR|Ar69|li=bk
zqJyBlZLI{UwOag4TVrhVb$dTwhgz^0!~<tJ=lmWx=lq0Higq!6yAW1^e+NKF?R@@%
zX}6ox+p2-Uwa=w@70v?ucxyfdZnvA0?TThG9}~JUl09&o?15tlT^})v`PhF00?!#t
zZQI=wO=pRwGo-fl_5_|g_|Fy0Vt-Tx!4?(xJt#H2Y40IWF5r;a+fViVo8gzY`aVgi
z%_7CO!o_h5K$yk+B_YJ1(6p_gSVz`~CnKGkx3jtLDBuAOD3|iobL#V7ahlB)w`G-s
z!2gO;_r=&~-}u&nQ~ewE96=Wr!jK>W@LHgJP`@FX2Y#KvY2p)Qae9vOtCtfJA+CL&
zer9>C8X}ek*9O}H&jEK4>}hC?LG2kd$B~gGoW=r`nUV$KnovqHHoE_0D4u%Id*V_!
znv6rE1nw;OmEU&&5D?!;v(dr3#}l^OS~)W?H2FxZ8EI^E|LJgY<K5oFI};IY4*URw
zwkiaW0?Uar^L)PHG+O5dh9)1bd*i^+>xV1L)snUFc2(>t@B;9Ba9!|SRw_%_4Xd;!
zUI#FXg_LgSxky-o>w{)MN7rg<2Dm<vaDZ-TIkQ+uwKGyu4~c{k)gjRd-5KgNNxdea
zI|GSMjHr$t5(yyrmyuMUa^ZL=rf1Vw%K_yVWvX*O7XZ3<bZyG+=_Z<u5sq6iyJh8o
zkLv)S_Q{aOm#Hd?Gd~^A_HSysybe&At&S{xUcQp)?Fz||2B>|&lXU>8$*J0W^Xbx;
z`Ujzj8wW2>O#ZRnuvyICE0-!)r7m+)lT&MrUq%%gd|}2WQUCw|07*qoM6N<$g7?c)
A8~^|S
new file mode 100755
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..4c876b92b0faf34c5a01102ca80789a1f169e8da
GIT binary patch
literal 517
zc%17D@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!WQl7;NpOBzNqJ&XDuZK6ep0G}
zXKrG8YEWuoN@d~6R2!h8O94J1uK)l4PX~huEB8-WwSVerAUZH>-TqnY4lLNXf8oac
z%eNd@xBbAn9S64V-oJJCf$e(^?Am)^&%OgdaOlJtAXt0l+qx^?w%+)*?Z&tLcfRkx
z`|Z@j@24MryZRi6zCU>L{lVMsPv3oi`u_XNkKbN>{QmCq_fKEGfBE+P>$mSfu=UQr
zo%jCjy7zD2ga7*<{M!#CAO1V?=--jYK=l9Qvwx?a{yX*T-}x6n^#AJXe^+1szxDRt
zt#|)#zx)5-!@ma~{y+Ti@7ZS{`v2zZ|2N<Moo#-j1@xVENswPKgG0j>bg+N_7i^$w
z+MEwSZIe7*9780+V^5vsYcddUyC~_=6T+f$WUkt~FMsEs^0<EC+<Z-^#rMuWv6gJu
zFCcK)G<spnBfA@0r%zyPUoQUKBF!M**iLN`ub$QR<;&*I41Xb8X1;M&hd9H^cXKyo
z`38z{*qAQLdSwy8)FITTb|~g$3TK0cOv_of|34WLl$Kjn-DOaD^>1n!U-@&Pht@iE
b<?ncJC<RZOqZ=FwbRC1ItDnm{r-UW|0#Y-#