Summary: | PlatformGamepad should have an inherent index | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brady Eidson <beidson> | ||||||||
Component: | WebCore Misc. | Assignee: | Brady Eidson <beidson> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | buildbot, commit-queue, dino, rniwa | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 134386 | ||||||||||
Attachments: |
|
Description
Brady Eidson
2014-07-06 17:09:11 PDT
Created attachment 234470 [details]
Patch v1
Comment on attachment 234470 [details] Patch v1 Attachment 234470 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/6598039766564864 New failing tests: media/W3C/video/src/src_reflects_attribute_not_source_elements.html Created attachment 234475 [details]
Archive of layout-test-results from webkit-ews-09 for mac-mountainlion-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-09 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Ummmmm yah, that's not related. That failure is a flake that's been hitting some set of bots for awhile, definitely not related. This can be reviewed. Comment on attachment 234470 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=234470&action=review > Source/WebCore/Modules/gamepad/Gamepad.h:60 > + Gamepad(const PlatformGamepad&); Should mark this explicit. > Source/WebCore/Modules/gamepad/GamepadManager.cpp:86 > unsigned size = platformGamepads.size(); > for (unsigned i = 0; i < size; ++i) { > if (platformGamepads[i]) > - navigator->gamepadConnected(i); > + navigator->gamepadConnected(*platformGamepads[i]); > } Should write this as a modern for loop: for (auto& gamepad : GamepadProvider::shared().platformGamepads()) { if (gamepad) navigator->gamepadConnected(*gamepad); } > Source/WebCore/platform/PlatformGamepad.h:48 > + PlatformGamepad(unsigned index) Should mark this explicit. > Source/WebCore/platform/mac/HIDGamepadProvider.cpp:240 > +std::unique_ptr<HIDGamepad> HIDGamepadProvider::removeGamepadForDevice(IOHIDDeviceRef device) Extra space here after the ">" character. > Source/WebCore/platform/mac/HIDGamepadProvider.cpp:249 > for (unsigned i = 0; i < m_gamepadVector.size(); ++i) { > - if (m_gamepadVector[i] == result.first.get()) { > - result.second = i; > + if (m_gamepadVector[i] == result.get()) { > m_gamepadVector[i] = nullptr; > break; > } Could write this with Vector::find: auto i = m_gamepadVector.find(result.get()); if (i != notFound) m_gamepadVector[i] = nullptr; Created attachment 234530 [details]
Patch for landing
Comment on attachment 234530 [details] Patch for landing Clearing flags on attachment: 234530 Committed r170869: <http://trac.webkit.org/changeset/170869> All reviewed patches have been landed. Closing bug. |