author | Sebastian Hengst <archaeopteryx@coole-files.de> |
Thu, 20 Oct 2016 20:03:15 +0200 | |
changeset 318855 | 69974770e8a63a412561f0490622c6717f749194 |
parent 318854 | 92d09cb049f594de283a06e111a2faaf74fbeb21 |
child 318856 | a7281f6c576a8980975037278f51b11f5eaba15a |
push id | 30854 |
push user | ryanvm@gmail.com |
push date | Fri, 21 Oct 2016 21:08:02 +0000 |
treeherder | mozilla-central@806054dd12bd [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
bugs | 908570 |
milestone | 52.0a1 |
backs out | 6b3dc11025136983d14bff43dc3b483fc25832d9 |
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
|
browser/base/content/nsContextMenu.js | file | annotate | diff | comparison | revisions | |
browser/base/content/test/general/browser_contextmenu.js | file | annotate | diff | comparison | revisions |
--- a/browser/base/content/nsContextMenu.js +++ b/browser/base/content/nsContextMenu.js @@ -363,21 +363,20 @@ nsContextMenu.prototype = { this.showItem("context-sharevideo", shareEnabled && this.onVideo); this.setItemAttr("context-sharevideo", "disabled", !this.mediaURL || this.mediaURL.startsWith("blob:")); }, initSpellingItems: function() { var canSpell = InlineSpellCheckerUI.canSpellCheck && !InlineSpellCheckerUI.initialSpellCheckPending && this.canSpellCheck; - let showDictionaries = canSpell && InlineSpellCheckerUI.enabled; var onMisspelling = InlineSpellCheckerUI.overMisspelling; var showUndo = canSpell && InlineSpellCheckerUI.canUndo(); this.showItem("spell-check-enabled", canSpell); - this.showItem("spell-separator", canSpell); + this.showItem("spell-separator", canSpell || this.onEditableArea); document.getElementById("spell-check-enabled") .setAttribute("checked", canSpell && InlineSpellCheckerUI.enabled); this.showItem("spell-add-to-dictionary", onMisspelling); this.showItem("spell-undo-add-to-dictionary", showUndo); // suggestion list this.showItem("spell-suggestions-separator", onMisspelling || showUndo); @@ -388,30 +387,29 @@ nsContextMenu.prototype = { InlineSpellCheckerUI.addSuggestionsToMenu(suggestionsSeparator.parentNode, suggestionsSeparator, 5); this.showItem("spell-no-suggestions", numsug == 0); } else this.showItem("spell-no-suggestions", false); // dictionary list - this.showItem("spell-dictionaries", showDictionaries); + this.showItem("spell-dictionaries", canSpell && InlineSpellCheckerUI.enabled); if (canSpell) { var dictMenu = document.getElementById("spell-dictionaries-menu"); var dictSep = document.getElementById("spell-language-separator"); let count = InlineSpellCheckerUI.addDictionaryListToMenu(dictMenu, dictSep); this.showItem(dictSep, count > 0); this.showItem("spell-add-dictionaries-main", false); } else if (this.onEditableArea) { // when there is no spellchecker but we might be able to spellcheck // add the add to dictionaries item. This will ensure that people // with no dictionaries will be able to download them - this.showItem("spell-language-separator", showDictionaries); - this.showItem("spell-add-dictionaries-main", showDictionaries); + this.showItem("spell-add-dictionaries-main", true); } else this.showItem("spell-add-dictionaries-main", false); }, initClipboardItems: function() { // Copy depends on whether there is selected text. // Enabling this context menu item is now done through the global
--- a/browser/base/content/test/general/browser_contextmenu.js +++ b/browser/base/content/test/general/browser_contextmenu.js @@ -844,16 +844,18 @@ add_task(function* test_input_spell_fals ["context-undo", false, "---", null, "context-cut", true, "context-copy", true, "context-paste", null, // ignore clipboard state "context-delete", false, "---", null, "context-selectall", true, + "---", null, + "spell-add-dictionaries-main", true, ], { waitForSpellCheck: true } ); }); const remoteClientsFixture = [ { id: 1, name: "Foo"}, { id: 2, name: "Bar"} ];