Bug 817671 - Fix window scrolling. r=blassey
authorEitan Isaacson <eitan@monotonous.org>
Wed, 05 Dec 2012 12:54:37 -0800
changeset 115112 0e182b6179f65e0c03b578d847bb1209a8b94114
parent 115111 582547d8070c915c94f2303326219cac06d9b2b0
child 115113 8a3130fe455904c82c48172bf84e8b55b27e5341
push id23973
push useremorley@mozilla.com
push dateThu, 06 Dec 2012 10:04:18 +0000
treeherdermozilla-central@ddda5400c826 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey
bugs817671
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 817671 - Fix window scrolling. r=blassey
accessible/src/jsat/content-script.js
--- a/accessible/src/jsat/content-script.js
+++ b/accessible/src/jsat/content-script.js
@@ -187,22 +187,22 @@ function scroll(aMessage) {
       }
       acc = acc.parent;
     }
 
     // Scroll window.
     if (!horiz && content.scrollMaxY &&
         ((page > 0 && content.scrollY < content.scrollMaxY) ||
          (page < 0 && content.scrollY > 0))) {
-      content.scroll(0, content.innerHeight);
+      content.scroll(0, content.innerHeight * page + content.scrollY);
       return true;
     } else if (horiz && content.scrollMaxX &&
                ((page > 0 && content.scrollX < content.scrollMaxX) ||
                 (page < 0 && content.scrollX > 0))) {
-      content.scroll(content.innerWidth, 0);
+      content.scroll(content.innerWidth * page + content.scrollX);
       return true;
     }
 
     return false;
   }
 
   if (aMessage.json.origin != 'child') {
     if (forwardMessage(vc, aMessage))