Copied from WKView[IOS].
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.
http://trac.webkit.org/changeset/164455