Merge mozilla-inbound and mozilla-central
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 08 Sep 2011 11:50:16 -0400
changeset 76736 b2664107f9766671f4c4d19a1143e56fc2236929
parent 76735 0907fce1e6fcfc545933a2f71471f19a04050dad (current diff)
parent 76714 4be2da039559773ee412fce9aa22c007718a4cb3 (diff)
child 76737 cab14cba2f3d0eab2482c05cba950c3e0710153a
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
milestone9.0a1
Merge mozilla-inbound and mozilla-central
mobile/themes/core/gingerbread/images/close-active-tablet-hdpi.png
mobile/themes/core/gingerbread/images/close-background-hdpi.png
mobile/themes/core/gingerbread/images/close-default-tablet-hdpi.png
mobile/themes/core/gingerbread/images/close-inactive-tab-tablet-hdpi.png
mobile/themes/core/gingerbread/images/newtab-default-tablet-hdpi.png
mobile/themes/core/honeycomb/images/close-active-tablet-hdpi.png
mobile/themes/core/honeycomb/images/close-background-hdpi.png
mobile/themes/core/honeycomb/images/close-default-tablet-hdpi.png
mobile/themes/core/honeycomb/images/close-inactive-tab-tablet-hdpi.png
mobile/themes/core/honeycomb/images/newtab-default-tablet-hdpi.png
mobile/themes/core/images/close-active-tablet-hdpi.png
mobile/themes/core/images/close-background-hdpi.png
mobile/themes/core/images/close-default-tablet-hdpi.png
mobile/themes/core/images/close-inactive-tab-tablet-hdpi.png
mobile/themes/core/images/newtab-default-tablet-hdpi.png
mobile/themes/core/tablet.css
--- a/browser/base/content/highlighter.css
+++ b/browser/base/content/highlighter.css
@@ -7,19 +7,20 @@
   top: 0;
   left: 0;
 }
 
 #highlighter-veil-container {
   overflow: hidden;
 }
 
-.highlighter-veil,
-#highlighter-veil-middlebox,
-#highlighter-veil-transparentbox {
+#highlighter-veil-container:not([locked]) > .highlighter-veil,
+#highlighter-veil-container:not([locked]) > #highlighter-veil-middlebox,
+#highlighter-veil-container:not([locked]) > #highlighter-veil-middlebox > .highlighter-veil,
+#highlighter-veil-container:not([locked]) > #highlighter-veil-middlebox > #highlighter-veil-transparentbox {
   -moz-transition-property: width, height;
   -moz-transition-duration: 0.1s;
   -moz-transition-timing-function: linear;
 }
 
 #highlighter-veil-bottombox,
 #highlighter-veil-rightbox {
   -moz-box-flex: 1;
