Bug 456077 - No mechanism to edit popup preferences [r=mark.finkle]
authorVivien Nicolas <21@vingtetun.org>
Wed, 24 Mar 2010 15:55:09 -0400
changeset 66059 5f93ac19646466b95fc6eea337d1705ae88e88b5
parent 66058 28d9455e981aff2b62e80cca32290679c0849eea
child 66060 8a3827d7fe3f580bf1456a25ff163e867caa2935
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmark
bugs456077
Bug 456077 - No mechanism to edit popup preferences [r=mark.finkle]
mobile/chrome/content/bindings/pageaction.xml
mobile/chrome/content/browser-ui.js
mobile/chrome/content/browser.css
mobile/chrome/content/browser.js
mobile/chrome/content/browser.xul
mobile/chrome/jar.mn
mobile/locales/en-US/chrome/browser.dtd
mobile/locales/en-US/chrome/browser.properties
mobile/themes/hildon/browser.css
mobile/themes/hildon/images/arrowdowndark-16.png
mobile/themes/hildon/images/arrowupdark-16.png
mobile/themes/hildon/jar.mn
mobile/themes/wince/browser-high.css
mobile/themes/wince/browser-low.css
mobile/themes/wince/browser.css
mobile/themes/wince/images/arrowdowndark-16.png
mobile/themes/wince/images/arrowupdark-16.png
new file mode 100644
--- /dev/null
+++ b/mobile/chrome/content/bindings/pageaction.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!-- ***** 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 Mobile Browser.
+   -
+   - The Initial Developer of the Original Code is
+   - Mozilla Corporation.
+   - Portions created by the Initial Developer are Copyright (C) 2010
+   - the Initial Developer. All Rights Reserved.
+   -
+   - Contributor(s):
+   -
+   - 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 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 ***** -->
+
+<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="pageaction" display="xul:hbox">
+    <content>
+      <xul:hbox align="center">
+        <xul:image xbl:inherits="src=image" class="pageaction-image"/>
+      </xul:hbox>
+      <xul:vbox pack="center" flex="1">
+        <xul:label class="pageaction-title" xbl:inherits="value=title" crop="end"/>
+        <xul:label class="pageaction-desc" value="" xbl:inherits="value=description" crop="end"/>
+      </xul:vbox>
+    </content>
+  </binding>
+
+</bindings>
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -372,16 +372,19 @@ var BrowserUI = {
     delete this.starButton;
     return this.starButton = document.getElementById("tool-star");
   },
 
   sizeControls : function(windowW, windowH) {
     // tabs
     document.getElementById("tabs").resize();
 
+    // Site menu
+    PageActions.resize();
+
     // awesomebar
     let popup = document.getElementById("popup_autocomplete");
     popup.top = this.toolbarH;
     popup.height = windowH - this.toolbarH;
     popup.width = windowW;
 
     // form helper
     let formHelper = document.getElementById("form-helper-container");
@@ -606,34 +609,16 @@ var BrowserUI = {
     // If no tab is passed in, assume the current tab
     Browser.closeTab(aTab || Browser.selectedTab);
   },
 
   selectTab : function selectTab(aTab) {
     Browser.selectedTab = aTab;
   },
 
-  hideTabs: function hideTabs() {
-/*
-    if (ws.isWidgetVisible("tabs-container")) {
-      let widthOfTabs = document.getElementById("tabs-container").boxObject.width;
-      ws.panBy(widthOfTabs, 0, true);
-    }
-*/
-  },
-
-  hideControls: function hideControls() {
-/*
-    if (ws.isWidgetVisible("browser-controls")) {
-      let widthOfControls = document.getElementById("browser-controls").boxObject.width;
-      ws.panBy(-widthOfControls, 0, true);
-    }
-*/
-  },
-
   isTabsVisible: function isTabsVisible() {
     // The _1, _2 and _3 are to make the js2 emacs mode happy
     let [leftvis,_1,_2,_3] = Browser.computeSidebarVisibility();
     return (leftvis > 0.002);
   },
 
   showPanel: function showPanel(aPage) {
     Elements.panelUI.left = 0;
@@ -858,16 +843,150 @@ var BrowserUI = {
         break;
       case "cmd_zoomout":
         Browser.zoom(1);
         break;
     }
   }
 };
 
