Bug 582121 - Web Console filter box should look like a search box. r=gavin, a=gavin
authorPatrick Walton <pwalton@mozilla.com>
Tue, 03 Aug 2010 13:08:11 +1200
changeset 48755 a731dc8d3b27b9bf0494cd4396a0448bd8b28c45
parent 48754 6229a8b84769f2713c66e7dd74891950750dbb71
child 48756 ecc2ca05ae47862e75defcb9a9f41ef614c3d436
push id14799
push userbmcbride@mozilla.com
push dateTue, 03 Aug 2010 01:12:06 +0000
treeherdermozilla-central@a731dc8d3b27 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin, gavin
bugs582121
milestone2.0b3pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 582121 - Web Console filter box should look like a search box. r=gavin, a=gavin
toolkit/components/console/hudservice/HUDService.jsm
toolkit/locales/en-US/chrome/global/headsUpDisplay.properties
--- a/toolkit/components/console/hudservice/HUDService.jsm
+++ b/toolkit/components/console/hudservice/HUDService.jsm
@@ -1806,24 +1806,20 @@ HeadsUpDisplay.prototype = {
     this.outputNode = this.makeXULNode("vbox");
     this.outputNode.setAttribute("class", "hud-output-node");
     this.outputNode.setAttribute("flex", "1");
 
     this.filterSpacer = this.makeXULNode("spacer");
     this.filterSpacer.setAttribute("flex", "1");
 
     this.filterBox = this.makeXULNode("textbox");
-    this.filterBox.setAttribute("class", "hud-filter-box");
+    this.filterBox.setAttribute("class", "compact hud-filter-box");
     this.filterBox.setAttribute("hudId", this.hudId);
     this.filterBox.setAttribute("placeholder", this.getStr("stringFilter"));
-
-    this.filterClearButton = this.makeXULNode("button");
-    this.filterClearButton.setAttribute("class", "hud-filter-clear");
-    this.filterClearButton.setAttribute("label", this.getStr("stringFilterClear"));
-    this.filterClearButton.setAttribute("hudId", this.hudId);
+    this.filterBox.setAttribute("type", "search");
 
     this.setFilterTextBoxEvents();
 
     this.consoleClearButton = this.makeXULNode("button");
     this.consoleClearButton.setAttribute("class", "hud-console-clear");
     this.consoleClearButton.setAttribute("label", this.getStr("btnClear"));
     this.consoleClearButton.setAttribute("buttonType", "clear");
     this.consoleClearButton.setAttribute("hudId", this.hudId);
@@ -1854,21 +1850,16 @@ HeadsUpDisplay.prototype = {
   setFilterTextBoxEvents: function HUD_setFilterTextBoxEvents()
   {
     var self = this;
     function keyPress(aEvent)
     {
       HUDService.updateFilterText(aEvent.target);
     }
     this.filterBox.addEventListener("keydown", keyPress, false);
-
-    function filterClick(aEvent) {
-      self.filterBox.value = "";
-    }
-    this.filterClearButton.addEventListener("click", filterClick, false);
   },
 
   /**
    * Make the filter toolbar where we can toggle logging filters
    *
    * @returns nsIDOMNode
    */
   makeFilterToolbar: function HUD_makeFilterToolbar()
@@ -1888,17 +1879,16 @@ HeadsUpDisplay.prototype = {
       }
       else {
         btn = this.makeButton(buttons[i], "checkbox");
       }
       toolbar.appendChild(btn);
     }
     toolbar.appendChild(this.filterSpacer);
     toolbar.appendChild(this.filterBox);
-    toolbar.appendChild(this.filterClearButton);
     return toolbar;
   },
 
   makeButton: function HUD_makeButton(aName, aType)
   {
     var self = this;
     let prefKey = aName.toLowerCase();
 
--- a/toolkit/locales/en-US/chrome/global/headsUpDisplay.properties
+++ b/toolkit/locales/en-US/chrome/global/headsUpDisplay.properties
@@ -29,9 +29,8 @@ tipWarn=Toggle console.warn logging
 btnLog=Log
 tipLog=Toggle console.log logging
 btnGlobal=Global Messages
 tipGlobal=Toggle Global Message logging
 localConsole=Local Console
 btnClear=Clear Console
 tipClear=Clear the console output
 stringFilter=Filter
-stringFilterClear=Clear Filter