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

Side by Side Diff: ios/chrome/browser/ui/overscroll_actions/overscroll_actions_controller.mm

Issue 2594793004: Revert 'Bypass UIWebView.scrollView's contentInset implementation with UIScrollView's. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_controller. h" 5 #import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_controller. h"
6 6
7 #import <QuartzCore/QuartzCore.h> 7 #import <QuartzCore/QuartzCore.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 - (id<OverscrollActionsScrollView>)scrollView { 577 - (id<OverscrollActionsScrollView>)scrollView {
578 if (_scrollview) { 578 if (_scrollview) {
579 return static_cast<id<OverscrollActionsScrollView>>(_scrollview.get()); 579 return static_cast<id<OverscrollActionsScrollView>>(_scrollview.get());
580 } else { 580 } else {
581 return static_cast<id<OverscrollActionsScrollView>>( 581 return static_cast<id<OverscrollActionsScrollView>>(
582 _webViewScrollViewProxy.get()); 582 _webViewScrollViewProxy.get());
583 } 583 }
584 } 584 }
585 585
586 - (void)setScrollViewContentInset:(UIEdgeInsets)contentInset { 586 - (void)setScrollViewContentInset:(UIEdgeInsets)contentInset {
587 if (_scrollview) 587 [_scrollview setContentInset:contentInset];
588 [_scrollview setContentInset:contentInset];
589 else
590 [_webViewScrollViewProxy setContentInsetFast:contentInset];
Eugene But (OOO till 7-30) 2016/12/21 18:48:43 Are you sure that this does not break Pull To Acti
Eugene But (OOO till 7-30) 2016/12/21 19:15:01 Ok. I tested this change and it breaks overscroll.
justincohen 2016/12/21 19:59:45 Done.
591 } 588 }
592 589
593 - (UIView<RelaxedBoundsConstraintsHitTestSupport>*)headerView { 590 - (UIView<RelaxedBoundsConstraintsHitTestSupport>*)headerView {
594 return [self.delegate headerView]; 591 return [self.delegate headerView];
595 } 592 }
596 593
597 - (void)incrementOverscrollActionLockForNotification:(NSNotification*)notif { 594 - (void)incrementOverscrollActionLockForNotification:(NSNotification*)notif {
598 if (![_lockIncrementNotifications containsObject:notif.name]) { 595 if (![_lockIncrementNotifications containsObject:notif.name]) {
599 [_lockIncrementNotifications addObject:notif.name]; 596 [_lockIncrementNotifications addObject:notif.name];
600 ++_overscrollActionLock; 597 ++_overscrollActionLock;
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 _panGestureRecognizer.enabled = YES; 869 _panGestureRecognizer.enabled = YES;
873 [self scrollView].panGestureRecognizer.enabled = NO; 870 [self scrollView].panGestureRecognizer.enabled = NO;
874 [self scrollView].panGestureRecognizer.enabled = YES; 871 [self scrollView].panGestureRecognizer.enabled = YES;
875 [self startBounceWithInitialVelocity:CGPointZero]; 872 [self startBounceWithInitialVelocity:CGPointZero];
876 [self.delegate 873 [self.delegate
877 overscrollActionsController:self 874 overscrollActionsController:self
878 didTriggerAction:self.overscrollActionView.selectedAction]; 875 didTriggerAction:self.overscrollActionView.selectedAction];
879 } 876 }
880 877
881 @end 878 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698