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
--- 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.