Bug 570321 - spell-check-dictionary name is not displayed in context menu; r=gavin

--HG--
extra : rebase_source : e1871e9076407b7f367f4bfd8d10535317524d11
This commit is contained in:
Ehsan Akhgari 2010-06-05 23:48:30 -04:00
parent 39534c1d71
commit 641452a0dd
2 changed files with 4 additions and 3 deletions

View File

@ -55,10 +55,11 @@ function getVisibleMenuItems(aMenu) {
} else {
ok(item.id, "child menuitem #" + i + " has an ID");
}
ok(item.label.length, "menuitem " + item.id + " has a label");
var label = item.getAttribute("label");
ok(label.length, "menuitem " + item.id + " has a label");
if (isSpellSuggestion) {
is(key, "", "Spell suggestions shouldn't have an access key");
items.push("*" + item.label);
items.push("*" + label);
} else if (item.id.indexOf("spell-check-dictionary-") != 0 &&
item.id != "spell-no-suggestions") {
ok(key, "menuitem " + item.id + " has an access key");

View File

@ -219,7 +219,7 @@ InlineSpellChecker.prototype = {
this.mDictionaryNames.push(list[i]);
var item = menu.ownerDocument.createElement("menuitem");
item.setAttribute("id", "spell-check-dictionary-" + list[i]);
item.label = displayName;
item.setAttribute("label", displayName);
item.setAttribute("type", "checkbox");
this.mDictionaryItems.push(item);
if (curlang == list[i]) {