Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2237)

Unified Diff: ios/chrome/browser/ui/omnibox/omnibox_popup_material_view_controller.mm

Issue 2933963002: [ios] Fix omnibox baseWritingDirection and dismissal iOS11 bugs. (Closed)
Patch Set: Add crbug Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ios/chrome/browser/ui/omnibox/omnibox_text_field_ios.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/omnibox/omnibox_popup_material_view_controller.mm
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_popup_material_view_controller.mm b/ios/chrome/browser/ui/omnibox/omnibox_popup_material_view_controller.mm
index 1493aa7d09d04cbc5e3acf0a93cc67ec603b3f07..f6da302cf26962e5c8faca8023fc10e73d74d899 100644
--- a/ios/chrome/browser/ui/omnibox/omnibox_popup_material_view_controller.mm
+++ b/ios/chrome/browser/ui/omnibox/omnibox_popup_material_view_controller.mm
@@ -656,11 +656,18 @@ initWithPopupView:(OmniboxPopupViewIOS*)view
#pragma mark UIScrollViewDelegate
- (void)scrollViewDidScroll:(UIScrollView*)scrollView {
- // Setting the top inset of the scrollView to |kTopAndBottomPadding| causes a
- // one time scrollViewDidScroll to |-kTopAndBottomPadding|. It's easier to
- // just ignore this one scroll tick.
- if (scrollView.contentOffset.y == 0 - kTopAndBottomPadding)
- return;
+ // TODO(crbug.com/733650): Default to the dragging check once it's been tested
+ // on trunk.
+ if (base::ios::IsRunningOnIOS11OrLater()) {
+ if (!scrollView.dragging)
+ return;
+ } else {
+ // Setting the top inset of the scrollView to |kTopAndBottomPadding| causes
+ // a one time scrollViewDidScroll to |-kTopAndBottomPadding|. It's easier
+ // to just ignore this one scroll tick.
+ if (scrollView.contentOffset.y == 0 - kTopAndBottomPadding)
+ return;
+ }
_popupView->DidScroll();
for (OmniboxPopupMaterialRow* row in _rows) {
« no previous file with comments | « no previous file | ios/chrome/browser/ui/omnibox/omnibox_text_field_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698