WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
158323
Fix typo in -[WebDefaultUIKitDelegate deleteFromInputwithFlags:]
https://bugs.webkit.org/show_bug.cgi?id=158323
Summary
Fix typo in -[WebDefaultUIKitDelegate deleteFromInputwithFlags:]
David Kilzer (:ddkilzer)
Reported
2016-06-02 15:50:06 PDT
In Source/WebKit/ios/DefaultDelegates/WebDefaultUIKitDelegate.m, this method is defined as: - (void)deleteFromInputwithFlags:(NSUInteger)flags { } However, in Source/WebKit/ios/WebView/WebUIKitDelegate.h, it's defined in a category (not a protocol) as: - (void)deleteFromInputWithFlags:(NSUInteger)flags; This causes problems in Source/WebKit/mac/WebView/WebHTMLView.mm in -_handleEditingKeyEvent: where we use -_UIKitDelegateForwarder to forward the method: switch ([s characterAtIndex:0]) { case kWebBackspaceKey: case kWebDeleteKey: [[webView _UIKitDelegateForwarder] deleteFromInputWithFlags:event.keyboardFlags]; return YES; This was recently changed for
Bug 157689
in
r200979
from this: switch ([s characterAtIndex:0]) { case kWebBackspaceKey: case kWebDeleteKey: // FIXME: remove the call to deleteFromInput when UIKit implements deleteFromInputWithFlags. if ([webView respondsToSelector:@selector(deleteFromInputWithFlags:)]) [[webView _UIKitDelegateForwarder] deleteFromInputWithFlags:event.keyboardFlags]; else [[webView _UIKitDelegateForwarder] deleteFromInput]; return YES; Finally, since the _UIKitDelegateForwarded always uses the WebDefaultUIKitDelegate to check whether the method exists, -[_WebSafeForwarder methodSignatureForSelector:] in Source/WebKit/mac/WebView/WebView.mm would return NO, which results in the NSException being thrown, leading to the crash: - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector { return [defaultTarget methodSignatureForSelector:aSelector]; } The fix is trivial--fix the typo in WebDefaultUIKitDelegate.m.
Attachments
Patch v1
(1.33 KB, patch)
2016-06-02 16:01 PDT
,
David Kilzer (:ddkilzer)
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
David Kilzer (:ddkilzer)
Comment 1
2016-06-02 15:50:44 PDT
<
rdar://problem/26549165
>
David Kilzer (:ddkilzer)
Comment 2
2016-06-02 16:01:53 PDT
Created
attachment 280378
[details]
Patch v1
WebKit Commit Bot
Comment 3
2016-06-02 18:32:58 PDT
Comment on
attachment 280378
[details]
Patch v1 Clearing flags on attachment: 280378 Committed
r201631
: <
http://trac.webkit.org/changeset/201631
>
WebKit Commit Bot
Comment 4
2016-06-02 18:33:02 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug