1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-22 08:05:46 +01:00

Fix some marks issues. Always scroll to the [count]th line rather than the [count]th percent with n_G.

This commit is contained in:
Kris Maglione
2011-09-27 14:40:41 -04:00
parent c90629c71f
commit f31cc69355
5 changed files with 59 additions and 36 deletions

View File

@@ -372,6 +372,10 @@ var DOM = Class("DOM", {
*/
get style() {
let node = this[0];
if (node instanceof Ci.nsIDOMWindow)
node = node.document;
if (node instanceof Ci.nsIDOMDocument)
node = node.documentElement;
while (node && !(node instanceof Ci.nsIDOMElement) && node.parentNode)
node = node.parentNode;
@@ -462,6 +466,8 @@ var DOM = Class("DOM", {
*/
get xpath() {
function quote(val) "'" + val.replace(/[\\']/g, "\\$&") + "'";
if (!this[0] instanceof Ci.nsIDOMElement)
return null;
let res = [];
let doc = this.document;