[Pkg-mozext-commits] [firebug] 09/24: Resolve conflicts when porting Issue 5883: Error topWindow.exportFirebug is not a function while ...
David Prévot
taffit at moszumanska.debian.org
Mon Mar 31 22:46:31 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to tag firebug-1.10.4
in repository firebug.
commit f95f305741fcb067e1ec72355a5d127f0c1e0708
Author: Jan Odvarko <odvarko at gmail.com>
Date: Wed Sep 5 09:08:17 2012 +0200
Resolve conflicts when porting Issue 5883: Error topWindow.exportFirebug is not a function while ...
---
extension/content/firebug/firebug.js | 33 ++++++++++++++++++++++++---------
1 file changed, 24 insertions(+), 9 deletions(-)
diff --git a/extension/content/firebug/firebug.js b/extension/content/firebug/firebug.js
index 09c2ba8..1ca6381 100644
--- a/extension/content/firebug/firebug.js
+++ b/extension/content/firebug/firebug.js
@@ -861,11 +861,11 @@ window.Firebug =
// TODO reattach
// window is closing in detached mode
- if (Firebug.chrome.window.top)
+ var parent = this.getFirebugFrameParent();
+ if (parent)
{
- topWindow = Firebug.chrome.window.top;
- topWindow.exportFirebug();
- topWindow.close();
+ parent.exportFirebug();
+ parent.close();
}
Firebug.setPlacement("minimized");
@@ -906,9 +906,9 @@ window.Firebug =
//detached -> inbrowser
if (!forceOpen && Firebug.isDetached())
{
- var topWin = Firebug.chrome.window.top;
- topWin.exportFirebug();
- topWin.close();
+ var parent = this.getFirebugFrameParent();
+ parent.exportFirebug();
+ parent.close();
if (reopenInBrowser)
{
@@ -953,7 +953,6 @@ window.Firebug =
Firebug.StartButton.resetTooltip();
},
-
detachBar: function()
{
if (Firebug.isDetached()) // can be set true attachBrowser
@@ -964,8 +963,8 @@ window.Firebug =
if (Firebug.chrome.waitingForDetach)
return null;
- Firebug.chrome.waitingForDetach = true;
+ Firebug.chrome.waitingForDetach = true;
Firebug.chrome.toggleOpen(false); // don't show in browser.xul now
if (FBTrace.DBG_ACTIVATION)
@@ -996,6 +995,22 @@ window.Firebug =
},
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+ /**
+ * Returns parent of the firebugFrame.xul frame. The actual parent depends on whether
+ * Firebug is attached or detached.
+ *
+ * attached -> browser.xul
+ * detached -> firebug.xul
+ */
+ getFirebugFrameParent: function()
+ {
+ // We need firebug.xul in case of detached state. So, don't use 'top' since
+ // it references browser.xul
+ return Firebug.chrome.window.parent;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// deprecated
resetAllOptions: function(confirm)
--
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