[Pkg-mozext-commits] [firegestures] 01/08: [e10s] add support to multi-process tabs (part1)
David Prévot
taffit at moszumanska.debian.org
Sat Dec 13 21:16:39 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository firegestures.
commit 722ee8b279925521364320a69d0c7a53fbd582a2
Author: Gomita <gomita at xuldev.org>
Date: Sat Dec 13 13:28:03 2014 +0900
[e10s] add support to multi-process tabs (part1)
---
FireGestures.idl | 5 -----
chrome/content/firegestures/browser.js | 10 +++-------
chrome/content/firegestures/edit.js | 4 ----
chrome/content/firegestures/viewSource.js | 4 ----
components/FireGestures.xpt | Bin 1414 -> 1395 bytes
components/xdGestureHandler.js | 17 ++++++-----------
6 files changed, 9 insertions(+), 31 deletions(-)
diff --git a/FireGestures.idl b/FireGestures.idl
index a833727..22c5e5b 100644
--- a/FireGestures.idl
+++ b/FireGestures.idl
@@ -110,11 +110,6 @@ interface xdIGestureObserver : nsISupports
{
/**
- * Get the full zoom ratio.
- */
- readonly attribute float fullZoom;
-
- /**
* Returns false to suppress starting gesture for some reason otherwise true.
*/
boolean canStartGesture(in nsIDOMEvent event);
diff --git a/chrome/content/firegestures/browser.js b/chrome/content/firegestures/browser.js
index 1ada106..8f1d5b3 100644
--- a/chrome/content/firegestures/browser.js
+++ b/chrome/content/firegestures/browser.js
@@ -28,7 +28,7 @@ var FireGestures = {
}
var gestureSvc = Cc["@xuldev.org/firegestures/service;1"].getService(Ci.xdIGestureService);
this._gestureHandler = gestureSvc.createHandler();
- this._gestureHandler.attach(gBrowser.mPanelContainer, this);
+ this._gestureHandler.attach(gBrowser, this);
this._gestureMapping = gestureSvc.getMappingForBrowser();
this._getLocaleString = gestureSvc.getLocaleString;
this._statusTextField = document.getElementById("statusbar-display");
@@ -54,10 +54,6 @@ var FireGestures = {
/* ::::: xdIGestureObserver ::::: */
- get fullZoom() {
- return gBrowser.mCurrentBrowser.markupDocumentViewer.fullZoom;
- },
-
canStartGesture: function(event) {
if (gInPrintPreviewMode) {
dump("*** suppress starting gesture in print preview mode\n"); // #debug
@@ -239,7 +235,7 @@ var FireGestures = {
document.getElementById(aCommand.replace("text", "full")).doCommand();
else
// if full zoom is enabled, text zoom cannot save site-specific pref.
- gBrowser.markupDocumentViewer.textZoom += (aCommand == "cmd_textZoomEnlarge") ? 0.2 : -0.2;
+ gBrowser.textZoom += (aCommand == "cmd_textZoomEnlarge") ? 0.2 : -0.2;
break;
case "cmd_fullZoomEnlarge":
case "cmd_fullZoomReduce":
@@ -248,7 +244,7 @@ var FireGestures = {
document.getElementById(aCommand).doCommand();
else
// if full zoom is disabled, full zoom cannot save site-specific pref.
- gBrowser.markupDocumentViewer.fullZoom += (aCommand == "cmd_fullZoomEnlarge") ? 0.2 : -0.2;
+ gBrowser.fullZoom += (aCommand == "cmd_fullZoomEnlarge") ? 0.2 : -0.2;
break;
case "cmd_textZoomReset":
if ("FullZoom" in window)
diff --git a/chrome/content/firegestures/edit.js b/chrome/content/firegestures/edit.js
index d3c1107..97a6303 100644
--- a/chrome/content/firegestures/edit.js
+++ b/chrome/content/firegestures/edit.js
@@ -86,10 +86,6 @@ var EditUI = {
/* ::::: xdIGestureObserver ::::: */
- get fullZoom() {
- return 1;
- },
-
canStartGesture: function(event) {
return true;
},
diff --git a/chrome/content/firegestures/viewSource.js b/chrome/content/firegestures/viewSource.js
index 7f35146..d3df1c4 100644
--- a/chrome/content/firegestures/viewSource.js
+++ b/chrome/content/firegestures/viewSource.js
@@ -32,10 +32,6 @@ var FireGesturesViewSource = {
/* ::::: xdIGestureObserver ::::: */
- get fullZoom() {
- return gBrowser.markupDocumentViewer.fullZoom;
- },
-
canStartGesture: function(event) {
return true;
},
diff --git a/components/FireGestures.xpt b/components/FireGestures.xpt
index 78a10d9..4341b48 100644
Binary files a/components/FireGestures.xpt and b/components/FireGestures.xpt differ
diff --git a/components/xdGestureHandler.js b/components/xdGestureHandler.js
index 31ab5a6..255ee16 100644
--- a/components/xdGestureHandler.js
+++ b/components/xdGestureHandler.js
@@ -152,11 +152,10 @@ xdGestureHandler.prototype = {
if (this._rockerGestureEnabled)
this._drawArea.addEventListener("click", this, true);
// prefs for tab wheel gesture
- var tabbrowser = this._drawArea.ownerDocument.getBindingParent(this._drawArea);
- if (tabbrowser && tabbrowser.localName == "tabbrowser") {
- tabbrowser.mStrip.removeEventListener("DOMMouseScroll", this._wheelOnTabBar, true);
+ if (this._drawArea.localName == "tabbrowser") {
+ this._drawArea.mStrip.removeEventListener("DOMMouseScroll", this._wheelOnTabBar, true);
if (getPref("tabwheelgesture"))
- tabbrowser.mStrip.addEventListener("DOMMouseScroll", this._wheelOnTabBar, true);
+ this._drawArea.mStrip.addEventListener("DOMMouseScroll", this._wheelOnTabBar, true);
}
// if trigger button is middle, disable loading the clipboard URL with middle click.
if (this._triggerButton == 1) {
@@ -650,21 +649,17 @@ xdGestureHandler.prototype = {
// called from _startGesture
createTrail: function FGH_createTrail(event) {
- // [Firefox22] cannot access |event.view.top| directly
- var win = event.view;
+ 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;
- var insertionNode = doc.documentElement ? doc.documentElement : doc;
- var win = doc.defaultView;
- this._trailZoom = this._gestureObserver.fullZoom;
- if (this._trailZoom != 1) log("fullZoom: " + this._trailZoom); // #debug
+ 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");
- insertionNode.appendChild(this._trailArea);
+ (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";
--
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