[Pkg-mozext-commits] [firegestures] 14/18: Imported Upstream version 1.10~a3

David Prévot taffit at moszumanska.debian.org
Sat May 23 10:58:43 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 b31216b4de35ac45cda79b8287c7099db3540538
Merge: 7b5af52 5f50e42
Author: David Prévot <taffit at debian.org>
Date:   Sat May 23 06:24:54 2015 -0400

    Imported Upstream version 1.10~a3

 LICENSE.txt                                  |  23 ----
 chrome/content/firegestures/browser.js       |  81 +++++++++-----
 chrome/content/firegestures/browser.rdf      |   4 -
 chrome/content/firegestures/remote.js        | 125 ++++-----------------
 chrome/content/firegestures/viewSource.js    |   5 +-
 chrome/locale/en-US/firegestures/mapping.dtd |   1 -
 chrome/locale/ja/firegestures/mapping.dtd    |   1 -
 components/xdGestureHandler.js               | 158 +++++++++++----------------
 install.rdf                                  |   4 +-
 9 files changed, 142 insertions(+), 260 deletions(-)

diff --cc LICENSE.txt
index 7517e65,cb3030e..9ff2981
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@@ -1,57 -1,34 +1,34 @@@
 -/* ***** BEGIN LICENSE BLOCK *****
 - * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 - *
 - * The contents of this file are subject to the Mozilla Public License Version
 - * 1.1 (the "License"); you may not use this file except in compliance with
 - * the License. You may obtain a copy of the License at
 - * http://www.mozilla.org/MPL/
 - *
 - * Software distributed under the License is distributed on an "AS IS" basis,
 - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 - * for the specific language governing rights and limitations under the
 - * License.
 - *
 - * The Original Code is FireGestures.
 - *
 - * The Initial Developer of the Original Code is Gomita <gomita at xuldev.org>.
 - * Portions created by the Initial Developer are Copyright (C) 2015
 - * the Initial Developer. All Rights Reserved.
 - *
 - * Contributor(s):
 - *
 - * Alternatively, the contents of this file may be used under the terms of
 - * either the GNU General Public License Version 2 or later (the "GPL"), or
 - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 - * in which case the provisions of the GPL or the LGPL are applicable instead
 - * of those above. If you wish to allow use of your version of this file only
 - * under the terms of either the GPL or the LGPL, and not to allow others to
 - * use your version of this file under the terms of the MPL, indicate your
 - * decision by deleting the provisions above and replace them with the notice
 - * and other provisions required by the GPL or the LGPL. If you do not delete
 - * the provisions above, a recipient may use your version of this file under
 - * the terms of any one of the MPL, the GPL or the LGPL.
 - *
 - * ***** END LICENSE BLOCK ***** */
 +/* ***** BEGIN LICENSE BLOCK *****
 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 + *
 + * The contents of this file are subject to the Mozilla Public License Version
 + * 1.1 (the "License"); you may not use this file except in compliance with
 + * the License. You may obtain a copy of the License at
 + * http://www.mozilla.org/MPL/
 + *
 + * Software distributed under the License is distributed on an "AS IS" basis,
 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 + * for the specific language governing rights and limitations under the
 + * License.
 + *
 + * The Original Code is FireGestures.
 + *
 + * The Initial Developer of the Original Code is Gomita <gomita at xuldev.org>.
 + * Portions created by the Initial Developer are Copyright (C) 2015
 + * the Initial Developer. All Rights Reserved.
 + *
 + * Contributor(s):
 + *
-  *     The Mouse Trails part in "xdGestureHandler.js" is derived from 
-  *     Optimoz Mouse Gestures extension.
-  *
-  *     The Original Code is Mouse Gesture for Mozilla.
-  *
-  *     The Initial Developer of the Original Code is Jens Bannmann.
-  *     Portions created by the Initial Developer are Copyright (C) 2003
-  *     the Initial Developer. All Rights Reserved.
-  *
-  *     Contributor(s):
-  *         Jens Bannmann <jens.b at web.de>
-  *         Jochen <bugs at krickelkrackel.de>
-  *         Mike Kozlowski <mozdev at klio.org>
-  *
-  *     Some parts in "xdGestureHandler.js" is derived from 
-  *     All-in-One Gestures extension.
-  *
-  *     The Original Code is the "All-in-One Gestures" extension for Phoenix.
-  *
-  *     The Initial Developer of the Original Code is Marc Boullet <boullet.marc at orange.fr>
-  *     Portions created by Marc Boullet are Copyright (C) 2003, 
-  *     Marc Boullet. All Rights Reserved.
-  *
 + * Alternatively, the contents of this file may be used under the terms of
 + * either the GNU General Public License Version 2 or later (the "GPL"), or
 + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 + * in which case the provisions of the GPL or the LGPL are applicable instead
 + * of those above. If you wish to allow use of your version of this file only
 + * under the terms of either the GPL or the LGPL, and not to allow others to
 + * use your version of this file under the terms of the MPL, indicate your
 + * decision by deleting the provisions above and replace them with the notice
 + * and other provisions required by the GPL or the LGPL. If you do not delete
 + * the provisions above, a recipient may use your version of this file under
 + * the terms of any one of the MPL, the GPL or the LGPL.
 + *
 + * ***** END LICENSE BLOCK ***** */
diff --cc chrome/content/firegestures/browser.js
index 7563a36,3be7b26..40ffa08
mode 100755,100644..100755
--- a/chrome/content/firegestures/browser.js
+++ b/chrome/content/firegestures/browser.js
@@@ -65,11 -74,14 +65,11 @@@ var FireGestures = 
  		gBrowser.mCurrentBrowser.messageManager.sendAsyncMessage(aName, aData);
  	},
  
 -	// receive message from remote browser
  	receiveMessage: function(aMsg) {
 -		dump(aMsg.name + " " + aMsg.data.toSource() + " " + (aMsg.objects.elt || aMsg.objects.toSource()) + "\n");	// #debug
  		switch (aMsg.data.name) {
  			case "sourceNode": 
 -				// replace |sourceNode| of gesture handler by CPOW object
  				this._gestureHandler.sourceNode = aMsg.objects.elt;
- 				this._selectedText = aMsg.objects.elt.ownerDocument.getSelection().toString();
+ 				this._selectedText = aMsg.objects.sel;
  				break;
  			case "linkURLs": 
  				this._linkURLs = aMsg.data.linkURLs;
@@@ -308,20 -343,63 +308,56 @@@
  				this.checkURL(docURL, doc.defaultView.top.document, Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT);
  				openUILinkIn(docURL, "current", { disallowInheritPrincipal: true, referrerURI: refURI });
  				break;
 -			// @see nsContextMenu::openFrame()
 -			// @see nsContextMenu::openFrameInTab()
  			case "FireGestures:OpenFrame": 
  			case "FireGestures:OpenFrameInTab": 
+ 				var doc = this.sourceNode.ownerDocument;
+ 				var docURL = doc.location.href;
+ 				var refURI = doc.referrer ? makeURI(doc.referrer) : null;
+ 				openLinkIn(docURL, aCommand == "FireGestures:OpenFrame" ? "window" : "tab", {
+ 					charset: doc.characterSet, referrerURI: refURI
+ 				});
+ 				break;
  			case "FireGestures:ReloadFrame": 
+ 				this.sourceNode.ownerDocument.location.reload();
+ 				break;
 -			// @see nsContextMenu::addBookmarkForFrame()
  			case "FireGestures:AddBookmarkForFrame": 
+ 				var doc = this.sourceNode.ownerDocument;
+ 				var docURI = makeURI(doc.location.href);
+ 				var itemId = PlacesUtils.getMostRecentBookmarkForURI(docURI);
+ 				if (itemId == -1) {
+ 					PlacesUIUtils.showBookmarkDialog({
+ 						action: "add", type: "bookmark", uri: docURI, title: doc.title, 
+ 						description: PlacesUIUtils.getDescriptionFromDocument(doc), 
+ 						hiddenRows: ["description", "location", "loadInSidebar", "keyword" ]
+ 					}, window.top);
+ 				}
+ 				else {
+ 					PlacesUIUtils.showBookmarkDialog({
+ 						action: "edit", type: "bookmark", itemId: itemId
+ 					}, window.top);
+ 				}
+ 				break;
  			case "FireGestures:SaveFrame": 
+ 				saveDocument(this.sourceNode.ownerDocument);
+ 				break;
 -			// @see nsContextMenu::viewFrameSource
  			case "FireGestures:ViewFrameSource": 
 -				// [e10s]
+ 				if (this.isRemote) {
+ 					var doc = this.sourceNode.ownerDocument;
+ 					var frameID = doc.defaultView.QueryInterface(Ci.nsIInterfaceRequestor).
+ 					              getInterface(Ci.nsIDOMWindowUtils).outerWindowID;
+ 					BrowserViewSourceOfDocument({
+ 						browser: gBrowser.mCurrentBrowser, URL: doc.location.href, 
+ 						outerWindowID: frameID
+ 					});
+ 					return;
+ 				}
+ 				BrowserViewSourceOfDocument(this.sourceNode.ownerDocument);
+ 				break;
  			case "FireGestures:ViewFrameInfo": 
- 				var funcName = aCommand.substr("FireGestures:".length);
- 				funcName = funcName.charAt(0).toLowerCase() + funcName.substr(1);
- 				nsContextMenu.prototype.target = this.sourceNode;
- 				try { nsContextMenu.prototype[funcName](); }
- 				finally { nsContextMenu.prototype.target = null; }
+ 				BrowserPageInfo(this.sourceNode.ownerDocument);
  				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");
@@@ -344,16 -424,7 +381,6 @@@
  					relatedToCurrent: true
  				});
  				break;
- 			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();
  				if (!linkURL)
@@@ -453,15 -530,9 +480,8 @@@
  					else if (inFrame) aCommand = "FireGestures:AddBookmarkForFrame";
  					else              aCommand = "Browser:AddBookmarkAs";
  				}
 -				// call _performAction again
  				this._performAction(event, aCommand);
  				break;
- 			case "FireGestures:HybridSendURL": 
- 				var url = this.getLinkURL() || this.getImageURL();
- 				if (url)
- 					MailIntegration.sendMessage(url, "");
- 				else
- 					MailIntegration.sendLinkForWindow(this.focusedWindow);
- 				break;
  			case "FireGestures:HybridCopyURL": 
  				var url = this.getLinkURL() || this.getImageURL() || 
  				          this.sourceNode.ownerDocument.location.href;
