Bug 732016 - Re-enable scroll clamping but set the desired scrollport using the new scrollport API. r=Cwiiis

This commit is contained in:
Kartikaya Gupta 2012-04-24 13:52:37 -05:00
parent 5fce132cd1
commit 30f08d5f73

View File

@ -1560,7 +1560,6 @@ Tab.prototype = {
let frameLoader = this.browser.QueryInterface(Ci.nsIFrameLoaderOwner).frameLoader;
frameLoader.renderMode = Ci.nsIFrameLoader.RENDER_MODE_ASYNC_SCROLL;
frameLoader.clampScrollPosition = false;
// only set tab uri if uri is valid
let uri = null;
@ -1852,6 +1851,8 @@ Tab.prototype = {
// Set scroll position
let win = this.browser.contentWindow;
win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils).setScrollPositionClampingScrollPortSize(
gScreenWidth / aViewport.zoom, gScreenHeight / aViewport.zoom);
win.scrollTo(x, y);
this.userScrollPos.x = win.scrollX;
this.userScrollPos.y = win.scrollY;