| Summary: | Hard code some MFi controller devices instead of dynamically managing HID vs GameController.framework | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Brady Eidson <beidson> | ||||||||||||
| Component: | WebCore Misc. | Assignee: | Brady Eidson <beidson> | ||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||
| Severity: | Normal | CC: | thorton, webkit-bug-importer | ||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||
| Hardware: | Unspecified | ||||||||||||||
| OS: | Unspecified | ||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Brady Eidson
2020-07-22 16:20:26 PDT
I have this in progress, will wait on https://bugs.webkit.org/show_bug.cgi?id=214188 to land so we can keep testing with future changes Created attachment 405187 [details]
Patch
Created attachment 405188 [details]
Patch
Created attachment 405190 [details]
Patch
Created attachment 405191 [details]
Patch
Comment on attachment 405191 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=405191&action=review Vast majority of this is a rs (test code) > Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.mm:42 > +bool GameControllerGamepadProvider::willHandleVendorAndProduct(uint16_t vendorID, uint16_t productID) Allow me to register my objection at this code living in WebKit :D > Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.mm:206 > + CFNumberGetValue(cfVendorID, kCFNumberIntType, &vendorID); > + CFNumberGetValue(cfProductID, kCFNumberIntType, &productID); Please don't use this; toll-free bridge to NSNumber and use the not-scary API. Even though it's fine in this case, it's nonideal to promote the dangerous one by using it. (In reply to Tim Horton from comment #8) > Comment on attachment 405191 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=405191&action=review > > Vast majority of this is a rs (test code) > > > Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.mm:42 > > +bool GameControllerGamepadProvider::willHandleVendorAndProduct(uint16_t vendorID, uint16_t productID) > > Allow me to register my objection at this code living in WebKit :D Noted. Your objection is second behind mine. Can't wait to remove it. > > Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.mm:206 > > + CFNumberGetValue(cfVendorID, kCFNumberIntType, &vendorID); > > + CFNumberGetValue(cfProductID, kCFNumberIntType, &productID); > > Please don't use this; toll-free bridge to NSNumber and use the not-scary > API. Even though it's fine in this case, it's nonideal to promote the > dangerous one by using it. Done. Created attachment 405208 [details]
Patch for landing
Committed r264874: <https://trac.webkit.org/changeset/264874> All reviewed patches have been landed. Closing bug and clearing flags on attachment 405208 [details]. There were some build fixes for open source Catalina builders. Namely: https://trac.webkit.org/changeset/264881 https://trac.webkit.org/changeset/264883 https://trac.webkit.org/changeset/264884 https://trac.webkit.org/changeset/264885 https://trac.webkit.org/changeset/264886 https://trac.webkit.org/changeset/264887 https://trac.webkit.org/changeset/264888 (Can we get Catalina EWS plz?) |