[Pkg-mozext-commits] [firebug] 01/05: Imported Upstream version 1.13.0~a9

David Prévot taffit at moszumanska.debian.org
Sat Feb 15 17:38:01 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository firebug.

commit 53d9bb8a29b8a15fa4da171c565df4cf6b9df516
Author: David Prévot <taffit at debian.org>
Date:   Sat Feb 15 08:52:11 2014 -0400

    Imported Upstream version 1.13.0~a9
---
 content/firebug/branch.properties                  |  2 +-
 content/firebug/chrome/reps.js                     | 31 ++++++--
 content/firebug/chrome/shortcuts.js                | 27 ++-----
 content/firebug/console/commandHistory.js          | 14 ++--
 .../firebug/console/commands/getEventListeners.js  | 12 ++--
 content/firebug/console/consolePanel.js            |  2 +
 content/firebug/debugger/debuggerLib.js            | 12 ++--
 content/firebug/firefox/browserCommands.js         | 82 +++++++++++++++++++---
 content/firebug/firefox/browserOverlay.js          |  6 ++
 content/firebug/firefox/customizeShortcuts.js      | 15 ++--
 content/firebug/lib/events.js                      | 20 +++---
 content/firebug/lib/url.js                         |  6 +-
 content/firebug/lib/wrapper.js                     | 12 ++++
 content/firebug/net/netReps.js                     | 30 +++++++-
 defaults/preferences/firebug.js                    |  2 +
 install.rdf                                        | 10 +--
 locale/en-US/firebug.properties                    |  7 ++
 modules/loader.js                                  |  2 +-
 skin/classic/net.css                               | 13 +++-
 19 files changed, 223 insertions(+), 82 deletions(-)

diff --git a/content/firebug/branch.properties b/content/firebug/branch.properties
index 870bee1..f4e322f 100644
--- a/content/firebug/branch.properties
+++ b/content/firebug/branch.properties
@@ -1,5 +1,5 @@
 # DO NOT MERGE INTO TRUNK
-RELEASE=.0a8
+RELEASE=.0a9
 VERSION=1.13
 TRUNK=
 # To allow build.xml to drop the xpi directly into the svn working copy for getfirebug.com
diff --git a/content/firebug/chrome/reps.js b/content/firebug/chrome/reps.js
index 10cd76f..ec9c2db 100644
--- a/content/firebug/chrome/reps.js
+++ b/content/firebug/chrome/reps.js
@@ -1179,12 +1179,18 @@ FirebugReps.Element = domplate(Rep,
         System.copyToClipboard(elt.innerHTML);
     },
 
-    copyXPath: function(elt)
+    copyMinimalXPath: function(elt)
     {
         var xpath = Xpath.getElementXPath(elt);
         System.copyToClipboard(xpath);
     },
 
+    copyXPath: function(elt)
+    {
+        var xpath = Xpath.getElementTreeXPath(elt);
+        System.copyToClipboard(xpath);
+    },
+
     copyCSSPath: function(elt)
     {
         var csspath = Css.getElementCSSPath(elt);
@@ -1294,6 +1300,8 @@ FirebugReps.Element = domplate(Rep,
         var items = [];
         var clipboardContent = System.getStringDataFromClipboard();
         var isEltRoot = (elt === elt.ownerDocument.documentElement);
+        var minimalXPath = Xpath.getElementXPath(elt);
+        var absoluteXPath = Xpath.getElementTreeXPath(elt);
 
         if (Xml.isElementHTMLOrXHTML(elt))
             type = "HTML";
@@ -1323,13 +1331,28 @@ FirebugReps.Element = domplate(Rep,
             });
         }
 
-        items = items.concat([
+        items.push(
             {
                 label: "CopyXPath",
                 tooltiptext: "html.tip.Copy_XPath",
                 id: "fbCopyXPath",
-                command: Obj.bindFixed(this.copyXPath, this, elt)
-            },
+                command: this.copyXPath.bind(this, elt)
+            }
+        );
+
+        if (minimalXPath != absoluteXPath)
+        {
+            items.push(
+                {
+                    label: "CopyMinimalXPath",
+                    tooltiptext: "html.tip.Copy_Minimal_XPath",
+                    id: "fbCopyMinimalXPath",
+                    command: this.copyMinimalXPath.bind(this, elt)
+                }
+            );
+        }
+
+        items = items.concat([
             {
                 label: "Copy_CSS_Path",
                 tooltiptext: "html.tip.Copy_CSS_Path",
diff --git a/content/firebug/chrome/shortcuts.js b/content/firebug/chrome/shortcuts.js
index b2e2d9e..71c5875 100644
--- a/content/firebug/chrome/shortcuts.js
+++ b/content/firebug/chrome/shortcuts.js
@@ -6,8 +6,9 @@ define([
     "firebug/firebug",
     "firebug/chrome/firefox",
     "firebug/firefox/customizeShortcuts",
+    "firebug/firefox/browserCommands"
 ],
-function(Module, Obj, Firebug, Firefox, CustomizeShortcuts) {
+function(Module, Obj, Firebug, Firefox, CustomizeShortcuts, BrowserCommands) {
 
 // ********************************************************************************************* //
 // Constants
@@ -40,20 +41,15 @@ Firebug.ShortcutsModel = Obj.extend(Module,
 
         // We need to touch keyset to apply keychanges without restart
         this.keysets = [];
-        this.disabledKeyElements = [];
+        BrowserCommands.resetDisabledKeys(window.top);
+
         shortcutNames.forEach(this.initShortcut, this);
 
         this.keysets.forEach(function(keyset) {
             keyset.parentNode.insertBefore(keyset, keyset.nextSibling);
         });
 
-        for (var i=0; i<this.disabledKeyElements.length; i++)
-        {
-            var elem = this.disabledKeyElements[i];
-            elem.removeAttribute("disabled");
-        }
-
-        this.keysets = this.disabledKeyElements = null;
+        this.keysets = null;
     },
 
     initShortcut: function(element, index, array)
@@ -109,20 +105,11 @@ Firebug.ShortcutsModel = Obj.extend(Module,
         if (FBTrace.DBG_SHORTCUTS)
         {
             FBTrace.sysout("Firebug.ShortcutsModel.initShortcut; global shortcut",
-                {key: key, modifiers: modifiers});
+                {key: key, modifiers: modifiers, command: "cmd_firebug_" + element});
         }
 
         // Disable existing global shortcuts
-        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--)
-        {
-            var existingKeyElement = existingKeyElements[i];
-            existingKeyElement.setAttribute("disabled", "true");
-            this.disabledKeyElements.push(existingKeyElement);
-        }
+        BrowserCommands.disableExistingShortcuts(keyElem.ownerDocument, attr, key, modifiers);
 
         keyElem.setAttribute("modifiers", modifiers);
         keyElem.setAttribute(attr, key);
diff --git a/content/firebug/console/commandHistory.js b/content/firebug/console/commandHistory.js
index 05dbf4e..b2cae86 100644
--- a/content/firebug/console/commandHistory.js
+++ b/content/firebug/console/commandHistory.js
@@ -7,9 +7,10 @@ define([
     "firebug/lib/css",
     "firebug/lib/dom",
     "firebug/lib/string",
+    "firebug/lib/options",
     "firebug/console/autoCompleter"
 ],
-function(Firebug, Events, Wrapper, Css, Dom, Str) {
+function(Firebug, Events, Wrapper, Css, Dom, Str, Options) {
 
 // ********************************************************************************************* //
 // Constants
@@ -21,8 +22,6 @@ const Ci = Components.interfaces;
 
 Firebug.CommandHistory = function()
 {
-    const commandHistoryMax = 1000;
-
     var commandsPopup = Firebug.chrome.$("fbCommandHistory");
     var commands = this.commands = [];
     var commandPointer = 0;
@@ -41,9 +40,12 @@ Firebug.CommandHistory = function()
     {
         if (commands[commandInsertPointer] != command)
         {
-            commandInsertPointer++;
-            if (commandInsertPointer >= commandHistoryMax)
-                commandInsertPointer = 0;
+            var commandHistoryMax = Options.get("consoleCommandHistoryMax")
+
+            if (commandHistoryMax > 0 && commandInsertPointer + 1 >= commandHistoryMax)
+                commands.shift();
+            else
+                commandInsertPointer++;
 
             commands[commandInsertPointer] = command;
         }
diff --git a/content/firebug/console/commands/getEventListeners.js b/content/firebug/console/commands/getEventListeners.js
index f222f13..0cabda6 100644
--- a/content/firebug/console/commands/getEventListeners.js
+++ b/content/firebug/console/commands/getEventListeners.js
@@ -1,5 +1,5 @@
 /* See license.txt for terms of usage */
-/*global define:1*/
+/*global define:1, window:1*/
 
 define([
     "firebug/firebug",
@@ -198,7 +198,6 @@ function onExecuteCommand(context, args)
  * Get sorted list of listeners registered for the target and list of listeners
  * registered for all ancestor elements (if required).
  *
- * @param context {TabContext} The current Firebug context.
  * @param target {Object} The event target for which listeners should be returned.
  * @param includeParents {Boolean} True if parent listeners should also be returned.
  */
@@ -360,7 +359,7 @@ function getMutationObserversForTarget(target, parent)
     var result = [];
 
     // getBoundMutationObservers() API has been introduced in Firefox 23
-    // Also |window| that can be passed as an event target doeesn't implement
+    // Also |window| that can be passed as an event target doesn't implement
     // the method.
     if (typeof(target.getBoundMutationObservers) != "function")
         return result;
@@ -381,6 +380,11 @@ function getMutationObserversForTarget(target, parent)
             if (parent && !info.subtree)
                 continue;
 
+            // Prevent chrome observers from leaking into the page.
+            var callback = observer.mutationCallback;
+            if (!callback || Wrapper.isChromeObject(callback, window))
+                continue;
+
             // OK, insert the observer into the result array.
             result.push({
                 attributeOldValue: info.attributeOldValue,
@@ -390,7 +394,7 @@ function getMutationObserversForTarget(target, parent)
                 childList: info.childList,
                 subtree: info.subtree,
                 observedNode: info.observedNode,
-                mutationCallback: observer.mutationCallback,
+                mutationCallback: callback,
             });
         }
     }
diff --git a/content/firebug/console/consolePanel.js b/content/firebug/console/consolePanel.js
index 3b4fe2e..42d94ea 100644
--- a/content/firebug/console/consolePanel.js
+++ b/content/firebug/console/consolePanel.js
@@ -283,6 +283,8 @@ Firebug.ConsolePanel.prototype = Obj.extend(ActivablePanel,
                 "console.option.tip.Show_Network_Errors"),
             this.getShowStackTraceMenuItem(),
             this.getStrictOptionMenuItem(),
+            Menu.optionMenu("console.option.Group_Log_Messages", "console.groupLogMessages",
+                "console.option.tip.Group_Log_Messages"),
             "-",
             Menu.optionMenu("console.option.Show_Command_Editor", "commandEditor",
                 "console.option.tip.Show_Command_Editor"),
diff --git a/content/firebug/debugger/debuggerLib.js b/content/firebug/debugger/debuggerLib.js
index e8b5be2..eca46b7 100644
--- a/content/firebug/debugger/debuggerLib.js
+++ b/content/firebug/debugger/debuggerLib.js
@@ -19,9 +19,6 @@ var comparator = Xpcom.CCSV("@mozilla.org/xpcom/version-comparator;1", "nsIVersi
 var appInfo = Xpcom.CCSV("@mozilla.org/xre/app-info;1", "nsIXULAppInfo");
 var pre27 = (comparator.compare(appInfo.version, "27.0*") < 0);
 
-// Debuggees
-var dbgGlobalWeakMap = new WeakMap();
-
 // Module object
 var DebuggerLib = {};
 
@@ -57,7 +54,9 @@ DebuggerLib.getDebuggeeGlobal = function(context, global)
 {
     global = global || context.getCurrentGlobal();
 
-    var dbgGlobal = dbgGlobalWeakMap.get(global.document);
+    if (!context.inactiveDbgGlobalWeakMap)
+        context.inactiveDbgGlobalWeakMap = new WeakMap();
+    var dbgGlobal = context.inactiveDbgGlobalWeakMap.get(global.document);
     if (!dbgGlobal)
     {
         var dbg = getInactiveDebuggerForContext(context);
@@ -77,7 +76,7 @@ DebuggerLib.getDebuggeeGlobal = function(context, global)
             dbgGlobal = dbg.addDebuggee(contentView);
             dbg.removeDebuggee(contentView);
         }
-        dbgGlobalWeakMap.set(global.document, dbgGlobal);
+        context.inactiveDbgGlobalWeakMap.set(global.document, dbgGlobal);
 
         if (FBTrace.DBG_DEBUGGER)
             FBTrace.sysout("new debuggee global instance created", dbgGlobal);
@@ -93,9 +92,6 @@ DebuggerLib._closureInspectionRequiresDebugger = function()
 
 /**
  * Runs a callback with a debugger for a global temporarily enabled.
- *
- * Currently this throws an exception unless the Script panel is enabled, because
- * otherwise debug GCs kill us.
  */
 DebuggerLib.withTemporaryDebugger = function(context, global, callback)
 {
diff --git a/content/firebug/firefox/browserCommands.js b/content/firebug/firefox/browserCommands.js
index dbb1f1d..5a3568e 100644
--- a/content/firebug/firefox/browserCommands.js
+++ b/content/firebug/firefox/browserCommands.js
@@ -70,31 +70,93 @@ var BrowserCommands =
 
     overlayShortcuts: function(doc)
     {
-        var keyset = $(doc, "mainKeyset");
+        function getShortcutInfo(shortcut)
+        {
+            var tokens = shortcut.split(" ");
+            var key = tokens.pop();
+            var modifiers = tokens.join(",");
+            var attr = "";
+            if (key.length <= 1)
+                attr = "key";
+            else if (doc.defaultView.KeyEvent["DOM_"+key])
+                attr = "keycode";
+
+            return {attr: attr, key: key, modifiers: modifiers};
+        }
+
+        var self = this;
+        function disableAllExistingShortcuts()
+        {
+            Services.obs.removeObserver(this, "devtools-loaded", false);
+
+            for (var i = 0; i < shortcuts.length; i++)
+            {
+                var id = shortcuts[i];
+                var shortcut = Options.get("key.shortcut." + id);
+                var {attr, key, modifiers} = getShortcutInfo(shortcut);
+
+                // Disable existing global shortcuts
+                self.disableExistingShortcuts.call(self, node, attr, key, modifiers);
+            }
+        }
 
-        for (var i=0; i<shortcuts.length ; i++)
+        var win = $(doc, "main-window");
+        var keyset = $el(doc, "keyset", {id: "firebugKeyset"}, win);
+
+        for (var i = 0; i < shortcuts.length; i++)
         {
             var id = shortcuts[i];
             var shortcut = Options.get("key.shortcut." + id);
-            var tokens = shortcut.split(" ");
-            var key = tokens.pop();
+            var {attr, key, modifiers} = getShortcutInfo(shortcut);
 
             var keyProps = {
                 id: "key_firebug_" + id,
-                modifiers: tokens.join(","),
+                modifiers: modifiers,
                 command: "cmd_firebug_" + id,
                 position: 1
             };
-
-            if (key.length <= 1)
-                keyProps.key = key;
-            else if (doc.defaultView.KeyEvent["DOM_"+key])
-                keyProps.keycode = key;
+            keyProps[attr] = key;
 
             $el(doc, "key", keyProps, keyset);
+
+            // Disable existing global shortcuts
+            this.disableExistingShortcuts(doc, attr, key, modifiers);
         }
 
+        Services.obs.addObserver(disableAllExistingShortcuts, "devtools-loaded", false);
         keyset.parentNode.insertBefore(keyset, keyset.nextSibling);
+    },
+
+    disableExistingShortcuts: function(root, attr, key, modifiers)
+    {
+        var selector = ":-moz-any(key[" + attr + "='" + key + "'], key[" + attr + "='" +
+            key.toUpperCase() + "'])" + (modifiers ? "[modifiers='" + modifiers + "']" : "") +
+            ":not([id*='firebug']):not([disabled='true'])";
+        var win = root.defaultView || root.ownerDocument.defaultView;
+
+        if (!win.disabledKeyElements)
+            win.disabledKeyElements = [];
+
+        var existingKeyElements = root.querySelectorAll(selector);
+        for (var i = existingKeyElements.length - 1; i >= 0; i--)
+        {
+            if (win.disabledKeyElements.indexOf(existingKeyElements[i]) === -1)
+            {
+                existingKeyElements[i].setAttribute("disabled", "true");
+                win.disabledKeyElements.push(existingKeyElements[i]);
+            }
+        }
+    },
+
+    resetDisabledKeys: function(win)
+    {
+        if (win.disabledKeyElements)
+        {
+            for (var element of win.disabledKeyElements)
+                element.removeAttribute("disabled");
+        }
+
+        delete win.disabledKeyElements;
     }
 };
 
diff --git a/content/firebug/firefox/browserOverlay.js b/content/firebug/firefox/browserOverlay.js
index 67784f8..c86077b 100644
--- a/content/firebug/firefox/browserOverlay.js
+++ b/content/firebug/firefox/browserOverlay.js
@@ -186,6 +186,12 @@ BrowserOverlay.prototype =
         }, false);
     },
 
+    stopFirebug: function()
+    {
+        this.unloadContextMenuOverlay();
+        BrowserCommands.resetDisabledKeys(this.win);
+    },
+
     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
     // Firebug Menu Handlers
 
diff --git a/content/firebug/firefox/customizeShortcuts.js b/content/firebug/firefox/customizeShortcuts.js
index 3f63746..c8cf445 100644
--- a/content/firebug/firefox/customizeShortcuts.js
+++ b/content/firebug/firefox/customizeShortcuts.js
@@ -91,7 +91,7 @@ CustomizeShortcuts.prototype =
 
         var resetBtns = this.win.document.getElementsByClassName("shortcutResetBtn");
         for (var i=0; i<resetBtns.length; i++)
-            resetBtns[i].addEventListener("command", this.handleResetBtn.bind(this), false);
+            resetBtns[i].addEventListener("command", this.resetShortcut.bind(this), false);
     },
 
     saveChanges: function()
@@ -113,22 +113,27 @@ CustomizeShortcuts.prototype =
     saveShortcut: function(shortcutId, index, array)
     {
         if (shortcutId in updatedShortcuts)
-            branch.setCharPref(shortcutId, updatedShortcuts[shortcutId]);
+        {
+            if (updatedShortcuts[shortcutId] === "reset")
+                branch.clearUserPref(shortcutId);
+            else
+                branch.setCharPref(shortcutId, updatedShortcuts[shortcutId]);
+        }
     },
 
-    handleResetBtn: function(event)
+    resetShortcut: function(event)
     {
         var element = event.target.id.replace("_reset", "");
         if (branch.prefHasUserValue(element))
         {
-            branch.clearUserPref(element);
+            updatedShortcuts[element] = "reset";
             modified = true;
         }
 
         event.target.hidden = true;
         var textbox = this.win.document.getElementById(element + "_shortcut");
         if (textbox)
-            textbox.value = this.getHumanShortcut(element);
+            textbox.value = this.getHumanShortcut(element, true);
     },
 
     getHumanShortcut: function(element, getDefault)
diff --git a/content/firebug/lib/events.js b/content/firebug/lib/events.js
index b10a4a6..e5a3cd9 100644
--- a/content/firebug/lib/events.js
+++ b/content/firebug/lib/events.js
@@ -1,20 +1,20 @@
 /* See license.txt for terms of usage */
-/*global define:1, Components:1, MouseEvent:1, Window: 1, Firebug:1*/
+/*global define:1, Components:1, MouseEvent:1, Firebug:1, window:1*/
 
 define([
     "firebug/lib/trace",
-    "firebug/lib/xpcom"
+    "firebug/lib/wrapper",
 ],
-function(FBTrace, Xpcom) {
+function(FBTrace, Wrapper) {
 
 "use strict";
 
 // ********************************************************************************************* //
 // Constants
 
-var Cu = Components.utils;
-
-var elService = Xpcom.CCSV("@mozilla.org/eventlistenerservice;1", "nsIEventListenerService");
+var Cc = Components.classes;
+var Ci = Components.interfaces;
+var elService = Cc["@mozilla.org/eventlistenerservice;1"].getService(Ci.nsIEventListenerService);
 
 // ********************************************************************************************* //
 // Implementation
@@ -233,7 +233,7 @@ Events.isShift = function(event)
 // ********************************************************************************************* //
 // DOM Events
 
-const eventTypes =
+var eventTypes =
 {
     composition: [
         "composition",
@@ -604,11 +604,7 @@ Events.getEventListenersForTarget = function(target)
         if (!listener.func || rawListener.inSystemEventGroup)
             continue;
 
-        var funcGlobal = Cu.getGlobalForObject(listener.func);
-        if (!(funcGlobal instanceof Window))
-            continue;
-
-        if (funcGlobal.document.nodePrincipal.subsumes(document.nodePrincipal))
+        if (Wrapper.isChromeObject(listener.func, window))
             continue;
 
         ret.push(listener);
diff --git a/content/firebug/lib/url.js b/content/firebug/lib/url.js
index b5a98b7..ec9e9ef 100644
--- a/content/firebug/lib/url.js
+++ b/content/firebug/lib/url.js
@@ -3,8 +3,9 @@
 define([
     "firebug/lib/trace",
     "firebug/lib/string",
+    "firebug/lib/options",
 ],
-function (FBTrace, Str) {
+function (FBTrace, Str, Options) {
 
 "use strict";
 
@@ -504,7 +505,8 @@ Url.parseURLEncodedText = function(text, noLimit)
         }
     }
 
-    params.sort(function(a, b) { return a.name <= b.name ? -1 : 1; });
+    if (Options.get("netSortPostParameters"))
+        params.sort((a, b) => { return a.name <= b.name ? -1 : 1; });
 
     return params;
 };
diff --git a/content/firebug/lib/wrapper.js b/content/firebug/lib/wrapper.js
index 12bf2f6..e582d7c 100644
--- a/content/firebug/lib/wrapper.js
+++ b/content/firebug/lib/wrapper.js
@@ -102,6 +102,18 @@ Wrapper.unwrapIValueObject = function(scope, viewChrome)
     return scopeVars;
 };
 
+Wrapper.isChromeObject = function(obj, chromeWin)
+{
+    var global = Cu.getGlobalForObject(obj);
+    if (!(global instanceof chromeWin.Window))
+        return true;
+
+    if (global.document.nodePrincipal.subsumes(chromeWin.document.nodePrincipal))
+        return true;
+
+    return false;
+};
+
 /**
  * Create a content-accessible view of a simple chrome object. All properties
  * are marked as non-writable, except if they have explicit getters/setters.
diff --git a/content/firebug/net/netReps.js b/content/firebug/net/netReps.js
index 2f77d6b..fff6dc2 100644
--- a/content/firebug/net/netReps.js
+++ b/content/firebug/net/netReps.js
@@ -1299,6 +1299,9 @@ Firebug.NetMonitor.NetInfoPostData = domplate(Rep, new EventSource(),
                             Locale.$STR("net.label.Parameters"),
                             SPAN({"class": "netInfoPostContentType"},
                                 "application/x-www-form-urlencoded"
+                            ),
+                            A({"class": "netPostParameterSort", onclick: "$onChangeSort"},
+                                "$object|getLabel"
                             )
                         )
                     )
@@ -1417,6 +1420,13 @@ Firebug.NetMonitor.NetInfoPostData = domplate(Rep, new EventSource(),
             )
         ),
 
+    getLabel: function(object)
+    {
+        return Options.get("netSortPostParameters") ?
+            Locale.$STR("netParametersDoNotSort") :
+            Locale.$STR("netParametersSortAlphabetically");
+    },
+
     getParamValueIterator: function(param)
     {
         return Firebug.NetMonitor.NetInfoBody.getParamValueIterator(param);
@@ -1424,6 +1434,8 @@ Firebug.NetMonitor.NetInfoPostData = domplate(Rep, new EventSource(),
 
     render: function(context, parentNode, file)
     {
+        Dom.clearNode(parentNode);
+
         var text = NetUtils.getPostText(file, context, true);
         if (text == undefined)
             return;
@@ -1472,7 +1484,7 @@ Firebug.NetMonitor.NetInfoPostData = domplate(Rep, new EventSource(),
         if (!params || !params.length)
             return;
 
-        var paramTable = this.paramsTable.append(null, parentNode);
+        var paramTable = this.paramsTable.append({object: null}, parentNode);
         var row = paramTable.getElementsByClassName("netInfoPostParamsTitle").item(0);
 
         Firebug.NetMonitor.NetInfoBody.headerDataTag.insertRows({headers: params}, row);
@@ -1578,7 +1590,21 @@ Firebug.NetMonitor.NetInfoPostData = domplate(Rep, new EventSource(),
         }
 
         return postData;
-    }
+    },
+    
+    onChangeSort: function(event)
+    {
+        var target = event.target;
+        var netInfoBox = Dom.getAncestorByClass(target, "netInfoBody");
+        var panel = Firebug.getElementPanel(netInfoBox);
+        var file = Firebug.getRepObject(netInfoBox);
+        var postText = netInfoBox.getElementsByClassName("netInfoPostText").item(0);
+
+        Options.togglePref("netSortPostParameters");
+        Firebug.NetMonitor.NetInfoPostData.render(panel.context, postText, file);
+
+        Events.cancelEvent(event);
+    },
 });
 
 // ********************************************************************************************* //
diff --git a/defaults/preferences/firebug.js b/defaults/preferences/firebug.js
index 7e84561..17fa22b 100644
--- a/defaults/preferences/firebug.js
+++ b/defaults/preferences/firebug.js
@@ -64,6 +64,7 @@ pref("extensions.firebug.consoleFilterTypes", "all");
 pref("extensions.firebug.preferJSDSourceLinks", false);
 pref("extensions.firebug.commandLineShowCompleterPopup", true);
 pref("extensions.firebug.console.groupLogMessages", true);
+pref("extensions.firebug.consoleCommandHistoryMax", 1000);
 
 // HTML
 pref("extensions.firebug.showCommentNodes", false);
@@ -136,6 +137,7 @@ pref("extensions.firebug.netResponseHeadersVisible", true);
 pref("extensions.firebug.netRequestHeadersVisible", true);
 pref("extensions.firebug.netCachedHeadersVisible", false);
 pref("extensions.firebug.netPostRequestHeadersVisible", false);
+pref("extensions.firebug.netSortPostParameters", true);
 
 // JSON Preview
 pref("extensions.firebug.sortJsonPreview", false);
diff --git a/install.rdf b/install.rdf
index 1a2edfa..71aee91 100644
--- a/install.rdf
+++ b/install.rdf
@@ -5,7 +5,7 @@
 
   <Description about="urn:mozilla:install-manifest">
     <em:id>firebug at software.joehewitt.com</em:id>
-    <em:version>1.13.0a8</em:version>
+    <em:version>1.13.0a9</em:version>
     <em:type>2</em:type>
     <em:bootstrap>true</em:bootstrap>
 
@@ -13,8 +13,8 @@
     <em:targetApplication>
       <Description>
         <em:id>toolkit at mozilla.org</em:id>
-        <em:minVersion>26.0</em:minVersion>
-        <em:maxVersion>29.0</em:maxVersion>
+        <em:minVersion>27.0</em:minVersion>
+        <em:maxVersion>30.0</em:maxVersion>
       </Description>
     </em:targetApplication>
 
@@ -22,8 +22,8 @@
     <em:targetApplication>
       <Description>
         <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
-        <em:minVersion>26.0</em:minVersion>
-        <em:maxVersion>29.0</em:maxVersion>
+        <em:minVersion>27.0</em:minVersion>
+        <em:maxVersion>30.0</em:maxVersion>
       </Description>
     </em:targetApplication>
 
diff --git a/locale/en-US/firebug.properties b/locale/en-US/firebug.properties
index bd9dc49..44bb833 100644
--- a/locale/en-US/firebug.properties
+++ b/locale/en-US/firebug.properties
@@ -121,6 +121,8 @@ ShowNetworkErrors=Show Network Errors
 console.option.tip.Show_Network_Errors=Log network error messages into the console
 JavascriptOptionsStrict=Strict Warnings (performance penalty)
 console.option.tip.Show_Strict_Warnings=Log also strict warnings into the console
+console.option.Group_Log_Messages=Group Log Messages
+console.option.tip.Group_Log_Messages=Group equal log messages in the console
 Command_History=Command History
 console.option.Show_Command_Editor=Show Command Editor
 console.option.tip.Show_Command_Editor=Switch to the Command Editor
@@ -729,7 +731,9 @@ html.tip.Copy_Node=Copy the %S node and all its contents to the clipboard
 CopyInnerHTML=Copy innerHTML
 html.tip.Copy_innerHTML=Copy the contents of the element to the clipboard
 CopyXPath=Copy XPath
+CopyMinimalXPath=Copy Minimal XPath
 html.tip.Copy_XPath=Copy the element's XPath to the clipboard
+html.tip.Copy_Minimal_XPath=Copy the element's minimal XPath to the clipboard
 Copy_CSS_Path=Copy CSS Path
 html.tip.Copy_CSS_Path=Copy the element's CSS path to the clipboard
 # LOCALIZATION NOTE (html.menu.Paste, html.tip.Paste): Context menu item (with subitems).
@@ -1037,6 +1041,9 @@ net.summary.tip.total_size=Total size of all requests
 net.summary.tip.total_cached_size=Total cached size of all requests
 net.summary.tip.total_request_time=Total time needed to load all requests and time when the 'onload' event occurred
 
+netParametersSortAlphabetically=Sort alphabetically
+netParametersDoNotSort=Do not sort
+
 StopLoading=Stop Loading
 net.tip.Stop_Loading=Stop loading the request
 LargeData=(Very Large Data)
diff --git a/modules/loader.js b/modules/loader.js
index e5b37b3..baa14ca 100644
--- a/modules/loader.js
+++ b/modules/loader.js
@@ -126,7 +126,7 @@ var FirebugLoader =
             }
         });
 
-        win.Firebug.browserOverlay.unloadContextMenuOverlay(win);
+        win.Firebug.browserOverlay.stopFirebug();
 
         delete win.Firebug;
         delete win.FBTrace;
diff --git a/skin/classic/net.css b/skin/classic/net.css
index 1c81721..a7a1f50 100644
--- a/skin/classic/net.css
+++ b/skin/classic/net.css
@@ -683,12 +683,21 @@ body[resizingHtmlPreview="true"] .netInfoHtmlPreview {
 /* Request & Response Headers */
 
 .netHeadersViewSource {
-    color: #bdbdbd;
     margin-left: 200px;
+}
+
+.netPostParameterSort {
+    margin-left: 30px;
+}
+
+.netHeadersViewSource,
+.netPostParameterSort {
+    color: #bdbdbd;
     font-weight: normal;
 }
 
-.netHeadersViewSource:hover {
+.netHeadersViewSource:hover,
+.netPostParameterSort:hover {
     color: blue;
     cursor: pointer;
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git



More information about the Pkg-mozext-commits mailing list