Commit 9350f30e authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Fix first run NTP safe area layout.

Bug: 865818
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I4523754e637f1fa9f0cb1c729717e0eeecf334d6
Reviewed-on: https://chromium-review.googlesource.com/1148016Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577552}
parent e62dc276
......@@ -1753,6 +1753,15 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint {
[self.primaryToolbarCoordinator.viewController.view setNeedsLayout];
[self.primaryToolbarCoordinator.viewController.view layoutIfNeeded];
}
// Native content pages depend on |self.view|'s safeArea. If the BVC is
// presented underneath another view (such as the first time welcome view),
// the BVC has no safe area set during webController's layout initial, and
// won't automatically get another layout without forcing it here.
Tab* currentTab = [_model currentTab];
if ([self isTabNativePage:currentTab]) {
[currentTab.webController.view setNeedsLayout];
}
}
- (void)viewDidLayoutSubviews {
......
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