+var PageActions = {
+  get _permissionManager() {
+    delete this._permissionManager;
+    return this._permissionManager = Cc["@mozilla.org/permissionmanager;1"].getService(Ci.nsIPermissionManager);
+  },
+
+  get _loginManager() {
+    delete this._loginManager;
+    return this._loginManager = Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager);
+  },
+
+  // This is easy for an addon to add his own perm type here
+  _permissions: ["popup", "offline-app", "geo"],
+
+  _forEachPermissions: function _forEachPermissions(aHost, aCallback) {
+    let pm = this._permissionManager;
+    for (let i = 0; i < this._permissions.length; i++) {
+      let type = this._permissions[i];
+      if (!pm.testPermission(aHost, type))
+        continue;
+
+      let perms = pm.enumerator;
+      while (perms.hasMoreElements()) {
+        let permission = perms.getNext().QueryInterface(Ci.nsIPermission);
+        if (permission.host == aHost.asciiHost && permission.type == type)
+          aCallback(type);
+      }
+    }
+  },
+
+  updatePagePermissions: function updatePagePermissions() {
+    let host = Browser.selectedBrowser.currentURI;
+    let permissions = [];
+
+    this._forEachPermissions(host, function(aType) {
+      permissions.push(aType);
+    });
+
+    let lm = this._loginManager;
+    if (!lm.getLoginSavingEnabled(host.prePath)) {
+      permissions.push("password");
+    }
+
+    // Show the clear site preferences button if needed
+    if (permissions.length) {
+      let title = Elements.browserBundle.getString("pageactions.reset");
+      let description = [];
+      for each(permission in permissions)
+        description.push(Elements.browserBundle.getString("pageactions." + permission));
+
+      let node = this.appendItem(title, description.join(", "));
+      node.onclick = function(event) {
+        PageActions.clearPagePermissions();
+        PageActions.removeItem(node);
+      }
+    }
+
+    // Show the password button if needed
+    let logins = lm.getAllLogins({});
+    for each(login in logins) {
+      if (login.hostname != host.prePath)
+        continue;
+
+      let title = Elements.browserBundle.getString("pageactions.password.forget");
+      let node = this.appendItem(title, "");
+      node.onclick = function(event) {
+        lm.removeLogin(login);
+        PageActions.removeItem(node);
+      };
+    }
+  },
+
+  clearPagePermissions: function clearPagePermissions() {
+    let pm = this._permissionManager;
+    let host = Browser.selectedBrowser.currentURI;
+    this._forEachPermissions(host, function(aType) {
+      pm.remove(host.asciiHost, aType);
+    });
+
+    let lm = this._loginManager;
+    if (!lm.getLoginSavingEnabled(host.prePath))
+      lm.setLoginSavingEnabled(host.prePath, true);
+  },
+
+  appendItem: function appendItem(aTitle, aDesc, aImage) {
+    let container = document.getElementById("pageactions-container");
+    let item = document.createElement("pageaction");
+    item.setAttribute("title", aTitle);
+    item.setAttribute("description", aDesc);
+    if (aImage)
+      item.setAttribute("image", aImage);
+    container.appendChild(item);
+
+    this.resize();
+    container.hidden = !container.hasChildNodes();
+
+    return item;
+  },
+
+  removeItem: function removeItem(aItem) {
+    let container = document.getElementById("pageactions-container");
+    container.removeChild(aItem);
+
+    if (container.hasChildNodes())
+      this.resize();
+    container.hidden = !container.hasChildNodes();
+  },
+
+  removeAllItems: function removeAllItems() {
+    let container = document.getElementById("pageactions-container");
+    while(container.hasChildNodes())
+      this.removeItem(container.lastChild);
+  },
+
+  resize: function resize() {
+    let container = document.getElementById("pageactions-container");
+    if (container.hidden)
+      return;
+
+    // We manually size the arrowscrollbox
+    let childHeight = container.firstChild.getBoundingClientRect().height;
+    let linesCount = (window.innerHeight < window.innerWidth) ? Math.round(container.childNodes.length / 2)
+                                                              : container.childNodes.length;
+
+    const kMargin = 64;
+    let toolbarHeight = BrowserUI.toolbarH;
+    let identityHeight = document.getElementById("identity-popup-container").getBoundingClientRect().height;
+    let maxHeight = window.innerHeight - (toolbarHeight + identityHeight) - kMargin;
+
+    let additional = 50; // size of the scroll arrows + margins
+    container.style.height = Math.min(maxHeight, linesCount * childHeight + additional) + "px";
+  }
+}
+
 var NewTabPopup = {
   _timeout: 0,
   _tabs: [],
 
   get box() {
     delete this.box;
     return this.box = document.getElementById("newtab-popup");
   },
--- a/mobile/chrome/content/browser.css
+++ b/mobile/chrome/content/browser.css
@@ -188,10 +188,14 @@ richlistitem[type="warning"] {
   -moz-binding: url("chrome://browser/content/bindings/console.xml#error");
 }
 
 richlistitem[type="message"]{
   -moz-binding: url("chrome://browser/content/bindings/console.xml#message");
 }
 
 dialog {
-    -moz-binding: url("chrome://browser/content/bindings/dialog.xml#dialog");
+  -moz-binding: url("chrome://browser/content/bindings/dialog.xml#dialog");
 }
+
+pageaction {
+  -moz-binding: url("chrome://browser/content/bindings/pageaction.xml#pageaction");
+}
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -1633,41 +1633,32 @@ const BrowserSearch = {
 
   updatePageSearchEngines: function() {
     // Check to see whether we've already added an engine with this title in
     // the search list
     let newEngines = this._currentEngines.filter(function(element) {
       return !this.engines.some(function (e) e.name == element.engine.title);
     }, this);
 
-    let container = document.getElementById('search-container');
-    let buttons = container.getElementsByAttribute("class", "search-engine-button button-dark");
-    for (let i=0; i<buttons.length; i++)
-      container.removeChild(buttons[i]);
-
-    if (newEngines.length == 0) {
-      container.collapsed = true;
+    if (newEngines.length == 0)
       return;
-    }
 
     // XXX limit to the first search engine for now
     for (let i = 0; i<1; i++) {
-      let button = document.createElement("button");
-      button.className = "search-engine-button button-dark";
-      button.setAttribute("oncommand", "BrowserSearch.addPermanentSearchEngine(this.engine);this.parentNode.collapsed=true;");
-
-      let engine = newEngines[i];
-      button.engine = engine.engine;
-      button.setAttribute("label", engine.engine.title);
-      button.setAttribute("image", BrowserUI._favicon.src);
-
-      container.appendChild(button);
+      let engine = newEngines[i].engine;
+      let item = PageActions.appendItem(engine.title,
+                                        Elements.browserBundle.getString("pageactions.search.addNew"),
+                                        BrowserUI._favicon.src);
+
+      item.engine = engine;
+      item.onclick = function() {
+        BrowserSearch.addPermanentSearchEngine(item.engine);
+        PageActions.removeItem(item);
+      };
     }
-
-    container.collapsed = false;
   },
 
   addPermanentSearchEngine: function (aEngine) {
     let iconURL = BrowserUI._favicon.src;
     this.searchService.addEngine(aEngine.href, Ci.nsISearchEngine.DATA_XML, iconURL, false);
 
     this._engines = null;
   },
@@ -2068,18 +2059,24 @@ IdentityHandler.prototype = {
     }
 
     // Push the appropriate strings out to the UI
     this._identityPopupContentHost.textContent = host;
     this._identityPopupContentOwner.textContent = owner;
     this._identityPopupContentSupp.textContent = supplemental;
     this._identityPopupContentVerif.textContent = verifier;
 
+    // clean all the previous result
+    PageActions.removeAllItems();
+
     // Update the search engines results
     BrowserSearch.updatePageSearchEngines();
+
+    // Update the per site permissions results
+    PageActions.updatePagePermissions();
   },
 
   show: function ih_show() {
     // dismiss any dialog which hide the identity popup
     while (BrowserUI.activeDialog)
       BrowserUI.activeDialog.close();
 
     this._identityPopup.hidden = false;
--- a/mobile/chrome/content/browser.xul
+++ b/mobile/chrome/content/browser.xul
@@ -302,19 +302,17 @@
           <description id="identity-popup-content-verifier"/>
         </vbox>
         <vbox align="center" pack="start">
           <image id="identity-popup-encryption-icon"/>
           <description id="identity-popup-encryption-label"/>
         </vbox>
       </hbox>
 
-      <hbox id="search-container" align="center" flex="1">
-        <label id="search-engine-label-add" value="&searchEngine.addSearch;"/>
-      </hbox>
+      <arrowscrollbox id="pageactions-container" orient="vertical" class="window-width" hidden="true"/>
     </vbox>
 
     <vbox id="newtab-popup" hidden="true" class="dialog-dark" onclick="NewTabPopup.selectTab()" align="center" left="21">
       <label/>
     </vbox>
 
     <vbox id="bookmark-popup" hidden="true" class="dialog-dark" align="center" left="0">
       <label value="&bookmarkPopup.label;"/>
--- a/mobile/chrome/jar.mn
+++ b/mobile/chrome/jar.mn
@@ -17,16 +17,17 @@ chrome.jar:
   content/firstRunAnimation.gif        (content/firstRunAnimation.gif)
   content/tabs.xml                     (content/tabs.xml)
   content/bindings/checkbox.xml        (content/bindings/checkbox.xml)
   content/notification.xml             (content/notification.xml)
   content/bindings/extensions.xml      (content/bindings/extensions.xml)
   content/bindings/downloads.xml       (content/bindings/downloads.xml)
   content/bindings/console.xml         (content/bindings/console.xml)
   content/bindings/dialog.xml          (content/bindings/dialog.xml)
+  content/bindings/pageaction.xml      (content/bindings/pageaction.xml)
   content/bindings/setting.xml         (content/bindings/setting.xml)
   content/browser.css                  (content/browser.css)
   content/cursor.css                   (content/cursor.css)
   content/content.css                  (content/content.css)
   content/checkerboard.png             (content/checkerboard.png)
 % content branding %content/branding/
 * content/sanitize.xul                 (content/sanitize.xul)
 * content/sanitize.js                  (content/sanitize.js)
--- a/mobile/locales/en-US/chrome/browser.dtd
+++ b/mobile/locales/en-US/chrome/browser.dtd
@@ -60,18 +60,16 @@
 <!ENTITY downloadResume.label      "Resume">
 <!ENTITY downloadRetry.label       "Retry">
 <!ENTITY downloadRemove.label      "Remove">
 <!ENTITY downloadFailed.label      "Failed">
 
 <!ENTITY noResults.label           "No results">
 <!ENTITY allBookmarks.label        "See all bookmarks">
 
-<!ENTITY searchEngine.addSearch    "Add Search:">
-
 <!ENTITY bookmarkPopup.label       "Page Bookmarked">
 <!ENTITY bookmarkRemove.label      "Remove">
 <!ENTITY bookmarkEdit.label        "Edit">
 
 <!ENTITY identity.unverifiedsite2 "This web site does not supply identity information.">
 <!ENTITY identity.connectedTo2 "Connected to">
 <!-- Localization note (identity.runBy2)
  The layout of the identity dialog prevents combining this into a single string with
--- a/mobile/locales/en-US/chrome/browser.properties
+++ b/mobile/locales/en-US/chrome/browser.properties
@@ -113,8 +113,17 @@ typeWarning=Warning:
 # Offline web applications
 offlineApps.available=%S wants to store data on your computer for offline use.
 offlineApps.allow=Allow
 offlineApps.never=Don't Allow
 offlineApps.notNow=Not Now
 
 # Bookmark List
 bookmarkList.desktop=Desktop Bookmarks
+
+# Page Actions
+pageactions.search.addNew=Add a New Search Engine
+pageactions.password.forget=Forget Password
+pageactions.reset=Clear Site Preferences
+pageactions.geo=Geolocation
+pageactions.popup=Popup
+pageactions.offline-app=Offline Storage
+pageactions.password=Password
--- a/mobile/themes/hildon/browser.css
+++ b/mobile/themes/hildon/browser.css
@@ -839,39 +839,82 @@ box[type="documenttab"]:only-child .docu
   list-style-image: url("chrome://browser/skin/images/unlock-40.png");
 }
 
 #identity-container[mode="verifiedIdentity"] > hbox > vbox > #identity-popup-encryption-icon ,
 #identity-container[mode="verifiedDomain"] > hbox > vbox > #identity-popup-encryption-icon {
   list-style-image: url("chrome://browser/skin/images/lock-40.png");
 }
 
