OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef IOS_WEB_VIEW_PUBLIC_CWV_SCROLL_VIEW_H_ | |
6 #define IOS_WEB_VIEW_PUBLIC_CWV_SCROLL_VIEW_H_ | |
7 | |
8 #import <ChromeWebView/cwv_export.h> | |
9 #import <CoreGraphics/CoreGraphics.h> | |
10 #import <Foundation/Foundation.h> | |
11 #import <UIKit/UIKit.h> | |
12 | |
13 @protocol CWVScrollViewDelegate; | |
14 | |
15 // Scroll view inside the web view. Has subset of methods of | |
16 // UIScrollView. This is not a subclass of UIScrollView because | |
17 // we don't want to expose the raw scroll view. | |
Eugene But (OOO till 7-30)
2017/04/26 19:11:31
Please avoid using "we" in the comments (go/avoidw
Hiroshi Ichikawa
2017/04/27 02:30:11
Done.
| |
18 // | |
19 // See the document of UIScrollView for the document of each | |
20 // method. | |
21 // | |
22 // TODO: Add nullability annotations. | |
23 CWV_EXPORT | |
24 @interface CWVScrollView : NSObject | |
25 | |
26 @property(nonatomic, readonly) CGRect frame; | |
27 @property(nonatomic, readonly) CGRect bounds; | |
28 @property(nonatomic) CGPoint contentOffset; | |
29 @property(nonatomic, readonly) CGSize contentSize; | |
30 @property(nonatomic, weak) id<CWVScrollViewDelegate> delegate; | |
31 @property(nonatomic, readonly, getter=isDragging) BOOL dragging; | |
32 - (void)addGestureRecognizer:(UIGestureRecognizer*)gestureRecognizer; | |
33 | |
34 // Be careful when using this property. There's a bug with the | |
35 // underlying WKWebView where the web view does not respect | |
36 // contentInsets properly. See: | |
37 // https://chromereviews.googleplex.com/323287014/ | |
Eugene But (OOO till 7-30)
2017/04/26 19:11:31
Please link rdar://23584409 instead of internal go
Hiroshi Ichikawa
2017/04/27 02:30:11
Looks like the issue is not visible at Open Radar?
Eugene But (OOO till 7-30)
2017/04/27 12:25:23
In Chromium we do not use links to internal google
Hiroshi Ichikawa
2017/04/28 01:30:47
Oh I assumed that all Chromium code review URLs ar
Eugene But (OOO till 7-30)
2017/04/28 02:44:20
Yes
| |
38 @property(nonatomic) UIEdgeInsets contentInset; | |
39 | |
40 @end | |
41 | |
42 #endif // IOS_WEB_VIEW_PUBLIC_CWV_SCROLL_VIEW_H_ | |
OLD | NEW |