WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
168183
[Cocoa] Some -respondsToSelector: checks are unnecessary
https://bugs.webkit.org/show_bug.cgi?id=168183
Summary
[Cocoa] Some -respondsToSelector: checks are unnecessary
mitz
Reported
2017-02-12 00:08:04 PST
If a method or property is declared in a class interface or class extension, there’s no need to check.
Attachments
For EWS
(32.97 KB, patch)
2017-02-12 00:08 PST
,
mitz
no flags
Details
Formatted Diff
Diff
For EWS
(33.19 KB, patch)
2017-02-12 09:01 PST
,
mitz
no flags
Details
Formatted Diff
Diff
For EWS
(41.51 KB, text/plain)
2017-02-12 09:36 PST
,
mitz
no flags
Details
For EWS
(41.51 KB, patch)
2017-02-12 09:37 PST
,
mitz
no flags
Details
Formatted Diff
Diff
For EWS
(59.37 KB, patch)
2017-02-12 10:36 PST
,
mitz
no flags
Details
Formatted Diff
Diff
Remove unnecessary checking
(67.36 KB, patch)
2017-02-12 12:06 PST
,
mitz
thorton
: review+
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
mitz
Comment 1
2017-02-12 00:08:52 PST
Created
attachment 301293
[details]
For EWS
WebKit Commit Bot
Comment 2
2017-02-12 00:11:36 PST
Attachment 301293
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4166: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4166: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4167: Wrong number of spaces before statement. (expected: 24) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4167: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4172: Wrong number of spaces before statement. (expected: 24) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4167: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4167: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4172: Wrong number of spaces before statement. (expected: 24) [whitespace/indent] [4] ERROR: Source/WebKit2/Platform/spi/ios/UIKitSPI.h:311: Should have space between @property and attributes. [whitespace/property] [4] ERROR: Source/WebKit2/Platform/spi/ios/UIKitSPI.h:311: Missing space after , [whitespace/comma] [3] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:489: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:489: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:490: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:490: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:495: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:497: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:490: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:490: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:495: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:497: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] Total errors found: 20 in 15 files If any of these errors are false positives, please file a bug against check-webkit-style.
mitz
Comment 3
2017-02-12 09:01:38 PST
Created
attachment 301305
[details]
For EWS
WebKit Commit Bot
Comment 4
2017-02-12 09:02:52 PST
Attachment 301305
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4166: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4166: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4167: Wrong number of spaces before statement. (expected: 24) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4167: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4172: Wrong number of spaces before statement. (expected: 24) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4167: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4167: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4172: Wrong number of spaces before statement. (expected: 24) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:489: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:489: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:490: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:490: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:495: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:497: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:490: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:490: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:495: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:497: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] Total errors found: 18 in 15 files If any of these errors are false positives, please file a bug against check-webkit-style.
mitz
Comment 5
2017-02-12 09:36:06 PST
Created
attachment 301306
[details]
For EWS
mitz
Comment 6
2017-02-12 09:37:20 PST
Created
attachment 301307
[details]
For EWS
WebKit Commit Bot
Comment 7
2017-02-12 09:40:22 PST
Attachment 301307
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4166: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4166: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4167: Wrong number of spaces before statement. (expected: 24) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4167: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4172: Wrong number of spaces before statement. (expected: 24) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4167: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4167: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4172: Wrong number of spaces before statement. (expected: 24) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:489: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:489: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:490: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:490: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:495: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:497: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:490: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:490: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:495: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:497: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit/mac/WebView/WebImmediateActionController.mm:441: The parameter name "]" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 19 in 20 files If any of these errors are false positives, please file a bug against check-webkit-style.
mitz
Comment 8
2017-02-12 10:36:05 PST
Created
attachment 301310
[details]
For EWS
mitz
Comment 9
2017-02-12 10:36:41 PST
One of the checks was masking a change to NEFilterSource SPI!
WebKit Commit Bot
Comment 10
2017-02-12 10:38:16 PST
Attachment 301310
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4166: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4166: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4167: Wrong number of spaces before statement. (expected: 24) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4167: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4172: Wrong number of spaces before statement. (expected: 24) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4167: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4167: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4172: Wrong number of spaces before statement. (expected: 24) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:489: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:489: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:490: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:490: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:495: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:497: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:490: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:490: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:495: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:497: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit/mac/WebView/WebImmediateActionController.mm:441: The parameter name "]" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 19 in 32 files If any of these errors are false positives, please file a bug against check-webkit-style.
mitz
Comment 11
2017-02-12 12:06:07 PST
Created
attachment 301313
[details]
Remove unnecessary checking
WebKit Commit Bot
Comment 12
2017-02-12 12:08:03 PST
Attachment 301313
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4166: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4166: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4167: Wrong number of spaces before statement. (expected: 24) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4167: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4172: Wrong number of spaces before statement. (expected: 24) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4167: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4167: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:4172: Wrong number of spaces before statement. (expected: 24) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:489: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:489: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:490: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:490: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:495: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:497: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:490: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:490: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:495: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm:497: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/WebKit/mac/WebView/WebImmediateActionController.mm:441: The parameter name "]" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 19 in 35 files If any of these errors are false positives, please file a bug against check-webkit-style.
Tim Horton
Comment 13
2017-02-12 13:05:22 PST
Comment on
attachment 301313
[details]
Remove unnecessary checking Woo!
mitz
Comment 14
2017-02-12 14:03:13 PST
Committed <
https://trac.webkit.org/r212211
>.
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