mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-13 08:25:46 +01:00
Possibly stem aforementioned focus bug.
--HG-- branch : bootstrapped
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user