[Pkg-mozext-commits] [firegestures] 01/06: fix: '[Popup] Search for selection' does not work

David Prévot taffit at moszumanska.debian.org
Mon May 11 18:27:30 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 2725acfd995737cd72c1ce6b76292373d85fd0ec
Author: Gomita <gomita at xuldev.org>
Date:   Sat May 2 23:20:30 2015 +0900

    fix: '[Popup] Search for selection' does not work
---
 chrome/content/firegestures/browser.js | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/chrome/content/firegestures/browser.js b/chrome/content/firegestures/browser.js
index f962bb3..858067f 100644
--- a/chrome/content/firegestures/browser.js
+++ b/chrome/content/firegestures/browser.js
@@ -81,6 +81,7 @@ var FireGestures = {
 			case "sourceNode": 
 				// replace |sourceNode| of gesture handler by CPOW object
 				this._gestureHandler.sourceNode = aMsg.objects.elt;
+				this._selectedText = aMsg.objects.elt.ownerDocument.getSelection().toString();
 				break;
 			case "linkURLs": 
 				this._linkURLs = aMsg.data.linkURLs;
@@ -447,7 +448,7 @@ var FireGestures = {
 				}
 				break;
 			case "FireGestures:WebSearch": 
-				BrowserSearch.loadSearch(getBrowserSelection(), true);
+				BrowserSearch.loadSearch(this.getSelectedText(), true);
 				break;
 			case "FireGestures:OpenLinksInSelection": 
 				var linkURLs = this.gatherLinkURLsInSelection();
@@ -667,7 +668,13 @@ var FireGestures = {
 			return this.getImageURL(aNode);
 	},
 
+	// [e10s]
+	_selectedText: null,
+
 	getSelectedText: function() {
+		if (this.isRemote) {
+			return this._selectedText;
+		}
 		return this.focusedWindow.getSelection().toString();
 	},
 
@@ -1076,7 +1083,7 @@ var FireGestures = {
 						var engine = item.engine;
 						if (!engine)
 							break;
-						var submission = engine.getSubmission(getBrowserSelection(), null);
+						var submission = engine.getSubmission(this.getSelectedText(), null);
 						if (!submission)
 							break;
 						// [TreeStyleTab] the next line will be replaced to open child tab

-- 
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