Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge remote-tracking branch 'upstream/master' into issue_5535

  • Loading branch information...
commit 29aafda0b297d7cecb1288871bd222848ea9756c 2 parents d7341ae + c45a984
@fflorent authored
Showing with 6,310 additions and 3,176 deletions.
  1. +1 −1  extension/content/firebug/branch.properties
  2. +7 −4 extension/content/firebug/chrome/chrome.js
  3. +10 −1 extension/content/firebug/chrome/firefox.js
  4. +51 −3 extension/content/firebug/chrome/reps.js
  5. +9 −9 extension/content/firebug/chrome/shortcuts.js
  6. +17 −2 extension/content/firebug/console/commandLine.js
  7. +48 −27 extension/content/firebug/console/commandLineExposed.js
  8. +162 −0 extension/content/firebug/console/commandLineHelp.js
  9. +2 −2 extension/content/firebug/console/commandLinePopup.js
  10. +2 −2 extension/content/firebug/console/console.js
  11. +1 −1  extension/content/firebug/console/consolePanel.js
  12. +2 −2 extension/content/firebug/console/memoryProfiler.js
  13. +5 −5 extension/content/firebug/console/profiler.js
  14. +2 −2 extension/content/firebug/cookies/cookiePanel.js
  15. +20 −20 extension/content/firebug/cookies/cookiePanel.xul
  16. +20 −6 extension/content/firebug/css/cssPanel.js
  17. +1 −1  extension/content/firebug/dom/domPanel.js
  18. +16 −3 extension/content/firebug/editor/editor.js
  19. +3 −4 extension/content/firebug/editor/editorSelector.js
  20. +1 −0  extension/content/firebug/firebug.js
  21. +31 −26 extension/content/firebug/firebugOverlay.xul
  22. +3 −3 extension/content/firebug/firefox/browserOverlay.css
  23. +159 −126 extension/content/firebug/firefox/browserOverlay.js
  24. +0 −20 extension/content/firebug/firefox/external-editors/editorsOverlay.xul
  25. +1 −1  extension/content/firebug/firefox/external-editors/externalEditors.js
  26. +4 −4 extension/content/firebug/firefox/firebugFrame.xul
  27. +0 −61 extension/content/firebug/firefox/firebugMenu.js
  28. +88 −90 extension/content/firebug/firefox/firebugMenuOverlay.xul
  29. +2 −2 extension/content/firebug/html/htmlPanel.js
  30. +4 −4 extension/content/firebug/html/inspector.js
  31. +8 −8 extension/content/firebug/js/breakpoint.js
  32. +10 −2 extension/content/firebug/js/debugger.js
  33. +12 −12 extension/content/firebug/js/scriptPanel.js
  34. +2 −2 extension/content/firebug/js/sourceFile.js
  35. +9 −3 extension/content/firebug/js/watchPanel.js
  36. +1 −1  extension/content/firebug/lib/options.js
  37. +80 −89 extension/content/firebug/lib/string.js
  38. +0 −1  extension/content/firebug/moduleConfig.js
  39. +1 −1  extension/content/firebug/net/netMonitor.js
  40. +32 −1 extension/content/firebug/net/netPanel.js
  41. +6 −1 extension/content/firebug/net/netReps.js
  42. +1 −1  extension/defaults/preferences/firebug.js
  43. +1 −1  extension/install.rdf
  44. +267 −0 extension/locale/el/cookies.properties
  45. +6 −6 extension/locale/el/firebug-amo.properties
  46. +3 −3 extension/locale/el/firebug-tracing.properties
  47. +735 −346 extension/locale/el/firebug.properties
  48. +41 −9 extension/locale/en-US/firebug.properties
  49. +65 −198 extension/locale/nl/cookies.properties
  50. +4 −4 extension/locale/nl/firebug-amo.properties
  51. +1 −1  extension/locale/nl/firebug-tracing.properties
  52. +533 −144 extension/locale/nl/firebug.properties
  53. BIN  extension/skin/classic/bfcache-bk.png
  54. +57 −6 extension/skin/classic/console.css
  55. +3 −3 extension/skin/classic/firebug.css
  56. +4 −2 extension/skin/classic/net.css
  57. +2 −2 tests/FBTest/content/FBTestFirebug.js
  58. +1 −1  tests/FBTest/content/fbtest.properties
  59. +42 −43 tests/FBTest/content/overlayFirebug.js
  60. +0 −16 tests/FBTest/content/overlayFirebug.xul
  61. +23 −0 tests/content/commandLine/help.html
  62. +18 −0 tests/content/commandLine/help.js
  63. +41 −0 tests/content/console/3663/issue3663.html
  64. +21 −0 tests/content/console/3663/issue3663.js
  65. +5 −5 tests/content/console/3980/issue3980.js
  66. +1 −1  tests/content/console/api/profile.html
  67. +1 −1  tests/content/console/api/profile.js
  68. +2 −0  tests/content/firebug.html
  69. +1 −2  tests/content/firebug/5349/issue5349.js
  70. +16 −5 tests/content/firebug/changeUILocation.js
  71. +5 −5 tests/content/firebug/options/textSize.js
  72. +1 −1  tests/content/net/4689/issue4689.js
  73. +74 −0 tests/content/net/5592/issue5592.html
  74. +7 −0 tests/content/net/5592/issue5592.php
  75. +1 −1  trace/FBTrace/ant.properties
  76. +36 −37 trace/FBTrace/chrome/content/traceFirebugOverlay.js
  77. +0 −17 trace/FBTrace/chrome/content/traceFirebugOverlay.xul
  78. +1 −1  trace/FBTrace/chrome/firebug/content/branch.properties
  79. +10 −2 trace/FBTrace/chrome/firebug/content/chrome/activation.js
  80. +27 −5 trace/FBTrace/chrome/firebug/content/chrome/chrome.js
  81. +10 −1 trace/FBTrace/chrome/firebug/content/chrome/firefox.js
  82. +3 −2 trace/FBTrace/chrome/firebug/content/chrome/knownIssues.js
  83. +1 −1  trace/FBTrace/chrome/firebug/content/chrome/menu.js
  84. +1 −0  trace/FBTrace/chrome/firebug/content/chrome/panelActivation.js
  85. +111 −54 trace/FBTrace/chrome/firebug/content/chrome/reps.js
  86. +9 −9 trace/FBTrace/chrome/firebug/content/chrome/shortcuts.js
  87. +37 −9 trace/FBTrace/chrome/firebug/content/chrome/tabWatcher.js
  88. +73 −24 trace/FBTrace/chrome/firebug/content/console/autoCompleter.js
  89. +23 −6 trace/FBTrace/chrome/firebug/content/console/commandLine.js
  90. +48 −27 trace/FBTrace/chrome/firebug/content/console/commandLineExposed.js
  91. +162 −0 trace/FBTrace/chrome/firebug/content/console/commandLineHelp.js
  92. +2 −2 trace/FBTrace/chrome/firebug/content/console/commandLinePopup.js
  93. +3 −3 trace/FBTrace/chrome/firebug/content/console/console.js
  94. +5 −4 trace/FBTrace/chrome/firebug/content/console/consoleExposed.js
  95. +21 −8 trace/FBTrace/chrome/firebug/content/console/consolePanel.js
  96. +16 −37 trace/FBTrace/chrome/firebug/content/console/errors.js
  97. +2 −2 trace/FBTrace/chrome/firebug/content/console/memoryProfiler.js
  98. +5 −5 trace/FBTrace/chrome/firebug/content/console/profiler.js
  99. +35 −54 trace/FBTrace/chrome/firebug/content/cookies/breakpoints.js
  100. +1 −2  trace/FBTrace/chrome/firebug/content/cookies/cookie.js
  101. +82 −84 trace/FBTrace/chrome/firebug/content/cookies/cookieModule.js
  102. +44 −12 trace/FBTrace/chrome/firebug/content/cookies/cookieObserver.js
  103. +42 −36 trace/FBTrace/chrome/firebug/content/cookies/cookiePanel.js
  104. +59 −57 trace/FBTrace/chrome/firebug/content/cookies/cookiePanel.xul
  105. +11 −11 trace/FBTrace/chrome/firebug/content/cookies/cookiePermissions.js
  106. +93 −128 trace/FBTrace/chrome/firebug/content/cookies/cookieReps.js
  107. +5 −4 trace/FBTrace/chrome/firebug/content/cookies/cookieUtils.js
  108. +16 −6 trace/FBTrace/chrome/firebug/content/cookies/editCookie.js
  109. +13 −10 trace/FBTrace/chrome/firebug/content/cookies/editCookie.xul
  110. +4 −1 trace/FBTrace/chrome/firebug/content/cookies/headerResizer.js
  111. +2 −1  trace/FBTrace/chrome/firebug/content/cookies/httpObserver.js
  112. +85 −0 trace/FBTrace/chrome/firebug/content/cookies/legacy.js
  113. +23 −15 trace/FBTrace/chrome/firebug/content/cookies/menuUtils.js
  114. +18 −11 trace/FBTrace/chrome/firebug/content/css/computedPanel.js
  115. +30 −16 trace/FBTrace/chrome/firebug/content/css/cssModule.js
  116. +244 −68 trace/FBTrace/chrome/firebug/content/css/cssPanel.js
  117. +2 −1  trace/FBTrace/chrome/firebug/content/css/cssReps.js
  118. +36 −30 trace/FBTrace/chrome/firebug/content/css/stylePanel.js
  119. +23 −12 trace/FBTrace/chrome/firebug/content/dom/domBreakpointGroup.js
  120. +25 −14 trace/FBTrace/chrome/firebug/content/dom/domPanel.js
  121. +49 −5 trace/FBTrace/chrome/firebug/content/editor/editor.js
  122. +3 −4 trace/FBTrace/chrome/firebug/content/editor/editorSelector.js
  123. +13 −1 trace/FBTrace/chrome/firebug/content/firebug.css
  124. +137 −49 trace/FBTrace/chrome/firebug/content/firebug.js
  125. +32 −27 trace/FBTrace/chrome/firebug/content/firebugOverlay.xul
  126. +4 −1 trace/FBTrace/chrome/firebug/content/firefox/bindings.xml
  127. +3 −3 trace/FBTrace/chrome/firebug/content/firefox/browserOverlay.css
  128. +201 −148 trace/FBTrace/chrome/firebug/content/firefox/browserOverlay.js
  129. +1 −1  trace/FBTrace/chrome/firebug/content/firefox/external-editors/externalEditors.js
  130. +1 −0  trace/FBTrace/chrome/firebug/content/firefox/firebug.xul
  131. +4 −4 trace/FBTrace/chrome/firebug/content/firefox/firebugFrame.xul
  132. +88 −90 trace/FBTrace/chrome/firebug/content/firefox/firebugMenuOverlay.xul
  133. +13 −19 trace/FBTrace/chrome/firebug/content/firefox/start-button/startButtonOverlay.js
  134. +119 −85 trace/FBTrace/chrome/firebug/content/html/htmlPanel.js
  135. +4 −4 trace/FBTrace/chrome/firebug/content/html/inspector.js
  136. +0 −10 trace/FBTrace/chrome/firebug/content/html/layout.js
  137. +78 −12 trace/FBTrace/chrome/firebug/content/js/breakpoint.js
  138. +92 −37 trace/FBTrace/chrome/firebug/content/js/debugger.js
  139. +18 −14 trace/FBTrace/chrome/firebug/content/js/scriptPanel.js
  140. +1 −1  trace/FBTrace/chrome/firebug/content/js/sourceBox.js
  141. +8 −4 trace/FBTrace/chrome/firebug/content/js/sourceFile.js
  142. +7 −7 trace/FBTrace/chrome/firebug/content/js/stackFrame.js
  143. +9 −3 trace/FBTrace/chrome/firebug/content/js/watchPanel.js
  144. +532 −249 trace/FBTrace/chrome/firebug/content/lib/css.js
  145. +8 −8 trace/FBTrace/chrome/firebug/content/lib/dom.js
  146. +8 −4 trace/FBTrace/chrome/firebug/content/lib/options.js
  147. +3 −11 trace/FBTrace/chrome/firebug/content/lib/xml.js
  148. +1 −2  trace/FBTrace/chrome/firebug/content/moduleConfig.js
  149. +23 −13 trace/FBTrace/chrome/firebug/content/net/netDebugger.js
  150. +1 −1  trace/FBTrace/chrome/firebug/content/net/netMonitor.js
  151. +5 −4 trace/FBTrace/chrome/firebug/content/net/netPanel.js
  152. +24 −3 trace/FBTrace/chrome/firebug/content/net/netReps.js
  153. +47 −32 trace/FBTrace/chrome/firebug/modules/firebug-service.js
  154. +136 −0 trace/FBTrace/chrome/firebug/modules/gcli.js
  155. +8 −1 trace/FBTrace/chrome/firebug/modules/locale.js
  156. +3 −0  trace/FBTrace/chrome/firebug/modules/mini-require.js
  157. +2 −1  trace/FBTrace/chrome/firebug/modules/prefLoader.js
  158. +84 −3 trace/FBTrace/chrome/firebug/skin/classic/breakpoint.css
  159. +59 −7 trace/FBTrace/chrome/firebug/skin/classic/console.css
  160. +122 −0 trace/FBTrace/chrome/firebug/skin/classic/cookies/cookie.svg
  161. +31 −30 trace/FBTrace/chrome/firebug/skin/classic/cookies/cookies.css
  162. +6 −0 trace/FBTrace/chrome/firebug/skin/classic/cookies/trace.css
  163. +0 −86 trace/FBTrace/chrome/firebug/skin/classic/debugger.css
  164. +3 −3 trace/FBTrace/chrome/firebug/skin/classic/firebug.css
  165. +4 −0 trace/FBTrace/chrome/firebug/skin/classic/net.css
