WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
190402
[iOS] Cleanup -[WAKView _selfHandleEvent:] and -[WAKWindow sendEventSynchronously:]
https://bugs.webkit.org/show_bug.cgi?id=190402
Summary
[iOS] Cleanup -[WAKView _selfHandleEvent:] and -[WAKWindow sendEventSynchrono...
Daniel Bates
Reported
2018-10-09 09:56:16 PDT
Cleanup code style in -[WAKView _selfHandleEvent:] and -[WAKWindow sendEventSynchronously:] and remove default case statements with body ASSERT_NOT_REACHED() so as make a missing enumerator a compile-time error instead of a runtime error.
Attachments
Patch
(5.04 KB, patch)
2018-10-09 09:59 PDT
,
Daniel Bates
no flags
Details
Formatted Diff
Diff
Patch
(5.17 KB, patch)
2018-10-09 10:07 PDT
,
Daniel Bates
no flags
Details
Formatted Diff
Diff
Patch
(5.11 KB, patch)
2018-10-09 10:13 PDT
,
Daniel Bates
no flags
Details
Formatted Diff
Diff
Patch
(5.11 KB, patch)
2018-10-09 10:46 PDT
,
Daniel Bates
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Daniel Bates
Comment 1
2018-10-09 09:59:11 PDT
Created
attachment 351884
[details]
Patch
Daniel Bates
Comment 2
2018-10-09 10:07:18 PDT
Created
attachment 351885
[details]
Patch More clean up of -[WAKView _selfHandleEvent:]. Inline a local variable into the swithc condition, change break statements to return statements and remove the return statement at the end of the function as the compiler is capable of verifing that the switch block handles all enumerators.
Daniel Bates
Comment 3
2018-10-09 10:13:26 PDT
Created
attachment 351886
[details]
Patch Tighten up -[WAKView _selfHandleEvent:] some more by removing unncessary braces.
Anders Carlsson
Comment 4
2018-10-09 10:14:15 PDT
Comment on
attachment 351886
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=351886&action=review
> Source/WebCore/platform/ios/wak/WAKView.mm:132 > - (BOOL)_selfHandleEvent:(WebEvent *)event > {
Does _selfHandleEvent ever return NO? I'm guessing there are WAKView subclasses that can return NO.
Daniel Bates
Comment 5
2018-10-09 10:46:06 PDT
Created
attachment 351894
[details]
Patch
Daniel Bates
Comment 6
2018-10-09 14:22:36 PDT
(In reply to Anders Carlsson from
comment #4
)
> Comment on
attachment 351886
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=351886&action=review
> > > Source/WebCore/platform/ios/wak/WAKView.mm:132 > > - (BOOL)_selfHandleEvent:(WebEvent *)event > > { > > Does _selfHandleEvent ever return NO? I'm guessing there are WAKView > subclasses that can return NO.
Your intuition is correct. -[WAKScrollView _selfHandleEvent] can return NO: <
https://trac.webkit.org/browser/trunk/Source/WebCore/platform/ios/wak/WAKScrollView.mm?rev=236938#L88
>.
Daniel Bates
Comment 7
2018-10-10 20:08:39 PDT
Comment on
attachment 351894
[details]
Patch Clearing flags on attachment: 351894 Committed
r237027
: <
https://trac.webkit.org/changeset/237027
>
Daniel Bates
Comment 8
2018-10-10 20:08:41 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9
2018-10-10 20:09:28 PDT
<
rdar://problem/45182678
>
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