summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaming4JC <g4jc@bulletmail.org>2018-07-27 19:19:13 -0400
committerGaming4JC <g4jc@bulletmail.org>2018-07-27 19:19:13 -0400
commit183f736a6749919475dd5ec06544a1705b63ec2b (patch)
treeb834e17d243aa0b969d75435e30da0f7bf4fbd51
parentc22b61e111b4c0c5830b3e35950e7dd569eb72c6 (diff)
downloadiceweasel-uxp-183f736a6749919475dd5ec06544a1705b63ec2b.tar.gz
remove deprecated HTML5 context-menu
-rw-r--r--base/content/browser-context.inc1
-rwxr-xr-xbase/content/browser.js6
-rw-r--r--base/content/browser.xul4
-rw-r--r--base/content/nsContextMenu.js44
-rw-r--r--base/content/web-panels.xul4
5 files changed, 7 insertions, 52 deletions
diff --git a/base/content/browser-context.inc b/base/content/browser-context.inc
index 9ccf49d..e8c714c 100644
--- a/base/content/browser-context.inc
+++ b/base/content/browser-context.inc
@@ -34,7 +34,6 @@
oncommand="gContextMenu.bookmarkThisPage();"/>
</menugroup>
<menuseparator id="context-sep-navigation"/>
- <menuseparator id="page-menu-separator"/>
<menuitem id="spell-no-suggestions"
disabled="true"
label="&spellNoSuggestions.label;"/>
diff --git a/base/content/browser.js b/base/content/browser.js
index 2999c71..ae7fd5f 100755
--- a/base/content/browser.js
+++ b/base/content/browser.js
@@ -100,12 +100,6 @@ XPCOMUtils.defineLazyGetter(this, "InlineSpellCheckerUI", function() {
return new tmp.InlineSpellChecker();
});
-XPCOMUtils.defineLazyGetter(this, "PageMenuParent", function() {
- let tmp = {};
- Cu.import("resource://gre/modules/PageMenu.jsm", tmp);
- return new tmp.PageMenuParent();
-});
-
XPCOMUtils.defineLazyGetter(this, "PopupNotifications", function () {
let tmp = {};
Cu.import("resource://gre/modules/PopupNotifications.jsm", tmp);
diff --git a/base/content/browser.xul b/base/content/browser.xul
index 028df60..06bab58 100644
--- a/base/content/browser.xul
+++ b/base/content/browser.xul
@@ -297,10 +297,10 @@
oncommand="BrowserFullScreen();"/>
</menupopup>
- <menupopup id="contentAreaContextMenu" pagemenu="#page-menu-separator"
+ <menupopup id="contentAreaContextMenu"
onpopupshowing="if (event.target != this)
return true;
- gContextMenu = new nsContextMenu(this, event.shiftKey);
+ gContextMenu = new nsContextMenu(this);
if (gContextMenu.shouldDisplay)
updateEditUIVisibility();
return gContextMenu.shouldDisplay;"
diff --git a/base/content/nsContextMenu.js b/base/content/nsContextMenu.js
index 647bb16..7bcd5d9 100644
--- a/base/content/nsContextMenu.js
+++ b/base/content/nsContextMenu.js
@@ -18,54 +18,21 @@ XPCOMUtils.defineLazyModuleGetter(this, "LoginHelper",
var gContextMenuContentData = null;
-function nsContextMenu(aXulMenu, aIsShift) {
+function nsContextMenu(aXulMenu) {
this.shouldDisplay = true;
- this.initMenu(aXulMenu, aIsShift);
+ this.initMenu(aXulMenu);
}
// Prototype for nsContextMenu "class."
nsContextMenu.prototype = {
- initMenu: function CM_initMenu(aXulMenu, aIsShift) {
+ initMenu: function CM_initMenu(aXulMenu) {
// Get contextual info.
this.setTarget(document.popupNode, document.popupRangeParent,
document.popupRangeOffset);
if (!this.shouldDisplay)
return;
- this.hasPageMenu = false;
this.isContentSelected = !this.selectionInfo.docSelectionIsCollapsed;
- if (!aIsShift) {
- if (this.isRemote) {
- this.hasPageMenu =
- PageMenuParent.addToPopup(gContextMenuContentData.customMenuItems,
- this.browser, aXulMenu);
- }
- else {
- this.hasPageMenu = PageMenuParent.buildAndAddToPopup(this.target, aXulMenu);
- }
-
- let subject = {
- menu: aXulMenu,
- tab: gBrowser ? gBrowser.getTabForBrowser(this.browser) : undefined,
- isContentSelected: this.isContentSelected,
- inFrame: this.inFrame,
- isTextSelected: this.isTextSelected,
- onTextInput: this.onTextInput,
- onLink: this.onLink,
- onImage: this.onImage,
- onVideo: this.onVideo,
- onAudio: this.onAudio,
- onCanvas: this.onCanvas,
- onEditableArea: this.onEditableArea,
- srcUrl: this.mediaURL,
- frameUrl: gContextMenuContentData ? gContextMenuContentData.docLocation : undefined,
- pageUrl: this.browser ? this.browser.currentURI.spec : undefined,
- linkUrl: this.linkURL,
- selectionText: this.isTextSelected ? this.selectionInfo.text : undefined,
- };
- subject.wrappedJSObject = subject;
- Services.obs.notifyObservers(subject, "on-build-contextmenu", null);
- }
this.isFrameImage = document.getElementById("isFrameImage");
this.ellipsis = "\u2026";
@@ -101,7 +68,6 @@ nsContextMenu.prototype = {
},
initItems: function CM_initItems() {
- this.initPageMenuSeparator();
this.initOpenItems();
this.initNavigationItems();
this.initViewItems();
@@ -116,10 +82,6 @@ nsContextMenu.prototype = {
this.initSyncItems();
},
- initPageMenuSeparator: function CM_initPageMenuSeparator() {
- this.showItem("page-menu-separator", this.hasPageMenu);
- },
-
initOpenItems: function CM_initOpenItems() {
var isMailtoInternal = false;
if (this.onMailtoLink) {
diff --git a/base/content/web-panels.xul b/base/content/web-panels.xul
index 223b20e..868dd55 100644
--- a/base/content/web-panels.xul
+++ b/base/content/web-panels.xul
@@ -48,10 +48,10 @@
<popupset id="mainPopupSet">
<tooltip id="aHTMLTooltip" page="true"/>
- <menupopup id="contentAreaContextMenu" pagemenu="start"
+ <menupopup id="contentAreaContextMenu"
onpopupshowing="if (event.target != this)
return true;
- gContextMenu = new nsContextMenu(this, event.shiftKey);
+ gContextMenu = new nsContextMenu(this);
if (gContextMenu.shouldDisplay)
document.popupNode = this.triggerNode;
return gContextMenu.shouldDisplay;"