Bug 1674104 - Reset the vertical clipping value to zero whenever we change the dynamic toolbar max height. r=botond, a=RyanVM
authorHiroyuki Ikezoe <hikezoe.birchill@mozilla.com>
Wed, 06 Jan 2021 18:05:52 +0000
changeset 627407 dc65d4fdd35de931e991c3f5283300789caf81c4
parent 627406 a2ed4a64e27ad80288dba88d9bd6c331d6e47ba4
child 627408 38febe1e15c432c2ae3ecb0738cfecfad57f097c
push id15031
push userryanvm@gmail.com
push dateFri, 15 Jan 2021 19:25:13 +0000
treeherdermozilla-beta@38febe1e15c4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond, RyanVM
bugs1674104
milestone85.0
Bug 1674104 - Reset the vertical clipping value to zero whenever we change the dynamic toolbar max height. r=botond, a=RyanVM So that we will not mis-align position:fixed elements with the old stale clipping value. Differential Revision: https://phabricator.services.mozilla.com/D100862
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoView.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoView.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoView.java
@@ -166,16 +166,24 @@ public class GeckoView extends FrameLayo
 
             if (mDisplay != null) {
                 mDisplay.setVerticalClipping(clippingHeight);
             }
         }
 
         public void setDynamicToolbarMaxHeight(final int height) {
             mDynamicToolbarMaxHeight = height;
+
+            // Reset the vertical clipping value to zero whenever we change
+            // the dynamic toolbar __max__ height so that it can be properly
+            // propagated to both the main thread and the compositor thread,
+            // thus we will be able to reset the __current__ toolbar height
+            // on the both threads whatever the __current__ toolbar height is.
+            setVerticalClipping(0);
+
             if (mDisplay != null) {
                 mDisplay.setDynamicToolbarMaxHeight(height);
             }
         }
 
         /**
          * Request a {@link Bitmap} of the visible portion of the web page currently being
          * rendered.