View
2  extension/content/firebug/branch.properties
@@ -1,5 +1,5 @@
# DO NOT MERGE INTO TRUNK
-RELEASE=.0b2
+RELEASE=.0b3
VERSION=1.10
TRUNK=
# To allow build.xml to drop the xpi directly into the svn working copy for getfirebug.com
View
11 extension/content/firebug/chrome/chrome.js
@@ -1056,6 +1056,9 @@ var FirebugChrome =
updateOrient: function(value)
{
var panelPane = FirebugChrome.$("fbPanelPane");
+ if (!panelPane)
+ return;
+
var newOrient = value ? "vertical" : "horizontal";
if (panelPane.orient == newOrient)
return;
@@ -1386,14 +1389,14 @@ var FirebugChrome =
onMenuShowing: function(popup)
{
- var detachFirebug = Dom.getElementsByAttribute(popup, "id", "menu_detachFirebug")[0];
+ var detachFirebug = Dom.getElementsByAttribute(popup, "id", "menu_firebug_detachFirebug")[0];
if (detachFirebug)
{
detachFirebug.setAttribute("label", (Firebug.isDetached() ?
Locale.$STR("firebug.AttachFirebug") : Locale.$STR("firebug.DetachFirebug")));
}
- var toggleFirebug = Dom.getElementsByAttribute(popup, "id", "menu_toggleFirebug")[0];
+ var toggleFirebug = Dom.getElementsByAttribute(popup, "id", "menu_firebug_toggleFirebug")[0];
if (toggleFirebug)
{
var fbContentBox = FirebugChrome.$("fbContentBox");
@@ -1469,7 +1472,7 @@ var FirebugChrome =
// selected in the panel.
var sel = target.ownerDocument.defaultView.getSelection();
if (!this.contextMenuObject &&
- !FirebugChrome.$("cmd_copy").getAttribute("disabled") &&
+ !FirebugChrome.$("cmd_copy").getAttribute("disabled") &&
!sel.isCollapsed)
{
var menuitem = Menu.createMenuItem(popup, {label: "Copy"});
@@ -1691,7 +1694,7 @@ var FirebugChrome =
breakOnNext: function(context, event)
{
// Avoid bubbling from associated options.
- if (event.target.id != "cmd_toggleBreakOn")
+ if (event.target.id != "cmd_firebug_toggleBreakOn")
return;
if (!context)
View
11 extension/content/firebug/chrome/firefox.js
@@ -16,7 +16,16 @@ var wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMe
function getBrowserDocument()
{
// TODO: this function is called very frequently, worth optimizing
- return Firebug.chrome.inDetachedScope ? Firebug.chrome.originalBrowser.ownerDocument : top.document;
+ try
+ {
+ var chrome = Firebug.chrome;
+ return chrome.inDetachedScope ? chrome.originalBrowser.ownerDocument : top.document;
+ }
+ catch (e)
+ {
+ if (FBTrace.DBG_ERRORS)
+ FBTrace.sysout("firefox.getBrowserDocument; EXCEPTION " + e, e);
+ }
}
// ********************************************************************************************* //
View
54 extension/content/firebug/chrome/reps.js
@@ -465,6 +465,49 @@ FirebugReps.Obj = domplate(Firebug.Rep,
});
// ********************************************************************************************* //
+// Reference
+
+/**
+ * A placeholder used instead of cycle reference within arrays.
+ * @param {Object} target The original referenced object
+ */
+FirebugReps.ReferenceObj = function(target)
+{
+ this.target = target;
+}
+
+/**
+ * Rep for cycle reference in an array.
+ */
+FirebugReps.Reference = domplate(Firebug.Rep,
+{
+ tag:
+ OBJECTLINK({_repObject: "$object"},
+ SPAN({title: "$object|getTooltip"},
+ "[...]")
+ ),
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+ className: "Reference",
+
+ supportsObject: function(object, type)
+ {
+ return (object instanceof FirebugReps.ReferenceObj);
+ },
+
+ getTooltip: function(object)
+ {
+ return Locale.$STR("firebug.reps.reference");
+ },
+
+ getRealObject: function(object)
+ {
+ return object.target;
+ },
+});
+
+// ********************************************************************************************* //
FirebugReps.Arr = domplate(Firebug.Rep,
{
@@ -513,12 +556,16 @@ FirebugReps.Arr = domplate(Firebug.Rep,
{
var delim = (i == array.length-1 ? "" : ", ");
var value = array[i];
+
+ // Cycle detected
+ if (value === array)
+ value = new FirebugReps.ReferenceObj(value);
+
var rep = Firebug.getRep(value);
var tag = rep.shortTag || rep.tag;
-
items.push({object: value, tag: tag, delim: delim});
}
- catch(exc)
+ catch (exc)
{
var rep = Firebug.getRep(exc);
var tag = rep.shortTag || rep.tag;
@@ -3158,7 +3205,8 @@ Firebug.registerRep(
FirebugReps.StorageList,
FirebugReps.Attr,
FirebugReps.Date,
- FirebugReps.NamedNodeMap
+ FirebugReps.NamedNodeMap,
+ FirebugReps.Reference
);
Firebug.setDefaultReps(FirebugReps.Func, FirebugReps.Obj);
View
18 extension/content/firebug/chrome/shortcuts.js
@@ -61,16 +61,16 @@ Firebug.ShortcutsModel = Obj.extend(Firebug.Module,
var shortcut = branch.getCharPref("shortcut." + element);
var tokens = shortcut.split(" ");
var key = tokens.pop();
- var modifiers = tokens.join(",")
+ var modifiers = tokens.join(",");
- var keyElem = document.getElementById("key_" + element);
+ var keyElem = document.getElementById("key_firebug_" + element);
if (!keyElem)
{
// If key is not defined in xul, add it
keyElem = document.createElement("key");
keyElem.className = "fbOnlyKey";
- keyElem.id = "key_"+element;
- keyElem.command = "cmd_"+element;
+ keyElem.id = "key_firebug_" + element;
+ keyElem.command = "cmd_firebug_" + element;
document.getElementById("mainKeyset").appendChild(keyElem);
}
@@ -101,8 +101,7 @@ Firebug.ShortcutsModel = Obj.extend(Firebug.Module,
this.keysets.push(keyElem.parentNode);
// Modify shortcut for global key, if it exists
- var keyElem = Firefox.getElementById("key_" + element);
-
+ var keyElem = Firefox.getElementById("key_firebug_" + element);
if (!keyElem)
return;
@@ -113,10 +112,11 @@ Firebug.ShortcutsModel = Obj.extend(Firebug.Module,
}
// Disable existing global shortcuts
- var selector = "key["+attr+"='"+key+"'][modifiers='"+modifiers+"']"
- + ":not([id='key_"+element+"']):not([disabled='true'])";
+ var selector = "key[" + attr + "='" + key + "'][modifiers='" + modifiers + "']"
+ + ":not([id='key_firebug_" + element + "']):not([disabled='true'])";
+
var existingKeyElements = keyElem.ownerDocument.querySelectorAll(selector);
- for (var i = existingKeyElements.length - 1; i >= 0; i--)
+ for (var i=existingKeyElements.length-1; i>=0; i--)
{
var existingKeyElement = existingKeyElements[i];
existingKeyElement.setAttribute("disabled", "true");
View
19 extension/content/firebug/console/commandLine.js
@@ -21,12 +21,13 @@ define([
"firebug/console/eventMonitor",
"firebug/lib/keywords",
"firebug/console/console",
+ "firebug/console/commandLineHelp",
"firebug/console/commandLineExposed",
"firebug/console/autoCompleter",
"firebug/console/commandHistory"
],
function(Obj, Firebug, FirebugReps, Locale, Events, Wrapper, Url, Css, Dom, Firefox, Win, System,
- Xpath, Str, Xml, Arr, Persist, EventMonitor, Keywords, Console) {
+ Xpath, Str, Xml, Arr, Persist, EventMonitor, Keywords, Console, CommandLineHelp) {
// ********************************************************************************************* //
// Constants
@@ -1195,6 +1196,12 @@ function FirebugCommandLineAPI(context)
return Firebug.Console.getDefaultReturnValue(context.window);
};
+ this.help = function()
+ {
+ CommandLineHelp.render(context);
+ return Firebug.Console.getDefaultReturnValue(context.window);
+ };
+
// xxxHonza: removed from 1.10 (issue 5599)
/*this.memoryProfile = function(title)
{
@@ -1348,9 +1355,17 @@ Firebug.CommandLine.injector =
// ********************************************************************************************* //
// CommandLine Handler
+/**
+ * This object is responsible for handling commands executing in the page context.
+ * When a command (CMD API) is being executed, the page sends a DOM event that is
+ * handled by 'handleEvent' method.
+ *
+ * @param {Object} context
+ * @param {Object} win is the window the handler is bound into
+ */
function CommandLineHandler(context, win)
{
- this.handleEvent = function(event) // win is the window the handler is bound into
+ this.handleEvent = function(event)
{
context.baseWindow = context.baseWindow || context.window;
this.api = new FirebugCommandLineAPI(context);
View
75 extension/content/firebug/console/commandLineExposed.js
@@ -10,6 +10,21 @@ function(Firebug, Wrapper, Events) {
// ********************************************************************************************* //
// Command Line APIs
+// List of command line APIs
+var commands = ["$", "$$", "$x", "$n", "cd", "clear", "inspect", "keys",
+ "values", "debug", "undebug", "monitor", "unmonitor", "traceCalls", "untraceCalls",
+ "traceAll", "untraceAll", "monitorEvents", "unmonitorEvents", "profile", "profileEnd",
+ "copy" /*, "memoryProfile", "memoryProfileEnd"*/];
+
+// List of shortcuts for some console methods
+var consoleShortcuts = ["dir", "dirxml", "table"];
+
+// List of console variables.
+var props = ["$0", "$1", "help"];
+
+// ********************************************************************************************* //
+// Command Line Implementation
+
/**
* Returns a command line object (bundled with passed window through closure). The object
* provides all necessary APIs as described here:
@@ -24,8 +39,9 @@ function createFirebugCommandLine(context, win)
if (!contentView)
{
if (FBTrace.DBG_COMMANDLINE || FBTrace.DBG_ERRORS)
- FBTrace.sysout("createFirebugCommandLine ERROR no contentView "+context.getName())
- return null;
+ FBTrace.sysout("createFirebugCommandLine ERROR no contentView " + context.getName());
+
+ return null;
}
// The commandLine object
@@ -36,12 +52,6 @@ function createFirebugCommandLine(context, win)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Exposed Properties
- // List of command line APIs
- var commands = ["$", "$$", "$x", "$n", "cd", "clear", "inspect", "keys",
- "values", "debug", "undebug", "monitor", "unmonitor", "traceCalls", "untraceCalls",
- "traceAll", "untraceAll", "monitorEvents", "unmonitorEvents", "profile", "profileEnd",
- "copy" /*, "memoryProfile", "memoryProfileEnd"*/];
-
// Define command line methods
for (var i=0; i<commands.length; i++)
{
@@ -53,7 +63,7 @@ function createFirebugCommandLine(context, win)
function createCommandHandler(cmd) {
return function() {
- return notifyFirebug(arguments, cmd, 'firebugExecuteCommand');
+ return notifyFirebug(arguments, cmd, "firebugExecuteCommand");
}
}
@@ -62,7 +72,6 @@ function createFirebugCommandLine(context, win)
}
// Define shortcuts for some console methods
- var consoleShortcuts = ["dir", "dirxml", "table"];
for (var i=0; i<consoleShortcuts.length; i++)
{
var command = consoleShortcuts[i];
@@ -81,8 +90,7 @@ function createFirebugCommandLine(context, win)
commandLine.__exposedProps__[command] = "rw";
}
- // Define console variables (inspector history).
- var props = ["$0", "$1"];
+ // Define console variables.
for (var i=0; i<props.length; i++)
{
var prop = props[i];
@@ -91,7 +99,7 @@ function createFirebugCommandLine(context, win)
function createVariableHandler(prop) {
return function() {
- return notifyFirebug(arguments, prop, 'firebugExecuteCommand');
+ return notifyFirebug(arguments, prop, "firebugExecuteCommand");
}
}
@@ -111,7 +119,7 @@ function createFirebugCommandLine(context, win)
function attachCommandLine()
{
if (FBTrace.DBG_COMMANDLINE)
- FBTrace.sysout("commandLine.Exposed.attachCommandLine; "+window.location);
+ FBTrace.sysout("commandLine.Exposed.attachCommandLine; " + window.location);
if (!contentView.console)
{
@@ -119,28 +127,33 @@ function createFirebugCommandLine(context, win)
contentView.console = console;
}
- Events.addEventListener(contentView.document, "firebugCommandLine", firebugEvalEvent, true);
+ Events.addEventListener(contentView.document, "firebugCommandLine",
+ firebugEvalEvent, true);
}
function detachCommandLine()
{
- Events.removeEventListener(contentView.document, "firebugCommandLine", firebugEvalEvent, true);
- delete contentView._FirebugCommandLine; // suicide!
+ Events.removeEventListener(contentView.document, "firebugCommandLine",
+ firebugEvalEvent, true);
+
+ // suicide!
+ delete contentView._FirebugCommandLine;
if (FBTrace.DBG_COMMANDLINE)
- FBTrace.sysout("commandLine.Exposed.detachCommandLine; "+window.location);
+ FBTrace.sysout("commandLine.Exposed.detachCommandLine; " + window.location);
}
function firebugEvalEvent(event)
{
if (FBTrace.DBG_COMMANDLINE)
- FBTrace.sysout("commandLine.Exposed.firebugEvalEvent "+window.location);
+ FBTrace.sysout("commandLine.Exposed.firebugEvalEvent " + window.location);
- var expr = contentView.document.getUserData("firebug-expr"); // see commandLine.js
+ // see commandLine.js
+ var expr = contentView.document.getUserData("firebug-expr");
evaluate(expr);
if (FBTrace.DBG_COMMANDLINE)
- FBTrace.sysout("commandLine.Exposed; did evaluate on "+expr);
+ FBTrace.sysout("commandLine.Exposed; did evaluate on " + expr);
}
function evaluate(expr)
@@ -154,7 +167,7 @@ function createFirebugCommandLine(context, win)
//var result = FirebugEvaluate(expr, contentView);
notifyFirebug([result], "evaluated", "firebugAppendConsole");
}
- catch(exc)
+ catch (exc)
{
// change source and line number of exeptions from commandline code
// create new error since properties of nsIXPCException are not modifiable
@@ -172,13 +185,15 @@ function createFirebugCommandLine(context, win)
result.message = exc.message;
result.lineNumber = exc.lineNumber - line;
result.fileName = "data:," + encodeURIComponent(expr);
- if(!isXPCException)
+
+ if (!isXPCException)
result.name = exc.name;
}
else
{
result = exc;
}
+
notifyFirebug([result], "evaluateError", "firebugAppendConsole");
}
}
@@ -198,14 +213,17 @@ function createFirebugCommandLine(context, win)
contentView.document.dispatchEvent(event);
if (FBTrace.DBG_COMMANDLINE)
- FBTrace.sysout("commandLine.Exposed; dispatched event "+methodName+" via "+
- eventID+" with "+objs.length+ " user objects, [0]:"+commandLine.userObjects[0]);
+ {
+ FBTrace.sysout("commandLine.Exposed; dispatched event " + methodName + " via " +
+ eventID + " with " + objs.length + " user objects, [0]:" +
+ commandLine.userObjects[0]);
+ }
var result;
if (contentView.document.getUserData("firebug-retValueType") == "array")
result = [];
- if (!result && commandLine.userObjects.length == length+1)
+ if (!result && commandLine.userObjects.length == length + 1)
return commandLine.userObjects[length];
for (var i=length; i<commandLine.userObjects.length && result; i++)
@@ -231,7 +249,10 @@ document.documentElement.appendChild(script);
Firebug.CommandLineExposed =
{
- createFirebugCommandLine: createFirebugCommandLine
+ createFirebugCommandLine: createFirebugCommandLine,
+ commands: commands,
+ consoleShortcuts: consoleShortcuts,
+ properties: props,
};
return Firebug.CommandLineExposed;
View
162 extension/content/firebug/console/commandLineHelp.js
@@ -0,0 +1,162 @@
+/* See license.txt for terms of usage */
+
+define([
+ "firebug/lib/domplate",
+ "firebug/lib/locale",
+ "firebug/lib/dom",
+ "firebug/console/commandLineExposed",
+ "firebug/chrome/window",
+],
+function(Domplate, Locale, Dom, CommandLineExposed, Win) { with (Domplate) {
+
+// ********************************************************************************************* //
+// Constants
+
+const Cc = Components.classes;
+const Ci = Components.interfaces;
+
+var CMD_TYPE_COMMAND = 1;
+var CMD_TYPE_SHORTCUT = 2;
+var CMD_TYPE_PROPERTY = 3;
+
+// ********************************************************************************************* //
+// Domplates
+
+var HelpCaption = domplate(
+{
+ tag:
+ SPAN({"class": "helpTitle"},
+ SPAN({"class": "helpCaption"},
+ Locale.$STR("console.cmd.help_title")
+ ),
+ SPAN({"class": "helpCaptionDesc"},
+ Locale.$STR("console.cmd.help_title_desc")
+ )
+ )
+});
+
+var HelpTable = domplate(
+{
+ tag:
+ TABLE({"class": "helpTable", cellspacing: 0, cellpadding: 0, width: "100%",
+ "role": "grid"},
+ THEAD({"class": "helpThead", "role": "presentation"},
+ TR({"class": "headerRow focusRow helpRow subFocusRow", onclick: "$onClick",
+ "role": "row"},
+ TH({"class": "headerCell a11yFocus", "role": "columnheader", width: "10%"},
+ DIV({"class": "headerCellBox"},
+ Locale.$STR("Name")
+ )
+ ),
+ TH({"class": "headerCell a11yFocus", "role": "columnheader", width: "90%"},
+ DIV({"class": "headerCellBox"},
+ Locale.$STR("Description")
+ )
+ )
+ )
+ ),
+ TBODY({"class": "helpTbody", "role": "presentation"})
+ ),
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+ onClick: function(event)
+ {
+ }
+});
+
+var HelpEntry = domplate(
+{
+ tag:
+ FOR("command", "$commands",
+ TR({"class": "focusRow helpRow subFocusRow", "role": "row"},
+ TD({"class": "a11yFocus helpCell commandName", "role": "presentation"},
+ A({"class": "objectLink", onclick: "$onClick", _repObject: "$command"},
+ "$command|getName"
+ )
+ ),
+ TD({"class": "a11yFocus helpCell commandDesc", "role": "gridcell"},
+ "$command|getDesc"
+ )
+ )
+ ),
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+ onClick: function(event)
+ {
+ var object = Firebug.getRepObject(event.target);
+ Win.openNewTab("http://getfirebug.com/wiki/index.php/" + object.name);
+ },
+
+ getName: function(object)
+ {
+ var name = object.name;
+ if (object.type != CMD_TYPE_PROPERTY)
+ name = name + "()";
+ return name;
+ },
+
+ getDesc: function(object)
+ {
+ return Locale.$STR(object.desc);
+ }
+});
+
+// ********************************************************************************************* //
+// Help Object
+
+var CommandLineHelp = domplate(
+{
+ render: function(context)
+ {
+ var row = Firebug.Console.openGroup("help", context, "help",
+ HelpCaption, true, null, true);
+ Firebug.Console.closeGroup(context, true);
+
+ var logGroupBody = row.lastChild;
+ var table = HelpTable.tag.replace({}, logGroupBody);
+ var tBody = table.lastChild;
+
+ var commands = [];
+
+ for (var i=0; i<CommandLineExposed.commands.length; i++)
+ {
+ commands.push({
+ name: CommandLineExposed.commands[i],
+ desc: "console.cmd.help." + CommandLineExposed.commands[i],
+ type: CMD_TYPE_COMMAND,
+ })
+ }
+
+ for (var i=0; i<CommandLineExposed.consoleShortcuts.length; i++)
+ {
+ commands.push({
+ name: CommandLineExposed.consoleShortcuts[i],
+ desc: "console.cmd.help." + CommandLineExposed.consoleShortcuts[i],
+ type: CMD_TYPE_SHORTCUT,
+ })
+ }
+
+ for (var i=0; i<CommandLineExposed.properties.length; i++)
+ {
+ commands.push({
+ name: CommandLineExposed.properties[i],
+ desc: "console.cmd.help." + CommandLineExposed.properties[i],
+ type: CMD_TYPE_PROPERTY,
+ })
+ }
+
+ HelpEntry.tag.insertRows({commands: commands}, tBody);
+
+ return row;
+ }
+});
+
+// ********************************************************************************************* //
+// Registration
+
+return CommandLineHelp;
+
+// ********************************************************************************************* //
+}});
View
4 extension/content/firebug/console/commandLinePopup.js
@@ -125,7 +125,7 @@ Firebug.CommandLine.Popup = Obj.extend(Firebug.Module,
FBTrace.sysout("commandLine.Popup.toggle;");
var newState = !this.isVisible();
- Firebug.chrome.setGlobalAttribute("cmd_toggleCommandPopup", "checked", newState);
+ Firebug.chrome.setGlobalAttribute("cmd_firebug_toggleCommandPopup", "checked", newState);
Firebug.Options.set("alwaysShowCommandLine", newState);
this.updateVisibility(newState);
@@ -195,7 +195,7 @@ Firebug.CommandLine.Popup = Obj.extend(Firebug.Module,
isVisible: function()
{
- var checked = Firebug.chrome.getGlobalAttribute("cmd_toggleCommandPopup", "checked");
+ var checked = Firebug.chrome.getGlobalAttribute("cmd_firebug_toggleCommandPopup", "checked");
return (checked == "true") ? true : false;
},
View
4 extension/content/firebug/console/console.js
@@ -254,13 +254,13 @@ Firebug.Console = Obj.extend(ActivableConsole,
var panel = context.getPanel("console");
panel.persistContent = panel.persistContent ? false : true;
- Firebug.chrome.setGlobalAttribute("cmd_togglePersistConsole", "checked",
+ Firebug.chrome.setGlobalAttribute("cmd_firebug_togglePersistConsole", "checked",
panel.persistContent);
},
showContext: function(browser, context)
{
- Firebug.chrome.setGlobalAttribute("cmd_clearConsole", "disabled", !context);
+ Firebug.chrome.setGlobalAttribute("cmd_firebug_clearConsole", "disabled", !context);
Firebug.ActivableModule.showContext.apply(this, arguments);
},
View
2  extension/content/firebug/console/consolePanel.js
@@ -136,7 +136,7 @@ Firebug.ConsolePanel.prototype = Obj.extend(Firebug.ActivablePanel,
this.setFilter(Firebug.consoleFilterTypes);
- Firebug.chrome.setGlobalAttribute("cmd_togglePersistConsole", "checked",
+ Firebug.chrome.setGlobalAttribute("cmd_firebug_togglePersistConsole", "checked",
this.persistContent);
this.showPanel(state);
View
4 extension/content/firebug/console/memoryProfiler.js
@@ -117,7 +117,7 @@ Firebug.MemoryProfiler = Obj.extend(Firebug.Module,
return;
}
- Firebug.chrome.setGlobalAttribute("cmd_toggleMemoryProfiling", "checked", "true");
+ Firebug.chrome.setGlobalAttribute("cmd_firebug_toggleMemoryProfiling", "checked", "true");
this.profiling = true;
FBS.addHandler(this);
@@ -148,7 +148,7 @@ Firebug.MemoryProfiler = Obj.extend(Firebug.Module,
FBS.removeHandler(this);
this.profiling = false;
- Firebug.chrome.setGlobalAttribute("cmd_toggleMemoryProfiling", "checked", "false");
+ Firebug.chrome.setGlobalAttribute("cmd_firebug_toggleMemoryProfiling", "checked", "false");
// Calculate total diff
var oldReport = context.memoryProfileStack.pop();
View
10 extension/content/firebug/console/profiler.js
@@ -81,13 +81,13 @@ Firebug.Profiler = Obj.extend(Firebug.Module,
// Attributes must be modified on the <command> element. All toolbar buttons
// and menuitems are hooked up to the command.
- Firebug.chrome.setGlobalAttribute("cmd_toggleProfiling", "disabled",
+ Firebug.chrome.setGlobalAttribute("cmd_firebug_toggleProfiling", "disabled",
disabled ? "true" : "false");
// Update button's tooltip.
var tooltipText = disabled ? Locale.$STR("ProfileButton.Disabled.Tooltip")
: Locale.$STR("ProfileButton.Enabled.Tooltip");
- Firebug.chrome.setGlobalAttribute("cmd_toggleProfiling", "tooltiptext", tooltipText);
+ Firebug.chrome.setGlobalAttribute("cmd_firebug_toggleProfiling", "tooltiptext", tooltipText);
},
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -112,7 +112,7 @@ Firebug.Profiler = Obj.extend(Firebug.Module,
{
FBS.startProfiling();
- Firebug.chrome.setGlobalAttribute("cmd_toggleProfiling", "checked", "true");
+ Firebug.chrome.setGlobalAttribute("cmd_firebug_toggleProfiling", "checked", "true");
var originalTitle = title;
var isCustomMessage = !!title;
@@ -133,7 +133,7 @@ Firebug.Profiler = Obj.extend(Firebug.Module,
if (totalTime == -1)
return;
- Firebug.chrome.setGlobalAttribute("cmd_toggleProfiling", "checked", "false");
+ Firebug.chrome.setGlobalAttribute("cmd_firebug_toggleProfiling", "checked", "false");
if (cancelReport)
delete context.profileRow;
@@ -147,7 +147,7 @@ Firebug.Profiler = Obj.extend(Firebug.Module,
isProfiling: function()
{
- return (Firebug.chrome.getGlobalAttribute("cmd_toggleProfiling", "checked") === "true")
+ return (Firebug.chrome.getGlobalAttribute("cmd_firebug_toggleProfiling", "checked") === "true")
},
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
View
4 extension/content/firebug/cookies/cookiePanel.js
@@ -286,8 +286,8 @@ CookiePanel.prototype = Obj.extend(Firebug.ActivablePanel,
if (Firebug.chrome.setGlobalAttribute)
{
- Firebug.chrome.setGlobalAttribute("cmd_resumeExecution", "breakable", "true");
- Firebug.chrome.setGlobalAttribute("cmd_resumeExecution", "tooltiptext",
+ Firebug.chrome.setGlobalAttribute("cmd_firebug_resumeExecution", "breakable", "true");
+ Firebug.chrome.setGlobalAttribute("cmd_firebug_resumeExecution", "tooltiptext",
Locale.$STR("cookies.Break On Cookie"));
}
},
View
40 extension/content/firebug/cookies/cookiePanel.xul
@@ -7,19 +7,19 @@
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<commandset id="mainCommandSet">
- <command id="cmd_cookieRemoveAll" oncommand="Firebug.CookieModule.onRemoveAll(Firebug.currentContext)"/>
- <command id="cmd_cookieRemoveAllSession" oncommand="Firebug.CookieModule.onRemoveAllSession(Firebug.currentContext)"/>
- <command id="cmd_cookieCreate" oncommand="Firebug.CookieModule.onCreateCookie(Firebug.currentContext)"/>
- <command id="cmd_cookieViewAll" oncommand="Firebug.CookieModule.onViewAll(Firebug.currentContext)"/>
- <command id="cmd_cookieViewExceptions" oncommand="Firebug.CookieModule.onViewExceptions(Firebug.currentContext)"/>
- <command id="cmd_cookieFilterByPath" oncommand="Firebug.CookieModule.onFilter(Firebug.currentContext, 'cookies.filterByPath')"/>
- <command id="cmd_cookieShowRejectedCookies" oncommand="Firebug.CookieModule.onFilter(Firebug.currentContext, 'cookies.showRejectedCookies')"/>
- <command id="cmd_cookieExportAll" oncommand="Firebug.CookieModule.onExportAll(Firebug.currentContext)"/>
- <command id="cmd_cookieExportForSite" oncommand="Firebug.CookieModule.onExportForSite(Firebug.currentContext)"/>
+ <command id="cmd_firebug_cookieRemoveAll" oncommand="Firebug.CookieModule.onRemoveAll(Firebug.currentContext)"/>
+ <command id="cmd_firebug_cookieRemoveAllSession" oncommand="Firebug.CookieModule.onRemoveAllSession(Firebug.currentContext)"/>
+ <command id="cmd_firebug_cookieCreate" oncommand="Firebug.CookieModule.onCreateCookie(Firebug.currentContext)"/>
+ <command id="cmd_firebug_cookieViewAll" oncommand="Firebug.CookieModule.onViewAll(Firebug.currentContext)"/>
+ <command id="cmd_firebug_cookieViewExceptions" oncommand="Firebug.CookieModule.onViewExceptions(Firebug.currentContext)"/>
+ <command id="cmd_firebug_cookieFilterByPath" oncommand="Firebug.CookieModule.onFilter(Firebug.currentContext, 'cookies.filterByPath')"/>
+ <command id="cmd_firebug_cookieShowRejectedCookies" oncommand="Firebug.CookieModule.onFilter(Firebug.currentContext, 'cookies.showRejectedCookies')"/>
+ <command id="cmd_firebug_cookieExportAll" oncommand="Firebug.CookieModule.onExportAll(Firebug.currentContext)"/>
+ <command id="cmd_firebug_cookieExportForSite" oncommand="Firebug.CookieModule.onExportForSite(Firebug.currentContext)"/>
</commandset>
<keyset id="mainKeyset">
- <key id="key_removeAllCookies" key="o" modifiers="control,shift" command="cmd_cookieRemoveAll" class="fbOnlyKey"/>
+ <key id="key_firebug_removeAllCookies" key="o" modifiers="control,shift" command="cmd_firebug_cookieRemoveAll" class="fbOnlyKey"/>
</keyset>
<!-- Firebug toolbar -->
@@ -52,7 +52,7 @@
onpopupshowing="return Firebug.CookieModule.onCreateCookieShowTooltip(this, Firebug.currentContext)"/>
<menuitem id="fcCreate" class="fbInternational"
label="cookies.Create"
- tooltip="fcCreateCookieTooltip" command="cmd_cookieCreate"/>
+ tooltip="fcCreateCookieTooltip" command="cmd_firebug_cookieCreate"/>
<menuseparator/>
<!-- Remove all cookies -->
@@ -60,27 +60,27 @@
onpopupshowing="return Firebug.CookieModule.onRemoveAllShowTooltip(this, Firebug.currentContext)"/>
<menuitem id="fcRemoveAll" class="fbInternational"
label="cookies.RemoveAll"
- key="key_removeAllCookies"
- tooltip="fcRemoveAllTooltip" command="cmd_cookieRemoveAll"/>
+ key="key_firebug_removeAllCookies"
+ tooltip="fcRemoveAllTooltip" command="cmd_firebug_cookieRemoveAll"/>
<!-- Remove all session cookies -->
<tooltip id="fcRemoveAllSessionTooltip"
onpopupshowing="return Firebug.CookieModule.onRemoveAllSessionShowTooltip(this, Firebug.currentContext)"/>
<menuitem id="fcRemoveAllSession" class="fbInternational"
label="cookies.Remove Session Cookies"
- tooltip="fcRemoveAllSessionTooltip" command="cmd_cookieRemoveAllSession"/>
+ tooltip="fcRemoveAllSessionTooltip" command="cmd_firebug_cookieRemoveAllSession"/>
<menuseparator/>
<!-- Export cookies xxxHonza: remove this for now and wait for user feedback
<menuitem id="fcExportAll" class="fbInternational"
label="cookies.export.Export All Cookies"
tooltiptext="cookies.export.Export All Cookies Tooltip"
- command="cmd_cookieExportAll"/> -->
+ command="cmd_firebug_cookieExportAll"/> -->
<tooltip id="fcExportForSiteTooltip"
onpopupshowing="return Firebug.CookieModule.onExportForSiteShowTooltip(this, Firebug.currentContext)"/>
<menuitem id="fcExportForSite" class="fbInternational"
label="cookies.export.Export For Site"
- tooltip="fcExportForSiteTooltip" command="cmd_cookieExportForSite"/>
+ tooltip="fcExportForSiteTooltip" command="cmd_firebug_cookieExportForSite"/>
</menupopup>
</toolbarbutton>
@@ -94,13 +94,13 @@
value="cookies.filterByPath"
label="cookies.filter.byPath"
tooltiptext="cookies.filter.byPathTooltip"
- command="cmd_cookieFilterByPath"/>
+ command="cmd_firebug_cookieFilterByPath"/>
<menuitem id="fcShowRejectedCookies" type="checkbox"
class="fbInternational"
value="cookies.showRejectedCookies"
label="cookies.filter.showRejectedCookies"
tooltiptext="cookies.filter.showRejectedCookiesTooltip"
- command="cmd_cookieShowRejectedCookies"/>
+ command="cmd_firebug_cookieShowRejectedCookies"/>
<!--<menuseparator/>
<menu id="fcCustomPathFilter" label="cookies.Path Filter">
<menupopup id="fcCustomPathFilterPanel" ignorekeys="true"
@@ -135,11 +135,11 @@
tooltiptext="cookies.ToolsTooltip">
<menupopup>
<menuitem id="fcCookieViewAll" class="fbInternational"
- command="cmd_cookieViewAll"
+ command="cmd_firebug_cookieViewAll"
label="cookies.ViewAll"
tooltiptext="cookies.ViewAllTooltip"/>
<menuitem id="fcCookieViewExceptions" class="fbInternational"
- command="cmd_cookieViewExceptions"
+ command="cmd_firebug_cookieViewExceptions"
label="cookies.ViewExceptions"
tooltiptext="cookies.ViewExceptionsTooltip"/>
</menupopup>
View
26 extension/content/firebug/css/cssPanel.js
@@ -1229,7 +1229,7 @@ Firebug.CSSStyleSheetPanel.prototype = Obj.extend(Firebug.Panel,
items.push(
"-",
{
- label: "panel.Refresh",
+ label: "Refresh",
command: Obj.bind(this.refresh, this),
tooltiptext: "panel.tip.Refresh"
}
@@ -1796,7 +1796,7 @@ CSSEditor.prototype = domplate(Firebug.InlineEditor.prototype,
return CSSModule.parseCSSValue(value, offset);
},
- getAutoCompleteList: function(preExpr, expr, postExpr, range, cycle)
+ getAutoCompleteList: function(preExpr, expr, postExpr, range, cycle, context, out)
{
if (Dom.getAncestorByClass(this.target, "importRule"))
{
@@ -1925,6 +1925,20 @@ CSSEditor.prototype = domplate(Firebug.InlineEditor.prototype,
if (!preExpr)
keywords = keywords.concat(["inherit"]);
+ if (!cycle)
+ {
+ // Make some good default suggestions.
+ var list = ["white", "black", "solid", "outset", "repeat"];
+ for (var i = 0; i < list.length; ++i)
+ {
+ if (Str.hasPrefix(list[i], expr) && keywords.indexOf(list[i]) !== -1)
+ {
+ out.suggestion = list[i];
+ break;
+ }
+ }
+ }
+
return stripCompletedParens(keywords, postExpr);
}
},
@@ -1934,8 +1948,8 @@ CSSEditor.prototype = domplate(Firebug.InlineEditor.prototype,
if (!Css.hasClass(this.target, "cssPropValue"))
return null;
- // For non-multi-valued properties, fail (expanding 'background-repeat: repeat'
- // into 'no-repeat' should work).
+ // For non-multi-valued properties, fail (pre-completions don't make sense,
+ // and it's less risky).
var row = Dom.getAncestorByClass(this.target, "cssProp");
var propName = Dom.getChildByClass(row, "cssPropName").textContent;
if (!Css.multiValuedProperties.hasOwnProperty(propName))
@@ -2565,13 +2579,13 @@ StyleSheetEditor.prototype = domplate(Firebug.BaseEditor,
this.input.focus();
// match CSSModule.getEditorOptionKey
- var command = Firebug.chrome.$("cmd_togglecssEditMode");
+ var command = Firebug.chrome.$("cmd_firebug_togglecssEditMode");
command.setAttribute("checked", true);
},
hide: function()
{
- var command = Firebug.chrome.$("cmd_togglecssEditMode");
+ var command = Firebug.chrome.$("cmd_firebug_togglecssEditMode");
command.setAttribute("checked", false);
if (this.box.parentNode == this.panel.panelNode)
View
2  extension/content/firebug/dom/domPanel.js
@@ -1614,7 +1614,7 @@ Firebug.DOMBasePanel.prototype = Obj.extend(Firebug.Panel,
items.push(
"-",
{
- label: "panel.Refresh",
+ label: "Refresh",
tooltiptext: "panel.tip.Refresh",
command: Obj.bindFixed(this.rebuild, this, true)
}
View
19 extension/content/firebug/editor/editor.js
@@ -1204,10 +1204,25 @@ Firebug.AutoCompleter = function(caseSensitive, getRange, evaluator, getNewPropS
// Try to parse the typed character as the start of a new
// property, moving the rest of lastExpr over into postExpr
// (possibly with a separator added). If there is no support
- // for prefix-completions, fail.
+ // for prefix-completions, fail. If the character could
+ // plausibly be part of a leftwards expansion, fail.
// Note that this does not show unless there is a completion.
var moveOver = lastExpr.substr(1);
lastExpr = lastExpr.charAt(0);
+ range.start = offset - 1;
+ range.end = offset;
+
+ var cand = evaluator(preExpr, lastExpr, postExpr, range, false, context, {});
+ var imov = (caseSensitive ? moveOver : moveOver.toLowerCase());
+ for (var i = 0; i < cand.length; ++i)
+ {
+ var c = cand[i];
+ if (c.length <= imov.length || c.charAt(0) !== lastExpr)
+ continue;
+ c = (caseSensitive ? c : c.toLowerCase());
+ if (c.substr(-imov.length) === imov)
+ return false;
+ }
var sep = getNewPropSeparator(range, lastExpr, moveOver);
if (sep === null)
@@ -1216,8 +1231,6 @@ Firebug.AutoCompleter = function(caseSensitive, getRange, evaluator, getNewPropS
moveOver = sep + moveOver;
postExpr = moveOver + postExpr;
- range.end = range.start;
- range.start = offset;
}
}
View
7 extension/content/firebug/editor/editorSelector.js
@@ -81,9 +81,8 @@ Firebug.EditorSelector =
if (!mode)
return;
- var menuitem = Firebug.chrome.$("menu_" + this.getEditorOptionKey() + mode);
-
- var command = Firebug.chrome.$("cmd_toggle"+this.getEditorOptionKey());
+ var menuitem = Firebug.chrome.$("menu_firebug_" + this.getEditorOptionKey() + mode);
+ var command = Firebug.chrome.$("cmd_firebug_toggle" + this.getEditorOptionKey());
command.setAttribute("label", menuitem.label);
command.setAttribute("tooltiptext", menuitem.tooltipText);
},
@@ -98,7 +97,7 @@ Firebug.EditorSelector =
{
if (child.localName == "menuitem")
{
- if (child.id == "menu_"+this.getEditorOptionKey()+mode)
+ if (child.id == "menu_firebug_" + this.getEditorOptionKey()+mode)
child.setAttribute("checked", true);
else
child.removeAttribute("checked");
View
1  extension/content/firebug/firebug.js
@@ -46,6 +46,7 @@ const versionURL = "chrome://firebug/content/branch.properties";
const firebugURLs = // TODO chrome.js
{
main: "http://www.getfirebug.com",
+ help: "http://www.getfirebug.com/help",
FAQ: "http://getfirebug.com/wiki/index.php/FAQ",
docs: "http://www.getfirebug.com/docs.html",
keyboard: "http://getfirebug.com/wiki/index.php/Keyboard_and_Mouse_Shortcuts",
View
57 extension/content/firebug/firebugOverlay.xul
@@ -61,12 +61,16 @@
<!-- Button image-->
<image src="chrome://firebug/skin/firebug.png"/>
- <!-- Content comes from fbFirebugMenuPopup -->
+ <menupopup id="menu_firebug_iconMenu" class="fbFirebugMenuPopup"
+ onpopupshowing="return Firebug.GlobalUI.onMenuShowing(this);"
+ onpopuphiding="return Firebug.GlobalUI.onMenuHiding(this);">
+ <!-- Content comes from firebugMenuContent -->
+ </menupopup>
</toolbarbutton>
<!-- HTML Inspector -->
<toolbarbutton id="fbInspectButton" tooltiptext="firebug.InspectTooltip"
- command="cmd_toggleInspecting" collapsed="false"
+ command="cmd_firebug_toggleInspecting" collapsed="false"
class="fbInternational">
</toolbarbutton>
@@ -76,17 +80,17 @@
<toolbaritem contextmenu="fbNavigationHistoryMenu" class="noTabStop">
<toolbarbutton id="fbNavigateBackButton" disabled="true"
tooltiptext="firebug.history.Go back"
- command="cmd_navBack" class="fbInternational"/>
+ command="cmd_firebug_navBack" class="fbInternational"/>
<toolbarbutton id="fbNavigateForwardButton" disabled="true"
tooltiptext="firebug.history.Go forward"
- command="cmd_navForward" class="fbInternational"/>
+ command="cmd_firebug_navForward" class="fbInternational"/>
</toolbaritem>
<toolbarseparator id="fbNavigationSeparator"/>
<toolbarbutton id="fbCommandPopupButton"
tooltiptext="panel.tooltip.Show_Command_Line_Popup"
- command="cmd_toggleCommandPopup" class="fbInternational">
+ command="cmd_firebug_toggleCommandPopup" class="fbInternational">
</toolbarbutton>
</hbox>
@@ -116,14 +120,14 @@
<menupopup onpopupshowing="Firebug.GlobalUI.onPositionPopupShowing(this)"/>
<toolbarbutton id="fbMinimizeButton"
class="toolbarbutton-iconic fbInternational"
- tooltiptext="Minimize Firebug" command="cmd_minimizeFirebug"/>
+ tooltiptext="Minimize Firebug" command="cmd_firebug_minimizeFirebug"/>
<tooltip id="fbDetachButtonTooltip"
onpopupshowing="return Firebug.onShowDetachTooltip(this)"/>
<toolbarbutton id="fbDetachButton" class="toolbarbutton-iconic"
- tooltip="fbDetachButtonTooltip" command="cmd_detachFirebug"/>
+ tooltip="fbDetachButtonTooltip" command="cmd_firebug_detachFirebug"/>
<toolbarbutton id="fbCloseButton"
class="toolbarbutton-iconic fbInternational"
- tooltiptext="firebug.tip.Deactivate_Firebug" command="cmd_closeFirebug"/>
+ tooltiptext="firebug.tip.Deactivate_Firebug" command="cmd_firebug_closeFirebug"/>
</hbox>
</hbox>
@@ -140,7 +144,7 @@
<!-- Break On Next -->
<hbox id="fbBonButtons" collapsed="true" class="noTabStop">
<toolbarbutton id="fbBreakOnNextButton"
- command="cmd_toggleBreakOn"
+ command="cmd_firebug_toggleBreakOn"
tooltiptext="script.Break On Next" breakable="disabled"
class="fbInternational">
<stack id="fbBreakOnNextButtonStack">
@@ -161,19 +165,19 @@
<toolbarseparator class="fbPanelSpecificButtonsSeparator"/>
<toolbarbutton id="fbConsoleClear" label="firebug.Clear"
class="toolbar-text-button fbInternational"
- tooltiptext="firebug.ClearTooltip" command="cmd_clearConsole"/>
+ tooltiptext="firebug.ClearTooltip" command="cmd_firebug_clearConsole"/>
<toolbarbutton id="fbConsolePersist"
label="firebug.console.Persist"
class="toolbar-text-button fbInternational"
type="checkbox"
tooltiptext="firebug.console.Do_Not_Clear_On_Reload2"
- command="cmd_togglePersistConsole"/>
+ command="cmd_firebug_togglePersistConsole"/>
<toolbarbutton id="fbToggleProfiling" label="firebug.Profile"
class="toolbar-text-button fbInternational"
- type="checkbox" command="cmd_toggleProfiling"/>
+ type="checkbox" command="cmd_firebug_toggleProfiling"/>
<!-- <toolbarbutton id="fbToggleMemoryProfiling" label="firebug.Memory Profile"
class="toolbar-text-button fbInternational"
- type="checkbox" command="cmd_toggleMemoryProfiling"/> -->
+ type="checkbox" command="cmd_firebug_toggleMemoryProfiling"/> -->
<toolbarseparator class="fbPanelSpecificButtonsSeparator"/>
<toolbarbutton id="fbConsoleFilter-all" label="firebug.All" type="radio"
class="toolbar-text-button fbInternational"
@@ -211,7 +215,7 @@
<toolbarbutton id="fbToggleHTMLEditing" label="firebug.Edit"
class="toolbar-text-button fbInternational"
tooltiptext="firebug.EditHTMLTooltip"
- command="cmd_toggleHTMLEditing"/>
+ command="cmd_firebug_toggleHTMLEditing"/>
</hbox>
<!-- Toolbar buttons for the CSS panel -->
@@ -220,18 +224,18 @@
label="firebug.Edit"
class="fbInternational"
tooltiptext="firebug.EditCSSTooltip"
- command="cmd_togglecssEditMode"
+ command="cmd_firebug_togglecssEditMode"
type="menu-button">
<menupopup id="fbCSSEditorMenu"
onpopupshowing="Firebug.CSSModule.onOptionsShowing(this)">
- <!-- id must be menu_+getEditOptionKey+mode -->
- <menuitem id="menu_cssEditModeSource" mode="Source"
+ <!-- id must be menu_firebug_+getEditOptionKey+mode -->
+ <menuitem id="menu_firebug_cssEditModeSource" mode="Source"
label="firebug.css.sourceEdit"
tooltiptext="firebug.css.sourceEdit.tooltip"
oncommand="Firebug.CSSModule.onEditMode(event, this)"
type="radio" autocheck="false"
class="fbInternational"/>
- <menuitem id="menu_cssEditModeLive" mode="Live"
+ <menuitem id="menu_firebug_cssEditModeLive" mode="Live"
label="firebug.css.liveEdit"
tooltiptext="firebug.css.liveEdit.tooltip"
oncommand="Firebug.CSSModule.onEditMode(event, this)"
@@ -271,11 +275,11 @@
<toolbarseparator class="fbPanelSpecificButtonsSeparator"/>
<toolbarbutton id="fbNetClear" label="firebug.Clear"
class="toolbar-text-button fbInternational"
- tooltiptext="net.tip.Clear" command="cmd_clearNet"/>
+ tooltiptext="net.tip.Clear" command="cmd_firebug_clearNet"/>
<toolbarbutton id="fbNetPersist" label="firebug.console.Persist"
class="toolbar-text-button fbInternational"
tooltiptext="firebug.console.Do_Not_Clear_On_Reload2"
- command="cmd_togglePersistNet"/>
+ command="cmd_firebug_togglePersistNet"/>
<hbox id="fbNetButtonsFilter" class="noTabStop">
<toolbarseparator/>
<toolbarbutton id="fbNetFilter-all" label="firebug.All"
@@ -325,7 +329,7 @@
<toolbarseparator/>
<toolbarbutton id="fbTraceOpenConsole" class="toolbar-text-button"
label="Open Console" tooltiptext="Open Console Tooltip"
- command="cmd_toggleTraceConsole"/>
+ command="cmd_firebug_toggleTraceConsole"/>
</hbox>
<!-- Location buttons, used e.g. by the Script panel
@@ -353,20 +357,20 @@
</hbox>
<hbox id="fbDebuggerButtons" collapsed="true" class="noTabStop">
- <toolbarbutton id="fbRerunButton" command="cmd_rerun"
+ <toolbarbutton id="fbRerunButton" command="cmd_firebug_rerun"
tooltiptext="firebug.Rerun"
class="toolbar-image-button fbInternational" />
<toolbarbutton id="fbContinueButton"
- command="cmd_resumeExecution"
+ command="cmd_firebug_resumeExecution"
tooltiptext="firebug.Continue"
class="toolbar-image-button fbInternational" />
- <toolbarbutton id="fbStepIntoButton" command="cmd_stepInto"
+ <toolbarbutton id="fbStepIntoButton" command="cmd_firebug_stepInto"
tooltiptext="firebug.StepInto"
class="toolbar-image-button fbInternational" />
- <toolbarbutton id="fbStepOverButton" command="cmd_stepOver"
+ <toolbarbutton id="fbStepOverButton" command="cmd_firebug_stepOver"
tooltiptext="firebug.StepOver"
class="toolbar-image-button fbInternational" />
- <toolbarbutton id="fbStepOutButton" command="cmd_stepOut"
+ <toolbarbutton id="fbStepOutButton" command="cmd_firebug_stepOut"
tooltiptext="firebug.StepOut"
class="toolbar-image-button fbInternational"/>
</hbox>
@@ -452,6 +456,7 @@
</box>
</panelBar>
+ <!-- xxxHonza: where is this used? -->
<menupopup id="inspectorPopup" style="background: transparent; border: 2px solid red">
<label value="inspect"/>
</menupopup>
View
6 extension/content/firebug/firefox/browserOverlay.css
@@ -98,13 +98,13 @@
list-style-image: url(chrome://firebug/skin/firebug16.png);
}
-#menu_firebugInspect {
+#menu_firebug_firebugInspect {
list-style-image: url(chrome://firebug/skin/inspect.png);
-moz-image-region: rect(0, 16px, 16px, 0);
}
-#menu_firebugInspect:hover,
-#menu_firebugInspect:active {
+#menu_firebug_firebugInspect:hover,
+#menu_firebug_firebugInspect:active {
-moz-image-region: rect(16px, 16px, 32px, 0);
}
View
285 extension/content/firebug/firefox/browserOverlay.js
@@ -357,6 +357,17 @@ Firebug.GlobalUI =
onMenuShowing: function(popup)
{
+ // If this popup is already open the event comes from a sub menu, just ignore it.
+ if (popup.state == "open")
+ return;
+
+ while (popup.lastChild)
+ popup.removeChild(popup.lastChild);
+
+ // Generate dynamic content.
+ for (var i=0; i<firebugMenuContent.length; i++)
+ popup.appendChild(firebugMenuContent[i].cloneNode(true));
+
var collapsed = "true";
if (Firebug.chrome)
{
@@ -368,7 +379,7 @@ Firebug.GlobalUI =
var placement = Firebug.getPlacement ? Firebug.getPlacement() : "";
// Switch between "Open Firebug" and "Hide Firebug" label in the popup menu.
- var toggleFirebug = popup.querySelector("#menu_toggleFirebug");
+ var toggleFirebug = popup.querySelector("#menu_firebug_toggleFirebug");
if (toggleFirebug)
{
var hiddenUI = (collapsed == "true" || placement == "minimized");
@@ -398,11 +409,39 @@ Firebug.GlobalUI =
}
// Hide "Deactivate Firebug" menu if Firebug is not active.
- var closeFirebug = popup.querySelector("#menu_closeFirebug");
+ var closeFirebug = popup.querySelector("#menu_firebug_closeFirebug");
if (closeFirebug)
{
closeFirebug.setAttribute("collapsed", (Firebug.currentContext ? "false" : "true"));
}
+
+ // Update About Menu
+ var version = Firebug.GlobalUI.getVersion();
+ if (version)
+ {
+ var node = popup.getElementsByClassName("firebugAbout")[0];
+ var aboutLabel = node.getAttribute("label");
+ node.setAttribute("label", aboutLabel + " " + version);
+ node.classList.remove("firebugAbout");
+ }
+
+ // Allow Firebug menu customization (see FBTest and FBTrace as an example).
+ var event = new CustomEvent("firebugMenuShowing", {detail: popup});
+ document.dispatchEvent(event);
+ },
+
+ onMenuHiding: function(popup)
+ {
+ if (popup.state == "open")
+ return;
+
+ // xxxHonza: I don't know why the timeout must be here, but if it isn't
+ // the icon menu is broken (see issue 5427)
+ setTimeout(function()
+ {
+ while (popup.lastChild)
+ popup.removeChild(popup.lastChild);
+ });
},
onPositionPopupShowing: function(popup)
@@ -428,7 +467,7 @@ Firebug.GlobalUI =
});
if (pos == "detached")
- items.key = "key_detachFirebug";
+ items.key = "key_firebug_detachFirebug";
popup.appendChild(item);
}
@@ -523,28 +562,29 @@ $el("broadcaster", {id: "firebugStatus", suspended: true}, $("mainBroadcasterSet
// ********************************************************************************************* //
// Global Commands
-$command("cmd_closeFirebug", "Firebug.closeFirebug(true)");
-$command("cmd_toggleInspecting", "if (!Firebug.currentContext) Firebug.toggleBar(true); Firebug.Inspector.toggleInspecting(Firebug.currentContext)");
-$command("cmd_focusCommandLine", "if (!Firebug.currentContext) Firebug.toggleBar(true); Firebug.CommandLine.focus(Firebug.currentContext)");
-$command("cmd_toggleFirebug", "Firebug.toggleBar()");
-$command("cmd_detachFirebug", "Firebug.toggleDetachBar(false, true)");
-$command("cmd_inspect", "Firebug.Inspector.inspectFromContextMenu(arg)", "document.popupNode");
-$command("cmd_toggleBreakOn", "if (Firebug.currentContext) Firebug.chrome.breakOnNext(Firebug.currentContext, event)");
-$command("cmd_toggleDetachFirebug", "Firebug.toggleDetachBar(false, true)");
-$command("cmd_increaseTextSize", "Firebug.Options.changeTextSize(1);");
-$command("cmd_decreaseTextSize", "Firebug.Options.changeTextSize(-1);");
-$command("cmd_normalTextSize", "Firebug.Options.setTextSize(0);");
-$command("cmd_focusFirebugSearch", "if (Firebug.currentContext) Firebug.Search.onSearchCommand(document);");
-$command("cmd_customizeFBKeys", "Firebug.ShortcutsModel.customizeShortcuts()");
-$command("cmd_enablePanels", "Firebug.PanelActivation.enableAllPanels()");
-$command("cmd_disablePanels", "Firebug.PanelActivation.disableAllPanels()");
-$command("cmd_clearActivationList", "Firebug.PanelActivation.clearAnnotations()");
-$command("cmd_clearConsole", "Firebug.Console.clear(Firebug.currentContext)");
-$command("cmd_allOn", "Firebug.PanelActivation.toggleAll('on')");
-$command("cmd_toggleOrient", "Firebug.chrome.toggleOrient()");
-$command("cmd_toggleProfiling", ""); //todo
-
-$command("cmd_openInEditor", "Firebug.ExternalEditors.onContextMenuCommand(event)");
+$command("cmd_firebug_closeFirebug", "Firebug.closeFirebug(true);");
+$command("cmd_firebug_toggleInspecting", "if (!Firebug.currentContext) Firebug.toggleBar(true); Firebug.Inspector.toggleInspecting(Firebug.currentContext);");
+$command("cmd_firebug_focusCommandLine", "if (!Firebug.currentContext) Firebug.toggleBar(true); Firebug.CommandLine.focus(Firebug.currentContext);");
+$command("cmd_firebug_toggleFirebug", "Firebug.toggleBar();");
+$command("cmd_firebug_detachFirebug", "Firebug.toggleDetachBar(false, true);");
+$command("cmd_firebug_inspect", "Firebug.Inspector.inspectFromContextMenu(arg);", "document.popupNode");
+$command("cmd_firebug_toggleBreakOn", "if (Firebug.currentContext) Firebug.chrome.breakOnNext(Firebug.currentContext, event);");
+$command("cmd_firebug_toggleDetachFirebug", "Firebug.toggleDetachBar(false, true);");
+$command("cmd_firebug_increaseTextSize", "Firebug.Options.changeTextSize(1);");
+$command("cmd_firebug_decreaseTextSize", "Firebug.Options.changeTextSize(-1);");
+$command("cmd_firebug_normalTextSize", "Firebug.Options.setTextSize(0);");
+$command("cmd_firebug_focusFirebugSearch", "if (Firebug.currentContext) Firebug.Search.onSearchCommand(document);");
+$command("cmd_firebug_customizeFBKeys", "Firebug.ShortcutsModel.customizeShortcuts();");
+$command("cmd_firebug_enablePanels", "Firebug.PanelActivation.enableAllPanels();");
+$command("cmd_firebug_disablePanels", "Firebug.PanelActivation.disableAllPanels();");
+$command("cmd_firebug_clearActivationList", "Firebug.PanelActivation.clearAnnotations();");
+$command("cmd_firebug_clearConsole", "Firebug.Console.clear(Firebug.currentContext);");
+$command("cmd_firebug_allOn", "Firebug.PanelActivation.toggleAll('on');");
+$command("cmd_firebug_toggleOrient", "Firebug.chrome.toggleOrient();");
+$command("cmd_firebug_resetAllOptions", "Firebug.resetAllOptions(true);");
+$command("cmd_firebug_toggleProfiling", ""); //todo
+
+$command("cmd_firebug_openInEditor", "Firebug.ExternalEditors.onContextMenuCommand(event)");
// ********************************************************************************************* //
// Global Shortcuts
@@ -560,9 +600,9 @@ $command("cmd_openInEditor", "Firebug.ExternalEditors.onContextMenuCommand(event
var key = tokens.pop();
var keyProps = {
- id: "key_" + id,
+ id: "key_firebug_" + id,
modifiers: tokens.join(","),
- command: "cmd_" + id,
+ command: "cmd_firebug_" + id,
position: 1
};
@@ -610,14 +650,14 @@ $menupopupOverlay($("mainPopupSet"), [
]),
$menuseparator(),
$menuitem({
- id: "menu_ClearConsole",
+ id: "menu_firebug_ClearConsole",
label: "firebug.ClearConsole",
tooltiptext: "firebug.ClearTooltip",
- command: "cmd_clearConsole",
- key: "key_clearConsole"
+ command: "cmd_firebug_clearConsole",
+ key: "key_firebug_clearConsole"
}),
$menuitem({
- id: "menu_showErrorCount",
+ id: "menu_firebug_showErrorCount",
type: "checkbox",
label: "firebug.Show_Error_Count",
tooltiptext: "firebug.menu.tip.Show_Error_Count",
@@ -626,31 +666,31 @@ $menupopupOverlay($("mainPopupSet"), [
}),
$menuseparator(),
$menuitem({
- id: "menu_enablePanels",
+ id: "menu_firebug_enablePanels",
label: "firebug.menu.Enable_All_Panels",
tooltiptext: "firebug.menu.tip.Enable_All_Panels",
- command: "cmd_enablePanels"
+ command: "cmd_firebug_enablePanels"
}),
$menuitem({
- id: "menu_disablePanels",
+ id: "menu_firebug_disablePanels",
label: "firebug.menu.Disable_All_Panels",
tooltiptext: "firebug.menu.tip.Disable_All_Panels",
- command: "cmd_disablePanels"
+ command: "cmd_firebug_disablePanels"
}),
$menuseparator(),
$menuitem({
- id: "menu_AllOn",
+ id: "menu_firebug_AllOn",
type: "checkbox",
label: "On_for_all_web_pages",
tooltiptext: "firebug.menu.tip.On_for_all_Web_Sites",
- command: "cmd_allOn",
+ command: "cmd_firebug_allOn",
option: "allPagesActivation"
}),
$menuitem({
- id: "menu_clearActivationList",
+ id: "menu_firebug_clearActivationList",
label: "firebug.menu.Clear_Activation_List",
tooltiptext: "firebug.menu.tip.Clear_Activation_List",
- command: "cmd_clearActivationList"
+ command: "cmd_firebug_clearActivationList"
})
])
])
@@ -670,27 +710,25 @@ $menupopupOverlay($("mainPopupSet"), [
* and initialized as soon as Firebug UI is actually loaded. Since it's cloned from the original
* (global scope) extensions don't have to extend it (possible new menu items are already there).
*/
-var firebugMenuPopup = $menupopup({id: "fbFirebugMenuPopup",
- "class": "fbFirebugMenuPopup",
- onpopupshowing: "return Firebug.GlobalUI.onMenuShowing(this);"}, [
+var firebugMenuContent = [
// Open/close Firebug
$menuitem(
{
- id: "menu_toggleFirebug",
+ id: "menu_firebug_toggleFirebug",
label: "firebug.ShowFirebug",
tooltiptext: "firebug.menu.tip.Open_Firebug",
- command: "cmd_toggleFirebug",
- key: "key_toggleFirebug",
+ command: "cmd_firebug_toggleFirebug",
+ key: "key_firebug_toggleFirebug",
"class": "fbInternational"
}),
$menuitem(
{
- id: "menu_closeFirebug",
+ id: "menu_firebug_closeFirebug",
label: "firebug.Deactivate_Firebug",
tooltiptext: "firebug.tip.Deactivate_Firebug",
- command: "cmd_closeFirebug",
- key: "key_closeFirebug",
+ command: "cmd_firebug_closeFirebug",
+ key: "key_firebug_closeFirebug",
"class": "fbInternational"
}),
@@ -714,9 +752,9 @@ var firebugMenuPopup = $menupopup({id: "fbFirebugMenuPopup",
label:"firebug.OpenWith",
tooltiptext:"firebug.menu.tip.Open_With",
"class": "fbInternational",
- insertafter: "menu_openActionsSeparator",
+ insertafter: "menu_firebug_openActionsSeparator",
openFromContext: "true",
- command: "cmd_openInEditor"
+ command: "cmd_firebug_openInEditor"
},
[
$menupopup({id:"fbFirebugMenu_OpenWith",
@@ -736,29 +774,29 @@ var firebugMenuPopup = $menupopup({id: "fbFirebugMenuPopup",
[
$menuitem(
{
- id: "menu_increaseTextSize",
+ id: "menu_firebug_increaseTextSize",
label: "firebug.IncreaseTextSize",
tooltiptext: "firebug.menu.tip.Increase_Text_Size",
- command: "cmd_increaseTextSize",
- key: "key_increaseTextSize",
+ command: "cmd_firebug_increaseTextSize",
+ key: "key_firebug_increaseTextSize",
"class": "fbInternational"
}),
$menuitem(
{
- id: "menu_decreaseTextSize",
+ id: "menu_firebug_decreaseTextSize",
label: "firebug.DecreaseTextSize",
tooltiptext: "firebug.menu.tip.Decrease_Text_Size",
- command: "cmd_decreaseTextSize",
- key: "key_decreaseTextSize",
+ command: "cmd_firebug_decreaseTextSize",
+ key: "key_firebug_decreaseTextSize",
"class": "fbInternational"
}),
$menuitem(
{
- id: "menu_normalTextSize",
+ id: "menu_firebug_normalTextSize",
label: "firebug.NormalTextSize",
tooltiptext: "firebug.menu.tip.Normal_Text_Size",
- command: "cmd_normalTextSize",
- key: "key_normalTextSize",
+ command: "cmd_firebug_normalTextSize",
+ key: "key_firebug_normalTextSize",
"class": "fbInternational"
}),
])
@@ -781,7 +819,7 @@ var firebugMenuPopup = $menupopup({id: "fbFirebugMenuPopup",
[
$menuitem(
{
- id: "menu_toggleShowErrorCount",
+ id: "menu_firebug_toggleShowErrorCount",
type: "checkbox",
label: "firebug.Show_Error_Count",
tooltiptext: "firebug.menu.tip.Show_Error_Count",
@@ -791,7 +829,7 @@ var firebugMenuPopup = $menupopup({id: "fbFirebugMenuPopup",
}),
$menuitem(
{
- id: "menu_showTooltips",
+ id: "menu_firebug_showTooltips",
type: "checkbox",
label: "firebug.menu.Show_Info_Tips",
tooltiptext: "firebug.menu.tip.Show_Info_Tips",
@@ -801,7 +839,7 @@ var firebugMenuPopup = $menupopup({id: "fbFirebugMenuPopup",
}),
$menuitem(
{
- id: "menu_shadeBoxModel",
+ id: "menu_firebug_shadeBoxModel",
type: "checkbox",
label: "ShadeBoxModel",
tooltiptext: "inspect.option.tip.Shade_Box_Model",
@@ -811,7 +849,7 @@ var firebugMenuPopup = $menupopup({id: "fbFirebugMenuPopup",
}),
$menuitem(
{
- id: "showQuickInfoBox",
+ id: "menu_firebug_showQuickInfoBox",
type: "checkbox",
label: "ShowQuickInfoBox",
tooltiptext: "inspect.option.tip.Show_Quick_Info_Box",
@@ -821,7 +859,7 @@ var firebugMenuPopup = $menupopup({id: "fbFirebugMenuPopup",
}),
$menuitem(
{
- id: "menu_enableA11y",
+ id: "menu_firebug_enableA11y",
type: "checkbox",
label: "firebug.menu.Enable_Accessibility_Enhancements",
tooltiptext: "firebug.menu.tip.Enable_Accessibility_Enhancements",
@@ -831,7 +869,7 @@ var firebugMenuPopup = $menupopup({id: "fbFirebugMenuPopup",
}),
$menuitem(
{
- id: "menu_activateSameOrigin",
+ id: "menu_firebug_activateSameOrigin",
type: "checkbox",
label: "firebug.menu.Activate_Same_Origin_URLs2",
tooltiptext: "firebug.menu.tip.Activate_Same_Origin_URLs",
@@ -841,21 +879,21 @@ var firebugMenuPopup = $menupopup({id: "fbFirebugMenuPopup",
}),
$menuitem(
{
- id: "menu_toggleOrient",
+ id: "menu_firebug_toggleOrient",
type: "checkbox",
label: "firebug.menu.Vertical_Panels",
tooltiptext: "firebug.menu.tip.Vertical_Panels",
- command: "cmd_toggleOrient",
+ command: "cmd_firebug_toggleOrient",
option: "viewPanelOrient",
"class": "fbInternational"
}),
- $menuseparator({id: "menu_optionsSeparator"}),
+ $menuseparator({id: "menu_firebug_optionsSeparator"}),
$menuitem(
{
- id: "menu_resetAllOptions",
+ id: "menu_firebug_resetAllOptions",
label: "firebug.menu.Reset_All_Firebug_Options",
tooltiptext: "firebug.menu.tip.Reset_All_Firebug_Options",
- command: "cmd_resetAllOptions",
+ command: "cmd_firebug_resetAllOptions",
"class": "fbInternational"
}),
])
@@ -876,7 +914,7 @@ var firebugMenuPopup = $menupopup({id: "fbFirebugMenuPopup",
[
$menuitem(
{
- id: "menu_firebugUrlWebsite",
+ id: "menu_firebug_firebugUrlWebsite",
label: "firebug.Website",
tooltiptext: "firebug.menu.tip.Website",
oncommand: "Firebug.GlobalUI.visitWebsite('main')",
@@ -884,7 +922,7 @@ var firebugMenuPopup = $menupopup({id: "fbFirebugMenuPopup",
}),
$menuitem(
{
- id: "menu_firebugUrlExtensions",
+ id: "menu_firebug_firebugUrlExtensions",
label: "firebug.menu.Extensions",
tooltiptext: "firebug.menu.tip.Extensions",
oncommand: "Firebug.GlobalUI.visitWebsite('extensions')",
@@ -892,16 +930,16 @@ var firebugMenuPopup = $menupopup({id: "fbFirebugMenuPopup",
}),
$menuitem(
{
- id: "menu_firebugFAQ",
+ id: "menu_firebug_firebugFAQ",
label: "firebug.FAQ",
tooltiptext: "firebug.menu.tip.FAQ",
- command: "cmd_openHelp",
- key: "key_help",
+ command: "cmd_firebug_openHelp",
+ key: "key_firebug_help",
"class": "fbInternational"
}),
$menuitem(
{
- id: "menu_firebugDoc",
+ id: "menu_firebug_firebugDoc",
label: "firebug.Documentation",
tooltiptext: "firebug.menu.tip.Documentation",
oncommand: "Firebug.GlobalUI.visitWebsite('docs')",
@@ -909,7 +947,7 @@ var firebugMenuPopup = $menupopup({id: "fbFirebugMenuPopup",
}),
$menuitem(
{
- id: "menu_firebugKeyboard",
+ id: "menu_firebug_firebugKeyboard",
label: "firebug.KeyShortcuts",
tooltiptext: "firebug.menu.tip.Key_Shortcuts",
oncommand: "Firebug.GlobalUI.visitWebsite('keyboard')",
@@ -917,7 +955,7 @@ var firebugMenuPopup = $menupopup({id: "fbFirebugMenuPopup",
}),
$menuitem(
{
- id: "menu_firebugForums",
+ id: "menu_firebug_firebugForums",
label: "firebug.Forums",
tooltiptext: "firebug.menu.tip.Forums",
oncommand: "Firebug.GlobalUI.visitWebsite('discuss')",
@@ -925,7 +963,7 @@ var firebugMenuPopup = $menupopup({id: "fbFirebugMenuPopup",
}),
$menuitem(
{
- id: "menu_firebugIssues",
+ id: "menu_firebug_firebugIssues",
label: "firebug.Issues",
tooltiptext: "firebug.menu.tip.Issues",
oncommand: "Firebug.GlobalUI.visitWebsite('issues')",