Get timestamps and ids working in WK2 gamepads (and test them!)
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Aug 2016 16:22:37 +0000 (16:22 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Aug 2016 16:22:37 +0000 (16:22 +0000)
commitbba0890bcda92fa6dfee5d08803d4428347302ec
tree7e8a73d6494ecfebb5f101a22fa71ca08725aefd
parentfcba00541c28a62af156b674388f5297ce49ab19
Get timestamps and ids working in WK2 gamepads (and test them!)
https://bugs.webkit.org/show_bug.cgi?id=161112

Reviewed by Alex Christensen.

Source/WebKit2:

* Shared/Gamepad/GamepadData.cpp:
(WebKit::GamepadData::GamepadData):
(WebKit::GamepadData::encode):
(WebKit::GamepadData::decode):
* Shared/Gamepad/GamepadData.h:
(WebKit::GamepadData::id):
(WebKit::GamepadData::index): Deleted.

* UIProcess/Gamepad/UIGamepad.cpp:
(WebKit::UIGamepad::UIGamepad):
(WebKit::UIGamepad::condensedGamepadData):
(WebKit::UIGamepad::fullGamepadData): Include the ID for initial WebGamepad creation.
(WebKit::UIGamepad::gamepadData): Deleted.
* UIProcess/Gamepad/UIGamepad.h:

* UIProcess/Gamepad/UIGamepadProvider.cpp:
(WebKit::UIGamepadProvider::snapshotGamepads):

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::gamepadConnected):
(WebKit::WebProcessPool::setInitialConnectedGamepads):

* WebProcess/Gamepad/WebGamepad.cpp:
(WebKit::WebGamepad::WebGamepad):
(WebKit::WebGamepad::updateValues):

LayoutTests:

* gamepad/gamepad-polling-access-expected.txt:
* gamepad/gamepad-polling-access.html:
* gamepad/gamepad-timestamp-expected.txt: Added.
* gamepad/gamepad-timestamp.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204896 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/gamepad/gamepad-polling-access-expected.txt
LayoutTests/gamepad/gamepad-polling-access.html
LayoutTests/gamepad/gamepad-timestamp-expected.txt [new file with mode: 0644]
LayoutTests/gamepad/gamepad-timestamp.html [new file with mode: 0644]
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/Gamepad/GamepadData.cpp
Source/WebKit2/Shared/Gamepad/GamepadData.h
Source/WebKit2/UIProcess/Gamepad/UIGamepad.cpp
Source/WebKit2/UIProcess/Gamepad/UIGamepad.h
Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.cpp
Source/WebKit2/UIProcess/WebProcessPool.cpp
Source/WebKit2/WebProcess/Gamepad/WebGamepad.cpp