1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-09 13:44:13 +01:00

Backed out changeset ccb7eca3e069

This commit is contained in:
Kris Maglione
2011-08-23 23:17:52 -04:00
parent 435f30f7eb
commit e70cd8934d
7 changed files with 188 additions and 279 deletions

View File

@@ -478,16 +478,6 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
dequote: function dequote(pattern, chars)
pattern.replace(/\\(.)/, function (m0, m1) chars.indexOf(m1) >= 0 ? m1 : m0),
/**
* Returns the nsIDocShell for a given window.
*
* @param {Window} win The window.
* @returns {nsIDocShell}
*/
docShell: function docShell(win)
win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShell),
/**
* Prints a message to the console. If *msg* is an object it is pretty
* printed.
@@ -758,14 +748,11 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
* Iterates over all currently open documents, including all
* top-level window and sub-frames thereof.
*/
iterDocuments: function iterDocuments(types) {
types = types || ["chrome", "content"];
types = types.map(function (t) "type" + util.capitalize(t));
iterDocuments: function iterDocuments() {
let windows = services.windowMediator.getXULWindowEnumerator(null);
while (windows.hasMoreElements()) {
let window = windows.getNext().QueryInterface(Ci.nsIXULWindow);
for each (let type in types) {
for each (let type in ["typeChrome", "typeContent"]) {
let docShells = window.docShell.getDocShellEnumerator(Ci.nsIDocShellTreeItem[type],
Ci.nsIDocShell.ENUMERATE_FORWARDS);
while (docShells.hasMoreElements())