diff --git a/README.md b/README.md index 7baa1bb6df..2029c2b9cc 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Firebug ======= *Web Development Evolved* [getfirebug.com](https://getfirebug.com) +**On November 14, with the launch of Firefox Quantum (AKA 57), support for old school extensions will stop in Firefox. That means Firebug will no longer work for many developers. However, the work continues in the great Firefox devtools. You can try Firefox devtools by updating your [release browser](https://www.mozilla.org/en-US/firefox/new/?utm_source=github&utm_campaign=switch) or [downloading Developer Edition](https://www.mozilla.org/en-US/firefox/developer/?utm_source=github&utm_campaign=switch). Read more [here](https://hacks.mozilla.org/2017/10/saying-goodbye-to-firebug/)** + [Download](https://addons.mozilla.org/en-US/firefox/addon/firebug/) License diff --git a/extension/bootstrap.js b/extension/bootstrap.js index 17784cb51e..6ee6a33a3f 100644 --- a/extension/bootstrap.js +++ b/extension/bootstrap.js @@ -74,8 +74,9 @@ function startup(params, reason) Services.obs.addObserver(windowWatcher, "chrome-document-global-created", false); // GCLI commands - Cu.import("resource://firebug/gcli.js"); - FirebugGCLICommands.startup(); + // Not supported anymore + //Cu.import("resource://firebug/gcli.js"); + //FirebugGCLICommands.startup(); } function shutdown(params, reason) diff --git a/extension/content/firebug/branch.properties b/extension/content/firebug/branch.properties index 8d67656750..c7381baa50 100644 --- a/extension/content/firebug/branch.properties +++ b/extension/content/firebug/branch.properties @@ -1,5 +1,5 @@ # DO NOT MERGE INTO TRUNK -RELEASE=.7 +RELEASE=.19 VERSION=2.0 TRUNK= # To allow build.xml to drop the xpi directly into the svn working copy for getfirebug.com diff --git a/extension/content/firebug/bti/inProcess/browser.js b/extension/content/firebug/bti/inProcess/browser.js index 9fb8a937e3..2de7fc527b 100644 --- a/extension/content/firebug/bti/inProcess/browser.js +++ b/extension/content/firebug/bti/inProcess/browser.js @@ -453,7 +453,7 @@ Browser.prototype.removeListener = function(listener) FBTrace.sysout("BTI.Browser.removeListener; ERROR Unknown listener " + (listener.dispatchName ? listener.dispatchName : "")); - // xxxHonza: should it be alwasy called or only if isConnected() == true? + // xxxHonza: should it be always called or only if isConnected() == true? //if (this.isConnected()) Events.dispatch2([listener], "onDisconnect", [this]); }; diff --git a/extension/content/firebug/chrome/chrome.js b/extension/content/firebug/chrome/chrome.js index 0463e739b3..1f9963a2a3 100644 --- a/extension/content/firebug/chrome/chrome.js +++ b/extension/content/firebug/chrome/chrome.js @@ -499,9 +499,9 @@ var FirebugChrome = if (!this.inDetachedScope) { - Dom.collapse(Firefox.getElementById('fbMainFrame'), !shouldShow); + Dom.collapse(Firefox.getElementById("fbMainFrame"), !shouldShow); - var contentSplitter = Firefox.getElementById('fbContentSplitter'); + var contentSplitter = Firefox.getElementById("fbContentSplitter"); if (contentSplitter) contentSplitter.setAttribute("collapsed", !shouldShow); } @@ -1040,6 +1040,17 @@ var FirebugChrome = splitter.setAttribute("dir", after ? "" : "reverse"); container.insertBefore(splitter, after ? null: container.firstChild); + // See: https://code.google.com/p/fbug/issues/detail?id=7717 + // There is a new element placed whihin + // the right before . + // If Firebug is positioned at the top, the splitter must + // change height of the tab-browser (which is using 'flex') + // not height of the . + if (pos == "top") + splitter.setAttribute("resizeafter", "flex"); + else + splitter.removeAttribute("resizeafter"); + var frame = document.getElementById("fbMainFrame"); var newFrame = frame.cloneNode(true); diff --git a/extension/content/firebug/chrome/reps.js b/extension/content/firebug/chrome/reps.js index b8fc503bdb..2f1518afaf 100644 --- a/extension/content/firebug/chrome/reps.js +++ b/extension/content/firebug/chrome/reps.js @@ -1717,7 +1717,7 @@ FirebugReps.CSSRule = domplate(Rep, { return "CSSMediaRule"; } - else if (rule instanceof window.CSSCharsetRule) + else if (window.CSSCharsetRule && rule instanceof window.CSSCharsetRule) { return "CSSCharsetRule"; } @@ -1773,7 +1773,7 @@ FirebugReps.CSSRule = domplate(Rep, { return rule.media.mediaText; } - else if (rule instanceof window.CSSCharsetRule) + else if (window.CSSCharsetRule && rule instanceof window.CSSCharsetRule) { return rule.encoding; } @@ -2349,7 +2349,7 @@ FirebugReps.XPathResult = domplate(FirebugReps.Arr, // xxxHonza: fix for test console/api/log-xpathresult // FirebugReps.Arr.hasSpecialProperties iterates object properties // (using Object.getOwnPropertyNames), but misses 'constructor' if the property - // is not explicitely accessed before. Any explanation for such behavior? + // is not explicitly accessed before. Any explanation for such behavior? // (btw. it was actually accessed, but order of 'supportsObject' calls changed when // 'Exception' rep moved into its own module, see issue: 6606) var ctor = array && array.constructor; diff --git a/extension/content/firebug/chrome/tabWatcher.js b/extension/content/firebug/chrome/tabWatcher.js index 6a6cc4be6a..9b87f35ff4 100644 --- a/extension/content/firebug/chrome/tabWatcher.js +++ b/extension/content/firebug/chrome/tabWatcher.js @@ -954,7 +954,7 @@ var TabProgressListener = Obj.extend(Http.BaseProgressListener, // switching to about:blank tab, see issue 4040 // // 2) But we also want to skip "about:blank" in case a new tab is opened - // (new tab is about:blank at the beggining), no context exists and Firebug + // (new tab is about:blank at the beginning), no context exists and Firebug // is suspended for all contexts, see issue5916 // There is a workaround for this case in {@TabWatchListener.showContext] // diff --git a/extension/content/firebug/chrome/window.js b/extension/content/firebug/chrome/window.js index e3b4ab6f41..96831292d2 100644 --- a/extension/content/firebug/chrome/window.js +++ b/extension/content/firebug/chrome/window.js @@ -17,7 +17,7 @@ var wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMe var Win = {}; -var window = {}; // these declarations exist to cause errors if we accidently +var window = {}; // these declarations exist to cause errors if we accidentally var document = {}; // reference these globals // ********************************************************************************************* // diff --git a/extension/content/firebug/console/autoCompleter.js b/extension/content/firebug/console/autoCompleter.js index e470c49b11..def277fc84 100644 --- a/extension/content/firebug/console/autoCompleter.js +++ b/extension/content/firebug/console/autoCompleter.js @@ -1000,7 +1000,7 @@ JSAutoCompleter.transformScopeOperator = function(expr, fname) var search = 0; for (;;) { - // Find the next occurrance of .%. + // Find the next occurrence of .%. var end = sexpr.indexOf(".%", search); if (end === -1) break; @@ -1864,7 +1864,7 @@ function setCompletionsFromObject(out, object, context) // The object is a large array. To avoid RangeErrors from // `target.push.apply` and a slow `Object.getOwnPropertyNames`, // we just skip this level ("length" is also on the prototype, - // and numeric property would get hidden later anyway). + // and numeric properties would get hidden later anyway). } else { @@ -2390,6 +2390,14 @@ function autoCompleteEval(context, preExpr, spreExpr, preParsed, spreParsed, opt }); } + if (!spreExpr) + { + // For global completions, hide results starting with a digit, since they conflict + // with typing numbers. An interested user would type 'window.', anyway. + var reValid = /^[^0-9]/; + out.completions = out.completions.filter((x) => reValid.test(x)); + } + // Sort the completions, and avoid duplicates. // Note: If we make it possible to show both regular and hidden completions // at the same time, completions should shadow hiddenCompletions here. diff --git a/extension/content/firebug/console/closureInspector.js b/extension/content/firebug/console/closureInspector.js index 3226f6c9b2..590efcd10d 100644 --- a/extension/content/firebug/console/closureInspector.js +++ b/extension/content/firebug/console/closureInspector.js @@ -159,7 +159,7 @@ var ClosureInspector = var objGlobal = Cu.getGlobalForObject(obj); // Do a security check. This is automatic in Fx33+, but do it manually - // (with the same error message) for compatiblity with older versions. + // (with the same error message) for compatibility with older versions. if (win !== objGlobal && !(win.document && objGlobal.document && win.document.nodePrincipal.subsumes(objGlobal.document.nodePrincipal))) { diff --git a/extension/content/firebug/console/commandEditor.js b/extension/content/firebug/console/commandEditor.js index 8ab0e18274..95c3bb006a 100644 --- a/extension/content/firebug/console/commandEditor.js +++ b/extension/content/firebug/console/commandEditor.js @@ -11,13 +11,14 @@ define([ "firebug/lib/options", "firebug/lib/promise", "firebug/lib/string", + "firebug/lib/devtools", "firebug/chrome/module", "firebug/chrome/menu", "firebug/console/autoCompleter", "firebug/console/commandLine", "firebug/editor/sourceEditor", ], -function(Firebug, FBTrace, Obj, Events, Dom, Locale, Css, Options, Promise, Str, Module, Menu, +function(Firebug, FBTrace, Obj, Events, Dom, Locale, Css, Options, Promise, Str, DevTools, Module, Menu, AutoCompleter, CommandLine, SourceEditor) { "use strict"; @@ -352,49 +353,32 @@ var CommandEditor = Obj.extend(Module, return; var worker = getPrettyPrintWorker(); + if (!worker) { + return; + } + var id = "firebug-" + Obj.getUniqueId(); var deferred = Promise.defer(); - var onReply = ({data}) => - { - if (data.id !== id) - return; - - worker.removeEventListener("message", onReply, false); - - if (data.error) - { - TraceError.sysout("commandEditor.prettyPrint; ERROR " + data.error, data); - - // Remove stack trace info from the error message (separated by a newline, - // see pretty-print-worker.js) - var message = Str.safeToString(data.error); - var index = message.indexOf("\n"); - message = message.substr(0, index); - - // Log only an error message into the Console panel. - Firebug.Console.logFormatted([message], context, "error", true); - - deferred.reject(data.error); - } - else - { - this.setText(data.code); - - deferred.resolve(data.code); - } - }; - - worker.addEventListener("message", onReply, false); - - worker.postMessage({ - id: id, - url: "(command-editor)", - indent: Options.get("replaceTabs"), - source: this.getText() + return worker.performTask("pretty-print", { + url: "(command-editor)", + indent: Options.get("replaceTabs"), + source: this.getText() + }).then(data => { + this.setText(data.code); + }).then(null, error => { + TraceError.sysout("commandEditor.prettyPrint; ERROR " + error, error); + + // Remove stack trace info from the error message (separated by a newline, + // see pretty-print-worker.js) + var message = Str.safeToString(error); + var index = message.indexOf("\n"); + if (index != -1) + message = message.substr(0, index); + + // Log only an error message into the Console panel. + Firebug.Console.logFormatted([message], context, "error", true); }); - - return deferred.promise; } }); @@ -522,14 +506,15 @@ function getPrettyPrintWorker() { if (!prettyPrintWorker) { - prettyPrintWorker = new ChromeWorker( - "resource://gre/modules/devtools/server/actors/pretty-print-worker.js"); + if (!DevTools.DevToolsWorker) + return null; - prettyPrintWorker.addEventListener("error", ({message, fileName, lineNo}) => - { - TraceError.sysout("commandEditor.getPrettyPrintWorker; ERROR " + message + - " " + fileName + ":" + lineNo); - }, false); + prettyPrintWorker = new DevTools.DevToolsWorker( + DevTools.prettyPrintWorkerUrl, { + name: "pretty-print", + verbose: DevTools.DevToolsUtils.dumpn.wantLogging + } + ); } return prettyPrintWorker; diff --git a/extension/content/firebug/console/commandLineExposed.js b/extension/content/firebug/console/commandLineExposed.js index f0cdc28c96..4b8ebe5468 100644 --- a/extension/content/firebug/console/commandLineExposed.js +++ b/extension/content/firebug/console/commandLineExposed.js @@ -237,8 +237,8 @@ function evaluateInGlobal(context, win, expr, origExpr, onSuccess, onError, opti { var dbgGlobal = DebuggerLib.getInactiveDebuggeeGlobal(context, win); var evalMethod = options.noCmdLineAPI ? - dbgGlobal.evalInGlobal : - dbgGlobal.evalInGlobalWithBindings; + (dbgGlobal.executeInGlobal || dbgGlobal.evalInGlobal) : + (dbgGlobal.executeInGlobalWithBindings || dbgGlobal.evalInGlobalWithBindings); var args = [dbgGlobal, evalMethod, dbgGlobal]; args.push.apply(args, arguments); @@ -489,6 +489,8 @@ function handleException(exc, origExpr, context, onError, dbgGlobal) { Obj.getPropertyNames(exc).forEach(function(prop) { + if (prop === '__proto__') + return; result[prop] = exc[prop]; }); result.stack = exc.stack; @@ -526,8 +528,11 @@ function executeInWindowContext(win, func, args, dbgGlobal) var code = "(function() { callback(); })"; var bindings = Object.create(null); bindings.callback = dbgGlobal.makeDebuggeeValue(listener); - var listenerInWindow = dbgGlobal.evalInGlobalWithBindings(code, bindings) - .return.unsafeDereference(); + var listenerInWindow = ( + dbgGlobal.executeInGlobalWithBindings ? + dbgGlobal.executeInGlobalWithBindings(code, bindings) : + dbgGlobal.evalInGlobalWithBindings(code, bindings) + ).return.unsafeDereference(); win.document.addEventListener("firebugCommandLine", listenerInWindow); diff --git a/extension/content/firebug/console/commands/commandLineInclude.js b/extension/content/firebug/console/commands/commandLineInclude.js index 88091c3e4b..3f3683e454 100644 --- a/extension/content/firebug/console/commands/commandLineInclude.js +++ b/extension/content/firebug/console/commands/commandLineInclude.js @@ -15,13 +15,14 @@ define([ "firebug/lib/system", "firebug/lib/xpcom", "firebug/lib/object", + "firebug/lib/devtools", "firebug/chrome/tableRep", "firebug/console/console", "firebug/editor/editor", "firebug/editor/inlineEditor", ], function(Module, Rep, FirebugReps, Domplate, Locale, Dom, Win, Css, Str, Options, Menu, System, - Xpcom, Obj, TableRep, Console, Editor, InlineEditor) { + Xpcom, Obj, DevTools, TableRep, Console, Editor, InlineEditor) { // ********************************************************************************************* // // Constants @@ -37,19 +38,7 @@ var Trace = FBTrace.to("DBG_COMMANDLINE"); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -var ScratchpadManager; - -try -{ - var scope = {}; - Cu.import("resource:///modules/devtools/scratchpad-manager.jsm", scope); - ScratchpadManager = scope.ScratchpadManager; -} -catch(ex) -{ - // Scratchpad does not exists (when using Seamonkey ...) -} - +var ScratchpadManager = DevTools.ScratchpadManager; var storageScope = {}, StorageService; Cu.import("resource://firebug/storageService.js", storageScope); StorageService = storageScope.StorageService; @@ -304,7 +293,7 @@ var CommandLineIncludeRep = domplate(TableRep, } ]; - if (ScratchpadManager) + if (typeof ScratchpadManager.openScratchpad == "function") { items.push({ label: "commandline.label.OpenInScratchpad", diff --git a/extension/content/firebug/console/console.js b/extension/content/firebug/console/console.js index 264f727c8b..6947ede84c 100644 --- a/extension/content/firebug/console/console.js +++ b/extension/content/firebug/console/console.js @@ -10,6 +10,7 @@ define([ "firebug/lib/wrapper", "firebug/lib/xml", "firebug/lib/options", + "firebug/lib/devtools", "firebug/chrome/window", "firebug/chrome/firefox", "firebug/chrome/panelNotification", @@ -21,7 +22,7 @@ define([ "firebug/dom/domBaseTree", "firebug/remoting/debuggerClient", ], -function(Firebug, FBTrace, Obj, Events, Locale, Search, Wrapper, Xml, Options, Win, Firefox, +function(Firebug, FBTrace, Obj, Events, Locale, Search, Wrapper, Xml, Options, DevTools, Win, Firefox, PanelNotification, ActivableModule, ConsoleBase, SourceLink, StackFrame, StackTrace, DomBaseTree, DebuggerClient) { @@ -30,12 +31,11 @@ function(Firebug, FBTrace, Obj, Events, Locale, Search, Wrapper, Xml, Options, W // ********************************************************************************************* // // Constants -var Cu = Components.utils; -var scope = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); -var {ConsoleAPIListener} = scope.devtools.require("devtools/toolkit/webconsole/utils"); +var {ConsoleAPIListener} = DevTools.safeRequire(DevTools.devtools, + "devtools/shared/webconsole/utils", + "devtools/toolkit/webconsole/utils"); -// Note: createDefaultReturnValueInstance() is a local helper (see below). -var defaultReturnValue = createDefaultReturnValueInstance(); +var defaultReturnValue = Object.preventExtensions(Object.create(null)); var Trace = FBTrace.to("DBG_CONSOLE"); var TraceError = FBTrace.toError(); @@ -493,27 +493,6 @@ Firebug.ConsoleListener = } }; -// ********************************************************************************************* // -// Local Helpers - -function createDefaultReturnValueInstance() -{ - var proto = - { - __exposedProps__: - { - "toString": "rw" - }, - - toString: function() - { - return undefined; - } - }; - - return Object.preventExtensions(Object.create(proto)); -} - // ********************************************************************************************* // // Registration diff --git a/extension/content/firebug/console/errorStackTraceObserver.js b/extension/content/firebug/console/errorStackTraceObserver.js index c1ef6b0532..f42445d22d 100644 --- a/extension/content/firebug/console/errorStackTraceObserver.js +++ b/extension/content/firebug/console/errorStackTraceObserver.js @@ -154,9 +154,17 @@ var ErrorStackTraceObserver = Obj.extend(Module, if (!sourceFile) sourceFile = {href: script.url}; - var line = script.getOffsetLine(state.offsets[i]); - var args = state.argCopies[i]; + var line; + + // getOffsetLocation has been introduced in Firefox 44 (Fx44) + // https://bugzilla.mozilla.org/show_bug.cgi?id=863089 + // https://github.com/firebug/firebug/issues/7961 + if (typeof script.getOffsetLocation == "function") + line = script.getOffsetLocation(state.offsets[i]).lineNumber; + else + line = script.getOffsetLine(state.offsets[i]); + var args = state.argCopies[i]; var stackFrame = new StackFrame(sourceFile, line, state.frameNames[i], args, null, 0, context); trace.frames.push(stackFrame); diff --git a/extension/content/firebug/console/functionMonitor.js b/extension/content/firebug/console/functionMonitor.js index 8988356f5f..537ce6155d 100644 --- a/extension/content/firebug/console/functionMonitor.js +++ b/extension/content/firebug/console/functionMonitor.js @@ -123,7 +123,11 @@ var FunctionMonitor = Obj.extend(Module, Trace.sysout("functionMonitor.monitorScript; " + script.url + ", " + script.startLine); - var location = {line: script.startLine, url: script.url}; + var url = script.url; + var columnOffsets = script.getAllColumnOffsets(); + if (!columnOffsets || !columnOffsets.length) + return false; + var location = {line: columnOffsets[0].lineNumber, url: script.url}; // If the first line of the script contains no code, slide down to // the next line that has runnable code. diff --git a/extension/content/firebug/cookies/cookieObserver.js b/extension/content/firebug/cookies/cookieObserver.js index 9e0f0a92d8..f76442c947 100644 --- a/extension/content/firebug/cookies/cookieObserver.js +++ b/extension/content/firebug/cookies/cookieObserver.js @@ -432,7 +432,7 @@ var CookieObserver = Obj.extend(BaseObserver, logEvent: function(eventObject, context, className) { - // xxxHonza: if the cookie is changed befor initContext, the log in + // xxxHonza: if the cookie is changed before initContext, the log in // console is lost. Firebug.Console.log(eventObject, context, className, null, true); } diff --git a/extension/content/firebug/cookies/cookiePanel.js b/extension/content/firebug/cookies/cookiePanel.js index 3bbe9088cc..5f55ca66bc 100644 --- a/extension/content/firebug/cookies/cookiePanel.js +++ b/extension/content/firebug/cookies/cookiePanel.js @@ -499,7 +499,7 @@ CookiePanel.prototype = Obj.extend(ActivablePanel, // Cookie Breakpoints /** - * @class Represents an {@link Debugger} listener. This listener is reponsible for + * @class Represents an {@link Debugger} listener. This listener is responsible for * providing a list of cookie breakpoints for the Breakpoints side panel. */ CookieModule.DebuggerListener = diff --git a/extension/content/firebug/cookies/cookieReps.js b/extension/content/firebug/cookies/cookieReps.js index 38e4d9cb78..4ab8539efe 100644 --- a/extension/content/firebug/cookies/cookieReps.js +++ b/extension/content/firebug/cookies/cookieReps.js @@ -215,7 +215,7 @@ CookieReps.CookieRow = domplate(CookieReps.Rep, return ""; // The first character is space so, if the table is sorted according - // to this column, all "Session" cookies are displayed at the begining. + // to this column, all "Session" cookies are displayed at the beginning. if (CookieUtils.isSessionCookie(cookie.cookie)) return " " + Locale.$STR("cookies.Session"); diff --git a/extension/content/firebug/css/computedPanel.js b/extension/content/firebug/css/computedPanel.js index e69abe8733..5568976bd7 100644 --- a/extension/content/firebug/css/computedPanel.js +++ b/extension/content/firebug/css/computedPanel.js @@ -14,6 +14,7 @@ define([ "firebug/lib/string", "firebug/lib/url", "firebug/lib/xml", + "firebug/lib/devtools", "firebug/chrome/menu", "firebug/chrome/panel", "firebug/css/cssModule", @@ -22,7 +23,7 @@ define([ "firebug/debugger/script/sourceLink", ], function(Firebug, Arr, Css, Dom, Domplate, Events, Locale, Obj, Options, Persist, Str, Url, Xml, - Menu, Panel, CSSModule, CSSReps, LoadHandler, SourceLink) { + DevTools, Menu, Panel, CSSModule, CSSReps, LoadHandler, SourceLink) { "use strict"; @@ -42,9 +43,10 @@ try { // Firefox 24 // waiting for: https://bugzilla.mozilla.org/show_bug.cgi?id=867595 - var scope = {} - Cu.import("resource://gre/modules/devtools/Loader.jsm", scope); - var {CssLogic} = scope.devtools.require("devtools/styleinspector/css-logic"); + var {CssLogic} = DevTools.safeRequire(DevTools.devtools, + "devtools/shared/inspector/css-logic", + "devtools/shared/styleinspector/css-logic", + "devtools/styleinspector/css-logic"); } catch (e) { @@ -668,6 +670,14 @@ CSSComputedPanel.prototype = Obj.extend(Panel, if (!cssValue) return false; + if (cssValue.type === "colorKeyword" || cssValue.type === "gradient") + { + var currentColor = this.getCurrentColor(); + cssValue.value = cssValue.value.replace(/currentcolor/gi, currentColor); + if (cssValue.value === "") + return false; + } + if (cssValue.value == this.infoTipValue) return true; @@ -712,6 +722,12 @@ CSSComputedPanel.prototype = Obj.extend(Panel, } }, + getCurrentColor: function() + { + var cs = this.selection.ownerDocument.defaultView.getComputedStyle(this.selection); + return cs.getPropertyValue("color"); + }, + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Change Listener diff --git a/extension/content/firebug/css/cssEditor.js b/extension/content/firebug/css/cssEditor.js index 204b5b9f55..0673861528 100644 --- a/extension/content/firebug/css/cssEditor.js +++ b/extension/content/firebug/css/cssEditor.js @@ -248,7 +248,7 @@ CSSEditor.prototype = domplate(InlineEditor.prototype, var saveSuccess = (rule.conditionText == value); this.box.setAttribute("saveSuccess", saveSuccess); } - else if (rule instanceof window.CSSCharsetRule) + else if (window.CSSCharsetRule && rule instanceof window.CSSCharsetRule) { target.textContent = value; diff --git a/extension/content/firebug/css/cssPanel.js b/extension/content/firebug/css/cssPanel.js index b6e9023281..801b5abaf1 100644 --- a/extension/content/firebug/css/cssPanel.js +++ b/extension/content/firebug/css/cssPanel.js @@ -485,7 +485,7 @@ Firebug.CSSStyleSheetPanel.prototype = Obj.extend(Panel, { rules.push({tag: CSSReps.CSSImportRuleTag.tag, rule: rule}); } - else if (rule instanceof window.CSSCharsetRule) + else if (window.CSSCharsetRule && rule instanceof window.CSSCharsetRule) { rules.push({tag: CSSReps.CSSCharsetRuleTag.tag, rule: rule}); } @@ -1450,9 +1450,10 @@ Firebug.CSSStyleSheetPanel.prototype = Obj.extend(Panel, if (!cssValueInfo) return false; - if (cssValueInfo.value === "currentcolor") + if (cssValueInfo.type === "colorKeyword" || cssValueInfo.type === "gradient") { - cssValueInfo.value = this.getCurrentColor(); + var currentColor = this.getCurrentColor(); + cssValueInfo.value = cssValueInfo.value.replace(/currentcolor/gi, currentColor); if (cssValueInfo.value === "") return false; } diff --git a/extension/content/firebug/debugger/actors/breakpointActor.js b/extension/content/firebug/debugger/actors/breakpointActor.js index 07af36dc5f..fb850842cd 100644 --- a/extension/content/firebug/debugger/actors/breakpointActor.js +++ b/extension/content/firebug/debugger/actors/breakpointActor.js @@ -3,10 +3,11 @@ define([ "firebug/lib/object", "firebug/lib/trace", + "firebug/lib/devtools", "firebug/debugger/debuggerLib", "firebug/debugger/breakpoints/breakpointStore", ], -function(Obj, FBTrace, DebuggerLib, BreakpointStore) { +function(Obj, FBTrace, DevTools, DebuggerLib, BreakpointStore) { "use strict"; @@ -21,7 +22,7 @@ function(Obj, FBTrace, DebuggerLib, BreakpointStore) { var Cu = Components.utils; -Cu["import"]("resource://gre/modules/devtools/dbg-server.jsm"); +var DebuggerServer = DevTools.DebuggerServer; // xxxHonza: Firefox 32 changes the location of BreakpointActor object, // but implements support for server side breakpoint condition evaluation diff --git a/extension/content/firebug/debugger/actors/elementActor.js b/extension/content/firebug/debugger/actors/elementActor.js index 4a97780a79..6e929f87d2 100644 --- a/extension/content/firebug/debugger/actors/elementActor.js +++ b/extension/content/firebug/debugger/actors/elementActor.js @@ -3,8 +3,9 @@ define([ "firebug/lib/object", "firebug/lib/trace", + "firebug/lib/devtools", ], -function(Obj, FBTrace) { +function(Obj, FBTrace, DevTools) { // ********************************************************************************************* // // Constants @@ -13,7 +14,7 @@ var Cc = Components.classes; var Ci = Components.interfaces; var Cu = Components.utils; -Cu["import"]("resource://gre/modules/devtools/dbg-server.jsm"); +var DebuggerServer = DevTools.DebuggerServer; // ********************************************************************************************* // // Implementation diff --git a/extension/content/firebug/debugger/actors/objectActor.js b/extension/content/firebug/debugger/actors/objectActor.js index 13639cd8b4..b2f5970ec7 100644 --- a/extension/content/firebug/debugger/actors/objectActor.js +++ b/extension/content/firebug/debugger/actors/objectActor.js @@ -4,8 +4,9 @@ define([ "firebug/lib/object", "firebug/lib/trace", "firebug/lib/options", + "firebug/lib/devtools", ], -function(Obj, FBTrace, Options) { +function(Obj, FBTrace, Options, DevTools) { // ********************************************************************************************* // // Constants @@ -14,8 +15,7 @@ var Cc = Components.classes; var Ci = Components.interfaces; var Cu = Components.utils; -Cu["import"]("resource://gre/modules/devtools/dbg-server.jsm"); - +var DebuggerServer = DevTools.DebuggerServer; var ObjectActor = DebuggerServer.ObjectActor; var propMax = Options.get("ObjectShortIteratorMax"); diff --git a/extension/content/firebug/debugger/actors/threadActor.js b/extension/content/firebug/debugger/actors/threadActor.js index d2593e03e3..8d42389080 100644 --- a/extension/content/firebug/debugger/actors/threadActor.js +++ b/extension/content/firebug/debugger/actors/threadActor.js @@ -4,9 +4,10 @@ define([ "firebug/lib/object", "firebug/lib/trace", "firebug/lib/options", + "firebug/lib/devtools", "firebug/debugger/actors/elementActor", ], -function(Obj, FBTrace, Options, ElementActor) { +function(Obj, FBTrace, Options, DevTools, ElementActor) { // ********************************************************************************************* // // Constants @@ -15,8 +16,7 @@ var Cc = Components.classes; var Ci = Components.interfaces; var Cu = Components.utils; -Cu["import"]("resource://gre/modules/devtools/dbg-server.jsm"); - +var DebuggerServer = DevTools.DebuggerServer; var ThreadActor = DebuggerServer.ThreadActor; // ********************************************************************************************* // diff --git a/extension/content/firebug/debugger/breakpoints/breakpoint.js b/extension/content/firebug/debugger/breakpoints/breakpoint.js index 0e66f97c68..da31803158 100644 --- a/extension/content/firebug/debugger/breakpoints/breakpoint.js +++ b/extension/content/firebug/debugger/breakpoints/breakpoint.js @@ -7,7 +7,7 @@ function(FBTrace) { // ********************************************************************************************* // -function Breakpoint(href, lineNumber, disabled,type) +function Breakpoint(href, lineNumber, disabled, type) { this.href = href; this.lineNo = lineNumber; diff --git a/extension/content/firebug/debugger/breakpoints/breakpointStore.js b/extension/content/firebug/debugger/breakpoints/breakpointStore.js index ae6a4a2fdb..5c373ee371 100644 --- a/extension/content/firebug/debugger/breakpoints/breakpointStore.js +++ b/extension/content/firebug/debugger/breakpoints/breakpointStore.js @@ -221,7 +221,7 @@ var BreakpointStore = Obj.extend(Module, // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - addBreakpoint: function(url, lineNo, condition, type) + addBreakpoint: function(url, lineNo, condition, type, disabled = false) { type = type || BP_NORMAL; @@ -239,7 +239,7 @@ var BreakpointStore = Obj.extend(Module, // will be kept otherwise removed. if (condition != null) { - var bp = new Breakpoint(url, lineNo, false, type); + var bp = new Breakpoint(url, lineNo, disabled, type); bp.condition = condition; // We just need to find the actual location of a breakpoint. @@ -270,7 +270,7 @@ var BreakpointStore = Obj.extend(Module, if (!this.breakpoints[url]) this.breakpoints[url] = []; - var bp = new Breakpoint(url, lineNo, false, type); + var bp = new Breakpoint(url, lineNo, disabled, type); this.breakpoints[url].push(bp); Trace.sysout("breakpointStore.addBreakpoint; NEW BP: " + diff --git a/extension/content/firebug/debugger/breakpoints/breakpointTool.js b/extension/content/firebug/debugger/breakpoints/breakpointTool.js index fb93b78ff7..bcaaf7e11b 100644 --- a/extension/content/firebug/debugger/breakpoints/breakpointTool.js +++ b/extension/content/firebug/debugger/breakpoints/breakpointTool.js @@ -95,11 +95,25 @@ BreakpointTool.prototype = Obj.extend(new Tool(), { Trace.sysout("breakpointTool.onAddBreakpoint; (" + bp.lineNo + ")", bp); + // Do not create server side actors for disabled breakpoints. + if (bp.disabled) + { + this.dispatch("onBreakpointAdded", [this.context, bp]); + Firebug.dispatchEvent(this.context.browser, "onBreakpointAdded", [bp]); + return; + } + var self = this; this.setBreakpoint(bp.href, bp.lineNo, function(response, bpClient) { Trace.sysout("breakpointTool.onAddBreakpoint; callback executed", response); + // Protocol change, URL is now stored in the source. + // Make a copy to the expected location. + if (!bpClient.location.url) { + bpClient.location.url = bpClient.source._form.href; + } + // Do not log error if it's 'noScript'. It's quite common that breakpoints // are set before scripts exists (or no longer exists since garbage collected). if (response.error && response.error != "noScript") @@ -142,7 +156,12 @@ BreakpointTool.prototype = Obj.extend(new Tool(), // the UI is properly (and asynchronously) updated everywhere. self.dispatch("onBreakpointAdded", [self.context, bp]); - Firebug.dispatchEvent(self.context.browser, "onBreakpointAdded", [bp]); + // Adding breakpoints is asynchronous, it might happen that the + // context (and browser) is closed soon than the async process + // finishes, so avoid exception. + // It would be better to avoid such scenarios. + if (self.context.browser) + Firebug.dispatchEvent(self.context.browser, "onBreakpointAdded", [bp]); // The info about the original line should not be needed any more. delete bp.params.originLineNo; @@ -373,18 +392,29 @@ BreakpointTool.prototype = Obj.extend(new Tool(), // executed as soon as we receive a response. if (!isNormalDisabledBreakpoint(bp)) { - self.context.activeThread.setBreakpoint(location, - self.onSetBreakpoint.bind(self, callback)); + // The protocol changed in Firefox 36. Setting a breakpoint + // is now done through source actor not thread actor. + // See also: + // https://bugzilla.mozilla.org/show_bug.cgi?id=1105493 + // https://code.google.com/p/fbug/issues/detail?id=7724 + var setBreakpoint = self.context.activeThread.setBreakpoint; + if (typeof setBreakpoint == "function") + { + self.context.activeThread.setBreakpoint(location, + self.onSetBreakpoint.bind(self, callback)); + } + else + { + var sourceFile = self.context.getSourceFile(url); + if (sourceFile) + { + let sourceClient = sourceFile.getClient(); + sourceClient.setBreakpoint(location, self.onSetBreakpoint.bind(self, callback)); + } + } } } - // If the debuggee is paused, just set the breakpoint. - if (thread.paused) - { - doSetBreakpoint(callback); - return; - } - // If the previous async-process hasn't finished yet, put arguments in a queue. if (this.setBreakpointInProgress) { @@ -397,6 +427,22 @@ BreakpointTool.prototype = Obj.extend(new Tool(), this.setBreakpointInProgress = true; + // If the debuggee is paused, just set the breakpoint. + if (thread.paused) + { + doSetBreakpoint(function(response, bpClient) + { + self.setBreakpointInProgress = false; + + callback(response, bpClient); + + // Set breakpoints waiting in the queue. + if (self.queue.length > 0) + self.setBreakpoint.apply(self, self.queue.shift()); + }); + return; + } + // Otherwise, force a pause in order to set the breakpoint. // xxxHonza: this sometimes generates 'alreadyPaused' packet, fix me. // Or maybe the interrupt call in setBreakpoints. You need a page with two @@ -501,10 +547,9 @@ BreakpointTool.prototype = Obj.extend(new Tool(), Trace.sysout("breakpointTool.doSetBreakpoints; ", arr); // Iterate all breakpoints in the given array and set them step by step. - // The thread is paused at this point. The following loop generates a set of - // 'setBreakpoint' packets that are put in an internal queue (in the underlying - // RDP framework) and handled step by step, i.e. the next 'setBreakpoint' packet - // is sent as soon as a response for the previous one is received. + // The following loop resumes/interrupts the thread for every bp set. + // This should be optimized by using Promises (callbacks make this + // a lot more complicated). for (var i = 0; i < arr.length; i++) self.onAddBreakpoint(arr[i]); diff --git a/extension/content/firebug/debugger/commands.js b/extension/content/firebug/debugger/commands.js index d0b135883d..00258baa13 100644 --- a/extension/content/firebug/debugger/commands.js +++ b/extension/content/firebug/debugger/commands.js @@ -7,12 +7,13 @@ define([ "firebug/lib/trace", "firebug/lib/object", "firebug/lib/options", + "firebug/lib/devtools", "firebug/chrome/module", "firebug/debugger/rdp", "firebug/debugger/debuggerLib", "firebug/debugger/breakpoints/breakpointStore" ], -function(Firebug, FBTrace, Obj, Options, Module, RDP, DebuggerLib, BreakpointStore) { +function(Firebug, FBTrace, Obj, Options, DevTools, Module, RDP, DebuggerLib, BreakpointStore) { "use strict"; @@ -23,7 +24,7 @@ var Cc = Components.classes; var Ci = Components.interfaces; var Cu = Components.utils; -Cu["import"]("resource://gre/modules/devtools/dbg-server.jsm"); +var DebuggerServer = DevTools.DebuggerServer; var Trace = FBTrace.to("DBG_DEBUGGER_COMMANDS"); var TraceError = FBTrace.toError(); diff --git a/extension/content/firebug/debugger/debuggerLib.js b/extension/content/firebug/debugger/debuggerLib.js index ad44984793..486e9af217 100644 --- a/extension/content/firebug/debugger/debuggerLib.js +++ b/extension/content/firebug/debugger/debuggerLib.js @@ -43,6 +43,10 @@ DebuggerLib.unwrapDebuggeeValue = function(obj) if (typeof obj !== "object" || obj === null) return obj; + if (typeof obj.unsafeDereference != "function") { + return; + } + return Wrapper.unwrapObject(obj.unsafeDereference()); }; @@ -147,6 +151,17 @@ DebuggerLib.getObject = function(context, actorId) if (!actor && threadActor._pausePool) actor = threadActor._pausePool.get(actorId); + // Check also the youngest frame that contains objects + // living in the scope. + // We could also iterate all frames through: threadActor.framePool, + // but it could have an impact on performance since this method + // is called quite often. It would have to be tested carefully. + if (!actor && threadActor.youngestFrame && + threadActor.youngestFrame.actor && + threadActor.youngestFrame.actor.frameLifetimePool) { + actor = threadActor.youngestFrame.actor.frameLifetimePool.get(actorId); + } + if (!actor) return null; @@ -209,6 +224,11 @@ DebuggerLib.getThreadDebugger = function(context) */ DebuggerLib.getThreadDebuggeeGlobalForContext = function(context, global) { + // Fx27+; this works even with cross-origin frames. + var dbg = DebuggerLib.getThreadDebugger(context); + if (dbg && dbg.makeGlobalObjectReference) + return dbg.makeGlobalObjectReference(global); + var threadActor = DebuggerLib.getThreadActor(context.browser); if (!threadActor || !threadActor.globalDebugObject) return null; @@ -369,6 +389,12 @@ DebuggerLib.isExecutableLine = function(context, location) return; } + if (!location.url) + { + TraceError.sysout("debuggerClient.isExecutableLine; ERROR No URL?"); + return; + } + // Set 'innermost' property to false to get any script that is presented // on the specified line (see also issue 7176). var query = { @@ -541,7 +567,9 @@ DebuggerLib.breakNow = function(context) // but we might want to change what global to use here. var global = context.getCurrentGlobal(); var dbgGlobal = this.getInactiveDebuggeeGlobal(context, global); - return dbgGlobal.evalInGlobal("debugger;"); + return dbgGlobal.executeInGlobal ? + dbgGlobal.executeInGlobal("debugger;") : + dbgGlobal.evalInGlobal("debugger;"); } }; diff --git a/extension/content/firebug/debugger/debuggerTool.js b/extension/content/firebug/debugger/debuggerTool.js index f15abfda39..5ee2828867 100644 --- a/extension/content/firebug/debugger/debuggerTool.js +++ b/extension/content/firebug/debugger/debuggerTool.js @@ -187,6 +187,11 @@ DebuggerTool.prototype = Obj.extend(new Tool(), return doResume(this); } + // Backward compatibility with the protocol (URL is now in the source). + if (!packet.frame.where.url) { + packet.frame.where.url = packet.frame.where.source.url; + } + // See: https://bugzilla.mozilla.org/show_bug.cgi?id=829028 // Avoid double-break at the same line (e.g. breakpoint + step-over) @@ -303,6 +308,14 @@ DebuggerTool.prototype = Obj.extend(new Tool(), // which is stored in the context. var frames = this.context.activeThread.cachedFrames; + // Backward compatibility + for (var i=0; i x.id); prefs.setCharPref(this._prefName, editors.join(",")); } catch (exc) diff --git a/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml b/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml new file mode 100644 index 0000000000..53b04db771 --- /dev/null +++ b/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extension/content/firebug/html/eventsPanel.js b/extension/content/firebug/html/eventsPanel.js index de2ae8231a..966efb9467 100644 --- a/extension/content/firebug/html/eventsPanel.js +++ b/extension/content/firebug/html/eventsPanel.js @@ -260,7 +260,7 @@ EventsPanel.prototype = Obj.extend(Firebug.Panel, return null; try { - // Pattern match on the occurance of '.event..apply'. + // Pattern match on the occurrence of '.event..apply'. var matches = /\b([a-zA-Z_$][a-zA-Z0-9_$]*)\.event\.(dispatch|handle)\.apply/.exec(src); var jqName = (matches && matches[1]) || ""; dbgEnv = dbgEnv.find(jqName); @@ -406,7 +406,7 @@ EventsPanel.prototype = Obj.extend(Firebug.Panel, getListeners: function(target) { var normal = this.getNormalEventListeners(target); - var disabled = this.getDisabledMap(this.context).get(target, []); + var disabled = this.getDisabledMap(this.context).get(target) || []; // Try to insert the disabled listeners at their previous positions. This will be // wrong in case listeners have been removed since those positions were recorded, diff --git a/extension/content/firebug/html/htmlModule.js b/extension/content/firebug/html/htmlModule.js index dbafb424a5..5a731eacc8 100644 --- a/extension/content/firebug/html/htmlModule.js +++ b/extension/content/firebug/html/htmlModule.js @@ -102,7 +102,7 @@ var HTMLModule = Obj.extend(Module, // Mutation Breakpoints /** - * @class Represents {@link Firebug.Debugger} listener. This listener is reponsible for + * @class Represents {@link Firebug.Debugger} listener. This listener is responsible for * providing a list of mutation-breakpoints into the Breakpoints side-panel. */ HTMLModule.DebuggerListener = diff --git a/extension/content/firebug/html/inspector.js b/extension/content/firebug/html/inspector.js index 5c0a62ce1c..716e298c5b 100644 --- a/extension/content/firebug/html/inspector.js +++ b/extension/content/firebug/html/inspector.js @@ -1501,7 +1501,7 @@ function attachStyles(context, doc) highlightStyleCache.set(doc, style); } - // Cater for the possiblity that someone might have removed our stylesheet. + // Cater for the possibility that someone might have removed our stylesheet. if (!style.parentNode) Css.addStyleSheet(doc, style); } diff --git a/extension/content/firebug/lib/channel.js b/extension/content/firebug/lib/channel.js new file mode 100644 index 0000000000..1139e42a0a --- /dev/null +++ b/extension/content/firebug/lib/channel.js @@ -0,0 +1,46 @@ +/* See license.txt for terms of usage */ + +define([ +], +function() { + +"use strict"; + +const Cc = Components.classes; +const Ci = Components.interfaces; +const Cu = Components.utils; + +var appInfo = Cc["@mozilla.org/xre/app-info;1"] + .getService(Ci.nsIXULAppInfo); +var versionComparator = Cc["@mozilla.org/xpcom/version-comparator;1"] + .getService(Ci.nsIVersionComparator); +var fx47OrEarlier = (versionComparator.compare(appInfo.version, "47a1") < 0); + +const ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); + +Cu.import("resource://gre/modules/NetUtil.jsm"); + +// ********************************************************************************************* // +// Module + +var Channel = {}; + +Channel.new = function(url) +{ + if (fx47OrEarlier) + { + return ioService.newChannel(url, null, null); + } + else + { + return NetUtil.newChannel({ + uri: url, + loadUsingSystemPrincipal: true + }); + } +} + +return Channel; + +// ********************************************************************************************* // +}); diff --git a/extension/content/firebug/lib/css.js b/extension/content/firebug/lib/css.js index c2d4988483..87a30e4c4e 100644 --- a/extension/content/firebug/lib/css.js +++ b/extension/content/firebug/lib/css.js @@ -1202,6 +1202,7 @@ Css.unitlessProperties = "font-weight": 1, "line-height": 1, "opacity": 1, + "order": 1, "orphans": 1, "widows": 1, "z-index": 1, @@ -1254,7 +1255,6 @@ Css.cssKeywords = "boxModels": [ - "padding-box", "border-box", "content-box" ], @@ -1458,10 +1458,12 @@ Css.cssKeywords = [ "matrix()", "matrix3d()", + "perspective()", "rotate()", "rotateX()", "rotateY()", "rotateZ()", + "rotate3d()", "scale()", "scaleX()", "scaleY()", @@ -1472,7 +1474,8 @@ Css.cssKeywords = "translate()", "translateX()", "translateY()", - "translateZ()" + "translateZ()", + "translate3d()" ], "mozFontFeatureSettings": diff --git a/extension/content/firebug/lib/devtools.js b/extension/content/firebug/lib/devtools.js new file mode 100644 index 0000000000..85ad112e97 --- /dev/null +++ b/extension/content/firebug/lib/devtools.js @@ -0,0 +1,158 @@ +/* See license.txt for terms of usage */ +/*global define:1, Components:1, Window:1*/ + +define([ +], +function() { + +"use strict"; + +var Cu = Components.utils; +var Cc = Components.classes; +var Ci = Components.interfaces; + +var appInfo = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo); +var versionComparator = Cc["@mozilla.org/xpcom/version-comparator;1"].getService(Ci.nsIVersionComparator); + +var exports = {}; + +/** + * Allows importing a JS module (Firefox platform) and specify alternative locations + * to keep backward compatibility in case when the module location changes. + * It helps Firebug to support multiple Firefox versions. + * + * @param {Array} locations List of URLs to try when importing the module. + * @returns Scope of the imported module or an empty scope if module wasn't successfully loaded. + */ +function safeImport(...args) { + for (var i=0; i a/c). while (url.indexOf("/../") !== -1 && url[0] != "/") - url = url.replace(/[^\/]+\/\.\.\//g, ""); + url = url.replace(/[^\/]+\/+\.\.\//g, ""); // Issue 1496, avoid # url = url.replace(/#.*/, ""); diff --git a/extension/content/firebug/net/netCacheReader.js b/extension/content/firebug/net/netCacheReader.js index b87be2a985..f0549ec07e 100644 --- a/extension/content/firebug/net/netCacheReader.js +++ b/extension/content/firebug/net/netCacheReader.js @@ -279,8 +279,16 @@ function onDescriptorAvailable(netProgress, file, descriptor) { Trace.sysout("netCacheReader.onDescriptorAvailable; file.href: " + file.href, descriptor); + // Avoid error message in the Console panel. + // See also: https://github.com/firebug/firebug/issues/8003 + let descriptorDataSize = 0; + try { + descriptorDataSize = descriptor.dataSize; + } catch (err) { + } + if (file.size <= 0) - file.size = descriptor.dataSize; + file.size = descriptorDataSize; if (descriptor.lastModified && descriptor.lastFetched && descriptor.lastModified < Math.floor(file.startTime/1000)) @@ -304,7 +312,7 @@ function onDescriptorAvailable(netProgress, file, descriptor) }, { name: "Data Size", - value: descriptor.dataSize + value: descriptorDataSize }, { name: "Fetch Count", diff --git a/extension/content/firebug/net/netPanel.js b/extension/content/firebug/net/netPanel.js index a2106f0e3f..db03d0318e 100644 --- a/extension/content/firebug/net/netPanel.js +++ b/extension/content/firebug/net/netPanel.js @@ -888,7 +888,7 @@ NetPanel.prototype = Obj.extend(ActivablePanel, var tbody = this.table.querySelector(".netTableBody"); // xxxHonza: Fake first row (shold be renamed, but it's a hack anyway). - // There is no way to insert a row befor the current first row in a table. + // There is no way to insert a row before the current first row in a table. // See Domplate.insertRows() comment for more details. NetRequestEntry.footerTag.insertRows({}, tbody); @@ -1059,7 +1059,7 @@ NetPanel.prototype = Obj.extend(ActivablePanel, { var tbody = this.table.querySelector(".netTableBody"); - // XXXjoe Don't update rows whose phase is done and layed out already + // XXXjoe Don't update rows whose phase is done and laid out already var phase; for (var row = tbody.firstChild; row; row = row.nextSibling) { diff --git a/extension/content/firebug/net/netProgress.js b/extension/content/firebug/net/netProgress.js index 0f7950183e..189b3a539f 100644 --- a/extension/content/firebug/net/netProgress.js +++ b/extension/content/firebug/net/netProgress.js @@ -956,6 +956,7 @@ NetProgress.prototype = function logTime(file, title, time) { // xxxHonza: just for debugging purposes. + /* return; if (!file._timings) @@ -969,6 +970,7 @@ function logTime(file, title, time) index: ++file._timings.counter, time: time }); + */ } // ********************************************************************************************* // diff --git a/extension/content/firebug/net/netReps.js b/extension/content/firebug/net/netReps.js index 75048c1ed1..befb420626 100644 --- a/extension/content/firebug/net/netReps.js +++ b/extension/content/firebug/net/netReps.js @@ -1063,7 +1063,7 @@ Firebug.NetMonitor.NetInfoBody = domplate(Rep, new EventSource(), Firebug.NetMonitor.NetInfoHeaders.renderHeaders(headersText, file.responseHeaders, "ResponseHeaders"); - // If the request comes from the BFCache do not display reponse headers. + // If the request comes from the BFCache do not display response headers. // There is not real response from the server and all headers come from // the cache. So, the user should see the 'Response Headers From Cache' // section (see issue 5573). @@ -1706,6 +1706,11 @@ Firebug.NetMonitor.NetInfoHeaders = domplate(Rep, new EventSource(), var netInfoBox = Dom.getAncestorByClass(target, "netInfoBody"); var file = netInfoBox.repObject; + // Use the original file object (workaround for issue #7928) + if (file.context) { + file = file.context.netProgress.getRequestFile(file.request) || file; + } + if (target.sourceDisplayed) { var headers = requestHeaders ? file.requestHeaders : file.responseHeaders; diff --git a/extension/content/firebug/net/netUtils.js b/extension/content/firebug/net/netUtils.js index eba7eb172d..0a932244db 100644 --- a/extension/content/firebug/net/netUtils.js +++ b/extension/content/firebug/net/netUtils.js @@ -240,7 +240,7 @@ var NetUtils = getResponseText: function(file, context) { - // The response can be also empty string so, check agains "undefined". + // The response can be also empty string so, check against "undefined". return (typeof(file.responseText) != "undefined") ? file.responseText : context.sourceCache.loadText(file.href, file.method, file); @@ -371,7 +371,7 @@ var NetUtils = * The logic is as follows: * 1) If the request is an XHR, return 'xhr' as category * 2) Otherwise use the file extension to guess the MIME type. - * This is prefered since MIME types in HTTP requests are often wrong. + * This is preferred since MIME types in HTTP requests are often wrong. * This part is based on the 'mimeExtensionMap' map. * 3) If the file extension is missing or unknown, try to get the MIME type * from the HTTP request object. @@ -389,7 +389,7 @@ var NetUtils = * The logic is as follows: * 1) If the request is an XHR, add 'xhr' as category * 2) Use the file extension to guess the MIME type. - * This is prefered since MIME types in HTTP requests are often wrong. + * This is preferred since MIME types in HTTP requests are often wrong. * This part is based on the 'mimeExtensionMap' map. * 3) If the file extension is missing or unknown, try to get the MIME type * from the HTTP request object. @@ -408,7 +408,7 @@ var NetUtils = categories.push("xhr"); // Guess mime-type according to the file extension. Using file extension - // is prefered way since mime-types in HTTP requests are often wrong. + // is preferred way since mime-types in HTTP requests are often wrong. var mimeType = this.getMimeType(null, file.href); // If no luck with file extension, let's try to get the mime-type from diff --git a/extension/content/firebug/net/sourceCache.js b/extension/content/firebug/net/sourceCache.js index 67a1c898c2..4704da81e8 100644 --- a/extension/content/firebug/net/sourceCache.js +++ b/extension/content/firebug/net/sourceCache.js @@ -8,24 +8,24 @@ define([ "firebug/lib/url", "firebug/lib/http", "firebug/lib/options", - "firebug/lib/string" + "firebug/lib/string", + "firebug/lib/channel" ], -function(EventSource, Obj, Firebug, Xpcom, Url, Http, Options, Str) { +function(EventSource, Obj, Firebug, Xpcom, Url, Http, Options, Str, Channel) { // ********************************************************************************************* // // Constants const Cc = Components.classes; const Ci = Components.interfaces; -const nsIIOService = Ci.nsIIOService; +const Cu = Components.utils; + const nsIRequest = Ci.nsIRequest; const nsICachingChannel = Ci.nsICachingChannel; const nsIScriptableInputStream = Ci.nsIScriptableInputStream; const nsIUploadChannel = Ci.nsIUploadChannel; const nsIHttpChannel = Ci.nsIHttpChannel; -const IOService = Cc["@mozilla.org/network/io-service;1"]; -const ioService = IOService.getService(nsIIOService); const ScriptableInputStream = Cc["@mozilla.org/scriptableinputstream;1"]; const chromeReg = Xpcom.CCSV("@mozilla.org/chrome/chrome-registry;1", "nsIToolkitChromeRegistry"); @@ -214,7 +214,7 @@ Firebug.SourceCache.prototype = Obj.extend(new EventSource(), var channel; try { - channel = ioService.newChannel(url, null, null); + channel = Channel.new(url); channel.loadFlags |= LOAD_FROM_CACHE | LOAD_BYPASS_LOCAL_CACHE_IF_BUSY; if (method && (channel instanceof nsIHttpChannel)) diff --git a/extension/content/firebug/net/spy.js b/extension/content/firebug/net/spy.js index 65cab8ab4b..283bce1339 100644 --- a/extension/content/firebug/net/spy.js +++ b/extension/content/firebug/net/spy.js @@ -908,7 +908,7 @@ function onHTTPSpyAbort(spy) updateLogRow(spy); - // Notify Net pane about a request beeing aborted. + // Notify Net pane about a request being aborted. // xxxHonza: the net panel shoud find out this itself. var netProgress = spy.context.netProgress; if (netProgress) diff --git a/extension/content/firebug/net/tabCache.js b/extension/content/firebug/net/tabCache.js index f7578e68b7..ceac59771e 100644 --- a/extension/content/firebug/net/tabCache.js +++ b/extension/content/firebug/net/tabCache.js @@ -18,17 +18,18 @@ define([ "firebug/trace/traceListener", "firebug/net/sourceCache", "firebug/lib/options", + "firebug/lib/channel", ], function(ActivableModule, Obj, Firebug, Xpcom, HttpRequestObserver, HttpResponseObserver, Locale, - Events, Url, Http, Str, Win, JSONViewerModel, TraceModule, TraceListener, SourceCache, Options) { + Events, Url, Http, Str, Win, JSONViewerModel, TraceModule, TraceListener, SourceCache, + Options, Channel) { // ********************************************************************************************* // // Constants const Cc = Components.classes; const Ci = Components.interfaces; - -const ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); +const Cu = Components.utils; // List of text content types. These content-types are cached. var contentTypes = @@ -440,7 +441,7 @@ Firebug.TabCache.prototype = Obj.extend(SourceCache.prototype, if (url === "") return [Locale.$STR("message.sourceNotAvailableFor") + ": " + url]; - var channel = ioService.newChannel(url, null, null); + var channel = Channel.new(url); // These flag combination doesn't repost the request. channel.loadFlags = Ci.nsIRequest.LOAD_FROM_CACHE | diff --git a/extension/content/firebug/remoting/debuggerClient.js b/extension/content/firebug/remoting/debuggerClient.js index c8ecb1d7d7..9a8209c8b6 100644 --- a/extension/content/firebug/remoting/debuggerClient.js +++ b/extension/content/firebug/remoting/debuggerClient.js @@ -6,12 +6,13 @@ define([ "firebug/lib/object", "firebug/lib/options", "firebug/lib/events", + "firebug/lib/devtools", "firebug/chrome/tabWatcher", "firebug/chrome/firefox", "firebug/chrome/window", "firebug/remoting/tabClient", ], -function(Firebug, FBTrace, Obj, Options, Events, TabWatcher, Firefox, Win, TabClient) { +function(Firebug, FBTrace, Obj, Options, Events, DevTools, TabWatcher, Firefox, Win, TabClient) { "use strict"; @@ -24,11 +25,12 @@ var Trace = FBTrace.to("DBG_DEBUGGERCLIENT"); var TraceConn = FBTrace.to("DBG_CONNECTION"); var TraceError = FBTrace.toError(); -var dbgClientScope = {}; -var dbgServerScope = {}; - -Cu["import"]("resource://gre/modules/devtools/dbg-client.jsm", dbgClientScope); -Cu["import"]("resource://gre/modules/devtools/dbg-server.jsm", dbgServerScope); +var dbgClientScope = { + DebuggerClient: DevTools.DebuggerClient +}; +var dbgServerScope = { + DebuggerServer: DevTools.DebuggerServer +}; // ********************************************************************************************* // // Module Implementation @@ -109,10 +111,10 @@ var DebuggerClient = Obj.extend(Firebug.Module, { // The debugger server might be already initialized either by Firebug // in another browser window or by built-in devtools. - if (!DebuggerServer.initialized) + if (!dbgServerScope.DebuggerServer.initialized) { - DebuggerServer.init(function () { return true; }); - DebuggerServer.addBrowserActors(); + dbgServerScope.DebuggerServer.init(function () { return true; }); + dbgServerScope.DebuggerServer.addBrowserActors(); } } catch (e) @@ -123,7 +125,7 @@ var DebuggerClient = Obj.extend(Firebug.Module, this.transport = (this.isRemoteDebugger) ? debuggerSocketConnect(Options.get("remoteHost"), Options.get("remotePort")) : - DebuggerServer.connectPipe(); + dbgServerScope.DebuggerServer.connectPipe(); // Load Firebug actors. If Firebug is running server side these actors // should also be loaded. @@ -405,6 +407,12 @@ var DebuggerClient = Obj.extend(Firebug.Module, onThreadAttached: function(context) { + // "newSource" events are emitted by thread-actor now. + // https://hg.mozilla.org/integration/mozilla-inbound/rev/152f968b6b13 + // https://github.com/firebug/firebug/issues/7918 + // https://bugzilla.mozilla.org/show_bug.cgi?id=1171967 + context.activeThread.addListener("newSource", this.newSource); + this.dispatch("onThreadAttached", [context, false]); Firebug.dispatchEvent(context.browser, "onThreadAttached"); @@ -412,6 +420,8 @@ var DebuggerClient = Obj.extend(Firebug.Module, onThreadDetached: function(context) { + context.activeThread.removeListener("newSource"); + this.dispatch("onThreadDetached", [context]); Firebug.dispatchEvent(context.browser, "onThreadDetached"); diff --git a/extension/content/firebug/remoting/tabClient.js b/extension/content/firebug/remoting/tabClient.js index 44c395950c..c9a7ca1ee3 100644 --- a/extension/content/firebug/remoting/tabClient.js +++ b/extension/content/firebug/remoting/tabClient.js @@ -305,9 +305,9 @@ TabClient.prototype = Obj.extend(new EventSource(), var threadActorObj = DebuggerLib.getThreadActor(this.browser); threadActorObj.global = this.window.wrappedJSObject; - // xxxHonza: The useSourceMaps options might be used by issue 5765 + // Enable pretty printing. See also: https://github.com/firebug/firebug/issues/7906 var options = { - //useSourceMaps: true + useSourceMaps: true }; this.tabClient.attachThread(options, this.onThreadAttached.bind(this)); diff --git a/extension/content/firebug/server/server.js b/extension/content/firebug/server/server.js index 5e8504a206..736e3ad0a3 100644 --- a/extension/content/firebug/server/server.js +++ b/extension/content/firebug/server/server.js @@ -2,8 +2,9 @@ define([ "firebug/lib/trace", + "firebug/lib/devtools", ], -function(FBTrace) { +function(FBTrace, DevTools) { // xxxHonza: FBTrace isn't available when loading from within bootstrap.js // The default FBTrace implementation should buffer all logs that are fired @@ -16,6 +17,8 @@ var Cc = Components.classes; var Ci = Components.interfaces; var Cu = Components.utils; +var DebuggerServer = DevTools.DebuggerServer; + // ********************************************************************************************* // // Module @@ -28,8 +31,6 @@ var Server = { try { - Cu.import("resource:///modules/devtools/dbg-server.jsm"); - DebuggerServer.init(function() { return true; }); // Add built-in actors (like e.g. debugger actors) diff --git a/extension/defaults/preferences/firebug.js b/extension/defaults/preferences/firebug.js index e612c1716c..a1f9b08944 100644 --- a/extension/defaults/preferences/firebug.js +++ b/extension/defaults/preferences/firebug.js @@ -28,6 +28,10 @@ pref("extensions.firebug.hideDefaultInspector", false); pref("extensions.firebug.delayLoad", true); pref("extensions.firebug.clearAnnotationsConfirmation", true); +// Multiprocess Notification +pref("extensions.firebug.noMultiprocessMessage", false); +pref("extensions.firebug.activateFirebugTheme", true); + // Remoting pref("extensions.firebug.serverHost", "localhost"); pref("extensions.firebug.serverPort", 5999); @@ -109,7 +113,8 @@ pref("extensions.firebug.maxScriptLineLength", 10000); pref("extensions.firebug.breakOnExceptions", false); pref("extensions.firebug.ignoreCaughtExceptions", false); pref("extensions.firebug.enableSyntaxHighlighting", true); -pref("extensions.firebug.maxNumberOfDynamicScripts", 300); +pref("extensions.firebug.maxNumberOfDynamicScripts", 150); +pref("extensions.firebug.ignoreDynamicScripts", false); // Stack pref("extensions.firebug.omitObjectPathStack", false); diff --git a/extension/install.rdf b/extension/install.rdf index 69bb34bc9c..69ed7fdce7 100644 --- a/extension/install.rdf +++ b/extension/install.rdf @@ -5,16 +5,17 @@ firebug@software.joehewitt.com - 2.0.7 + 2.0.19 2 true + true toolkit@mozilla.org 30.0a1 - 37.0 + 54.0 @@ -23,7 +24,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 37.0 + 54.0 diff --git a/extension/install.rdf.tpl.xml b/extension/install.rdf.tpl.xml index 3873521a6a..e0bf39e51f 100644 --- a/extension/install.rdf.tpl.xml +++ b/extension/install.rdf.tpl.xml @@ -8,13 +8,14 @@ @VERSION@@RELEASE@ 2 true + true toolkit@mozilla.org 30.0a1 - 37.0 + 54.0 @@ -23,7 +24,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 30.0a1 - 37.0 + 54.0 diff --git a/extension/locale/en-US/multiprocess-notification.properties b/extension/locale/en-US/multiprocess-notification.properties index d62e42b98d..ec4708d232 100644 --- a/extension/locale/en-US/multiprocess-notification.properties +++ b/extension/locale/en-US/multiprocess-notification.properties @@ -1,14 +1,24 @@ -# LOCALIZATION NOTE (multiprocess.description, multiprocess.learnMore, multiprocess.warning, +# LOCALIZATION NOTE (multiprocess.description, multiprocess.description3, multiprocess.learnMore, multiprocess.warning, # multiprocess.upgrade, multiprocess.disable, multiprocess.cancel): # Label used in a notification panel that is displayed when the user clicks on Firebug start # button in multiprocess Firefox browser (e10s enabled browser). -multiprocess.description=Firebug 2 doesn't work with multiprocess Firefox (e10s). So you need to either disable e10s or upgrade to Firebug 3 alpha. -multiprocess.learnMore=Learn more... +multiprocess.description=The next version of Firebug has been integrated directly into the Firefox Developer Tools for increased performance and stability. +multiprocess.description3=This change includes an updated Inspector and new Performance, Storage, and Memory tools, all using the Firebug theme you’re familiar with. +multiprocess.learnMore=Learn more about the changes... multiprocess.warning=Firebug 3 alpha is based on the built-in Firefox developer tools so Firebug 2 addons don't work just yet, however turning off e10s should only be a temporary measure since it brings performance, stability and security advantages. multiprocess.upgrade=Upgrade and Restart -multiprocess.disable=Disable e10s and Restart +multiprocess.disable=Enable old Firebug and disable e10s (requires restart) multiprocess.cancel=Cancel +# LOCALIZATION NOTE (multiprocess.notAgain, multiprocess.description2, +# multiprocess.openDevTools, multiprocess.warning2): Label used in a new notification panel +# that is displayed when the user clicks on Firebug start button in multiprocess +# Firefox browser (e10s enabled browser). +multiprocess.description2=We've ported many Firebug features into built-in tools in order to support existing Firebug users so, go ahead and check it out! +multiprocess.openDevTools=Don’t show this message again +multiprocess.warning2=Turning off e10s should only be a temporary measure since it brings performance, stability and security advantages. +multiprocess.notAgain=Do not display this message again + # LOCALIZATION NOTE (aurora.description, aurora.description2, aurora.notnow, aurora.nothanks): # Label used in a notification panel that is displayed when the user clicks on Firebug start # button in Aurora (Firefox) channel. @@ -26,3 +36,8 @@ upgrade.tip.upgradeFirebug=Upgrade to Firebug 3 (for testers) # Label used in a notification panel that is displayed when the user wants to explicitly upgrade Firebug. upgrade.description=Firebug 3 alpha is available for testing upgrade.description2=Firebug 3 is based on the built-in Firefox developer tools so it works with the performance, stability and security advantages coming with multiprocess Firefox (also known as e10s), however Firebug 2 addons don't work with Firebug 3 yet. + +# LOCALIZATION NOTE (multiprocess.activateFirebugTheme): +# Label used in a notification panel that is displayed when the user wants to explicitly upgrade Firebug. +# The label belongs to a checkbox allowing to activate/deactivate Firebug theme for built-in DevTools +multiprocess.activateFirebugTheme=Activate the Firebug theme diff --git a/extension/locale/fr/firebug-amo.properties b/extension/locale/fr/firebug-amo.properties index 738eef3353..e657a71bdc 100644 --- a/extension/locale/fr/firebug-amo.properties +++ b/extension/locale/fr/firebug-amo.properties @@ -1,3 +1,3 @@ -firebug.amo.summary1.6=Firebug s'intègre à Firefox pour mettre à disposition des outils de développement prêts à être utilisés pendant la navigation. Vous pouvez modifier, déboguer et contrôler les CSS, le code HTML et Javascript sur n'importe quelle page Web…\n\nFirebug 1.6 nécessite Firefox 3.6 à minima. -firebug.amo.description=Firebug ajoute à Firefox une mine d'outils de développement à portée de main durant votre navigation. Vous pouvez éditer, déboguer et contrôler les CSS, le code HTML et JavaScript de n'importe quelle page Web en direct…\n\nSur le site de Firebug vous trouverez de la documentation, des captures d'écran et des forums de discussion : http://getfirebug.com +firebug.amo.summary1.6=Firebug met à disposition des outils de développement prêts à être utilisés pendant la navigation. Vous pouvez modifier, déboguer et contrôler les CSS, HTML et Javascript sur n'importe quelle page Web…\n\nFirebug 1.6 nécessite Firefox 3.6 à minima. +firebug.amo.description=Firebug ajoute à Firefox une mine d'outils de développement à portée de main durant votre navigation. Vous pouvez éditer, déboguer et contrôler les CSS, le code HTML et JavaScript de n'importe quelle page Web en direct…\n\nSur le site de Firebug vous trouverez de la documentation, des captures d'écran et des forums de discussion : https://getfirebug.com firebug.amo.developer.comments=Si vous rencontrez des problèmes, veuillez lire la FAQ Firebug.\n\nhttps://getfirebug.com/faq.html diff --git a/extension/locale/fr/firebug.properties b/extension/locale/fr/firebug.properties index bea634989a..d33758c0cd 100755 --- a/extension/locale/fr/firebug.properties +++ b/extension/locale/fr/firebug.properties @@ -1491,7 +1491,7 @@ script.suggestion.no_system_source_debugging2=Firebug ne peut actuellement être # Message displayed in the Script panel, if the page doesn't include any JavaScript. # The suggestion message represents an advice how to solve the problem. script.warning.no_javascript=Pas de JavaScript sur cette page -script.suggestion.no_javascript2=Si les balises

Issue 4818: - frame.eval fails for everthing but the newest frame of the stack

+ frame.eval fails for everything but the newest frame of the stack
diff --git a/tests/content/script/breakpoints/7478/issue7478.js b/tests/content/script/breakpoints/7478/issue7478.js index fe1605fb11..28f40263ad 100644 --- a/tests/content/script/breakpoints/7478/issue7478.js +++ b/tests/content/script/breakpoints/7478/issue7478.js @@ -26,7 +26,7 @@ function runTest() var conditionEditor = scriptPanel. panelNode.querySelector(".conditionEditor"); - FBTest.ok(conditionEditor, "The condtion editor should display to the user."); + FBTest.ok(conditionEditor, "The condition editor should display to the user."); FBTest.testDone(); }); } diff --git a/tests/content/search/6435/issue6435.html b/tests/content/search/6435/issue6435.html index 0d03c8d827..773520ab7e 100644 --- a/tests/content/search/6435/issue6435.html +++ b/tests/content/search/6435/issue6435.html @@ -17,9 +17,9 @@

