From f5dc99b818af7e9e129872aff16013701f53116c Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Thu, 21 Aug 2014 12:27:16 +0100 Subject: [PATCH] Backed out changeset 93cd3fc35cfc (bug 1014332) --- browser/base/content/nsContextMenu.js | 2 +- .../test/general/test_contextmenu.html | 55 ------------------- .../test/general/test_contextmenu_input.html | 1 - .../locales/en-US/chrome/browser/browser.dtd | 8 +-- 4 files changed, 5 insertions(+), 61 deletions(-) diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js index 16f5c8613034..17e262bdf9be 100644 --- a/browser/base/content/nsContextMenu.js +++ b/browser/base/content/nsContextMenu.js @@ -334,7 +334,7 @@ nsContextMenu.prototype = { let shareEnabled = shareButton && !shareButton.disabled && !this.onSocial; let pageShare = shareEnabled && !(this.isContentSelected || this.onTextInput || this.onLink || this.onImage || - this.onVideo || this.onAudio || this.onCanvas); + this.onVideo || this.onAudio); this.showItem("context-sharepage", pageShare); this.showItem("context-shareselect", shareEnabled && this.isContentSelected); this.showItem("context-sharelink", shareEnabled && (this.onLink || this.onPlainTextLink) && !this.onMailtoLink); diff --git a/browser/base/content/test/general/test_contextmenu.html b/browser/base/content/test/general/test_contextmenu.html index 3c1b7895dc8c..d90f21c3e600 100644 --- a/browser/base/content/test/general/test_contextmenu.html +++ b/browser/base/content/test/general/test_contextmenu.html @@ -89,7 +89,6 @@ function runTest(testNum) { }, function () { - info("context menu for text"); // Context menu for plain text plainTextItems = ["context-navigation", null, ["context-back", false, @@ -97,7 +96,6 @@ function runTest(testNum) { "context-reload", true, "context-bookmarkpage", true], null, "---", null, - "context-sharepage", true, "context-savepage", true, "---", null, "context-viewbgimage", false, @@ -112,7 +110,6 @@ function runTest(testNum) { }, function () { - info("context menu for text link"); // Context menu for text link if (perWindowPrivateBrowsing) { checkContextMenu(["context-openlinkintab", true, @@ -120,7 +117,6 @@ function runTest(testNum) { "context-openlinkprivate", true, "---", null, "context-bookmarklink", true, - "context-sharelink", true, "context-savelink", true, "context-copylink", true, "context-searchselect", true @@ -130,7 +126,6 @@ function runTest(testNum) { "context-openlink", true, "---", null, "context-bookmarklink", true, - "context-sharelink", true, "context-savelink", true, "context-copylink", true, "context-searchselect", true @@ -141,7 +136,6 @@ function runTest(testNum) { }, function () { - info("context menu for mailto link"); // Context menu for text mailto-link checkContextMenu(["context-copyemail", true, "context-searchselect", true @@ -151,14 +145,12 @@ function runTest(testNum) { }, function () { - info("context menu for image"); // Context menu for an image checkContextMenu(["context-viewimage", true, "context-copyimage-contents", true, "context-copyimage", true, "---", null, "context-saveimage", true, - "context-shareimage", true, "context-sendimage", true, "context-setDesktopBackground", true, "context-viewimageinfo", true @@ -168,7 +160,6 @@ function runTest(testNum) { }, function () { - info("context menu for canvas"); // Context menu for a canvas checkContextMenu(["context-viewimage", true, "context-saveimage", true, @@ -179,7 +170,6 @@ function runTest(testNum) { }, function () { - info("context menu for video_ok"); // Context menu for a video (with a VALID media source) checkContextMenu(["context-media-play", true, "context-media-mute", true, @@ -196,7 +186,6 @@ function runTest(testNum) { "context-copyvideourl", true, "---", null, "context-savevideo", true, - "context-sharevideo", true, "context-video-saveimage", true, "context-sendvideo", true ].concat(inspectItems)); @@ -205,7 +194,6 @@ function runTest(testNum) { }, function () { - info("context menu for audio_in_video"); // Context menu for a video (with an audio-only file) checkContextMenu(["context-media-play", true, "context-media-mute", true, @@ -226,7 +214,6 @@ function runTest(testNum) { }, function () { - info("context menu for video_bad"); // Context menu for a video (with an INVALID media source) checkContextMenu(["context-media-play", false, "context-media-mute", false, @@ -243,7 +230,6 @@ function runTest(testNum) { "context-copyvideourl", true, "---", null, "context-savevideo", true, - "context-sharevideo", true, "context-video-saveimage", false, "context-sendvideo", true ].concat(inspectItems)); @@ -252,7 +238,6 @@ function runTest(testNum) { }, function () { - info("context menu for video_bad2"); // Context menu for a video (with an INVALID media source) checkContextMenu(["context-media-play", false, "context-media-mute", false, @@ -269,7 +254,6 @@ function runTest(testNum) { "context-copyvideourl", false, "---", null, "context-savevideo", false, - "context-sharevideo", false, "context-video-saveimage", false, "context-sendvideo", false ].concat(inspectItems)); @@ -278,7 +262,6 @@ function runTest(testNum) { }, function () { - info("context menu for iframe"); // Context menu for an iframe checkContextMenu(["context-navigation", null, ["context-back", false, @@ -286,7 +269,6 @@ function runTest(testNum) { "context-reload", true, "context-bookmarkpage", true], null, "---", null, - "context-sharepage", true, "context-savepage", true, "---", null, "context-viewbgimage", false, @@ -314,7 +296,6 @@ function runTest(testNum) { }, function () { - info("context menu for video_in_iframe"); // Context menu for a video in an iframe checkContextMenu(["context-media-play", true, "context-media-mute", true, @@ -331,7 +312,6 @@ function runTest(testNum) { "context-copyvideourl", true, "---", null, "context-savevideo", true, - "context-sharevideo", true, "context-video-saveimage", true, "context-sendvideo", true, "frame", null, @@ -352,14 +332,12 @@ function runTest(testNum) { }, function () { - info("context menu for image_in_iframe"); // Context menu for an image in an iframe checkContextMenu(["context-viewimage", true, "context-copyimage-contents", true, "context-copyimage", true, "---", null, "context-saveimage", true, - "context-shareimage", true, "context-sendimage", true, "context-setDesktopBackground", true, "context-viewimageinfo", true, @@ -381,7 +359,6 @@ function runTest(testNum) { }, function () { - info("context menu for textarea"); // Context menu for textarea before spell check initialization finishes checkContextMenu(["context-undo", false, "---", null, @@ -399,7 +376,6 @@ function runTest(testNum) { }, function () { - info("context menu for textarea, wait for spell check"); // Context menu for textarea after spell check initialization finishes checkContextMenu(["*chubbiness", true, // spelling suggestion "spell-add-to-dictionary", true, @@ -425,7 +401,6 @@ function runTest(testNum) { }, function () { - info("context menu for text"); // Re-check context menu for plain text to make sure it hasn't changed checkContextMenu(plainTextItems); closeContextMenu(); @@ -433,7 +408,6 @@ function runTest(testNum) { }, function () { - info("context menu for textarea after word added"); // Context menu for textarea after a word has been added // to the dictionary checkContextMenu(["spell-undo-add-to-dictionary", true, @@ -459,7 +433,6 @@ function runTest(testNum) { }, function () { - info("context menu for contenteditable"); // Context menu for contenteditable checkContextMenu(["spell-no-suggestions", false, "spell-add-to-dictionary", true, @@ -485,14 +458,12 @@ function runTest(testNum) { }, function () { - info("context menu for link"); executeCopyCommand("cmd_copyLink", "http://mozilla.com/"); closeContextMenu(); openContextMenuFor(pagemenu); // Invoke context menu for next test. }, function () { - info("context menu for pagemenu"); // Context menu for element with assigned content context menu checkContextMenu(["context-navigation", null, ["context-back", false, @@ -520,7 +491,6 @@ function runTest(testNum) { "---", null, "+Checkbox", {type: "checkbox", icon: "", checked: false, disabled: false}], null, "---", null, - "context-sharepage", true, "context-savepage", true, "---", null, "context-viewbgimage", false, @@ -546,7 +516,6 @@ function runTest(testNum) { }, function () { - info("context menu for fullscreen mode"); // Context menu for DOM Fullscreen mode (NOTE: this is *NOT* on an img) checkContextMenu(["context-navigation", null, ["context-back", false, @@ -556,7 +525,6 @@ function runTest(testNum) { "---", null, "context-leave-dom-fullscreen", true, "---", null, - "context-sharepage", true, "context-savepage", true, "---", null, "context-viewbgimage", false, @@ -578,7 +546,6 @@ function runTest(testNum) { }, function () { - info("context menu for element with assigned content context menu"); // Context menu for element with assigned content context menu // The shift key should bypass content context menu processing checkContextMenu(["context-navigation", null, @@ -587,7 +554,6 @@ function runTest(testNum) { "context-reload", true, "context-bookmarkpage", true], null, "---", null, - "context-sharepage", true, "context-savepage", true, "---", null, "context-viewbgimage", false, @@ -602,7 +568,6 @@ function runTest(testNum) { }, function () { - info("context menu for text selection"); // Context menu for selected text if (SpecialPowers.Services.appinfo.OS == "Darwin") { // This test is only enabled on Mac due to bug 736399. @@ -610,7 +575,6 @@ function runTest(testNum) { "context-selectall", true, "---", null, "context-searchselect", true, - "context-shareselect", true, "context-viewpartialsource-selection", true ].concat(inspectItems)); } @@ -620,7 +584,6 @@ function runTest(testNum) { }, function () { - info("context menu for text selection with url pattern"); // Context menu for selected text which matches valid URL pattern if (SpecialPowers.Services.appinfo.OS == "Darwin") { // This test is only enabled on Mac due to bug 736399. @@ -631,13 +594,11 @@ function runTest(testNum) { "context-openlinkprivate", true, "---", null, "context-bookmarklink", true, - "context-sharelink", true, "context-savelink", true, "context-copy", true, "context-selectall", true, "---", null, "context-searchselect", true, - "context-shareselect", true, "context-viewpartialsource-selection", true ].concat(inspectItems)); } else { @@ -646,13 +607,11 @@ function runTest(testNum) { "context-openlink", true, "---", null, "context-bookmarklink", true, - "context-sharelink", true, "context-savelink", true, "context-copy", true, "context-selectall", true, "---", null, "context-searchselect", true, - "context-shareselect", true, "context-viewpartialsource-selection", true ].concat(inspectItems)); } @@ -665,7 +624,6 @@ function runTest(testNum) { }, function () { - info("context menu for imagelink"); // Context menu for image link if (perWindowPrivateBrowsing) { checkContextMenu(["context-openlinkintab", true, @@ -673,7 +631,6 @@ function runTest(testNum) { "context-openlinkprivate", true, "---", null, "context-bookmarklink", true, - "context-sharelink", true, "context-savelink", true, "context-copylink", true, "---", null, @@ -682,7 +639,6 @@ function runTest(testNum) { "context-copyimage", true, "---", null, "context-saveimage", true, - "context-shareimage", true, "context-sendimage", true, "context-setDesktopBackground", true, "context-viewimageinfo", true @@ -692,7 +648,6 @@ function runTest(testNum) { "context-openlink", true, "---", null, "context-bookmarklink", true, - "context-sharelink", true, "context-savelink", true, "context-copylink", true, "---", null, @@ -701,7 +656,6 @@ function runTest(testNum) { "context-copyimage", true, "---", null, "context-saveimage", true, - "context-shareimage", true, "context-sendimage", true, "context-setDesktopBackground", true, "context-viewimageinfo", true @@ -713,7 +667,6 @@ function runTest(testNum) { }, function () { - info("context menu for select_inputtext"); // Context menu for selected text in input checkContextMenu(["context-undo", false, "---", null, @@ -733,7 +686,6 @@ function runTest(testNum) { }, function () { - info("context menu for selected text in input[type='password']"); // Context menu for selected text in input[type="password"] checkContextMenu(["context-undo", false, "---", null, @@ -757,7 +709,6 @@ function runTest(testNum) { }, function () { - info("context menu for click-to-play blocked plugin"); // Context menu for click-to-play blocked plugin checkContextMenu(["context-navigation", null, ["context-back", false, @@ -768,7 +719,6 @@ function runTest(testNum) { "context-ctp-play", true, "context-ctp-hide", true, "---", null, - "context-sharepage", true, "context-savepage", true, "---", null, "context-viewbgimage", false, @@ -784,14 +734,12 @@ function runTest(testNum) { }, function () { - info("context menu for image with longdesc"); // Context menu for an image with longdesc checkContextMenu(["context-viewimage", true, "context-copyimage-contents", true, "context-copyimage", true, "---", null, "context-saveimage", true, - "context-shareimage", true, "context-sendimage", true, "context-setDesktopBackground", true, "context-viewimageinfo", true, @@ -802,7 +750,6 @@ function runTest(testNum) { }, function () { - info("context menu for iframe with srcdoc attribute set"); // Context menu for an iframe with srcdoc attribute set checkContextMenu(["context-navigation", null, ["context-back", false, @@ -810,7 +757,6 @@ function runTest(testNum) { "context-reload", true, "context-bookmarkpage", true], null, "---", null, - "context-sharepage", true, "context-savepage", true, "---", null, "context-viewbgimage", false, @@ -833,7 +779,6 @@ function runTest(testNum) { }, function () { - info("context menu for text input field with spellcheck=false"); // Context menu for text input field with spellcheck=false checkContextMenu(["context-undo", false, "---", null, diff --git a/browser/base/content/test/general/test_contextmenu_input.html b/browser/base/content/test/general/test_contextmenu_input.html index 82164b2535e0..004d88512742 100644 --- a/browser/base/content/test/general/test_contextmenu_input.html +++ b/browser/base/content/test/general/test_contextmenu_input.html @@ -198,7 +198,6 @@ function runTest(testNum) { "context-reload", true, "context-bookmarkpage", true], null, "---", null, - "context-sharepage", true, "context-savepage", true, "---", null, "context-viewbgimage", false, diff --git a/browser/locales/en-US/chrome/browser/browser.dtd b/browser/locales/en-US/chrome/browser/browser.dtd index e6fc718b90ca..0f9715f1a016 100644 --- a/browser/locales/en-US/chrome/browser/browser.dtd +++ b/browser/locales/en-US/chrome/browser/browser.dtd @@ -145,13 +145,13 @@ These should match what Safari and other Apple applications use on OS X Lion. -- - + - + - + - +