| Index: ios/web/web_state/ui/crw_web_view_content_view.mm
|
| diff --git a/ios/web/web_state/ui/crw_web_view_content_view.mm b/ios/web/web_state/ui/crw_web_view_content_view.mm
|
| index cda73439b3d0f42c8103772e1e7ee1dfc7b1d2df..32aac34b93d43ffdccacce03efb885486ff80b34 100644
|
| --- a/ios/web/web_state/ui/crw_web_view_content_view.mm
|
| +++ b/ios/web/web_state/ui/crw_web_view_content_view.mm
|
| @@ -7,7 +7,10 @@
|
| #import <WebKit/WebKit.h>
|
|
|
| #include "base/logging.h"
|
| -#import "base/mac/scoped_nsobject.h"
|
| +
|
| +#if !defined(__has_feature) || !__has_feature(objc_arc)
|
| +#error "This file requires ARC support."
|
| +#endif
|
|
|
| namespace {
|
|
|
| @@ -21,10 +24,6 @@ const CGFloat kBackgroundRGBComponents[] = {0.75f, 0.74f, 0.76f};
|
| } // namespace
|
|
|
| @interface CRWWebViewContentView () {
|
| - // The web view being shown.
|
| - base::scoped_nsobject<UIView> _webView;
|
| - // The web view's scroll view.
|
| - base::scoped_nsobject<UIScrollView> _scrollView;
|
| // Backs up property of the same name if |_webView| is a WKWebView.
|
| CGFloat _topContentPadding;
|
| }
|
| @@ -33,11 +32,17 @@ const CGFloat kBackgroundRGBComponents[] = {0.75f, 0.74f, 0.76f};
|
| // |_topContentPadding| (iff |_webView| is a WKWebView).
|
| - (void)updateWebViewFrame;
|
|
|
| +// The web view being shown.
|
| +@property(nonatomic, strong, readwrite) UIView* webView;
|
| +// The web view's scroll view.
|
| +@property(nonatomic, strong, readwrite) UIScrollView* scrollView;
|
| @end
|
|
|
| @implementation CRWWebViewContentView
|
|
|
| @synthesize shouldUseInsetForTopPadding = _shouldUseInsetForTopPadding;
|
| +@synthesize webView = _webView;
|
| +@synthesize scrollView = _scrollView;
|
|
|
| - (instancetype)initWithWebView:(UIView*)webView
|
| scrollView:(UIScrollView*)scrollView {
|
| @@ -46,8 +51,8 @@ const CGFloat kBackgroundRGBComponents[] = {0.75f, 0.74f, 0.76f};
|
| DCHECK(webView);
|
| DCHECK(scrollView);
|
| DCHECK([scrollView isDescendantOfView:webView]);
|
| - _webView.reset([webView retain]);
|
| - _scrollView.reset([scrollView retain]);
|
| + _webView = webView;
|
| + _scrollView = scrollView;
|
| }
|
| return self;
|
| }
|
| @@ -97,16 +102,6 @@ const CGFloat kBackgroundRGBComponents[] = {0.75f, 0.74f, 0.76f};
|
| [self updateWebViewFrame];
|
| }
|
|
|
| -#pragma mark Accessors
|
| -
|
| -- (UIScrollView*)scrollView {
|
| - return _scrollView.get();
|
| -}
|
| -
|
| -- (UIView*)webView {
|
| - return _webView.get();
|
| -}
|
| -
|
| #pragma mark Layout
|
|
|
| - (void)layoutSubviews {
|
|
|