From eb101ebb192c2af30f45a6cc6ad2b1e5d8db0fcd Mon Sep 17 00:00:00 2001 From: Michael Ratcliffe Date: Thu, 13 Jun 2013 10:57:39 +0100 Subject: [PATCH 01/28] Bug 882337 - Typo in "asteriskInWrongSection2" in browser/devtools/appcacheutils.properties r=jwalker --- .../en-US/chrome/browser/devtools/appcacheutils.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser/locales/en-US/chrome/browser/devtools/appcacheutils.properties b/browser/locales/en-US/chrome/browser/devtools/appcacheutils.properties index fae25ef0bc2d..b9d618a932a0 100644 --- a/browser/locales/en-US/chrome/browser/devtools/appcacheutils.properties +++ b/browser/locales/en-US/chrome/browser/devtools/appcacheutils.properties @@ -78,7 +78,7 @@ cacheManifestOnlyFirstLine2="CACHE MANIFEST" is only valid on the first line but # LOCALIZATION NOTE (asteriskInWrongSection2): the associated cache manifest # has an asterisk (*) in a section other than the NETWORK section. Parameters: # %1$S is the section name, %2$S is the line number. -asteriskInWrongSection2=Asterisk (*) incorrectly used in the %1$S section at line %2$S. If a line in the NETWORK section contains only a single asterisk character, then any URI not listed in the manifest will be treated as if the URI was listed in the NETWORK section. Otherwice such URIs will be treated as unavailable. Other uses of the * character are prohibited. +asteriskInWrongSection2=Asterisk (*) incorrectly used in the %1$S section at line %2$S. If a line in the NETWORK section contains only a single asterisk character, then any URI not listed in the manifest will be treated as if the URI was listed in the NETWORK section. Otherwise such URIs will be treated as unavailable. Other uses of the * character are prohibited. # LOCALIZATION NOTE (escapeSpaces): the associated cache manifest has a space # in a URI. Spaces must be replaced with %20. Parameters: %S is the line From 1f5d38a0b6395c5b875b16e9614ecd44e930f973 Mon Sep 17 00:00:00 2001 From: Brandon Benvie Date: Wed, 19 Jun 2013 13:06:43 -0700 Subject: [PATCH 02/28] Bug 884821 - Fix bug where Scratchpad sidebar can't be closed and reopened, r=vporof --- browser/devtools/scratchpad/scratchpad.js | 8 -------- browser/devtools/scratchpad/scratchpad.xul | 8 ++++---- .../scratchpad/test/browser_scratchpad_inspect.js | 13 +++++++++++-- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/browser/devtools/scratchpad/scratchpad.js b/browser/devtools/scratchpad/scratchpad.js index 985ded61e518..1e684493d407 100644 --- a/browser/devtools/scratchpad/scratchpad.js +++ b/browser/devtools/scratchpad/scratchpad.js @@ -1486,7 +1486,6 @@ function ScratchpadSidebar() let ToolSidebar = devtools.require("devtools/framework/sidebar").ToolSidebar; let tabbox = document.querySelector("#scratchpad-sidebar"); this._sidebar = new ToolSidebar(tabbox, this); - this._splitter = document.querySelector(".devtools-side-splitter"); } ScratchpadSidebar.prototype = { @@ -1495,11 +1494,6 @@ ScratchpadSidebar.prototype = { */ _sidebar: null, - /* - * The splitter element between the sidebar and the editor. - */ - _splitter: null, - /* * The VariablesView for this sidebar. */ @@ -1555,7 +1549,6 @@ ScratchpadSidebar.prototype = { if (!this.visible) { this.visible = true; this._sidebar.show(); - this._splitter.setAttribute("state", "open"); } }, @@ -1567,7 +1560,6 @@ ScratchpadSidebar.prototype = { if (this.visible) { this.visible = false; this._sidebar.hide(); - this._splitter.setAttribute("state", "collapsed"); } }, diff --git a/browser/devtools/scratchpad/scratchpad.xul b/browser/devtools/scratchpad/scratchpad.xul index 2d1fe9a05ff8..af66b08327a2 100644 --- a/browser/devtools/scratchpad/scratchpad.xul +++ b/browser/devtools/scratchpad/scratchpad.xul @@ -288,10 +288,10 @@ - - + + diff --git a/browser/devtools/scratchpad/test/browser_scratchpad_inspect.js b/browser/devtools/scratchpad/test/browser_scratchpad_inspect.js index 115f7cd76d3c..b4e81a9916c4 100644 --- a/browser/devtools/scratchpad/test/browser_scratchpad_inspect.js +++ b/browser/devtools/scratchpad/test/browser_scratchpad_inspect.js @@ -41,6 +41,15 @@ function runTests() ok(found, "found the property"); - finish(); + let tabbox = sidebar._sidebar._tabbox; + is(tabbox.width, 300, "Scratchpad sidebar width is correct"); + ok(!tabbox.hasAttribute("hidden"), "Scratchpad sidebar visible"); + sidebar.hide(); + ok(tabbox.hasAttribute("hidden"), "Scratchpad sidebar hidden"); + sp.inspect().then(function() { + is(tabbox.width, 300, "Scratchpad sidebar width is still correct"); + ok(!tabbox.hasAttribute("hidden"), "Scratchpad sidebar visible again"); + finish(); + }); }); -} \ No newline at end of file +} From 6ec8bbd95d78922c761decebf39ddd6a03bdd5ef Mon Sep 17 00:00:00 2001 From: Brandon Benvie Date: Mon, 17 Jun 2013 14:55:25 -0700 Subject: [PATCH 03/28] Bug 869984 - Add sorting and searching to Scratchpad VariablesView, r=vporof --- browser/devtools/scratchpad/scratchpad.js | 15 ++++++++++----- browser/devtools/shared/widgets/VariablesView.jsm | 4 ++-- .../chrome/browser/devtools/scratchpad.properties | 4 ++++ 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/browser/devtools/scratchpad/scratchpad.js b/browser/devtools/scratchpad/scratchpad.js index 1e684493d407..feb825f213c6 100644 --- a/browser/devtools/scratchpad/scratchpad.js +++ b/browser/devtools/scratchpad/scratchpad.js @@ -273,7 +273,7 @@ var Scratchpad = { get sidebar() { if (!this._sidebar) { - this._sidebar = new ScratchpadSidebar(); + this._sidebar = new ScratchpadSidebar(this); } return this._sidebar; }, @@ -475,7 +475,7 @@ var Scratchpad = { this.sidebar.open(aString, aResult).then(resolve, reject); } }, reject); - + return deferred.promise; }, @@ -882,7 +882,7 @@ var Scratchpad = { /** * Clear a range of files from the list. - * + * * @param integer aIndex * Index of file in menu to remove. * @param integer aLength @@ -1481,11 +1481,12 @@ var Scratchpad = { * Encapsulates management of the sidebar containing the VariablesView for * object inspection. */ -function ScratchpadSidebar() +function ScratchpadSidebar(aScratchpad) { let ToolSidebar = devtools.require("devtools/framework/sidebar").ToolSidebar; let tabbox = document.querySelector("#scratchpad-sidebar"); this._sidebar = new ToolSidebar(tabbox, this); + this._scratchpad = aScratchpad; } ScratchpadSidebar.prototype = { @@ -1525,7 +1526,11 @@ ScratchpadSidebar.prototype = { if (!this.variablesView) { let window = this._sidebar.getWindowForTab("variablesview"); let container = window.document.querySelector("#variables"); - this.variablesView = new VariablesView(container); + this.variablesView = new VariablesView(container, { + searchEnabled: true, + searchPlaceholder: this._scratchpad.strings + .GetStringFromName("propertiesFilterPlaceholder") + }); } this._update(aObject).then(() => deferred.resolve()); }; diff --git a/browser/devtools/shared/widgets/VariablesView.jsm b/browser/devtools/shared/widgets/VariablesView.jsm index f31ddbc25bda..de486e7c4fbf 100644 --- a/browser/devtools/shared/widgets/VariablesView.jsm +++ b/browser/devtools/shared/widgets/VariablesView.jsm @@ -84,13 +84,13 @@ VariablesView.prototype = { /** * Helper setter for populating this container with a raw object. * - * @param object aData + * @param object aObject * The raw object to display. You can only provide this object * if you want the variables view to work in sync mode. */ set rawObject(aObject) { this.empty(); - this.addScope().addItem().populate(aObject); + this.addScope().addItem().populate(aObject, { sorted: true }); }, /** diff --git a/browser/locales/en-US/chrome/browser/devtools/scratchpad.properties b/browser/locales/en-US/chrome/browser/devtools/scratchpad.properties index 8d9a50769261..9f239d6f4730 100644 --- a/browser/locales/en-US/chrome/browser/devtools/scratchpad.properties +++ b/browser/locales/en-US/chrome/browser/devtools/scratchpad.properties @@ -81,3 +81,7 @@ help.openDocumentationPage=https://developer.mozilla.org/en/Tools/Scratchpad # LOCALIZATION NOTE (fileExists.notification): This is the message displayed # over the top of the the editor when a file does not exist. fileNoLongerExists.notification=This file no longer exists. + +# LOCALIZATION NOTE (propertiesFilterPlaceholder): this is the text that +# appears in the filter text box for the properties view container. +propertiesFilterPlaceholder=Filter properties From 9b8d2e7f6ef97a18bc539ac416ce46082a86bf7c Mon Sep 17 00:00:00 2001 From: Brandon Benvie Date: Thu, 20 Jun 2013 16:00:22 -0700 Subject: [PATCH 04/28] Bug 883898 - Make booleans in VariablesView have a distinctive color, r=vporof --- browser/themes/linux/devtools/widgets.css | 4 ++-- browser/themes/osx/devtools/widgets.css | 4 ++-- browser/themes/windows/devtools/widgets.css | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/browser/themes/linux/devtools/widgets.css b/browser/themes/linux/devtools/widgets.css index 631de1ffe3f4..d5b92b22f7e6 100644 --- a/browser/themes/linux/devtools/widgets.css +++ b/browser/themes/linux/devtools/widgets.css @@ -476,7 +476,7 @@ } .variable-or-property:not(:focus) > .title > .token-boolean { - color: #777; + color: #1c00cf; } .variable-or-property:not(:focus) > .title > .token-number { @@ -484,7 +484,7 @@ } .variable-or-property:not(:focus) > .title > .token-string { - color: #1c00cf; + color: #282; } .variable-or-property:not(:focus) > .title > .token-other { diff --git a/browser/themes/osx/devtools/widgets.css b/browser/themes/osx/devtools/widgets.css index b93afdfbbe0b..876e8c5a0180 100644 --- a/browser/themes/osx/devtools/widgets.css +++ b/browser/themes/osx/devtools/widgets.css @@ -476,7 +476,7 @@ } .variable-or-property:not(:focus) > .title > .token-boolean { - color: #777; + color: #1c00cf; } .variable-or-property:not(:focus) > .title > .token-number { @@ -484,7 +484,7 @@ } .variable-or-property:not(:focus) > .title > .token-string { - color: #1c00cf; + color: #282; } .variable-or-property:not(:focus) > .title > .token-other { diff --git a/browser/themes/windows/devtools/widgets.css b/browser/themes/windows/devtools/widgets.css index d60ddd8931d3..3497e6d5f50e 100644 --- a/browser/themes/windows/devtools/widgets.css +++ b/browser/themes/windows/devtools/widgets.css @@ -479,7 +479,7 @@ } .variable-or-property:not(:focus) > .title > .token-boolean { - color: #777; + color: #1c00cf; } .variable-or-property:not(:focus) > .title > .token-number { @@ -487,7 +487,7 @@ } .variable-or-property:not(:focus) > .title > .token-string { - color: #1c00cf; + color: #282; } .variable-or-property:not(:focus) > .title > .token-other { From 40a80438b6d854c3ec59a79b5aedae9e257a77cf Mon Sep 17 00:00:00 2001 From: Victor Porof Date: Fri, 21 Jun 2013 17:33:56 +0300 Subject: [PATCH 05/28] Bug 823577 - Cleanup debugger frontend code, strings, etc., r=rcampbell --HG-- rename : browser/devtools/debugger/DebuggerUI.jsm => browser/devtools/debugger/DebuggerProcess.jsm --- browser/app/profile/firefox.js | 8 +- browser/base/content/browser-doctype.inc | 2 - browser/base/content/browser-sets.inc | 2 +- browser/base/content/browser.js | 6 +- browser/devtools/debugger/CmdDebugger.jsm | 14 +- browser/devtools/debugger/DebuggerPanel.jsm | 3 - browser/devtools/debugger/DebuggerProcess.jsm | 164 +++++ browser/devtools/debugger/DebuggerUI.jsm | 564 ------------------ .../devtools/debugger/debugger-controller.js | 285 +++++---- browser/devtools/debugger/debugger-panes.js | 416 +++++++------ browser/devtools/debugger/debugger-toolbar.js | 139 +++-- browser/devtools/debugger/debugger-view.js | 230 ++----- browser/devtools/debugger/debugger.css | 3 +- browser/devtools/debugger/debugger.xul | 8 +- browser/devtools/debugger/test/Makefile.in | 3 +- ...ug723071_editor-breakpoints-contextmenu.js | 463 ++++++++++++++ ..._bug723071_editor-breakpoints-highlight.js | 221 +++++++ ...r_dbg_bug723071_editor-breakpoints-pane.js | 2 +- ...wser_dbg_bug727429_watch-expressions-01.js | 64 +- ...bg_bug740825_conditional-breakpoints-01.js | 14 +- ...bg_bug740825_conditional-breakpoints-02.js | 76 +-- .../debugger/test/browser_dbg_createChrome.js | 3 +- .../debugger/test/browser_dbg_createRemote.js | 181 ------ .../test/browser_dbg_pause-exceptions.js | 4 +- .../browser_dbg_propertyview-edit-watch.js | 82 +-- .../test/browser_dbg_script-switching.html | 1 + browser/devtools/debugger/test/head.js | 25 +- browser/devtools/main.js | 2 +- .../devtools/shared/widgets/VariablesView.jsm | 2 +- .../devtools/shared/widgets/ViewHelpers.jsm | 123 ++-- .../locales/en-US/chrome/browser/browser.dtd | 4 + .../chrome/browser/devtools/debugger.dtd | 20 - .../browser/devtools/debugger.properties | 55 +- 33 files changed, 1570 insertions(+), 1619 deletions(-) create mode 100644 browser/devtools/debugger/DebuggerProcess.jsm delete mode 100644 browser/devtools/debugger/DebuggerUI.jsm create mode 100644 browser/devtools/debugger/test/browser_dbg_bug723071_editor-breakpoints-contextmenu.js create mode 100644 browser/devtools/debugger/test/browser_dbg_bug723071_editor-breakpoints-highlight.js delete mode 100644 browser/devtools/debugger/test/browser_dbg_createRemote.js diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 57f5624773ff..b667e85e4558 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -1073,19 +1073,13 @@ pref("devtools.debugger.chrome-enabled", true); pref("devtools.debugger.chrome-debugging-host", "localhost"); pref("devtools.debugger.chrome-debugging-port", 6080); pref("devtools.debugger.remote-host", "localhost"); -pref("devtools.debugger.remote-autoconnect", false); -pref("devtools.debugger.remote-connection-retries", 3); pref("devtools.debugger.remote-timeout", 20000); +pref("devtools.debugger.pause-on-exceptions", false); pref("devtools.debugger.source-maps-enabled", true); // The default Debugger UI settings -pref("devtools.debugger.ui.win-x", 0); -pref("devtools.debugger.ui.win-y", 0); -pref("devtools.debugger.ui.win-width", 900); -pref("devtools.debugger.ui.win-height", 400); pref("devtools.debugger.ui.panes-sources-width", 200); pref("devtools.debugger.ui.panes-instruments-width", 300); -pref("devtools.debugger.ui.pause-on-exceptions", false); pref("devtools.debugger.ui.panes-visible-on-startup", false); pref("devtools.debugger.ui.variables-sorting-enabled", true); pref("devtools.debugger.ui.variables-only-enum-visible", false); diff --git a/browser/base/content/browser-doctype.inc b/browser/base/content/browser-doctype.inc index 17c1e45f9823..cacd4d3a58c3 100644 --- a/browser/base/content/browser-doctype.inc +++ b/browser/base/content/browser-doctype.inc @@ -19,7 +19,5 @@ #endif %aboutHomeDTD; - -%debuggerDTD; ]> diff --git a/browser/base/content/browser-sets.inc b/browser/base/content/browser-sets.inc index f2d213b95e69..e17d5252e879 100644 --- a/browser/base/content/browser-sets.inc +++ b/browser/base/content/browser-sets.inc @@ -95,7 +95,7 @@