Commit 83e34af1 authored by Becky Zhou's avatar Becky Zhou Committed by Commit Bot

Fix for margin not applied on navigating back

We need to update the bottom margin on initialization in case that
browser controls constraints are not updated during navigation.

Bug: 884803
Change-Id: I117aa9566b73cd1434d4f8b1331c08688b347573
Reviewed-on: https://chromium-review.googlesource.com/c/1277369Reviewed-by: default avatarTheresa <twellington@chromium.org>
Commit-Queue: Becky Zhou <huayinz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598884}
parent aaae45f0
......@@ -325,6 +325,7 @@ public class NewTabPage
updateSearchProviderHasLogo();
initializeMainView(activity);
updateMargins(mTab.getBrowserControlsStateConstraints());
eventReporter.onSurfaceOpened();
......@@ -377,7 +378,7 @@ public class NewTabPage
}
/** Update the margins for the content when browser controls constraints are changed. */
protected void updateMargins(@BrowserControlsState int constraints) {
private void updateMargins(@BrowserControlsState int constraints) {
// TODO(mdjones): can this be merged with BasicNativePage's updateMargins?
View view = getView();
......
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