We need to expose scrollView as a property on WKView.
Created attachment 221342 [details] patch
Comment on attachment 221342 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=221342&action=review > Source/WebKit2/UIProcess/API/ios/WKScrollView.mm:50 > +- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector We’d normally name the argument “selector”, regardless of what the NSObject header calls it. > Source/WebKit2/UIProcess/API/ios/WKScrollView.mm:60 > +- (BOOL)respondsToSelector:(SEL)aSelector Ditto. > Source/WebKit2/UIProcess/API/ios/WKScrollView.mm:65 > +- (void)forwardInvocation:(NSInvocation *)anInvocation We’d normally name the argument “invocation”. > Source/WebKit2/UIProcess/API/ios/WKScrollView.mm:78 > +{ > + BOOL messageHandled = NO; > + if ([_internalDelegate respondsToSelector:[anInvocation selector]]) { > + [anInvocation invokeWithTarget:_internalDelegate]; > + messageHandled = YES; > + } > + if ([_externalDelegate respondsToSelector:[anInvocation selector]]) { > + [anInvocation invokeWithTarget:_externalDelegate]; > + messageHandled = YES; > + } > + if (!messageHandled) > + [super forwardInvocation:anInvocation]; > +} I wonder if we should also override -forwardingTargetForSelector: so that we can do faster (possibly by an order of magnitude) forwarding of selectors that only one of the delegates implements. Probably not unless we see that this is slow and the alternative is faster.
Comment on attachment 221342 [details] patch I didn’t mean to revert Antti’s cq+, I simply started writing my comments before he set the flag. I’m changing it back to cq+ but feel free to make changes.
Comment on attachment 221342 [details] patch Clearing flags on attachment: 221342 Committed r162121: <http://trac.webkit.org/changeset/162121>
All reviewed patches have been landed. Closing bug.
(In reply to comment #3) > (From update of attachment 221342 [details]) > I didn’t mean to revert Antti’s cq+, I simply started writing my comments before he set the flag. I’m changing it back to cq+ but feel free to make changes. Actually, I should have left it at cq? so that this only got landed after review by a WebKit2 owner.
(In reply to comment #2) > I wonder if we should also override -forwardingTargetForSelector: so that we can do faster (possibly by an order of magnitude) forwarding of selectors that only one of the delegates implements. Probably not unless we see that this is slow and the alternative is faster. Tim Horton just discovered that indeed this is slow and the alternative is faster. See bug 132790.