[Pkg-mozext-commits] [firebug] 25/56: Issue 7686 - better logic for detecting e10s
David Prévot
taffit at moszumanska.debian.org
Wed Nov 19 21:01:43 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository firebug.
commit 5f215f5c60b1a08a8f1194bcd529ce3f590f77c2
Author: Jan Odvarko <odvarko at gmail.com>
Date: Tue Oct 21 12:22:10 2014 +0200
Issue 7686 - better logic for detecting e10s
---
.../content/firebug/firefox/browserOverlay.js | 30 +++++++++++++++++++--
.../firebug/firefox/start-button/startButton.xml | 31 ++++++++++------------
2 files changed, 42 insertions(+), 19 deletions(-)
diff --git a/extension/content/firebug/firefox/browserOverlay.js b/extension/content/firebug/firefox/browserOverlay.js
index b4bb5bd..e56cf62 100644
--- a/extension/content/firebug/firefox/browserOverlay.js
+++ b/extension/content/firebug/firefox/browserOverlay.js
@@ -89,6 +89,10 @@ BrowserOverlay.prototype =
this.internationalize();
this.allPagesActivation();
+
+ if (this.isMultiprocessEnabled()) {
+ this.initializeMultiprocessUI();
+ }
},
internationalize: function()
@@ -132,8 +136,7 @@ BrowserOverlay.prototype =
startFirebug: function(callback)
{
// Special case for e10s enabled browser.
- var content = $(this.doc, "content");
- if (content.mCurrentBrowser.isRemoteBrowser) {
+ if (this.isMultiprocessEnabled()) {
this.showMultiprocessNotification();
return;
}
@@ -596,6 +599,29 @@ BrowserOverlay.prototype =
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Remote Browser (aka e10s enabled browser)
+ isMultiprocessEnabled: function()
+ {
+ var content = $(this.doc, "content");
+ if (content.mCurrentBrowser.isRemoteBrowser)
+ return true;
+
+ if (this.win.gBrowser.isRemoteBrowser)
+ return true;
+
+ if (Options.getPref("browser.tabs", "remote.autostart"))
+ return true;
+
+ return false;
+ },
+
+ initializeMultiprocessUI: function()
+ {
+ this.win.setTimeout(() => {
+ var startButton = this.doc.getElementById("firebug-button");
+ startButton.mutliprocessEnabled();
+ });
+ },
+
showMultiprocessNotification: function()
{
var popupSet = $(this.doc, "mainPopupSet");
diff --git a/extension/content/firebug/firefox/start-button/startButton.xml b/extension/content/firebug/firefox/start-button/startButton.xml
index 58ad66d..c0719d9 100644
--- a/extension/content/firebug/firefox/start-button/startButton.xml
+++ b/extension/content/firebug/firefox/start-button/startButton.xml
@@ -19,28 +19,25 @@
</content>
<implementation>
- <constructor><![CDATA[
- var content = document.getElementById("content");
- if (content.mCurrentBrowser.isRemoteBrowser)
- {
- this.removeAttribute("contextmenu");
- this.setAttribute("type", "button");
-
- this.button.classList.remove("toolbarbutton-menubutton-button");
- this.button.classList.add("toolbarbutton-1");
- this.button.classList.add("chromeclass-toolbar-additional");
-
- var dropMarker = document.getAnonymousElementByAttribute(this,
- "anonid", "dropmarker");
- dropMarker.setAttribute("collapsed", "true");
- }
- ]]></constructor>
-
<property name="button">
<xbl:getter><![CDATA[
return document.getAnonymousElementByAttribute(this, "anonid", "button");
]]></xbl:getter>
</property>
+
+ <method name="mutliprocessEnabled">
+ <body><![CDATA[
+ this.removeAttribute("contextmenu");
+ this.setAttribute("type", "button");
+
+ this.button.classList.remove("toolbarbutton-menubutton-button");
+ this.button.classList.add("toolbarbutton-1");
+ this.button.classList.add("chromeclass-toolbar-additional");
+ var dropMarker = document.getAnonymousElementByAttribute(this,
+ "anonid", "dropmarker");
+ dropMarker.setAttribute("collapsed", "true");
+ ]]></body>
+ </method>
</implementation>
</binding>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git
More information about the Pkg-mozext-commits
mailing list