-/* search popup   ---------------------------------------------------------- */
-#search-container {
+/* Page Actions popup   ---------------------------------------------------- */
+#pageactions-container {
   border: 2px solid transparent;
   -moz-border-top-colors: #212429 #52555a;
-  padding: 8px; /* core spacing */
-  margin-top: 8px;
-}
-
-#search-engine-label-add {
-  font-size: 18px;
-}
-
-#search-buttons,
-.search-engine-button {
+  padding: 0 8px;
   -moz-user-focus: ignore;
 }
 
-.search-engine-button .button-icon {
+#pageactions-container .scrollbox-innerbox {
+  display: inline-block;
+}
+
+#pageactions-container .autorepeatbutton-down {
+  list-style-image: url(images/arrowdowndark-16.png);
+}
+
+#pageactions-container .autorepeatbutton-up {
+  list-style-image: url(images/arrowupdark-16.png);
+}
+
+/* force the autorepeat buttons to create a 'padding' when collapsed */
+#pageactions-container autorepeatbutton[collapsed="true"],
+#pageactions-container autorepeatbutton[disabled="true"] {
+  visibility: hidden;
+}
+
+pageaction {
+  width: 50%;
+  height: 64px;
+  border-width: 10px;
+  -moz-border-image: url("chrome://browser/skin/images/toolbarbutton-default-64.png") 10 repeat repeat;
+}
+
+@media all and (orientation: portrait) {
+  pageaction {
+    width :100%;
+  }
+}
+
+pageaction:active:hover {
+  -moz-border-image: url("chrome://browser/skin/images/toolbarbutton-active-64.png") 10 repeat repeat;
+}
+
+pageaction .pageaction-image {
   width: 32px;
   height: 32px;
   -moz-margin-end: 8px;
 }
 
