Bug 1201416 - Remove incorrect call to setResolution. r=snorp
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 08 Sep 2015 14:04:54 -0400
changeset 293949 801e41b2781c12afae6e5aa6ee305d4298d2f77f
parent 293948 b337feb71c38797fbdfe4ff24ba34c5a74040c20
child 293950 166571fc2542fc4607633a72cca4c7e689e2af74
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1201416, 732971, 1180267
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 1201416 - Remove incorrect call to setResolution. r=snorp The call to setResolution has (I believe) not been needed since bug 732971. Prior to that resolutions used to be applied on the root document in Fennec, and so browser.js would have to reapply the desired resolution on every tabswitch. After that bug, the resolution was saved on the content documents for each tab and so browser.js no longer needed to reapply the resolution. Until recently doing this was redundant but harmless. With bug 1180267 though the browser.js code that tracks the resolution may have the wrong resolution initially, because that is determined in C++ code. Only after the Java-side code process the setFirstPaintViewport message and sends that information to browser.js does everything have the correct resolution. In the case where a tab loaded in the background is brought into the foreground, the tab-selected code runs before the setFirstPaintViewport code, and therefore uses an incorrect resolution. This then screws up the viewport clamping code and causes the page to get scrolled.
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -1050,19 +1050,16 @@ var BrowserApp = {
     this._selectedTab = aTab;
     if (!aTab)
-    if (!AppConstants.MOZ_ANDROID_APZ) {
-      aTab.setResolution(aTab._zoom, true);
-    }
     this.deck.selectedPanel = aTab.browser;
     // Focus the browser so that things like selection will be styled correctly.
   get selectedBrowser() {
     if (this._selectedTab)