Bug 1180295 - Fix layerview positioning when dynamic toolbar is turned off. r=rbarker
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 18 Aug 2015 14:27:20 -0400
changeset 258282 2b213c98f8a8d85a03aa64aa502abd88048239ce
parent 258281 5078e84222d716b392eb06b10b67a976f7d8f169
child 258283 7723ccb537c76b76e4fe0a98012475d69cbcd7cd
push id29249
push userryanvm@gmail.com
push dateWed, 19 Aug 2015 11:17:27 +0000
treeherdermozilla-central@706b23a03d1c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrbarker
bugs1180295
milestone43.0a1
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 1180295 - Fix layerview positioning when dynamic toolbar is turned off. r=rbarker
mobile/android/base/BrowserApp.java
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -1224,17 +1224,17 @@ public class BrowserApp extends GeckoApp
             if (mLayerView != null) {
                 mLayerView.getDynamicToolbarAnimator().removeTranslationListener(this);
             }
             mHomePagerContainer.setPadding(0, 0, 0, 0);
             if (mBrowserChrome != null) {
                 ViewHelper.setTranslationY(mBrowserChrome, 0);
             }
             if (mLayerView != null) {
-                ViewHelper.setTranslationY(mLayerView, mBrowserChrome.getHeight());
+                ViewHelper.setTranslationY(mLayerView, 0);
             }
         }
 
         refreshToolbarHeight();
     }
 
     private static boolean isAboutHome(final Tab tab) {
         return AboutPages.isAboutHome(tab.getURL());
@@ -3137,16 +3137,18 @@ public class BrowserApp extends GeckoApp
                         setToolbarMargin(0);
                     }
                     mBrowserChrome.setVisibility(View.GONE);
                 } else {
                     mBrowserChrome.setVisibility(View.VISIBLE);
                     if (mDynamicToolbar.isEnabled()) {
                         mDynamicToolbar.setPinned(false, PinReason.FULL_SCREEN);
                         mDynamicToolbar.setVisible(true, VisibilityTransition.IMMEDIATE);
+                    } else {
+                        setToolbarMargin(mBrowserChrome.getHeight());
                     }
                 }
             }
         });
     }
 
     @Override
     public boolean onPrepareOptionsMenu(Menu aMenu) {