Steps to reproduce

  • Open Firebug, select the DOM panel
  • Make sure 'Show DOM Properties' option is off.
  • Use the search box to search in the panel
  • -
  • There should be 4 occurences of 'test' (case insensitive)
  • -
  • There should be 2 occurences of 'Test' (case sensitive)
  • -
  • There should be 2 occurences of '21' (case sensitive)
  • +
  • There should be 4 occurrences of 'test' (case insensitive)
  • +
  • There should be 2 occurrences of 'Test' (case sensitive)
  • +
  • There should be 2 occurrences of '21' (case sensitive)
  • Jan Odvarko, <odvarko@gmail.com>
    diff --git a/tests/content/search/6435/issue6435.js b/tests/content/search/6435/issue6435.js index 41987c7ff3..6a05990d11 100644 --- a/tests/content/search/6435/issue6435.js +++ b/tests/content/search/6435/issue6435.js @@ -17,7 +17,7 @@ function runTest() executeSearchTest("test", false, false, function(counter) { FBTest.compare(4, counter, "There must be precise number " + - "of occurences (4) actual: " + counter); + "of occurrences (4) actual: " + counter); callback(); }); }); @@ -28,7 +28,7 @@ function runTest() executeSearchTest("test", false, true, function(counter) { FBTest.compare(2, counter, "There must be precise number " + - "of occurences (2) actual: " + counter); + "of occurrences (2) actual: " + counter); callback(); }); }); @@ -39,7 +39,7 @@ function runTest() executeSearchTest("21", false, false, function(counter) { FBTest.compare(2, counter, "There must be precise number " + - "of occurences (2) actual: " + counter); + "of occurrences (2) actual: " + counter); callback(); }); }); @@ -71,7 +71,7 @@ function executeSearchTest(text, reverse, caseSensitive, callback) var match = sel.getRangeAt(0); - // OK, we have found the first occurence again, so finish the test. + // OK, we have found the first occurrence again, so finish the test. FBTest.sysout("search.match; ", match); if (firstMatch && (firstMatch.compareBoundaryPoints(Range.START_TO_START, match) || firstMatch.compareBoundaryPoints(Range.END_TO_END, match)) == 0) diff --git a/tests/content/search/6454/issue6454.js b/tests/content/search/6454/issue6454.js index 6c499a1b2a..1202d75ed7 100644 --- a/tests/content/search/6454/issue6454.js +++ b/tests/content/search/6454/issue6454.js @@ -51,7 +51,7 @@ function executeSearchTest(text, reverse, caseSensitive, callback) var match = sel.getRangeAt(0); - // OK, we have found the first occurence again, so finish the test. + // OK, we have found the first occurrence again, so finish the test. FBTest.sysout("search.match; ", match); if (firstMatch && (firstMatch.compareBoundaryPoints(Range.START_TO_START, match) || firstMatch.compareBoundaryPoints(Range.END_TO_END, match)) == 0) diff --git a/tests/content/search/netPanelSearch.js b/tests/content/search/netPanelSearch.js index 2c1e99af72..feb81d2738 100644 --- a/tests/content/search/netPanelSearch.js +++ b/tests/content/search/netPanelSearch.js @@ -82,7 +82,7 @@ function executeSearchTest(text, reverse, caseSensitive, responseBody, callback) var match = sel.getRangeAt(0); - // OK, we have found the first occurence again, so finish the test. + // OK, we have found the first occurrence again, so finish the test. FBTest.sysout("search.match; ", match); if (firstMatch && (firstMatch.compareBoundaryPoints(Range.START_TO_START, match) || firstMatch.compareBoundaryPoints(Range.END_TO_END, match)) == 0) diff --git a/tests/content/test-bot.html b/tests/content/test-bot.html index 221c384714..cfbba44667 100644 --- a/tests/content/test-bot.html +++ b/tests/content/test-bot.html @@ -264,7 +264,7 @@ {group: "script", uri: "script/4213/issue4213.js", desc: "Script panel's location button is not updated", testPage: "script/4213/issue4213.html"}, //{group: "script", uri: "script/4724/issue4724.js", desc: ""Disable Breakpoint" is not checked on disabled breakpoints", testPage: "script/4724/issue4724.html"}, {group: "script", uri: "script/4816/issue4816.js", desc: "Script panel claims No JavaScript when it means you're stopped on a breakpoint on some other tab", testPage: "script/4816/issue4816.html"}, - {group: "script", uri: "script/4818/issue4818.js", desc: "frame.eval fails for everthing but the newest frame of the stack", testPage: "script/4818/issue4818.html"}, + {group: "script", uri: "script/4818/issue4818.js", desc: "frame.eval fails for everything but the newest frame of the stack", testPage: "script/4818/issue4818.html"}, //{group: "script", uri: "script/4932/issue4932.js", desc: "The Script panel shows No Javascript on this page even if they are scripts within an iframe", testPage: "script/4932/issue4932.html"}, {group: "script/breakpoints", uri: "script/breakpoints/4854/issue4854.js", desc: "Issue 4854: XHR breakpoints can't be removed from Breakpoints side panel", testPage: "script/breakpoints/4854/issue4854.html"}, {group: "script/breakpoints", uri: "script/breakpoints/4889/issue4889.js", desc: "Issue 4889: Folding for breakpoint categories", testPage: "script/breakpoints/4889/issue4889.html"}, diff --git a/trace/FBTrace/chrome/content/lib/domplate.js b/trace/FBTrace/chrome/content/lib/domplate.js index 38a1143bb9..e06803128e 100644 --- a/trace/FBTrace/chrome/content/lib/domplate.js +++ b/trace/FBTrace/chrome/content/lib/domplate.js @@ -89,7 +89,7 @@ DomplateTag.prototype = * Initializer for DOM templates. Called to create new Functions objects like TR, TD, * OBJLINK, etc. See defineTag * - * @param args keyword argments for the template, the {} brace stuff after the tag name, + * @param args keyword arguments for the template, the {} brace stuff after the tag name, * eg TR({...}, TD(... * @param oldTag a nested tag, eg the TD tag in TR({...}, TD(... */ @@ -751,7 +751,7 @@ DomplateLoop.prototype = copyObject(DomplateTag.prototype, var iterName; if (this.iter instanceof Parts) { - // We have a function with optional aruments or just one variable + // We have a function with optional arguments or just one variable var part = this.iter.parts[0]; // Join our function arguments or variables diff --git a/trace/FBTrace/modules/orion/orion.js b/trace/FBTrace/modules/orion/orion.js index 06ad42195a..b6280192a2 100644 --- a/trace/FBTrace/modules/orion/orion.js +++ b/trace/FBTrace/modules/orion/orion.js @@ -4113,7 +4113,7 @@ define("orion/textview/textView", ['orion/textview/textModel', 'orion/textview/k * Executes the action handler associated with the given name. *

    * The application defined action takes precedence over predefined actions unless - * the defaultAction paramater is true. + * the defaultAction parameter is true. *

    *

    * If the application defined action returns false, the text view predefined @@ -7020,7 +7020,7 @@ define("orion/textview/textView", ['orion/textview/textModel', 'orion/textview/k if (!isWebkit) { /* * Feature in IE and Firefox. It is not possible to get the style of an - * element if it is not layed out because one of the ancestor has + * element if it is not laid out because one of the ancestor has * style.display = none. This means that the view cannot be created in this * situations, since no measuring can be performed. The fix is to listen * for DOMAttrModified and create or destroy the view when the style.display @@ -11281,7 +11281,7 @@ define("examples/textview/textStyler", ['orion/textview/annotations'], function( ]; // Scanner constants - var UNKOWN = 1; + var UNKNOWN = 1; var KEYWORD = 2; var STRING = 3; var SINGLELINE_COMMENT = 4; @@ -11365,7 +11365,7 @@ define("examples/textview/textStyler", ['orion/textview/annotations'], function( } } } - return UNKOWN; + return UNKNOWN; } }, _read: function() { @@ -11417,7 +11417,7 @@ define("examples/textview/textStyler", ['orion/textview/annotations'], function( } } this._unread(c); - return UNKOWN; + return UNKNOWN; case 39: // SINGLE QUOTE -> char const while(true) { c = this._read(); @@ -11483,7 +11483,7 @@ define("examples/textview/textStyler", ['orion/textview/annotations'], function( c = this._read(); } while(!(c === 32 || c === 9 || c === -1)); this._unread(c); - return UNKOWN; + return UNKNOWN; } } }; @@ -11520,7 +11520,7 @@ define("examples/textview/textStyler", ['orion/textview/annotations'], function( return HTML_MARKUP; } } - return UNKOWN; + return UNKNOWN; case 64: // @ if (this._type === DOC_COMMENT) { do { @@ -11529,7 +11529,7 @@ define("examples/textview/textStyler", ['orion/textview/annotations'], function( this._unread(c); return DOC_TAG; } - return UNKOWN; + return UNKNOWN; case 84: // T if ((c = this._read()) === 79) { // O if ((c = this._read()) === 68) { // D @@ -11555,7 +11555,7 @@ define("examples/textview/textStyler", ['orion/textview/annotations'], function( c = this._read(); } while(!(c === 32 || c === 9 || c === -1 || c === 60 || c === 64 || c === 84)); this._unread(c); - return UNKOWN; + return UNKNOWN; } } }; @@ -11573,7 +11573,7 @@ define("examples/textview/textStyler", ['orion/textview/annotations'], function( case 39: // SINGLE QUOTE case -1: this._unread(c); - return UNKOWN; + return UNKNOWN; } } }; diff --git a/trace/FBTrace/modules/orion/source-editor.jsm b/trace/FBTrace/modules/orion/source-editor.jsm index 7877bcb460..2306391eb3 100644 --- a/trace/FBTrace/modules/orion/source-editor.jsm +++ b/trace/FBTrace/modules/orion/source-editor.jsm @@ -184,7 +184,7 @@ SourceEditor.EVENTS = { * The TextChanged event is fired when the editor content changes. The event * object properties: * - start - the character offset in the document where the change has - * occured. + * occurred. * - removedCharCount - the number of characters removed from the document. * - addedCharCount - the number of characters added to the document. */