--- a/browser/base/content/inspector.js
+++ b/browser/base/content/inspector.js
@@ -105,31 +105,31 @@ Highlighter.prototype = {
     this.browser = aBrowser;
     let stack = this.browser.parentNode;
     this.win = this.browser.contentWindow;
     this._highlighting = false;
 
     this.highlighterContainer = document.createElement("stack");
     this.highlighterContainer.id = "highlighter-container";
 
-    let veilBox = document.createElement("vbox");
-    veilBox.id = "highlighter-veil-container";
+    this.veilContainer = document.createElement("vbox");
+    this.veilContainer.id = "highlighter-veil-container";
 
     let controlsBox = document.createElement("box");
     controlsBox.id = "highlighter-controls";
 
     // The veil will make the whole page darker except
     // for the region of the selected box.
-    this.buildVeil(veilBox);
+    this.buildVeil(this.veilContainer);
 
     // The controlsBox will host the different interactive
     // elements of the highlighter (buttons, toolbars, ...).
     this.buildControls(controlsBox);
 
-    this.highlighterContainer.appendChild(veilBox);
+    this.highlighterContainer.appendChild(this.veilContainer);
     this.highlighterContainer.appendChild(controlsBox);
 
     stack.appendChild(this.highlighterContainer);
 
     this.browser.addEventListener("resize", this, true);
     this.browser.addEventListener("scroll", this, true);
 
     this.handleResize();
@@ -218,16 +218,17 @@ Highlighter.prototype = {
     this.browser.removeEventListener("scroll", this, true);
     this.browser.removeEventListener("resize", this, true);
     this._highlightRect = null;
     this._highlighting = false;
     this.veilTopBox = null;
     this.veilLeftBox = null;
     this.veilMiddleBox = null;
     this.veilTransparentBox = null;
+    this.veilContainer = null;
     this.node = null;
     this.highlighterContainer.parentNode.removeChild(this.highlighterContainer);
     this.highlighterContainer = null;
     this.win = null
     this.browser = null;
     this.toolbar = null;
   },
 
@@ -920,17 +921,17 @@ var InspectorUI = {
     // if currently editing an attribute value, starting
     // "live inspection" mode closes the editor
     if (this.editingContext)
       this.closeEditor();
 
     document.getElementById("inspector-inspect-toolbutton").checked = true;
     this.attachPageListeners();
     this.inspecting = true;
-    this.highlighter.veilTransparentBox.removeAttribute("locked");
+    this.highlighter.veilContainer.removeAttribute("locked");
   },
 
   /**
    * Stop inspecting webpage, detach page listeners, disable highlighter
    * event listeners.
    * @param aPreventScroll
    *        Prevent scroll in the HTML tree?
    */
@@ -943,17 +944,17 @@ var InspectorUI = {
     document.getElementById("inspector-inspect-toolbutton").checked = false;
     this.detachPageListeners();
     this.inspecting = false;
     if (this.highlighter.node) {
       this.select(this.highlighter.node, true, true, !aPreventScroll);
     } else {
       this.select(null, true, true);
     }
-    this.highlighter.veilTransparentBox.setAttribute("locked", true);
+    this.highlighter.veilContainer.setAttribute("locked", true);
   },
 
   /**
    * Select an object in the tree view.
    * @param aNode
    *        node to inspect
    * @param forceUpdate
    *        force an update?
--- a/browser/base/content/tabview/groupitems.js
+++ b/browser/base/content/tabview/groupitems.js
@@ -706,33 +706,44 @@ GroupItem.prototype = Utils.extend(new I
         }
       });
 
       this.droppable(false);
       this.removeTrenches();
       this._createUndoButton();
     } else
       this.close();
-    
-    this._makeClosestTabActive();
+
+    this._makeLastActiveGroupItemActive();
   },
   
   // ----------
   // Function: _makeClosestTabActive
   // Make the closest tab external to this group active.
   // Used when closing the group.
   _makeClosestTabActive: function GroupItem__makeClosestTabActive() {
     let closeCenter = this.getBounds().center();
     // Find closest tab to make active
     let closestTabItem = UI.getClosestTab(closeCenter);
     if (closestTabItem)
       UI.setActive(closestTabItem);
   },
 
   // ----------
+  // Function: _makeLastActiveGroupItemActive
+  // Makes the last active group item active.
+  _makeLastActiveGroupItemActive: function GroupItem__makeLastActiveGroupItemActive() {
+    let groupItem = GroupItems.getLastActiveGroupItem();
+    if (groupItem)
+      UI.setActive(groupItem);
+    else
+      this._makeClosestTabActive();
+  },
+
+  // ----------
   // Function: closeIfEmpty
   // Closes the group if it's empty, is closable, and autoclose is enabled
   // (see pauseAutoclose()). Returns true if the close occurred and false
   // otherwise.
   closeIfEmpty: function GroupItem_closeIfEmpty() {
     if (this.isEmpty() && !UI._closedLastVisibleTab &&
         !GroupItems.getUnclosableGroupItemId() && !GroupItems._autoclosePaused) {
       this.close();
@@ -1144,19 +1155,19 @@ GroupItem.prototype = Utils.extend(new I
         item.setResizable(true, options.immediately);
 
       // if a blank tab is selected while restoring a tab the blank tab gets
       // removed. we need to keep the group alive for the restored tab.
       if (item.isRemovedAfterRestore)
         options.dontClose = true;
 
       let closed = options.dontClose ? false : this.closeIfEmpty();
-      if (closed)
-        this._makeClosestTabActive();
-      else if (!options.dontArrange) {
+      if (closed) {
+        this._makeLastActiveGroupItemActive();
+      } else if (!options.dontArrange) {
         this.arrange({animate: !options.immediately});
         this._unfreezeItemSize({dontArrange: true});
       }
 
       this._sendToSubscribers("childRemoved",{ groupItemId: this.id, item: item });
     } catch(e) {
       Utils.log(e);
     }
@@ -1939,16 +1950,17 @@ let GroupItems = {
   _cleanupFunctions: [],
   _arrangePaused: false,
   _arrangesPending: [],
   _removingHiddenGroups: false,
   _delayedModUpdates: [],
   _autoclosePaused: false,
   minGroupHeight: 110,
   minGroupWidth: 125,
+  _lastActiveList: null,
 
   // ----------
   // Function: toString
   // Prints [GroupItems] for debug use
   toString: function GroupItems_toString() {
     return "[GroupItems count=" + this.groupItems.length + "]";
   },
 
@@ -1964,16 +1976,18 @@ let GroupItems = {
 
     // make sure any closed tabs are removed from the delay update list
     function handleClose(event) {
       let idx = self._delayedModUpdates.indexOf(event.target);
       if (idx != -1)
         self._delayedModUpdates.splice(idx, 1);
     }
 
+    this._lastActiveList = new MRUList();
+
     AllTabs.register("attrModified", handleAttrModified);
     AllTabs.register("close", handleClose);
     this._cleanupFunctions.push(function() {
       AllTabs.unregister("attrModified", handleAttrModified);
       AllTabs.unregister("close", handleClose);
     });
   },
 
@@ -2307,16 +2321,17 @@ let GroupItems = {
 
     if (groupItem == this._activeGroupItem)
       this._activeGroupItem = null;
 
     this._arrangesPending = this._arrangesPending.filter(function (pending) {
       return groupItem != pending.groupItem;
     });
 
+    this._lastActiveList.remove(groupItem);
     UI.updateTabButton();
   },
 
   // ----------
   // Function: groupItem
   // Given some sort of identifier, returns the appropriate groupItem.
   // Currently only supports groupItem ids.
   groupItem: function GroupItems_groupItem(a) {
@@ -2418,21 +2433,32 @@ let GroupItems = {
   setActiveGroupItem: function GroupItems_setActiveGroupItem(groupItem) {
     Utils.assert(groupItem, "groupItem must be given");
 
     if (this._activeGroupItem)
       iQ(this._activeGroupItem.container).removeClass('activeGroupItem');
 
     iQ(groupItem.container).addClass('activeGroupItem');
 
+    this._lastActiveList.update(groupItem);
     this._activeGroupItem = groupItem;
     this._save();
   },
 
   // ----------
+  // Function: getLastActiveGroupItem
+  // Gets last active group item.
+  // Returns the <groupItem>. If nothing is found, return null.
+  getLastActiveGroupItem: function GroupItem_getLastActiveGroupItem() {
+    return this._lastActiveList.peek(function(groupItem) {
+      return (groupItem && !groupItem.hidden && groupItem.getChildren().length > 0)
+    });
+  },
+
+  // ----------
   // Function: _updateTabBar
   // Hides and shows tabs in the tab bar based on the active groupItem
   _updateTabBar: function GroupItems__updateTabBar() {
     if (!window.UI)
       return; // called too soon
 
     Utils.assert(this._activeGroupItem, "There must be something to show in the tab bar!");
 
--- a/browser/base/content/tabview/modules/utils.jsm
+++ b/browser/base/content/tabview/modules/utils.jsm
@@ -45,17 +45,17 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 "use strict";
 
 // **********
 // Title: utils.js
 
-let EXPORTED_SYMBOLS = ["Point", "Rect", "Range", "Subscribable", "Utils"];
+let EXPORTED_SYMBOLS = ["Point", "Rect", "Range", "Subscribable", "Utils", "MRUList"];
 
 // #########
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 Cu.import("resource://gre/modules/Services.jsm");
 
 // ##########
@@ -790,8 +790,68 @@ let Utils = {
       try {
         return args[i]();
       } catch (e) {}
     }
 
     return null;
   }
 };
+
+// ##########
+// Class: MRUList
+// A most recently used list.
+//
+// Constructor: MRUList
+// If a is an array of entries, creates a copy of it.
+function MRUList(a) {
+  if (Array.isArray(a))
+    this._list = a.concat();
+  else
+    this._list = [];
+};
+
+MRUList.prototype = {
+  // ----------
+  // Function: toString
+  // Prints [List (entry1, entry2, ...)] for debug use
+  toString: function MRUList_toString() {
+    return "[List (" + this._list.join(", ") + ")]";
+  },
+
+  // ----------
+  // Function: update
+  // Updates/inserts the given entry as the most recently used one in the list.
+  update: function MRUList_update(entry) {
+    this.remove(entry);
+    this._list.unshift(entry);
+  },
+
+  // ----------
+  // Function: remove
+  // Removes the given entry from the list.
+  remove: function MRUList_remove(entry) {
+    let index = this._list.indexOf(entry);
+    if (index > -1)
+      this._list.splice(index, 1);
+  },
+
+  // ----------
+  // Function: peek
+  // Returns the most recently used entry.  If a filter exists, gets the most 
+  // recently used entry which matches the filter.
+  peek: function MRUList_peek(filter) {
+    let match = null;
+    if (filter && typeof filter == "function")
+      this._list.some(function MRUList_peek_getEntry(entry) {
+        if (filter(entry)) {
+          match = entry
+          return true;
+        }
+        return false;
+      });
+    else 
+      match = this._list.length > 0 ? this._list[0] : null;
+
+    return match;
+  },
+};
+
--- a/browser/base/content/test/tabview/Makefile.in
+++ b/browser/base/content/test/tabview/Makefile.in
@@ -125,16 +125,17 @@ include $(topsrcdir)/config/rules.mk
                  browser_tabview_bug630157.js \
                  browser_tabview_bug631662.js \
                  browser_tabview_bug631752.js \
                  browser_tabview_bug633788.js \
                  browser_tabview_bug634077.js \
                  browser_tabview_bug634085.js \
                  browser_tabview_bug634672.js \
                  browser_tabview_bug635696.js \
+                 browser_tabview_bug637840.js \
                  browser_tabview_bug640765.js \
                  browser_tabview_bug641802.js \
                  browser_tabview_bug642793.js \
                  browser_tabview_bug643392.js \
                  browser_tabview_bug644097.js \
                  browser_tabview_bug648882.js \
                  browser_tabview_bug649006.js \
                  browser_tabview_bug649307.js \
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/tabview/browser_tabview_bug637840.js
@@ -0,0 +1,92 @@
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+let cw;
+
+function test() {
+  waitForExplicitFinish();
+
+  newWindowWithTabView(function(win) {
+    registerCleanupFunction(function() {
+      win.close();
+    });
+
+    cw = win.TabView.getContentWindow();
+
+    let groupItemOne = cw.GroupItems.groupItems[0];
+    is(groupItemOne.getChildren().length, 1, "Group one has 1 tab item");
+
+    let groupItemTwo = createGroupItemWithBlankTabs(win, 300, 300, 40, 2);
+    is(groupItemTwo.getChildren().length, 2, "Group two has 2 tab items");
+
+    let groupItemThree = createGroupItemWithBlankTabs(win, 300, 300, 40, 2);
+    is(groupItemThree.getChildren().length, 2, "Group three has 2 tab items");
+
+    testMoreRecentlyUsedGroup(groupItemOne, groupItemTwo, function() {
+      testMoreRecentlyUsedGroup(groupItemOne, groupItemThree, function() {
+        testRemoveGroupAndCheckMoreRecentlyUsedGroup(groupItemOne, groupItemTwo);
+      });
+    });
+  });
+}
+
+function testMoreRecentlyUsedGroup(groupItemOne, otherGroupItem, callback) {
+  let tabItem = otherGroupItem.getChild(1);
+  cw.UI.setActive(tabItem);
+  is(otherGroupItem.getActiveTab(), tabItem, "The second item in the other group is active");
+  is(cw.GroupItems.getActiveGroupItem(), otherGroupItem, "The other group is active");
+
+  let tabItemInGroupItemOne = groupItemOne.getChild(0);
+  cw.UI.setActive(tabItemInGroupItemOne);
+  is(groupItemOne.getActiveTab(), tabItemInGroupItemOne, "The first item in group one is active");
+  is(cw.GroupItems.getActiveGroupItem(), groupItemOne, "The group one is active");
+
+  groupItemOne.addSubscriber("groupHidden", function onHide() {
+    groupItemOne.removeSubscriber("groupHidden", onHide);
+
+    // group item three should have the focus
+    is(otherGroupItem.getActiveTab(), tabItem, "The second item in the other group is active after group one is hidden");
+    is(cw.GroupItems.getActiveGroupItem(), otherGroupItem, "The other group is active active after group one is hidden");
+
+    groupItemOne.addSubscriber("groupShown", function onShown() {
+      groupItemOne.removeSubscriber("groupShown", onShown);
+
+      is(groupItemOne.getActiveTab(), tabItemInGroupItemOne, "The first item in group one is active after it is shown");
+      is(cw.GroupItems.getActiveGroupItem(), groupItemOne, "The group one is active after it is shown");
+
+      callback();
+    });
+    // click on the undo button
+    EventUtils.sendMouseEvent(
+      { type: "click" }, groupItemOne.$undoContainer[0], cw);
+  });
+  // click on the close button of group item one
+  let closeButton = groupItemOne.container.getElementsByClassName("close");
+  ok(closeButton[0], "Group item one close button exists");
+  EventUtils.sendMouseEvent({ type: "click" }, closeButton[0], cw);
+}
+
+function testRemoveGroupAndCheckMoreRecentlyUsedGroup(groupItemOne, groupItemTwo) {
+  let tabItem = groupItemTwo.getChild(0);
+  cw.UI.setActive(tabItem);
+
+  is(groupItemTwo.getActiveTab(), tabItem, "The first item in the group two is active");
+  is(cw.GroupItems.getActiveGroupItem(), groupItemTwo, "The group two is active");
+
+  let tabItemInGroupItemOne = groupItemOne.getChild(0);
+
+  tabItemInGroupItemOne.addSubscriber("close", function onClose() {
+    tabItemInGroupItemOne.removeSubscriber("close", onClose);
+
+    is(groupItemTwo.getActiveTab(), tabItem, "The first item in the group two is still active after group one is closed");
+    is(cw.GroupItems.getActiveGroupItem(), groupItemTwo, "The group two is still active after group one is closed");
+
+    finish();
+  });
+  // close the tab item and the group item
+  let closeButton = tabItemInGroupItemOne.container.getElementsByClassName("close");
+  ok(closeButton[0], "Tab item close button exists");
+  EventUtils.sendMouseEvent({ type: "mousedown" }, closeButton[0], cw);
+  EventUtils.sendMouseEvent({ type: "mouseup" }, closeButton[0], cw);
+}
+
--- a/browser/devtools/styleinspector/CssHtmlTree.jsm
+++ b/browser/devtools/styleinspector/CssHtmlTree.jsm
@@ -42,17 +42,17 @@
 const Cu = Components.utils;
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/PluralForm.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource:///modules/devtools/CssLogic.jsm");
 Cu.import("resource:///modules/devtools/Templater.jsm");
 
-var EXPORTED_SYMBOLS = ["CssHtmlTree"];
+var EXPORTED_SYMBOLS = ["CssHtmlTree", "PropertyView"];
 
 /**
  * CssHtmlTree is a panel that manages the display of a table sorted by style.
  * There should be one instance of CssHtmlTree per style display (of which there
  * will generally only be one).
  *
  * @params {Document} aStyleWin The main XUL browser document
  * @params {CssLogic} aCssLogic How we dig into the CSS. See CssLogic.jsm
@@ -337,42 +337,42 @@ PropertyView.prototype = {
    */
   get propertyInfo()
   {
     return this.tree.cssLogic.getPropertyInfo(this.name);
   },
 
   /**
    * Compute the title of the property view. The title includes the number of
-   * rules that hold the current property.
+   * selectors that match the currently selected element.
    *
    * @param {nsIDOMElement} aElement reference to the DOM element where the rule
    * title needs to be displayed.
    * @return {string} The rule title.
    */
   ruleTitle: function PropertyView_ruleTitle(aElement)
   {
     let result = "";
-    let matchedRuleCount = this.propertyInfo.matchedRuleCount;
+    let matchedSelectorCount = this.propertyInfo.matchedSelectors.length;
 
-    if (matchedRuleCount > 0) {
+    if (matchedSelectorCount > 0) {
       aElement.classList.add("rule-count");
       aElement.firstElementChild.className = "expander";
 
-      let str = CssHtmlTree.l10n("property.numberOfRules");
-      result = PluralForm.get(matchedRuleCount, str)
-          .replace("#1", matchedRuleCount);
+      let str = CssHtmlTree.l10n("property.numberOfSelectors");
+      result = PluralForm.get(matchedSelectorCount, str)
+          .replace("#1", matchedSelectorCount);
     } else if (this.showUnmatchedLink) {
       aElement.classList.add("rule-unmatched");
       aElement.firstElementChild.className = "expander";
 
-      let unmatchedRuleCount = this.propertyInfo.unmatchedRuleCount;
-      let str = CssHtmlTree.l10n("property.numberOfUnmatchedRules");
-      result = PluralForm.get(unmatchedRuleCount, str)
-          .replace("#1", unmatchedRuleCount);
+      let unmatchedSelectorCount = this.propertyInfo.unmatchedSelectors.length;
+      let str = CssHtmlTree.l10n("property.numberOfUnmatchedSelectors");
+      result = PluralForm.get(unmatchedSelectorCount, str)
+          .replace("#1", unmatchedSelectorCount);
     }
     return result;
   },
 
   /**
    * Close the property view.
    */
   close: function PropertyView_close()
@@ -424,18 +424,19 @@ PropertyView.prototype = {
 
   /**
    * The UI has a link to allow the user to display unmatched selectors.
    * This provides localized link text.
    */
   get showUnmatchedLinkText()
   {
     let smur = CssHtmlTree.l10n("rule.showUnmatchedLink");
-    let plural = PluralForm.get(this.propertyInfo.unmatchedRuleCount, smur);
-    return plural.replace("#1", this.propertyInfo.unmatchedRuleCount);
+    let unmatchedSelectorCount = this.propertyInfo.unmatchedSelectors.length;
+    let plural = PluralForm.get(unmatchedSelectorCount, smur);
+    return plural.replace("#1", unmatchedSelectorCount);
   },
 
   /**
    * The action when a user clicks the 'show unmatched' link.
    */
   showUnmatchedLinkClick: function PropertyView_showUnmatchedLinkClick(aEvent)
   {
     this.showUnmatched = true;
--- a/browser/devtools/styleinspector/CssLogic.jsm
+++ b/browser/devtools/styleinspector/CssLogic.jsm
@@ -736,16 +736,18 @@ function CssSheet(aCssLogic, aDomSheet, 
 
   // Cached CssRules from the given stylesheet.
   this._rules = {};
 
   this._ruleCount = -1;
 }
 
 CssSheet.prototype = {
+  _passId: null,
+
   /**
    * Get a source for a stylesheet, taking into account embedded stylesheets
    * for which we need to use document.defaultView.location.href rather than
    * sheet.href
    *
    * @return {string} the address of the stylesheet.
    */
   get href()
@@ -945,16 +947,18 @@ function CssRule(aCssSheet, aDomRule, aE
     this.source = CssLogic.l10n("rule.sourceElement");
     this.href = "#";
     this.systemRule = false;
     this.sourceElement = aElement;
   }
 }
 
 CssRule.prototype = {
+  _passId: null,
+
   /**
    * Check if the parent stylesheet is allowed by the CssLogic.sourceFilter.
    *
    * @return {boolean} true if the parent stylesheet is allowed by the current
    * sourceFilter, or false otherwise.
    */
   get sheetAllowed()
   {
@@ -1086,16 +1090,18 @@ function CssSelector(aCssRule, aSelector
 {
   this._cssRule = aCssRule;
   this.text = aSelector;
   this.elementStyle = this.text == "@element.style";
   this._specificity = null;
 }
 
 CssSelector.prototype = {
+  _matchId: null,
+
   /**
    * Retrieve the CssSelector source, which is the source of the CssSheet owning
    * the selector.
    *
    * @return {string} the selector source.
    */
   get source()
   {
--- a/browser/devtools/styleinspector/StyleInspector.jsm
+++ b/browser/devtools/styleinspector/StyleInspector.jsm
@@ -84,43 +84,58 @@ var StyleInspector = {
     let vbox = win.document.createElement("vbox");
     vbox.setAttribute("flex", "1");
     panel.appendChild(vbox);
 
     let iframe = win.document.createElementNS(ns, "iframe");
     iframe.setAttribute("flex", "1");
     iframe.setAttribute("tooltip", "aHTMLTooltip");
     iframe.setAttribute("src", "chrome://browser/content/csshtmltree.xhtml");
+    iframe.addEventListener("load", SI_iframeOnload, true);
     vbox.appendChild(iframe);
 
     let hbox = win.document.createElement("hbox");
     hbox.setAttribute("class", "resizerbox");
     vbox.appendChild(hbox);
 
     let spacer = win.document.createElement("spacer");
     spacer.setAttribute("flex", "1");
     hbox.appendChild(spacer);
 
     let resizer = win.document.createElement("resizer");
     resizer.setAttribute("dir", "bottomend");
     hbox.appendChild(resizer);
     popupSet.appendChild(panel);
 
     /**
+     * Iframe's onload event
+     */
+    let iframeReady = false;
+    function SI_iframeOnload() {
+      iframe.removeEventListener("load", SI_iframeOnload, true);
+      panel.cssLogic = new CssLogic();
+      panel.cssHtmlTree = new CssHtmlTree(iframe, panel.cssLogic, panel);
+      iframeReady = true;
+      if (panelReady) {
+        SI_popupShown.call(panel);
+      }
+    }
+
+    /**
      * Initialize the popup when it is first shown
      */
+    let panelReady = false;
     function SI_popupShown() {
-      if (!this.cssHtmlTree) {
-        this.cssLogic = new CssLogic();
-        this.cssHtmlTree = new CssHtmlTree(iframe, this.cssLogic, this);
+      panelReady = true;
+      if (iframeReady) {
+        let selectedNode = this.selectedNode || null;
+        this.cssLogic.highlight(selectedNode);
+        this.cssHtmlTree.highlight(selectedNode);
+        Services.obs.notifyObservers(null, "StyleInspector-opened", null);
       }
-
-      this.cssLogic.highlight(this.selectedNode);
-      this.cssHtmlTree.highlight(this.selectedNode);
-      Services.obs.notifyObservers(null, "StyleInspector-opened", null);
     }
 
     /**
      * Hide the popup and conditionally destroy it
      */
     function SI_popupHidden() {
       if (panel.preserveOnHide) {
         Services.obs.notifyObservers(null, "StyleInspector-closed", null);
--- a/browser/devtools/styleinspector/test/browser/Makefile.in
+++ b/browser/devtools/styleinspector/test/browser/Makefile.in
@@ -43,20 +43,22 @@ VPATH     = @srcdir@
 relativesrcdir  = browser/devtools/styleinspector/test/browser
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _BROWSER_TEST_FILES = \
   browser_styleinspector.js \
   browser_styleinspector_webconsole.js \
+  browser_bug683672.js \
   head.js \
   $(NULL)
 
 _BROWSER_TEST_PAGES = \
   browser_styleinspector_webconsole.htm \
+  browser_bug683672.html \
   $(NULL)
 
 libs:: $(_BROWSER_TEST_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 
 libs:: $(_BROWSER_TEST_PAGES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
new file mode 100644
--- /dev/null
+++ b/browser/devtools/styleinspector/test/browser/browser_bug683672.html
@@ -0,0 +1,32 @@
+<!-- Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/ -->
+<html>
+  <head>
+    <style>
+      .matched1, .matched2, .matched3, .matched4, .matched5 {
+        color: #000;
+      }
+
+      .unmatched1, .unmatched2, .unmatched3, .unmatched4, .unmatched5, .unmatched6, .unmatched7 {
+        color: #f00;
+      }
+
+      div {
+        position: absolute;
+        top: 40px;
+        left: 20px;
+        border: 1px solid #000;
+        color: #111;
+        width: 100px;
+        height: 50px;
+      }
+    </style>
+  </head>
+  <body>
+    inspectstyle($("test"));
+    <div id="test" class="matched1 matched2 matched3 matched4 matched5">Test div</div>
+    <div id="dummy">
+      <div></div>
+    </div>
+  </body>
+</html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/browser/devtools/styleinspector/test/browser/browser_bug683672.js
@@ -0,0 +1,115 @@
+/* vim: set ts=2 et sw=2 tw=80: */
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+// Tests that the style inspector works properly
+
+let doc;
+let stylePanel;
+
+const TEST_URI = "http://example.com/browser/browser/devtools/styleinspector/test/browser/browser_bug683672.html";
+
+Cu.import("resource:///modules/devtools/CssHtmlTree.jsm");
+
+function test()
+{
+  waitForExplicitFinish();
+  addTab(TEST_URI);
+  browser.addEventListener("load", tabLoaded, true);
+}
+
+function tabLoaded()
+{
+  ok(window.StyleInspector, "StyleInspector exists");
+  ok(StyleInspector.isEnabled, "style inspector preference is enabled");
+  stylePanel = StyleInspector.createPanel();
+  Services.obs.addObserver(runTests, "StyleInspector-opened", false);
+  stylePanel.openPopup();
+}
+
+function runTests()
+{
+  Services.obs.removeObserver(runTests, "StyleInspector-opened", false);
+
+  ok(stylePanel.isOpen(), "style inspector is open");
+
+  testMatchedSelectors();
+  testUnmatchedSelectors();
+
+  info("finishing up");
+  Services.obs.addObserver(finishUp, "StyleInspector-closed", false);
+  stylePanel.hidePopup();
+}
+
+function testMatchedSelectors()
+{
+  info("checking selector counts, matched rules and titles");
+  let div = content.document.getElementById("test");
+  ok(div, "captain, we have the div");
+
+  info("selecting the div");
+  stylePanel.selectNode(div);
+
+  let htmlTree = stylePanel.cssHtmlTree;
+
+  is(div, htmlTree.viewedElement,
+      "style inspector node matches the selected node");
+
+  let propertyView = new PropertyView(htmlTree, "color");
+  let numMatchedSelectors = propertyView.propertyInfo.matchedSelectors.length;
+
+  is(numMatchedSelectors, 6,
+      "CssLogic returns the correct number of matched selectors for div");
+
+  let dummy = content.document.getElementById("dummy");
+  let returnedRuleTitle = propertyView.ruleTitle(dummy);
+  let str = CssHtmlTree.l10n("property.numberOfSelectors");
+  let calculatedRuleTitle = PluralForm.get(numMatchedSelectors, str)
+                                      .replace("#1", numMatchedSelectors);
+
+  info("returnedRuleTitle: '" + returnedRuleTitle + "'");
+
+  is(returnedRuleTitle, calculatedRuleTitle,
+      "returned title for matched rules is correct");
+}
+
+function testUnmatchedSelectors()
+{
+  info("checking selector counts, unmatched rules and titles");
+  let body = content.document.body;
+  ok(body, "captain, we have a body");
+
+  info("selecting content.document.body");
+  stylePanel.selectNode(body);
+
+  let htmlTree = stylePanel.cssHtmlTree;
+
+  is(body, htmlTree.viewedElement,
+      "style inspector node matches the selected node");
+
+  let propertyView = new PropertyView(htmlTree, "color");
+  let numUnmatchedSelectors = propertyView.propertyInfo.unmatchedSelectors.length;
+
+  is(numUnmatchedSelectors, 13,
+      "CssLogic returns the correct number of unmatched selectors for body");
+
+  let dummy = content.document.getElementById("dummy");
+  let returnedRuleTitle = propertyView.ruleTitle(dummy);
+  let str = CssHtmlTree.l10n("property.numberOfUnmatchedSelectors");
+  let calculatedRuleTitle = PluralForm.get(numUnmatchedSelectors, str)
+                                      .replace("#1", numUnmatchedSelectors);
+
+  info("returnedRuleTitle: '" + returnedRuleTitle + "'");
+
+  is(returnedRuleTitle, calculatedRuleTitle,
+      "returned title for unmatched rules is correct");
+}
+
+function finishUp()
+{
+  Services.obs.removeObserver(finishUp, "StyleInspector-closed", false);
+  ok(!stylePanel.isOpen(), "style inspector is closed");
+  doc = stylePanel = null;
+  gBrowser.removeCurrentTab();
+  finish();
+}
--- a/browser/devtools/webconsole/HUDService.jsm
+++ b/browser/devtools/webconsole/HUDService.jsm
@@ -3610,30 +3610,36 @@ HeadsUpDisplay.prototype = {
         ]
       }
     ];
 
     let toolbar = this.makeXULNode("toolbar");
     toolbar.setAttribute("class", "hud-console-filter-toolbar");
     toolbar.setAttribute("mode", "full");
 
+#ifdef XP_MAC
     this.makeCloseButton(toolbar);
+#endif
 
     for (let i = 0; i < BUTTONS.length; i++) {
       this.makeFilterButton(toolbar, BUTTONS[i]);
     }
 
     toolbar.appendChild(this.filterSpacer);
 
     let positionUI = this.createPositionUI();
     toolbar.appendChild(positionUI);
 
     toolbar.appendChild(this.filterBox);
     this.makeClearConsoleButton(toolbar);
 
+#ifndef XP_MAC
+    this.makeCloseButton(toolbar);
+#endif
+
     return toolbar;
   },
 
   /**
    * Creates the UI for re-positioning the console
    *
    * @return nsIDOMNode
    *         The toolbarbutton which holds the menu that allows the user to
--- a/browser/devtools/webconsole/Makefile.in
+++ b/browser/devtools/webconsole/Makefile.in
@@ -40,22 +40,25 @@
 DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXTRA_JS_MODULES = \
-		HUDService.jsm \
 		PropertyPanel.jsm \
 		NetworkHelper.jsm \
 		AutocompletePopup.jsm \
 		gcli.jsm \
 		$(NULL)
 
+EXTRA_PP_JS_MODULES = \
+		HUDService.jsm \
+		$(NULL)
+
 ifdef ENABLE_TESTS
 ifneq (mobile,$(MOZ_BUILD_APP))
 	DIRS += test
 endif
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/browser/locales/en-US/chrome/browser/styleinspector.properties
+++ b/browser/locales/en-US/chrome/browser/styleinspector.properties
@@ -1,26 +1,25 @@
 # LOCALIZATION NOTE These strings are used inside the Style Inspector.
 
 # LOCALIZATION NOTE (panelTitle): This is the panel title
 panelTitle=Style Inspector
 
-# LOCALIZATION NOTE (property.numberOfRules): For each style property the panel
-# shows the number of rules which hold that specific property, counted from all
-# of the stylesheets in the web page inspected.
+# LOCALIZATION NOTE (property.numberOfSelectors): For each style property the
+# panel shows the number of selectors which match the currently selected
+# element, counted from all stylesheets in the web page inspected.
 # See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
-property.numberOfRules=#1 rule;#1 rules
+property.numberOfSelectors=1 selector;#1 selectors
 
-# LOCALIZATION NOTE (property.numberOfUnmatchedRules): Each style property is
-# inside a rule. A rule is a selector that can match (or not) the highlighted
-# element in the web page. The property view shows no unmatched rules. If the
-# user wants to expand the property to view unmatched rules, he/she must click
-# this link displayed to the right of each property.
+# LOCALIZATION NOTE (property.numberOfUnmatchedSelectors): For each style
+# property the panel shows the number of selectors which do not match the
+# currently selected element, counted from all stylesheets in the web page
+# inspected.
 # See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
-property.numberOfUnmatchedRules=One unmatched rule;#1 unmatched rules
+property.numberOfUnmatchedSelectors=1 unmatched selector;#1 unmatched selectors
 
 # LOCALIZATION NOTE (rule.status): For each style property the panel shows
 # the rules which hold that specific property. For every rule, the rule status
 # is also displayed: a rule can be the best match, a match, a parent match, or a
 # rule did not match the element the user has highlighted.
 rule.status.BEST=Best Match
 rule.status.MATCHED=Matched
 rule.status.PARENT_MATCH=Parent Match
@@ -28,24 +27,22 @@ rule.status.UNMATCHED=Unmatched
 
 # LOCALIZATION NOTE (rule.sourceElement, rule.sourceInline): For each
 # style property the panel shows the rules which hold that specific property.
 # For every rule, the rule source is also displayed: a rule can come from a
 # file, from the same page (inline), or from the element itself (element).
 rule.sourceInline=inline
 rule.sourceElement=element
 
-# LOCALIZATION NOTE (rule.showUnmatchedLink): Each style property
-# is inside a rule. A rule is a selector that can match (or not) the highlighted
-# element in the web page. The property view shows only a few of the unmatched
-# rules. If the user wants to see all of the unmatched rules, he/she must click
-# the link displayed at the bottom of the rules table. That link shows how many
-# rules are not displayed. This is the string used when the link is generated.
+# LOCALIZATION NOTE (rule.showUnmatchedLink): For each style
+# property the panel shows the number of selectors which do not match the
+# currently selected element, counted from all stylesheets in the web page
+# inspected.
 # See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
-rule.showUnmatchedLink=One unmatched rule...;#1 unmatched rules...
+rule.showUnmatchedLink=1 unmatched selector…;#1 unmatched selectors…
 
 # LOCALIZATION NOTE (group): Style properties are displayed in categories and
 # these are the category names.
 group.Text_Fonts_and_Color=Text, Fonts & Color
 group.Background=Background
 group.Dimensions=Dimensions
 group.Positioning_and_Page_Flow=Positioning and Page Flow
 group.Borders=Borders
--- a/browser/themes/gnomestripe/browser/browser.css
+++ b/browser/themes/gnomestripe/browser/browser.css
@@ -1979,12 +1979,12 @@ panel[dimmed="true"] {
 }
 
 #highlighter-veil-transparentbox {
   box-shadow: 0 0 0 1px rgba(0,0,0,0.5);
   outline: 1px dashed rgba(255,255,255,0.5);
   outline-offset: -1px;
 }
 
-#highlighter-veil-transparentbox[locked] {
+#highlighter-veil-container[locked] > #highlighter-veil-middlebox > #highlighter-veil-transparentbox {
   box-shadow: 0 0 0 1px black;
   outline-color: white;
 }
--- a/browser/themes/pinstripe/browser/browser.css
+++ b/browser/themes/pinstripe/browser/browser.css
@@ -2570,17 +2570,17 @@ panel[dimmed="true"] {
 }
 
 #highlighter-veil-transparentbox {
   box-shadow: 0 0 0 1px rgba(0,0,0,0.5);
   outline: 1px dashed rgba(255,255,255,0.5);
   outline-offset: -1px;
 }
 
-#highlighter-veil-transparentbox[locked] {
+#highlighter-veil-container[locked] > #highlighter-veil-middlebox > #highlighter-veil-transparentbox {
   box-shadow: 0 0 0 1px black;
   outline-color: white;
 }
 
 /* Highlighter toolbar */
 
 #inspector-toolbar {
   -moz-appearance: none;
--- a/browser/themes/winstripe/browser/browser.css
+++ b/browser/themes/winstripe/browser/browser.css
@@ -2547,12 +2547,12 @@ panel[dimmed="true"] {
 }
 
 #highlighter-veil-transparentbox {
   box-shadow: 0 0 0 1px rgba(0,0,0,0.5);
   outline: 1px dashed rgba(255,255,255,0.5);
   outline-offset: -1px;
 }
 
-#highlighter-veil-transparentbox[locked] {
+#highlighter-veil-container[locked] > #highlighter-veil-middlebox > #highlighter-veil-transparentbox {
   box-shadow: 0 0 0 1px black;
   outline-color: white;
 }
--- a/content/html/document/test/browser_bug592641.js
+++ b/content/html/document/test/browser_bug592641.js
@@ -12,17 +12,17 @@ function test() {
   ctx.tab1 = gBrowser.addTab(testPath + "bug592641_img.jpg");
   ctx.tab1Browser = gBrowser.getBrowserForTab(ctx.tab1);
   ctx.tab1Browser.addEventListener("load", load1Soon, true);
 }
 
 function checkTitle(title) {
 
   ctx.loadsDone++;
-  ok(/^bug592641_img\.jpg \(JPEG Image, 1500x1500 pixels\)/.test(title),
+  ok(/^bug592641_img\.jpg \(JPEG Image, 1500\u00A0\u00D7\u00A01500 pixels\)/.test(title),
      "Title should be correct on load #" + ctx.loadsDone);
 }
 
 function load1Soon() {
   ctx.tab1Browser.removeEventListener("load", load1Soon, true);
   // onload is fired in OnStopDecode, so let's use executeSoon() to make sure
   // that any other OnStopDecode event handlers get the chance to fire first.
   executeSoon(load1Done);
--- a/dom/locales/en-US/chrome/layout/MediaDocument.properties
+++ b/dom/locales/en-US/chrome/layout/MediaDocument.properties
@@ -38,19 +38,19 @@
 # ***** END LICENSE BLOCK *****
 
 #LOCALIZATION NOTE (ImageTitleWithDimensionsAndFile): first %S is filename, second %S is type, third %S is width and fourth %S is height
 #LOCALIZATION NOTE (ImageTitleWithoutDimensions): first %S is filename, second %S is type
 #LOCALIZATION NOTE (ImageTitleWithDimensions): first %S is type, second %S is width and third %S is height
 #LOCALIZATION NOTE (ImageTitleWithNeitherDimensionsNorFile): first %S is type
 #LOCALIZATION NOTE (MediaTitleWithFile): first %S is filename, second %S is type
 #LOCALIZATION NOTE (MediaTitleWithNoInfo): first %S is type
-ImageTitleWithDimensionsAndFile=%S (%S Image, %Sx%S pixels)
+ImageTitleWithDimensionsAndFile=%S (%S Image, %S\u00A0\u00D7\u00A0%S pixels)
 ImageTitleWithoutDimensions=%S (%S Image)
-ImageTitleWithDimensions=(%S Image, %Sx%S pixels)
+ImageTitleWithDimensions=(%S Image, %S\u00A0\u00D7\u00A0%S pixels)
 ImageTitleWithNeitherDimensionsNorFile=(%S Image)
 MediaTitleWithFile=%S (%S Object)
 MediaTitleWithNoInfo=(%S Object)
 
 InvalidImage=The image \u201c%S\u201d cannot be displayed because it contains errors.
 ScaledImage=Scaled (%S%%)
 
 TitleWithStatus=%S - %S
--- a/mobile/chrome/content/Util.js
+++ b/mobile/chrome/content/Util.js
@@ -156,39 +156,25 @@ let Util = {
     Services.io.offline = false;
   },
 
   isParentProcess: function isInParentProcess() {
     let appInfo = Cc["@mozilla.org/xre/app-info;1"];
     return (!appInfo || appInfo.getService(Ci.nsIXULRuntime).processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT);
   },
 
-  isTablet: function isTablet(options) {
-    let forceUpdate = options && 'forceUpdate' in options && options.forceUpdate;
-
-    if ('_isTablet' in this && !forceUpdate)
-      return this._isTablet;
-
-    let tabletPref = Services.prefs.getIntPref("browser.ui.layout.tablet");
-
-    // Act according to user prefs if tablet mode has been
-    // explicitly disabled or enabled.
-    if (tabletPref == 0)
-      return this._isTablet = false;
-    else if (tabletPref == 1)
-      return this._isTablet = true;
-
+  isTablet: function isTablet() {
     let dpi = this.displayDPI;
     if (dpi <= 96)
-      return this._isTablet = (window.innerWidth > 1024);
+      return (window.innerWidth > 1024);
 
     // See the tablet_panel_minwidth from mobile/themes/core/defines.inc
     let tablet_panel_minwidth = 124;
     let dpmm = 25.4 * window.innerWidth / dpi;
-    return this._isTablet = (dpmm >= tablet_panel_minwidth);
+    return (dpmm >= tablet_panel_minwidth);
   },
 
   isPortrait: function isPortrait() {
 #ifdef MOZ_PLATFORM_MAEMO
     return (screen.width <= screen.height);
 #elifdef ANDROID
     return (screen.width <= screen.height);
 #else
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -181,18 +181,16 @@ var BrowserUI = {
 
   _toolbarLocked: 0,
 
   isToolbarLocked: function isToolbarLocked() {
     return this._toolbarLocked;
   },
 
   lockToolbar: function lockToolbar() {
-    if (Util.isTablet())
-      return;
     this._toolbarLocked++;
     document.getElementById("toolbar-moveable-container").top = "0";
     if (this._toolbarLocked == 1)
       Browser.forceChromeReflow();
   },
 
   unlockToolbar: function unlockToolbar() {
     if (!this._toolbarLocked)
@@ -376,16 +374,21 @@ var BrowserUI = {
   get toolbarH() {
     if (!this._toolbarH) {
       let toolbar = document.getElementById("toolbar-main");
       this._toolbarH = toolbar.boxObject.height;
     }
     return this._toolbarH;
   },
 
+  get sidebarW() {
+    delete this._sidebarW;
+    return this._sidebarW = Elements.controls.getBoundingClientRect().width;
+  },
+
   sizeControls: function(windowW, windowH) {
     // tabs
     document.getElementById("tabs").resize();
     AwesomeScreen.doResize(windowW, windowH);
 
     // content navigator helper
     document.getElementById("content-navigator").contentHasChanged();
   },
@@ -544,37 +547,21 @@ var BrowserUI = {
   },
 
   observe: function observe(aSubject, aTopic, aData) {
     if (aTopic == "nsPref:changed" && aData == "browser.ui.layout.tablet")
       this.updateTabletLayout();
   },
 
   updateTabletLayout: function updateTabletLayout() {
-    if (Util.isTablet({ forceUpdate: true })) {
-      this.unlockToolbar();
+    let tabletPref = Services.prefs.getIntPref("browser.ui.layout.tablet");
+    if (tabletPref == 1 || (tabletPref == -1 && Util.isTablet()))
       Elements.urlbarState.setAttribute("tablet", "true");
-    } else {
+    else
       Elements.urlbarState.removeAttribute("tablet");
-    }
-
-    // Tablet mode changes the size of the thumbnails
-    // in the tabs container. Hence we have to force a
-    // thumbnail update on all tabs.
-    setTimeout(function(self) {
-      self._updateAllTabThumbnails();
-    }, 0, this);
-  },
-
-  _updateAllTabThumbnails: function() {
-    let tabs = Browser.tabs;
-
-    tabs.forEach(function(tab) {
-      tab.updateThumbnail({ force: true });
-    });
   },
 
   update: function(aState) {
     let browser = Browser.selectedBrowser;
 
     switch (aState) {
       case TOOLBARSTATE_LOADED:
         this._updateToolbar();
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -1033,17 +1033,17 @@ var Browser = {
         snappedX = -ritevis * ritew * dirVal;
       }
     }
 
     return Math.round(snappedX);
   },
 
   tryFloatToolbar: function tryFloatToolbar(dx, dy) {
-    if (this.floatedWhileDragging || Util.isTablet())
+    if (this.floatedWhileDragging)
       return;
 
     let [leftvis, ritevis, leftw, ritew] = Browser.computeSidebarVisibility(dx, dy);
     if (leftvis > 0 || ritevis > 0) {
       BrowserUI.lockToolbar();
       this.floatedWhileDragging = true;
     }
   },
@@ -1284,17 +1284,17 @@ Browser.MainDragger.prototype = {
     return { x: true, y: true };
   },
 
   dragStart: function dragStart(clientX, clientY, target, scroller) {
     let browser = getBrowser();
     let bcr = browser.getBoundingClientRect();
     this._contentView = browser.getViewAt(clientX - bcr.left, clientY - bcr.top);
     this._stopAtSidebar = 0;
-    this._panToolbars = !Util.isTablet();
+    this._panToolbars = !Elements.urlbarState.getAttribute("tablet");
     if (this._sidebarTimeout) {
       clearTimeout(this._sidebarTimeout);
       this._sidebarTimeout = null;
     }
   },
 
   dragStop: function dragStop(dx, dy, scroller) {
     if (this._contentView && this._contentView._updateCacheViewport)
@@ -1903,17 +1903,17 @@ const ContentTouchHandler = {
     let bcr = browser.getBoundingClientRect();
     let rect = new Rect(0, 0, window.innerWidth, window.innerHeight);
     rect.restrictTo(Rect.fromRect(bcr));
 
     // Check if the user touched near to one of the edges of the browser area
     // or if the urlbar is showing
     this.canCancelPan = (aX >= rect.left + kSafetyX) && (aX <= rect.right - kSafetyX) &&
                         (aY >= rect.top  + kSafetyY) &&
-                        (bcr.top == 0 || Util.isTablet());
+                        (bcr.top == 0 || Elements.urlbarState.getAttribute("tablet"));
   },
 
   tapDown: function tapDown(aX, aY) {
     let browser = getBrowser();
     browser.focus();
 
     // if the page might capture touch events, we give it the option
     this.updateCanCancel(aX, aY);
@@ -2892,16 +2892,17 @@ Tab.prototype = {
   _createBrowser: function _createBrowser(aURI, aInsertBefore) {
     if (this._browser)
       throw "Browser already exists";
 
     // Create a notification box around the browser
     let notification = this._notification = document.createElement("notificationbox");
     notification.classList.add("inputHandler");
 
+    // Create the browser using the current width the dynamically size the height
     let browser = this._browser = document.createElement("browser");
     browser.setAttribute("class", "viewable-width viewable-height");
     this._chromeTab.linkedBrowser = browser;
 
     browser.setAttribute("type", "content");
 
     let useRemote = Services.prefs.getBoolPref("browser.tabs.remote");
     let useLocal = Util.isLocalScheme(aURI);
@@ -3145,28 +3146,25 @@ function rendererFactory(aBrowser, aCanv
 
 /* ViewableAreaObserver is an helper object where width/height represents the
  * size of the currently viewable area in pixels. This is use instead of
  * window.innerHeight/innerWidth because some keyboards does not resize the
  * window but floats over it.
  */
 var ViewableAreaObserver = {
   get width() {
-    let width = this._width || window.innerWidth;
-    if (Util.isTablet()) {
-      let sidebarWidth = Math.round(Elements.tabs.getBoundingClientRect().width);
-      width -= sidebarWidth;
-    }
-    return width;
+    return this._width || window.innerWidth;
   },
 
   get height() {
     let height = (this._height || window.innerHeight);
-    if (Util.isTablet())
-      height -= BrowserUI.toolbarH;
+    if (Elements.urlbarState.getAttribute("tablet")) {
+      let toolbarHeight = Math.round(document.getElementById("toolbar-main").getBoundingClientRect().height);
+      height -= toolbarHeight;
+    }
     return height;
   },
 
   _isKeyboardOpened: true,
   get isKeyboardOpened() {
     return this._isKeyboardOpened;
   },
 
--- a/mobile/chrome/content/browser.xul
+++ b/mobile/chrome/content/browser.xul
@@ -193,32 +193,32 @@
     <key id="key_newTab" key="t" modifiers="accel" command="cmd_newTab"/>
     <key id="key_closeTab" key="w" modifiers="accel" command="cmd_closeTab"/>
     <key id="key_undoCloseTab" key="t" modifiers="accel,shift" command="cmd_undoCloseTab"/>
   </keyset>
 
   <stack flex="1" id="stack">
     <scrollbox id="controls-scrollbox" style="overflow: hidden; -moz-box-orient: horizontal; position: relative;" flex="1" observes="bcast_urlbarState">
       <vbox id="tabs-sidebar" class="sidebar" observes="bcast_uidiscovery">
-        <spacer class="toolbar-height" id="tabs-spacer" observes="bcast_urlbarState"/>
+        <spacer class="toolbar-height"/>
         <!-- Left toolbar -->
-        <vbox id="tabs-container" class="panel-dark" flex="1" observes="bcast_urlbarState">
-          <vbox id="tabs" flex="1" observes="bcast_urlbarState"
+        <vbox id="tabs-container" class="panel-dark" flex="1">
+          <vbox id="tabs" flex="1"
                 onselect="BrowserUI.selectTab(this);"
                 onreloadtab="BrowserUI.undoCloseTab()"
                 onclosetab="BrowserUI.closeTab(this)"
                 onclosereloadtab="this._container.removeTab(this)"/>
           <hbox id="tabs-controls">
-            <toolbarbutton id="newtab-button" class="button-control" command="cmd_newTab" observes="bcast_urlbarState"/>
+            <toolbarbutton id="newtab-button" class="button-control" command="cmd_newTab"/>
           </hbox>
         </vbox>
       </vbox>
 
       <!-- Page Area -->
-      <stack id="page-stack" observes="bcast_urlbarState">
+      <stack>
         <scrollbox id="page-scrollbox">
           <vbox>
             <!-- Main Toolbar -->
             <box id="toolbar-container" class="panel-dark toolbar-height">
               <box id="toolbar-moveable-container" observes="bcast_uidiscovery">
                 <toolbar id="toolbar-main" class="panel-dark viewable-width" observes="bcast_urlbarState">
                   <toolbarbutton id="tool-back2" class="tool-back button-actionbar" command="cmd_back"/>
                   <toolbarbutton id="tool-forward2" class="tool-forward button-actionbar" command="cmd_forward"/>
--- a/mobile/chrome/content/tabs.xml
+++ b/mobile/chrome/content/tabs.xml
@@ -2,71 +2,31 @@
 
 <bindings
     xmlns="http://www.mozilla.org/xbl"
     xmlns:xbl="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">
 
   <binding id="documenttab">
-    <content observes="bcast_urlbarState">
+    <content>
       <xul:stack anonid="page" class="documenttab-container" flex="1">
-        <html:canvas anonid="thumbnail" class="documenttab-thumbnail" left="0" moz-opaque="true" empty="true"
-          onclick="document.getBindingParent(this)._onClick()" observes="bcast_urlbarState"/>
-        <xul:hbox anonid="reload" class="documenttab-reload" left="0" top="0" onclick="document.getBindingParent(this)._onUndo();" observes="bcast_urlbarState"/>
-        <xul:hbox anonid="close-container" class="documenttab-close-container" top="0" align="center" onclick="document.getBindingParent(this)._onClose()" observes="bcast_urlbarState">
-          <xul:image anonid="close" class="documenttab-close" mousethrough="always" observes="bcast_urlbarState"/>
+        <html:canvas anonid="thumbnail" class="documenttab-thumbnail" left="0" width="104" height="65" moz-opaque="true" empty="true"
+          onclick="document.getBindingParent(this)._onClick()"/>
+        <xul:hbox class="documenttab-reload" left="0" top="0" width="104" height="65" onclick="document.getBindingParent(this)._onUndo();"/>
+        <xul:hbox class="documenttab-close-container" start="-16" top="0" height="65" width="55" align="center" onclick="document.getBindingParent(this)._onClose()">
+          <xul:image anonid="close" class="documenttab-close" mousethrough="always"/>
         </xul:hbox>
       </xul:stack>
     </content>
 
     <implementation>
       <field name="ignoreUndo">false</field>
-      <field name="thumbnail" readonly="true">document.getAnonymousElementByAttribute(this, "anonid", "thumbnail");</field>
-      <field name="_reload" readonly="true">document.getAnonymousElementByAttribute(this, "anonid", "reload");</field>
-      <field name="_closeContainer" readonly="true">document.getAnonymousElementByAttribute(this, "anonid", "close-container");</field>
-      <field name="_container" readonly="true">this.parentNode.parentNode;</field>
-
-      <constructor>
-        <![CDATA[
-          this.updateTabletLayout(this.thumbnail);
-        ]]>
-      </constructor>
-
-      <method name="updateTabletLayout">
-        <parameter name="thumbnail"/>
-        <body>
-          <![CDATA[
-            let tabWidth, tabHeight, closeWidth, closeHeight;
-
-            if (Util.isTablet()) {
-              tabWidth = 176;
-              tabHeight = 110;
-              closeWidth = 41;
-              closeHeight = 117;
-            } else {
-              tabWidth = 104;
-              tabHeight = 65;
-              closeWidth = 55;
-              closeHeight = 65;
-            }
-
-            if (tabWidth != thumbnail.width) {
-              let reload = this._reload;
-              let closeContainer = this._closeContainer;
-
-              thumbnail.width = reload.width = tabWidth;
-              thumbnail.height = reload.height = tabHeight;
-              closeContainer.width = closeWidth;
-              closeContainer.height = closeHeight;
-            }
-          ]]>
-        </body>
-      </method>
-
+      <field name="thumbnail">document.getAnonymousElementByAttribute(this, "anonid", "thumbnail");</field>
+      <field name="_container">this.parentNode.parentNode;</field>
       <method name="_onClick">
         <body>
           <![CDATA[
             this._container.selectedTab = this;
 
             let selectFn = new Function("event", this._container.parentNode.getAttribute("onselect"));
             selectFn.call(this);
           ]]>
@@ -96,28 +56,24 @@
 
       <method name="updateThumbnail">
         <parameter name="browser"/>
         <parameter name="width"/>
         <parameter name="height"/>
         <body>
           <![CDATA[
             let thumbnail = this.thumbnail;
-            // Ensure the thumbnail will have the correct
-            // dimensions for tablet and phone modes
-            this.updateTabletLayout(thumbnail);
-
             if (browser.currentURI.spec == "about:blank") {
               thumbnail.setAttribute("empty", "true");
               return;
             }
             thumbnail.removeAttribute("empty");
 
-            const tabWidth = thumbnail.width;
-            const tabHeight = thumbnail.height;
+            const tabWidth = 104;
+            const tabHeight = 65;
 
             let ratio = tabHeight / tabWidth;
             if (browser.contentDocumentWidth > 0)
               width = Math.min(width, browser.contentDocumentWidth);
 
             if (browser.contentDocumentHeight > 0)
               height = Math.min(height, browser.contentDocumentHeight);
 
--- a/mobile/themes/core/browser.css
+++ b/mobile/themes/core/browser.css
@@ -981,17 +981,16 @@ documenttab[selected="true"] {
 documenttab:hover:active > stack > .documenttab-thumbnail,
 documenttab[selected="true"] > stack > .documenttab-thumbnail {
   opacity: 1.0;
 }
 
 .documenttab-close-container {
   position: relative;
   left: -16px;
-  -moz-margin-start: -16px;
   -moz-margin-end: 49px;
 }
 
 .documenttab-close {
   width: 40px;
   height: 40px;
   list-style-image: url("chrome://browser/skin/images/close-inactive-tab-hdpi.png");
 }
@@ -1571,16 +1570,56 @@ setting {
   from { -moz-transform: translateX(0); }
   10% { -moz-transform: translateX(-moz-calc(-121px - @border_width_large@ - 2*@padding_normal@)); }
   45% { -moz-transform: translateX(-moz-calc(-121px - @border_width_large@ - 2*@padding_normal@)); }
   55% { -moz-transform: translateX(@sidebar_width_minimum@); }
   90% { -moz-transform: translateX(@sidebar_width_minimum@); }
   to { -moz-transform: translateX(0); }
 }
 
+/* Tablet mode */
+
+.spacer-actionbar,
+.button-actionbar {
+  visibility: collapse;
+}
+
+.button-actionbar[disabled="true"] {
+  opacity: 0.5;
+}
+
+.button-actionbar:hover:active {
+  background-color: #8db8d8;
+}
+
+#toolbar-main[tablet="true"] > .spacer-actionbar,
+#toolbar-main[tablet="true"] > .button-actionbar {
+  visibility: visible;
+}
+
+#controls-scrollbox[tablet="true"] > #controls-sidebar {
+  visibility: collapse;
+}
+
+#controls-scrollbox[tablet="true"] > #tabs-sidebar {
+  border: none;
+  position: fixed;
+  top: -moz-calc(@touch_button_xlarge@ + @margin_normal@);
+  visibility: collapse;
+}
+#controls-scrollbox[tablet="true"] > #tabs-sidebar:-moz-locale-dir(ltr) {
+  right: 0;
+}
+#controls-scrollbox[tablet="true"] > #tabs-sidebar:-moz-locale-dir(rtl) {
+  left: 0;
+}
+#controls-scrollbox[tablet="true"] > #tabs-sidebar[open] {
+  visibility: visible;
+}
+
 /* Text selection handles */
 
 #selectionhandle-start,
 #selectionhandle-end {
   min-width: 35px !important;
   width: 35px !important;
   padding: 0 !important;
   margin: 0 !important;
@@ -1596,11 +1635,9 @@ setting {
 
 @media (min-width: @tablet_panel_minwidth@) {
   #awesome-panels {
     -moz-box-shadow: 0px 0px @shadow_width_small@ black;
   }
   #search-engines-popup {
     max-width: -moz-calc(@tablet_panel_minwidth@);
   }
-}
-
-%include tablet.css
+}
\ No newline at end of file
--- a/mobile/themes/core/gingerbread/browser.css
+++ b/mobile/themes/core/gingerbread/browser.css
@@ -930,17 +930,16 @@ documenttab[selected="true"] {
 documenttab:hover:active > stack > .documenttab-thumbnail,
 documenttab[selected="true"] > stack > .documenttab-thumbnail {
   opacity: 1.0;
 }
 
 .documenttab-close-container {
   position: relative;
   left: -16px;
-  -moz-margin-start: -16px;
   -moz-margin-end: 49px;
 }
 
 .documenttab-close {
   width: 40px;
   height: 40px;
   list-style-image: url("chrome://browser/skin/images/close-inactive-tab-hdpi.png");
 }
@@ -1541,16 +1540,56 @@ setting {
   from { -moz-transform: translateX(0); }
   10% { -moz-transform: translateX(-moz-calc(-121px - @border_width_large@ - 2*@padding_normal@)); }
   45% { -moz-transform: translateX(-moz-calc(-121px - @border_width_large@ - 2*@padding_normal@)); }
   55% { -moz-transform: translateX(@sidebar_width_minimum@); }
   90% { -moz-transform: translateX(@sidebar_width_minimum@); }
   to { -moz-transform: translateX(0); }
 }
 
+/* Tablet mode */
+
+.spacer-actionbar,
+.button-actionbar {
+  visibility: collapse;
+}
+
+.button-actionbar[disabled="true"] {
+  opacity: 0.5;
+}
+
+.button-actionbar:hover:active {
+  background-color: #8db8d8;
+}
+
+#toolbar-main[tablet="true"] > .spacer-actionbar,
+#toolbar-main[tablet="true"] > .button-actionbar {
+  visibility: visible;
+}
+
+#controls-scrollbox[tablet="true"] > #controls-sidebar {
+  visibility: collapse;
+}
+
+#controls-scrollbox[tablet="true"] > #tabs-sidebar {
+  border: none;
+  position: fixed;
+  top: -moz-calc(@touch_button_xlarge@ + @margin_normal@);
+  visibility: collapse;
+}
+#controls-scrollbox[tablet="true"] > #tabs-sidebar:-moz-locale-dir(ltr) {
+  right: 0;
+}
+#controls-scrollbox[tablet="true"] > #tabs-sidebar:-moz-locale-dir(rtl) {
+  left: 0;
+}
+#controls-scrollbox[tablet="true"] > #tabs-sidebar[open] {
+  visibility: visible;
+}
+
 /* Text selection handles */
 
 #selectionhandle-start,
 #selectionhandle-end {
   min-width: 35px !important;
   width: 35px !important;
   padding: 0 !important;
   margin: 0 !important;
@@ -1559,9 +1598,16 @@ setting {
 #selectionhandle-start {
   list-style-image: url("chrome://browser/skin/images/handle-start.png");
 }
 
 #selectionhandle-end {
   list-style-image: url("chrome://browser/skin/images/handle-end.png");
 }
 
-%include ../tablet.css
+@media (min-width: @tablet_panel_minwidth@) {
+  #awesome-panels {
+    -moz-box-shadow: 0px 0px @shadow_width_small@ black;
+  }
+  #search-engines-popup {
+    max-width: -moz-calc(@tablet_panel_minwidth@);
+  }
+}
deleted file mode 100644
index 1e616b6698a5fc77fbf709cf62af43e7aeb949df..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 478e9c85e270e51428f181c423d04d5aa448eadb..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 1e616b6698a5fc77fbf709cf62af43e7aeb949df..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index fd8e46b0c15e533f5c6360a659fbddc5a386b7fa..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 1d9d1ae2308f8adcb70fddb823b04e25b12d456a..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/mobile/themes/core/honeycomb/browser.css
+++ b/mobile/themes/core/honeycomb/browser.css
@@ -32,17 +32,16 @@
  * 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 ***** */
 
 %filter substitution
 %include defines.inc
-%define honeycomb 1
 
 /* main toolbar (URL bar) -------------------------------------------------- */
 #toolbar-main {
   -moz-appearance: none;
   -moz-box-align: center;
   padding: 0;
   background: @color_toolbar_background@;
   border: none;
@@ -1014,17 +1013,16 @@ documenttab[selected="true"] {
 documenttab:hover:active > stack > .documenttab-thumbnail,
 documenttab[selected="true"] > stack > .documenttab-thumbnail {
   opacity: 1.0;
 }
 
 .documenttab-close-container {
   position: relative;
   left: -16px;
-  -moz-margin-start: -16px;
   -moz-margin-end: 49px;
 }
 
 .documenttab-close {
   width: 40px;
   height: 40px;
   list-style-image: url("chrome://browser/skin/images/close-inactive-tab-hdpi.png");
 }
@@ -1691,16 +1689,52 @@ setting {
   from { -moz-transform: translateX(0); }
   10% { -moz-transform: translateX(-moz-calc(-121px - @border_width_large@ - 2*@padding_normal@)); }
   45% { -moz-transform: translateX(-moz-calc(-121px - @border_width_large@ - 2*@padding_normal@)); }
   55% { -moz-transform: translateX(@sidebar_width_minimum@); }
   90% { -moz-transform: translateX(@sidebar_width_minimum@); }
   to { -moz-transform: translateX(0); }
 }
 
+/* Tablet mode */
+
+.spacer-actionbar,
+.button-actionbar {
+  visibility: collapse;
+}
+
+.button-actionbar[disabled="true"] {
+  opacity: 0.5;
+}
+
+#toolbar-main[tablet="true"] > .spacer-actionbar,
+#toolbar-main[tablet="true"] > .button-actionbar {
+  visibility: visible;
+}
+
+#controls-scrollbox[tablet="true"] > #controls-sidebar {
+  visibility: collapse;
+}
+
+#controls-scrollbox[tablet="true"] > #tabs-sidebar {
+  border: none;
+  position: fixed;
+  top: @touch_button_xlarge@;
+  visibility: collapse;
+}
+#controls-scrollbox[tablet="true"] > #tabs-sidebar:-moz-locale-dir(ltr) {
+  left: 0;
+}
+#controls-scrollbox[tablet="true"] > #tabs-sidebar:-moz-locale-dir(rtl) {
+  right: 0;
+}
+#controls-scrollbox[tablet="true"] > #tabs-sidebar[open] {
+  visibility: visible;
+}
+
 /* Text selection handles */
 
 #selectionhandle-start,
 #selectionhandle-end {
   min-width: 35px !important;
   width: 35px !important;
   padding: 0 !important;
   margin: 0 !important;
@@ -1775,10 +1809,8 @@ setting {
   }
   
   #search-engines-list > .action-button > .button-box > .button-text {
     text-align: start;
     font-size: @font_tiny@ !important;
   }
 
 }
-
-%include ../tablet.css
index 1f19cd10638b54797e21db629ef041bcedc54f17..935b7555e4d8aceb67a15f9eb137b6ddade69522
GIT binary patch
literal 2089
zc$}S8dsGu=7SGC45nr@`JTwH_(v>7L3FIXK@&cj~I0hxDpoC-sV@M_>69_16AwFs<
zT~<n^^3n>cMUE8NicreqWGPq+(&_=RutKGPz$%C$3fi5x;P&k4@sIt^nVIk2@BV)G
z@!fmoSd1vbd6ma191iC!jO6dczW&z7(H?sre{n^P!`Ud|SP3eL+QE_|YLZNWBtayj
zT8p!;;83GhCRafyJ_$;OHEhCzZ(0a=SivU51w{c-S{{@FM`r0Dah51no~4pA6@<_b
ze6W#)5vU<lhBvBHHF}njO?b)6!uD1*nSg(3f~wdAj`aX9iHgDV5FLaMA^}7>Km+hJ
zkOWc#>2!Jko&taX8K96s3K68Us1z0e;FlHw^QKcMSv&dROTI9PO-MmeEsIRf$jBgN
zP)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W4s^JMgD^pQSa
zaxEvvZ*>$uWW*%t?a;@cSqUDlxuP7ssyw3xGj4uV7G^|LUWc9drn?TcYs?Sp2LE-U
z!hO-&g13XnqfIe85Z71xmVMP`wjfseZWLRcthxg>4g2~0Q_m+q=GcThzU1vW*<-SI
zaq#q%`aPZW3{&n_=T<|(TvdTnhQI6N-Yz$8Hha&UtXymF<D$ErBDV&8{x1)jFH$x;
z^|bw?AjQ6D%oa>{Xq(<=<vKb)kDJaIrALSDY+K=EjL9|QX6?zG3}e(r@nA~z(6nE>
zPIM<Ig32@gZl>kSXIBl|OmbLKW^`$3z24dVvazt#p(X0+kif0UZRqm6Y0pnheR8?t
zo7emq;FPtY`u+XqkKGxqcG<(mlJQLgN$udJO{+fJdB^==6{Rjb<I8YHR58}LtiR>0
zc7A8aVBu@?;Qp$+Ext!yjjlqwa@u~o&i+fL>X3KIxos6caf=0~7nq|4-7lx6g{S7;
zyhpq8<Wx<`7xS$ytjNP$V`u4Ry57s=0*Mb~OUpjCj(a^@N<C^&wpmqK{xT$@5MfC`
H>{tH==@F&B
deleted file mode 100644
index 1e616b6698a5fc77fbf709cf62af43e7aeb949df..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
index 77d71107fa1bc1016d6119bcbea054e9765fd36b..105d7852eddc5783d5936d836efcc94d08a38450
GIT binary patch
literal 2199
zc$}S9dsGu=7Dq(`C`hXyFKG-GL?Ou}n8!fCkVoM_5+G1P(n3fE2qBq}3=o1Y1uC#S
z)Pk(iB0{arwo<62g32NyA}R{D9(gEF*%p*{D+^kSJ7K}?+0)}6`<*j0-~I0IcVFMV
z=geP&`0tsU*_jy`8JYY0u|v@BF2iH80eu%PT~rtut&5d~h9lv;Ku`iJ@M0+(1L3s_
zm62h2`Dj&Qi5x<(F;JXL$-vDtHsi1|DFe5EFOSGmv7mUFpH2-4b^K6?PA;KKaX#Ky
zFD-}~P(X+nt5qZ_HK3M(Teb_Ld&4mShh2ssat4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MFN^99}MI?z{UTbKeq)#+jJyzN5P$AB2PDY%mw3nQ&H>6
WZpY`{vq&`jPxy2A>>A(btbYSqEsN#=
deleted file mode 100644
index fd8e46b0c15e533f5c6360a659fbddc5a386b7fa..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
index e71e89cd79b51c9a0ba31ecafd73760dff9adc8f..aacf3b927b0da779ef18c830863e3109604c3b9f
GIT binary patch
literal 940
zc$@*O15^BoP)<h;3K|Lk000e1NJLTq001fg001fo1^@s6#ly*400001b5ch_0Itp)
z=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_0009&Nkl<ZSi|j@
z%}X0W7{;G>R(A~{HM9kxML{f-Ub1m*Py$kr-g;^2!9$^5`hk~<ZPiP!g$iOnE`|OD
z{RcdGDg_&j*+kJxDfA{3rC*}%OxBqmy0&XRG$tFYG!HBcJG<}vc;=mXnE@L5Peru`
zh?y3vHOBIiE$a#zGp&0;IkvoHzo`po%(RAys3n(OoURoz-hKI@Qp#CgvR_vP8Z)hn
z0In3geg|NH7>nfW^kh(u#;wGJl5(>gY+2A)yyp^tfmbh|-}1j785w;GqEOCGKMQ)n
z90beCK@xEF#q+5l&Ux5zoQUH%5zcv-7;CEsBmm^>^dvDBN%SU-!oH?*kkivsw>cLf
z*L4l0lm-Aqw9AOjS2}PuxAdpo9XBibhY__g#v%ZCSx5Vl{cI0X2ocKX^PycSo28VR
zlv3N3vKd6t`fivM1rR>WQJsiR?LkVVG${2qkAJtDDjoCA-TO0p?Mym#t-_66D>X)8
zj<yg{)OB5>2(n7)x}FWf=t6Q0fWE%Iu1R@xNPkXx$^-ZgAYa&5Y0j2iOaRc?*$F9S
z?KUX21K=~1>IvFW0KlV1V>XCdjvCCLlb!^CZvaGLU!^%)5_D&K`!-_?nZ@~=0pz3$
z;1d9@8^$bv3wz@UA-WHW!5wEXW?CEm`u}G!C3=$v5w+Nvg$FgvP+oA}B{*;AoOf`?
zF#&wxj$?ApI|S$Lg7YpfcS|a>I6suN(@%*g95b!qB1aix5h6NUOCDv?sq6a|jFotz
zl=`WZ`jO2nj2)>;Wf!O8R$?O2n>5n%bKF1mVGu=?QUUJW)CwR<M6K1t^;aoBXcGZi
zfSdr)86s)}(V42^{;g6QO~pG(fQ|whcbpqUq*W8wU!{sbWq^*RQXhtbid$DlgH#De
zPY9@z4Mzh8Z8+M<(FSNxQ;&wDwW#Q(WOa1~N~vRiR##UJul0o={Zoz-kpzJ8$D=b)
zz;Qq0k4I<xTz*Gg-7sc_5QF1mqci`2iPAe1x`m)y0M>L}p9OIGC|5UikPF}|fHjY6
zAIv6zk6!y60R0$2g$Mc3<Jy0b+n4Nb1`zSiDaY;T7J$vv-1|IEl70av>*|ML!s>?r
O0000<MNUMnLSTZipq)kl
deleted file mode 100644
index 1d9d1ae2308f8adcb70fddb823b04e25b12d456a..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 1e616b6698a5fc77fbf709cf62af43e7aeb949df..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 478e9c85e270e51428f181c423d04d5aa448eadb..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 1e616b6698a5fc77fbf709cf62af43e7aeb949df..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index fd8e46b0c15e533f5c6360a659fbddc5a386b7fa..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 1d9d1ae2308f8adcb70fddb823b04e25b12d456a..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/mobile/themes/core/jar.mn
+++ b/mobile/themes/core/jar.mn
@@ -85,17 +85,16 @@ chrome.jar:
   skin/images/panelrow-selected-hdpi.png    (images/panelrow-selected-hdpi.png)
   skin/images/forward-default-hdpi.png        (images/forward-default-hdpi.png)
   skin/images/downloads-default-hdpi.png      (images/downloads-default-hdpi.png)
   skin/images/settings-default-hdpi.png       (images/settings-default-hdpi.png)
   skin/images/preferences-default-hdpi.png    (images/preferences-default-hdpi.png)
   skin/images/row-header-bg.png             (images/row-header-bg.png)
   skin/images/console-default-hdpi.png        (images/console-default-hdpi.png)
   skin/images/newtab-default-hdpi.png         (images/newtab-default-hdpi.png)
-  skin/images/newtab-default-tablet-hdpi.png (images/newtab-default-tablet-hdpi.png)
   skin/images/tab-active-hdpi.png           (images/tab-active-hdpi.png)
   skin/images/tab-inactive-hdpi.png         (images/tab-inactive-hdpi.png)
   skin/images/tab-closed-hdpi.png           (images/tab-closed-hdpi.png)
   skin/images/tab-reopen-hdpi.png           (images/tab-reopen-hdpi.png)
   skin/images/remotetabs-48.png             (images/remotetabs-48.png)
   skin/images/remotetabs-32.png             (images/remotetabs-32.png)
   skin/images/mozilla-32.png                (images/mozilla-32.png)
   skin/images/toggle-on.png                 (images/toggle-on.png)
@@ -106,22 +105,18 @@ chrome.jar:
   skin/images/next-hdpi.png                 (images/next-hdpi.png)
   skin/images/next-disabled-hdpi.png        (images/next-disabled-hdpi.png)
   skin/images/identity-default-hdpi.png     (images/identity-default-hdpi.png)
   skin/images/identity-ssl-hdpi.png         (images/identity-ssl-hdpi.png)
   skin/images/identity-ev-hdpi.png          (images/identity-ev-hdpi.png)
   skin/images/unlocked-hdpi.png             (images/unlocked-hdpi.png)
   skin/images/locked-hdpi.png               (images/locked-hdpi.png)
   skin/images/close-default-hdpi.png        (images/close-default-hdpi.png)
-  skin/images/close-default-tablet-hdpi.png (images/close-default-tablet-hdpi.png)
   skin/images/close-active-hdpi.png         (images/close-active-hdpi.png)
-  skin/images/close-active-tablet-hdpi.png  (images/close-active-tablet-hdpi.png)
   skin/images/close-inactive-tab-hdpi.png   (images/close-inactive-tab-hdpi.png)
-  skin/images/close-inactive-tab-tablet-hdpi.png   (images/close-inactive-tab-tablet-hdpi.png)
-  skin/images/close-background-hdpi.png     (images/close-background-hdpi.png)
   skin/images/check-30.png                  (images/check-30.png)
   skin/images/search-glass-30.png           (images/search-glass-30.png)
   skin/images/search-clear-30.png           (images/search-clear-30.png)
   skin/images/section-expanded-16.png       (images/section-expanded-16.png)
   skin/images/section-collapsed-16.png      (images/section-collapsed-16.png)
   skin/images/task-switch-hdpi.png          (images/task-switch-hdpi.png)
   skin/images/task-close-hdpi.png           (images/task-close-hdpi.png)
   skin/images/task-back-hdpi.png            (images/task-back-hdpi.png)
@@ -214,17 +209,16 @@ chrome.jar:
   skin/gingerbread/images/bookmark-starred-hdpi.png     (gingerbread/images/bookmark-starred-hdpi.png)
   skin/gingerbread/images/forward-default-hdpi.png        (gingerbread/images/forward-default-hdpi.png)
   skin/gingerbread/images/downloads-default-hdpi.png      (gingerbread/images/downloads-default-hdpi.png)
   skin/gingerbread/images/settings-default-hdpi.png       (gingerbread/images/settings-default-hdpi.png)
   skin/gingerbread/images/preferences-default-hdpi.png    (gingerbread/images/preferences-default-hdpi.png)
   skin/gingerbread/images/row-header-bg.png             (gingerbread/images/row-header-bg.png)
   skin/gingerbread/images/console-default-hdpi.png        (gingerbread/images/console-default-hdpi.png)
   skin/gingerbread/images/newtab-default-hdpi.png         (gingerbread/images/newtab-default-hdpi.png)
-  skin/gingerbread/images/newtab-default-tablet-hdpi.png (gingerbread/images/newtab-default-tablet-hdpi.png)
   skin/gingerbread/images/tab-active-hdpi.png           (gingerbread/images/tab-active-hdpi.png)
   skin/gingerbread/images/tab-inactive-hdpi.png         (gingerbread/images/tab-inactive-hdpi.png)
   skin/gingerbread/images/tab-closed-hdpi.png           (gingerbread/images/tab-closed-hdpi.png)
   skin/gingerbread/images/tab-reopen-hdpi.png           (gingerbread/images/tab-reopen-hdpi.png)
   skin/gingerbread/images/remotetabs-48.png             (gingerbread/images/remotetabs-48.png)
   skin/gingerbread/images/remotetabs-32.png             (gingerbread/images/remotetabs-32.png)
   skin/gingerbread/images/mozilla-32.png                (images/mozilla-32.png)
   skin/gingerbread/images/toggle-on.png                 (gingerbread/images/toggle-on.png)
@@ -234,22 +228,18 @@ chrome.jar:
   skin/gingerbread/images/next-hdpi.png                 (gingerbread/images/next-hdpi.png)
   skin/gingerbread/images/next-disabled-hdpi.png        (gingerbread/images/next-disabled-hdpi.png)
   skin/gingerbread/images/identity-default-hdpi.png     (gingerbread/images/identity-default-hdpi.png)
   skin/gingerbread/images/identity-ssl-hdpi.png         (gingerbread/images/identity-ssl-hdpi.png)
   skin/gingerbread/images/identity-ev-hdpi.png          (gingerbread/images/identity-ev-hdpi.png)
   skin/gingerbread/images/unlocked-hdpi.png             (gingerbread/images/unlocked-hdpi.png)
   skin/gingerbread/images/locked-hdpi.png               (gingerbread/images/locked-hdpi.png)
   skin/gingerbread/images/close-default-hdpi.png        (gingerbread/images/close-default-hdpi.png)
-  skin/gingerbread/images/close-default-tablet-hdpi.png (gingerbread/images/close-default-tablet-hdpi.png)
   skin/gingerbread/images/close-active-hdpi.png         (gingerbread/images/close-active-hdpi.png)
-  skin/gingerbread/images/close-active-tablet-hdpi.png  (gingerbread/images/close-active-tablet-hdpi.png)
-  skin/gingerbread/images/close-background-hdpi.png     (gingerbread/images/close-background-hdpi.png)
   skin/gingerbread/images/close-inactive-tab-hdpi.png   (gingerbread/images/close-inactive-tab-hdpi.png)
-  skin/gingerbread/images/close-inactive-tab-tablet-hdpi.png   (gingerbread/images/close-inactive-tab-tablet-hdpi.png)
   skin/gingerbread/images/check-30.png                  (gingerbread/images/check-30.png)
   skin/gingerbread/images/search-glass-30.png           (gingerbread/images/search-glass-30.png)
   skin/gingerbread/images/search-clear-30.png           (gingerbread/images/search-clear-30.png)
   skin/gingerbread/images/section-expanded-16.png       (images/section-expanded-16.png)
   skin/gingerbread/images/section-collapsed-16.png      (images/section-collapsed-16.png)
   skin/gingerbread/images/task-switch-hdpi.png          (gingerbread/images/task-switch-hdpi.png)
   skin/gingerbread/images/task-close-hdpi.png           (gingerbread/images/task-close-hdpi.png)
   skin/gingerbread/images/task-back-hdpi.png            (gingerbread/images/task-back-hdpi.png)
@@ -344,17 +334,16 @@ chrome.jar:
   skin/honeycomb/images/panelrow-selected-hdpi.png    (honeycomb/images/panelrow-selected-hdpi.png)
   skin/honeycomb/images/forward-default-hdpi.png        (honeycomb/images/forward-default-hdpi.png)
   skin/honeycomb/images/downloads-default-hdpi.png      (honeycomb/images/downloads-default-hdpi.png)
   skin/honeycomb/images/settings-default-hdpi.png       (honeycomb/images/settings-default-hdpi.png)
   skin/honeycomb/images/preferences-default-hdpi.png    (honeycomb/images/preferences-default-hdpi.png)
   skin/honeycomb/images/row-header-bg.png             (honeycomb/images/row-header-bg.png)
   skin/honeycomb/images/console-default-hdpi.png        (honeycomb/images/console-default-hdpi.png)
   skin/honeycomb/images/newtab-default-hdpi.png         (honeycomb/images/newtab-default-hdpi.png)
-  skin/honeycomb/images/newtab-default-tablet-hdpi.png (honeycomb/images/newtab-default-tablet-hdpi.png)
   skin/honeycomb/images/tab-active-hdpi.png           (honeycomb/images/tab-active-hdpi.png)
   skin/honeycomb/images/tab-inactive-hdpi.png         (honeycomb/images/tab-inactive-hdpi.png)
   skin/honeycomb/images/tab-closed-hdpi.png           (honeycomb/images/tab-closed-hdpi.png)
   skin/honeycomb/images/tab-reopen-hdpi.png           (honeycomb/images/tab-reopen-hdpi.png)
   skin/honeycomb/images/remotetabs-48.png             (honeycomb/images/remotetabs-48.png)
   skin/honeycomb/images/remotetabs-32.png             (honeycomb/images/remotetabs-32.png)
   skin/honeycomb/images/mozilla-32.png                (images/mozilla-32.png)
   skin/honeycomb/images/toggle-on.png                 (honeycomb/images/toggle-on.png)
@@ -365,22 +354,18 @@ chrome.jar:
   skin/honeycomb/images/next-hdpi.png                 (honeycomb/images/next-hdpi.png)
   skin/honeycomb/images/next-disabled-hdpi.png        (honeycomb/images/next-disabled-hdpi.png)
   skin/honeycomb/images/identity-default-hdpi.png     (honeycomb/images/identity-default-hdpi.png)
   skin/honeycomb/images/identity-ssl-hdpi.png         (honeycomb/images/identity-ssl-hdpi.png)
   skin/honeycomb/images/identity-ev-hdpi.png          (honeycomb/images/identity-ev-hdpi.png)
   skin/honeycomb/images/unlocked-hdpi.png             (honeycomb/images/unlocked-hdpi.png)
   skin/honeycomb/images/locked-hdpi.png               (honeycomb/images/locked-hdpi.png)
   skin/honeycomb/images/close-default-hdpi.png        (honeycomb/images/close-default-hdpi.png)
-  skin/honeycomb/images/close-default-tablet-hdpi.png (honeycomb/images/close-default-tablet-hdpi.png)
   skin/honeycomb/images/close-active-hdpi.png         (honeycomb/images/close-active-hdpi.png)
-  skin/honeycomb/images/close-active-tablet-hdpi.png  (honeycomb/images/close-active-tablet-hdpi.png)
-  skin/honeycomb/images/close-background-hdpi.png     (honeycomb/images/close-background-hdpi.png)
   skin/honeycomb/images/close-inactive-tab-hdpi.png   (honeycomb/images/close-inactive-tab-hdpi.png)
-  skin/honeycomb/images/close-inactive-tab-tablet-hdpi.png   (honeycomb/images/close-inactive-tab-tablet-hdpi.png)
   skin/honeycomb/images/check-30.png                  (images/check-30.png)
   skin/honeycomb/images/check-selected-hdpi.png       (honeycomb/images/check-selected-hdpi.png)
   skin/honeycomb/images/check-unselected-hdpi.png     (honeycomb/images/check-unselected-hdpi.png)
   skin/honeycomb/images/search-glass-30.png           (honeycomb/images/search-glass-30.png)
   skin/honeycomb/images/search-clear-30.png           (honeycomb/images/search-clear-30.png)
   skin/honeycomb/images/section-expanded-16.png       (images/section-expanded-16.png)
   skin/honeycomb/images/section-collapsed-16.png      (images/section-collapsed-16.png)
   skin/honeycomb/images/task-switch-hdpi.png          (honeycomb/images/task-switch-hdpi.png)
deleted file mode 100644
--- a/mobile/themes/core/tablet.css
+++ /dev/null
@@ -1,134 +0,0 @@
-
-.spacer-actionbar,
-.button-actionbar {
-  visibility: collapse;
-}
-
-.button-actionbar[disabled="true"] {
-  opacity: 0.5;
-}
-
-%ifndef honeycomb
-.button-actionbar:hover:active {
-  background-color: #8db8d8;
-}
-%endif
-
-#toolbar-main[tablet="true"] > .spacer-actionbar,
-#toolbar-main[tablet="true"] > .button-actionbar {
-  visibility: visible;
-}
-#toolbar-main[tablet="true"] > #tool-tabs {
-  visibility: collapse;
-}
-
-#controls-scrollbox[tablet="true"] > #controls-sidebar {
-  visibility: collapse;
-}
-
-#tabs-spacer[tablet="true"]  {
-  visibility: collapse;
-}
-
-#tabs-container[tablet="true"] {
-  -moz-border-end: 0px;
-  background: #000;
-}
-
-#tabs[tablet="true"] > scrollbox {
-  max-width: 200px;
-}
-
-#tabs[tablet="true"] .tabs-list {
-  -moz-column-width: 200px;
-  -moz-padding-end: 0px;
-  -moz-padding-start: 0px;
-}
-
-documenttab[tablet="true"] {
-  width: 200px;
-  padding: @padding_xxnormal@;
-  -moz-margin-start: 0px;
-  background: none;
-}
-
-documenttab[tablet="true"][selected="true"] {
-  background: none;
-}
-
-.documenttab-thumbnail[tablet="true"] {
-  border-radius: @border_radius_tiny@;
-}
-
-.documenttab-close-container[tablet="true"] {
-  left: 0px;
-  -moz-margin-end: 0px;
-  -moz-margin-start: 135px;
-  -moz-box-pack: end;
-  -moz-box-align: center;
-}
-
-documenttab[selected="true"] > stack > .documenttab-close-container[tablet="true"] {
-  background: url("chrome://browser/skin/images/close-background-hdpi.png");
-  background-repeat: no-repeat;
-  background-position: right;
-  -moz-margin-end: -@padding_xxnormal@;
-  padding-right: 2px;
-}
-
-.documenttab-close[tablet="true"] {
-  width: 30px;
-  height: 44px;
-  list-style-image: url("chrome://browser/skin/images/close-inactive-tab-tablet-hdpi.png");
-}
-
-documenttab[selected="true"] > stack > hbox > .documenttab-close[tablet="true"] {
-  list-style-image: url("chrome://browser/skin/images/close-default-tablet-hdpi.png");
-}
-
-.documenttab-close-container:hover:active > .documenttab-close[tablet="true"] {
-  list-style-image: url("chrome://browser/skin/images/close-active-tablet-hdpi.png");
-}
-
-#newtab-button[tablet="true"] {
-  list-style-image: url("images/newtab-default-tablet-hdpi.png");
-}
-
-@media (@orientation@: portrait) {
-  #toolbar-main[tablet="true"] > #tool-tabs {
-    visibility: visible;
-  }
-
-  #controls-scrollbox[tablet="true"] > #tabs-sidebar {
-    border: none;
-%ifdef honeycomb
-    top: @touch_button_xlarge@;
-%else
-    top: -moz-calc(@touch_button_xlarge@ + @margin_normal@);
-%endif
-    visibility: collapse;
-  }
-
-  #controls-scrollbox[tablet="true"] > #tabs-sidebar:-moz-locale-dir(ltr) {
-    left: 0;
-  }
-  #controls-scrollbox[tablet="true"] > #tabs-sidebar:-moz-locale-dir(rtl) {
-    right: 0;
-  }
-
-  #controls-scrollbox[tablet="true"] > #tabs-sidebar[open] {
-    position: fixed;
-    visibility: visible;
-  }
-}
-
-%ifndef honeycomb
-@media (min-width: @tablet_panel_minwidth@) {
-  #awesome-panels {
-    -moz-box-shadow: 0px 0px @shadow_width_small@ black;
-  }
-  #search-engines-popup {
-    max-width: -moz-calc(@tablet_panel_minwidth@);
-  }
-}
-%endif
--- a/testing/xpcshell/head.js
+++ b/testing/xpcshell/head.js
@@ -383,16 +383,24 @@ function _load_files(aFiles) {
 
   aFiles.forEach(loadTailFile);
 }
 
 
 /************** Functions to be used from the tests **************/
 
 /**
+ * Prints a message to the output log.
+ */
+function do_print(msg) {
+  var caller_stack = Components.stack.caller;
+  _dump("TEST-INFO | " + caller_stack.filename + " | " + msg + "\n");
+}
+
+/**
  * Calls the given function at least the specified number of milliseconds later.
  * The callback will not undershoot the given time, but it might overshoot --
  * don't expect precision!
  *
  * @param delay : uint
  *   the number of milliseconds to delay
  * @param callback : function() : void
  *   the function to call
--- a/toolkit/mozapps/extensions/AddonRepository.jsm
+++ b/toolkit/mozapps/extensions/AddonRepository.jsm
@@ -1454,17 +1454,17 @@ var AddonDatabase = {
   getStatement: function AD_getStatement(aKey) {
     if (aKey in this.statementCache)
       return this.statementCache[aKey];
 
     let sql = this.statements[aKey];
     try {
       return this.statementCache[aKey] = this.connection.createStatement(sql);
     } catch (e) {
-      ERROR("Error creating statement " + aKey + " (" + aSql + ")");
+      ERROR("Error creating statement " + aKey + " (" + sql + ")");
       throw e;
     }
   },
 
   /**
    * Asynchronously retrieve all add-ons from the database, and pass it
    * to the specified callback
    *
--- a/toolkit/mozapps/extensions/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/XPIProvider.jsm
@@ -3991,18 +3991,18 @@ var XPIDatabase = {
                         "AND location=:location",
     getAddons: "SELECT " + FIELDS_ADDON + " FROM addon",
     getAddonsByType: "SELECT " + FIELDS_ADDON + " FROM addon WHERE type=:type",
     getAddonsInLocation: "SELECT " + FIELDS_ADDON + " FROM addon WHERE " +
                          "location=:location",
     getInstallLocations: "SELECT DISTINCT location FROM addon",
     getVisibleAddonForID: "SELECT " + FIELDS_ADDON + " FROM addon WHERE " +
                           "visible=1 AND id=:id",
-    getVisibleAddoForInternalName: "SELECT " + FIELDS_ADDON + " FROM addon " +
-                                   "WHERE visible=1 AND internalName=:internalName",
+    getVisibleAddonForInternalName: "SELECT " + FIELDS_ADDON + " FROM addon " +
+                                    "WHERE visible=1 AND internalName=:internalName",
     getVisibleAddons: "SELECT " + FIELDS_ADDON + " FROM addon WHERE visible=1",
     getVisibleAddonsWithPendingOperations: "SELECT " + FIELDS_ADDON + " FROM " +
                                            "addon WHERE visible=1 " +
                                            "AND (pendingUninstall=1 OR " +
                                            "MAX(userDisabled,appDisabled)=active)",
 
     makeAddonVisible: "UPDATE addon SET visible=1 WHERE internal_id=:internal_id",
     removeAddonMetadata: "DELETE FROM addon WHERE internal_id=:internal_id",
@@ -4981,17 +4981,17 @@ var XPIDatabase = {
   /**
    * Synchronously gets an add-on with a particular internalName.
    *
    * @param  aInternalName
    *         The internalName of the add-on to retrieve
    * @return a DBAddonInternal
    */
   getVisibleAddonForInternalName: function XPIDB_getVisibleAddonForInternalName(aInternalName) {
-    let stmt = this.getStatement("getVisibleAddoForInternalName");
+    let stmt = this.getStatement("getVisibleAddonForInternalName");
 
     let addon = null;
     stmt.params.internalName = aInternalName;
 
     if (stepStatement(stmt))
       addon = this.makeAddonFromRow(stmt.row);
 
     stmt.reset();
--- a/toolkit/themes/winstripe/global/webConsole.css
+++ b/toolkit/themes/winstripe/global/webConsole.css
@@ -154,16 +154,27 @@
   display: none;
 }
 
 .webconsole-filter-button > .toolbarbutton-menubutton-button {
   -moz-box-orient: horizontal;
   list-style-image: url("chrome://global/skin/icons/webconsole.png");
 }
 
+.webconsole-filter-button > .toolbarbutton-menubutton-button,
+.webconsole-filter-button > .toolbarbutton-menubutton-button:hover:active {
+  -moz-padding-start: 6px;
+  -moz-padding-end: 3px;
+}
+
+.webconsole-filter-button {
+  -moz-margin-start: 3px;
+  -moz-margin-end: 3px;
+}
+
 /* Network styles */
 .webconsole-filter-button[category="net"] {
   -moz-image-region: rect(0, 8px, 8px, 0);
 }
 
 .webconsole-msg-network > .webconsole-msg-icon-container {
   -moz-border-start: solid #000 6px;
 }
@@ -309,17 +320,17 @@
   color: GrayText;
 }
 
 .jsterm-output-line {
   font-size: 1em;
 }
 
 .hud-console-filter-toolbar {
-  padding: 1px 0px;
+  padding: 1px 2px;
   -moz-box-align: center;
   -moz-appearance: none;
   background-color: -moz-dialog;
   border-top: none;
 }
 
 .web-console-panel {
   -moz-appearance: none;