WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
134375
The user pressing a button on a gamepad should cause gamepads to become visible to all NavigatorGamepads
https://bugs.webkit.org/show_bug.cgi?id=134375
Summary
The user pressing a button on a gamepad should cause gamepads to become visib...
Brady Eidson
Reported
2014-06-26 18:30:27 PDT
The user pressing a button on a gamepad should cause gamepads to become visible to all NavigatorGamepads
Attachments
Patch v1
(7.95 KB, patch)
2014-06-26 23:01 PDT
,
Brady Eidson
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Brady Eidson
Comment 1
2014-06-26 23:01:22 PDT
Created
attachment 233967
[details]
Patch v1
Brady Eidson
Comment 2
2014-06-26 23:02:39 PDT
Ignore the can't-buildness that EWS sees - In my tree this patch is built on previous patches. I will pass it through EWS before landing.
Darin Adler
Comment 3
2014-06-27 09:59:09 PDT
Comment on
attachment 233967
[details]
Patch v1 View in context:
https://bugs.webkit.org/attachment.cgi?id=233967&action=review
> Source/WebCore/Modules/gamepad/GamepadManager.cpp:81 > + const Vector<PlatformGamepad*>& platformGamepads = GamepadProvider::shared().platformGamepads();
Seems like a good place to use auto, although maybe Alexey wouldn’t agree.
> Source/WebCore/Modules/gamepad/GamepadManager.cpp:82 > + for (unsigned i = 0; i < platformGamepads.size(); ++i) {
Normally it’s an anti-pattern to actually call size each time through. My own preference is to put it into a local variable named size, either inside the for or just before it: for (unsigned i = 0, size = platformGamepads.size(); i < size; ++i)
> Source/WebCore/platform/mac/HIDGamepadProvider.cpp:85 > + , m_inputNotificationTimer(this, &HIDGamepadProvider::inputNotificationTimerFired)
Consider the new style Timer that uses a function/lambda instead of a pointer to member function.
> Source/WebCore/platform/mac/HIDGamepadProvider.cpp:215 > + if (!m_inputNotificationTimer.isActive()) > + m_inputNotificationTimer.startOneShot(InputNotificationDelay);
A why comment would be good here to explain why the isActive check. We want to delay from the time of the first input, not postpone when we get additional input, I assume.
Brady Eidson
Comment 4
2014-06-27 14:12:02 PDT
http://trac.webkit.org/changeset/170553
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