WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
176077
[iOS] REGRESSION (
r218144
) -[WKContentView targetForAction:withSender:] returns the content view for actions implemented only by the WKWebView, causing a crash
https://bugs.webkit.org/show_bug.cgi?id=176077
Summary
[iOS] REGRESSION (r218144) -[WKContentView targetForAction:withSender:] retur...
mitz
Reported
2017-08-29 15:51:52 PDT
<
https://trac.webkit.org/r218144
> made -[WKContentView canPerformAction:withSender:] return YES for actions implemented by the WKWebView, but didn’t take care to override -targetForAction:withSender: to return the WKWebView as well. Without an override, the base implementation returns the WKContentView itself, which then gets sent an unrecognized selector.
Attachments
Forward -targetForAction:withSender: from the content view to the web view
(12.30 KB, patch)
2017-08-30 12:42 PDT
,
mitz
no flags
Details
Formatted Diff
Diff
Forward -targetForAction:withSender: from the content view to the web view
(12.09 KB, patch)
2017-08-30 13:50 PDT
,
mitz
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
mitz
Comment 1
2017-08-29 15:54:14 PDT
<
rdar://problem/34145200
>
mitz
Comment 2
2017-08-30 12:42:34 PDT
Created
attachment 319387
[details]
Forward -targetForAction:withSender: from the content view to the web view
Build Bot
Comment 3
2017-08-30 12:44:33 PDT
Attachment 319387
[details]
did not pass style-queue: ERROR: Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:1258: preprocessor directives (e.g., #ifdef, #define, #import) should never be indented. [whitespace/indent] [4] ERROR: Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:1264: preprocessor directives (e.g., #ifdef, #define, #import) should never be indented. [whitespace/indent] [4] Total errors found: 2 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Wenson Hsieh
Comment 4
2017-08-30 12:48:03 PDT
Comment on
attachment 319387
[details]
Forward -targetForAction:withSender: from the content view to the web view View in context:
https://bugs.webkit.org/attachment.cgi?id=319387&action=review
> Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentViewTargetForAction.mm:36 > +static UIView *recursiveFindWKContentView(UIView *view)
Hm...I wonder if this functionality should be in a testing category on WKWebView in TestWKWebView.h instead -- I imagine it could be useful for other tests as well, not just this test (at a brief glance, WKContentViewEditingActions.mm also needs the same functionality).
> Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentViewTargetForAction.mm:63 > + RetainPtr<TestWKContentViewTargetForActionView> webView = adoptNS([[TestWKContentViewTargetForActionView alloc] init]);
Nit - I would prefer auto here.
mitz
Comment 5
2017-08-30 13:50:10 PDT
Created
attachment 319393
[details]
Forward -targetForAction:withSender: from the content view to the web view
Build Bot
Comment 6
2017-08-30 13:52:30 PDT
Attachment 319393
[details]
did not pass style-queue: ERROR: Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:1258: preprocessor directives (e.g., #ifdef, #define, #import) should never be indented. [whitespace/indent] [4] ERROR: Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:1264: preprocessor directives (e.g., #ifdef, #define, #import) should never be indented. [whitespace/indent] [4] Total errors found: 2 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 7
2017-08-30 21:07:38 PDT
Comment on
attachment 319393
[details]
Forward -targetForAction:withSender: from the content view to the web view Clearing flags on attachment: 319393 Committed
r221415
: <
http://trac.webkit.org/changeset/221415
>
WebKit Commit Bot
Comment 8
2017-08-30 21:07:39 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