Commit af5067d1 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Fix NTP scrolled omnibox for iOS10.

This was broken by crrev.com/548047, which should have been wrapped in a ui
refresh flag.

Bug: 819460, 831555
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I4b081548de5f058a81530d9dd20f369e2e1fca7d
Reviewed-on: https://chromium-review.googlesource.com/1008044Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549942}
parent 92bbab9c
...@@ -92,10 +92,12 @@ layoutAttributesForSupplementaryViewOfKind:(NSString*)kind ...@@ -92,10 +92,12 @@ layoutAttributesForSupplementaryViewOfKind:(NSString*)kind
// Prevent the fake omnibox from scrolling up off of the screen. // Prevent the fake omnibox from scrolling up off of the screen.
CGFloat topSafeArea = 0; CGFloat topSafeArea = 0;
if (@available(iOS 11, *)) { if (IsUIRefreshPhase1Enabled()) {
topSafeArea = self.collectionView.safeAreaInsets.top; if (@available(iOS 11, *)) {
} else { topSafeArea = self.collectionView.safeAreaInsets.top;
topSafeArea = StatusBarHeight(); } else {
topSafeArea = StatusBarHeight();
}
} }
CGFloat minY = headerHeight - ntp_header::kMinHeaderHeight - topSafeArea; CGFloat minY = headerHeight - ntp_header::kMinHeaderHeight - topSafeArea;
if (contentOffset.y > minY) if (contentOffset.y > minY)
......
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