[Pkg-mozext-commits] [firebug] 23/82: Cope with FireClosure being installed
David Prévot
taffit at moszumanska.debian.org
Mon Mar 31 22:45:37 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to tag fbtest-1.11.2
in repository firebug.
commit 92398206ff973470872b80fd786d38b0d776c0b3
Author: Simon Lindholm <simon.lindholm10 at gmail.com>
Date: Sat Dec 22 22:26:07 2012 +0100
Cope with FireClosure being installed
---
.../content/firebug/console/closureInspector.js | 4 ++++
extension/content/firebug/console/commandLine.js | 27 ++++++++++++----------
2 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/extension/content/firebug/console/closureInspector.js b/extension/content/firebug/console/closureInspector.js
index 94730ee..a4e177b 100644
--- a/extension/content/firebug/console/closureInspector.js
+++ b/extension/content/firebug/console/closureInspector.js
@@ -427,6 +427,10 @@ var ClosureInspector =
extendLanguageSyntax: function(expr, win, context)
{
+ // Temporary FireClosure compatibility.
+ if (Firebug.JSAutoCompleter.transformScopeExpr)
+ return expr;
+
var fname = "__fb_scopedVars";
var newExpr = Firebug.JSAutoCompleter.transformScopeOperator(expr, fname);
diff --git a/extension/content/firebug/console/commandLine.js b/extension/content/firebug/console/commandLine.js
index 3cef0a1..f355518 100644
--- a/extension/content/firebug/console/commandLine.js
+++ b/extension/content/firebug/console/commandLine.js
@@ -713,16 +713,27 @@ Firebug.CommandLine = Obj.extend(Firebug.Module,
showPanel: function(browser, panel)
{
- if (!Firebug.currentContext)
+ var context = Firebug.currentContext;
+ if (!context)
return;
+ // Warn that FireClosure is integrated and will conflict.
+ if (Firebug.JSAutoCompleter && Firebug.JSAutoCompleter.transformScopeExpr &&
+ !this.hasWarnedAboutFireClosure)
+ {
+ this.hasWarnedAboutFireClosure = true;
+ // Use English because this only reaches ~200 users anyway.
+ var msg = "FireClosure has been integrated into Firebug. To avoid conflicts, please uninstall it and restart your browser.";
+ Firebug.Console.logFormatted([msg], context, "warn");
+ }
+
var chrome = Firebug.chrome;
var panelState = Persist.getPersistedState(this, "console");
if (panelState.commandLineText)
{
var value = panelState.commandLineText;
var commandLine = this.getCommandLine(browser);
- Firebug.currentContext.commandLineText = value;
+ context.commandLineText = value;
commandLine.value = value;
@@ -743,10 +754,8 @@ Firebug.CommandLine = Obj.extend(Firebug.Module,
this.setAutoCompleter();
},
- // called by users of command line, currently:
- // 1) Console on focus command line,
- // 2) Watch onfocus, and
- // 3) debugger loadedContext if watches exist
+ // Attach the command line. Currently called by evaluate() et al. and
+ // watch onfocus (see chrome.js; probably unnecessary).
isReadyElsePreparing: function(context, win)
{
if (FBTrace.DBG_COMMANDLINE)
@@ -790,11 +799,6 @@ Firebug.CommandLine = Obj.extend(Firebug.Module,
onCommandLineKeyDown: function(event)
{
- // XXX: Temporary hack to make FireClosure work (until that gets a new
- // release out)
- if (!this.autoCompleter.shouldIncludeHint && Firebug.JSAutoCompleter.transformScopeExpr)
- this.setAutoCompleter();
-
var context = Firebug.currentContext;
this.autoCompleter.handleKeyDown(event, context);
@@ -936,7 +940,6 @@ Firebug.CommandLine = Obj.extend(Firebug.Module,
{
return Firebug.CommandEditor;
}
-
});
// ********************************************************************************************* //
--
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