diff --cc chrome/content/firegestures/browser.rdf
index d93fc7d,d02a763..bcb4e33
--- a/chrome/content/firegestures/browser.rdf
+++ b/chrome/content/firegestures/browser.rdf
@@@ -1,483 -1,479 +1,479 @@@
 -<?xml version="1.0"?>
 -
 -<!DOCTYPE RDF:RDF [
 -  <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
 -  %browserDTD;
 -  <!ENTITY % tabBrowserDTD SYSTEM "chrome://browser/locale/tabbrowser.dtd">
 -  %tabBrowserDTD;
 -  <!ENTITY % mappingDTD SYSTEM "chrome://firegestures/locale/mapping.dtd">
 -  %mappingDTD;
 -]>
 -
 -<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 -         xmlns:FG="http://www.xuldev.org/firegestures-mapping#">
 -  <RDF:Seq RDF:about="urn:mapping:root">
 -    <RDF:li RDF:resource="urn:category:navigation" />
 -    <RDF:li RDF:resource="urn:Browser:Back" />
 -    <RDF:li RDF:resource="urn:Browser:Forward" />
 -    <RDF:li RDF:resource="urn:Browser:Reload" />
 -    <RDF:li RDF:resource="urn:Browser:ReloadSkipCache" />
 -    <RDF:li RDF:resource="urn:Browser:Stop" />
 -    <RDF:li RDF:resource="urn:Browser:Home" />
 -    <RDF:li RDF:resource="urn:FireGestures:GoUpperLevel" />
 -    <RDF:li RDF:resource="urn:FireGestures:IncrementURL" />
 -    <RDF:li RDF:resource="urn:FireGestures:DecrementURL" />
 -    <RDF:li RDF:resource="urn:category:window" />
 -    <RDF:li RDF:resource="urn:cmd_newNavigator" />
 -    <RDF:li RDF:resource="urn:Tools:PrivateBrowsing" />
 -    <RDF:li RDF:resource="urn:cmd_closeWindow" />
 -    <RDF:li RDF:resource="urn:History:UndoCloseWindow" />
 -    <RDF:li RDF:resource="urn:FireGestures:MinimizeWindow" />
 -    <RDF:li RDF:resource="urn:FireGestures:MaximizeWindow" />
 -    <RDF:li RDF:resource="urn:View:FullScreen" />
 -    <RDF:li RDF:resource="urn:category:tab" />
 -    <RDF:li RDF:resource="urn:cmd_newNavigatorTab" />
 -    <RDF:li RDF:resource="urn:cmd_close" />
 -    <RDF:li RDF:resource="urn:FireGestures:CloseTabOrWindow" />
 -    <RDF:li RDF:resource="urn:FireGestures:UndoCloseTab" />
 -    <RDF:li RDF:resource="urn:FireGestures:PreviousTab" />
 -    <RDF:li RDF:resource="urn:FireGestures:NextTab" />
 -    <RDF:li RDF:resource="urn:FireGestures:DuplicateTab" />
 -    <RDF:li RDF:resource="urn:FireGestures:DetachTab" />
 -    <RDF:li RDF:resource="urn:FireGestures:TogglePinTab" />
 -    <RDF:li RDF:resource="urn:FireGestures:ReloadAllTabs" />
 -    <RDF:li RDF:resource="urn:FireGestures:CloseOtherTabs" />
 -    <RDF:li RDF:resource="urn:FireGestures:CloseLeftTabs" />
 -    <RDF:li RDF:resource="urn:FireGestures:CloseRightTabs" />
 -    <RDF:li RDF:resource="urn:Browser:ToggleTabView" />
 -    <RDF:li RDF:resource="urn:category:page" />
 -    <RDF:li RDF:resource="urn:cmd_textZoomEnlarge" />
 -    <RDF:li RDF:resource="urn:cmd_textZoomReduce" />
 -    <RDF:li RDF:resource="urn:cmd_textZoomReset" />
 -    <RDF:li RDF:resource="urn:cmd_fullZoomEnlarge" />
 -    <RDF:li RDF:resource="urn:cmd_fullZoomReduce" />
 -    <RDF:li RDF:resource="urn:cmd_fullZoomReset" />
 -    <RDF:li RDF:resource="urn:FireGestures:ScrollTop" />
 -    <RDF:li RDF:resource="urn:FireGestures:ScrollBottom" />
 -    <RDF:li RDF:resource="urn:FireGestures:ScrollPageUp" />
 -    <RDF:li RDF:resource="urn:FireGestures:ScrollPageDown" />
 -    <RDF:li RDF:resource="urn:Browser:AddBookmarkAs" />
 -    <RDF:li RDF:resource="urn:Browser:SavePage" />
 -    <RDF:li RDF:resource="urn:View:PageSource" />
 -    <RDF:li RDF:resource="urn:View:PageInfo" />
 -    <RDF:li RDF:resource="urn:cmd_printPreview" />
 -    <RDF:li RDF:resource="urn:cmd_print" />
 -    <RDF:li RDF:resource="urn:category:frame" />
 -    <RDF:li RDF:resource="urn:FireGestures:ShowOnlyThisFrame" />
 -    <RDF:li RDF:resource="urn:FireGestures:OpenFrame" />
 -    <RDF:li RDF:resource="urn:FireGestures:OpenFrameInTab" />
 -    <RDF:li RDF:resource="urn:FireGestures:ReloadFrame" />
 -    <RDF:li RDF:resource="urn:FireGestures:AddBookmarkForFrame" />
 -    <RDF:li RDF:resource="urn:FireGestures:SaveFrame" />
 -    <RDF:li RDF:resource="urn:FireGestures:ViewFrameSource" />
 -    <RDF:li RDF:resource="urn:FireGestures:ViewFrameInfo" />
 -    <RDF:li RDF:resource="urn:category:link" />
 -    <RDF:li RDF:resource="urn:FireGestures:OpenLinkInBgTab" />
 -    <RDF:li RDF:resource="urn:FireGestures:OpenLinkInFgTab" />
 -    <RDF:li RDF:resource="urn:FireGestures:OpenLink" />
 -    <RDF:li RDF:resource="urn:FireGestures:OpenLinkInPrivateWindow" />
 -    <RDF:li RDF:resource="urn:FireGestures:AddBookmarkForLink" />
 -    <RDF:li RDF:resource="urn:FireGestures:SaveLink" />
 -    <RDF:li RDF:resource="urn:category:image" />
 -    <RDF:li RDF:resource="urn:FireGestures:ViewImage" />
 -    <RDF:li RDF:resource="urn:FireGestures:SaveImage" />
 -    <RDF:li RDF:resource="urn:FireGestures:SaveImageNow" />
 -    <RDF:li RDF:resource="urn:category:selection" />
 -    <RDF:li RDF:resource="urn:FireGestures:WebSearch" />
 -    <RDF:li RDF:resource="urn:FireGestures:OpenLinksInSelection" />
 -    <RDF:li RDF:resource="urn:FireGestures:OpenURLsInSelection" />
 -    <RDF:li RDF:resource="urn:category:tools" />
 -    <RDF:li RDF:resource="urn:Tools:Downloads" />
 -    <RDF:li RDF:resource="urn:Tools:Addons" />
 -    <RDF:li RDF:resource="urn:Tools:Sanitize" />
 -    <RDF:li RDF:resource="urn:Tools:DevToolbox" />
 -    <RDF:li RDF:resource="urn:FireGestures:ErrorConsole" />
 -    <RDF:li RDF:resource="urn:FireGestures:BookmarksSidebar" />
 -    <RDF:li RDF:resource="urn:FireGestures:HistorySidebar" />
 -    <RDF:li RDF:resource="urn:FireGestures:FindBar" />
 -    <RDF:li RDF:resource="urn:FireGestures:RestartApp" />
 -    <RDF:li RDF:resource="urn:FireGestures:Preferences" />
 -    <RDF:li RDF:resource="urn:category:popup" />
 -    <RDF:li RDF:resource="urn:FireGestures:BFHistoryPopup" />
 -    <RDF:li RDF:resource="urn:FireGestures:AllTabsPopup" />
 -    <RDF:li RDF:resource="urn:FireGestures:ClosedTabsPopup" />
 -    <RDF:li RDF:resource="urn:FireGestures:WebSearchPopup" />
 -    <RDF:li RDF:resource="urn:FireGestures:AllScriptsPopup" />
 -    <RDF:li RDF:resource="urn:FireGestures:OpenPanelUI" />
 -    <RDF:li RDF:resource="urn:category:hybrid" />
 -    <RDF:li RDF:resource="urn:FireGestures:HybridBookmark" />
 -    <RDF:li RDF:resource="urn:FireGestures:HybridSave" />
 -    <RDF:li RDF:resource="urn:FireGestures:HybridCopyURL" />
 -    <RDF:li RDF:resource="urn:FireGestures:HybridViewSource" />
 -    <RDF:li RDF:resource="urn:FireGestures:HybridMetaData" />
 -    <RDF:li RDF:resource="urn:category:script" />
 -    <RDF:li RDF:resource="urn:FireGestures:OpenHoveredLinks" />
 -    <RDF:li RDF:resource="urn:FireGestures:SaveHoveredLinks" />
 -    <RDF:li RDF:resource="urn:FireGestures:CopyHoveredLinks" />
 -  </RDF:Seq>
 -  <!-- navigation -->
 -  <RDF:Description RDF:about="urn:category:navigation"
 -                   FG:type="0"
 -                   FG:name="&gestureCategory.navigation;" />
 -  <RDF:Description RDF:about="urn:Browser:Back"
 -                   FG:type="1"
 -                   FG:name="&backCmd.label;"
 -                   FG:direction="L"
 -                   FG:extra="swipe-left" />
 -  <RDF:Description RDF:about="urn:Browser:Forward"
 -                   FG:type="1"
 -                   FG:name="&forwardCmd.label;"
 -                   FG:direction="R"
 -                   FG:extra="swipe-right" />
 -  <RDF:Description RDF:about="urn:Browser:Reload"
 -                   FG:type="1"
 -                   FG:name="&reloadCmd.label;"
 -                   FG:direction="UD" />
 -  <RDF:Description RDF:about="urn:Browser:ReloadSkipCache"
 -                   FG:type="1"
 -                   FG:name="&reloadCmd.label; (&gestureCmd.skipCache;)"
 -                   FG:direction="UDU" />
 -  <RDF:Description RDF:about="urn:Browser:Stop"
 -                   FG:type="1"
 -                   FG:name="&stopCmd.label;" />
 -  <RDF:Description RDF:about="urn:Browser:Home"
 -                   FG:type="1"
 -                   FG:name="&homeButton.label;" />
 -  <RDF:Description RDF:about="urn:FireGestures:GoUpperLevel"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.goUpperLevel;"
 -                   FG:direction="DU" />
 -  <RDF:Description RDF:about="urn:FireGestures:IncrementURL"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.incrementURL;"
 -                   FG:direction="RURU" />
 -  <RDF:Description RDF:about="urn:FireGestures:DecrementURL"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.decrementURL;"
 -                   FG:direction="RDRD" />
 -  <!-- window -->
 -  <RDF:Description RDF:about="urn:category:window"
 -                   FG:type="0"
 -                   FG:name="&gestureCategory.window;" />
 -  <RDF:Description RDF:about="urn:cmd_newNavigator"
 -                   FG:type="1"
 -                   FG:name="&newNavigatorCmd.label;"
 -                   FG:direction="DRU" />
 -  <RDF:Description RDF:about="urn:Tools:PrivateBrowsing"
 -                   FG:type="1"
 -                   FG:name="&newPrivateWindow.label;" />
 -  <RDF:Description RDF:about="urn:cmd_closeWindow"
 -                   FG:type="1"
 -                   FG:name="&closeWindow.label;"
 -                   FG:direction="URD" />
 -  <RDF:Description RDF:about="urn:History:UndoCloseWindow"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.undoCloseWindow;" />
 -  <RDF:Description RDF:about="urn:FireGestures:MinimizeWindow"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.minimizeWindow;"
 -                   FG:direction="RUD" />
 -  <RDF:Description RDF:about="urn:FireGestures:MaximizeWindow"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.maximizeWindow;"
 -                   FG:direction="RDU" />
 -  <RDF:Description RDF:about="urn:View:FullScreen"
 -                   FG:type="1"
 -                   FG:name="&fullScreenCmd.label;" />
 -  <!-- tab -->
 -  <RDF:Description RDF:about="urn:category:tab"
 -                   FG:type="0"
 -                   FG:name="&gestureCategory.tab;" />
 -  <RDF:Description RDF:about="urn:cmd_newNavigatorTab"
 -                   FG:type="1"
 -                   FG:name="&tabCmd.label;"
 -                   FG:direction="LR" />
 -  <RDF:Description RDF:about="urn:cmd_close"
 -                   FG:type="1"
 -                   FG:name="&closeTab.label;"
 -                   FG:direction="DR" />
 -  <RDF:Description RDF:about="urn:FireGestures:CloseTabOrWindow"
 -                   FG:type="1"
 -                   FG:name="&closeTab.label; / &closeWindow.label;" />
 -  <RDF:Description RDF:about="urn:FireGestures:UndoCloseTab"
 -                   FG:type="1"
 -                   FG:name="&undoCloseTab.label;"
 -                   FG:direction="RL" />
 -  <RDF:Description RDF:about="urn:FireGestures:PreviousTab"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.previousTab;"
 -                   FG:direction="UL"
 -                   FG:extra="rocker-left" />
 -  <RDF:Description RDF:about="urn:FireGestures:NextTab"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.nextTab;"
 -                   FG:direction="UR"
 -                   FG:extra="rocker-right" />
 -  <RDF:Description RDF:about="urn:FireGestures:DuplicateTab"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.duplicateTab;" />
 -  <RDF:Description RDF:about="urn:FireGestures:DetachTab"
 -                   FG:type="1"
 -                   FG:name="&moveToNewWindow.label;" />
 -  <RDF:Description RDF:about="urn:FireGestures:TogglePinTab"
 -                   FG:type="1"
 -                   FG:name="&pinTab.label; / &unpinTab.label;" />
 -  <RDF:Description RDF:about="urn:FireGestures:ReloadAllTabs"
 -                   FG:type="1"
 -                   FG:name="&reloadAllTabs.label;" />
 -  <RDF:Description RDF:about="urn:FireGestures:CloseOtherTabs"
 -                   FG:type="1"
 -                   FG:name="&closeOtherTabs.label;" />
 -  <RDF:Description RDF:about="urn:FireGestures:CloseLeftTabs"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.closeLeftTabs;" />
 -  <RDF:Description RDF:about="urn:FireGestures:CloseRightTabs"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.closeRightTabs;" />
 -  <RDF:Description RDF:about="urn:Browser:ToggleTabView"
 -                   FG:type="1"
 -                   FG:name="&viewTabGroups.label;" />
 -  <!-- page -->
 -  <RDF:Description RDF:about="urn:cmd_textZoomEnlarge"
 -                   FG:type="1"
 -                   FG:name="&fullZoomToggleCmd.label; - &fullZoomEnlargeCmd.label;"
 -                   FG:direction="LRU" />
 -  <RDF:Description RDF:about="urn:cmd_textZoomReduce"
 -                   FG:type="1"
 -                   FG:name="&fullZoomToggleCmd.label; - &fullZoomReduceCmd.label;"
 -                   FG:direction="LRD" />
 -  <RDF:Description RDF:about="urn:cmd_textZoomReset"
 -                   FG:type="1"
 -                   FG:name="&fullZoomToggleCmd.label; - &fullZoomResetCmd.label;"
 -                   FG:direction="LRUD" />
 -  <RDF:Description RDF:about="urn:cmd_fullZoomEnlarge"
 -                   FG:type="1"
 -                   FG:name="&fullZoom.label; - &fullZoomEnlargeCmd.label;" />
 -  <RDF:Description RDF:about="urn:cmd_fullZoomReduce"
 -                   FG:type="1"
 -                   FG:name="&fullZoom.label; - &fullZoomReduceCmd.label;" />
 -  <RDF:Description RDF:about="urn:cmd_fullZoomReset"
 -                   FG:type="1"
 -                   FG:name="&fullZoom.label; - &fullZoomResetCmd.label;" />
 -  <RDF:Description RDF:about="urn:category:page"
 -                   FG:type="0"
 -                   FG:name="&gestureCategory.page;" />
 -  <RDF:Description RDF:about="urn:FireGestures:ScrollTop"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.scrollTop;"
 -                   FG:direction="LU"
 -                   FG:extra="swipe-up" />
 -  <RDF:Description RDF:about="urn:FireGestures:ScrollBottom"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.scrollBottom;"
 -                   FG:direction="LD"
 -                   FG:extra="swipe-down" />
 -  <RDF:Description RDF:about="urn:FireGestures:ScrollPageUp"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.scrollPageUp;" />
 -  <RDF:Description RDF:about="urn:FireGestures:ScrollPageDown"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.scrollPageDown;" />
 -  <RDF:Description RDF:about="urn:Browser:AddBookmarkAs"
 -                   FG:type="1"
 -                   FG:name="&bookmarkThisPageCmd.label;" />
 -  <RDF:Description RDF:about="urn:Browser:SavePage"
 -                   FG:type="1"
 -                   FG:name="&savePageCmd.label;" />
 -  <RDF:Description RDF:about="urn:View:PageSource"
 -                   FG:type="1"
 -                   FG:name="&viewPageSourceCmd.label;" />
 -  <RDF:Description RDF:about="urn:View:PageInfo"
 -                   FG:type="1"
 -                   FG:name="&viewPageInfoCmd.label;" />
 -  <RDF:Description RDF:about="urn:cmd_printPreview"
 -                   FG:type="1"
 -                   FG:name="&printPreviewCmd.label;" />
 -  <RDF:Description RDF:about="urn:cmd_print"
 -                   FG:type="1"
 -                   FG:name="&printCmd.label;" />
 -  <!-- frame -->
 -  <RDF:Description RDF:about="urn:category:frame"
 -                   FG:type="0"
 -                   FG:name="&gestureCategory.frame;" />
 -  <RDF:Description RDF:about="urn:FireGestures:ShowOnlyThisFrame"
 -                   FG:type="1"
 -                   FG:name="&showOnlyThisFrameCmd.label;"
 -                   FG:direction="LDR" />
 -  <RDF:Description RDF:about="urn:FireGestures:OpenFrame"
 -                   FG:type="1"
 -                   FG:name="&openFrameCmd.label;" />
 -  <RDF:Description RDF:about="urn:FireGestures:OpenFrameInTab"
 -                   FG:type="1"
 -                   FG:name="&openFrameCmdInTab.label;"
 -                   FG:direction="LDRU" />
 -  <RDF:Description RDF:about="urn:FireGestures:ReloadFrame"
 -                   FG:type="1"
 -                   FG:name="&reloadFrameCmd.label;" />
 -  <RDF:Description RDF:about="urn:FireGestures:AddBookmarkForFrame"
 -                   FG:type="1"
 -                   FG:name="&bookmarkThisFrameCmd.label;" />
 -  <RDF:Description RDF:about="urn:FireGestures:SaveFrame"
 -                   FG:type="1"
 -                   FG:name="&saveFrameCmd.label;" />
 -  <RDF:Description RDF:about="urn:FireGestures:ViewFrameSource"
 -                   FG:type="1"
 -                   FG:name="&viewFrameSourceCmd.label;" />
 -  <RDF:Description RDF:about="urn:FireGestures:ViewFrameInfo"
 -                   FG:type="1"
 -                   FG:name="&viewFrameInfoCmd.label;" />
 -  <!-- link -->
 -  <RDF:Description RDF:about="urn:category:link"
 -                   FG:type="0"
 -                   FG:name="&gestureCategory.link;" />
 -  <RDF:Description RDF:about="urn:FireGestures:OpenLinkInBgTab"
 -                   FG:type="1"
 -                   FG:name="&openLinkCmdInTab.label; (&gestureCmd.backgroundTab;)"
 -                   FG:direction="D" />
 -  <RDF:Description RDF:about="urn:FireGestures:OpenLinkInFgTab"
 -                   FG:type="1"
 -                   FG:name="&openLinkCmdInTab.label; (&gestureCmd.foregroundTab;)"
 -                   FG:direction="U" />
 -  <RDF:Description RDF:about="urn:FireGestures:OpenLink"
 -                   FG:type="1"
 -                   FG:name="&openLinkCmd.label;" />
 -  <RDF:Description RDF:about="urn:FireGestures:OpenLinkInPrivateWindow"
 -                   FG:type="1"
 -                   FG:name="&openLinkInPrivateWindowCmd.label;" />
 -  <RDF:Description RDF:about="urn:FireGestures:AddBookmarkForLink"
 -                   FG:type="1"
 -                   FG:name="&bookmarkThisLinkCmd.label;" />
 -  <RDF:Description RDF:about="urn:FireGestures:SaveLink"
 -                   FG:type="1"
 -                   FG:name="&saveLinkCmd.label;" />
 -  <!-- image -->
 -  <RDF:Description RDF:about="urn:category:image"
 -                   FG:type="0"
 -                   FG:name="&gestureCategory.image;" />
 -  <RDF:Description RDF:about="urn:FireGestures:ViewImage"
 -                   FG:type="1"
 -                   FG:name="&viewImageCmd.label;" />
 -  <RDF:Description RDF:about="urn:FireGestures:SaveImage"
 -                   FG:type="1"
 -                   FG:name="&saveImageCmd.label;"
 -                   FG:direction="DLD" />
 -  <RDF:Description RDF:about="urn:FireGestures:SaveImageNow"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.saveImageNow;"
 -                   FG:direction="DRD" />
 -  <!-- selection -->
 -  <RDF:Description RDF:about="urn:category:selection"
 -                   FG:type="0"
 -                   FG:name="&gestureCategory.selection;" />
 -  <RDF:Description RDF:about="urn:FireGestures:WebSearch"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.searchForSelection;" />
 -  <RDF:Description RDF:about="urn:FireGestures:OpenLinksInSelection"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.openLinksInSelection;"
 -                   FG:direction="RU" />
 -  <RDF:Description RDF:about="urn:FireGestures:OpenURLsInSelection"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.openURLsInSelection; / &gestureCmd.searchForSelection;" />
 -  <!-- tools -->
 -  <RDF:Description RDF:about="urn:category:tools"
 -                   FG:type="0"
 -                   FG:name="&gestureCategory.tools;" />
 -  <RDF:Description RDF:about="urn:Tools:Downloads"
 -                   FG:type="1"
 -                   FG:name="&downloads.label;" />
 -  <RDF:Description RDF:about="urn:Tools:Addons"
 -                   FG:type="1"
 -                   FG:name="&addons.label;" />
 -  <RDF:Description RDF:about="urn:Tools:Sanitize"
 -                   FG:type="1"
 -                   FG:name="&clearRecentHistory.label;" />
 -  <RDF:Description RDF:about="urn:Tools:DevToolbox"
 -                   FG:type="1"
 -                   FG:name="&webDeveloperMenu.label; - &devToolboxMenuItem.label;" />
 -  <RDF:Description RDF:about="urn:FireGestures:ErrorConsole"
 -                   FG:type="1"
 -                   FG:name="&errorConsoleCmd.label;" />
 -  <RDF:Description RDF:about="urn:FireGestures:BookmarksSidebar"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.bookmarksSidebar;" />
 -  <RDF:Description RDF:about="urn:FireGestures:HistorySidebar"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.historySidebar;" />
 -  <RDF:Description RDF:about="urn:FireGestures:FindBar"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.toggleFindbar;" />
 -  <RDF:Description RDF:about="urn:FireGestures:RestartApp"
 -                   FG:type="1"
 -                   FG:name="&gestureCmd.restartApp;" />
 -  <RDF:Description RDF:about="urn:FireGestures:Preferences"
 -                   FG:type="1"
 -                   FG:name="FireGestures - &gestureCmd.options;"
 -                   FG:direction="LDRUL" />
 -  <!-- popup -->
 -  <RDF:Description RDF:about="urn:category:popup"
 -                   FG:type="0"
 -                   FG:name="&gestureCategory.popup;" />
 -  <RDF:Description RDF:about="urn:FireGestures:BFHistoryPopup"
 -                   FG:type="1"
 -                   FG:name="[&gestureType.popup;] &gestureCmd.backForwardHistory;"
 -                   FG:extra="wheel-up" />
 -  <RDF:Description RDF:about="urn:FireGestures:AllTabsPopup"
 -                   FG:type="1"
 -                   FG:name="[&gestureType.popup;] &listAllTabs.label;"
 -                   FG:extra="wheel-down" />
 -  <RDF:Description RDF:about="urn:FireGestures:ClosedTabsPopup"
 -                   FG:type="1"
 -                   FG:name="[&gestureType.popup;] &historyUndoMenu.label;" />
 -  <RDF:Description RDF:about="urn:FireGestures:WebSearchPopup"
 -                   FG:type="1"
 -                   FG:name="[&gestureType.popup;] &gestureCmd.searchForSelectionWith;"
 -                   FG:direction="RD" />
 -  <RDF:Description RDF:about="urn:FireGestures:AllScriptsPopup"
 -                   FG:type="1"
 -                   FG:name="[&gestureType.popup;] &gestureCmd.allScripts;" />
 -  <RDF:Description RDF:about="urn:FireGestures:OpenPanelUI"
 -                   FG:type="1"
 -                   FG:name="[&gestureType.popup;] &appmenu.tooltip;"
 -                   FG:flags="min:firefox29" />
 -  <!-- hybrid -->
 -  <RDF:Description RDF:about="urn:category:hybrid"
 -                   FG:type="0"
 -                   FG:name="&gestureCategory.hybrid;" />
 -  <RDF:Description RDF:about="urn:FireGestures:HybridBookmark"
 -                   FG:type="1"
 -                   FG:name="[&gestureType.hybrid;] &gestureCmd.hybridBookmark; (&gestureCategory.link; / &gestureCategory.frame; / &gestureCategory.page;)" />
 -  <RDF:Description RDF:about="urn:FireGestures:HybridSave"
 -                   FG:type="1"
 -                   FG:name="[&gestureType.hybrid;] &gestureCmd.hybridSave; (&gestureCategory.link; / &gestureCategory.image; / &gestureCategory.frame; / &gestureCategory.page;)"
 -                   FG:direction="DL" />
 -  <RDF:Description RDF:about="urn:FireGestures:HybridCopyURL"
 -                   FG:type="1"
 -                   FG:name="[&gestureType.hybrid;] &gestureCmd.hybridCopyURL; (&gestureCategory.link; / &gestureCategory.image; / &gestureCategory.frame; / &gestureCategory.page;)" />
 -  <RDF:Description RDF:about="urn:FireGestures:HybridViewSource"
 -                   FG:type="1"
 -                   FG:name="[&gestureType.hybrid;] &gestureCmd.hybridViewSource; (&gestureCategory.selection; / &gestureCategory.frame; / &gestureCategory.page;)" />
 -  <RDF:Description RDF:about="urn:FireGestures:HybridMetaData"
 -                   FG:type="1"
 -                   FG:name="[&gestureType.hybrid;] &gestureCmd.hybridProperties; (&gestureCategory.image; / &gestureCategory.frame; / &gestureCategory.page;)" />
 -  <!-- script -->
 -  <RDF:Description RDF:about="urn:category:script"
 -                   FG:type="0"
 -                   FG:name="&gestureCategory.script;" />
 -  <!-- keypress gestures -->
 -  <RDF:Description RDF:about="urn:FireGestures:OpenHoveredLinks"
 -                   FG:type="1"
 -                   FG:extra="keypress-ctrl"
 -                   FG:flags="hidden" />
 -  <RDF:Description RDF:about="urn:FireGestures:SaveHoveredLinks"
 -                   FG:type="1"
 -                   FG:extra="keypress-shift"
 -                   FG:flags="hidden" />
 -  <RDF:Description RDF:about="urn:FireGestures:CopyHoveredLinks"
 -                   FG:type="1"
 -                   FG:flags="hidden" />
 -</RDF:RDF>
 +<?xml version="1.0"?>
 +
 +<!DOCTYPE RDF:RDF [
 +  <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
 +  %browserDTD;
 +  <!ENTITY % tabBrowserDTD SYSTEM "chrome://browser/locale/tabbrowser.dtd">
 +  %tabBrowserDTD;
 +  <!ENTITY % mappingDTD SYSTEM "chrome://firegestures/locale/mapping.dtd">
 +  %mappingDTD;
 +]>
 +
 +<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 +         xmlns:FG="http://www.xuldev.org/firegestures-mapping#">
 +  <RDF:Seq RDF:about="urn:mapping:root">
 +    <RDF:li RDF:resource="urn:category:navigation" />
 +    <RDF:li RDF:resource="urn:Browser:Back" />
 +    <RDF:li RDF:resource="urn:Browser:Forward" />
 +    <RDF:li RDF:resource="urn:Browser:Reload" />
 +    <RDF:li RDF:resource="urn:Browser:ReloadSkipCache" />
 +    <RDF:li RDF:resource="urn:Browser:Stop" />
 +    <RDF:li RDF:resource="urn:Browser:Home" />
 +    <RDF:li RDF:resource="urn:FireGestures:GoUpperLevel" />
 +    <RDF:li RDF:resource="urn:FireGestures:IncrementURL" />
 +    <RDF:li RDF:resource="urn:FireGestures:DecrementURL" />
 +    <RDF:li RDF:resource="urn:category:window" />
 +    <RDF:li RDF:resource="urn:cmd_newNavigator" />
 +    <RDF:li RDF:resource="urn:Tools:PrivateBrowsing" />
 +    <RDF:li RDF:resource="urn:cmd_closeWindow" />
 +    <RDF:li RDF:resource="urn:History:UndoCloseWindow" />
 +    <RDF:li RDF:resource="urn:FireGestures:MinimizeWindow" />
 +    <RDF:li RDF:resource="urn:FireGestures:MaximizeWindow" />
 +    <RDF:li RDF:resource="urn:View:FullScreen" />
 +    <RDF:li RDF:resource="urn:category:tab" />
 +    <RDF:li RDF:resource="urn:cmd_newNavigatorTab" />
 +    <RDF:li RDF:resource="urn:cmd_close" />
 +    <RDF:li RDF:resource="urn:FireGestures:CloseTabOrWindow" />
 +    <RDF:li RDF:resource="urn:FireGestures:UndoCloseTab" />
 +    <RDF:li RDF:resource="urn:FireGestures:PreviousTab" />
 +    <RDF:li RDF:resource="urn:FireGestures:NextTab" />
 +    <RDF:li RDF:resource="urn:FireGestures:DuplicateTab" />
 +    <RDF:li RDF:resource="urn:FireGestures:DetachTab" />
 +    <RDF:li RDF:resource="urn:FireGestures:TogglePinTab" />
 +    <RDF:li RDF:resource="urn:FireGestures:ReloadAllTabs" />
 +    <RDF:li RDF:resource="urn:FireGestures:CloseOtherTabs" />
 +    <RDF:li RDF:resource="urn:FireGestures:CloseLeftTabs" />
 +    <RDF:li RDF:resource="urn:FireGestures:CloseRightTabs" />
 +    <RDF:li RDF:resource="urn:Browser:ToggleTabView" />
 +    <RDF:li RDF:resource="urn:category:page" />
 +    <RDF:li RDF:resource="urn:cmd_textZoomEnlarge" />
 +    <RDF:li RDF:resource="urn:cmd_textZoomReduce" />
 +    <RDF:li RDF:resource="urn:cmd_textZoomReset" />
 +    <RDF:li RDF:resource="urn:cmd_fullZoomEnlarge" />
 +    <RDF:li RDF:resource="urn:cmd_fullZoomReduce" />
 +    <RDF:li RDF:resource="urn:cmd_fullZoomReset" />
 +    <RDF:li RDF:resource="urn:FireGestures:ScrollTop" />
 +    <RDF:li RDF:resource="urn:FireGestures:ScrollBottom" />
 +    <RDF:li RDF:resource="urn:FireGestures:ScrollPageUp" />
 +    <RDF:li RDF:resource="urn:FireGestures:ScrollPageDown" />
 +    <RDF:li RDF:resource="urn:Browser:AddBookmarkAs" />
 +    <RDF:li RDF:resource="urn:Browser:SavePage" />
 +    <RDF:li RDF:resource="urn:View:PageSource" />
 +    <RDF:li RDF:resource="urn:View:PageInfo" />
 +    <RDF:li RDF:resource="urn:cmd_printPreview" />
 +    <RDF:li RDF:resource="urn:cmd_print" />
 +    <RDF:li RDF:resource="urn:category:frame" />
 +    <RDF:li RDF:resource="urn:FireGestures:ShowOnlyThisFrame" />
 +    <RDF:li RDF:resource="urn:FireGestures:OpenFrame" />
 +    <RDF:li RDF:resource="urn:FireGestures:OpenFrameInTab" />
 +    <RDF:li RDF:resource="urn:FireGestures:ReloadFrame" />
 +    <RDF:li RDF:resource="urn:FireGestures:AddBookmarkForFrame" />
 +    <RDF:li RDF:resource="urn:FireGestures:SaveFrame" />
 +    <RDF:li RDF:resource="urn:FireGestures:ViewFrameSource" />
 +    <RDF:li RDF:resource="urn:FireGestures:ViewFrameInfo" />
 +    <RDF:li RDF:resource="urn:category:link" />
 +    <RDF:li RDF:resource="urn:FireGestures:OpenLinkInBgTab" />
 +    <RDF:li RDF:resource="urn:FireGestures:OpenLinkInFgTab" />
 +    <RDF:li RDF:resource="urn:FireGestures:OpenLink" />
 +    <RDF:li RDF:resource="urn:FireGestures:OpenLinkInPrivateWindow" />
 +    <RDF:li RDF:resource="urn:FireGestures:AddBookmarkForLink" />
 +    <RDF:li RDF:resource="urn:FireGestures:SaveLink" />
 +    <RDF:li RDF:resource="urn:category:image" />
 +    <RDF:li RDF:resource="urn:FireGestures:ViewImage" />
 +    <RDF:li RDF:resource="urn:FireGestures:SaveImage" />
 +    <RDF:li RDF:resource="urn:FireGestures:SaveImageNow" />
 +    <RDF:li RDF:resource="urn:category:selection" />
 +    <RDF:li RDF:resource="urn:FireGestures:WebSearch" />
 +    <RDF:li RDF:resource="urn:FireGestures:OpenLinksInSelection" />
 +    <RDF:li RDF:resource="urn:FireGestures:OpenURLsInSelection" />
 +    <RDF:li RDF:resource="urn:category:tools" />
 +    <RDF:li RDF:resource="urn:Tools:Downloads" />
 +    <RDF:li RDF:resource="urn:Tools:Addons" />
 +    <RDF:li RDF:resource="urn:Tools:Sanitize" />
 +    <RDF:li RDF:resource="urn:Tools:DevToolbox" />
 +    <RDF:li RDF:resource="urn:FireGestures:ErrorConsole" />
 +    <RDF:li RDF:resource="urn:FireGestures:BookmarksSidebar" />
 +    <RDF:li RDF:resource="urn:FireGestures:HistorySidebar" />
 +    <RDF:li RDF:resource="urn:FireGestures:FindBar" />
 +    <RDF:li RDF:resource="urn:FireGestures:RestartApp" />
 +    <RDF:li RDF:resource="urn:FireGestures:Preferences" />
 +    <RDF:li RDF:resource="urn:category:popup" />
 +    <RDF:li RDF:resource="urn:FireGestures:BFHistoryPopup" />
 +    <RDF:li RDF:resource="urn:FireGestures:AllTabsPopup" />
 +    <RDF:li RDF:resource="urn:FireGestures:ClosedTabsPopup" />
 +    <RDF:li RDF:resource="urn:FireGestures:WebSearchPopup" />
 +    <RDF:li RDF:resource="urn:FireGestures:AllScriptsPopup" />
 +    <RDF:li RDF:resource="urn:FireGestures:OpenPanelUI" />
 +    <RDF:li RDF:resource="urn:category:hybrid" />
 +    <RDF:li RDF:resource="urn:FireGestures:HybridBookmark" />
 +    <RDF:li RDF:resource="urn:FireGestures:HybridSave" />
