[Pkg-mozext-commits] [tabmixplus] 29/56: Handle content click event for all browsers when window.gMultiProcessBrowser is true, the previous code was skip about: tabs
David Prévot
taffit at moszumanska.debian.org
Mon Jun 6 00:02:35 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit 3cc1d2e0320c3647b22796f5982f8632d55005eb
Author: onemen <tabmix.onemen at gmail.com>
Date: Thu May 12 20:55:56 2016 +0300
Handle content click event for all browsers when window.gMultiProcessBrowser is true, the previous code was skip about: tabs
---
chrome/content/content.js | 6 ++++--
modules/ContentClick.jsm | 9 +++++----
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/chrome/content/content.js b/chrome/content/content.js
index b7ba467..eccfe63 100644
--- a/chrome/content/content.js
+++ b/chrome/content/content.js
@@ -170,7 +170,7 @@ var TabmixContentHandler = {
TabmixClickEventHandler = {
init: function init(global) {
- if (PROCESS_TYPE_CONTENT) {
+ if (TabmixSvc.version(380)) {
global.addEventListener("click", this, true);
}
},
@@ -184,8 +184,10 @@ TabmixClickEventHandler = {
},
contentAreaClick: function(event) {
+ // tabmix_isMultiProcessBrowser is undefined for remote browser when
+ // window.gMultiProcessBrowser is true
if (!event.isTrusted || event.defaultPrevented || event.button == 2 ||
- event.tabmix_isRemote === false) {
+ event.tabmix_isMultiProcessBrowser === false) {
return;
}
diff --git a/modules/ContentClick.jsm b/modules/ContentClick.jsm
index 168e331..c78f63a 100644
--- a/modules/ContentClick.jsm
+++ b/modules/ContentClick.jsm
@@ -462,15 +462,16 @@ ContentClickInternal = {
* links that are not handled here go on to the page code and then to contentAreaClick
*/
_contentLinkClick: function(aEvent, aBrowser, aFocusedWindow) {
- aEvent.tabmix_isRemote = aBrowser.getAttribute("remote") == "true";
- if (aEvent.tabmix_isRemote)
+ let ownerDoc = aBrowser.ownerDocument;
+ let win = ownerDoc.defaultView;
+ aEvent.tabmix_isMultiProcessBrowser = win.gMultiProcessBrowser;
+ if (aEvent.tabmix_isMultiProcessBrowser) {
return "1";
+ }
if (typeof aEvent.tabmix_openLinkWithHistory == "boolean")
return "2";
- let ownerDoc = aBrowser.ownerDocument;
- let win = ownerDoc.defaultView;
let [href, linkNode] = win.hrefAndLinkNodeForClickEvent(aEvent);
if (!href) {
let node = LinkNodeUtils.getNodeWithOnClick(aEvent.target);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list