Bug 757893 - Reset max and min zoom when switching tabs. r=kats a=mfinkle MOBILE140_2012052310_RELBRANCH FENNEC_14_0b3_BUILD2 FENNEC_14_0b3_RELEASE
authorWes Johnston <wjohnston@mozilla.com>
Thu, 24 May 2012 12:29:40 -0700
changeset 94377 fcd3d27d53c67e527b8bfb63ad78f296afdad765
parent 94376 a5d4e1261b2cd572e4b622aab321b65a2064f28d
child 94379 b185fa1d21128d2f764c9ec981da7ae87dd8df0d
push idunknown
push userunknown
push dateunknown
reviewerskats, mfinkle
Bug 757893 - Reset max and min zoom when switching tabs. r=kats a=mfinkle
--- a/mobile/android/base/gfx/GeckoLayerClient.java
+++ b/mobile/android/base/gfx/GeckoLayerClient.java
@@ -350,16 +350,18 @@ public class GeckoLayerClient implements
             Tab tab = Tabs.getInstance().getSelectedTab();
+            mLayerController.setMinZoom(tab.getMinZoom());
+            mLayerController.setMaxZoom(tab.getMaxZoom());
             // At this point, we have just switched to displaying a different document than we
             // we previously displaying. This means we need to abort any panning/zooming animations
             // that are in progress and send an updated display port request to browser.js as soon
             // as possible. We accomplish this by passing true to abortPanZoomAnimation, which
             // sends the request after aborting the animation. The display port request is actually
             // a full viewport update, which is fine because if browser.js has somehow moved to
             // be out of sync with this first-paint viewport, then we force them back in sync.