Commit 00a5e83f authored by Matt Jones's avatar Matt Jones Committed by Commit Bot

Fix incorrect Y translation in infobars

This patch adds resets the Y offset of the infobar container on
navigation to clear any stale values from the previous page.

Bug: 1012695, 1069955
Change-Id: Idccc26471c178850f2ed820e3b567bd6d5970819
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2461708
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Reviewed-by: default avatarPavel Yatsuk <pavely@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816533}
parent 6b591973
......@@ -89,6 +89,12 @@ public class InfoBarContainer implements UserData, KeyboardVisibilityListener, I
/** Resets the state of the InfoBarContainer when the user navigates. */
private final TabObserver mTabObserver = new EmptyTabObserver() {
@Override
public void onDidStartNavigation(Tab tab, NavigationHandle navigationHandle) {
// Make sure Y translation is reset on navigation.
if (mInfoBarContainerView != null) mInfoBarContainerView.setTranslationY(0);
}
@Override
public void onDidFinishNavigation(Tab tab, NavigationHandle navigation) {
if (navigation.hasCommitted() && navigation.isInMainFrame()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment