Summary: | [iOS] Inline -_ensureFormAccessoryView into -formAccessoryView and have -_updateAccessory ensure we have a form accessory | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Daniel Bates <dbates> | ||||||
Component: | WebKit Misc. | Assignee: | Daniel Bates <dbates> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | thorton, webkit-bug-importer, wenson_hsieh | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Local Build | ||||||||
Hardware: | iPhone / iPad | ||||||||
OS: | iOS 12 | ||||||||
Attachments: |
|
Description
Daniel Bates
2019-03-20 11:49:48 PDT
Created attachment 365374 [details]
Patch
Comment on attachment 365374 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=365374&action=review > Source/WebKit/ChangeLog:9 > + Every caller of -_ensureFormAccessoryView, except -formAccessoryView, immediately the call with > + -_updateAccessory. Let's just have -_updateAccessory ensure we have a form accessory view and Nit - "immediately the call with" > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:3784 > + [self formAccessoryView]; // Creates one if needed. Nit - we can also do something like: UIWebFormAccessory *accessoryView = [self formAccessoryView]; ...and then just use the accessoryView variable below, instead of _formAccessoryView. I think we wouldn't need the comment if we did this. Comment on attachment 365374 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=365374&action=review >> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:3784 >> + [self formAccessoryView]; // Creates one if needed. > > Nit - we can also do something like: > > UIWebFormAccessory *accessoryView = [self formAccessoryView]; > > ...and then just use the accessoryView variable below, instead of _formAccessoryView. I think we wouldn't need the comment if we did this. Of course! What was I thinking! Comment on attachment 365374 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=365374&action=review >>> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:3784 >>> + [self formAccessoryView]; // Creates one if needed. >> >> Nit - we can also do something like: >> >> UIWebFormAccessory *accessoryView = [self formAccessoryView]; >> >> ...and then just use the accessoryView variable below, instead of _formAccessoryView. I think we wouldn't need the comment if we did this. > > Of course! What was I thinking! I'm still going to keep the comment though, because it seems subtle and I absolutely can envision a person in the future coming through this code, realizing we have _formAccessoryView and without thinking swap out the self.formAccessoryView with _formAccessoryView. (In reply to Daniel Bates from comment #4) > Comment on attachment 365374 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=365374&action=review > > >>> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:3784 > >>> + [self formAccessoryView]; // Creates one if needed. > >> > >> Nit - we can also do something like: > >> > >> UIWebFormAccessory *accessoryView = [self formAccessoryView]; > >> > >> ...and then just use the accessoryView variable below, instead of _formAccessoryView. I think we wouldn't need the comment if we did this. > > > > Of course! What was I thinking! > > I'm still going to keep the comment though, because it seems subtle and I > absolutely can envision a person in the future coming through this code, > realizing we have _formAccessoryView and without thinking swap out the > self.formAccessoryView with _formAccessoryView. Having a test would be better to catch this though :/ Leaving the comment in for now. Created attachment 365573 [details]
To Land
Committed r243302: <https://trac.webkit.org/changeset/243302> |