-     <RDF:li RDF:resource="urn:FireGestures:HybridSendURL" />
 +    <RDF:li RDF:resource="urn:FireGestures:HybridCopyURL" />
 +    <RDF:li RDF:resource="urn:FireGestures:HybridViewSource" />
 +    <RDF:li RDF:resource="urn:FireGestures:HybridMetaData" />
 +    <RDF:li RDF:resource="urn:category:script" />
 +    <RDF:li RDF:resource="urn:FireGestures:OpenHoveredLinks" />
 +    <RDF:li RDF:resource="urn:FireGestures:SaveHoveredLinks" />
 +    <RDF:li RDF:resource="urn:FireGestures:CopyHoveredLinks" />
 +  </RDF:Seq>
 +  <!-- navigation -->
 +  <RDF:Description RDF:about="urn:category:navigation"
 +                   FG:type="0"
 +                   FG:name="&gestureCategory.navigation;" />
 +  <RDF:Description RDF:about="urn:Browser:Back"
 +                   FG:type="1"
 +                   FG:name="&backCmd.label;"
 +                   FG:direction="L"
 +                   FG:extra="swipe-left" />
 +  <RDF:Description RDF:about="urn:Browser:Forward"
 +                   FG:type="1"
 +                   FG:name="&forwardCmd.label;"
 +                   FG:direction="R"
 +                   FG:extra="swipe-right" />
 +  <RDF:Description RDF:about="urn:Browser:Reload"
 +                   FG:type="1"
 +                   FG:name="&reloadCmd.label;"
 +                   FG:direction="UD" />
 +  <RDF:Description RDF:about="urn:Browser:ReloadSkipCache"
 +                   FG:type="1"
 +                   FG:name="&reloadCmd.label; (&gestureCmd.skipCache;)"
 +                   FG:direction="UDU" />
 +  <RDF:Description RDF:about="urn:Browser:Stop"
 +                   FG:type="1"
 +                   FG:name="&stopCmd.label;" />
 +  <RDF:Description RDF:about="urn:Browser:Home"
 +                   FG:type="1"
 +                   FG:name="&homeButton.label;" />
 +  <RDF:Description RDF:about="urn:FireGestures:GoUpperLevel"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.goUpperLevel;"
 +                   FG:direction="DU" />
 +  <RDF:Description RDF:about="urn:FireGestures:IncrementURL"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.incrementURL;"
 +                   FG:direction="RURU" />
 +  <RDF:Description RDF:about="urn:FireGestures:DecrementURL"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.decrementURL;"
 +                   FG:direction="RDRD" />
 +  <!-- window -->
 +  <RDF:Description RDF:about="urn:category:window"
 +                   FG:type="0"
 +                   FG:name="&gestureCategory.window;" />
 +  <RDF:Description RDF:about="urn:cmd_newNavigator"
 +                   FG:type="1"
 +                   FG:name="&newNavigatorCmd.label;"
 +                   FG:direction="DRU" />
 +  <RDF:Description RDF:about="urn:Tools:PrivateBrowsing"
 +                   FG:type="1"
 +                   FG:name="&newPrivateWindow.label;" />
 +  <RDF:Description RDF:about="urn:cmd_closeWindow"
 +                   FG:type="1"
 +                   FG:name="&closeWindow.label;"
 +                   FG:direction="URD" />
 +  <RDF:Description RDF:about="urn:History:UndoCloseWindow"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.undoCloseWindow;" />
 +  <RDF:Description RDF:about="urn:FireGestures:MinimizeWindow"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.minimizeWindow;"
 +                   FG:direction="RUD" />
 +  <RDF:Description RDF:about="urn:FireGestures:MaximizeWindow"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.maximizeWindow;"
 +                   FG:direction="RDU" />
 +  <RDF:Description RDF:about="urn:View:FullScreen"
 +                   FG:type="1"
 +                   FG:name="&fullScreenCmd.label;" />
 +  <!-- tab -->
 +  <RDF:Description RDF:about="urn:category:tab"
 +                   FG:type="0"
 +                   FG:name="&gestureCategory.tab;" />
 +  <RDF:Description RDF:about="urn:cmd_newNavigatorTab"
 +                   FG:type="1"
 +                   FG:name="&tabCmd.label;"
 +                   FG:direction="LR" />
 +  <RDF:Description RDF:about="urn:cmd_close"
 +                   FG:type="1"
 +                   FG:name="&closeTab.label;"
 +                   FG:direction="DR" />
 +  <RDF:Description RDF:about="urn:FireGestures:CloseTabOrWindow"
 +                   FG:type="1"
 +                   FG:name="&closeTab.label; / &closeWindow.label;" />
 +  <RDF:Description RDF:about="urn:FireGestures:UndoCloseTab"
 +                   FG:type="1"
 +                   FG:name="&undoCloseTab.label;"
 +                   FG:direction="RL" />
 +  <RDF:Description RDF:about="urn:FireGestures:PreviousTab"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.previousTab;"
 +                   FG:direction="UL"
 +                   FG:extra="rocker-left" />
 +  <RDF:Description RDF:about="urn:FireGestures:NextTab"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.nextTab;"
 +                   FG:direction="UR"
 +                   FG:extra="rocker-right" />
 +  <RDF:Description RDF:about="urn:FireGestures:DuplicateTab"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.duplicateTab;" />
 +  <RDF:Description RDF:about="urn:FireGestures:DetachTab"
 +                   FG:type="1"
 +                   FG:name="&moveToNewWindow.label;" />
 +  <RDF:Description RDF:about="urn:FireGestures:TogglePinTab"
 +                   FG:type="1"
 +                   FG:name="&pinTab.label; / &unpinTab.label;" />
 +  <RDF:Description RDF:about="urn:FireGestures:ReloadAllTabs"
 +                   FG:type="1"
 +                   FG:name="&reloadAllTabs.label;" />
 +  <RDF:Description RDF:about="urn:FireGestures:CloseOtherTabs"
 +                   FG:type="1"
 +                   FG:name="&closeOtherTabs.label;" />
 +  <RDF:Description RDF:about="urn:FireGestures:CloseLeftTabs"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.closeLeftTabs;" />
 +  <RDF:Description RDF:about="urn:FireGestures:CloseRightTabs"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.closeRightTabs;" />
 +  <RDF:Description RDF:about="urn:Browser:ToggleTabView"
 +                   FG:type="1"
 +                   FG:name="&viewTabGroups.label;" />
 +  <!-- page -->
 +  <RDF:Description RDF:about="urn:cmd_textZoomEnlarge"
 +                   FG:type="1"
 +                   FG:name="&fullZoomToggleCmd.label; - &fullZoomEnlargeCmd.label;"
 +                   FG:direction="LRU" />
 +  <RDF:Description RDF:about="urn:cmd_textZoomReduce"
 +                   FG:type="1"
 +                   FG:name="&fullZoomToggleCmd.label; - &fullZoomReduceCmd.label;"
 +                   FG:direction="LRD" />
 +  <RDF:Description RDF:about="urn:cmd_textZoomReset"
 +                   FG:type="1"
 +                   FG:name="&fullZoomToggleCmd.label; - &fullZoomResetCmd.label;"
 +                   FG:direction="LRUD" />
 +  <RDF:Description RDF:about="urn:cmd_fullZoomEnlarge"
 +                   FG:type="1"
 +                   FG:name="&fullZoom.label; - &fullZoomEnlargeCmd.label;" />
 +  <RDF:Description RDF:about="urn:cmd_fullZoomReduce"
 +                   FG:type="1"
 +                   FG:name="&fullZoom.label; - &fullZoomReduceCmd.label;" />
 +  <RDF:Description RDF:about="urn:cmd_fullZoomReset"
 +                   FG:type="1"
 +                   FG:name="&fullZoom.label; - &fullZoomResetCmd.label;" />
 +  <RDF:Description RDF:about="urn:category:page"
 +                   FG:type="0"
 +                   FG:name="&gestureCategory.page;" />
 +  <RDF:Description RDF:about="urn:FireGestures:ScrollTop"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.scrollTop;"
 +                   FG:direction="LU"
 +                   FG:extra="swipe-up" />
 +  <RDF:Description RDF:about="urn:FireGestures:ScrollBottom"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.scrollBottom;"
 +                   FG:direction="LD"
 +                   FG:extra="swipe-down" />
 +  <RDF:Description RDF:about="urn:FireGestures:ScrollPageUp"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.scrollPageUp;" />
 +  <RDF:Description RDF:about="urn:FireGestures:ScrollPageDown"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.scrollPageDown;" />
 +  <RDF:Description RDF:about="urn:Browser:AddBookmarkAs"
 +                   FG:type="1"
 +                   FG:name="&bookmarkThisPageCmd.label;" />
 +  <RDF:Description RDF:about="urn:Browser:SavePage"
 +                   FG:type="1"
 +                   FG:name="&savePageCmd.label;" />
 +  <RDF:Description RDF:about="urn:View:PageSource"
 +                   FG:type="1"
 +                   FG:name="&viewPageSourceCmd.label;" />
 +  <RDF:Description RDF:about="urn:View:PageInfo"
 +                   FG:type="1"
 +                   FG:name="&viewPageInfoCmd.label;" />
 +  <RDF:Description RDF:about="urn:cmd_printPreview"
 +                   FG:type="1"
 +                   FG:name="&printPreviewCmd.label;" />
 +  <RDF:Description RDF:about="urn:cmd_print"
 +                   FG:type="1"
 +                   FG:name="&printCmd.label;" />
 +  <!-- frame -->
 +  <RDF:Description RDF:about="urn:category:frame"
 +                   FG:type="0"
 +                   FG:name="&gestureCategory.frame;" />
 +  <RDF:Description RDF:about="urn:FireGestures:ShowOnlyThisFrame"
 +                   FG:type="1"
 +                   FG:name="&showOnlyThisFrameCmd.label;"
 +                   FG:direction="LDR" />
 +  <RDF:Description RDF:about="urn:FireGestures:OpenFrame"
 +                   FG:type="1"
 +                   FG:name="&openFrameCmd.label;" />
 +  <RDF:Description RDF:about="urn:FireGestures:OpenFrameInTab"
 +                   FG:type="1"
 +                   FG:name="&openFrameCmdInTab.label;"
 +                   FG:direction="LDRU" />
 +  <RDF:Description RDF:about="urn:FireGestures:ReloadFrame"
 +                   FG:type="1"
 +                   FG:name="&reloadFrameCmd.label;" />
 +  <RDF:Description RDF:about="urn:FireGestures:AddBookmarkForFrame"
 +                   FG:type="1"
 +                   FG:name="&bookmarkThisFrameCmd.label;" />
 +  <RDF:Description RDF:about="urn:FireGestures:SaveFrame"
 +                   FG:type="1"
 +                   FG:name="&saveFrameCmd.label;" />
 +  <RDF:Description RDF:about="urn:FireGestures:ViewFrameSource"
 +                   FG:type="1"
 +                   FG:name="&viewFrameSourceCmd.label;" />
 +  <RDF:Description RDF:about="urn:FireGestures:ViewFrameInfo"
 +                   FG:type="1"
 +                   FG:name="&viewFrameInfoCmd.label;" />
 +  <!-- link -->
 +  <RDF:Description RDF:about="urn:category:link"
 +                   FG:type="0"
 +                   FG:name="&gestureCategory.link;" />
 +  <RDF:Description RDF:about="urn:FireGestures:OpenLinkInBgTab"
 +                   FG:type="1"
 +                   FG:name="&openLinkCmdInTab.label; (&gestureCmd.backgroundTab;)"
 +                   FG:direction="D" />
 +  <RDF:Description RDF:about="urn:FireGestures:OpenLinkInFgTab"
 +                   FG:type="1"
 +                   FG:name="&openLinkCmdInTab.label; (&gestureCmd.foregroundTab;)"
 +                   FG:direction="U" />
 +  <RDF:Description RDF:about="urn:FireGestures:OpenLink"
 +                   FG:type="1"
 +                   FG:name="&openLinkCmd.label;" />
 +  <RDF:Description RDF:about="urn:FireGestures:OpenLinkInPrivateWindow"
 +                   FG:type="1"
 +                   FG:name="&openLinkInPrivateWindowCmd.label;" />
 +  <RDF:Description RDF:about="urn:FireGestures:AddBookmarkForLink"
 +                   FG:type="1"
 +                   FG:name="&bookmarkThisLinkCmd.label;" />
 +  <RDF:Description RDF:about="urn:FireGestures:SaveLink"
 +                   FG:type="1"
 +                   FG:name="&saveLinkCmd.label;" />
 +  <!-- image -->
 +  <RDF:Description RDF:about="urn:category:image"
 +                   FG:type="0"
 +                   FG:name="&gestureCategory.image;" />
 +  <RDF:Description RDF:about="urn:FireGestures:ViewImage"
 +                   FG:type="1"
 +                   FG:name="&viewImageCmd.label;" />
 +  <RDF:Description RDF:about="urn:FireGestures:SaveImage"
 +                   FG:type="1"
 +                   FG:name="&saveImageCmd.label;"
 +                   FG:direction="DLD" />
 +  <RDF:Description RDF:about="urn:FireGestures:SaveImageNow"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.saveImageNow;"
 +                   FG:direction="DRD" />
 +  <!-- selection -->
 +  <RDF:Description RDF:about="urn:category:selection"
 +                   FG:type="0"
 +                   FG:name="&gestureCategory.selection;" />
 +  <RDF:Description RDF:about="urn:FireGestures:WebSearch"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.searchForSelection;" />
 +  <RDF:Description RDF:about="urn:FireGestures:OpenLinksInSelection"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.openLinksInSelection;"
 +                   FG:direction="RU" />
 +  <RDF:Description RDF:about="urn:FireGestures:OpenURLsInSelection"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.openURLsInSelection; / &gestureCmd.searchForSelection;" />
 +  <!-- tools -->
 +  <RDF:Description RDF:about="urn:category:tools"
 +                   FG:type="0"
 +                   FG:name="&gestureCategory.tools;" />
 +  <RDF:Description RDF:about="urn:Tools:Downloads"
 +                   FG:type="1"
 +                   FG:name="&downloads.label;" />
 +  <RDF:Description RDF:about="urn:Tools:Addons"
 +                   FG:type="1"
 +                   FG:name="&addons.label;" />
 +  <RDF:Description RDF:about="urn:Tools:Sanitize"
 +                   FG:type="1"
 +                   FG:name="&clearRecentHistory.label;" />
 +  <RDF:Description RDF:about="urn:Tools:DevToolbox"
 +                   FG:type="1"
 +                   FG:name="&webDeveloperMenu.label; - &devToolboxMenuItem.label;" />
 +  <RDF:Description RDF:about="urn:FireGestures:ErrorConsole"
 +                   FG:type="1"
 +                   FG:name="&errorConsoleCmd.label;" />
 +  <RDF:Description RDF:about="urn:FireGestures:BookmarksSidebar"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.bookmarksSidebar;" />
 +  <RDF:Description RDF:about="urn:FireGestures:HistorySidebar"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.historySidebar;" />
 +  <RDF:Description RDF:about="urn:FireGestures:FindBar"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.toggleFindbar;" />
 +  <RDF:Description RDF:about="urn:FireGestures:RestartApp"
 +                   FG:type="1"
 +                   FG:name="&gestureCmd.restartApp;" />
 +  <RDF:Description RDF:about="urn:FireGestures:Preferences"
 +                   FG:type="1"
 +                   FG:name="FireGestures - &gestureCmd.options;"
 +                   FG:direction="LDRUL" />
 +  <!-- popup -->
 +  <RDF:Description RDF:about="urn:category:popup"
 +                   FG:type="0"
 +                   FG:name="&gestureCategory.popup;" />
 +  <RDF:Description RDF:about="urn:FireGestures:BFHistoryPopup"
 +                   FG:type="1"
 +                   FG:name="[&gestureType.popup;] &gestureCmd.backForwardHistory;"
 +                   FG:extra="wheel-up" />
 +  <RDF:Description RDF:about="urn:FireGestures:AllTabsPopup"
 +                   FG:type="1"
 +                   FG:name="[&gestureType.popup;] &listAllTabs.label;"
 +                   FG:extra="wheel-down" />
 +  <RDF:Description RDF:about="urn:FireGestures:ClosedTabsPopup"
 +                   FG:type="1"
 +                   FG:name="[&gestureType.popup;] &historyUndoMenu.label;" />
 +  <RDF:Description RDF:about="urn:FireGestures:WebSearchPopup"
 +                   FG:type="1"
 +                   FG:name="[&gestureType.popup;] &gestureCmd.searchForSelectionWith;"
 +                   FG:direction="RD" />
 +  <RDF:Description RDF:about="urn:FireGestures:AllScriptsPopup"
 +                   FG:type="1"
 +                   FG:name="[&gestureType.popup;] &gestureCmd.allScripts;" />
 +  <RDF:Description RDF:about="urn:FireGestures:OpenPanelUI"
 +                   FG:type="1"
 +                   FG:name="[&gestureType.popup;] &appmenu.tooltip;"
 +                   FG:flags="min:firefox29" />
 +  <!-- hybrid -->
 +  <RDF:Description RDF:about="urn:category:hybrid"
 +                   FG:type="0"
 +                   FG:name="&gestureCategory.hybrid;" />
 +  <RDF:Description RDF:about="urn:FireGestures:HybridBookmark"
 +                   FG:type="1"
 +                   FG:name="[&gestureType.hybrid;] &gestureCmd.hybridBookmark; (&gestureCategory.link; / &gestureCategory.frame; / &gestureCategory.page;)" />
 +  <RDF:Description RDF:about="urn:FireGestures:HybridSave"
 +                   FG:type="1"
 +                   FG:name="[&gestureType.hybrid;] &gestureCmd.hybridSave; (&gestureCategory.link; / &gestureCategory.image; / &gestureCategory.frame; / &gestureCategory.page;)"
 +                   FG:direction="DL" />
