Bug 134324

Summary: Add HID-based gamepad implementation for Mac
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebCore Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: bunhere, cdumez, commit-queue, dino, gyuyoung.kim, rniwa, sergio, syoichi
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 134076    
Attachments:
Description Flags
Patch v1
dino: review+
Patch for landing v1
beidson: commit-queue+
Patch for landing v2 - Fix *one* style complaint, remove stale #include that will fix the build none

Brady Eidson
Reported 2014-06-25 19:23:31 PDT
Add HID-based gamepad implementation for Mac This also hooks up the platform abstractions to the actual Gamepad mechanisms. This gets the gamepad API working in WK1, and the pieces for WK2 support are also there for later use.
Attachments
Patch v1 (60.83 KB, patch)
2014-06-25 19:54 PDT, Brady Eidson
dino: review+
Patch for landing v1 (60.87 KB, patch)
2014-06-25 21:02 PDT, Brady Eidson
beidson: commit-queue+
Patch for landing v2 - Fix *one* style complaint, remove stale #include that will fix the build (60.81 KB, patch)
2014-06-25 21:17 PDT, Brady Eidson
no flags
Brady Eidson
Comment 1 2014-06-25 19:54:13 PDT
Created attachment 233867 [details] Patch v1 I don't expect this to pass EWS yet because it relies on the patch in bug 134325 landing first. But it's ready for review.
Dean Jackson
Comment 2 2014-06-25 20:07:49 PDT
Comment on attachment 233867 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=233867&action=review > Source/WebCore/Modules/gamepad/Gamepad.cpp:45 > + for (unsigned i = 0; i < platformGamepad.buttonValues().size(); ++i) > + m_buttons.append(GamepadButton::create()); Can this be a C++11 for loop? > Source/WebCore/Modules/gamepad/GamepadManager.cpp:71 > + // connectect/disconnected event listeners. Nit: typo connected > Source/WebCore/Modules/gamepad/GamepadManager.cpp:83 > + // connectect/disconnected event listeners. Ditto
Brady Eidson
Comment 3 2014-06-25 20:09:42 PDT
(In reply to comment #2) > (From update of attachment 233867 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=233867&action=review > > > Source/WebCore/Modules/gamepad/Gamepad.cpp:45 > > + for (unsigned i = 0; i < platformGamepad.buttonValues().size(); ++i) > > + m_buttons.append(GamepadButton::create()); > > Can this be a C++11 for loop? Yes. > > > Source/WebCore/Modules/gamepad/GamepadManager.cpp:71 > > + // connectect/disconnected event listeners. > > Nit: typo connected > > > Source/WebCore/Modules/gamepad/GamepadManager.cpp:83 > > + // connectect/disconnected event listeners. > > Ditto Got it. Thanks!
Brady Eidson
Comment 4 2014-06-25 21:02:00 PDT
Created attachment 233875 [details] Patch for landing v1
WebKit Commit Bot
Comment 5 2014-06-25 21:04:22 PDT
Attachment 233875 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/gamepad/Gamepad.h:60: The parameter name "platformGamepad" adds no information, so it should be removed. [readability/parameter_name] [5] ERROR: Source/WebCore/platform/mac/HIDGamepad.cpp:64: Use 0 instead of NULL. [readability/null] [5] Total errors found: 2 in 20 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brady Eidson
Comment 6 2014-06-25 21:17:49 PDT
Created attachment 233878 [details] Patch for landing v2 - Fix *one* style complaint, remove stale #include that will fix the build
WebKit Commit Bot
Comment 7 2014-06-25 21:19:13 PDT
Attachment 233878 [details] did not pass style-queue: ERROR: Source/WebCore/platform/mac/HIDGamepad.cpp:64: Use 0 instead of NULL. [readability/null] [5] Total errors found: 1 in 20 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 8 2014-06-25 21:49:58 PDT
Comment on attachment 233878 [details] Patch for landing v2 - Fix *one* style complaint, remove stale #include that will fix the build Clearing flags on attachment: 233878 Committed r170465: <http://trac.webkit.org/changeset/170465>
WebKit Commit Bot
Comment 9 2014-06-25 21:50:03 PDT
All reviewed patches have been landed. Closing bug.
Ryosuke Niwa
Comment 10 2014-06-25 22:31:33 PDT
Build fix attempt landed in http://trac.webkit.org/changeset/170468.
Note You need to log in before you can comment on or make changes to this bug.