+pageaction:not([image]) .pageaction-image {
+  width: 0px;
+}
+
+pageaction .pageaction-title {
+  font-size: 18px !important;
+}
+
+pageaction .pageaction-desc {
+  font-size: 14px !important;
+  color: grey;
+}
+
+pageaction .pageaction-desc[value=""] {
+  display: none;
+}
+
 /* Preferences window   ---------------------------------------------------- */
 .settings-title {
   font-weight: bold;
   color: black;
   background-color: lightgray;
   margin: 0;
   padding: 2px;
 }
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..733d8a6b4ee8d6895cdf1265f59aea8361bb5719
GIT binary patch
literal 286
zc%17D@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@
z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-;6_gu#}JFtM<>|w9a4~Rh<_ycg|DT8O{`p)
z@4$g$tvfufm%X^O(ENp9$+4x~dRK1TT5sR{QI&=5-f8v^`Fxf3%;FE&Y{KRU7o2@=
z?XcmRnc*?N>{!M;$Fiu`TE}igW=ktDh@AKFT4{dliqjFv<X2OI?C-F51tutdQtfV>
zd1B2UNe-`-L0ul3f>z1=bLjE#c^WI|c~2yA@_oVgwboPjet#=gX|^d`&Nlt^4WZ+E
b>W*`NSGJ0kRL$Q4bUcHntDnm{r-UW|rju&O
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b7ec24409ce6c3d0a4987a59dbefd819ba0cfda0
GIT binary patch
literal 301
zc%17D@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@
z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0--~mq;#}JFtXD4msY6=i>=>Nhj`o#Xu!TgH<
z7cYEZJ81t=zv&xWVQJx6O`aCB`U5W=6DH_dO|d(x@Z!MSd$#O)Ha`q!m+ey$nCRjn
zq%cD_d#%53_qAUp>YtR(_p&HWG7(#LPIBsUCHa%vPAtgjSvfUmWssKXu`9_FZ>TX_
zC!}{X6zYFaE9Y^mV(iZ8W%$Sx@vL&+x>c{9{r;zVdXsH|1jn4yn`&GFw-m`dmuq{t
sRii8U`wPbC1AiYZ-uZUj@%RrcK|5S(+g09~0R6(?>FVdQ&MBb@0MagY#sB~S
--- a/mobile/themes/hildon/jar.mn
+++ b/mobile/themes/hildon/jar.mn
@@ -19,16 +19,18 @@ chrome.jar:
   images/panel-shadow.png              (images/panel-shadow.png)
   images/addons-32.png                 (images/addons-32.png)
   images/arrowleft-16.png              (images/arrowleft-16.png)
   images/arrowright-16.png             (images/arrowright-16.png)
   images/arrowup-16.png                (images/arrowup-16.png)
   images/arrowdown-16.png              (images/arrowdown-16.png)
   images/arrowleftdark-16.png          (images/arrowleftdark-16.png)
   images/arrowrightdark-16.png         (images/arrowrightdark-16.png)
+  images/arrowupdark-16.png            (images/arrowupdark-16.png)
+  images/arrowdowndark-16.png          (images/arrowdowndark-16.png)
   images/ratings-18.png                (images/ratings-18.png)
   images/favicon-default-30.png        (images/favicon-default-30.png)
   images/star-40.png                   (images/star-40.png)
   images/star-24.png                   (images/star-24.png)
   images/throbber.png                  (images/throbber.png)
   images/navigation-magnifier-30.png   (images/navigation-magnifier-30.png)
   images/folder-32.png                 (images/folder-32.png)
   images/stop-30.png                   (images/stop-30.png)
--- a/mobile/themes/wince/browser-high.css
+++ b/mobile/themes/wince/browser-high.css
@@ -100,19 +100,30 @@
   background: url("images/leftcapSSL-default-64.png");
 }
 
 #identity-box[mode="verifiedDomain"]:hover:active,
 #identity-box[mode="verifiedDomain"][open] {
   background: url("images/leftcapSSL-active-64.png");
 }
 
-.search-engine-button .button-icon {
+pageaction {
+  height: 64px;
+  border-width: 10px;
+  -moz-border-image: url("chrome://browser/skin/images/toolbarbutton-default-64.png") 10 repeat repeat;
+}
+
+pageaction:active:hover {
+  -moz-border-image: url("chrome://browser/skin/images/toolbarbutton-active-64.png") 10 repeat repeat;
+}
+
+pageaction .pageaction-image {
   width: 32px;
   height: 32px;
+  -moz-margin-end: 8px;
 }
 
 #urlbar-throbber[loading] {
   list-style-image: url("chrome://browser/skin/images/throbber.png");
 }
 
 #urlbar-favicon {
   width: 32px;
--- a/mobile/themes/wince/browser-low.css
+++ b/mobile/themes/wince/browser-low.css
@@ -99,19 +99,30 @@
   background: url("images/leftcapSSL-default-36.png");
 }
 
 #identity-box[mode="verifiedDomain"]:hover:active,
 #identity-box[mode="verifiedDomain"][open] {
   background: url("images/leftcapSSL-active-36.png");
 }
 
-.search-engine-button .button-icon {
+pageaction {
+  height: 36px;
+  border-width: 6px;
+  -moz-border-image: url("chrome://browser/skin/images/toolbarbutton-default-36.png") 6 repeat repeat;
+}
+
+pageaction:active:hover {
+  -moz-border-image: url("chrome://browser/skin/images/toolbarbutton-active-36.png") 6 repeat repeat;
+}
+
+pageaction .pageaction-image {
   width: 16px;
   height: 16px;
+  -moz-margin-end: 4px;
 }
 
 #urlbar-throbber[loading] {
   list-style-image: url("chrome://browser/skin/images/throbber.png");
 }
 
 #urlbar-favicon {
   width: 24px;
--- a/mobile/themes/wince/browser.css
+++ b/mobile/themes/wince/browser.css
@@ -518,31 +518,67 @@ box[type="documenttab"]:only-child .docu
   font-size: 8pt !important;
 }
 
 #identity-popup-content-host,
 #identity-popup-content-owner {
   font-weight: bold;
 }
 
-/* search popup   ---------------------------------------------------------- */
-#search-container {
+/* Page Actions popup   ----------------------------------------------------- */
+#pageactions-container {
   border: 0.2mm solid transparent;
   -moz-border-top-colors: #212429 #52555a;
-  padding: 1.1mm; /* core spacing */
-  margin-top: 1.1mm; /* core spacing */
+  padding: 0 1.1mm; /* core spacing */
+  -moz-user-focus: ignore;
+}
+
+#pageactions-container .scrollbox-innerbox {
+  display: inline-block;
+}
+
+#pageactions-container .autorepeatbutton-down {
+  list-style-image: url(images/arrowdowndark-16.png);
+}
+
+#pageactions-container .autorepeatbutton-up {
+  list-style-image: url(images/arrowupdark-16.png);
+}
+
+/* force the autorepeat buttons to create a 'padding' when collapsed */
+#pageactions-container autorepeatbutton[collapsed="true"],
+#pageactions-container autorepeatbutton[disabled="true"] {
+  visibility: hidden;
 }
 
-#search-engine-label-add {
-  font-size: 80%;
+pageaction {
+  width: 50%;
+}
+
+@media all and (orientation: portrait) {
+  pageaction {
+    width :100%;
+  }
 }
 
-#search-buttons,
-.search-engine-button {
-  -moz-user-focus: ignore;
+pageaction:not([image]) .pageaction-image {
+  width: 0;
+}
+
+pageaction .pageaction-title {
+  font-size: 9pt !important;
+}
+
+pageaction .pageaction-desc[value=""] {
+  display: none;
+}
+
+pageaction .pageaction-desc {
+  font-size: 8pt !important;
+  color: grey;
 }
 
 /* Preferences window   ---------------------------------------------------- */
 .settings-title {
   font-weight: bold;
   color: black;
   background-color: lightgray;
   margin: 0;
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..733d8a6b4ee8d6895cdf1265f59aea8361bb5719
GIT binary patch
literal 286
zc%17D@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@
z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-;6_gu#}JFtM<>|w9a4~Rh<_ycg|DT8O{`p)
z@4$g$tvfufm%X^O(ENp9$+4x~dRK1TT5sR{QI&=5-f8v^`Fxf3%;FE&Y{KRU7o2@=
z?XcmRnc*?N>{!M;$Fiu`TE}igW=ktDh@AKFT4{dliqjFv<X2OI?C-F51tutdQtfV>
zd1B2UNe-`-L0ul3f>z1=bLjE#c^WI|c~2yA@_oVgwboPjet#=gX|^d`&Nlt^4WZ+E
b>W*`NSGJ0kRL$Q4bUcHntDnm{r-UW|rju&O
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b7ec24409ce6c3d0a4987a59dbefd819ba0cfda0
GIT binary patch
literal 301
zc%17D@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@
z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0--~mq;#}JFtXD4msY6=i>=>Nhj`o#Xu!TgH<
z7cYEZJ81t=zv&xWVQJx6O`aCB`U5W=6DH_dO|d(x@Z!MSd$#O)Ha`q!m+ey$nCRjn
zq%cD_d#%53_qAUp>YtR(_p&HWG7(#LPIBsUCHa%vPAtgjSvfUmWssKXu`9_FZ>TX_
zC!}{X6zYFaE9Y^mV(iZ8W%$Sx@vL&+x>c{9{r;zVdXsH|1jn4yn`&GFw-m`dmuq{t
sRii8U`wPbC1AiYZ-uZUj@%RrcK|5S(+g09~0R6(?>FVdQ&MBb@0MagY#sB~S