diff -rwNpu6 repository/chrome/content/firebug/browserOverlay.xul all/chrome/content/firebug/browserOverlay.xul
--- repository/chrome/content/firebug/browserOverlay.xul 2006-08-16 19:48:26.000000000 +0200
+++ all/chrome/content/firebug/browserOverlay.xul 2006-08-16 23:23:38.000000000 +0200
@@ -45,12 +45,13 @@
disabled="true"/>
+
@@ -157,13 +158,13 @@
tooltiptext="&firebug.CloseFireBug;" command="cmd_togglePanel"/>
-
-
+
+
+
+
+
+
+
+
+
diff -rwNpu6 repository/chrome/content/firebug/commandLine.js all/chrome/content/firebug/commandLine.js
--- repository/chrome/content/firebug/commandLine.js 2006-08-16 19:48:26.000000000 +0200
+++ all/chrome/content/firebug/commandLine.js 2006-08-16 23:16:36.000000000 +0200
@@ -55,30 +55,51 @@ FireBugCommandLine.execCommandLine = fun
return;
this.commandLine.value = "";
this.appendToHistory(expr);
- FireBug.console.log(">>> " + expr, "command", FireBug_logTextRow);
+ FireBug.console.log(this.prefix + " " + expr, "command", FireBug_logTextRow);
var result = this.evaluate(expr);
if (result != undefined)
FireBug.console.log(result, "result");
}
-FireBugCommandLine.evaluate = function(expr)
+FireBugCommandLine.prefix = ">>>";
+FireBugCommandLine.updatePrefix = function()
+{
+ if (!FireBug.currentContext.evalObject)
+ {
+ this.prefix = ">>>";
+ document.getElementById("fbCommandArow").value = ">>>";
+ return;
+ }
+ var winTitle = FireBug.currentContext.evalObject.document.title;
+ if (winTitle.length > 20)
+ winTitle = winTitle.substring(0, 18) + "\u2026";
+ this.prefix = "[ " + winTitle + " ] >>>";
+ document.getElementById("fbCommandArow").value = this.prefix;
+}
+
+FireBugCommandLine.evaluate = function(expr, forceDefaultScope)
{
var win = FireBug.currentContext.window;
+ if (FireBug.currentContext.evalObject && !forceDefaultScope)
+ win = FireBug.currentContext.evalObject;
var result = null;
win.FireBugEval = function(value) { result = value; }
win.FireBugEval.api = FireBugCommandLineAPI;
win.FireBugEval.expr = expr;
- if (FireBug.debuggr.debugging && FireBug.currentContext.currentFrame)
+ if ((!FireBug.currentContext.evalObject || forceDefaultScope) &&
+ FireBug.debuggr.debugging && FireBug.currentContext.currentFrame)
+ {
FireBug.currentContext.currentFrame.eval(this.evalScript, "", 1, {});
+ }
else
this.injectScript(this.evalScript, win);
delete win.FireBugEval.api;
delete win.FireBugEval.expr;
delete win.FireBugEval;
diff -rwNpu6 repository/chrome/content/firebug/firebug.css all/chrome/content/firebug/firebug.css
--- repository/chrome/content/firebug/firebug.css 2006-08-16 19:48:26.000000000 +0200
+++ all/chrome/content/firebug/firebug.css 2006-08-16 23:16:36.000000000 +0200
@@ -30,6 +30,10 @@
visibility: visible;
}
#fbDebugToolbar[debugging="true"] #fbStackList {
visibility: visible;
}
+
+#fbWindowMenu menuitem, #fbWindowMenu menu {
+ max-width: 20em;
+}
diff -rwNpu6 repository/chrome/content/firebug/firebug.js all/chrome/content/firebug/firebug.js
--- repository/chrome/content/firebug/firebug.js 2006-08-16 19:48:26.000000000 +0200
+++ all/chrome/content/firebug/firebug.js 2006-08-16 23:34:10.000000000 +0200
@@ -59,14 +59,14 @@ var FireBug =
boolPrefNames: [
"disabled", "closedByDefault",
"showJSErrors", "showJSWarnings", "showCSSErrors", "showXMLErrors",
"showWebErrors", "showChromeErrors", "showMessages", "showExternalErrors",
"showXMLHttpRequests", "throttleMessages", "showStackTrace",
- "showAllStyles", "showFunctions", "showConstants",
- "enableDebugger", "breakOnErrors"],
+ "showAllStyles", "showFunctions", "showConstants", "showLocals",
+ "showWatches", "enableDebugger", "breakOnErrors"],
inspecting: false,
inspectedWindow: null,
inspectedElement: null,
inspectingStack: [],
highlightedElements: []
@@ -340,12 +340,13 @@ FireBug.attachToWindow = function(win)
this.selectView(context.browser.priorView.viewName);
}
else
this.selectView("console");
}
+ FireBugCommandLine.updatePrefix();
}
else
this.showErrorCount(0);
this.inspectCommand.setAttribute("disabled", !context || !context.loaded);
}
@@ -458,15 +459,21 @@ FireBug.createContext = function(win)
var browser = this.getBrowserByWindow(win);
var context = {
window: win,
browser: browser,
contextNodes: {},
+ evalObject: null,
selectedObject: null,
errorCount: 0,
spies: [],
+ watches: {},
+ treeState: {
+ property: {},
+ watch: {}
+ },
history: [],
historyIndex: -1,
messageQueue: [],
hoverNode: null,
attachedStyles: false
};
@@ -506,12 +513,13 @@ FireBug.destroyContext = function(contex
for (var i in context.spies)
{
var spy = context.spies[i];
spy.detach();
}
context.spies = null;
+ context.watches = null;
var win = context.window;
win.removeEventListener("unload", context.onUnload, true);
function detach(context, win) { FireBug.unhookWindow(context, win); }
this.iterateWindows(context, win, detach);
@@ -788,12 +796,42 @@ FireBug.validateViews = function(object)
FireBug.updateObjectPath = function(object)
{
this.pathText.value = this.getObjectPath(object);
}
+
+/**
+ * Keeps track of node expanding and collapsing in the DOM/JS trees.
+ */
+FireBug.expandObjectNode = function(dataType, expr)
+{
+ if (dataType == "DOM")
+ return;
+ var nodeToExpand = this.currentContext.treeState[dataType];
+ while (expr.length > 0)
+ {
+ var currentExpr = expr.shift();
+ if (!nodeToExpand[currentExpr])
+ nodeToExpand[currentExpr] = {};
+
+ nodeToExpand = nodeToExpand[currentExpr];
+ }
+}
+
+FireBug.collapseObjectNode = function(dataType, expr)
+{
+ if (dataType == "DOM")
+ return;
+ var nodeToDelete = this.currentContext.treeState[dataType];
+ while (nodeToDelete && (expr[0] in nodeToDelete) && (expr.length > 1))
+ nodeToDelete = nodeToDelete[expr.shift()];
+ delete nodeToDelete[expr.shift()];
+}
+
+
FireBug.viewSupportsObject = function(view, object)
{
if (view)
{
try {
// This tends to throw exceptions a lot because some objects are weird
@@ -1121,19 +1159,38 @@ FireBug.toggleOption = function(menuitem
for (var i in this.boolPrefNames)
{
var prefName = this.boolPrefNames[i];
if (prefName == option)
{
this.setBoolPref(prefName, checked);
+ this.setOption(prefName, checked);
if (this.currentContext)
this.currentContext.view.setOption(prefName, checked);
break;
}
}
}
+FireBug.setOption = function(name, value)
+{
+ if (name == "showFunctions")
+ {
+ if ("contextNode" in this.views.dom)
+ this.views.dom.contextNode.setAttribute("showFunctions", value);
+ if (this.views.js.context && this.views.js.context.contextNodes["trace"])
+ this.views.js.context.contextNodes["trace"].setAttribute("showFunctions", value);
+ }
+ else if (name == "showConstants")
+ {
+ if ("contextNode" in this.views.dom)
+ this.views.dom.contextNode.setAttribute("showConstants", value);
+ if (this.views.js.context && this.views.js.context.contextNodes["trace"])
+ this.views.js.context.contextNodes["trace"].setAttribute("showConstants", value);
+ }
+}
+
FireBug.clearConsole = function()
{
this.currentContext.view.clear();
}
FireBug.focusCommandLine = function()
@@ -1423,13 +1480,13 @@ FireBug.inspectForward = function()
this.selectObject(entry.object, entry.viewName, true, true);
}
}
FireBug.inspectEval = function(expr)
{
- var object = FireBugCommandLine.evaluate(expr);
+ var object = FireBugCommandLine.evaluate(expr, true);
this.selectObject(object, null, true);
}
/**
* Called when an object link is clicked.
*/
@@ -1654,12 +1711,79 @@ FireBug.stepOutDebugger = function()
FireBug.clearAllBreakpoints = function()
{
this.debuggr.clearAllBreakpoints(this.currentContext);
}
+FireBug.onDOMValueDblClick = function(event)
+{
+ var node = event.target;
+ while (node.nodeName != "TR")
+ node = node.parentNode;
+ FireBug.changeValue(node);
+}
+FireBug.changeValue = function(node)
+{
+ function onKP(e) {
+ if (e.keyCode == 13) // return
+ FireBugCommandLine.evaluate(varName + " = " + input.value, true);
+
+ if ((e.keyCode == 27) || (e.keyCode == 13)) // escape or return
+ {
+ me.views.js.updateWatchNode(me.currentContext);
+
+ // Make sure we clear our references (memleaks and all that)
+ input.removeEventListener("keypress", onKP, false);
+ input = null;
+ node = null;
+ me = null;
+ }
+ }
+ var me = this;
+ var varName = makeExpression(FireBug_makeObjectExpressionAry(node));
+ FireBugUtils.clearNode(node.lastChild);
+
+ var input = node.ownerDocument.createElement("input");
+ input.addEventListener("keypress", onKP, false);
+ input.className = "inlineJSEditor";
+
+ var initialValue = FireBugCommandLine.evaluate(varName, true)
+ if (typeof(initialValue) == "undefined")
+ initialValue = "undefined";
+ else if (initialValue === null)
+ initialValue = "null";
+ else
+ initialValue = initialValue.toSource();
+
+ // toSource gets a bit tedious for simple things:
+ input.value = initialValue.replace(/^\(new (?:String|Number|Boolean)\((.*)\)\)$/, "$1");
+ node.lastChild.appendChild(input);
+ input.focus();
+
+}
+
+FireBug.setWatch = function(str)
+{
+ this.currentContext.watches[str] = null;
+ this.views.js.updateWatchNode(this.currentContext);
+}
+
+FireBug.clearWatch = function(e)
+{
+ var node = e.target.parentNode.parentNode;
+ var varName = node.firstChild.lastChild.textContent;
+ delete this.currentContext.watches[varName];
+ this.views.js.updateWatchNode(this.currentContext);
+}
+
+FireBug.clearAllWatches = function()
+{
+ this.currentContext.watches = {};
+ this.currentContext.view.updateWatchNode(this.currentContext);
+}
+
///////////////////////////////////////////////////////////////////////////////////////////////////
FireBug.search = function(text)
{
this.searchBox.value = text;
this.updateSearch();
@@ -1745,12 +1869,53 @@ FireBug.onInspectingClick = function(eve
FireBug.detachClickInspectListeners(FireBug.inspectingWindow);
event.stopPropagation();
event.preventDefault();
}
+FireBug.onMenuBreakpointClick = function(event)
+{
+ var href = event.target.getAttribute("href");
+ var lineNo = event.target.getAttribute("line");
+ var scriptFile = FireBug.currentContext.scriptFiles[href];
+
+ FireBug.debuggr.showScript(scriptFile, lineNo, true);
+}
+
+// Cheat a bit:
+FireBug.onMenuClearBreakpoint = FireBug.onMenuSetBreakpoint = function(event)
+{
+ var target = document.popupNode;
+ while (target)
+ {
+ if ((target.className.indexOf("sourceRow") > -1) && (target.nodeName == "DIV"))
+ break;
+ target = target.parentNode;
+ }
+ if (!target) // huh?
+ return;
+
+ var lineNo = parseInt(target.firstChild.textContent);
+ var scriptFile = target.parentNode.scriptFile;
+ if (target.hasAttribute("breakpoint"))
+ {
+ target.removeAttribute("breakpoint");
+ FireBug.debuggr.clearBreakpoint(scriptFile.href, lineNo);
+ }
+ else
+ {
+ target.setAttribute("breakpoint", "true");
+ FireBug.debuggr.setBreakpoint(scriptFile.href, lineNo);
+ }
+}
+
+FireBug.onMenuResetEvalWindow = function()
+{
+ FireBug.console.setEvalObject(FireBug.currentContext.window);
+}
+
FireBug.onSelectKeyPress = function(event)
{
if (event.keyCode == 13)
FireBug.stopInspecting();
else if (event.keyCode == 27)
@@ -1799,12 +1964,25 @@ FireBug.onOptionsPopup = function(popup)
child.setAttribute("checked", checked);
}
}
}
+FireBug.onContextPopup = function(event, popup)
+{
+ var target = document.popupNode;
+ FireBugUtils.showItemsByView(popup, FireBug.currentContext.view.viewName);
+ FireBug.currentContext.view.onContextPopup(event, popup, target);
+}
+
+FireBug.onContextHiding = function(event, popup)
+{
+ var target = document.popupNode;
+ FireBug.currentContext.view.onContextHiding(event, popup, target);
+}
+
FireBug.onSwitchView = function(button)
{
var viewName = button.getAttribute("view");
this.selectView(viewName);
}
@@ -1912,12 +2090,17 @@ FireBug.getBoolPref = function(prefName)
FireBug.setBoolPref = function(prefName, value)
{
this[prefName] = value;
this.prefs.setBoolPref("extensions.firebug." + prefName, value);
}
+FireBug.getIntPref = function(prefName)
+{
+ return this.prefs.getIntPref("extensions.firebug." + prefName);
+}
+
FireBug.iterateWindows = function(context, win, handler)
{
if (!win || !win.document)
return;
handler(context, win);
diff -rwNpu6 repository/chrome/content/firebug/loggers.js all/chrome/content/firebug/loggers.js
--- repository/chrome/content/firebug/loggers.js 2006-08-16 19:45:42.000000000 +0200
+++ all/chrome/content/firebug/loggers.js 2006-08-16 23:17:00.000000000 +0200
@@ -676,142 +676,194 @@ function FireBug_logSourceFile(sourceFil
loadURLAsync(sourceFile.href, loader);
}
else
FireBug_logSourceString(sourceFile.text, logRow, precision);
}
-function FireBug_logDOM(object, logRow, precision, partial)
+function FireBug_logDOM(object, logRow, precision, partial, dataType)
{
var doc = logRow.ownerDocument;
function isFunction(value) { return (typeof value) == "function"; }
function isNotFunction(value) { return (typeof value) != "function"; }
precision = precision > 0 ? precision-1 : 0;
+ if (!dataType)
+ dataType = "DOM";
var objectType = typeof(object);
if (objectType == "function")
{
FireBug_logSourceString(object+"", logRow);
}
else if (objectType == "string")
{
FireBug_logSourceString(object, logRow);
}
else if (objectType == "object")
{
- var table = doc.createElement("table");
-
+ if (logRow.nodeName.toLowerCase() != "table")
+ {
+ var table = doc.createElement("table")
+ logRow.appendChild(table);
+ logRow = table;
+ }
+ var tbody = doc.createElement("tbody");
+ tbody.setAttribute("jsExpression", logRow.getAttribute("jsExpression"));
+ tbody.className = dataType + "Body";
+ logRow.appendChild(tbody);
for (var name in object)
{
try
{
- FireBug_createObjectRow(name, object[name], isNotFunction, table, precision);
+ FireBug_createObjectRow(name, object[name], isNotFunction, tbody, precision, dataType);
}
catch (exc) {}
}
for (var name in object)
{
try
{
- FireBug_createObjectRow(name, object[name], isFunction, table, precision);
+ FireBug_createObjectRow(name, object[name], isFunction, tbody, precision, dataType);
}
catch (exc) {}
}
-
- logRow.appendChild(table);
}
}
-function FireBug_createObjectRow(name, value, filter, table, precision)
+function FireBug_createObjectRow(name, value, filter, table, precision, dataType)
{
if ((filter && !filter(value)))
return;
var isFunction = typeof(value) == "function";
var isConstant = FireBugUtils.isAllUpperCase(name);
var doc = table.ownerDocument;
var tr = doc.createElement("tr");
- tr.className = "propertyRow" +
- (isFunction ? " propertyRow-function" : "") +
- (isConstant ? " propertyRow-constant" : "");
+ tr.setAttribute("jsExpression", name);
+ tr.className = dataType + "Row" +
+ (isFunction ? " " + dataType + "Row-function" : "") +
+ (isConstant ? " " + dataType + "Row-constant" : "");
var td = doc.createElement("td");
td.setAttribute("valign", "top");
td.noWrap = true;
- td.className = "propertyLabel";
+ td.className = dataType + "Label";
// Create the property name
var labelElt = doc.createElement("span");
- labelElt.className = "propertyName";
+ labelElt.className = dataType + "Name";
var labelText = doc.createTextNode(name);
labelElt.appendChild(labelText);
tr.appendChild(td);
// Create the twisty if the value is an object
var valueType = typeof(value);
if (valueType == "function" || (valueType == "object" && value != null)
|| (valueType == "string" && value.length > FireBug.stringCropLength))
{
- td.className += " propertyContainerLabel"
- labelElt.className += " propertyContainerName"
+ td.className += " " + dataType + "ContainerLabel"
+ labelElt.className += " " + dataType + "ContainerName"
var twisty = doc.createElement("img");
twisty.src = "blank.gif";
- twisty.className = "twisty propertyTwisty";
+ twisty.className = "twisty " + dataType + "Twisty";
td.appendChild(twisty);
var self = this;
labelElt.onclick = function() { FireBug_toggleObjectRow(value, tr); }
twisty.onclick = function() { FireBug_toggleObjectRow(value, tr); }
}
td.appendChild(labelElt);
// Create the property value
td = doc.createElement("td");
- td.className = "propertyValue";
+ td.className = dataType + "Value";
td.setAttribute("valign", "top");
+ if (dataType == "property")
+ td.addEventListener("dblclick", FireBug.onDOMValueDblClick, false);
FireBug_appendObject(value, td, 0, true);
tr.appendChild(td);
+ // Make sure we don't add X's to all rows, just the top ones.
+ if (dataType == "watch" && table && table.parentNode &&
+ table.parentNode.className.indexOf("traceTable") >= 0)
+ {
+ const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
+ var closeButton = doc.createElementNS(XUL_NS, "xul:image");
+ closeButton.className = "watchRemoveButton";
+ closeButton.addEventListener("click", function(e) { FireBug.clearWatch(e) }, false);
+ var secondTD = doc.createElement("td");
+ secondTD.appendChild(closeButton);
+ secondTD.setAttribute("width", "16px");
+ tr.appendChild(secondTD);
+ // Most important cell:
+ td.setAttribute("width", "*");
+ }
+ else
+ {
+ td.setAttribute("colspan", 2);
+ }
table.appendChild(tr);
if (valueType == "object" && value != null && precision > 0)
FireBug_toggleObjectRow(value, tr, precision);
}
function FireBug_toggleObjectRow(object, tr, precision)
{
var doc = tr.ownerDocument;
var twisty = tr.firstChild.firstChild;
+ var dataType = tr.className.match(/property|watch|DOM/)[0];
+ var expr = tr.getAttribute("jsExpression");
+ var exprAry = FireBug_makeObjectExpressionAry(tr);
- if (tr.nextSibling && tr.nextSibling.className == "propertyChildRow")
+ if (tr.nextSibling && (tr.nextSibling.className == (dataType + "ChildRow")))
{
FireBugUtils.removeClass(twisty, "open");
-
tr.parentNode.removeChild(tr.nextSibling);
+
+ FireBug.collapseObjectNode(dataType, exprAry);
}
else
{
FireBugUtils.setClass(twisty, "open");
var td = doc.createElement("td");
- td.className = "propertyChildBox";
- td.setAttribute("colspan", 2);
+ td.className = dataType + "ChildBox";
+ td.setAttribute("colspan", 3);
+ var table = doc.createElement("table");
+ table.setAttribute("jsExpression", expr);
+ td.appendChild(table);
- FireBug_logDOM(object, td, precision);
+ FireBug_logDOM(object, td.firstChild, precision, null, dataType);
var newRow = doc.createElement("tr");
- newRow.className = "propertyChildRow";
+ newRow.setAttribute("jsExpression", expr);
+ newRow.className = dataType + "ChildRow";
newRow.appendChild(td);
if (tr.nextSibling)
tr.parentNode.insertBefore(newRow, tr.nextSibling);
else
tr.parentNode.appendChild(newRow);
+ FireBug.expandObjectNode(dataType, exprAry);
+ }
+}
+
+function FireBug_makeObjectExpressionAry(tr)
+{
+ var ary = [tr.getAttribute("jsExpression")];
+ while (tr && tr.parentNode && tr.parentNode.parentNode &&
+ tr.parentNode.parentNode.parentNode &&
+ tr.parentNode.parentNode.className.indexOf("traceTable") == -1)
+ {
+ tr = tr.parentNode.parentNode.parentNode.parentNode.previousSibling;
+ ary.unshift(tr.getAttribute("jsExpression"));
}
+ return ary;
}
diff -rwNpu6 repository/chrome/content/firebug/utils.js all/chrome/content/firebug/utils.js
--- repository/chrome/content/firebug/utils.js 2006-08-16 19:48:26.000000000 +0200
+++ all/chrome/content/firebug/utils.js 2006-08-16 23:17:00.000000000 +0200
@@ -833,12 +833,26 @@ FireBugUtils.hasChildElements = function
return true;
}
return false;
}
+FireBugUtils.showItemsByView = function(popup, viewName)
+{
+ for (var i = 0; i < popup.childNodes.length; i++)
+ {
+ if (FireBugUtils.hasClass(popup.childNodes[i], "alwaysVisible") ||
+ FireBugUtils.hasClass(popup.childNodes[i], viewName))
+ {
+ popup.childNodes[i].hidden = false;
+ }
+ else
+ popup.childNodes[i].hidden = true;
+ }
+}
+
var contextDocument = document;
FireBugUtils.createElement = function(name, attrs, content)
{
var node = contextDocument.createElement(name);
@@ -951,6 +965,31 @@ function sliceArray(array, index)
var slice = [];
for (var i = index; i < array.length; ++i)
slice.push(array[i]);
return slice;
}
+
+function makeExpression(items)
+{
+ function escapeItem(item)
+ {
+ // Numbers.
+ if (item.match(/^[0-9]+$/i))
+ return "[" + item + "]";
+ // Words/other items that don't need quoting.
+ if (item.match(/^[a-z_][a-z0-9_]+$/i))
+ return "." + item;
+ // Quote everything else.
+ return "[" + item.quote() + "]";
+ };
+
+ if ((/\s/).test(items[0]))
+ var expression = "(" + items[0] + ")";
+ else
+ expression = items[0];
+
+ for (var i = 1; i < items.length; i++)
+ expression += escapeItem(items[i], false);
+
+ return expression;
+}
diff -rwNpu6 repository/chrome/content/firebug/views/console.js all/chrome/content/firebug/views/console.js
--- repository/chrome/content/firebug/views/console.js 2006-08-16 19:48:26.000000000 +0200
+++ all/chrome/content/firebug/views/console.js 2006-08-16 23:16:36.000000000 +0200
@@ -271,6 +271,220 @@ FireBugConsoleView.prototype.flushThrott
context.messageTimeout = setTimeout(function() { self.flushThrottleQueue(context); },
this.throttleFlushDelay);
}
else
context.messageTimeout = 0;
}
+
+FireBugConsoleView.prototype.setEvalObject = function(obj)
+{
+ if (obj == FireBug.currentContext.window)
+ FireBug.currentContext.evalObject = null;
+ else
+ FireBug.currentContext.evalObject = obj;
+ FireBugCommandLine.updatePrefix();
+}
+
+FireBugConsoleView.prototype.onContextPopup = function(event, popup, target)
+{
+ function clickContextItem(e)
+ {
+ var i = e.target.getAttribute("windowIndex");
+ self.setEvalObject(windows[i]);
+ windows = [];
+ self = null;
+ };
+
+ function focusContextItem(e)
+ {
+ if (!e.target.hasAttribute("windowIndex"))
+ return;
+ var i = e.target.getAttribute("windowIndex");
+ self.previewWindow(windows[i]);
+ };
+
+ var self = this;
+ var doc = popup.ownerDocument;
+
+ // Generating the submenus once is quite enough:
+ if (event.target != doc.getElementById("fbMainContextMenu"))
+ return;
+
+ this.onFocusContextItem = focusContextItem;
+ popup.addEventListener("DOMMenuItemActive", this.onFocusContextItem, true);
+
+ const MEDIATOR_CONTRACTID = "@mozilla.org/appshell/window-mediator;1";
+ const nsIWindowMediator = Components.interfaces.nsIWindowMediator;
+ var windowManager = Components.classes[MEDIATOR_CONTRACTID].getService(nsIWindowMediator);
+ var windowEnum = windowManager.getEnumerator(null);
+
+ var windows = [];
+ var menu = doc.getElementById("fbWindowMenu");
+ var submenu, subpopup, menuitem;
+ while (windowEnum.hasMoreElements())
+ {
+ var w = windowEnum.getNext();
+ windows.push(w);
+ var label = w.document.title;
+ if (w.document.documentElement.getAttribute("windowtype") == "navigator:browser")
+ {
+ submenu = doc.createElement("menu");
+ submenu.setAttribute("label", label);
+
+ subpopup = doc.createElement("menupopup");
+ menuitem = doc.createElement("menuitem");
+ menuitem.setAttribute("label", FireBug.strings.getString("BrowserWindow"));
+ menuitem.setAttribute("windowIndex", windows.length - 1);
+ menuitem.addEventListener("command", clickContextItem, true);
+ subpopup.appendChild(menuitem);
+ subpopup.appendChild(doc.createElement("menuseparator"));
+
+ var tabs = w.document.defaultView.gBrowser.mTabs;
+ for (var i = 0; i < tabs.length; ++i)
+ {
+ windows.push(tabs[i].linkedBrowser.contentWindow);
+ menuitem = doc.createElement("menuitem");
+ menuitem.setAttribute("label", tabs[i].label);
+ menuitem.setAttribute("windowIndex", windows.length - 1);
+ menuitem.addEventListener("command", clickContextItem, true);
+ subpopup.appendChild(menuitem);
+ }
+ submenu.appendChild(subpopup);
+ menu.appendChild(submenu)
+ }
+ else
+ {
+ menuitem = doc.createElement("menuitem");
+ menuitem.setAttribute("label", label);
+ menuitem.setAttribute("windowIndex", windows.length - 1);
+ menuitem.addEventListener("command", clickContextItem, true);
+ menu.appendChild(menuitem);
+ }
+ }
+}
+
+FireBugConsoleView.prototype.onContextHiding = function(event, popup, target)
+{
+ var doc = popup.ownerDocument;
+ var context = FireBug.currentContext;
+
+ //XXXgijs: prevent crashing 'cause Gecko likes to call this on every submenupopup
+ // and after the first time that submenupopup is gone. It doesn't like that.
+ if (event.target != doc.getElementById("fbMainContextMenu"))
+ return;
+
+ // cleanup:
+ FireBugUtils.clearNode(doc.getElementById("fbWindowMenu"));
+ popup.removeEventListener("DOMMenuItemActive", this.onFocusContextItem, true);
+ delete this.onFocusContextItem;
+
+ var cxNode = context.contextNodes["windowPreview"];
+ if (!cxNode)
+ return;
+ cxNode.parentNode.removeChild(cxNode);
+ delete context.contextNodes["windowPreview"];
+}
+
+FireBugConsoleView.prototype.previewWindow = function(win)
+{
+ var context = FireBug.currentContext;
+ var doc = FireBug.browser.contentDocument;
+ var headerStr = FireBug.strings.getFormattedString("SetEvalWin", [win.document.title]);
+ var drawingCtx;
+ if (!context.contextNodes["windowPreview"])
+ {
+ context.contextNodes["windowPreview"] = FireBug.createContextNode("windowPreview");
+ var header = doc.createElement("h1");
+ var canvas = doc.createElement("canvas");
+ context.contextNodes["windowPreview"].appendChild(header);
+ context.contextNodes["windowPreview"].appendChild(canvas);
+ }
+ else
+ {
+ header = context.contextNodes["windowPreview"].firstChild;
+ canvas = context.contextNodes["windowPreview"].lastChild;
+ }
+ header.innerHTML = FireBugUtils.escapeHTML(headerStr);
+
+ // Size everything correctly
+ var maxSize = FireBug.getIntPref("windowPreview.size");
+ var aspect = win.innerHeight / win.innerWidth;
+ var w, h, scale;
+ if (aspect > 1)
+ {
+ h = maxSize;
+ w = Math.round(maxSize / aspect);
+ scale = maxSize / win.innerHeight;
+ }
+ else
+ {
+ w = maxSize;
+ h = Math.round(maxSize * aspect);
+ scale = maxSize / win.innerWidth;
+ }
+ context.contextNodes["windowPreview"].style.left = Math.round((doc.width - w) / 2) + "px";
+ context.contextNodes["windowPreview"].style.width = (w + 100) + "px !important";
+ context.contextNodes["windowPreview"].style.maxWidth = (w + 10) + "px !important";
+ canvas.width = w;
+ canvas.height = h;
+ canvas.style.width = canvas.style.minWidth = canvas.style.maxWidth = w + "px";
+ canvas.style.height = canvas.style.minHeight = canvas.style.maxHeight = h + "px";
+
+ // Actually draw the window:
+ drawingCtx = canvas.getContext("2d");
+ drawingCtx.scale(scale, scale);
+ drawElaborateWindow(win, drawingCtx);
+}
+
+
+// Most of the following courtesy of Mossop's Nightly Tester Tools extension.
+// For windows with embedded and 's, the contents of those
+// do not get drawn. Hence the following hacks to get those to be painted as well:
+function drawElaborateWindow(shotWindow, ctx)
+{
+ const Ci = Components.interfaces;
+ var winbo = shotWindow.document.getBoxObjectFor(shotWindow.document.documentElement);
+ var winx = winbo.screenX;
+ var winy = winbo.screenY;
+
+ try
+ {
+ ctx.drawWindow(shotWindow, shotWindow.scrollX, shotWindow.scrollY,
+ shotWindow.innerWidth, shotWindow.innerHeight, "rgba(255, 255, 255, 255)");
+ }
+ catch (e) { }
+
+ var docshell = shotWindow.QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIWebNavigation)
+ .QueryInterface(Ci.nsIDocShell);
+ var shells = docshell.getDocShellEnumerator(Ci.nsIDocShellTreeItem.typeAll,
+ Ci.nsIDocShell.ENUMERATE_FORWARDS);
+ while (shells.hasMoreElements())
+ {
+ var shell = shells.getNext().QueryInterface(Ci.nsIDocShell);
+ try
+ {
+ if (shell == docshell)
+ continue;
+
+ shell.QueryInterface(Ci.nsIBaseWindow);
+ if (!shell.visibility)
+ continue;
+
+ var shellwin = shell.QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIDOMWindow);
+ var shellbo = shellwin.document.getBoxObjectFor(shellwin.document.documentElement);
+
+ ctx.save();
+ try
+ {
+ ctx.translate(shellbo.screenX - winx + shellwin.scrollX,
+ shellbo.screenY - winy + shellwin.scrollY);
+ ctx.drawWindow(shellwin, shellwin.scrollX, shellwin.scrollY, shellwin.innerWidth,
+ shellwin.innerHeight, "rgba(255, 255, 255, 255)");
+ }
+ catch (e) { }
+ ctx.restore();
+ }
+ catch (e) { }
+ }
+}
diff -rwNpu6 repository/chrome/content/firebug/views/dom.js all/chrome/content/firebug/views/dom.js
--- repository/chrome/content/firebug/views/dom.js 2006-08-16 19:45:40.000000000 +0200
+++ all/chrome/content/firebug/views/dom.js 2006-08-16 23:17:00.000000000 +0200
@@ -74,11 +74,8 @@ FireBugDOMView.prototype.inspect = funct
FireBugDOMView.prototype.stopInspecting = function(cancelled)
{
}
FireBugDOMView.prototype.setOption = function(name, value)
{
- if (name == "showFunctions")
- this.contextNode.setAttribute("showFunctions", value);
- else if (name == "showConstants")
- this.contextNode.setAttribute("showConstants", value);
+
}
diff -rwNpu6 repository/chrome/content/firebug/views/js.js all/chrome/content/firebug/views/js.js
--- repository/chrome/content/firebug/views/js.js 2006-08-16 19:48:26.000000000 +0200
+++ all/chrome/content/firebug/views/js.js 2006-08-16 23:51:54.000000000 +0200
@@ -124,18 +124,27 @@ FireBugJSView.prototype.saveState = func
state.lastScriptScrollY = contextNode.scrollTop;
}
}
FireBugJSView.prototype.setOption = function(name, value)
{
- if (name == "enableDebugger")
+ var cxNode = FireBug.currentContext.contextNodes["trace"];
+ switch (name)
{
+ case "enableDebugger":
if (value)
this.enable();
else
this.disable();
+ break;
+ case "showLocals":
+ cxNode.setAttribute("showLocals", value)
+ break;
+ case "showWatches":
+ cxNode.setAttribute("showWatches", value)
+ break;
}
}
FireBugJSView.prototype.searchable = true;
FireBugJSView.prototype.search = function(text)
@@ -387,13 +396,29 @@ FireBugJSView.prototype.clearBreakpoint
{
this.firebugService.clearBreakpoint(href, lineNo);
}
FireBugJSView.prototype.clearAllBreakpoints = function(context)
{
- this.firebugService.clearAllBreakpoints();
+ var ary = [];
+ for (var k in context.scriptFiles)
+ {
+ ary.push(k);
+ var scriptNode = this.contextNode.scriptNodes[k];
+ if (!scriptNode)
+ continue;
+ // remove visual breakpoint markers:
+ this.firebugService.enumerateBreakpoints(k,
+ {
+ call: function(lineNo)
+ {
+ scriptNode.childNodes[lineNo-1].removeAttribute("breakpoint");
+ }
+ })
+ }
+ this.firebugService.clearAllBreakpoints(ary.length, ary);
}
///////////////////////////////////////////////////////////////////////////////////////////////////
FireBugJSView.prototype.isScriptHref = function(href, context)
{
@@ -625,35 +650,15 @@ FireBugJSView.prototype.showStackFrame =
if (!this.browserLoaded)
{
this.postBrowserLoad = bindFunction(this.showStackFrame, this, context, frame);
return;
}
- else if (!context.contextNodes["trace"])
- {
- context.contextNodes["trace"] = FireBug.createContextNode("trace");
- this.debugBrowser.contentDocument.body.appendChild(context.contextNodes["trace"]);
- }
- else
- FireBugUtils.clearNode(context.contextNodes["trace"]);
-
- var data = {};
- data["this"] = frame.thisValue.getWrappedValue();
-
- var listValue = {value: null}, lengthValue = {value: 0};
- frame.scope.getProperties(listValue, lengthValue);
-
- for (var i = 0; i < lengthValue.value; ++i)
- {
- var prop = listValue.value[i];
- var name = prop.name.getWrappedValue();
- var value = prop.value.getWrappedValue();
- data[name] = value;
- }
- FireBug_logDOM(data, context.contextNodes["trace"]);
+ // Display locals & watches
+ this.updateWatchNode(context);
for (var menu = this.stackMenu.firstChild; menu; menu = menu.nextSibling)
{
if (menu.stackFrame == frame)
{
this.stackList.selectedItem = menu;
@@ -674,12 +679,123 @@ FireBugJSView.prototype.showStackFrame =
this.showScript(scriptFile, frame.line);
this.showWatchNode(context.contextNodes["trace"]);
}
+FireBugJSView.prototype.updateWatchNode = function(context)
+{
+ function onKP(e) {
+ if (e.keyCode == 13) // return
+ FireBug.setWatch(input.value);
+
+ if (e.keyCode == 27 || e.keyCode == 13) // escape or return
+ input.value = "";
+ };
+
+ var doc = this.debugBrowser.contentDocument;
+ if (!context.contextNodes["trace"])
+ {
+ context.contextNodes["trace"] = FireBug.createContextNode("trace");
+ doc.body.appendChild(context.contextNodes["trace"]);
+
+ // Quick watch entering
+ // Tiny table to frame this in:
+ var container = doc.createElement("table");
+ container.id = "watchEntryContainer";
+ container.appendChild(doc.createElement("tr"));
+ container.firstChild.appendChild(doc.createElement("td"));
+ container.firstChild.appendChild(doc.createElement("td"));
+ var watchLabel = doc.createTextNode(FireBug.strings.getString("Watch"));
+ container.firstChild.firstChild.appendChild(watchLabel);
+
+ // Actual input:
+ var input = doc.createElement("input");
+ input.id = "quickWatchBox";
+ input.className = "inlineJSEditor";
+ input.addEventListener("keypress", onKP, false);
+ container.firstChild.lastChild.appendChild(input);
+ context.contextNodes["trace"].appendChild(container);
+ }
+
+ // Create a table for the locals and watches.
+ var table = doc.createElement("table");
+ table.className = "traceTable";
+
+ // Display watches
+ for (var expr in context.watches)
+ context.watches[expr] = FireBugCommandLine.evaluate(expr, true);
+
+
+ FireBug_logDOM(context.watches, table, null, null, "watch");
+
+ var frame = context.currentFrame;
+
+ // Gather local variables
+ var locals = {};
+ locals["this"] = frame.thisValue.getWrappedValue();
+
+ var listValue = {value: null}, lengthValue = {value: 0};
+ frame.scope.getProperties(listValue, lengthValue);
+
+ for (var i = 0; i < lengthValue.value; ++i)
+ {
+ var prop = listValue.value[i];
+ var name = prop.name.getWrappedValue();
+ var value = prop.value.getWrappedValue();
+ locals[name] = value;
+ }
+
+
+ // Display local variables
+ FireBug_logDOM(locals, table, null, null, "property");
+
+ // Expand the nodes if they were expanded before:
+ var newTreeState = {
+ property: {},
+ watch: {}
+ };
+
+ function expandSubNodes(treeNode, newTreeNode, parentTable, obj)
+ {
+ for (var i = 0; i < parentTable.rows.length; ++i)
+ {
+ // Skip child containers:
+ var tr = parentTable.rows[i];
+ if (tr.className.indexOf("ChildRow") > 0)
+ continue;
+
+ var currentExpr = tr.getAttribute("jsExpression");
+ if (currentExpr in treeNode)
+ {
+ // This used to be expanded, so do that now
+ FireBug_toggleObjectRow(obj[currentExpr], tr);
+ if (!(currentExpr in newTreeNode))
+ newTreeNode[currentExpr] = {};
+
+ // Maybe some of its child nodes were expanded as well.
+ expandSubNodes(treeNode[currentExpr], newTreeNode[currentExpr],
+ tr.nextSibling.firstChild.firstChild, obj[currentExpr]);
+ }
+ }
+ }
+ expandSubNodes(context.treeState.watch, newTreeState.watch, table.firstChild, context.watches);
+ expandSubNodes(context.treeState.property, newTreeState.property, table.lastChild, locals);
+ // Update so we lose nodes that are no longer there:
+ context.treeState = newTreeState;
+
+ var traceNode = context.contextNodes["trace"];
+ traceNode.setAttribute("showFunctions", FireBug.showFunctions);
+ traceNode.setAttribute("showConstants", FireBug.showConstants);
+ traceNode.setAttribute("showLocals", FireBug.showLocals);
+ traceNode.setAttribute("showWatches", FireBug.showWatches);
+ if (FireBugUtils.hasClass(traceNode.lastChild, "traceTable"))
+ traceNode.removeChild(traceNode.lastChild);
+ traceNode.appendChild(table);
+}
+
FireBugJSView.prototype.showWatchNode = function(watchNode)
{
if (watchNode == this.watchNode)
return;
if (this.watchNode)
@@ -888,6 +1004,67 @@ FireBugJSView.prototype.onBrowserLoad =
{
var postBrowserLoad = this.postBrowserLoad;
this.postBrowserLoad = null;
postBrowserLoad();
}
}
+
+FireBugJSView.prototype.onContextPopup = function(event, popup, target)
+{
+ var doc = popup.ownerDocument;
+
+ // Construct a submenu for the existing breakpoints.
+ var bpMenu = doc.getElementById("fbBreakPointMenu");
+ FireBugUtils.clearNode(bpMenu);
+
+ for (var key in FireBug.currentContext.scriptFiles)
+ {
+ var lines = [];
+ // Insert an item for each breakpoint in this file
+ function addLine(line) { lines.push(line); };
+ this.firebugService.enumerateBreakpoints(key, {call: addLine});
+ lines.sort();
+ if (lines.length > 0 && bpMenu.childNodes.length > 0)
+ bpMenu.appendChild(doc.createElement("menuseparator"));
+
+ for (var i = 0; i < lines.length; ++i)
+ {
+ var line = lines[i];
+ var label = FireBug.strings.getFormattedString("Line", [key, line]);
+ var menuitem = doc.createElement("menuitem");
+ menuitem.setAttribute("label", label);
+ menuitem.setAttribute("href", key);
+ menuitem.setAttribute("line", line);
+ menuitem.setAttribute("crop", "center");
+ menuitem.setAttribute("oncommand", "FireBug.onMenuBreakpointClick(event)");
+ bpMenu.appendChild(menuitem);
+ }
+ }
+
+ bpMenu.parentNode.setAttribute("disabled", "true");
+ doc.getElementById("fbMainCx_setBreakpoint").setAttribute("disabled", "true");
+ doc.getElementById("fbMainCx_clearBreakpoint").setAttribute("disabled", "true");
+ doc.getElementById("cmd_clearAllBreakpoints").setAttribute("disabled", "true");
+
+ // If there are breakpoints, enable the submenu and the clear all item.
+ if (bpMenu.childNodes.length > 0)
+ {
+ bpMenu.parentNode.removeAttribute("disabled");
+ doc.getElementById("cmd_clearAllBreakpoints").removeAttribute("disabled");
+ }
+
+ while (target)
+ {
+ if (FireBugUtils.hasClass(target, "sourceRow") && (target.nodeName == "DIV"))
+ break;
+ target = target.parentNode;
+ }
+
+ if (!target)
+ return;
+
+ // If we're on a source line, enable/disable the right menus:
+ if (target.getAttribute("breakpoint") == "true")
+ doc.getElementById("fbMainCx_clearBreakpoint").removeAttribute("disabled");
+ else
+ doc.getElementById("fbMainCx_setBreakpoint").removeAttribute("disabled");
+}
diff -rwNpu6 repository/chrome/content/firebug/views/view.js all/chrome/content/firebug/views/view.js
--- repository/chrome/content/firebug/views/view.js 2006-08-16 19:48:26.000000000 +0200
+++ all/chrome/content/firebug/views/view.js 2006-08-16 23:16:36.000000000 +0200
@@ -107,6 +107,14 @@ FireBugView.prototype.clear = function()
{
}
FireBugView.prototype.setOption = function(name, value)
{
}
+
+FireBugView.prototype.onContextPopup = function(event, popup, target)
+{
+}
+
+FireBugView.prototype.onContextHiding = function(event, popup, target)
+{
+}
diff -rwNpu6 repository/chrome/locale/en-US/firebug.dtd all/chrome/locale/en-US/firebug.dtd
--- repository/chrome/locale/en-US/firebug.dtd 2006-08-16 19:48:26.000000000 +0200
+++ all/chrome/locale/en-US/firebug.dtd 2006-08-16 23:18:56.000000000 +0200
@@ -1,8 +1,9 @@
+
@@ -39,15 +40,25 @@
+
+
+
+
+
+
+
+
+
+
diff -rwNpu6 repository/chrome/locale/en-US/firebug.properties all/chrome/locale/en-US/firebug.properties
--- repository/chrome/locale/en-US/firebug.properties 2006-08-16 19:48:26.000000000 +0200
+++ all/chrome/locale/en-US/firebug.properties 2006-08-16 23:19:42.000000000 +0200
@@ -1,8 +1,11 @@
SyncWarning=Synchronous XMLHttpRequests don't work properly in FireBug due to a bug in Firefox. There may be problems with this page.
Loading=Loading...
Post=Post
Response=Response
Headers=Headers
Assertion=Assertion Failure
+BrowserWindow=Browser XUL Window
Line=%S (line %S)
StackItem=%S (%S line %S)
+SetEvalWin=Set eval Window to: %S
+Watch=Watch:
diff -rwNpu6 repository/chrome/skin/classic/views/console.css all/chrome/skin/classic/views/console.css
--- repository/chrome/skin/classic/views/console.css 2006-08-16 19:48:26.000000000 +0200
+++ all/chrome/skin/classic/views/console.css 2006-08-16 23:17:00.000000000 +0200
@@ -304,47 +304,99 @@ body {
.infoLabel {
font-weight: bold;
}
/*****************************************************************************************/
-.propertyLabel {
+.traceTable {
+ border-spacing: 0;
+ border-collapse: collapse;
+}
+
+.propertyLabel,
+.DOMLabel,
+.watchLabel {
padding-left: 20px;
- padding-right: 20px;
+ padding-right: 25px;
font-weight: bold;
width: 200px;
-moz-user-select: none;
}
-.propertyContainerLabel {
+.propertyContainerLabel,
+.DOMContainerLabel,
+.watchContainerLabel {
padding-left: 0;
}
-.propertyContainerName:hover {
+.propertyContainerName:hover,
+.DOMContainerName:hover,
+.watchContainerName:hover {
cursor: pointer;
color: #0000FF;
text-decoration: underline;
}
-.propertyValue {
+.propertyValue,
+.DOMValue,
+.watchValue {
vertical-align: top;
font-family: Monaco, monospace;
}
-.propertyChildBox {
+.propertyChildBox,
+.DOMChildBox,
+.watchChildBox {
padding-left: 20px;
}
-.contextNode[showFunctions="false"] .propertyRow-function {
- display: none;
+.watchBody {
+ background-color: #FAFAD2;
}
-.contextNode[showConstants="false"] .propertyRow-constant {
+.contextNode[showLocals="false"] .propertyBody,
+.contextNode[showWatches="false"] .watchBody,
+.contextNode[showFunctions="false"] .propertyRow-function,
+.contextNode[showFunctions="false"] .DOMRow-function,
+.contextNode[showFunctions="false"] .watchRow-function,
+.contextNode[showConstants="false"] .propertyRow-constant,
+.contextNode[showConstants="false"] .DOMRow-constant,
+.contextNode[showConstants="false"] .watchRow-constant {
display: none;
}
+.watchRemoveButton {
+ list-style-image: url("chrome://global/skin/icons/close.png");
+ -moz-image-region: rect(0px, 16px, 16px, 0px);
+}
+
+.watchRemoveButton:hover {
+ -moz-image-region: rect(0px, 32px, 16px, 16px);
+}
+
+.watchRemoveButton:hover:active {
+ -moz-image-region: rect(0px, 48px, 16px, 32px);
+}
+
+#watchEntryContainer {
+ width: 95%;
+}
+
+.inlineJSEditor {
+ -moz-appearance: none;
+ margin: 0;
+ padding: 2px 4px;
+ font-family: Monaco, monospace;
+}
+
+#quickWatchBox {
+ width: 100%;
+ padding: 0;
+ padding-bottom: 3px;
+}
+
/*****************************************************************************************/
.editor {
outline: none !important;
border: 1px solid red !important;
padding: 0;
@@ -373,12 +425,33 @@ body {
.disclosure.open {
display: block;
}
/*****************************************************************************************/
+.contextNode-windowPreview {
+ top: 0;
+ background-color: #CFDCFF;
+ border: 1px solid #5F8EFF;
+ display: block !important;
+ overflow: hidden !important;
+ height: auto !important;
+}
+
+.contextNode-windowPreview h1 {
+ margin: 3px;
+ font-size: 14px;
+ font-family: Lucida Grande, sans-serif;
+ font-weight: bold;
+}
+.contextNode-windowPreview canvas {
+ display: block;
+ margin: 3px auto;
+ overflow: hidden;
+}
+
.sourceRow {
font-family: Monaco, monospace;
font-size: 11px;
}
.sourceLine {
diff -rwNpu6 repository/components/firebug-service.js all/components/firebug-service.js
--- repository/components/firebug-service.js 2006-08-16 21:12:54.000000000 +0200
+++ all/components/firebug-service.js 2006-08-16 23:53:06.000000000 +0200
@@ -169,22 +169,23 @@ FireBugService.prototype.clearBreakpoint
{
var pc = script.lineToPc(line, PCMAP_SOURCETEXT);
script.clearBreakpoint(pc);
}
}
-FireBugService.prototype.clearAllBreakpoints = function()
+FireBugService.prototype.clearAllBreakpoints = function(count, ary)
{
- for (var href in this.breakpoints)
+ for (var i = 0; i < ary.length; ++i)
{
- var breakpoints = this.breakpoints[href];
- for (var i = 0; i < breakpoints.length; ++i)
- this.clearBreakpoint(href, breakpoints[i]);
+ var breakpoints = this.breakpoints[ary[i]];
+ if (!breakpoints)
+ continue;
+ for (var j = 0; j < breakpoints.length; ++j)
+ this.clearBreakpoint(ary[i], breakpoints[j]);
+ delete this.breakpoints[ary[i]];
}
-
- this.breakpoints = {};
}
FireBugService.prototype.enumerateBreakpoints = function(href, cb)
{
href = this.normalizeHref(href);
var breakpoints = this.breakpoints[href];
diff -rwNpu6 repository/components/nsIFireBug.idl all/components/nsIFireBug.idl
--- repository/components/nsIFireBug.idl 2006-08-16 21:12:54.000000000 +0200
+++ all/components/nsIFireBug.idl 2006-08-16 23:53:06.000000000 +0200
@@ -33,12 +33,12 @@ interface nsIFireBug : nsISupports
void registerDebugger(in nsIFireBugDebugger debugger);
void unregisterDebugger(in nsIFireBugDebugger debugger);
void setBreakpoint(in string href, in unsigned long line);
void clearBreakpoint(in string href, in unsigned long line);
- void clearAllBreakpoints();
+ void clearAllBreakpoints(in PRUint32 count, [array, size_is(count)] in string hrefArray);
void enumerateBreakpoints(in string href, in nsIFireBugBreakpointCallback cb);
readonly attribute nsIDOMWindow lastErrorWindow;
};
Bestanden repository/components/nsIFireBug.xpt en all/components/nsIFireBug.xpt verschillen
diff -rwNpu6 repository/defaults/preferences/firebug.js all/defaults/preferences/firebug.js
--- repository/defaults/preferences/firebug.js 2006-08-16 21:12:54.000000000 +0200
+++ all/defaults/preferences/firebug.js 2006-08-16 23:53:06.000000000 +0200
@@ -17,8 +17,14 @@ pref("extensions.firebug.throttleLimit",
pref("extensions.firebug.showAllStyles", false);
pref("extensions.firebug.showFunctions", true);
pref("extensions.firebug.showConstants", false);
+pref("extensions.firebug.showLocals", true);
+pref("extensions.firebug.showWatches", true);
+
pref("extensions.firebug.enableDebugger", true);
pref("extensions.firebug.breakOnErrors", false);
+
+
+pref("extensions.firebug.windowPreview.size", 320);
diff -rwNpu6 repository/install.rdf all/install.rdf
--- repository/install.rdf 2006-08-16 21:12:54.000000000 +0200
+++ all/install.rdf 2006-08-16 23:53:06.000000000 +0200
@@ -2,13 +2,13 @@
firebug@software.joehewitt.com
- 0.4.0.0.1
+ 0.4.0.0.4
2
{ec8030f7-c20a-464f-9b0e-13a3a9e97384}