[Webkit-unassigned] [Bug 215775] New: navigator.getGamepads() returns live Gamepad objects instead of snapshots
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Aug 24 11:55:06 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=215775
Bug ID: 215775
Summary: navigator.getGamepads() returns live Gamepad objects
instead of snapshots
Product: WebKit
Version: Safari Technology Preview
Hardware: All
OS: All
Status: NEW
Severity: Normal
Priority: P2
Component: WebCore Misc.
Assignee: webkit-unassigned at lists.webkit.org
Reporter: jameshoward at mac.com
Created attachment 407119
--> https://bugs.webkit.org/attachment.cgi?id=407119&action=review
Test page
navigator.getGamepads() returns live Gamepad objects instead of snapshots
According to the HTML5 Gamepad spec[1], each gamepad object returned from navigator.getGamepads() is to be a snapshot of the gamepad state:
> getGamepads()
> Retrieve a snapshot of the data for the the currently connected and interacted-with gamepads.
Attached is a small test page that saves the result of Gamepad objects returned from getGamepads() each animation tick, and checks to see if they are snapshots or if they are live objects, by comparing with a manually created snapshot object. Testing this page with a gamepad in Safari will show a number of mismatch errors in the top line of the textarea on the page -- errors being when the saved Gamepad object doesn't match up with the manual snapshot because it changed since getGamepads() was called.
Steps to reproduce:
1. Load attached test page
2. Press buttons on an attached gamepad
3. Count mismatch errors shown on test page
Reproduces in:
Version/14.0 Safari/605.1.15 (macOS 10.15.6)
Version/14.0 Safari/605.1.15 (iPadOS 14 Beta 5 (18A5351d))
Version/13.1.2 Safari/604.1 (iOS 13.6)
Does not reproduce in:
Chrome Version 84.0.4147.135 (macOS 10.15.6)
[^1] https://w3c.github.io/gamepad/#navigator-interface-extension
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200824/b5872d6f/attachment.htm>
More information about the webkit-unassigned
mailing list