diff --git a/common/content/commandline.js b/common/content/commandline.js index f9a90b2e..b8f4768e 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -258,7 +258,7 @@ const CommandLine = Module("commandline", { this._statusTimer = Timer(5, 100, function statusTell() { if (self._completions == null || self._completions.selected == null) - statusline.progess = ""; + statusline.progress = ""; else statusline.progress = "match " + (self._completions.selected + 1) + " of " + self._completions.items.length; }); diff --git a/common/content/finder.js b/common/content/finder.js index 9a8a37c9..802eda5e 100644 --- a/common/content/finder.js +++ b/common/content/finder.js @@ -261,6 +261,7 @@ const RangeFinder = Module("rangefinder", { const RangeFind = Class("RangeFind", { init: function (matchCase, backward, elementPath, regexp) { this.window = Cu.getWeakReference(window); + this.baseDocument = Cu.getWeakReference(content.document); this.elementPath = elementPath || null; this.reverse = Boolean(backward); @@ -576,6 +577,9 @@ const RangeFind = Class("RangeFind", { return range; }, + get stale() this._stale || this.baseDocument.get() != content.document, + set stale(val) this._stale = val, + addListeners: function () { for (let range in array.iterValues(this.ranges)) range.window.addEventListener("unload", this.closure.onUnload, true); @@ -683,8 +687,7 @@ const RangeFind = Class("RangeFind", { return range; }, sameDocument: function (r1, r2) r1 && r2 && r1.endContainer.ownerDocument == r2.endContainer.ownerDocument, - selectNodePath: ["a", "xhtml:a", "*[@onclick]"].map( - function (p) "ancestor-or-self::" + p).join(" | ") + selectNodePath: ["a", "xhtml:a", "*[@onclick]"].map(function (p) "ancestor-or-self::" + p).join(" | ") }); // vim: set fdm=marker sw=4 ts=4 et: diff --git a/common/modules/styles.jsm b/common/modules/styles.jsm index 19661a0e..4a3a6ff7 100644 --- a/common/modules/styles.jsm +++ b/common/modules/styles.jsm @@ -385,7 +385,7 @@ const Styles = Module("Styles", { bang: true, literalArg: sty.css, options: sty.name ? { "-name": sty.name } : {} - } for ([k, sty] in Iterator(styles.userSheets)) + } for ([k, sty] in Iterator(styles.userSheets.slice().sort(function (a, b) String.localeCompare(a.name || "", b.name || "")))) ] });