diff options
author | Kris Maglione <maglione.k@gmail.com> | 2010-12-27 12:04:03 -0500 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2010-12-27 12:04:03 -0500 |
commit | ff52485ca5a5659aca42f421b16f50b912af4499 (patch) | |
tree | f8b6f9d533183040450ec6b7069f6dbf3ddde610 /common | |
parent | e93f7455f20118f9d36a86ae27e563099f6ea0c8 (diff) | |
download | pentadactyl-ff52485ca5a5659aca42f421b16f50b912af4499.tar.gz |
Possibly stem aforementioned focus bug.
--HG--
branch : bootstrapped
Diffstat (limited to 'common')
-rw-r--r-- | common/content/commandline.js | 4 | ||||
-rw-r--r-- | common/content/dactyl.js | 3 | ||||
-rw-r--r-- | common/content/modes.js | 2 | ||||
-rw-r--r-- | common/modules/base.jsm | 2 | ||||
-rw-r--r-- | common/modules/styles.jsm | 8 | ||||
-rw-r--r-- | common/modules/util.jsm | 4 |
6 files changed, 16 insertions, 7 deletions
diff --git a/common/content/commandline.js b/common/content/commandline.js index 6799408c..a8e58e23 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -623,8 +623,10 @@ var CommandLine = Module("commandline", { this.widgets.message = null; if (modes.main != modes.COMMAND_LINE) this.widgets.command = null; - if (modes.main == modes.OUTPUT_MULTILINE && this.widgets.multilineOutput.atEnd) + if (modes.main == modes.OUTPUT_MULTILINE && this.widgets.multilineOutput.atEnd) { + dactyl.focusContent(); modes.pop(); + } if (modes.main != modes.OUTPUT_MULTILINE) this.multilineOutputVisible = false; }, diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 01fcd24a..06756fad 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -419,9 +419,6 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { * element. */ focusContent: function focusContent(clearFocusedElement) { - util.dump("focusContent(" + clearFocusedElement + ") " + - (window == services.focus.activeWindow)); - if (window != services.focus.activeWindow) return; diff --git a/common/content/modes.js b/common/content/modes.js index f51fd648..7cfcf97d 100644 --- a/common/content/modes.js +++ b/common/content/modes.js @@ -81,7 +81,7 @@ var Modes = Module("modes", { postExecute: function (map) { if (modes.main == modes.QUOTE && map.name === "<C-v>") modes.pop() }, onEvent: function () { if (modes.main == modes.QUOTE) modes.pop() } }); - this.addMode("OUTPUT_MULTILINE", { ownsFocus: true }); + this.addMode("OUTPUT_MULTILINE"); // this._extended modes, can include multiple modes, and even main modes this.addMode("EX", true); diff --git a/common/modules/base.jsm b/common/modules/base.jsm index 0d37df49..76b99af4 100644 --- a/common/modules/base.jsm +++ b/common/modules/base.jsm @@ -992,6 +992,8 @@ let StructBase = Class("StructBase", Array, { clone: function clone() this.constructor.apply(null, this.slice()), + closure: Class.Property(Object.getOwnPropertyDescriptor(Class.prototype, "closure")), + toString: function () Class.prototype.toString.apply(this, arguments), // Iterator over our named members diff --git a/common/modules/styles.jsm b/common/modules/styles.jsm index bb4f0f03..01d3b7c3 100644 --- a/common/modules/styles.jsm +++ b/common/modules/styles.jsm @@ -56,6 +56,12 @@ update(Sheet.prototype, { } }, + match: function (uri) { + if (isString(uri)) + uri = util.newURI(uri); + return this.sites.some(function (site) Styles.matchFilter(site, uri)); + }, + get fullCSS() { let filter = this.sites; let css = this.css; @@ -476,7 +482,7 @@ var Styles = Module("Styles", { let uris = util.visibleURIs(window.content); context.compare = modules.CompletionContext.Sort.number; context.generate = function () styles.user.sheets; - context.keys.active = function (sheet) sheet.sites.some(function (site) uris.some(Styles.matchFilter(site))), + context.keys.active = function (sheet) uris.some(sheet.closure.match); context.keys.description = function (sheet) <>{sheet.formatSites(uris)}: {sheet.css.replace("\n", "\\n")}</> if (cmd.filter) context.filters.push(function ({ item }) cmd.filter(item)); diff --git a/common/modules/util.jsm b/common/modules/util.jsm index bf1a6add..5eb226a2 100644 --- a/common/modules/util.jsm +++ b/common/modules/util.jsm @@ -930,8 +930,10 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), // destroy modules. util.timeout(function () { for (let module in values(defineModule.modules)) - if (module.cleanup) + if (module.cleanup) { + util.dump("cleanup: " + module.constructor.className); util.trapErrors(module.cleanup, module); + } services.observer.addObserver(this, "dactyl-rehash", true); }); |