Bug 681621 - Displayport is wrong after MozScrolledAreaChanged event when page is scrolled to the right [r=stechz]
authorMatt Brubeck <mbrubeck@mozilla.com>
Fri, 02 Sep 2011 15:33:21 -0700
changeset 76493 fc2a18413a7e095cba32522a1874b75fc2d049d2
parent 76492 c3d40a5579b19af9cb595df338c4213af7e42ee5
child 76494 9d79f12f8d33f96936d647be083e9c292ea3d90a
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersstechz
bugs681621
milestone9.0a1
Bug 681621 - Displayport is wrong after MozScrolledAreaChanged event when page is scrolled to the right [r=stechz]
mobile/chrome/content/bindings/browser.js
--- a/mobile/chrome/content/bindings/browser.js
+++ b/mobile/chrome/content/bindings/browser.js
@@ -624,17 +624,17 @@ let ContentScroll =  {
       case "MozScrolledAreaChanged": {
         let doc = aEvent.originalTarget;
         if (content != doc.defaultView) // We are only interested in root scroll pane changes
           return;
 
         sendAsyncMessage("MozScrolledAreaChanged", {
           width: aEvent.width,
           height: aEvent.height,
-          left: aEvent.x
+          left: aEvent.x + content.scrollX
         });
 
         // Send event only after painting to make sure content views in the parent process have
         // been updated.
         addEventListener("MozAfterPaint", function afterPaint() {
           removeEventListener("MozAfterPaint", afterPaint, false);
           sendAsyncMessage("Content:UpdateDisplayPort");
         }, false);