1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 04:07:59 +01:00

Better :yank formatting.

This commit is contained in:
Kris Maglione
2010-10-14 22:06:17 -04:00
parent 7853331e7c
commit bea1c20858
6 changed files with 29 additions and 8 deletions

View File

@@ -496,7 +496,7 @@ const Buffer = Module("buffer", {
*/
focusAllowed: function (elem) {
let win = elem.ownerDocument && elem.ownerDocument.defaultView || elem;
return !options["strictfocus"] || elem.dactylFocusAllowed;
return !options["strictfocus"] || win.dactylFocusAllowed;
},
/**
@@ -1013,9 +1013,7 @@ const Buffer = Module("buffer", {
// at all correctly; if somehow the view-source stuff managed to
// execute script we'd be in big trouble here, I suspect.
this.docShell = Cc["@mozilla.org/docshell;1"].createInstance(Ci.nsIBaseWindow)
.QueryInterface(Ci.nsIWebNavigation).QueryInterface(Ci.nsIWebPageDescriptor)
.QueryInterface(Ci.nsIWebProgress);
this.docShell = services.create("docshell");
this.docShell.create();
this.docShell.addProgressListener(this, this.docShell.NOTIFY_STATE_DOCUMENT);
this.docShell.loadPage(descriptor, this.docShell.DISPLAY_AS_SOURCE);