| Summary: | Add magnification and swiping properties to WKWebView | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tim Horton <thorton> | ||||
| Component: | WebKit2 | Assignee: | Tim Horton <thorton> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | andersca, mitz | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Tim Horton
2014-02-20 13:18:08 PST
Created attachment 224793 [details]
patch
Comment on attachment 224793 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=224793&action=review r=me if you address the comments. > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h:126 > +@property (nonatomic) double magnification; This should be a CGFloat. > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h:128 > +- (void)setMagnification:(double)magnification centeredAtPoint:(NSPoint)point; magnification should be a CGFloat. > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:470 > +- (void)setMagnification:(double)magnification > +{ > + [_wkView setMagnification:magnification]; > +} Who uses this? And how? > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:669 > + } else > + _gestureController = nullptr; This branch is taken when allowsBackForwardNavigationGestures is YES and _gestureController is not null. I don’t think you want to do that. (In reply to comment #2) > (From update of attachment 224793 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=224793&action=review > > r=me if you address the comments. > > > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h:126 > > +@property (nonatomic) double magnification; > > This should be a CGFloat. OK. I’m going to use CGPoint too at andersca’s suggestion. > > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:470 > > +- (void)setMagnification:(double)magnification > > +{ > > + [_wkView setMagnification:magnification]; > > +} > > Who uses this? And how? I was just matching NSScrollView’s behavior. > > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:669 > > + } else > > + _gestureController = nullptr; > > This branch is taken when allowsBackForwardNavigationGestures is YES and _gestureController is not null. I don’t think you want to do that. Indeed. |