RESOLVED FIXED129117
Add magnification and swiping properties to WKWebView
https://bugs.webkit.org/show_bug.cgi?id=129117
Summary Add magnification and swiping properties to WKWebView
Tim Horton
Reported 2014-02-20 13:18:08 PST
Copied from WKView[IOS].
Attachments
patch (5.66 KB, patch)
2014-02-20 13:22 PST, Tim Horton
mitz: review+
Tim Horton
Comment 1 2014-02-20 13:22:49 PST
mitz
Comment 2 2014-02-20 14:40:15 PST
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.
Tim Horton
Comment 3 2014-02-20 15:10:16 PST
(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.
Tim Horton
Comment 4 2014-02-20 15:41:14 PST
Note You need to log in before you can comment on or make changes to this bug.