diff --git a/browser/base/content/browser.css b/browser/base/content/browser.css index a597165920e..35d59e3eb0f 100644 --- a/browser/base/content/browser.css +++ b/browser/base/content/browser.css @@ -38,7 +38,7 @@ toolbar[printpreview="true"] { #urlbar[pageproxystate="invalid"] > #urlbar-icons > :not(#go-button) , #urlbar[pageproxystate="valid"] > #urlbar-icons > #go-button , -#urlbar[empty="true"] > #urlbar-icons > #go-button { +#urlbar[isempty="true"] > #urlbar-icons > #go-button { visibility: collapse; } diff --git a/browser/themes/pinstripe/browser/browser.css b/browser/themes/pinstripe/browser/browser.css index 676c183c792..95938caeef8 100644 --- a/browser/themes/pinstripe/browser/browser.css +++ b/browser/themes/pinstripe/browser/browser.css @@ -1352,7 +1352,7 @@ richlistitem[selected="true"][current="true"] > hbox > .ac-result-type-bookmark, color: inherit; } -#editBMPanel_tagsField[empty="true"] { +#editBMPanel_tagsField[isempty="true"] { color: #bbb !important; } diff --git a/browser/themes/pinstripe/browser/searchbar.css b/browser/themes/pinstripe/browser/searchbar.css index c796ea69380..ef80b3b5277 100644 --- a/browser/themes/pinstripe/browser/searchbar.css +++ b/browser/themes/pinstripe/browser/searchbar.css @@ -138,10 +138,6 @@ background-image: url("chrome://browser/skin/urlbar/endcap-focused-graphite-rtl.png"); } -#searchbar[empty="true"] .search-go-button { - visibility: hidden; -} - .search-go-button { padding: 1px; list-style-image: url("chrome://browser/skin/Search.png"); diff --git a/toolkit/content/tests/widgets/test_textbox_emptytext.xul b/toolkit/content/tests/widgets/test_textbox_emptytext.xul index e79b1776a0b..ddd8b874c5b 100644 --- a/toolkit/content/tests/widgets/test_textbox_emptytext.xul +++ b/toolkit/content/tests/widgets/test_textbox_emptytext.xul @@ -29,7 +29,7 @@ function doTests() { var t1 = $("t1"); t1.emptyText = 1; - ok(t1.hasAttribute("empty"), "emptyText but no value => 'empty' attribute is present"); + ok(t1.hasAttribute("isempty"), "emptyText but no value => 'isempty' attribute is present"); ok("1" === t1.label, "emptyText exposed as label"); ok("" === t1.value, "emptyText not exposed as value"); @@ -38,7 +38,7 @@ function doTests() { ok("1" === t1.emptyText, "emptyText persists after setting label"); t1.value = 3; - ok(!t1.hasAttribute("empty"), "value present => 'empty' attribute not present"); + ok(!t1.hasAttribute("isempty"), "value present => 'isempty' attribute not present"); ok("3" === t1.value, "value setter/getter works while emptyText is present"); ok("1" === t1.emptyText, "emptyText persists after setting value"); diff --git a/toolkit/content/textbox.css b/toolkit/content/textbox.css index e9b8066b761..8a4adc7b5a8 100644 --- a/toolkit/content/textbox.css +++ b/toolkit/content/textbox.css @@ -12,20 +12,20 @@ html|*.textbox-textarea { text-shadow: inherit; } -textbox[empty="true"] html|*.textbox-input , -textbox[empty="true"] html|*.textbox-textarea { +textbox[isempty="true"] html|*.textbox-input , +textbox[isempty="true"] html|*.textbox-textarea { text-align: left; direction: ltr; } -textbox[empty="true"][chromedir="rtl"] html|*.textbox-input , -textbox[empty="true"][chromedir="rtl"] html|*.textbox-textarea { +textbox[isempty="true"][chromedir="rtl"] html|*.textbox-input , +textbox[isempty="true"][chromedir="rtl"] html|*.textbox-textarea { text-align: right; direction: rtl; } -textbox[empty="true"] html|*.textbox-input[emptytextdelay="true"] , -textbox[empty="true"] html|*.textbox-textarea[emptytextdelay="true"] { +textbox[isempty="true"] html|*.textbox-input[emptytextdelay="true"] , +textbox[isempty="true"] html|*.textbox-textarea[emptytextdelay="true"] { color: transparent !important; } diff --git a/toolkit/content/widgets/autocomplete.xml b/toolkit/content/widgets/autocomplete.xml index 3f47cefe9fd..90e72ef7e13 100644 --- a/toolkit/content/widgets/autocomplete.xml +++ b/toolkit/content/widgets/autocomplete.xml @@ -254,7 +254,7 @@ + onget="return this.hasAttribute('isempty') ? '' : this.inputField.value;"> + onget="return this.hasAttribute('isempty') ? '' : this.inputField.value;"> @@ -168,8 +168,8 @@ !this.value && this.emptyText) { - if (!this.hasAttribute("empty")) { - this.setAttribute("empty", "true"); + if (!this.hasAttribute("isempty")) { + this.setAttribute("isempty", "true"); // Hide the emptytext for a bit, in case the textbox will be focused subsequently this.inputField.setAttribute("emptytextdelay", "true"); @@ -189,7 +189,7 @@ @@ -323,7 +323,7 @@ onset="this.setAttribute('timeout', val); return val;" onget="return parseInt(this.getAttribute('timeout')) || 0;"/> + onget="return this.hasAttribute('isempty') ? '' : this.inputField.value;"> + onget="return this.hasAttribute('isempty') ? '' : this.inputField.value;">