1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-30 12:12:26 +01:00

Some scrollable element fixes. Closes issue #151.

This commit is contained in:
Kris Maglione
2010-12-02 20:00:36 -05:00
parent becbd989e9
commit 9a9449f554
2 changed files with 34 additions and 53 deletions

View File

@@ -52,12 +52,10 @@ const Marks = Module("marks", {
let win = buffer.focusedFrame;
let doc = win.document;
let x = win.scrollMaxX ? win.pageXOffset / win.scrollMaxX : 0;
let y = win.scrollMaxY ? win.pageYOffset / win.scrollMaxY : 0;
let position = { x: x, y: y };
let position = { x: buffer.scrollXPercent / 100, y: buffer.scrollYPercent / 100 };
if (Marks.isURLMark(mark)) {
let res = this._urlMarks.set(mark, { location: doc.URL, position: position, tab: Cu.getWeakReference(tabs.getTab()), timestamp: Date.now()*1000 });
let res = this._urlMarks.set(mark, { location: doc.documentURI, position: position, tab: Cu.getWeakReference(tabs.getTab()), timestamp: Date.now()*1000 });
if (!silent)
dactyl.log("Adding URL mark: " + Marks.markToString(mark, res), 5);
}