diff --git a/browser/components/search/content/search.xml b/browser/components/search/content/search.xml index 52c2f45f294a..65f81b24ac41 100644 --- a/browser/components/search/content/search.xml +++ b/browser/components/search/content/search.xml @@ -122,7 +122,6 @@ // Refresh the display (updating icon, etc) this.updateDisplay(); - this._textbox._displayCurrentEngine(); var os = Components.classes["@mozilla.org/observer-service;1"] @@ -191,31 +190,8 @@ ]]> - - - + @@ -495,9 +466,6 @@ - + - @@ -710,28 +675,6 @@ - - - - - @@ -785,12 +728,7 @@ var data = transferUtils.retrieveURLFromData(aXferData.data, aXferData.flavour.contentType); if (data) { - // Remove the search bar's empty attribute, since we're setting - // a value without focusing the textbox. If it's not empty, this - // won't do anything. This can be removed if bug 280635 is fixed. - document.getBindingParent(this.mOuter).removeAttribute("empty"); this.mOuter.value = data; - this.mOuter.onTextEntered(aEvent); } }, @@ -833,20 +771,6 @@ nsDragAndDrop.drop(event, this.searchbarDNDObserver); - - - - diff --git a/browser/themes/gnomestripe/browser/browser.css b/browser/themes/gnomestripe/browser/browser.css index 40fa340b4676..947f0fc090eb 100644 --- a/browser/themes/gnomestripe/browser/browser.css +++ b/browser/themes/gnomestripe/browser/browser.css @@ -60,21 +60,6 @@ min-height: 26px; } -#searchbar[empty="true"] > .searchbar-textbox { - color: GrayText; - direction: ltr !important; -} - -#searchbar[empty="true"] > .searchbar-textbox > hbox > hbox > html|input { - direction: ltr !important; - text-align: left !important; -} - -#searchbar[chromedir="rtl"][empty="true"] > .searchbar-textbox > hbox > hbox > html|input { - direction: rtl !important; - text-align: right !important; -} - #wrapper-search-container #searchbar html|*.textbox-input { visibility: hidden; } diff --git a/browser/themes/pinstripe/browser/browser.css b/browser/themes/pinstripe/browser/browser.css index 19cebeebf32b..330bd2395e0f 100755 --- a/browser/themes/pinstripe/browser/browser.css +++ b/browser/themes/pinstripe/browser/browser.css @@ -51,15 +51,6 @@ /* ----- SEARCH FIELD ----- */ -#searchbar[empty="true"] > .searchbar-textbox { - color: GrayText; -} - -#searchbar[empty="true"] html|input { - direction: ltr !important; - text-align: left !important; -} - #wrapper-search-container #searchbar html|*.textbox-input { visibility: hidden; } diff --git a/browser/themes/winstripe/browser/browser.css b/browser/themes/winstripe/browser/browser.css index 2ac7a980ecd2..8e74877a5d7d 100644 --- a/browser/themes/winstripe/browser/browser.css +++ b/browser/themes/winstripe/browser/browser.css @@ -58,21 +58,6 @@ min-height: 26px; } -#searchbar[empty="true"] > .searchbar-textbox { - color: GrayText; - direction: ltr !important; -} - -#searchbar[empty="true"] > .searchbar-textbox > hbox > hbox > html|input { - direction: ltr !important; - text-align: left !important; -} - -#searchbar[chromedir="rtl"][empty="true"] > .searchbar-textbox > hbox > hbox > html|input { - direction: rtl !important; - text-align: right !important; -} - #wrapper-search-container #searchbar html|*.textbox-input { visibility: hidden; } diff --git a/toolkit/content/tests/widgets/Makefile.in b/toolkit/content/tests/widgets/Makefile.in index f0faec7f83c6..79f8875d094d 100644 --- a/toolkit/content/tests/widgets/Makefile.in +++ b/toolkit/content/tests/widgets/Makefile.in @@ -82,6 +82,7 @@ _TEST_FILES = test_bug360220.xul \ test_tree_hier_cell.xul \ test_tree_column_reorder.xul \ tree_shared.js \ + test_textbox_emptytext.xul \ test_textbox_number.xul \ xul_selectcontrol.js \ test_popupincontent.xul \ diff --git a/toolkit/content/tests/widgets/test_textbox_emptytext.xul b/toolkit/content/tests/widgets/test_textbox_emptytext.xul new file mode 100644 index 000000000000..23e73cf33fc5 --- /dev/null +++ b/toolkit/content/tests/widgets/test_textbox_emptytext.xul @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + diff --git a/toolkit/content/widgets/autocomplete.xml b/toolkit/content/widgets/autocomplete.xml index 39e85328aa41..e87f34f6abe4 100644 --- a/toolkit/content/widgets/autocomplete.xml +++ b/toolkit/content/widgets/autocomplete.xml @@ -82,10 +82,6 @@ null false - - document.getAnonymousElementByAttribute(this, "anonid", "input"); - - @@ -238,8 +234,6 @@ onset="this.setAttribute('crop',val); return val;" onget="return this.getAttribute('crop');"/> - - + onget="return this.hasAttribute('empty') ? '' : this.inputField.value;"> @@ -516,7 +518,7 @@ @@ -524,7 +526,7 @@ diff --git a/toolkit/content/widgets/textbox.xml b/toolkit/content/widgets/textbox.xml index 32a3b4de730c..6e8c93e958b8 100644 --- a/toolkit/content/widgets/textbox.xml +++ b/toolkit/content/widgets/textbox.xml @@ -24,7 +24,7 @@ - + + + "" + "" + "" + "" + null false false @@ -45,10 +51,30 @@ ]]> - + + + + + @@ -131,16 +157,53 @@ ]]> + + + + + + + + @@ -156,6 +219,8 @@ + + this._clearEmptyText(); + + + + this._updateVisibleText(); + +