-   <RDF:Description RDF:about="urn:FireGestures:HybridSendURL"
-                    FG:type="1"
-                    FG:name="[&gestureType.hybrid;] &gestureCmd.hybridSendURL; (&gestureCategory.link; / &gestureCategory.image; / &gestureCategory.page;)" />
 +  <RDF:Description RDF:about="urn:FireGestures:HybridCopyURL"
 +                   FG:type="1"
 +                   FG:name="[&gestureType.hybrid;] &gestureCmd.hybridCopyURL; (&gestureCategory.link; / &gestureCategory.image; / &gestureCategory.frame; / &gestureCategory.page;)" />
 +  <RDF:Description RDF:about="urn:FireGestures:HybridViewSource"
 +                   FG:type="1"
 +                   FG:name="[&gestureType.hybrid;] &gestureCmd.hybridViewSource; (&gestureCategory.selection; / &gestureCategory.frame; / &gestureCategory.page;)" />
 +  <RDF:Description RDF:about="urn:FireGestures:HybridMetaData"
 +                   FG:type="1"
 +                   FG:name="[&gestureType.hybrid;] &gestureCmd.hybridProperties; (&gestureCategory.image; / &gestureCategory.frame; / &gestureCategory.page;)" />
 +  <!-- script -->
 +  <RDF:Description RDF:about="urn:category:script"
 +                   FG:type="0"
 +                   FG:name="&gestureCategory.script;" />
 +  <!-- keypress gestures -->
 +  <RDF:Description RDF:about="urn:FireGestures:OpenHoveredLinks"
 +                   FG:type="1"
 +                   FG:extra="keypress-ctrl"
 +                   FG:flags="hidden" />
 +  <RDF:Description RDF:about="urn:FireGestures:SaveHoveredLinks"
 +                   FG:type="1"
 +                   FG:extra="keypress-shift"
 +                   FG:flags="hidden" />
 +  <RDF:Description RDF:about="urn:FireGestures:CopyHoveredLinks"
 +                   FG:type="1"
 +                   FG:flags="hidden" />
 +</RDF:RDF>
