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

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: comments 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..5bba8cf291206986d11db496114415d893d015c1 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
@@ -564,20 +564,25 @@ initWithPopupView:(OmniboxPopupViewIOS*)view
size_t size = _currentResult.size();
[self.tableView reloadData];
- [self.tableView beginUpdates];
- for (size_t i = 0; i < kRowCount; i++) {
- OmniboxPopupMaterialRow* row = _rows[i];
- if (i < size) {
- const AutocompleteMatch& match =
- ((const AutocompleteResult&)_currentResult).match_at((NSUInteger)i);
- [self updateRow:row withMatch:match];
- row.hidden = NO;
- } else {
- row.hidden = YES;
+ // We animate the rows ourselves in -fadeInRows, so make sure the table view
+ // doens't try to apply it's own animation.
rohitrao (ping after 24h) 2017/06/14 16:47:03 doesn't and its.
+ [UIView performWithoutAnimation:^{
+ [self.tableView beginUpdates];
+ for (size_t i = 0; i < kRowCount; i++) {
+ OmniboxPopupMaterialRow* row = _rows[i];
+
+ if (i < size) {
+ const AutocompleteMatch& match =
+ ((const AutocompleteResult&)_currentResult).match_at((NSUInteger)i);
+ [self updateRow:row withMatch:match];
+ row.hidden = NO;
+ } else {
+ row.hidden = YES;
+ }
}
- }
- [self.tableView endUpdates];
+ [self.tableView endUpdates];
+ }];
if (IsIPadIdiom())
[self updateContentInsetForKeyboard];
@@ -656,10 +661,7 @@ 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)
+ if (!scrollView.dragging)
rohitrao (ping after 24h) 2017/06/14 16:47:03 Please add a comment here explaining why we need t
return;
_popupView->DidScroll();
« 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