Commit 44fb3392 authored by edchin's avatar edchin Committed by Commit Bot

[ios] Fix ipad infobar snapshot

Pre-bijou, infobars were on displayed on top of the web content below
the omnibox. Today, infobars are on the bottom, having no difference
with the phone form-factor.

This CL removes special casing code for snapshotting in iPad. This
should have been removed when bijou was launched.

Bug: 918759
Change-Id: Ic18524ac47606b2d1b6ee1c254220465d64a8d71
Reviewed-on: https://chromium-review.googlesource.com/c/1394423Reviewed-by: default avataredchin <edchin@chromium.org>
Reviewed-by: default avatarJustin Cohen <justincohen@chromium.org>
Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Commit-Queue: edchin <edchin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619655}
parent d21180fc
......@@ -2991,12 +2991,6 @@ NSString* const kBrowserViewControllerSnackbarCategory =
// Provides a view that encompasses currently displayed infobar(s) or nil
// if no infobar is presented.
- (UIView*)infoBarOverlayViewForTab:(Tab*)tab {
if (IsIPadIdiom()) {
// Not using overlays on iPad because the content is pushed down by
// infobar and the transition between snapshot and fresh page can
// cause both snapshot and real infobars to appear at the same time.
return nil;
}
if (tab && self.tabModel.currentTab == tab) {
DCHECK(self.currentWebState);
DCHECK(self.infobarContainerCoordinator);
......@@ -3015,9 +3009,6 @@ NSString* const kBrowserViewControllerSnackbarCategory =
// no _infobarContainerCoordinator instantiated yet.
// Return offset outside of tab.
return CGRectGetMaxY(self.view.frame);
} else if (IsIPadIdiom()) {
// The infobars on iPad are display at the top of a tab.
return CGRectGetMinY([self visibleFrameForTab:self.tabModel.currentTab]);
} else {
// The infobars on iPhone are displayed at the bottom of a tab.
CGRect visibleFrame = [self visibleFrameForTab:self.tabModel.currentTab];
......
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