diff --cc chrome/content/firegestures/remote.js
index edb62d2,87967fa..6773e66
mode 100755,100644..100755
--- a/chrome/content/firegestures/remote.js
+++ b/chrome/content/firegestures/remote.js
@@@ -43,12 -49,15 +37,12 @@@ let FireGesturesRemote = 
  	_startY: 0,
  
  	_onGestureStart: function FGR__onGestureStart(aData) {
 -		log("onStartGesture: " + aData.toSource());	// #debug
  		this._startX = aData.x;
  		this._startY = aData.y;
- 		let { doc: doc, elt: elt } = this._elementFromPoint(aData.x, aData.y);
+ 		let { doc, elt } = this._elementFromPoint(aData.x, aData.y);
  		if (aData.type != "MozSwipeGesture" && aData.button == 0) {
 -			// cancel starting gesture on form elements
  			let localName = elt.localName;
  			if (["input", "textarea", "select", "option", "textbox", "menulist"].indexOf(localName) >= 0) {
 -				log("*** cancel starting gesture on form element (" + localName + ")");	// #debug
  				sendSyncMessage("FireGesturesRemote:Response", { name: "cancelMouseGesture" }, {});
  				return;
  			}
@@@ -59,15 -70,31 +53,28 @@@
  			if (sel.isCollapsed)
  				win.setTimeout(function() { sel.removeAllRanges(); }, 10);
  		}
- 		sendSyncMessage("FireGesturesRemote:Response", { name: "sourceNode" }, { elt: elt });
 -		// tell parent browser the source node and some info
+ 		let sel = this._getSelectedText(doc, elt);
+ 		sendSyncMessage("FireGesturesRemote:Response", { name: "sourceNode" }, { elt, sel });
  	},
  
  	_onSwipeGesture: function(aData) {
- 		let { elt: elt } = this._elementFromPoint(aData.x, aData.y);
- 		sendSyncMessage("FireGesturesRemote:Response", { name: "sourceNode" }, { elt: elt });
 -		log("onSwipeGesture: " + aData.toSource());	// #debug
+ 		let { doc, elt } = this._elementFromPoint(aData.x, aData.y);
+ 		let sel = this._getSelectedText(doc, elt);
+ 		sendSyncMessage("FireGesturesRemote:Response", { name: "sourceNode" }, { elt, sel });
  		sendSyncMessage("FireGesturesRemote:Response", { name: "swipe" }, { direction: aData.direction });
  	},
  
