[Pkg-mozext-commits] [firegestures] 01/18: clean up codes for open link in window

David Prévot taffit at moszumanska.debian.org
Sat May 23 10:58:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository firegestures.

commit 540625fa3905ec04cd36fa6d753080cca7feae02
Author: Gomita <gomita at xuldev.org>
Date:   Sun May 3 11:00:16 2015 +0900

    clean up codes for open link in window
---
 chrome/content/firegestures/browser.js | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/chrome/content/firegestures/browser.js b/chrome/content/firegestures/browser.js
index 858067f..f585a1e 100644
--- a/chrome/content/firegestures/browser.js
+++ b/chrome/content/firegestures/browser.js
@@ -357,14 +357,17 @@ var FireGestures = {
 				finally { nsContextMenu.prototype.target = null; }
 				break;
 			// @see nsContextMenu::openLink()
+			// @see nsContextMenu::openLinkInPrivateWindow()
 			case "FireGestures:OpenLink": 
+			case "FireGestures:OpenLinkInPrivateWindow": 
 				var linkURL = this.getLinkURL();
 				if (!linkURL)
 					throw this._getLocaleString("ERROR_NOT_ON_LINK");
 				var doc = this.sourceNode.ownerDocument;
 				this.checkURL(linkURL, doc);
 				openLinkIn(linkURL, "window", {
-					charset: doc.characterSet, referrerURI: doc.documentURIObject
+					charset: doc.characterSet, referrerURI: doc.documentURIObject, 
+					private: aCommand == "FireGestures:OpenLinkInPrivateWindow"
 				});
 				break;
 			case "FireGestures:OpenLinkInBgTab": 
@@ -381,17 +384,6 @@ var FireGestures = {
 					relatedToCurrent: true
 				});
 				break;
-			// @see nsContextMenu::openLinkInPrivateWindow()
-			case "FireGestures:OpenLinkInPrivateWindow": 
-				var linkURL = this.getLinkURL();
-				if (!linkURL)
-					throw this._getLocaleString("ERROR_NOT_ON_LINK");
-				var doc = this.sourceNode.ownerDocument;
-				this.checkURL(linkURL, doc);
-				openLinkIn(linkURL, "window", {
-					charset: doc.characterSet, referrerURI: doc.documentURIObject, private: true
-				});
-				break;
 			// @see browser.xul menuitem#context-bookmarklink at oncommand
 			case "FireGestures:AddBookmarkForLink": 
 				var linkURL = this.getLinkURL();
@@ -707,7 +699,6 @@ var FireGestures = {
 
 	// wrapper function of |urlSecurityCheck|
 	checkURL: function(aURL, aDoc, aFlags) {
-		// [e10s] get remote principal @see nsContextMenu._unremotePrincipal
 		if (this.isRemote) {
 			let principal = Cc["@mozilla.org/scriptsecuritymanager;1"].
 			                getService(Ci.nsIScriptSecurityManager).

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firegestures.git



More information about the Pkg-mozext-commits mailing list