Bug 479862 - scrollTop and scrollLeft might contain wrong values for scripts on pages (followup) [r=stechz]
authorMark Finkle <mfinkle@mozilla.com>
Wed, 19 Jan 2011 13:48:47 -0500
changeset 2667 ae4e1645e425d3e065f7cbc90a1f099a74cb381e
parent 2666 86d2e0b59767b3e78ef323438a7346cf86c0475c
child 2668 583f1e86ca7d7e0a13214fcfd4d9f69133b01ed7
push id2240
push usermfinkle@mozilla.com
push dateWed, 19 Jan 2011 18:47:30 +0000
reviewersstechz
bugs479862
Bug 479862 - scrollTop and scrollLeft might contain wrong values for scripts on pages (followup) [r=stechz]
chrome/content/browser.js
--- a/chrome/content/browser.js
+++ b/chrome/content/browser.js
@@ -1173,17 +1173,20 @@ Browser.MainDragger.prototype = {
   },
 
   dragStop: function dragStop(dx, dy, scroller) {
     this._contentView = null;
     this.dragMove(Browser.snapSidebars(), 0, scroller);
     Browser.tryUnfloatToolbar();
 
     // Update the scroll position of the content
-    getBrowser()._updateCSSViewport();
+    let browser = getBrowser();
+    browser._updateCSSViewport();
+    let view = browser.getRootView();
+    view._updateCacheViewport();
   },
 
   dragMove: function dragMove(dx, dy, scroller) {
     let doffset = new Point(dx, dy);
 
     // First calculate any panning to take sidebars out of view
     let panOffset = this._panControlsAwayOffset(doffset);