+ 	_getSelectedText: function(doc, elt) {
 -		// @see BrowserUtils.getSelectionDetails
+ 		let sel = doc.defaultView.getSelection().toString();
+ 		if (!sel && elt instanceof Ci.nsIDOMNSEditableElement) {
+ 			if (elt instanceof Ci.nsIDOMHTMLTextAreaElement || 
+ 			    (elt instanceof Ci.nsIDOMHTMLInputElement && elt.mozIsTextField(true))) {
+ 				sel = elt.editor.selection.toString();
+ 			}
+ 		}
+ 		return sel;
+ 	},
+ 
  	handleEvent: function(event) {
  		switch (event.type) {
  			case "scroll": 
@@@ -161,101 -196,10 +168,9 @@@
  			doc = elt.contentDocument;
  			elt = doc.elementFromPoint(x, y);
  		}
- 		return { doc: doc, elt: elt };
- 	},
- 
- 
- 
- 	_trailSize: 0,
- 	_trailColor: "",
- 	_trailZoom: 1,
- 	_trailDot: null,
- 	_trailArea: null,
- 	_trailLastDot: null,
- 	_trailOffsetX: 0,
- 	_trailOffsetY: 0,
- 
- 	_createTrail: function FGR__createTrail(aData) {
- 		let win = content.window;
- 		let doc = content.document;
- 		this._trailSize  = aData.size;
- 		this._trailColor = aData.color;
- 		this._trailZoom  = aData.zoom;
- 		this._trailOffsetX = (win.mozInnerScreenX - win.scrollX) * this._trailZoom;
- 		this._trailOffsetY = (win.mozInnerScreenY - win.scrollY) * this._trailZoom;
- 		this._trailArea = doc.createElementNS(HTML_NS, "xdTrailArea");
- 		(doc.documentElement || doc).appendChild(this._trailArea);
- 		this._trailDot = doc.createElementNS(HTML_NS, "xdTrailDot");
- 		this._trailDot.style.width = this._trailSize + "px";
- 		this._trailDot.style.height = this._trailSize + "px";
- 		this._trailDot.style.background = this._trailColor;
- 		this._trailDot.style.border = "0px";
- 		this._trailDot.style.position = "absolute";
- 		this._trailDot.style.zIndex = 2147483647;
- 	},
- 
- 	_drawTrail: function FGR__drawTrail(aData) {
- 		if (!this._trailArea)
- 			return;
- 		let x1 = aData.x1, y1 = aData.y1, x2 = aData.x2, y2 = aData.y2;
- 		let xMove = x2 - x1;
- 		let yMove = y2 - y1;
- 		let xDecrement = xMove < 0 ? 1 : -1;
- 		let yDecrement = yMove < 0 ? 1 : -1;
- 		x2 -= this._trailOffsetX;
- 		y2 -= this._trailOffsetY;
- 		if (Math.abs(xMove) >= Math.abs(yMove))
- 			for (let i = xMove; i != 0; i += xDecrement)
- 				this._strokeDot(x2 - i, y2 - Math.round(yMove * i / xMove));
- 		else
- 			for (let i = yMove; i != 0; i += yDecrement)
- 				this._strokeDot(x2 - Math.round(xMove * i / yMove), y2 - i);
- 	},
- 
- 	_eraseTrail: function FGR__eraseTrail() {
- 		if (this._trailArea && this._trailArea.parentNode) {
- 			while (this._trailArea.lastChild)
- 				this._trailArea.removeChild(this._trailArea.lastChild);
- 			this._trailArea.parentNode.removeChild(this._trailArea);
- 		}
- 		this._trailDot = null;
- 		this._trailArea = null;
- 		this._trailLastDot = null;
 -		// log("_elementFromPoint: " + [doc.location, elt.localName, x, y].join(", "));	// #debug
+ 		return { doc, elt };
  	},
  
- 	_strokeDot: function FGR__strokeDot(x, y) {
- 		if (this._trailArea.y == y && this._trailArea.h == this._trailSize) {
- 			let newX = Math.min(this._trailArea.x, x);
- 			let newW = Math.max(this._trailArea.x + this._trailArea.w, x + this._trailSize) - newX;
- 			this._trailArea.x = newX;
- 			this._trailArea.w = newW;
- 			this._trailLastDot.style.left  = newX.toString() + "px";
- 			this._trailLastDot.style.width = newW.toString() + "px";
- 			return;
- 		}
- 		else if (this._trailArea.x == x && this._trailArea.w == this._trailSize) {
- 			let newY = Math.min(this._trailArea.y, y);
- 			let newH = Math.max(this._trailArea.y + this._trailArea.h, y + this._trailSize) - newY;
- 			this._trailArea.y = newY;
- 			this._trailArea.h = newH;
- 			this._trailLastDot.style.top    = newY.toString() + "px";
- 			this._trailLastDot.style.height = newH.toString() + "px";
- 			return;
- 		}
- 		if (this._trailZoom != 1) {
- 			x = Math.floor(x / this._trailZoom);
- 			y = Math.floor(y / this._trailZoom);
- 		}
- 		let dot = this._trailDot.cloneNode(true);
- 		dot.style.left = x + "px";
- 		dot.style.top = y + "px";
- 		this._trailArea.x = x;
- 		this._trailArea.y = y;
- 		this._trailArea.w = this._trailSize;
- 		this._trailArea.h = this._trailSize;
- 		this._trailArea.appendChild(dot);
- 		this._trailLastDot = dot;
- 	},
  
  };
  
diff --cc chrome/content/firegestures/viewSource.js
index 7a6c3bf,0688f07..2cd39b7
mode 100755,100644..100755
--- a/chrome/content/firegestures/viewSource.js
+++ b/chrome/content/firegestures/viewSource.js
@@@ -1,85 -1,94 +1,88 @@@
 -//////////////////////////////////////////////////
 -// FireGesturesViewSource
 -
 -var FireGesturesViewSource = {
 -
 -	_gestureHandler: null,	// xdIGestureHandler
 -
 -	_gestureMapping: null,	// xdIGestureMapping
 -
 -	get inPrintPreviewMode() {
 -		return document.getElementById("viewSource-toolbox").hidden;
 -	},
 -
 -	init: function() {
 -		var gestureSvc = Components.classes["@xuldev.org/firegestures/service;1"].
 -		                 getService(Components.interfaces.xdIGestureService);
 -		this._gestureHandler = gestureSvc.createHandler();
 -		this._gestureHandler.attach(getBrowser(), this);
 -		this._gestureMapping = gestureSvc.getMapping("viewsource_mapping");
 -		// disable built-in swipe gesture
 -		// [Firefox40-]
 -		if ("HandleSwipeGesture" in window)
 -			window.removeEventListener("MozSwipeGesture", HandleSwipeGesture, true);
 -		// [Firefox41+]
 -		if ("ViewSourceChrome" in window)
 -			window.removeEventListener("MozSwipeGesture", ViewSourceChrome, true);
 -	},
 -
 -	uninit: function() {
 -		if (this._gestureHandler) {
 -			this._gestureHandler.detach();
 -			this._gestureHandler = null;
 -		}
 -		this._gestureMapping = null;
 -	},
 -
 -
 -	/* ::::: xdIGestureObserver ::::: */
 -
 -	canStartGesture: function(event) {
 -		return true;
 -	},
 -
 -	onDirectionChanged: function(event, aDirectionChain) {},
 -
 -	onMouseGesture: function(event, aDirectionChain) {
 -		if (this.inPrintPreviewMode)
 -			return;
 -		var command = this._gestureMapping.getCommandForDirection(aDirectionChain);
 -		if (command)
 -			this._performAction(event, command.value);
 -	},
 -
 -	onExtraGesture: function(event, aGestureType) {
 -		if (this.inPrintPreviewMode)
 -			return;
 -		if (aGestureType == "gesture-timeout")
 -			return;
 -		if (aGestureType == "reload-prefs")
 -			return;
 -		this.onMouseGesture(event, aGestureType);
 -	},
 -
 -	_performAction: function(event, aCommand) {
 -		switch (aCommand) {
 -			case "cmd_scrollTop": 
 -			case "cmd_scrollBottom": 
 -			case "cmd_scrollPageUp": 
 -			case "cmd_scrollPageDown": 
 -				goDoCommand(aCommand);
 -				break;
 -			case "ViewSource:MinimizeWindow": 
 -				window.minimize();
 -				break;
 -			case "ViewSource:MaximizeWindow": 
 -				window.windowState == window.STATE_MAXIMIZED ? window.restore() : window.maximize();
 -				break;
 -			case "ViewSource:FireGestures": 
 -				this._gestureMapping.configure();
 -				break;
 -			default: 
 -				var cmd = document.getElementById(aCommand);
 -				if (cmd && cmd.getAttribute("disabled") != "true")
 -					cmd.doCommand();
 -		}
 -	},
 -
 -};
 -
 -
 -window.addEventListener("load",   function(){ FireGesturesViewSource.init(); },   false);
 -window.addEventListener("unload", function(){ FireGesturesViewSource.uninit(); }, false);
 -
 -
 +
 +var FireGesturesViewSource = {
 +
 +	_gestureHandler: null,
 +
 +	_gestureMapping: null,
 +
 +	get inPrintPreviewMode() {
 +		return document.getElementById("viewSource-toolbox").hidden;
 +	},
 +
 +	init: function() {
 +		var gestureSvc = Components.classes["@xuldev.org/firegestures/service;1"].
 +		                 getService(Components.interfaces.xdIGestureService);
 +		this._gestureHandler = gestureSvc.createHandler();
 +		this._gestureHandler.attach(getBrowser(), this);
 +		this._gestureMapping = gestureSvc.getMapping("viewsource_mapping");
- 		window.removeEventListener("MozSwipeGesture", HandleSwipeGesture, true);
++		if ("HandleSwipeGesture" in window)
++			window.removeEventListener("MozSwipeGesture", HandleSwipeGesture, true);
++		if ("ViewSourceChrome" in window)
++			window.removeEventListener("MozSwipeGesture", ViewSourceChrome, true);
 +	},
 +
 +	uninit: function() {
 +		if (this._gestureHandler) {
 +			this._gestureHandler.detach();
 +			this._gestureHandler = null;
 +		}
 +		this._gestureMapping = null;
 +	},
 +
 +
 +
 +	canStartGesture: function(event) {
 +		return true;
 +	},
 +
 +	onDirectionChanged: function(event, aDirectionChain) {},
 +
 +	onMouseGesture: function(event, aDirectionChain) {
 +		if (this.inPrintPreviewMode)
 +			return;
 +		var command = this._gestureMapping.getCommandForDirection(aDirectionChain);
 +		if (command)
 +			this._performAction(event, command.value);
 +	},
 +
 +	onExtraGesture: function(event, aGestureType) {
 +		if (this.inPrintPreviewMode)
 +			return;
 +		if (aGestureType == "gesture-timeout")
 +			return;
 +		if (aGestureType == "reload-prefs")
 +			return;
 +		this.onMouseGesture(event, aGestureType);
 +	},
 +
 +	_performAction: function(event, aCommand) {
 +		switch (aCommand) {
 +			case "cmd_scrollTop": 
 +			case "cmd_scrollBottom": 
 +			case "cmd_scrollPageUp": 
 +			case "cmd_scrollPageDown": 
 +				goDoCommand(aCommand);
 +				break;
 +			case "ViewSource:MinimizeWindow": 
 +				window.minimize();
 +				break;
 +			case "ViewSource:MaximizeWindow": 
 +				window.windowState == window.STATE_MAXIMIZED ? window.restore() : window.maximize();
 +				break;
 +			case "ViewSource:FireGestures": 
 +				this._gestureMapping.configure();
 +				break;
 +			default: 
 +				var cmd = document.getElementById(aCommand);
 +				if (cmd && cmd.getAttribute("disabled") != "true")
 +					cmd.doCommand();
 +		}
 +	},
 +
 +};
 +
 +
 +window.addEventListener("load",   function(){ FireGesturesViewSource.init(); },   false);
 +window.addEventListener("unload", function(){ FireGesturesViewSource.uninit(); }, false);
 +
 +
