Summary: | [iOS] Cleanup -[WAKView _selfHandleEvent:] and -[WAKWindow sendEventSynchronously:] | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Daniel Bates <dbates> | ||||||||||
Component: | WebCore Misc. | Assignee: | Daniel Bates <dbates> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | aestes, andersca, webkit-bug-importer, wenson_hsieh | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Local Build | ||||||||||||
Hardware: | All | ||||||||||||
OS: | iOS 12 | ||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 190571 | ||||||||||||
Attachments: |
|
Description
Daniel Bates
2018-10-09 09:56:16 PDT
Created attachment 351884 [details]
Patch
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.
Created attachment 351886 [details]
Patch
Tighten up -[WAKView _selfHandleEvent:] some more by removing unncessary braces.
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. Created attachment 351894 [details]
Patch
(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>. Comment on attachment 351894 [details] Patch Clearing flags on attachment: 351894 Committed r237027: <https://trac.webkit.org/changeset/237027> All reviewed patches have been landed. Closing bug. |