Bug 209208

Summary: Remove unneeded and incorrect respondsToSelector check.
Product: WebKit Reporter: Megan Gardner <megan_gardner>
Component: New BugsAssignee: Megan Gardner <megan_gardner>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, thorton
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Megan Gardner 2020-03-17 18:41:39 PDT
Remove unneeded and incorrect respondsToSelector check.
Comment 1 Megan Gardner 2020-03-17 18:42:41 PDT
Created attachment 393807 [details]
Patch
Comment 2 Tim Horton 2020-03-17 18:55:01 PDT
Comment on attachment 393807 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=393807&action=review

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:8703
>      return NO;

You should remove this extra return NO.

Also, there's another similar respondsToSelector check nearby that can be removed
Comment 3 Tim Horton 2020-03-17 18:59:10 PDT
Comment on attachment 393807 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=393807&action=review

>> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:8703
>>      return NO;
> 
> You should remove this extra return NO.
> 
> Also, there's another similar respondsToSelector check nearby that can be removed

Actually, maybe this method doesn't need a return value anymore? Does that perhaps simplify the calling code too? That might be nice.
Comment 4 Megan Gardner 2020-03-17 19:39:57 PDT
Created attachment 393815 [details]
Patch
Comment 5 Megan Gardner 2020-03-18 09:11:58 PDT
Created attachment 393867 [details]
Patch
Comment 6 Megan Gardner 2020-03-18 10:34:13 PDT
<rdar://problem/60512470>
Comment 7 WebKit Commit Bot 2020-03-18 11:15:48 PDT
Comment on attachment 393867 [details]
Patch

Clearing flags on attachment: 393867

Committed r258653: <https://trac.webkit.org/changeset/258653>
Comment 8 WebKit Commit Bot 2020-03-18 11:15:50 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Darin Adler 2020-03-18 12:05:37 PDT
One small probably-unimportant pedantic question: if these were incorrect, why is there no behavior change?
Comment 10 Tim Horton 2020-03-18 12:19:34 PDT
(In reply to Darin Adler from comment #9)
> One small probably-unimportant pedantic question: if these were incorrect,
> why is there no behavior change?

Because the selector it checked and the selector we used happened to be introduced at the same time :)