diff --cc chrome/locale/en-US/firegestures/mapping.dtd
index 2497e7a,0d0c5ab..3e227aa
--- a/chrome/locale/en-US/firegestures/mapping.dtd
+++ b/chrome/locale/en-US/firegestures/mapping.dtd
@@@ -1,54 -1,53 +1,53 @@@
 -<!ENTITY gestureCategory.navigation "Navigation">
 -<!ENTITY gestureCategory.window "Window">
 -<!ENTITY gestureCategory.tab "Tab">
 -<!ENTITY gestureCategory.page "Page">
 -<!ENTITY gestureCategory.frame "Frame">
 -<!ENTITY gestureCategory.link "Link">
 -<!ENTITY gestureCategory.image "Image">
 -<!ENTITY gestureCategory.selection "Selection">
 -<!ENTITY gestureCategory.tools "Tools">
 -<!ENTITY gestureCategory.popup "Popup Type">
 -<!ENTITY gestureCategory.hybrid "Hybrid Type">
 -<!ENTITY gestureCategory.script "User Scripts">
 -<!ENTITY gestureType.popup "Popup">
 -<!ENTITY gestureType.hybrid "Hybrid">
 -<!ENTITY gestureCmd.skipCache "Skip Cache">
 -<!ENTITY gestureCmd.goUpperLevel "Go Upper Level">
 -<!ENTITY gestureCmd.incrementURL "Increment Number in URL">
 -<!ENTITY gestureCmd.decrementURL "Decrement Number in URL">
 -<!ENTITY gestureCmd.undoCloseWindow "Undo Close Window">
 -<!ENTITY gestureCmd.minimizeWindow "Minimize Window">
 -<!ENTITY gestureCmd.maximizeWindow "Maximize Window / Restore Window Size">
 -<!ENTITY gestureCmd.previousTab "Previous Tab">
 -<!ENTITY gestureCmd.nextTab "Next Tab">
 -<!ENTITY gestureCmd.duplicateTab "Duplicate Tab">
 -<!ENTITY gestureCmd.closeLeftTabs "Close Left Tabs">
 -<!ENTITY gestureCmd.closeRightTabs "Close Right Tabs">
 -<!ENTITY gestureCmd.scrollTop "Scroll to Top">
 -<!ENTITY gestureCmd.scrollBottom "Scroll to Bottom">
 -<!ENTITY gestureCmd.scrollPageUp "Page Up">
 -<!ENTITY gestureCmd.scrollPageDown "Page Down">
 -<!ENTITY gestureCmd.backgroundTab "Background Tab">
 -<!ENTITY gestureCmd.foregroundTab "Foreground Tab">
 -<!ENTITY gestureCmd.saveImageNow "Save Image Now">
 -<!ENTITY gestureCmd.searchForSelection "Search for Selection">
 -<!ENTITY gestureCmd.searchForSelectionWith "Search for Selection with...">
 -<!ENTITY gestureCmd.allScripts "All User Scripts">
 -<!ENTITY gestureCmd.openLinksInSelection "Open All Links in Selection">
 -<!ENTITY gestureCmd.openURLsInSelection "Open All URLs in Selection">
 -<!ENTITY gestureCmd.bookmarksSidebar "Show Bookmarks Sidebar">
 -<!ENTITY gestureCmd.historySidebar "Show History Sidebar">
 -<!ENTITY gestureCmd.backForwardHistory "Back / Forward History">
 -<!ENTITY gestureCmd.hybridSave "Save As...">
 -<!ENTITY gestureCmd.hybridBookmark "Bookmark...">
 -<!ENTITY gestureCmd.hybridViewSource "View Source">
 -<!ENTITY gestureCmd.hybridProperties "Properties">
 -<!ENTITY gestureCmd.hybridCopyURL "Copy Location">
 -<!ENTITY gestureCmd.toggleFindbar "Open / Close Find Bar">
 -<!ENTITY gestureCmd.restartApp "Restart Firefox">
 -<!ENTITY gestureCmd.options "Options">
 -<!-- leave this empty for Pale Moon 24 compatibility -->
 -<!ENTITY viewTabGroups.label "">
 -<!-- leave this empty for Firefox 28- compatibility -->
 -<!ENTITY appmenu.tooltip "">
 +<!ENTITY gestureCategory.navigation "Navigation">
 +<!ENTITY gestureCategory.window "Window">
 +<!ENTITY gestureCategory.tab "Tab">
 +<!ENTITY gestureCategory.page "Page">
 +<!ENTITY gestureCategory.frame "Frame">
 +<!ENTITY gestureCategory.link "Link">
 +<!ENTITY gestureCategory.image "Image">
 +<!ENTITY gestureCategory.selection "Selection">
 +<!ENTITY gestureCategory.tools "Tools">
 +<!ENTITY gestureCategory.popup "Popup Type">
 +<!ENTITY gestureCategory.hybrid "Hybrid Type">
 +<!ENTITY gestureCategory.script "User Scripts">
 +<!ENTITY gestureType.popup "Popup">
 +<!ENTITY gestureType.hybrid "Hybrid">
 +<!ENTITY gestureCmd.skipCache "Skip Cache">
 +<!ENTITY gestureCmd.goUpperLevel "Go Upper Level">
 +<!ENTITY gestureCmd.incrementURL "Increment Number in URL">
 +<!ENTITY gestureCmd.decrementURL "Decrement Number in URL">
 +<!ENTITY gestureCmd.undoCloseWindow "Undo Close Window">
 +<!ENTITY gestureCmd.minimizeWindow "Minimize Window">
 +<!ENTITY gestureCmd.maximizeWindow "Maximize Window / Restore Window Size">
 +<!ENTITY gestureCmd.previousTab "Previous Tab">
 +<!ENTITY gestureCmd.nextTab "Next Tab">
 +<!ENTITY gestureCmd.duplicateTab "Duplicate Tab">
 +<!ENTITY gestureCmd.closeLeftTabs "Close Left Tabs">
 +<!ENTITY gestureCmd.closeRightTabs "Close Right Tabs">
 +<!ENTITY gestureCmd.scrollTop "Scroll to Top">
 +<!ENTITY gestureCmd.scrollBottom "Scroll to Bottom">
 +<!ENTITY gestureCmd.scrollPageUp "Page Up">
 +<!ENTITY gestureCmd.scrollPageDown "Page Down">
 +<!ENTITY gestureCmd.backgroundTab "Background Tab">
 +<!ENTITY gestureCmd.foregroundTab "Foreground Tab">
 +<!ENTITY gestureCmd.saveImageNow "Save Image Now">
 +<!ENTITY gestureCmd.searchForSelection "Search for Selection">
 +<!ENTITY gestureCmd.searchForSelectionWith "Search for Selection with...">
 +<!ENTITY gestureCmd.allScripts "All User Scripts">
 +<!ENTITY gestureCmd.openLinksInSelection "Open All Links in Selection">
 +<!ENTITY gestureCmd.openURLsInSelection "Open All URLs in Selection">
 +<!ENTITY gestureCmd.bookmarksSidebar "Show Bookmarks Sidebar">
 +<!ENTITY gestureCmd.historySidebar "Show History Sidebar">
 +<!ENTITY gestureCmd.backForwardHistory "Back / Forward History">
 +<!ENTITY gestureCmd.hybridSave "Save As...">
 +<!ENTITY gestureCmd.hybridBookmark "Bookmark...">
 +<!ENTITY gestureCmd.hybridViewSource "View Source">
 +<!ENTITY gestureCmd.hybridProperties "Properties">
- <!ENTITY gestureCmd.hybridSendURL "Send...">
 +<!ENTITY gestureCmd.hybridCopyURL "Copy Location">
 +<!ENTITY gestureCmd.toggleFindbar "Open / Close Find Bar">
 +<!ENTITY gestureCmd.restartApp "Restart Firefox">
 +<!ENTITY gestureCmd.options "Options">
 +<!-- leave this empty for Pale Moon 24 compatibility -->
 +<!ENTITY viewTabGroups.label "">
 +<!-- leave this empty for Firefox 28- compatibility -->
 +<!ENTITY appmenu.tooltip "">
diff --cc chrome/locale/ja/firegestures/mapping.dtd
index 7e30ffa,dc2b28d..bcf5508
--- a/chrome/locale/ja/firegestures/mapping.dtd
+++ b/chrome/locale/ja/firegestures/mapping.dtd
@@@ -1,54 -1,53 +1,53 @@@
 -<!ENTITY gestureCategory.navigation "ナビゲーション">
 -<!ENTITY gestureCategory.window "ウィンドウ">
 -<!ENTITY gestureCategory.tab "タブ">
 -<!ENTITY gestureCategory.page "ページ">
 -<!ENTITY gestureCategory.frame "フレーム">
 -<!ENTITY gestureCategory.link "リンク">
 -<!ENTITY gestureCategory.image "画像">
 -<!ENTITY gestureCategory.selection "選択範囲">
 -<!ENTITY gestureCategory.tools "ツール">
 -<!ENTITY gestureCategory.popup "ポップアップ型">
 -<!ENTITY gestureCategory.hybrid "ハイブリッド型">
 -<!ENTITY gestureCategory.script "ユーザースクリプト">
 -<!ENTITY gestureType.popup "ポップアップ">
 -<!ENTITY gestureType.hybrid "ハイブリッド">
 -<!ENTITY gestureCmd.skipCache "キャッシュを無視">
 -<!ENTITY gestureCmd.goUpperLevel "上の階層へ移動">
 -<!ENTITY gestureCmd.incrementURL "URL 中の数値を増加">
 -<!ENTITY gestureCmd.decrementURL "URL 中の数値を減少">
 -<!ENTITY gestureCmd.undoCloseWindow "閉じたウィンドウを元に戻す">
 -<!ENTITY gestureCmd.minimizeWindow "ウィンドウを最小化">
 -<!ENTITY gestureCmd.maximizeWindow "ウィンドウを最大化 / 元のサイズに戻す">
 -<!ENTITY gestureCmd.previousTab "前のタブへ">
 -<!ENTITY gestureCmd.nextTab "次のタブへ">
 -<!ENTITY gestureCmd.duplicateTab "タブを複製">
 -<!ENTITY gestureCmd.closeLeftTabs "左のタブをすべて閉じる">
 -<!ENTITY gestureCmd.closeRightTabs "右のタブをすべて閉じる">
 -<!ENTITY gestureCmd.scrollTop "先頭へスクロール">
 -<!ENTITY gestureCmd.scrollBottom "末尾へスクロール">
 -<!ENTITY gestureCmd.scrollPageUp "ページアップ">
 -<!ENTITY gestureCmd.scrollPageDown "ページダウン">
 -<!ENTITY gestureCmd.backgroundTab "背面のタブ">
 -<!ENTITY gestureCmd.foregroundTab "前面のタブ">
 -<!ENTITY gestureCmd.saveImageNow "画像を今すぐ保存">
 -<!ENTITY gestureCmd.searchForSelection "選択範囲を Web 検索">
 -<!ENTITY gestureCmd.searchForSelectionWith "検索エンジンを選択して Web 検索">
 -<!ENTITY gestureCmd.allScripts "すべてのユーザースクリプト">
 -<!ENTITY gestureCmd.openLinksInSelection "選択範囲内のリンクをすべて開く">
 -<!ENTITY gestureCmd.openURLsInSelection "選択範囲内の URL をすべて開く">
 -<!ENTITY gestureCmd.bookmarksSidebar "ブックマークサイドバーを表示">
 -<!ENTITY gestureCmd.historySidebar "履歴サイドバーを表示">
 -<!ENTITY gestureCmd.backForwardHistory "戻る / 進むの履歴">
 -<!ENTITY gestureCmd.hybridSave "名前を付けて保存">
 -<!ENTITY gestureCmd.hybridBookmark "ブックマーク">
 -<!ENTITY gestureCmd.hybridViewSource "ソースを表示">
 -<!ENTITY gestureCmd.hybridProperties "プロパティ">
 -<!ENTITY gestureCmd.hybridCopyURL "URL をコピー">
 -<!ENTITY gestureCmd.toggleFindbar "検索バーを開く / 閉じる">
 -<!ENTITY gestureCmd.restartApp "Firefox を再起動">
 -<!ENTITY gestureCmd.options "設定">
 -<!-- leave this empty for Pale Moon 24 compatibility -->
 -<!ENTITY viewTabGroups.label "">
 -<!-- leave this empty for Firefox 28- compatibility -->
 -<!ENTITY appmenu.tooltip "">
 +<!ENTITY gestureCategory.navigation "ナビゲーション">
 +<!ENTITY gestureCategory.window "ウィンドウ">
 +<!ENTITY gestureCategory.tab "タブ">
 +<!ENTITY gestureCategory.page "ページ">
 +<!ENTITY gestureCategory.frame "フレーム">
 +<!ENTITY gestureCategory.link "リンク">
 +<!ENTITY gestureCategory.image "画像">
 +<!ENTITY gestureCategory.selection "選択範囲">
 +<!ENTITY gestureCategory.tools "ツール">
 +<!ENTITY gestureCategory.popup "ポップアップ型">
 +<!ENTITY gestureCategory.hybrid "ハイブリッド型">
 +<!ENTITY gestureCategory.script "ユーザースクリプト">
 +<!ENTITY gestureType.popup "ポップアップ">
 +<!ENTITY gestureType.hybrid "ハイブリッド">
 +<!ENTITY gestureCmd.skipCache "キャッシュを無視">
 +<!ENTITY gestureCmd.goUpperLevel "上の階層へ移動">
 +<!ENTITY gestureCmd.incrementURL "URL 中の数値を増加">
 +<!ENTITY gestureCmd.decrementURL "URL 中の数値を減少">
 +<!ENTITY gestureCmd.undoCloseWindow "閉じたウィンドウを元に戻す">
 +<!ENTITY gestureCmd.minimizeWindow "ウィンドウを最小化">
 +<!ENTITY gestureCmd.maximizeWindow "ウィンドウを最大化 / 元のサイズに戻す">
 +<!ENTITY gestureCmd.previousTab "前のタブへ">
 +<!ENTITY gestureCmd.nextTab "次のタブへ">
 +<!ENTITY gestureCmd.duplicateTab "タブを複製">
 +<!ENTITY gestureCmd.closeLeftTabs "左のタブをすべて閉じる">
 +<!ENTITY gestureCmd.closeRightTabs "右のタブをすべて閉じる">
 +<!ENTITY gestureCmd.scrollTop "先頭へスクロール">
 +<!ENTITY gestureCmd.scrollBottom "末尾へスクロール">
 +<!ENTITY gestureCmd.scrollPageUp "ページアップ">
 +<!ENTITY gestureCmd.scrollPageDown "ページダウン">
 +<!ENTITY gestureCmd.backgroundTab "背面のタブ">
 +<!ENTITY gestureCmd.foregroundTab "前面のタブ">
 +<!ENTITY gestureCmd.saveImageNow "画像を今すぐ保存">
 +<!ENTITY gestureCmd.searchForSelection "選択範囲を Web 検索">
 +<!ENTITY gestureCmd.searchForSelectionWith "検索エンジンを選択して Web 検索">
 +<!ENTITY gestureCmd.allScripts "すべてのユーザースクリプト">
 +<!ENTITY gestureCmd.openLinksInSelection "選択範囲内のリンクをすべて開く">
 +<!ENTITY gestureCmd.openURLsInSelection "選択範囲内の URL をすべて開く">
 +<!ENTITY gestureCmd.bookmarksSidebar "ブックマークサイドバーを表示">
 +<!ENTITY gestureCmd.historySidebar "履歴サイドバーを表示">
 +<!ENTITY gestureCmd.backForwardHistory "戻る / 進むの履歴">
 +<!ENTITY gestureCmd.hybridSave "名前を付けて保存">
 +<!ENTITY gestureCmd.hybridBookmark "ブックマーク">
 +<!ENTITY gestureCmd.hybridViewSource "ソースを表示">
 +<!ENTITY gestureCmd.hybridProperties "プロパティ">
- <!ENTITY gestureCmd.hybridSendURL "URL をメールで送信...">
 +<!ENTITY gestureCmd.hybridCopyURL "URL をコピー">
 +<!ENTITY gestureCmd.toggleFindbar "検索バーを開く / 閉じる">
 +<!ENTITY gestureCmd.restartApp "Firefox を再起動">
 +<!ENTITY gestureCmd.options "設定">
 +<!-- leave this empty for Pale Moon 24 compatibility -->
 +<!ENTITY viewTabGroups.label "">
 +<!-- leave this empty for Firefox 28- compatibility -->
 +<!ENTITY appmenu.tooltip "">
diff --cc components/xdGestureHandler.js
index 4963c79,f45aab2..12742b0
mode 100755,100644..100755
--- a/components/xdGestureHandler.js
+++ b/components/xdGestureHandler.js
@@@ -81,9 -108,13 +81,11 @@@ xdGestureHandler.prototype = 
  		}
  		this.sourceNode = null;
  		this._drawArea = null;
+ 		this._trailArea = null;
+ 		this._trailContext = null;
  		this._gestureObserver = null;
 -		// log("detach()");	// #debug
  	},
  
 -	// called from init, observe
  	_reloadPrefs: function FGH__reloadPrefs() {
  		var prefBranch = Cc["@mozilla.org/preferences-service;1"]
  		                 .getService(Ci.nsIPrefService)
@@@ -375,8 -483,10 +377,8 @@@
  		this._lastY = event.screenY;
  		this._directionChain = "";
  		this._shouldFireContext = false;
 -		// trail drawing
  		if (!this._swipeTimer && this._trailEnabled)
- 			this.createTrail(event);
+ 			this._createTrail();
 -		// [e10s] tell remote browser that mouse gesture has started
  		if (this._isRemote) {
  			this._gestureObserver.sendAsyncMessage("FireGestures:GestureStart", {
  				type: event.type, 
@@@ -399,12 -512,16 +401,12 @@@
  			direction = x < this._lastX ? "L" : "R";
  		else
  			direction = y < this._lastY ? "U" : "D";
 -		// trail drawing
  		if (this._trailEnabled)
- 			this.drawTrail(this._lastX, this._lastY, x, y);
+ 			this._drawTrail(this._lastX, this._lastY, x, y);
 -		// remember the current position
  		this._lastX = x;
  		this._lastY = y;
 -		// don't fire onDirectionChange while performing keypress gesture
  		if (this._state == STATE_KEYPRESS)
  			return;
 -		// compare to the last direction
  		var lastDirection = this._directionChain.charAt(this._directionChain.length - 1);
  		if (direction != lastDirection) {
  			this._directionChain += direction;
@@@ -419,8 -539,10 +421,8 @@@
  			this._lastExtraX = event.screenX;
  			this._lastExtraY = event.screenY;
  		}
 -		// clear trail drawing when invoking extra gesture except keypress gesture
  		if (this._state != STATE_KEYPRESS && this._trailEnabled)
- 			this.eraseTrail();
+ 			this._eraseTrail();
 -		// Fixed bug: FireGestures.sourceNode is null when doing rocker-right
  		if (!this.sourceNode)
  			this.sourceNode = event.target;
  		this._gestureObserver.onExtraGesture(event, aGestureType);
@@@ -439,10 -564,14 +441,10 @@@
  		this._isMouseDownM = false;
  		this._isMouseDownR = false;
  		this._clearTimeout();
 -		// clear trail drawing
  		if (!this._swipeTimer && this._trailEnabled)
- 			this.eraseTrail();
+ 			this._eraseTrail();
 -		// don't call onMouseGesture after events sequence: mousedown > minimal mousemove > mouseup
  		if (this._directionChain) {
  			this._gestureObserver.onMouseGesture(event, this._directionChain);
 -			// suppress immediate context menu after finishing mouse gesture with right-button
 -			// don't suppress mouse gesture with left or middle button
  			this._suppressContext = true;
  			this._shouldFireContext = false;
  		}
@@@ -506,113 -645,79 +508,75 @@@
  	},
  
  
 -	/* ::::: MOUSE TRAIL ::::: */
  
- 	_trailDot: null,
  	_trailArea: null,
- 	_trailLastDot: null,
+ 	_trailContext: null,
  	_trailOffsetX: 0,
  	_trailOffsetY: 0,
- 	_trailZoom: 1,
  
- 	createTrail: function FGH_createTrail(event) {
- 		if (this._isRemote) {
- 			this._gestureObserver.sendAsyncMessage("FireGestures:CreateTrail", {
- 				size : this._trailSize,
- 				color: this._trailColor,
- 				zoom : this._drawArea.fullZoom || 1,
- 			});
 -	// called from _startGesture
+ 	_createTrail: function FGH__createTrail() {
+ 		var doc = this._drawArea.ownerDocument;
+ 		var box = doc.documentElement.boxObject;
+ 		if (this._trailArea) {
+ 			this._trailArea.style.display = "-moz-box";
+ 			this._trailOffsetX = box.screenX;
+ 			this._trailOffsetY = box.screenY;
+ 			var canvas = this._trailArea.firstChild;
+ 			canvas.setAttribute("width",  box.width);
+ 			canvas.setAttribute("height", box.height);
  			return;
  		}
- 		var win = this.sourceNode.ownerDocument.defaultView;
- 		if (win.top.document instanceof Ci.nsIDOMHTMLDocument)
- 			win = win.top;
- 		else if (win.document instanceof Ci.nsIDOMHTMLDocument === false)
- 			return;
- 		var doc = win.document;
- 		this._trailZoom = this._drawArea.fullZoom || 1;
- 		this._trailOffsetX = (win.mozInnerScreenX - win.scrollX) * this._trailZoom;
- 		this._trailOffsetY = (win.mozInnerScreenY - win.scrollY) * this._trailZoom;
- 		this._trailArea = doc.createElementNS(HTML_NS, "xdTrailArea");
- 		(doc.documentElement || doc).appendChild(this._trailArea);
- 		this._trailDot = doc.createElementNS(HTML_NS, "xdTrailDot");
- 		this._trailDot.style.width = this._trailSize + "px";
- 		this._trailDot.style.height = this._trailSize + "px";
- 		this._trailDot.style.background = this._trailColor;
- 		this._trailDot.style.border = "0px";
- 		this._trailDot.style.position = "absolute";
- 		this._trailDot.style.zIndex = 2147483647;
+ 		var css = "-moz-user-focus: none !important;"
+ 		        + "-moz-user-select: none !important;"
+ 		        + "display: -moz-box !important;"
+ 		        + "box-sizing: border-box !important;"
+ 		        + "pointer-events: none !important;"
+ 		        + "margin: 0 !important;"
+ 		        + "padding: 0 !important;"
+ 		        + "width: 100% !important;"
+ 		        + "height: 100% !important;"
+ 		        + "border: none !important;"
+ 		        + "box-shadow: none !important;"
+ 		        + "overflow: hidden !important;"
+ 		        + "background: none !important;"
+ 		        + "opacity: 0.6 !important;"
+ 		        + "position: fixed !important;"
+ 		        + "top:  " + box.y + "px !important;"
+ 		        + "left: " + box.x + "px !important;"
+ 		        + "z-index: 2147483647 !important;";
+ 		this._trailArea = doc.createElement("hbox");
+ 		this._trailArea.id = "FireGesturesTrail";
+ 		this._trailArea.style.cssText = css;
+ 		this._trailOffsetX = box.screenX;
+ 		this._trailOffsetY = box.screenY;
+ 		var canvas = doc.createElementNS(HTML_NS, "canvas");
+ 		canvas.setAttribute("width",  box.width);
+ 		canvas.setAttribute("height", box.height);
+ 		this._trailArea.appendChild(canvas);
+ 		doc.documentElement.appendChild(this._trailArea);
+ 		this._trailContext = canvas.getContext("2d");
  	},
  
- 	drawTrail: function FGH_drawTrail(x1, y1, x2, y2) {
- 		if (this._isRemote) {
- 			this._gestureObserver.sendAsyncMessage("FireGestures:DrawTrail", {
- 				x1: x1, y1: y1, x2: x2, y2: y2, 
- 			});
- 			return;
- 		}
 -	// called from _progressGesture
+ 	_drawTrail: function FGH__drawTrail(x1, y1, x2, y2) {
  		if (!this._trailArea)
  			return;
- 		var xMove = x2 - x1;
- 		var yMove = y2 - y1;
- 		var xDecrement = xMove < 0 ? 1 : -1;
- 		var yDecrement = yMove < 0 ? 1 : -1;
- 		x2 -= this._trailOffsetX;
- 		y2 -= this._trailOffsetY;
- 		if (Math.abs(xMove) >= Math.abs(yMove))
- 			for (var i = xMove; i != 0; i += xDecrement)
- 				this._strokeDot(x2 - i, y2 - Math.round(yMove * i / xMove));
- 		else
- 			for (var i = yMove; i != 0; i += yDecrement)
- 				this._strokeDot(x2 - Math.round(xMove * i / yMove), y2 - i);
+ 		var context = this._trailContext;
+ 		context.strokeStyle = this._trailColor;
+ 		context.lineJoin = "round";
+ 		context.lineWidth = this._trailSize;
+ 		context.beginPath();
+ 		context.moveTo(x1 - this._trailOffsetX, y1 - this._trailOffsetY);
+ 		context.lineTo(x2 - this._trailOffsetX, y2 - this._trailOffsetY);
+ 		context.closePath();
+ 		context.stroke();
  	},
  
- 	eraseTrail: function FGH_eraseTrail() {
- 		if (this._isRemote) {
- 			this._gestureObserver.sendAsyncMessage("FireGestures:EraseTrail", {});
- 			return;
- 		}
- 		if (this._trailArea && this._trailArea.parentNode) {
- 			while (this._trailArea.lastChild)
- 				this._trailArea.removeChild(this._trailArea.lastChild);
- 			this._trailArea.parentNode.removeChild(this._trailArea);
- 		}
- 		this._trailDot = null;
- 		this._trailArea = null;
- 		this._trailLastDot = null;
- 	},
- 
- 	_strokeDot: function FGH__strokeDot(x, y) {
- 		if (this._trailArea.y == y && this._trailArea.h == this._trailSize) {
- 			var newX = Math.min(this._trailArea.x, x);
- 			var newW = Math.max(this._trailArea.x + this._trailArea.w, x + this._trailSize) - newX;
- 			this._trailArea.x = newX;
- 			this._trailArea.w = newW;
- 			this._trailLastDot.style.left  = newX.toString() + "px";
- 			this._trailLastDot.style.width = newW.toString() + "px";
- 			return;
- 		}
- 		else if (this._trailArea.x == x && this._trailArea.w == this._trailSize) {
- 			var newY = Math.min(this._trailArea.y, y);
- 			var newH = Math.max(this._trailArea.y + this._trailArea.h, y + this._trailSize) - newY;
- 			this._trailArea.y = newY;
- 			this._trailArea.h = newH;
- 			this._trailLastDot.style.top    = newY.toString() + "px";
- 			this._trailLastDot.style.height = newH.toString() + "px";
 -	// called from _stopGesture, _invokeExtraGesture
+ 	_eraseTrail: function FGH__eraseTrail() {
+ 		if (!this._trailArea)
  			return;
- 		}
- 		if (this._trailZoom != 1) {
- 			x = Math.floor(x / this._trailZoom);
- 			y = Math.floor(y / this._trailZoom);
- 		}
- 		var dot = this._trailDot.cloneNode(true);
- 		dot.style.left = x + "px";
- 		dot.style.top = y + "px";
- 		this._trailArea.x = x;
- 		this._trailArea.y = y;
- 		this._trailArea.w = this._trailSize;
- 		this._trailArea.h = this._trailSize;
- 		this._trailArea.appendChild(dot);
- 		this._trailLastDot = dot;
+ 		var canvas = this._trailArea.firstChild;
+ 		this._trailContext.clearRect(0, 0, canvas.getAttribute("width"), canvas.getAttribute("height"));
+ 		this._trailArea.style.display = "none";
  	},
  
  };

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